From 57a2cd06acb1124450e6fc73e7de81691d529e76 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Wed, 24 Oct 2018 18:58:01 -0700 Subject: [PATCH 01/23] Update changelog --- CHANGELOG.md | 137 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 99 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c14b751b..556f129d3 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,104 @@ # Change Log -## [Unreleased](https://github.com/bankex/web3swift/tree/HEAD) +## [Unreleased](https://github.com/matterinc/web3swift/tree/HEAD) + +[Full Changelog](https://github.com/matterinc/web3swift/compare/1.5.1...HEAD) + +**Implemented enhancements:** + +- ENS for wallets [\#12](https://github.com/matterinc/web3swift/issues/12) +- Recover passphrase from BIP32 store [\#5](https://github.com/matterinc/web3swift/issues/5) + +**Merged pull requests:** + +- hotfix update pods [\#71](https://github.com/matterinc/web3swift/pull/71) ([BaldyAsh](https://github.com/BaldyAsh)) + +## [1.5.1](https://github.com/matterinc/web3swift/tree/1.5.1) (2018-10-22) +[Full Changelog](https://github.com/matterinc/web3swift/compare/1.5...1.5.1) + +**Merged pull requests:** + +- Function visibility fix [\#70](https://github.com/matterinc/web3swift/pull/70) ([shamatar](https://github.com/shamatar)) + +## [1.5](https://github.com/matterinc/web3swift/tree/1.5) (2018-10-18) +[Full Changelog](https://github.com/matterinc/web3swift/compare/1.1.10...1.5) + +**Implemented enhancements:** + +- Can you add support for ERC-721 tokens [\#7](https://github.com/matterinc/web3swift/issues/7) + +**Closed issues:** + +- Creating a new wallet is too slow [\#63](https://github.com/matterinc/web3swift/issues/63) +- need to update for Xcode10 [\#49](https://github.com/matterinc/web3swift/issues/49) +- Web3.Utils.formatToEthereumUnits [\#48](https://github.com/matterinc/web3swift/issues/48) +- Interface ideas are welcome for v2.0 [\#3](https://github.com/matterinc/web3swift/issues/3) + +**Merged pull requests:** + +- Add TxPool and ERC721 native class [\#68](https://github.com/matterinc/web3swift/pull/68) ([shamatar](https://github.com/shamatar)) +- Feature/erc721 [\#67](https://github.com/matterinc/web3swift/pull/67) ([BaldyAsh](https://github.com/BaldyAsh)) +- Feature/adding logo [\#66](https://github.com/matterinc/web3swift/pull/66) ([BaldyAsh](https://github.com/BaldyAsh)) +- adds txpool function and its local node test [\#64](https://github.com/matterinc/web3swift/pull/64) ([currybab](https://github.com/currybab)) +- License got reverted somewhere after PRs [\#60](https://github.com/matterinc/web3swift/pull/60) ([shamatar](https://github.com/shamatar)) + +## [1.1.10](https://github.com/matterinc/web3swift/tree/1.1.10) (2018-10-04) +[Full Changelog](https://github.com/matterinc/web3swift/compare/1.1.9...1.1.10) + +**Merged pull requests:** + +- Preliminary ENS support, start module splitting [\#59](https://github.com/matterinc/web3swift/pull/59) ([shamatar](https://github.com/shamatar)) +- Feature/readme improvement [\#55](https://github.com/matterinc/web3swift/pull/55) ([BaldyAsh](https://github.com/BaldyAsh)) +- Feature/support obj c [\#54](https://github.com/matterinc/web3swift/pull/54) ([BaldyAsh](https://github.com/BaldyAsh)) +- Feature/ENSsupport [\#53](https://github.com/matterinc/web3swift/pull/53) ([FesenkoG](https://github.com/FesenkoG)) +- Add Travis configuration [\#52](https://github.com/matterinc/web3swift/pull/52) ([skywinder](https://github.com/skywinder)) +- Added ERC-20 token for testing web3swift lib [\#50](https://github.com/matterinc/web3swift/pull/50) ([BaldyAsh](https://github.com/BaldyAsh)) + +## [1.1.9](https://github.com/matterinc/web3swift/tree/1.1.9) (2018-09-18) +[Full Changelog](https://github.com/matterinc/web3swift/compare/1.1.7...1.1.9) + +**Fixed bugs:** + +- eth.getAccounts\(\) function returns an empty address Array [\#24](https://github.com/matterinc/web3swift/issues/24) +- EIP681 bug fixes, accessibility in Function changed [\#35](https://github.com/matterinc/web3swift/pull/35) ([FesenkoG](https://github.com/FesenkoG)) + +**Closed issues:** + +- the version 1.1.6 couldn't from password and keystore to get the privateKey [\#32](https://github.com/matterinc/web3swift/issues/32) +- Need implementation of EIP-681 parsing [\#25](https://github.com/matterinc/web3swift/issues/25) + +**Merged pull requests:** + +- Update for XCode 10 [\#39](https://github.com/matterinc/web3swift/pull/39) ([shamatar](https://github.com/shamatar)) +- Basic ENS support added, EIP681 parsing supports ENS from now. [\#38](https://github.com/matterinc/web3swift/pull/38) ([FesenkoG](https://github.com/FesenkoG)) + +## [1.1.7](https://github.com/matterinc/web3swift/tree/1.1.7) (2018-09-13) +[Full Changelog](https://github.com/matterinc/web3swift/compare/1.1.6...1.1.7) + +**Fixed bugs:** + +- Thread blocked [\#16](https://github.com/matterinc/web3swift/issues/16) + +**Closed issues:** + +- How to create same address and keystore by mnemonics? [\#22](https://github.com/matterinc/web3swift/issues/22) + +**Merged pull requests:** + +- Fix ethereum address parsing, add readme [\#34](https://github.com/matterinc/web3swift/pull/34) ([shamatar](https://github.com/shamatar)) +- complete EIP681, fix the most stupid Ethereum address parsing [\#33](https://github.com/matterinc/web3swift/pull/33) ([shamatar](https://github.com/shamatar)) +- Add examples to readme, prettify formatting [\#31](https://github.com/matterinc/web3swift/pull/31) ([skywinder](https://github.com/skywinder)) +- continue eip681 work [\#27](https://github.com/matterinc/web3swift/pull/27) ([shamatar](https://github.com/shamatar)) +- Implement EIP681 parser \(untested\) [\#26](https://github.com/matterinc/web3swift/pull/26) ([shamatar](https://github.com/shamatar)) +- Change access control of function fromRaw in struct EthereumTransaction [\#11](https://github.com/matterinc/web3swift/pull/11) ([Plazmathron](https://github.com/Plazmathron)) + +## [1.1.6](https://github.com/matterinc/web3swift/tree/1.1.6) (2018-09-04) +[Full Changelog](https://github.com/matterinc/web3swift/compare/1.1.5...1.1.6) + +**Merged pull requests:** + +- Quick fix for scrypt performance [\#17](https://github.com/matterinc/web3swift/pull/17) ([shamatar](https://github.com/shamatar)) +- adding description string to Web3Error [\#1](https://github.com/matterinc/web3swift/pull/1) ([GabCas](https://github.com/GabCas)) [Full Changelog](https://github.com/bankex/web3swift/compare/0.6.0...HEAD) @@ -237,43 +335,6 @@ - Wrong conversation of the Wei. [\#2](https://github.com/BANKEX/web3swift/issues/2) - How to connect to a Localhost Node? [\#1](https://github.com/BANKEX/web3swift/issues/1) -## [0.2.8](https://github.com/bankex/web3swift/tree/0.2.8) (2018-01-18) -[Full Changelog](https://github.com/bankex/web3swift/compare/0.2.7...0.2.8) - -## [0.2.7](https://github.com/bankex/web3swift/tree/0.2.7) (2018-01-15) -[Full Changelog](https://github.com/bankex/web3swift/compare/0.2.5...0.2.7) - -## [0.2.5](https://github.com/bankex/web3swift/tree/0.2.5) (2018-01-12) -[Full Changelog](https://github.com/bankex/web3swift/compare/0.2.0...0.2.5) - -## [0.2.0](https://github.com/bankex/web3swift/tree/0.2.0) (2017-12-30) -[Full Changelog](https://github.com/bankex/web3swift/compare/0.1.2...0.2.0) - -## [0.1.2](https://github.com/bankex/web3swift/tree/0.1.2) (2017-12-27) -[Full Changelog](https://github.com/bankex/web3swift/compare/0.1.1...0.1.2) - -## [0.1.1](https://github.com/bankex/web3swift/tree/0.1.1) (2017-12-26) -[Full Changelog](https://github.com/bankex/web3swift/compare/0.1.0...0.1.1) - -## [0.1.0](https://github.com/bankex/web3swift/tree/0.1.0) (2017-12-26) -[Full Changelog](https://github.com/bankex/web3swift/compare/0.0.6...0.1.0) - -## [0.0.6](https://github.com/bankex/web3swift/tree/0.0.6) (2017-12-26) -[Full Changelog](https://github.com/bankex/web3swift/compare/0.0.5...0.0.6) - -## [0.0.5](https://github.com/bankex/web3swift/tree/0.0.5) (2017-12-21) -[Full Changelog](https://github.com/bankex/web3swift/compare/0.0.4...0.0.5) - -## [0.0.4](https://github.com/bankex/web3swift/tree/0.0.4) (2017-12-21) -[Full Changelog](https://github.com/bankex/web3swift/compare/0.0.3...0.0.4) - -## [0.0.3](https://github.com/bankex/web3swift/tree/0.0.3) (2017-12-20) -[Full Changelog](https://github.com/bankex/web3swift/compare/0.0.2...0.0.3) - -## [0.0.2](https://github.com/bankex/web3swift/tree/0.0.2) (2017-12-20) -[Full Changelog](https://github.com/bankex/web3swift/compare/0.0.1...0.0.2) - -## [0.0.1](https://github.com/bankex/web3swift/tree/0.0.1) (2017-12-19) \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file From 1414f31d1cc1b6f126548091ce1e1d678788e473 Mon Sep 17 00:00:00 2001 From: BaldyAsh Date: Thu, 25 Oct 2018 13:29:19 +0300 Subject: [PATCH 02/23] updated pods --- Podfile.lock | 6 +- Pods/CryptoSwift/README.md | 23 +- .../Sources/CryptoSwift/AES.Cryptors.swift | 3 + .../Sources/CryptoSwift/BlockDecryptor.swift | 12 +- .../Sources/CryptoSwift/BlockEncryptor.swift | 6 +- .../BlockMode/BlockModeOptions.swift | 4 - .../Sources/CryptoSwift/BlockMode/CCM.swift | 359 ++ .../Sources/CryptoSwift/BlockMode/CTR.swift | 2 +- .../BlockMode/CipherModeWorker.swift | 26 +- .../Sources/CryptoSwift/BlockMode/GCM.swift | 61 +- .../Sources/CryptoSwift/CBCMAC.swift | 104 + .../Sources/CryptoSwift/CMAC.swift | 85 +- .../Sources/CryptoSwift/CompactMap.swift | 2 +- .../Sources/CryptoSwift/StreamDecryptor.swift | 78 + .../Sources/CryptoSwift/StreamEncryptor.swift | 10 +- .../Public/BigInt/BigInt-iOS-umbrella.h | 2 +- .../Public/BigInt/BigInt-iOS.modulemap | 2 +- .../Public/BigInt/BigInt-macOS-umbrella.h | 2 +- .../Public/BigInt/BigInt-macOS.modulemap | 2 +- .../CryptoSwift/CryptoSwift-iOS-umbrella.h | 2 +- .../CryptoSwift/CryptoSwift-iOS.modulemap | 2 +- .../CryptoSwift/CryptoSwift-macOS-umbrella.h | 2 +- .../CryptoSwift/CryptoSwift-macOS.modulemap | 2 +- .../Public/PromiseKit/PromiseKit-umbrella.h | 2 +- .../Public/PromiseKit/PromiseKit.modulemap | 2 +- ...Kit.root-CorePromise-Foundation-umbrella.h | 2 +- ...eKit.root-CorePromise-Foundation.modulemap | 2 +- .../Public/Result/Result-iOS-umbrella.h | 2 +- .../Public/Result/Result-iOS.modulemap | 2 +- .../Public/Result/Result-macOS-umbrella.h | 2 +- .../Public/Result/Result-macOS.modulemap | 2 +- .../Public/SipHash/SipHash-iOS-umbrella.h | 2 +- .../Public/SipHash/SipHash-iOS.modulemap | 2 +- .../Public/SipHash/SipHash-macOS-umbrella.h | 2 +- .../Public/SipHash/SipHash-macOS.modulemap | 2 +- .../Public/SwiftRLP/SwiftRLP-iOS-umbrella.h | 2 +- .../Public/SwiftRLP/SwiftRLP-iOS.modulemap | 2 +- .../Public/SwiftRLP/SwiftRLP-macOS-umbrella.h | 2 +- .../Public/SwiftRLP/SwiftRLP-macOS.modulemap | 2 +- .../Public/scrypt/scrypt-iOS-umbrella.h | 2 +- .../Public/scrypt/scrypt-iOS.modulemap | 2 +- .../Public/scrypt/scrypt-macOS-umbrella.h | 2 +- .../Public/scrypt/scrypt-macOS.modulemap | 2 +- .../secp256k1_swift-iOS-umbrella.h | 2 +- .../secp256k1_swift-iOS.modulemap | 2 +- .../secp256k1_swift-macOS-umbrella.h | 2 +- .../secp256k1_swift-macOS.modulemap | 2 +- Pods/Manifest.lock | 6 +- Pods/Pods.xcodeproj/project.pbxproj | 3855 +++++++++-------- .../Pods-web3swift-iOS-acknowledgements.plist | 236 +- .../Pods-web3swift-iOS.debug.xcconfig | 2 +- .../Pods-web3swift-iOS.release.xcconfig | 2 +- ...web3swift-iOS_Tests-acknowledgements.plist | 26 +- .../Pods-web3swift-iOS_Tests.debug.xcconfig | 2 +- .../Pods-web3swift-iOS_Tests.release.xcconfig | 2 +- ...ods-web3swift-macOS-acknowledgements.plist | 236 +- .../Pods-web3swift-macOS.debug.xcconfig | 2 +- .../Pods-web3swift-macOS.release.xcconfig | 2 +- ...b3swift-macOS_Tests-acknowledgements.plist | 26 +- .../Pods-web3swift-macOS_Tests.debug.xcconfig | 2 +- ...ods-web3swift-macOS_Tests.release.xcconfig | 2 +- .../xcschemes/web3swift_Tests.xcscheme | 81 - .../xcschemes/web3swift_local_Tests.xcscheme | 89 - .../xcshareddata/WorkspaceSettings.xcsettings | 5 + 64 files changed, 2655 insertions(+), 2766 deletions(-) create mode 100644 Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift create mode 100644 Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift create mode 100644 Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift delete mode 100755 web3swift.xcodeproj/xcshareddata/xcschemes/web3swift_Tests.xcscheme delete mode 100755 web3swift.xcodeproj/xcshareddata/xcschemes/web3swift_local_Tests.xcscheme create mode 100644 web3swift.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/Podfile.lock b/Podfile.lock index d749cf3d2..bccb6ed1f 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,7 +1,7 @@ PODS: - BigInt (3.1.0): - SipHash (~> 1.2) - - CryptoSwift (0.12.0) + - CryptoSwift (0.13.0) - PromiseKit (6.4.1): - PromiseKit/CorePromise (= 6.4.1) - PromiseKit/Foundation (= 6.4.1) @@ -41,7 +41,7 @@ SPEC REPOS: SPEC CHECKSUMS: BigInt: 76b5dfdfa3e2e478d4ffdf161aeede5502e2742f - CryptoSwift: 1c07ca50843dd48bc54e6ea53d7a4dba3b645716 + CryptoSwift: 16e78bebf567bad1c87b2d58f6547f25b74c31aa PromiseKit: 4c76a6506638034e3d7bede97b2ff7743f7bd2dc Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713 scrypt: 3fe5b1a3b0976f97cd87488673a8f7c65708cc84 @@ -51,4 +51,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 2664c33ef7c46c222ed5963c84c7ebd86a806b9e -COCOAPODS: 1.6.0.beta.2 +COCOAPODS: 1.6.0.beta.1 diff --git a/Pods/CryptoSwift/README.md b/Pods/CryptoSwift/README.md index 45dead904..2e7f54984 100644 --- a/Pods/CryptoSwift/README.md +++ b/Pods/CryptoSwift/README.md @@ -63,6 +63,7 @@ Good mood [Poly1305](http://cr.yp.to/mac/poly1305-20050329.pdf) | [HMAC (MD5, SHA1, SHA256)](https://www.ietf.org/rfc/rfc2104.txt) | [CMAC](https://tools.ietf.org/html/rfc4493) +| [CBC-MAC](https://en.wikipedia.org/wiki/CBC-MAC) #### Cipher mode of operation - Electronic codebook ([ECB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_codebook_.28ECB.29)) @@ -72,6 +73,7 @@ Good mood - Output Feedback ([OFB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Output_Feedback_.28OFB.29)) - Counter Mode ([CTR](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_.28CTR.29)) - Galois/Counter Mode ([GCM](https://csrc.nist.gov/publications/detail/sp/800-38d/final)) +- Counter with Cipher Block Chaining-Message Authentication Code ([CCM](https://csrc.nist.gov/publications/detail/sp/800-38c/final)) #### Password-Based Key Derivation Function - [PBKDF1](http://tools.ietf.org/html/rfc2898#section-5.1) (Password-Based Key Derivation Function 1) @@ -449,7 +451,7 @@ decryption ```swift do { - // In combined mode, the authentication tag is directly appended to the encrypted message. This is usually what you want. + // In combined mode, the authentication tag is appended to the encrypted message. This is usually what you want. let gcm = GCM(iv: iv, mode: .combined) let aes = try AES(key: key, blockMode: gcm, padding: .noPadding) return try aes.decrypt(encrypted) @@ -458,9 +460,26 @@ do { } ``` - **Note**: GCM instance is not intended to be reused. So you can't use the `GCM` from encoding, do decoding. +##### AES-CCM + +The result of Counter with Cipher Block Chaining-Message Authentication Code encryption is ciphertext and **authentication tag**, that is later used to decryption. + +``` +do { + // The authentication tag is appended to the encrypted message. + let tagLength = 8 + let ccm = CCM(iv: iv, tagLength: tagLength, messageLength: ciphertext.count - tagLength, additionalAuthenticatedData: data) + let aes = try AES(key: key, blockMode: ccm, padding: .noPadding) + return try aes.decrypt(encrypted) +} catch { + // failed +} +``` + +Check documentation or CCM specification for valid parameters for CCM. + ##### AEAD ```swift diff --git a/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift b/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift index 160ceacc9..a461cd616 100644 --- a/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift +++ b/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift @@ -27,6 +27,9 @@ extension AES: Cryptors { public func makeDecryptor() throws -> Cryptor & Updatable { let cipherOperation: CipherOperationOnBlock = blockMode.options.contains(.useEncryptToDecrypt) == true ? encrypt : decrypt let worker = try blockMode.worker(blockSize: AES.blockSize, cipherOperation: cipherOperation) + if worker is StreamModeWorker { + return try StreamDecryptor(blockSize: AES.blockSize, padding: padding, worker) + } return try BlockDecryptor(blockSize: AES.blockSize, padding: padding, worker) } } diff --git a/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift b/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift index 1bcf44ea6..9772cb4c5 100644 --- a/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift +++ b/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift @@ -1,6 +1,6 @@ // CryptoSwift // -// Copyright (C) 2014-__YEAR__ Marcin Krzyżanowski +// Copyright (C) 2014-2018 Marcin Krzyżanowski // This software is provided 'as-is', without any express or implied warranty. // // In no event will the authors be held liable for any damages arising from the use of this software. @@ -47,16 +47,16 @@ public class BlockDecryptor: Cryptor, Updatable { for var chunk in accumulatedWithoutSuffix.batched(by: blockSize) { if isLast || (accumulatedWithoutSuffix.count - processedBytesCount) >= blockSize { - if isLast, var finalizingWorker = worker as? BlockModeWorkerFinalizing { - chunk = try finalizingWorker.willDecryptLast(block: chunk + accumulated.suffix(worker.additionalBufferSize)) // tag size + if isLast, var finalizingWorker = worker as? FinalizingDecryptModeWorker { + chunk = try finalizingWorker.willDecryptLast(bytes: chunk + accumulated.suffix(worker.additionalBufferSize)) // tag size } if !chunk.isEmpty { plaintext += worker.decrypt(block: chunk) } - if var finalizingWorker = worker as? BlockModeWorkerFinalizing, isLast == true { - plaintext = try finalizingWorker.didDecryptLast(block: plaintext.slice) + if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { + plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice)) } processedBytesCount += chunk.count @@ -72,7 +72,7 @@ public class BlockDecryptor: Cryptor, Updatable { } public func seek(to position: Int) throws { - guard var worker = self.worker as? StreamModeWorker else { + guard var worker = self.worker as? SeekableModeWorker else { fatalError("Not supported") } diff --git a/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift b/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift index 73c37e851..ba3fe2810 100644 --- a/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift +++ b/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift @@ -1,6 +1,6 @@ // CryptoSwift // -// Copyright (C) 2014-__YEAR__ Marcin Krzyżanowski +// Copyright (C) 2014-2018 Marcin Krzyżanowski // This software is provided 'as-is', without any express or implied warranty. // // In no event will the authors be held liable for any damages arising from the use of this software. @@ -44,8 +44,8 @@ final class BlockEncryptor: Cryptor, Updatable { // Stream encrypts all, so it removes all elements accumulated.removeFirst(encrypted.count) - if var finalizingWorker = worker as? BlockModeWorkerFinalizing, isLast == true { - encrypted = try finalizingWorker.finalize(encrypt: encrypted.slice) + if var finalizingWorker = worker as? FinalizingEncryptModeWorker, isLast == true { + encrypted = Array(try finalizingWorker.finalize(encrypt: encrypted.slice)) } return encrypted diff --git a/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift b/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift index 8c554e4a4..646184941 100644 --- a/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift +++ b/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift @@ -20,10 +20,6 @@ public struct BlockModeOption: OptionSet { self.rawValue = rawValue } - public init(rawValue: Int, authenticationTagSize: Int) { - self.rawValue = rawValue - } - static let none = BlockModeOption(rawValue: 1 << 0) static let initializationVectorRequired = BlockModeOption(rawValue: 1 << 1) static let paddingRequired = BlockModeOption(rawValue: 1 << 2) diff --git a/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift b/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift new file mode 100644 index 000000000..fb59ebe94 --- /dev/null +++ b/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift @@ -0,0 +1,359 @@ +//// CryptoSwift +// +// Copyright (C) 2014-2018 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// CCM mode combines the well known CBC-MAC with the well known counter mode of encryption. +// https://tools.ietf.org/html/rfc3610 +// https://csrc.nist.gov/publications/detail/sp/800-38c/final + +#if canImport(Darwin) +import Darwin +#else +import Glibc +#endif + + +/// Counter with Cipher Block Chaining-Message Authentication Code +public struct CCM: StreamMode { + public enum Error: Swift.Error { + /// Invalid IV + case invalidInitializationVector + case invalidParameter + case fail + } + + public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] + private let nonce: Array + private let additionalAuthenticatedData: Array? + private let tagLength: Int + private let messageLength: Int // total message length. need to know in advance + + // `authenticationTag` nil for encryption, known tag for decryption + /// For encryption, the value is set at the end of the encryption. + /// For decryption, this is a known Tag to validate against. + public var authenticationTag: Array? + + /// Initialize CCM + /// + /// - Parameters: + /// - iv: Initialization vector. Nonce. Valid length between 7 and 13 bytes. + /// - tagLength: Authentication tag length, in bytes. Value of {4, 6, 8, 10, 12, 14, 16}. + /// - messageLength: Plaintext message length (excluding tag if attached). Length have to be provided in advance. + /// - additionalAuthenticatedData: Additional authenticated data. + public init(iv: Array, tagLength: Int, messageLength: Int, additionalAuthenticatedData: Array? = nil) { + self.nonce = iv + self.tagLength = tagLength + self.additionalAuthenticatedData = additionalAuthenticatedData + self.messageLength = messageLength // - tagLength + } + + /// Initialize CCM + /// + /// - Parameters: + /// - iv: Initialization vector. Nonce. Valid length between 7 and 13 bytes. + /// - tagLength: Authentication tag length, in bytes. Value of {4, 6, 8, 10, 12, 14, 16}. + /// - messageLength: Plaintext message length (excluding tag if attached). Length have to be provided in advance. + /// - authenticationTag: Authentication Tag value if not concatenated to ciphertext. + /// - additionalAuthenticatedData: Additional authenticated data. + public init(iv: Array, tagLength: Int, messageLength: Int, authenticationTag: Array, additionalAuthenticatedData: Array? = nil) { + self.init(iv: iv, tagLength: tagLength, messageLength: messageLength, additionalAuthenticatedData: additionalAuthenticatedData) + self.authenticationTag = authenticationTag + } + + + public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { + if nonce.isEmpty { + throw Error.invalidInitializationVector + } + + return CCMModeWorker(blockSize: blockSize, nonce: nonce.slice, messageLength: messageLength, additionalAuthenticatedData: additionalAuthenticatedData, tagLength: tagLength, cipherOperation: cipherOperation) + } +} + +class CCMModeWorker: StreamModeWorker, SeekableModeWorker, CounterModeWorker, FinalizingEncryptModeWorker, FinalizingDecryptModeWorker { + typealias Counter = Int + var counter = 0 + + let cipherOperation: CipherOperationOnBlock + let blockSize: Int + private let tagLength: Int + private let messageLength: Int // total message length. need to know in advance + private let q: UInt8 + + let additionalBufferSize: Int + private var keystreamPosIdx = 0 + private let nonce: Array + private var last_y: ArraySlice = [] + private var keystream: Array = [] + // Known Tag used to validate during decryption + private var expectedTag: Array? + + public enum Error: Swift.Error { + case invalidParameter + } + + init(blockSize: Int, nonce: ArraySlice, messageLength: Int, additionalAuthenticatedData: [UInt8]?, expectedTag: Array? = nil, tagLength: Int, cipherOperation: @escaping CipherOperationOnBlock) { + self.blockSize = 16 // CCM is defined for 128 block size + self.tagLength = tagLength + self.additionalBufferSize = tagLength + self.messageLength = messageLength + self.expectedTag = expectedTag + self.cipherOperation = cipherOperation + self.nonce = Array(nonce) + self.q = UInt8(15 - nonce.count) // n = 15-q + + let hasAssociatedData = additionalAuthenticatedData != nil && !additionalAuthenticatedData!.isEmpty + processControlInformation(nonce: self.nonce, tagLength: tagLength, hasAssociatedData: hasAssociatedData) + + if let aad = additionalAuthenticatedData, hasAssociatedData { + process(aad: aad) + } + } + + // For the very first time setup new IV (aka y0) from the block0 + private func processControlInformation(nonce: [UInt8], tagLength: Int, hasAssociatedData: Bool) { + let block0 = try! format(nonce: nonce, Q: UInt32(messageLength), q: q, t: UInt8(tagLength), hasAssociatedData: hasAssociatedData).slice + let y0 = cipherOperation(block0)!.slice + last_y = y0 + } + + private func process(aad: [UInt8]) { + let encodedAAD = format(aad: aad) + + for block_i in encodedAAD.batched(by: 16) { + let y_i = cipherOperation(xor(block_i, last_y))!.slice + last_y = y_i + } + } + + private func S(i: Int) throws -> [UInt8] { + let ctr = try format(counter: i, nonce: nonce, q: q) + return cipherOperation(ctr.slice)! + } + + func seek(to position: Int) throws { + self.counter = position + keystream = try S(i: position) + let offset = position % blockSize + keystreamPosIdx = offset + } + + func encrypt(block plaintext: ArraySlice) -> Array { + var result = Array(reserveCapacity: plaintext.count) + + var processed = 0 + while processed < plaintext.count { + // Need a full block here to update keystream and do CBC + if keystream.isEmpty || keystreamPosIdx == blockSize { + // y[i], where i is the counter. Can encrypt 1 block at a time + counter += 1 + guard let S = try? S(i: counter) else { return Array(plaintext) } + let plaintextP = addPadding(Array(plaintext), blockSize: blockSize) + guard let y = cipherOperation(xor(last_y, plaintextP)) else { return Array(plaintext) } + last_y = y.slice + + keystream = S + keystreamPosIdx = 0 + } + + let xored: Array = xor(plaintext[plaintext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) + keystreamPosIdx += xored.count + processed += xored.count + result += xored + } + return result + } + + func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice { + // concatenate T at the end + guard let S0 = try? S(i: 0) else { return ciphertext } + + let computedTag = xor(last_y.prefix(tagLength), S0) as ArraySlice + return ciphertext + computedTag + } + + // Decryption is stream + // CBC is block + private var accumulatedPlaintext: [UInt8] = [] + + func decrypt(block ciphertext: ArraySlice) -> Array { + var output = Array(reserveCapacity: ciphertext.count) + + do { + var currentCounter = counter + var processed = 0 + while processed < ciphertext.count { + // Need a full block here to update keystream and do CBC + // New keystream for a new block + if keystream.isEmpty || keystreamPosIdx == blockSize { + currentCounter += 1 + guard let S = try? S(i: currentCounter) else { return Array(ciphertext) } + keystream = S + keystreamPosIdx = 0 + } + + let xored: Array = xor(ciphertext[ciphertext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) // plaintext + keystreamPosIdx += xored.count + processed += xored.count + output += xored + counter = currentCounter + } + } + + // Accumulate plaintext for the MAC calculations at the end. + // It would be good to process it together though, here. + accumulatedPlaintext += output + + // Shouldn't return plaintext until validate tag. + // With incremental update, can't validate tag until all block are processed. + return output + } + + func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice { + // concatenate T at the end + let computedTag = Array(last_y.prefix(tagLength)) + guard let expectedTag = self.expectedTag, expectedTag == computedTag else { + throw CCM.Error.fail + } + + return plaintext + } + + @discardableResult + func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice { + // get tag of additionalBufferSize size + // `ciphertext` contains at least additionalBufferSize bytes + // overwrite expectedTag property used later for verification + guard let S0 = try? S(i: 0) else { return ciphertext } + self.expectedTag = xor(ciphertext.suffix(tagLength), S0) as [UInt8] + return ciphertext[ciphertext.startIndex..) throws -> ArraySlice { + + // Calculate Tag, from the last CBC block, for accumulated plaintext. + var processed = 0 + for block in accumulatedPlaintext.batched(by: blockSize) { + let blockP = addPadding(Array(block), blockSize: blockSize) + guard let y = cipherOperation(xor(last_y, blockP)) else { return plaintext } + last_y = y.slice + processed += block.count + } + accumulatedPlaintext.removeFirst(processed) + return plaintext + } +} + +// Q - octet length of P +// q - octet length of Q. Maximum length (in octets) of payload. An element of {2,3,4,5,6,7,8} +// t - octet length of T (MAC length). An element of {4,6,8,10,12,14,16} +private func format(nonce N: [UInt8], Q: UInt32, q: UInt8, t: UInt8, hasAssociatedData: Bool) throws -> [UInt8] { + var flags0: UInt8 = 0 + + if hasAssociatedData { + // 7 bit + flags0 |= (1 << 6) + } + + // 6,5,4 bit is t in 3 bits + flags0 |= (((t-2)/2) & 0x07) << 3 + + // 3,2,1 bit is q in 3 bits + flags0 |= ((q-1) & 0x07) << 0 + + var block0: [UInt8] = Array(repeating: 0, count: 16) + block0[0] = flags0 + + // N in 1...(15-q) octets, n = 15-q + // n is an element of {7,8,9,10,11,12,13} + let n = 15-Int(q) + guard (n + Int(q)) == 15 else { + // n+q == 15 + throw CCMModeWorker.Error.invalidParameter + } + block0[1...n] = N[0...(n-1)] + + // Q in (16-q)...15 octets + block0[(16-Int(q))...15] = Q.bytes(totalBytes: Int(q)).slice + + return block0 +} + +/// Formatting of the Counter Blocks. Ctr[i] +/// The counter generation function. +/// Q - octet length of P +/// q - octet length of Q. Maximum length (in octets) of payload. An element of {2,3,4,5,6,7,8} +private func format(counter i: Int, nonce N: [UInt8], q: UInt8) throws -> [UInt8] { + var flags0: UInt8 = 0 + + // bit 8,7 is Reserved + // bit 4,5,6 shall be set to 0 + // 3,2,1 bit is q in 3 bits + flags0 |= ((q-1) & 0x07) << 0 + + var block = Array(repeating: 0, count: 16) // block[0] + block[0] = flags0 + + // N in 1...(15-q) octets, n = 15-q + // n is an element of {7,8,9,10,11,12,13} + let n = 15-Int(q) + guard (n + Int(q)) == 15 else { + // n+q == 15 + throw CCMModeWorker.Error.invalidParameter + } + block[1...n] = N[0...(n-1)] + + // [i]8q in (16-q)...15 octets + block[(16-Int(q))...15] = i.bytes(totalBytes: Int(q)).slice + + return block +} + +/// Resulting can be partitioned into 16-octet blocks +private func format(aad: [UInt8]) -> [UInt8] { + let a = aad.count + + switch Double(a) { + case 0..<65280: // 2^16-2^8 + // [a]16 + return addPadding(a.bytes(totalBytes: 2) + aad, blockSize: 16) + case 65280..<4_294_967_296: // 2^32 + // [a]32 + return addPadding([0xFF, 0xFE] + a.bytes(totalBytes: 4) + aad, blockSize: 16) + case 4_294_967_296.., blockSize: Int) -> Array { + if bytes.isEmpty { + return Array(repeating: 0, count: blockSize) + } + + let remainder = bytes.count % blockSize + if remainder == 0 { + return bytes + } + + let paddingCount = blockSize - remainder + if paddingCount > 0 { + return bytes + Array(repeating: 0, count: paddingCount) + } + return bytes +} diff --git a/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift b/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift index c48e916af..2dc6a9ecb 100644 --- a/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift +++ b/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift @@ -41,7 +41,7 @@ public struct CTR: StreamMode { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -struct CTRModeWorker: StreamModeWorker, CounterModeWorker { +struct CTRModeWorker: StreamModeWorker, SeekableModeWorker, CounterModeWorker { typealias Counter = CTRCounter final class CTRCounter { diff --git a/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift b/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift index 284b41ded..0d3e08bd3 100644 --- a/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift +++ b/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift @@ -24,6 +24,7 @@ public protocol CipherModeWorker { mutating func decrypt(block ciphertext: ArraySlice) -> Array } +/// Block workers use `BlockEncryptor` public protocol BlockModeWorker: CipherModeWorker { var blockSize: Int { get } } @@ -33,17 +34,28 @@ public protocol CounterModeWorker: CipherModeWorker { var counter: Counter { get set } } -public protocol StreamModeWorker: CipherModeWorker { +public protocol SeekableModeWorker: CipherModeWorker { mutating func seek(to position: Int) throws } -// TODO: remove and merge with BlockModeWorker -public protocol BlockModeWorkerFinalizing: BlockModeWorker { +/// Stream workers use `StreamEncryptor` +public protocol StreamModeWorker: CipherModeWorker { +} + +public protocol FinalizingEncryptModeWorker: CipherModeWorker { // Any final calculations, eg. calculate tag // Called after the last block is encrypted - mutating func finalize(encrypt ciphertext: ArraySlice) throws -> Array - // Called before decryption, hence input is ciphertext - mutating func willDecryptLast(block ciphertext: ArraySlice) throws -> ArraySlice + mutating func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice +} + +public protocol FinalizingDecryptModeWorker: CipherModeWorker { + // Called before decryption, hence input is ciphertext. + // ciphertext is either a last block, or a tag (for stream workers) + @discardableResult + mutating func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice // Called after decryption, hence input is ciphertext - mutating func didDecryptLast(block plaintext: ArraySlice) throws -> Array + mutating func didDecryptLast(bytes plaintext: ArraySlice) throws -> ArraySlice + // Any final calculations, eg. calculate tag + // Called after the last block is encrypted + mutating func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice } diff --git a/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift b/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift index 8313b6c9f..aee8d29e2 100644 --- a/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift +++ b/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift @@ -28,7 +28,7 @@ public final class GCM: BlockMode { var additionalBufferSize: Int { switch self { case .combined: - return GCMModeWorker.tagSize + return GCMModeWorker.tagLength case .detached: return 0 } @@ -81,14 +81,14 @@ public final class GCM: BlockMode { // MARK: - Worker -final class GCMModeWorker: BlockModeWorkerFinalizing { +final class GCMModeWorker: BlockModeWorker, FinalizingEncryptModeWorker, FinalizingDecryptModeWorker { let cipherOperation: CipherOperationOnBlock // Callback called when authenticationTag is ready var didCalculateTag: ((Array) -> Void)? // 128 bit tag. Other possible tags 4,8,12,13,14,15,16 - fileprivate static let tagSize = 16 + fileprivate static let tagLength = 16 // GCM nonce is 96-bits by default. It's the most effective length for the IV private static let nonceSize = 12 @@ -152,6 +152,22 @@ final class GCMModeWorker: BlockModeWorkerFinalizing { return Array(ciphertext) } + func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice { + // Calculate MAC tag. + let ghash = gf.ghashFinish() + let tag = Array((ghash ^ eky0).bytes.prefix(GCMModeWorker.tagLength)) + + // Notify handler + didCalculateTag?(tag) + + switch mode { + case .combined: + return (ciphertext + tag).slice + case .detached: + return ciphertext + } + } + func decrypt(block ciphertext: ArraySlice) -> Array { counter = incrementCounter(counter) @@ -167,52 +183,39 @@ final class GCMModeWorker: BlockModeWorkerFinalizing { return plaintext } - func finalize(encrypt ciphertext: ArraySlice) throws -> Array { - // Calculate MAC tag. - let ghash = gf.ghashFinish() - let tag = Array((ghash ^ eky0).bytes.prefix(GCMModeWorker.tagSize)) - - // Notify handler - didCalculateTag?(tag) - - switch mode { - case .combined: - return ciphertext + tag - case .detached: - return Array(ciphertext) - } - } - // The authenticated decryption operation has five inputs: K, IV , C, A, and T. It has only a single // output, either the plaintext value P or a special symbol FAIL that indicates that the inputs are not // authentic. - func willDecryptLast(block ciphertext: ArraySlice) throws -> ArraySlice { + @discardableResult + func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice { // Validate tag switch mode { case .combined: // overwrite expectedTag property used later for verification - self.expectedTag = Array(ciphertext.suffix(GCMModeWorker.tagSize)) - // gf.ciphertextLength = gf.ciphertextLength - GCMModeWorker.tagSize - // strip tag from the plaintext. - return ciphertext[ciphertext.startIndex..) throws -> Array { + func didDecryptLast(bytes plaintext: ArraySlice) throws -> ArraySlice { // Calculate MAC tag. let ghash = gf.ghashFinish() - let computedTag = Array((ghash ^ eky0).bytes.prefix(GCMModeWorker.tagSize)) + let computedTag = Array((ghash ^ eky0).bytes.prefix(GCMModeWorker.tagLength)) // Validate tag - if let expectedTag = self.expectedTag, computedTag == expectedTag { - return Array(plaintext) + guard let expectedTag = self.expectedTag, computedTag == expectedTag else { + throw GCM.Error.fail } - throw GCM.Error.fail + return plaintext } + func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice { + // do nothing + return plaintext + } } // MARK: - Local utils diff --git a/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift b/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift new file mode 100644 index 000000000..e14f2bd52 --- /dev/null +++ b/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift @@ -0,0 +1,104 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public class CBCMAC: Authenticator { + public enum Error: Swift.Error { + case wrongKeyLength + } + + private let key: SecureBytes + + private static let BlockSize: Int = 16 + private static let Zero: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] + private static let Rb: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87] + + public init(key: Array) throws { + if key.count != 16 { + throw Error.wrongKeyLength + } + self.key = SecureBytes(bytes: key) + } + + // MARK: Authenticator + + public func authenticate(_ bytes: Array) throws -> Array { + let aes = try AES(key: Array(key), blockMode: CBC(iv: CBCMAC.Zero), padding: .noPadding) + + let l = try aes.encrypt(CBCMAC.Zero) + var subKey1 = leftShiftOneBit(l) + if (l[0] & 0x80) != 0 { + subKey1 = xor(CBCMAC.Rb, subKey1) + } + var subKey2 = leftShiftOneBit(subKey1) + if (subKey1[0] & 0x80) != 0 { + subKey2 = xor(CBCMAC.Rb, subKey2) + } + + let lastBlockComplete: Bool + let blockCount = (bytes.count + CBCMAC.BlockSize - 1) / CBCMAC.BlockSize + if blockCount == 0 { + lastBlockComplete = false + } else { + lastBlockComplete = bytes.count % CBCMAC.BlockSize == 0 + } + var paddedBytes = bytes + if !lastBlockComplete { + bitPadding(to: &paddedBytes, blockSize: CBCMAC.BlockSize) + } + + var blocks = Array(paddedBytes.batched(by: CBCMAC.BlockSize)) + var lastBlock = blocks.popLast()! + if lastBlockComplete { + lastBlock = xor(lastBlock, subKey1) + } else { + lastBlock = xor(lastBlock, subKey2) + } + + var x = Array(repeating: 0x00, count: CBCMAC.BlockSize) + var y = Array(repeating: 0x00, count: CBCMAC.BlockSize) + for block in blocks { + y = xor(block, x) + x = try aes.encrypt(y) + } + // the difference between CMAC and CBC-MAC is that CMAC xors the final block with a secret value + y = process(lastBlock: lastBlock, with: x) + return try aes.encrypt(y) + } + + func process(lastBlock: ArraySlice, with x: [UInt8]) -> [UInt8] { + return Array(lastBlock) + } + + // MARK: Helper methods + + /** + Performs left shift by one bit to the bit string aquired after concatenating al bytes in the byte array + - parameters: + - bytes: byte array + - returns: bit shifted bit string split again in array of bytes + */ + private func leftShiftOneBit(_ bytes: Array) -> Array { + var shifted = Array(repeating: 0x00, count: bytes.count) + let last = bytes.count - 1 + for index in 0.. = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] - private static let Rb: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87] - - public init(key: Array) throws { - if key.count != 16 { - throw Error.wrongKeyLength - } - self.key = SecureBytes(bytes: key) - } - - // MARK: Authenticator - - public func authenticate(_ bytes: Array) throws -> Array { - let aes = try AES(key: Array(key), blockMode: CBC(iv: CMAC.Zero), padding: .noPadding) - - let l = try aes.encrypt(CMAC.Zero) - var subKey1 = leftShiftOneBit(l) - if (l[0] & 0x80) != 0 { - subKey1 = xor(CMAC.Rb, subKey1) - } - var subKey2 = leftShiftOneBit(subKey1) - if (subKey1[0] & 0x80) != 0 { - subKey2 = xor(CMAC.Rb, subKey2) - } - - let lastBlockComplete: Bool - let blockCount = (bytes.count + CMAC.BlockSize - 1) / CMAC.BlockSize - if blockCount == 0 { - lastBlockComplete = false - } else { - lastBlockComplete = bytes.count % CMAC.BlockSize == 0 - } - var paddedBytes = bytes - if !lastBlockComplete { - bitPadding(to: &paddedBytes, blockSize: CMAC.BlockSize) - } - - var blocks = Array(paddedBytes.batched(by: CMAC.BlockSize)) - var lastBlock = blocks.popLast()! - if lastBlockComplete { - lastBlock = xor(lastBlock, subKey1) - } else { - lastBlock = xor(lastBlock, subKey2) - } - - var x = Array(repeating: 0x00, count: CMAC.BlockSize) - var y = Array(repeating: 0x00, count: CMAC.BlockSize) - for block in blocks { - y = xor(block, x) - x = try aes.encrypt(y) - } - y = xor(lastBlock, x) - return try aes.encrypt(y) - } - - // MARK: Helper methods - - /** - Performs left shift by one bit to the bit string aquired after concatenating al bytes in the byte array - - parameters: - - bytes: byte array - - returns: bit shifted bit string split again in array of bytes - */ - private func leftShiftOneBit(_ bytes: Array) -> Array { - var shifted = Array(repeating: 0x00, count: bytes.count) - let last = bytes.count - 1 - for index in 0.., with x: [UInt8]) -> [UInt8] { + return xor(lastBlock, x) } } diff --git a/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift b/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift index 50c772972..74cf92a9c 100644 --- a/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift +++ b/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift @@ -1,6 +1,6 @@ //// CryptoSwift // -// Copyright (C) 2014-__YEAR__ Marcin Krzyżanowski +// Copyright (C) 2014-2018 Marcin Krzyżanowski // This software is provided 'as-is', without any express or implied warranty. // // In no event will the authors be held liable for any damages arising from the use of this software. diff --git a/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift b/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift new file mode 100644 index 000000000..81ab2705e --- /dev/null +++ b/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift @@ -0,0 +1,78 @@ +// CryptoSwift +// +// Copyright (C) 2014-2018 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +final class StreamDecryptor: Cryptor, Updatable { + private let blockSize: Int + private var worker: CipherModeWorker + private let padding: Padding + private var accumulated = Array() + + private var lastBlockRemainder = 0 + + init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { + self.blockSize = blockSize + self.padding = padding + self.worker = worker + } + + // MARK: Updatable + public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { + accumulated += bytes + + let toProcess = accumulated.prefix(max(accumulated.count - worker.additionalBufferSize, 0)) + + if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { + // will truncate suffix if needed + try finalizingWorker.willDecryptLast(bytes: accumulated.slice) + } + + var processedBytesCount = 0 + var plaintext = Array(reserveCapacity: bytes.count + worker.additionalBufferSize) + for chunk in toProcess.batched(by: blockSize) { + plaintext += worker.decrypt(block: chunk) + processedBytesCount += chunk.count + } + + if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { + plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice)) + } + + // omit unecessary calculation if not needed + if padding != .noPadding { + lastBlockRemainder = plaintext.count.quotientAndRemainder(dividingBy: blockSize).remainder + } + + if isLast { + // CTR doesn't need padding. Really. Add padding to the last block if really want. but... don't. + plaintext = padding.remove(from: plaintext, blockSize: blockSize - lastBlockRemainder) + } + + accumulated.removeFirst(processedBytesCount) // super-slow + + if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { + plaintext = Array(try finalizingWorker.finalize(decrypt: plaintext.slice)) + } + + return plaintext + } + + public func seek(to position: Int) throws { + guard var worker = self.worker as? SeekableModeWorker else { + fatalError("Not supported") + } + + try worker.seek(to: position) + self.worker = worker + } +} diff --git a/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift b/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift index 36a086fb4..7cd54e3fb 100644 --- a/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift +++ b/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift @@ -1,6 +1,6 @@ // CryptoSwift // -// Copyright (C) 2014-__YEAR__ Marcin Krzyżanowski +// Copyright (C) 2014-2018 Marcin Krzyżanowski // This software is provided 'as-is', without any express or implied warranty. // // In no event will the authors be held liable for any damages arising from the use of this software. @@ -16,8 +16,6 @@ final class StreamEncryptor: Cryptor, Updatable { private let blockSize: Int private var worker: CipherModeWorker private let padding: Padding - // Accumulated bytes. Not all processed bytes. - private var accumulated = Array(reserveCapacity: 16) private var lastBlockRemainder = 0 @@ -29,7 +27,7 @@ final class StreamEncryptor: Cryptor, Updatable { // MARK: Updatable public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { - accumulated = Array(bytes) + var accumulated = Array(bytes) if isLast { // CTR doesn't need padding. Really. Add padding to the last block if really want. but... don't. accumulated = padding.add(to: accumulated, blockSize: blockSize - lastBlockRemainder) @@ -45,6 +43,10 @@ final class StreamEncryptor: Cryptor, Updatable { lastBlockRemainder = encrypted.count.quotientAndRemainder(dividingBy: blockSize).remainder } + if var finalizingWorker = worker as? FinalizingEncryptModeWorker, isLast == true { + encrypted = Array(try finalizingWorker.finalize(encrypt: encrypted.slice)) + } + return encrypted } diff --git a/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h b/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h index d04d0f479..54c439564 120000 --- a/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h +++ b/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap b/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap index 5e3ba93be..5827ffd6f 120000 --- a/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap +++ b/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h b/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h index 7c100fb6e..15cd9101e 120000 --- a/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h +++ b/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap b/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap index 309999e26..db0458375 120000 --- a/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap +++ b/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h index 53d6c211e..38ee2e270 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap index c3e3c3a34..d3c8afa43 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h index 1bf7d4d73..4f6598359 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap index 19cb03653..13bb9bda2 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h b/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h index 54a39550a..384f088cd 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h +++ b/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap b/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap index 03e17826b..5b105d963 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap +++ b/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h index 2202ae821..6026bec84 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h +++ b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap index 377be965b..515bc96ce 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap +++ b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-iOS-umbrella.h b/Pods/Headers/Public/Result/Result-iOS-umbrella.h index a7f847b9e..5017bcc62 120000 --- a/Pods/Headers/Public/Result/Result-iOS-umbrella.h +++ b/Pods/Headers/Public/Result/Result-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-iOS.modulemap b/Pods/Headers/Public/Result/Result-iOS.modulemap index bc4f23ca4..a9cb518ea 120000 --- a/Pods/Headers/Public/Result/Result-iOS.modulemap +++ b/Pods/Headers/Public/Result/Result-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-macOS-umbrella.h b/Pods/Headers/Public/Result/Result-macOS-umbrella.h index 5c92b47bc..d933679ed 120000 --- a/Pods/Headers/Public/Result/Result-macOS-umbrella.h +++ b/Pods/Headers/Public/Result/Result-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-macOS.modulemap b/Pods/Headers/Public/Result/Result-macOS.modulemap index a1725381e..6ff87c94a 120000 --- a/Pods/Headers/Public/Result/Result-macOS.modulemap +++ b/Pods/Headers/Public/Result/Result-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h b/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h index 909a01c80..736829e4f 120000 --- a/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h +++ b/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap b/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap index 60dbe3748..363bde1c4 120000 --- a/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap +++ b/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h b/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h index b1f95e224..c56e6a45b 120000 --- a/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h +++ b/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap b/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap index 5ea25fc9c..835353525 120000 --- a/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap +++ b/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h index b1b552e68..b77347325 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap index 0842d08e1..ae407f989 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h index b77715c02..4740a4f84 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap index c5cebdd37..d1421e204 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h b/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h index e82a48440..1c81cd5a7 120000 --- a/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h +++ b/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap b/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap index 082fbbbba..02bd8338d 120000 --- a/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap +++ b/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h b/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h index 7a0dabd86..75f99866d 120000 --- a/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h +++ b/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap b/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap index 9ec4c6ed1..2e33aed25 120000 --- a/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap +++ b/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h index 554c654f1..70cc63a67 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap index 44829fb84..c5b6fa265 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h index 56967ab47..d75b444d6 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap index 0ec25a913..c0e372d55 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap \ No newline at end of file diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index d749cf3d2..bccb6ed1f 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -1,7 +1,7 @@ PODS: - BigInt (3.1.0): - SipHash (~> 1.2) - - CryptoSwift (0.12.0) + - CryptoSwift (0.13.0) - PromiseKit (6.4.1): - PromiseKit/CorePromise (= 6.4.1) - PromiseKit/Foundation (= 6.4.1) @@ -41,7 +41,7 @@ SPEC REPOS: SPEC CHECKSUMS: BigInt: 76b5dfdfa3e2e478d4ffdf161aeede5502e2742f - CryptoSwift: 1c07ca50843dd48bc54e6ea53d7a4dba3b645716 + CryptoSwift: 16e78bebf567bad1c87b2d58f6547f25b74c31aa PromiseKit: 4c76a6506638034e3d7bede97b2ff7743f7bd2dc Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713 scrypt: 3fe5b1a3b0976f97cd87488673a8f7c65708cc84 @@ -51,4 +51,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 2664c33ef7c46c222ed5963c84c7ebd86a806b9e -COCOAPODS: 1.6.0.beta.2 +COCOAPODS: 1.6.0.beta.1 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index 69904a437..38e0b215f 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -7,445 +7,451 @@ objects = { /* Begin PBXBuildFile section */ - 007D8C70EA5C374EEFC5A7638DDC710B /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = B465593568C60A48E4A42D1A047995E4 /* join.m */; }; - 00F9F735E6AEACB1D79CC24FE2570030 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 889ED076F99BD2AB4920EC9A5ECAFFDE /* after.swift */; }; - 01383C5F2BD3FBB6187DA01215BCB2FA /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE0E6B0DB6C8369C0409240023B753BD /* RLP.swift */; }; - 01E683D1A55DCC27F48AC9CF8CDCBF03 /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99490114EDAF958B866019F3B4C71077 /* ZeroPadding.swift */; }; - 02CF85F0BB6137CFF5890DC9EF981267 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62DAA30A02BECECD3B564F1546CE3343 /* Process+Promise.swift */; }; - 036E2618599F02C9CB7D022B49CFFA1A /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 69DAF4AC1AD4ABE697F2A9B28B2742A9 /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0545829A927B4BB00A483BBE6244387D /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FFE51D4F185433A05C0BD38B8F2A5CC /* HKDF.swift */; }; - 05923951C32119A5CA2E4CE5B75CEFBE /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4DF3EE5AB6E8CC14DA313527875575F /* AnyError.swift */; }; - 073B1A00202EE57EB54BE1D3D540C2DF /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 88F32E8C457272E137BB38662B42445E /* field_10x26.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 08D84886240259762D5D2E88FE06BAB2 /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 354EE4D14557CE745D7020B65D22B49D /* HMAC+Foundation.swift */; }; - 092FA91C224FA67526944D6026C42719 /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC74A6C891271F3176D0A8781C35C2D0 /* Int+Extension.swift */; }; - 0A1610D5063DE2AE6FD20FBA35E267E0 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 0CCC239B4BCB58F6EF7C6E22E0D80102 /* group_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0AD8E3063BA9777F2313604C49FB35DC /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32B1BF3EB7A67274C92EEEEF1D636696 /* BlockCipher.swift */; }; - 0B21F43DA91211F06BA2166391E44172 /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = B943A73349F77F75B8C3055D2E94C04C /* field.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0BBCC69CD1D17E80AE051FB477BDD3D5 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F80A642AA09FE49288321BA985716AD2 /* Array+Foundation.swift */; }; - 0C97CA12738F0F679E2AA3BD6FD899D3 /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = 7663F04B24B87395872D526DC48DC43C /* group.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0D581B37DEE69673B5F6AF763BEAF9F0 /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1E1805F59DD3B99C4A24A6B69DA1738 /* SHA3.swift */; }; - 0EA8DA962874703B604E7D0C284F64F1 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56831D861C9C68AB6445D1B373489CCD /* Box.swift */; }; - 0FB79BA6789A195C987F2180A58B6AFC /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3A74DAAF802F643B5F00446BF21F89A /* CBC.swift */; }; - 105F429373F6706BF003DD2C5E1AA9C6 /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 928C9306D44A4F06DEDCFDA02220D548 /* basic-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 10650E08C4710FC9327EA77E080EAFBD /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67946900D6375AEDFA1C113E2A5B2794 /* Cryptors.swift */; }; - 1229DEE3B9CC3F49645AF6530096597C /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = BAF5556D32E479626438702FBB2B206E /* race.m */; }; - 12DA480A98F43E8D514FD77105246316 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 592D721B3C087135B76612BE7D7B3701 /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 133747794F37E3A739F51CB04EAEC784 /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BECA27963AB5B81C6487F1AFF447EE3 /* UInt16+Extension.swift */; }; - 14C6C90D414DDF5959AAD6D49D4BBD77 /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AE60B95D9DA9615B03EE888C7F908 /* secp256k1.c */; }; - 14CE101A185E7F4C98959036549EEAD6 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = B78A9314F721CE7FE8EE68290ACF962A /* Result.swift */; }; - 14DB22276CCD7E7CC84DEAFC67358569 /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 00A9E16D69CA56EBD70D7C0B65E06FA1 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 158F6BC9635AF0C4F8FCAD1FB913BB45 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = 260C8496D4BED6EDC41A2FBCF2E87AC6 /* Division.swift */; }; - 160B4BF9DB9EB617E146CC2E9C883C7E /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9FE34B65B17D095EB1999C6F5667427 /* AnyPromise.swift */; }; - 172EFB075E38CF4867F6A5978709A512 /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E4050C50BE4522F2AB113A1EC5B6ABB /* eckey.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 007D8C70EA5C374EEFC5A7638DDC710B /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = EA0E1E254A8A60AE7835DB964A9891CD /* join.m */; }; + 00F9F735E6AEACB1D79CC24FE2570030 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3386525472CC553FF40B3AFEE8BCE2DD /* after.swift */; }; + 01349159EBEDEB29A5C35BA3B387F596 /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71B12B455685D2F4F116288D0FE808FE /* Poly1305.swift */; }; + 01383C5F2BD3FBB6187DA01215BCB2FA /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 955AD7671107B2FCAF7A725E38DA6513 /* RLP.swift */; }; + 02CF85F0BB6137CFF5890DC9EF981267 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 937DFD5ACC6B392C3B22DD0605410F52 /* Process+Promise.swift */; }; + 0315EE301733CF0DE349A0C9B65C177F /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71B12B455685D2F4F116288D0FE808FE /* Poly1305.swift */; }; + 036E2618599F02C9CB7D022B49CFFA1A /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 2707FB70F6217313CE3FE9D9B5606CDB /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0416379BA218FFDEAF901B16AD09831F /* CryptoSwift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BFC2F7559BA52B8D992D11A537D7FEBE /* CryptoSwift-macOS-dummy.m */; }; + 05923951C32119A5CA2E4CE5B75CEFBE /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 665306D3A9323800337BE1451D8960E7 /* AnyError.swift */; }; + 073B1A00202EE57EB54BE1D3D540C2DF /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 44131C334B408CABBB3E84FE9BEDD5BE /* field_10x26.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 098D227D8DAE7643ACDF1DBCE8AA4264 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A45DEA061F03DB9EB78391B810792DD /* Array+Extension.swift */; }; + 09BAF87C5E1AF9E3EE4DEA24FF666E43 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CDA4C5CCCD8DD001D5D629E860B631 /* PCBC.swift */; }; + 09BF24BCE4F4A393B8E2A8FF610FA924 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = DABE6207D44D964FBF0C1EB8B82F13A5 /* Utils.swift */; }; + 0A1610D5063DE2AE6FD20FBA35E267E0 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 306BDC01729FF834ADC364D1DDD4797A /* group_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0A396743B4ADF0FA7C12FDF1BA2C5F14 /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E330212AA4C3537D541AD9C197932C16 /* CBCMAC.swift */; }; + 0B21F43DA91211F06BA2166391E44172 /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6C08A1761D32580CB3EE6E91B5E379 /* field.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0C3EF791FBE499977F647EE7635CC4C9 /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61A90B8C29D973CF2BEE2A33224ACBEF /* Updatable.swift */; }; + 0C97CA12738F0F679E2AA3BD6FD899D3 /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = E0E2C657091728E6CC4D8093DA13C072 /* group.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0EA8DA962874703B604E7D0C284F64F1 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79370D5C826074DD91DB303B75EACE7D /* Box.swift */; }; + 105F429373F6706BF003DD2C5E1AA9C6 /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 853BAAA89F1726DECCF03BC01BBDC64C /* basic-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 11D236D734F12042B70BB21010A7BB31 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897BD312EFC7F005946FCA64E8B5D3F3 /* AES.swift */; }; + 1229DEE3B9CC3F49645AF6530096597C /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E89406E7E995881E48051C7EC4C9DCB /* race.m */; }; + 12DA480A98F43E8D514FD77105246316 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C7D493F1212B046A7AAFC8351D67E4D /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 14C6C90D414DDF5959AAD6D49D4BBD77 /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = B184A67AF0236537BEE898D90E946942 /* secp256k1.c */; }; + 14CE101A185E7F4C98959036549EEAD6 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61F02670BA786ECE5640E0C70EA68888 /* Result.swift */; }; + 14DB22276CCD7E7CC84DEAFC67358569 /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = CE82C576F4D863F22181DF0D90DA8533 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 158F6BC9635AF0C4F8FCAD1FB913BB45 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0974D06B8BD99ADFA971B50A5A2B38CE /* Division.swift */; }; + 160B4BF9DB9EB617E146CC2E9C883C7E /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61BA4F5A7AAF223AA3BDA0BF814905AA /* AnyPromise.swift */; }; + 16430D1306BA11693EFE55BE2052FBEB /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EA534EDF19829F1927C7991BF2EEC2F /* Padding.swift */; }; + 1726CE463B9A337870F28E208B8F268E /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66858822A1651FBD671091155D387A8B /* BlockModeOptions.swift */; }; + 172EFB075E38CF4867F6A5978709A512 /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = 07BA44CF1EA491F2DE0FFA66AADF2764 /* eckey.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1736288FC9BC2391AF96F9CCBA1A27D2 /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C805181714272769BB5BCEA4814B1D /* SHA2.swift */; }; 18657716987587225DBC37ABB461F275 /* Pods-web3swift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E91F337EA3979DB5DD84C325A340270 /* Pods-web3swift-macOS-dummy.m */; }; - 186AD9B44240324FF4C4DBF0A8AC935F /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = 070EBBE505C1F8FCD5F159DDBB5D41C7 /* Cimpl.c */; }; - 187B191D2E4399E1567DB24BD93F0486 /* SipHash-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 547B7D1303121A36C02717193279DF7A /* SipHash-macOS-dummy.m */; }; - 1904E18F6CE01618BBBC1B31E43B64EA /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AE91BB385A7A2911773305870D337C6 /* BigUInt.swift */; }; - 193CE1B123F216F0140298A506854F9D /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02BE2C0884A4C644A5B276E1781D2DCA /* Random.swift */; }; - 1AAC341916DC64CD28D08BDFED57AC9C /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = FADA29CA311EF9A86381521A5E4C366B /* Shifts.swift */; }; - 1B1A69F5303E8DD6740A8234E719F76A /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 029D928F404FA2893E2304CF78B3D8A4 /* BufferStorage.swift */; }; - 1C12A92A45B56442DF1BF2D3108BD0D6 /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65695D88202B0FFFBE40038E32FBE234 /* NoError.swift */; }; - 1CC09F75AC87A194EBB50A8750BAAE94 /* CryptoSwift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E7BEC4ABD719ED13864904F5601B1EB /* CryptoSwift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1CDB406411B86AC9E8D84DAB2C97DD36 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D23E94B867181F85C5901C85231758D /* Promise.swift */; }; - 1D23298D0D9B4910ADE40DE633078E52 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0BE0F8D8AB5D3091421F18BD6A6A10D /* NSNotificationCenter+Promise.swift */; }; - 1D69BB026569911275C713D240084FF2 /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = B44892C52E2EF6449BEC05C26F4C7481 /* ecdsa.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1E11D4AB7D83F30DC55ED31131C62967 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CBA3A66080B4CF784ADFED0326CBC82 /* String+Extension.swift */; }; - 1E1385AB09686A96B636755A4447933B /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EDFAD6F2EC5C3407650B54B9A5A4BE8 /* fwd.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1E94C3B3573434FC150CFE79FB8EA24B /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = A84CAC1E9ED891BB925E32AD866EF4F8 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1F22A4026D790826AA156354694CBCC5 /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E8B5D15467ED805F6B33150518D8C10 /* Resolver.swift */; }; - 1FCD29F6706433B229F21EA39F8C3597 /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = B983E877B34D130C7F0E41197599CAF5 /* field_5x52.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 209D55736C84A40D70E5CEE59018C4BA /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A91DDD53F519E555416888F6747C0D5 /* Error.swift */; }; - 20B709359C09D72B58E11D9B585EBF36 /* scrypt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 056B0F39C844D4045CA15B32CA96A334 /* scrypt-macOS-dummy.m */; }; - 216986247596660CFCD4D997C374D548 /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9E6DDE5A0AF4D0B343E4D3AEE9DF983 /* Collection+Extension.swift */; }; - 2175C9F92182A75746B5770B1C01D70C /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = F421A94F9F1E378421F3B3C56314E368 /* eckey_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 221D9234B8A18F610B920F836A7855AB /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0010565A5FA9F18F27870EA632C4D3 /* afterlife.swift */; }; - 224BCAC718A8A96B1494162E8F1FFA50 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DE637C08FD6A423A48096E7D58B1610 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 22FB7357D696E831ABFF6CDE1BC35757 /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75335D15747F097BD0A9500504DC8775 /* Updatable.swift */; }; - 238296CA2E8752527657C31802220A24 /* Result-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C05BD716367802B1AA84356C6E21134 /* Result-macOS-dummy.m */; }; - 239D8E853FDFD3C09B0B3A5E85FB64E8 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13F4C1E92ACB15583B361380492AA797 /* AES.swift */; }; - 23B9A85EF3D0D9FE26611DBA312205BF /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = B465593568C60A48E4A42D1A047995E4 /* join.m */; }; - 23BB4D6CA0785AB14CFA443BBAB22B54 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D0614C48A73B812DC34E2FA48DD6F42 /* PMKFoundation.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 24361E1EC1CCE0031F26E38746EEE1EA /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = FF99AA927653D804503A7BA37208076D /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 24DA9F0423F82C80205C93EEF0CFF381 /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 029D928F404FA2893E2304CF78B3D8A4 /* BufferStorage.swift */; }; - 25C0F08157E3C0F2A0E384774F373EE2 /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = CEACC0FFCDDB8D3FD78976F0CAE8FD61 /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2618ECD8B43241610183A733721C0AE7 /* SwiftRLP-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = DD23C6C5D50E713EB68838F0DB9E3BDE /* SwiftRLP-macOS-dummy.m */; }; - 27FD0E227A0BCFB5C96957DF1D24F65A /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0376FB05CE1FC3FC061DD2CFE3DE0C6C /* AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 290854FFD3516C0BA20E66AD41986C4C /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 354EE4D14557CE745D7020B65D22B49D /* HMAC+Foundation.swift */; }; - 2BA16B5D2DD651E485E5496216F6996F /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE18F632CE594C2E2CCA9A0490532CB3 /* StreamEncryptor.swift */; }; - 2C3A50BE13F80D74D2E8E3B3E6F503A5 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F35E00F2D89D45B3441C99BA910A82 /* NSURLSession+AnyPromise.m */; }; - 2CADC319FC220364D8D53E197C933DF9 /* Result-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 44A4652793E17CB674C8F7E82EA886A1 /* Result-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2CD358B6D6909178593465B26D6A6E53 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6954BF93957A2CAF08330D9214A7ACF2 /* Utils+Foundation.swift */; }; - 2D2FE7ED51FDF3B95792AE43AAA8C9C3 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B6B5F54FE477086DE9224F151F9D3EA /* ecmult_gen.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2DD480A5DBA913244A3AF776CECCDCF7 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 629A9B1DDCCA7AF069A948D996B8B34C /* Authenticator.swift */; }; - 2E988C0A4E1C468D0AFA43A95482D911 /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = F342E030AE1A607D64EAC3488CFB51FC /* PBKDF1.swift */; }; - 2EA3D0F6274B79F77FBD6D089B7067E3 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63A1F06664FED90C2B7F7989990F9EE3 /* NSTask+AnyPromise.m */; }; - 2EB46ECD84B1069C5D85756E35BE3A86 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ED8894D488852DD8E6F75780785F814 /* NSObject+Promise.swift */; }; - 2EDCE4A3A80772C88E0B4031FE4D86C6 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C015DFFE7F497B97D0DA1C8C7AB69E /* Words and Bits.swift */; }; - 2FB34A1FAE745E38E438FA434B64D592 /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D7A0114EB8569F1C403A6574C016E8 /* Checksum.swift */; }; - 3041A5B7E53D75209A5C347950817958 /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = CACDBA26EFF10F14AAD8F7B3DB4F650E /* BatchedCollection.swift */; }; - 312FED65DD6B7D4E4C0AF196082B4292 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = F415B88D0858CD731ECC4C37D0E1F83A /* SecureBytes.swift */; }; - 314D8B2F7ACB1285289701FA44D49A3B /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68C55BFCA12A87EB647D36A87908A1D1 /* AES.Cryptors.swift */; }; - 315E61FA169A73000F63292BBAE8457F /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9B1AD24E2B5EFD0840B6FD38C85994 /* DigestType.swift */; }; - 31BFC50C75020E436DDA0F9AFA73D067 /* Result-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 98B2E87BB6ACFDFDFA8C3C8F69BE06E2 /* Result-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 31F0E9474F7FBB1C97F5EF570A5C681A /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0543DFF3F653D9C90A60EB28027C61D8 /* PromiseKit-dummy.m */; }; - 33194D0CBC51F3CF9555DC514AA2E059 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C8C505AC16C4F7922DBC4160AC3448C /* dispatch_promise.m */; }; - 3368BFCA6F37472A3F80E757FDFA5EC6 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A91DDD53F519E555416888F6747C0D5 /* Error.swift */; }; - 337EA355DE058979DB126870227A42DF /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DC3346C75E669B5227A78FA15785FB3 /* Floating Point Conversion.swift */; }; - 33D8E60E41F6C1C6591FBED80B4A95E4 /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 67580A9D6645C39D002E66190B1B2B66 /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 34D61980DF37C53741DC15DEEDCFAC25 /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BE11FDB9FE69A172C6101D8842D30EF /* UInt8+Extension.swift */; }; - 34FD56F4316A5EEA70A5285A93B5D29E /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 406DA39A86D0ADCD3E417FD3B1B405F8 /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 354D68B8C8B6D4C003BDB91E8A1D680A /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 648DE2BEBFB01CEB5B721BA04955EAF1 /* String Conversion.swift */; }; - 358FB06B0B99F2187EA1658EA97F1020 /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 638D0AE5AF7E8F2016849D61CA3C54E4 /* scratch.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 359269757B7FED4424DD9489F42BBB49 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD229288A14A42E6F98A2F3F4C019A9D /* SipHashable.swift */; }; - 36DB5AEC759BAA7C4222B36C8790FA8A /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = CACDBA26EFF10F14AAD8F7B3DB4F650E /* BatchedCollection.swift */; }; - 370C7FFEAB64F443F216B37A2B33F106 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88EC012A11A5D51BC077A26441D4957B /* NoPadding.swift */; }; - 372CD468A7496DF050E653C20AB8AC1B /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 67580A9D6645C39D002E66190B1B2B66 /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3755C12BE9E88D2D7E5765B3CDC80DD9 /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04ECFBF1BF17192FF4F65A2E96AB714F /* CompactMap.swift */; }; - 377C6046F93E7409F3996D06ADAD4CC7 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD229288A14A42E6F98A2F3F4C019A9D /* SipHashable.swift */; }; - 38D8B82703E87B790A4D8C9B749644DF /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAE868DDC6B50E704178E9C6A7BCDE4C /* Comparable.swift */; }; + 186AD9B44240324FF4C4DBF0A8AC935F /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = 3E6E7087B7CBB4230AEFE06A0586FEA1 /* Cimpl.c */; }; + 187B191D2E4399E1567DB24BD93F0486 /* SipHash-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A49E7FFAA1F69AF0BFDC8A0CFCB938D /* SipHash-macOS-dummy.m */; }; + 1904E18F6CE01618BBBC1B31E43B64EA /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B685BD86E597E436351119CA4A20736 /* BigUInt.swift */; }; + 193CE1B123F216F0140298A506854F9D /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC03B1A635B5BB3ABD74980E5A3FFCF1 /* Random.swift */; }; + 1A8FE1E286DA1769792CED41CA55E329 /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6060667D5D66C779C8BC742A2C7F5F6 /* UInt16+Extension.swift */; }; + 1AAC341916DC64CD28D08BDFED57AC9C /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB1D05E6EF6E5D33F3A993B98DD675 /* Shifts.swift */; }; + 1B1A69F5303E8DD6740A8234E719F76A /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B017F47BE0A65E45E065EA00452F0D28 /* BufferStorage.swift */; }; + 1C12A92A45B56442DF1BF2D3108BD0D6 /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DC64F1DE162445FC5F9F8F1A2C818B1 /* NoError.swift */; }; + 1CDB406411B86AC9E8D84DAB2C97DD36 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73AF6510FE79C3D2EDBCE691D07F6E5E /* Promise.swift */; }; + 1D23298D0D9B4910ADE40DE633078E52 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8798FA9542F2175AA660CDB635E6D6BC /* NSNotificationCenter+Promise.swift */; }; + 1D69BB026569911275C713D240084FF2 /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E5F085DD39FA26739ECAD91284C1F2 /* ecdsa.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1DC075FE4097BF0E29641EDD65D31E86 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B108AA63200D2A6992501E7B76EF6A0 /* OFB.swift */; }; + 1E1385AB09686A96B636755A4447933B /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = AD7DDD48316C5C9CF661C50B3D19698E /* fwd.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1E94C3B3573434FC150CFE79FB8EA24B /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = E9584FC30610F2691B4EB045534020D8 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1EAE65FB4A140803FE03F605B5B9AA82 /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03938C581D805E7DEA7EF7935F6B4E61 /* Cryptor.swift */; }; + 1F22A4026D790826AA156354694CBCC5 /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 092DD25F9A8FD52F554B41FA11289B4C /* Resolver.swift */; }; + 1FCD29F6706433B229F21EA39F8C3597 /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A48FBA7E324AABD9DA453C780537C79 /* field_5x52.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 209D55736C84A40D70E5CEE59018C4BA /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80D7D244BE8CFD16A741C5261EA757D6 /* Error.swift */; }; + 20B709359C09D72B58E11D9B585EBF36 /* scrypt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B66168E0567CA1671C74F37384DD7B7 /* scrypt-macOS-dummy.m */; }; + 2175C9F92182A75746B5770B1C01D70C /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A83A5B7F0434C3FACA671C5A20D8389 /* eckey_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 219282246EF9A166FC2BD24AC6997C06 /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF2520CE6C39BFEF4B6C9B87DA7047AD /* HKDF.swift */; }; + 221D9234B8A18F610B920F836A7855AB /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = F465EA5AEC974D4B2AAFFFC2768A91D7 /* afterlife.swift */; }; + 224BCAC718A8A96B1494162E8F1FFA50 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E959F3AA4E4F1850C7F42B923C77DDB /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 22FF16F6223F01F3AA966B2E701CBF89 /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59C55840D303F469F1F31EE4867563E5 /* Generics.swift */; }; + 238296CA2E8752527657C31802220A24 /* Result-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D7A08C10688F2510948C9E9742DFF65 /* Result-macOS-dummy.m */; }; + 23B9A85EF3D0D9FE26611DBA312205BF /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = EA0E1E254A8A60AE7835DB964A9891CD /* join.m */; }; + 23BB4D6CA0785AB14CFA443BBAB22B54 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9E2278C6E7F3F4C4A66132D0E8E0517D /* PMKFoundation.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 24361E1EC1CCE0031F26E38746EEE1EA /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = AF7AF6D769E4BBF1B2C201836A906130 /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 24D38DE85704AB93DCA1AA003FBD6729 /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 551CAAEDDC5AAACAA24E8A5A86721E97 /* Bit.swift */; }; + 24DA9F0423F82C80205C93EEF0CFF381 /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B017F47BE0A65E45E065EA00452F0D28 /* BufferStorage.swift */; }; + 25C0F08157E3C0F2A0E384774F373EE2 /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 80ED01586B28193ED2BE26DEF9B57A3C /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2618ECD8B43241610183A733721C0AE7 /* SwiftRLP-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AF7FD66A2EBEED268628A0D0FE4E74D /* SwiftRLP-macOS-dummy.m */; }; + 272DA3B8E6A36A340F174862DDF47CFA /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED58AECF3C5444FBDEB7453CDD6D6A96 /* Checksum.swift */; }; + 279EAE9173342F41D610247C9B8788DE /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FC6C3CA2D135767617F5F276FF395CC /* CompactMap.swift */; }; + 27FD0E227A0BCFB5C96957DF1D24F65A /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = AC98E623829FE2C9F71C5C97B66118C8 /* AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2AE019C6FBE28F14BBCF9011859E76C2 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F60E6D7F6C28A5DF688920FB74829E4 /* CBC.swift */; }; + 2C3A50BE13F80D74D2E8E3B3E6F503A5 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = FD06C0D0FAAE077E5B527EA88B8727B1 /* NSURLSession+AnyPromise.m */; }; + 2CADC319FC220364D8D53E197C933DF9 /* Result-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E49C5D9CD234FDC2304F413D1314EE4 /* Result-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2D2FE7ED51FDF3B95792AE43AAA8C9C3 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = E0D2913DF679358122E366AA30A31733 /* ecmult_gen.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2EA3D0F6274B79F77FBD6D089B7067E3 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C64B4995F9A0EBB5D4B5F27B33FB054 /* NSTask+AnyPromise.m */; }; + 2EB46ECD84B1069C5D85756E35BE3A86 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4211F7070401959F35EE92C5214007C /* NSObject+Promise.swift */; }; + 2EDCE4A3A80772C88E0B4031FE4D86C6 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FE4AFACA87A9BC9B7F46A7AAD878E33 /* Words and Bits.swift */; }; + 318456407793AD399D02863A812ED6DE /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = C906CE7510F7153C35950FD44AE3C571 /* Operators.swift */; }; + 31BFC50C75020E436DDA0F9AFA73D067 /* Result-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 011262F92057423AD4ECF708E415898D /* Result-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 31D346420CE39369D66215B21F8A3337 /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = A130AE149844CDF96BEAFC7381997641 /* AES.Cryptors.swift */; }; + 31F0E9474F7FBB1C97F5EF570A5C681A /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DF453CEA7E128C1691A0713421CFBBF /* PromiseKit-dummy.m */; }; + 33194D0CBC51F3CF9555DC514AA2E059 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 93F2C29FA3412D0329780F52C1DD2931 /* dispatch_promise.m */; }; + 3368BFCA6F37472A3F80E757FDFA5EC6 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80D7D244BE8CFD16A741C5261EA757D6 /* Error.swift */; }; + 337EA355DE058979DB126870227A42DF /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = B508E0F1A0F3142EB46882B0104D6F6B /* Floating Point Conversion.swift */; }; + 33D8E60E41F6C1C6591FBED80B4A95E4 /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 8045272A42A0784613BD7057AA86803C /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 34FD56F4316A5EEA70A5285A93B5D29E /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E138D3C3327A0AC400395EA7B85D13A /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 354D68B8C8B6D4C003BDB91E8A1D680A /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07BD7441D03BCED026093ADE867666D4 /* String Conversion.swift */; }; + 358FB06B0B99F2187EA1658EA97F1020 /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 57FE015BCC95654092B0ADF05585E987 /* scratch.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 359269757B7FED4424DD9489F42BBB49 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BFFA790DC1A19DFC5018C9B37267D2 /* SipHashable.swift */; }; + 35D45B19269F07EA96E6F003C6A1F04D /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46F1CC3195EF29E61FD820B624C49746 /* ChaCha20.swift */; }; + 372CD468A7496DF050E653C20AB8AC1B /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 8045272A42A0784613BD7057AA86803C /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 377C6046F93E7409F3996D06ADAD4CC7 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BFFA790DC1A19DFC5018C9B37267D2 /* SipHashable.swift */; }; + 3819CB7BE87DC385D208FF40C7199DEA /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09E31D2F88F4FB6EC4A90B888DF591B7 /* AES+Foundation.swift */; }; + 3867CF007FF0AC14F07271D9E60154CF /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6060667D5D66C779C8BC742A2C7F5F6 /* UInt16+Extension.swift */; }; + 38D8B82703E87B790A4D8C9B749644DF /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 983B0C09BEC11115522233D05D8F47D1 /* Comparable.swift */; }; 3A611A77C4E834E1E7F375E6362DB0D7 /* Pods-web3swift-iOS_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B56F6A20A0CF698ECA0EDF6CF4CDD74 /* Pods-web3swift-iOS_Tests-dummy.m */; }; - 3ABE390A4511DB44A24945B088C8E48F /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = AF3BC8F62680B30207131C5C87008E38 /* field_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3AC07C0FB85EDC81532D78FAB99C85B1 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AE91BB385A7A2911773305870D337C6 /* BigUInt.swift */; }; - 3AC689CBB3DC3931542904E58800704C /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 638EF15CE0F571BA9C2C5868DA40EBBE /* RandomBytesSequence.swift */; }; - 3AEDA0F0A0D1B6B201C42C72941FCE3F /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D007141D6A0D170999FBC71CD9227F3F /* Blowfish+Foundation.swift */; }; - 3B100200B920BCF7D6974806539B857E /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = B44892C52E2EF6449BEC05C26F4C7481 /* ecdsa.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3C8A0D6B372B675A5996296B62C25692 /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = ABDC74FFB2FBBD052E941151A2CC6E87 /* lax_der_parsing.c */; }; - 3E20F5E2C7DA6C8B4AF7D05CA526183F /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B9A712542DB104270D877BBE57746F /* Cryptor.swift */; }; - 3F474D94A325AFDB74206B0CD0790920 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9891F2E1A2F4A5890CC52561833FA78 /* SipHasher.swift */; }; - 417A2304F303DED593E55D2CAF337305 /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = E1B2A6CA027F0CF17E40FED49D6A5E70 /* ecmult_const.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 41C19BD34A261EF87BC9282C3A634240 /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EDFAD6F2EC5C3407650B54B9A5A4BE8 /* fwd.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4216370E79CC772FC2572BB6143CD8BA /* PromiseKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 23603E526EB11889D028149C843F4B49 /* PromiseKit-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 42200366754CDC163F24C7657A6E5426 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F35E00F2D89D45B3441C99BA910A82 /* NSURLSession+AnyPromise.m */; }; - 42FF2C1D3648C354550AC88EE5E64B80 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C98E405B0267998743280361FC7A320B /* Data Conversion.swift */; }; - 4327DB0149A7B915F54982114D289E21 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = 10063C7AE612FA73E113299D752D2F9A /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4356FFA7A939D1F7937A48DA948D1F4E /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D23E94B867181F85C5901C85231758D /* Promise.swift */; }; - 4407ACFACA948CBA51F56B96A99EE4CE /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DBCB6B50C94F20FB7E7BC301A007798 /* PKCS7Padding.swift */; }; - 44DF067E138C7E2662D76052B1D15932 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40B7ACE16AAEA76CA6C9CAE3FE7BFA5F /* Operators.swift */; }; - 4500CFBCFC034D43487B312FC5483807 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B6B5F54FE477086DE9224F151F9D3EA /* ecmult_gen.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 45482DED636330B9BCE4493225B66813 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAE868DDC6B50E704178E9C6A7BCDE4C /* Comparable.swift */; }; - 4590A483F08539D557FC4B9123AC3A67 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D757EF89803E12ABE5A6DC9D35431A5 /* ecmult_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 478D6AC79B09119FD888179B7B3E3948 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = E39980D5A8BD94928885C59ED6F3555D /* PromiseKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 478E26D3AF13111498519DCF04DF90F4 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 213FB9632182CBF9A72A027B86282B5C /* NSURLSession+Promise.swift */; }; - 47AE4F4F59DE9319CA4537E806A378A1 /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = E13B83B6C950F75854459F690EF3A6ED /* firstly.swift */; }; - 497FABADEE00EF124C8DF6366EB5C7A2 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 0CCC239B4BCB58F6EF7C6E22E0D80102 /* group_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 49BABAEF57C8A617DA34C25DB757180B /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68C55BFCA12A87EB647D36A87908A1D1 /* AES.Cryptors.swift */; }; - 4B7495F07A37948723508823C5903A2A /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = B983E877B34D130C7F0E41197599CAF5 /* field_5x52.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4BA76EF32D81038B1AD2E8C555A3C985 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40B7ACE16AAEA76CA6C9CAE3FE7BFA5F /* Operators.swift */; }; - 4BAA131CC4AAC980112DCD779019E1A1 /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EECFB1BF73B6EB0684317B85E2EA08E /* util.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4C0745766AD773551AD2F67D8A583AE5 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 416DB21C5FE305C78284237079C89388 /* UIViewController+AnyPromise.m */; }; - 4C7033236EE3A20A2AAA6B8F51285FA3 /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = CEACC0FFCDDB8D3FD78976F0CAE8FD61 /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4D7DEDC820A1EF913455BC0FBE72FBD6 /* BigInt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D484138780C581F7D2CE4E6D0544865 /* BigInt-iOS-dummy.m */; }; - 4E8C968B4D8B860668C9C36CA819BF70 /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04ECFBF1BF17192FF4F65A2E96AB714F /* CompactMap.swift */; }; - 4F5E15E5AA1C78F5B4AA3588A8CE4C19 /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = 070EBBE505C1F8FCD5F159DDBB5D41C7 /* Cimpl.c */; }; - 4F8294D7CD9C06B4BAF8625E87D9D05F /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = D606F2C64242F4C4424FF77060007794 /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4FCF1CB933BEBAC5D0892C543D68E658 /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2503DCCE1598BB4D7E580AB0CB8E807 /* BlockDecryptor.swift */; }; - 5063FE3FE1C30A73A073F3533C508D64 /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0551BCBA17CFD8A37D9E9C9F95EB6D0 /* AES+Foundation.swift */; }; - 5104F193E7D7CB179A24BF3E5235FD3F /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9B1AD24E2B5EFD0840B6FD38C85994 /* DigestType.swift */; }; - 5111BFCE88BC6C575354E725D7569A17 /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 638D0AE5AF7E8F2016849D61CA3C54E4 /* scratch.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 51576520F03EFCAB1BA67BEAA79E81B0 /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = AF3BC8F62680B30207131C5C87008E38 /* field_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 517719A8F7EBDD02A80FC21F1246D335 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 38B4EB729C6E19E85E5F7500BBFCACF4 /* when.m */; }; - 5185A27FC19CEB1E69F99F8CE56639A9 /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = BBB1686A6F8A3ECF8119E0B9026493AA /* scalar_low.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 51DADAE211CE77CDDD762DF1F5FAA236 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEA00FFA03F2405A1DD8AAB823BC5CAF /* Exponentiation.swift */; }; - 539700CDAD65FF7CAC666B4C99261E10 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 38B4EB729C6E19E85E5F7500BBFCACF4 /* when.m */; }; - 53B8C2D24E27198BE0F12E576F7989F9 /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DA63B5CD137C32932CDB5DB0C7A036C /* Guarantee.swift */; }; - 557E070EDC1D983960128B12A77AA293 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E8AD7E4D46EAFE301BAE49458CBADF /* GCD.swift */; }; - 55AD64D3F27943249ED212756122D497 /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4DF3EE5AB6E8CC14DA313527875575F /* AnyError.swift */; }; - 563E37F7F956CED55AC3793CD37445D3 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = BADDDC4615BBD4973A52693314F92956 /* Configuration.swift */; }; - 569DAD122746A7696C6305FDB8B9ADB8 /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = B943A73349F77F75B8C3055D2E94C04C /* field.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 57757EDFE754713488D29934C64FFCFE /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D0614C48A73B812DC34E2FA48DD6F42 /* PMKFoundation.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 58A0398843A05951A20C16C736C2F649 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CA875E3478CF42FACB3165CBFAE86BD /* Thenable.swift */; }; - 5A8B48EB086264AB7340C7FBF07D7383 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97C1287E8FD172526EC3409612A97C23 /* Utils.swift */; }; - 5B412B06CAD963FBFFA763798EEE3AA0 /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 928C9306D44A4F06DEDCFDA02220D548 /* basic-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5B6447E44DCD6DF880956561D716D42E /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = D606F2C64242F4C4424FF77060007794 /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5BF15FCDA2CA5E504F774B93C1EAA123 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DB98AE66675F1DDA4A420A12C0BFBC6 /* OFB.swift */; }; - 5C7BE1B24A19199F514AC8688FFF4306 /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 8D81EA62567426F4F97BA1EE4F993378 /* lax_der_privatekey_parsing.c */; }; - 5CA9E73F8349BAC9F5EBD1F0589C91AD /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CF4E411893D167B17A83AB51C8D53D /* ChaCha20+Foundation.swift */; }; - 5E0F76D46A3F14CC3903F4D072D6652C /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 247E11C8D6F6ECD1DF148F75673EBF35 /* BlockModeOptions.swift */; }; - 5EABC52C76A5F7DD29136E5C10CAA368 /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 513D1D85D34F76B7E4DAE1B37103BC5A /* UInt32+Extension.swift */; }; - 5EBCC3EF4D3AEDA8DE7D24EAF054A21D /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75724C7E4D6EB3792635A031AD2B1492 /* UInt64+Extension.swift */; }; - 60CD9DF68A22619B2F816E8B1F8DA33A /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB99BF8C95F80E710325AC9BE5A0BE72 /* ResultProtocol.swift */; }; - 61C9BCD007508C2CB8959FA50BF0F53F /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7E660F6E2F237440138C5AAC5BC6476 /* Addition.swift */; }; - 61D043FD677FACF7F382F67A430A7F62 /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = C59C9D4690B77F7F188FFCA0081A3AA2 /* SHA2.swift */; }; - 627F0BB24DFEFE1C3CCA592AFF4E01EC /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = A1EC79FCBA910623842C72C09D10B874 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 62B6EEB28406C9D6FE3A1A146083280A /* Result-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FF4E4FB6D0F71C472A99E72F368087E0 /* Result-iOS-dummy.m */; }; - 6483A6AC993D8C5F8983064789F220B8 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3A74DAAF802F643B5F00446BF21F89A /* CBC.swift */; }; - 6545F866110FD71A8A7F08C98248F17F /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 889ED076F99BD2AB4920EC9A5ECAFFDE /* after.swift */; }; - 65693FDA33760BA50D20F6D0989BA8E7 /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51DF3FC4A067409E953FF230FC67D985 /* Deprecations.swift */; }; - 65736CA32B234972A9DE43C69910B99B /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 110E47A2CC58E6173023BB094B2410E4 /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3ABE390A4511DB44A24945B088C8E48F /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = DC010BC54E6C05686BE227F75B04535D /* field_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3AC07C0FB85EDC81532D78FAB99C85B1 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B685BD86E597E436351119CA4A20736 /* BigUInt.swift */; }; + 3B0D18B9FCA958796CDACD6710637030 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A45DEA061F03DB9EB78391B810792DD /* Array+Extension.swift */; }; + 3B100200B920BCF7D6974806539B857E /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E5F085DD39FA26739ECAD91284C1F2 /* ecdsa.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3BC2BF6E6B27BFABAEE1C5B8AD2838D7 /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 903BE66455FF2F03FD9540A7E5914EC7 /* CFB.swift */; }; + 3C8A0D6B372B675A5996296B62C25692 /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B659053EBDBE68F9EB1137C3AFCC9F8 /* lax_der_parsing.c */; }; + 3D80464CEDFAD819CD4BCB5190A469E9 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E27EDB736A99A27C20F82D22DC4A707 /* GCM.swift */; }; + 3F474D94A325AFDB74206B0CD0790920 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8EA9E5ADEC0526C987DC2B55F8E04B5 /* SipHasher.swift */; }; + 3FA010055B3BC4813A4245727D6E2AE7 /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44BE339EC0BDEB80B98E8D988708993F /* UInt64+Extension.swift */; }; + 417A2304F303DED593E55D2CAF337305 /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = A3D2730C3BE7868E162AB4F297A3A7DE /* ecmult_const.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 41C19BD34A261EF87BC9282C3A634240 /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = AD7DDD48316C5C9CF661C50B3D19698E /* fwd.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 41E4BB16EA30C7552FF1E3CA6BC0491D /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D97871DE06423066D52CDBE28B74B3B /* PKCS5.swift */; }; + 4216370E79CC772FC2572BB6143CD8BA /* PromiseKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C3AF144309D8E77765BE0E32200497A /* PromiseKit-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 42200366754CDC163F24C7657A6E5426 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = FD06C0D0FAAE077E5B527EA88B8727B1 /* NSURLSession+AnyPromise.m */; }; + 42FF2C1D3648C354550AC88EE5E64B80 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE57BC224E219C65382BB751CCED649D /* Data Conversion.swift */; }; + 4327DB0149A7B915F54982114D289E21 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = BE6305D1DE9131CFB173AC969FDB1092 /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4356FFA7A939D1F7937A48DA948D1F4E /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73AF6510FE79C3D2EDBCE691D07F6E5E /* Promise.swift */; }; + 441F98C26072F42F773DDF5C14AC249E /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09E31D2F88F4FB6EC4A90B888DF591B7 /* AES+Foundation.swift */; }; + 447C407907733320787E8F23946656EE /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 903BE66455FF2F03FD9540A7E5914EC7 /* CFB.swift */; }; + 44AEE69C5AA31A84CCEB7534C0855D78 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B2EDCF2255BD0D829F03B0C1BD0A060 /* String+Extension.swift */; }; + 44F4771652CF7E4CD82AFFF61B0ED567 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B108AA63200D2A6992501E7B76EF6A0 /* OFB.swift */; }; + 4500CFBCFC034D43487B312FC5483807 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = E0D2913DF679358122E366AA30A31733 /* ecmult_gen.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 45482DED636330B9BCE4493225B66813 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 983B0C09BEC11115522233D05D8F47D1 /* Comparable.swift */; }; + 4590A483F08539D557FC4B9123AC3A67 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A19805DB694C14E29F255EA2BB4603A5 /* ecmult_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 465C38010042DF8DAEFA492DCE294A36 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 699D800F72CE09977D6EE1687D706BD6 /* BlockCipher.swift */; }; + 478D6AC79B09119FD888179B7B3E3948 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = C533250E0867F5CF90717B90B4450C63 /* PromiseKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 478E26D3AF13111498519DCF04DF90F4 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39B4575A57EFE3A0630FA12FAE346202 /* NSURLSession+Promise.swift */; }; + 47AE4F4F59DE9319CA4537E806A378A1 /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = C33EA4F090C90D1AE636D3B40ECFA945 /* firstly.swift */; }; + 48B50CFAD0E4088080A109DCA7B8688F /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB95DBC141DB412EAF90DE75B00EE345 /* CMAC.swift */; }; + 48EE55837C3546B46DFCD59737CEDC3C /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4434E5B7050EF71B04AEAE88F303455 /* Blowfish.swift */; }; + 494A8C06290340CA7C968264669CD5C0 /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4F3DB8A969B504C000E0BD68E9DF848 /* Rabbit+Foundation.swift */; }; + 497FABADEE00EF124C8DF6366EB5C7A2 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 306BDC01729FF834ADC364D1DDD4797A /* group_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4B7495F07A37948723508823C5903A2A /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A48FBA7E324AABD9DA453C780537C79 /* field_5x52.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4BAA131CC4AAC980112DCD779019E1A1 /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = A094ABEA6C6E0AD5B87D62BB32AEA3DA /* util.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4C0745766AD773551AD2F67D8A583AE5 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 323129AF4AE1EA178343E46476163880 /* UIViewController+AnyPromise.m */; }; + 4C7033236EE3A20A2AAA6B8F51285FA3 /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 80ED01586B28193ED2BE26DEF9B57A3C /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4C82B6EF64C041919BD1BDFB613CA7AF /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46F1CC3195EF29E61FD820B624C49746 /* ChaCha20.swift */; }; + 4D7DEDC820A1EF913455BC0FBE72FBD6 /* BigInt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A81557551191339AD284647E9008F3BF /* BigInt-iOS-dummy.m */; }; + 4EB23EA6CB130E3291B0776D3862D748 /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4F3DB8A969B504C000E0BD68E9DF848 /* Rabbit+Foundation.swift */; }; + 4F5E15E5AA1C78F5B4AA3588A8CE4C19 /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = 3E6E7087B7CBB4230AEFE06A0586FEA1 /* Cimpl.c */; }; + 4F70068CDD913C18026C4A968EA92E9A /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = C504B703D6897FF1896886916748D0D6 /* ZeroPadding.swift */; }; + 4F8294D7CD9C06B4BAF8625E87D9D05F /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 938A29097DE727896422B7DD937D51E3 /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 50DE88114B7BD18A98F0F45A972079E3 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D67B21BD5ECE586715CDCB8EF9F84E24 /* SecureBytes.swift */; }; + 5111BFCE88BC6C575354E725D7569A17 /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 57FE015BCC95654092B0ADF05585E987 /* scratch.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5145AAE99352DBF420419223083C6C25 /* CryptoSwift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EEF44FF851A27BCE1872F1FEBF9A9440 /* CryptoSwift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 51576520F03EFCAB1BA67BEAA79E81B0 /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = DC010BC54E6C05686BE227F75B04535D /* field_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 517719A8F7EBDD02A80FC21F1246D335 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = A4420324C5657482ABEBDA0BB3C73802 /* when.m */; }; + 5185A27FC19CEB1E69F99F8CE56639A9 /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = B276DAA5AD0B968F80A0769180CCC012 /* scalar_low.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 51B79A81BE02C232299A5DA47E988277 /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276BA53B2960C2B624579741823D9DD2 /* UInt32+Extension.swift */; }; + 51DADAE211CE77CDDD762DF1F5FAA236 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0B695B584A94039305F17CD2B5470FB /* Exponentiation.swift */; }; + 527E46A66487D9D5B3FF54359A3951EB /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC85A555F579FA10EC96590296D9288 /* CipherModeWorker.swift */; }; + 539700CDAD65FF7CAC666B4C99261E10 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = A4420324C5657482ABEBDA0BB3C73802 /* when.m */; }; + 53B8C2D24E27198BE0F12E576F7989F9 /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = C535818543FB132F5085E5ED501095D0 /* Guarantee.swift */; }; + 5493B45FC1BD542111A20AC6A58EA0B1 /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD9ED798FEF891C4A3123685AB25017 /* PKCS7Padding.swift */; }; + 54CD3C94770F9985D0EDD8AD2D880EEF /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DCDC3F74F1C62E2161FC76EF265BED7 /* AEADChaCha20Poly1305.swift */; }; + 55620C107463741AB202D7B93B8AC47A /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD971533936CC3705E267598BF53A93 /* UInt128.swift */; }; + 55714E2CA2C818B9BB609FE4303A7AE3 /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AA2EF5FFE50FBD8EAB6BEA39D23C942 /* DigestType.swift */; }; + 557151A9F797E462E701215A27F7DC21 /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0439A7FDEC4F611C9334DEC15FA25F1B /* Digest.swift */; }; + 557E070EDC1D983960128B12A77AA293 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 167A6E691DFD15BA9883036B14F41D03 /* GCD.swift */; }; + 55AD64D3F27943249ED212756122D497 /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 665306D3A9323800337BE1451D8960E7 /* AnyError.swift */; }; + 563C641A5D7264103E44BCDCC6C6C887 /* CryptoSwift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = CD4C2245061DDD251D7082A04D84F218 /* CryptoSwift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 563E37F7F956CED55AC3793CD37445D3 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D86C75595B41479AB364568AB89F857 /* Configuration.swift */; }; + 569DAD122746A7696C6305FDB8B9ADB8 /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6C08A1761D32580CB3EE6E91B5E379 /* field.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 57757EDFE754713488D29934C64FFCFE /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9E2278C6E7F3F4C4A66132D0E8E0517D /* PMKFoundation.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 58A0398843A05951A20C16C736C2F649 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D111E53D728978DA7C689AD4AFDCA963 /* Thenable.swift */; }; + 5B4044B103053232D6A987856C610367 /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6176C709F1F11238FCAF958F9A75741 /* ChaCha20+Foundation.swift */; }; + 5B412B06CAD963FBFFA763798EEE3AA0 /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 853BAAA89F1726DECCF03BC01BBDC64C /* basic-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5B6447E44DCD6DF880956561D716D42E /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 938A29097DE727896422B7DD937D51E3 /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5C7BE1B24A19199F514AC8688FFF4306 /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 0194B6C18C95261082F349271D42FE44 /* lax_der_privatekey_parsing.c */; }; + 60CD9DF68A22619B2F816E8B1F8DA33A /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E3C47D7844F81394427D09B0454A241 /* ResultProtocol.swift */; }; + 6121E601434E10D5CC3A01A2C815B0D0 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7530E3D35773A67134FC4EA93063F01 /* Utils+Foundation.swift */; }; + 61C9BCD007508C2CB8959FA50BF0F53F /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16FB18636FBF37732FFEDB58EF77090 /* Addition.swift */; }; + 627F0BB24DFEFE1C3CCA592AFF4E01EC /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C71245535F05C90A42683076576BB26 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 62B6EEB28406C9D6FE3A1A146083280A /* Result-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4BECA22FA3D5D535FC714D0B2B9EB8 /* Result-iOS-dummy.m */; }; + 6545F866110FD71A8A7F08C98248F17F /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3386525472CC553FF40B3AFEE8BCE2DD /* after.swift */; }; + 65693FDA33760BA50D20F6D0989BA8E7 /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63D47A1599387D37CCA850DB9256283A /* Deprecations.swift */; }; + 65736CA32B234972A9DE43C69910B99B /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 433536C0066CD933A793F8B42877435F /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 65D0354F4B4E32CBA63ECDF84AFAD283 /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DCDC3F74F1C62E2161FC76EF265BED7 /* AEADChaCha20Poly1305.swift */; }; 662343AAB2E8FCFC56D2176CE50BE184 /* Pods-web3swift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E8C19543EF3AA4D9801DBE55E22E211 /* Pods-web3swift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 670A949462535EF03D2A9B910CEB4E48 /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = B206B730E077834821DED823382B92DD /* secp256k1.swift */; }; - 678ACAE3280725570F9C7FC768578757 /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = A493659FF25FE0BB4CA590271A53BFB6 /* Salsa.swift */; }; - 6817327279945D8425268EF14CDDAC21 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE037589FFCAACA71A323801729DC4A8 /* Primitive Types.swift */; }; - 68536A3B8BA467CBE4D92F13DDB5D5A3 /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AAE07003CED08DD7BCB8AC108A4773B /* Scrypt.swift */; }; - 6939FF91657C15B585F34286B8D8BF16 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DB7550812E8FC8658862B062E0A8D6C /* hang.swift */; }; - 698DB1FA7FF3234946A86E51AF828F39 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2394F66C9B9661F4F0C5813E12A79FD /* RandomUInt64.swift */; }; - 69BAB45539E26B90D356BD6D1E6839BD /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = D099C2689CE8838D1CBF7B7310B03821 /* SHA1.swift */; }; - 6AD0531529517B7D53FB216B173CB4D7 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0BE0F8D8AB5D3091421F18BD6A6A10D /* NSNotificationCenter+Promise.swift */; }; - 6B815DB2B9AAED0232FEDEC0184C28F1 /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = D459A9A71D9584F44D50CCE76CA32DE1 /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6D2056001A236820F8015BA4A79E161E /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = BAF5556D32E479626438702FBB2B206E /* race.m */; }; - 6D44B36B12347BA0E2838B68148C4BB4 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10EE3D627FD85D9AD1BDC05F433526A5 /* GCM.swift */; }; - 6D5CD948E7245E25D3815643B2B4C89D /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F80A642AA09FE49288321BA985716AD2 /* Array+Foundation.swift */; }; - 6DBDEE14D217B557CE2EA3D1BE065D64 /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = 36E46262C102F8CBB9AC5809B82A532D /* scalar_4x64.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6DEBA1C6CA8D2095A1CCE1A0090E23D5 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A30230BA7EA4657EA54DDA7AB7B05FD /* hash.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6ED4064256289FBBEBDBF2C1D4C347CA /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0551BCBA17CFD8A37D9E9C9F95EB6D0 /* AES+Foundation.swift */; }; - 6F5B521B508C0230EF8488842DE2C905 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9891F2E1A2F4A5890CC52561833FA78 /* SipHasher.swift */; }; - 711CA891836C6E9371B8C5DBEDFD346C /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 156AC0832786D6E41B095D6E8DD29AC8 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 717B05FECD48B3ED8481296EF0CCF350 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2394F66C9B9661F4F0C5813E12A79FD /* RandomUInt64.swift */; }; - 7193D179572C3FAD861BD281EBBE0794 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DB98AE66675F1DDA4A420A12C0BFBC6 /* OFB.swift */; }; - 7273616B7461B7AEBC1EECEB88851187 /* scrypt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 55674F039B757742790CC41D400D1B28 /* scrypt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 73240BD69BCC26DFFDF04AA384B93E62 /* secp256k1_swift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 48BA596E48FB87148C88E3B7BBB602EB /* secp256k1_swift-iOS-dummy.m */; }; - 74602FF913EBE7791DE8B091DBFC2D6E /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E2A180DBC09C044075F60A0C97BFD85 /* ChaCha20.swift */; }; - 7478C4AB680096975DA0F3885DE5128C /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = 130F36C1478ABB13451E11EE5EC671CA /* Blowfish.swift */; }; - 75383208B98A4BFB61B7418E8B546CCC /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EF1089B1CD3D0F375289721DEB584C /* AEAD.swift */; }; - 75603E077E70073F479AE5B3F89CDC8B /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59163772C1016907FD12D819A604B18B /* Rabbit+Foundation.swift */; }; - 767EBDFEBC77EC1421A3916FBB13E219 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB99BF8C95F80E710325AC9BE5A0BE72 /* ResultProtocol.swift */; }; - 76CD5AD83B4FB7CB8D690BBB0E6BF0CA /* PromiseKit.root-CorePromise-Foundation-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C5EEF0BE65E670AC2535547ABA3099C4 /* PromiseKit.root-CorePromise-Foundation-dummy.m */; }; - 76CE4160292720CFEE6F73DFED4DE333 /* PromiseKit.root-CorePromise-Foundation-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = CABC07B9B526CE22A328B2F116773029 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 76F56049518D4E3F2868ECB003F2990A /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F95154420EF4C760231BA7CBA1A7589A /* PCBC.swift */; }; - 77066675DD2B31CAF9BBE16B8F3B4FE2 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9FE34B65B17D095EB1999C6F5667427 /* AnyPromise.swift */; }; - 773013B84E21E3867773BCAB6E171CBC /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = FADA29CA311EF9A86381521A5E4C366B /* Shifts.swift */; }; - 77EBF711C1B88D92CFC3AFCE6293E015 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06F1FB18FDF42877A101BED0A4736B68 /* Array+Extension.swift */; }; - 784703A2DB2FA871E907D206577630EC /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = F421A94F9F1E378421F3B3C56314E368 /* eckey_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 789A3DD0AA3D7580E0FCF6389C037D56 /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1E1805F59DD3B99C4A24A6B69DA1738 /* SHA3.swift */; }; - 78ACD91B0A802FD11D3CB4EC25A78D89 /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 88AC1F107B9BEA598C0726780ECDFE87 /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 79FA79BA765DEEF172BC0384B7E5CE84 /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73E1C923DAF11E64DD39A52C483CBBB0 /* UInt128.swift */; }; - 7A0702EE936C773C38F5E4B7F21AB26C /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75D9DF88CC9C33DAC01E5EFCB0B1513D /* Multiplication.swift */; }; - 7AC2E47719C68FABBDF2DF9E567086AF /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = D099C2689CE8838D1CBF7B7310B03821 /* SHA1.swift */; }; - 7BD84093A79722210529995051394BC9 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = 9ABF1DE4DC6AE445BD89E628E2CF5E94 /* num.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7C414865BEC16506132F9910DBD62F3B /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = 260C8496D4BED6EDC41A2FBCF2E87AC6 /* Division.swift */; }; - 7C84CA8569B6C593005324DE5F49621E /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68457844D0369DF25FAC63A7E42F3A5C /* BlockMode.swift */; }; - 7CEBCAAE658C0E0716B41E40BEF8FB3D /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4723853D29831D8D4EC86E13EF15FDA /* CMAC.swift */; }; - 7D9DC2803DA6CE9DE07A6C18AF52AFA7 /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335A62646C32DC8B2185FA6DD3030CA6 /* when.swift */; }; - 7DAD16539BA5194CA6515AEA28BC29CA /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 247E11C8D6F6ECD1DF148F75673EBF35 /* BlockModeOptions.swift */; }; - 7DB10EF26A0A2F6768F695BE03C0AB86 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75D9DF88CC9C33DAC01E5EFCB0B1513D /* Multiplication.swift */; }; - 7DD60FE1FB24311F3522B19B09E05CBF /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = ABDC74FFB2FBBD052E941151A2CC6E87 /* lax_der_parsing.c */; }; - 7ED61B6F717591CD9AEE78153233E125 /* CryptoSwift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BED38F4200E2E27BE7EF1306C1EF481F /* CryptoSwift-macOS-dummy.m */; }; - 7F754A09D7EA3165D9758A80F307227E /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DC3346C75E669B5227A78FA15785FB3 /* Floating Point Conversion.swift */; }; - 7F8D8FBC1A9C67B326A7F5A04BC3658B /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65CE212AD1BE3547B620E83B3DA9E60F /* CFB.swift */; }; - 7FE0C78E1D6CF35FD66403216909410B /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38253CDBFF833980FA0956A34E1BF0C7 /* BigInt.swift */; }; - 7FE6B8EA18532E50F15E7BF3D013B092 /* SwiftRLP-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A11B379994D50482D207EE8967ED7CDF /* SwiftRLP-iOS-dummy.m */; }; - 80AE7386A1B299C39AAC7F0C6AEC590D /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FFE51D4F185433A05C0BD38B8F2A5CC /* HKDF.swift */; }; - 80D2DC67C9BF404DB886FB1B282408D3 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9197F30F9D372148520156A011421FE9 /* HMAC.swift */; }; - 80D571EE008AE23D0AFAC92B6A98204D /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 8D81EA62567426F4F97BA1EE4F993378 /* lax_der_privatekey_parsing.c */; }; - 82C1C3566A5D5A6395F0CC63E2E63881 /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A3998EBD9688668E8B5E865E058BC /* Catchable.swift */; }; - 8384A7D8940BDD9B50ABF44358E12847 /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E2A180DBC09C044075F60A0C97BFD85 /* ChaCha20.swift */; }; - 83CD3302FE915E10B107859386387F32 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C8C505AC16C4F7922DBC4160AC3448C /* dispatch_promise.m */; }; - 848EFB4F6CDA94AAAD25CCB2283E9EAA /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = A46C4FE304316D231AC48D068F15FE99 /* Integer Conversion.swift */; }; - 8601AFFE38D08BA40B4AED33D04654E4 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10AB7CE8E7FA7C93448EFE94CFEE2C62 /* Strideable.swift */; }; - 874698320130745EC1465E308033D024 /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9E6DDE5A0AF4D0B343E4D3AEE9DF983 /* Collection+Extension.swift */; }; - 89AD1BFCA3B307CD78AFB34118AC031D /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7E660F6E2F237440138C5AAC5BC6476 /* Addition.swift */; }; - 89B40A1B6B4771D884CC857A62E3E33B /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0376FB05CE1FC3FC061DD2CFE3DE0C6C /* AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 89DAA555D3A3650E7AB8AC4853452716 /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 42E8817F1CAA2069A5B0A1A0D0ABA398 /* scrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8A8FAE273220A2C885FE8C452D175166 /* secp256k1_swift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9520DA623CEB5BEB937C6E2EEC267B31 /* secp256k1_swift-macOS-dummy.m */; }; - 8ABEC41E232F354C6DF2DB60B4AEDF49 /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D1A84D8AEFDC828575F732E2005CA5B /* AEADChaCha20Poly1305.swift */; }; - 8ADF39D418D2741819C863545BBED5D6 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = C5660E081BC2DA61D02571E01B81C8FE /* scalar.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8B10C87FE35BA83424ABBA01D0669FF8 /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = 7663F04B24B87395872D526DC48DC43C /* group.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8BAF1F91DA55BF8A5E86636E90D92F2F /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 15F777495520F311DC5F6185975B769C /* secp256k1.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8CA95863A4A71897EE45477A562A16B3 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6954BF93957A2CAF08330D9214A7ACF2 /* Utils+Foundation.swift */; }; - 8CCA031DBFC561C2BDB4295AFFE02DCB /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = BADDDC4615BBD4973A52693314F92956 /* Configuration.swift */; }; - 8D3BA883F8AA3E7565A2AE9D8D533F19 /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = C37796C11F19D8A45631C9218E297AEA /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8DE8FDE423347EA29D896211A3C2C7CB /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6304D4D79F57615EFD4626BF126CE5AD /* Bit.swift */; }; - 8E189B54FFC987969C2A26D21DB0FB42 /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6304D4D79F57615EFD4626BF126CE5AD /* Bit.swift */; }; - 8EBBD4D88DD8F98CEC0791A902D2438C /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = C37796C11F19D8A45631C9218E297AEA /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8EE3016E16955D33E67D3A4B526B80B7 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0010565A5FA9F18F27870EA632C4D3 /* afterlife.swift */; }; - 8EF9B8FF607B9FD70D85D95EA60C804D /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75335D15747F097BD0A9500504DC8775 /* Updatable.swift */; }; - 8FFB71FAC919894CCAD2B296EA300E5B /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 42B2FCE41642FF2B0CA0939EDCA3AD78 /* Cimpl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 901FC638FD04ABBF641B1BA5289E58B9 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = E390C18F83747553B781457B8A520926 /* after.m */; }; - 907425973F15BD66964D73A783E4FD6A /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F87EE960E154529EE1313BDE796C821 /* num_gmp.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 934311E0A7ED33AF227CA6236BE194FA /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CBA3A66080B4CF784ADFED0326CBC82 /* String+Extension.swift */; }; - 9346676038E479F7475D304CD3939A0F /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65CE212AD1BE3547B620E83B3DA9E60F /* CFB.swift */; }; - 93AD3CA5F13CFF076A06516E303A61C9 /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = F342E030AE1A607D64EAC3488CFB51FC /* PBKDF1.swift */; }; - 94C3998EDCB3C4B71B110099E7E3E975 /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C03433156B044F013B91599EE579C7D /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 96126C56ABEF426B0B801431F709443B /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E4050C50BE4522F2AB113A1EC5B6ABB /* eckey.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 965128CD152E182D548D25166A7A0ABC /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C665B9B4606D9A35F9DFFB15EEB9F10 /* AnyPromise.m */; }; - 969BD4FC9172F82D66E704BF544A30AC /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10EE3D627FD85D9AD1BDC05F433526A5 /* GCM.swift */; }; - 96C6125FB939C1C06CE63AD1E59F88B7 /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77A1B64DBD371FBCB805A100679F87A8 /* Digest.swift */; }; - 9712E5BC7B1EEE1A02EEA6DC76325BEA /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0046FAD665E019D5EFFFDFC7C04F79EE /* Poly1305.swift */; }; - 971CF5DA4334D6FC9E1DE7E8118BF088 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 246EC9B3E3D924F7496163E4D7D5574B /* Cipher.swift */; }; - 9780B00892C127C1916229C06A751F7E /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = C59C9D4690B77F7F188FFCA0081A3AA2 /* SHA2.swift */; }; - 98AE081420DDB94A9A72C9DE3CEEDB81 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 52AF65D13B97A0EAA5CC2F9AF6450786 /* NSNotificationCenter+AnyPromise.m */; }; - 98DF8B5D60DAF3B7AC6B1899CCE12A74 /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F87EE960E154529EE1313BDE796C821 /* num_gmp.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 991C48377FE8653491950997A605201D /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8E5FF3E2A379FE71CD1EEE3BB380DD0 /* CipherModeWorker.swift */; }; - 9940F65AAACFEDF8634F4017D31420A4 /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BE11FDB9FE69A172C6101D8842D30EF /* UInt8+Extension.swift */; }; - 9B20EF7C315B4E343F0B79DE78C9E355 /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 42B2FCE41642FF2B0CA0939EDCA3AD78 /* Cimpl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9B953A89FD0508E9463F5FE0D9F91D44 /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B2BE4EB401907B31121C20D9AE85D04 /* scalar_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9CA622EDF0E225A5FE37350E93E7B757 /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BECA27963AB5B81C6487F1AFF447EE3 /* UInt16+Extension.swift */; }; - 9CDABEBBD7BF0889FF7DD3E739FD6B40 /* scrypt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B95DAAA20BEFAD1CE76C888E2E5DDB01 /* scrypt-iOS-dummy.m */; }; - 9CF22D4A3B62E62B50881D0DE45FBDF9 /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EF1089B1CD3D0F375289721DEB584C /* AEAD.swift */; }; - 9DAE14B88EE655354CACE65717FA211E /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C1DB7075FC89AABC9027B89E410DD0 /* Hashable.swift */; }; - 9E16CCBD9A220CE68E8B8BCFC9134C59 /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = C518BE2221DCB8E9775CF59E3A6C676C /* ecmult.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9E85EE2DD5C2A60DF3DE739BD1218C76 /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 315EDC3BC73A24F07AB8D9FB44FEEF7D /* MD5.swift */; }; - 9E9A8A8B46304D435822D15C3C38A4AC /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97C1287E8FD172526EC3409612A97C23 /* Utils.swift */; }; - 9EE54627ED72870C58157B76B89AC3AF /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DBCB6B50C94F20FB7E7BC301A007798 /* PKCS7Padding.swift */; }; - 9EF7B2E48C40E82E7EC0E85F6B0222E8 /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 406DA39A86D0ADCD3E417FD3B1B405F8 /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A01F875E651CCF1697C02EA9BF034852 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F95154420EF4C760231BA7CBA1A7589A /* PCBC.swift */; }; - A065300D974D4C50642BF3687E0E6C37 /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584C7F09DDD45569AE8365662DEFF8CA /* ECB.swift */; }; - A1E48947F828D226B1FF667AFDD0C23A /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 00A9E16D69CA56EBD70D7C0B65E06FA1 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A301F522108F0A22EFA241EBCC8F5AA6 /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01CD4E7B7266FBC96F1DAE5B4F170F2 /* CTR.swift */; }; - A33313D130AD8E1D44BD46B119D45186 /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EECFB1BF73B6EB0684317B85E2EA08E /* util.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A4342DE847A35E8E98BAAEE729A3FB15 /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 955161BE1368A548FD4EB6DA00435D16 /* UIView+Promise.swift */; }; - A48902823DC75349716A4753B1E660DA /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3C40AC9DDA22566EDFEC3F65AA62472 /* Generics.swift */; }; - A4A59B0BA1E4153A6BF2917EB2C1AF06 /* CryptoSwift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 474420A8AF86D361C202C31C918E6BD3 /* CryptoSwift-iOS-dummy.m */; }; - A4F8D815D07249B30E393C63694BF3D7 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7840B3270C6F5BC3A89FE4E3AE641898 /* Codable.swift */; }; - A67CFB75EC62364579FB9EB448C61786 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15F24BE71856015EE791D78582312743 /* race.swift */; }; - A7799E0318407597777B039DFA8353D2 /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 611BA1395C8C441142D55E0EA236E429 /* scratch_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A7A7567A6AB8900623AC752D617FFC9F /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = C529FA6121A76BCDB8492FD5C6DB5D6D /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A8995C0B368AF79026265F486D640985 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE037589FFCAACA71A323801729DC4A8 /* Primitive Types.swift */; }; - A8FB03192116C7259BDC47B4ED7A1770 /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2503DCCE1598BB4D7E580AB0CB8E807 /* BlockDecryptor.swift */; }; + 670A949462535EF03D2A9B910CEB4E48 /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B00C58B6D526DBDFF8307C6DA1AFDF1 /* secp256k1.swift */; }; + 678ACAE3280725570F9C7FC768578757 /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05760D356B4317540E7373046A1A3CD6 /* Salsa.swift */; }; + 6817327279945D8425268EF14CDDAC21 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78593F1D5D512221956B4CC2A7432B88 /* Primitive Types.swift */; }; + 68536A3B8BA467CBE4D92F13DDB5D5A3 /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D20E70F3D0A72813BC2CD93F028FF1F /* Scrypt.swift */; }; + 6939FF91657C15B585F34286B8D8BF16 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D957F2AECF5A8A0E9C7CCE2A55B6C69 /* hang.swift */; }; + 698DB1FA7FF3234946A86E51AF828F39 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDD33C66C9AA88CB20039B91D106C3BE /* RandomUInt64.swift */; }; + 6AD0531529517B7D53FB216B173CB4D7 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8798FA9542F2175AA660CDB635E6D6BC /* NSNotificationCenter+Promise.swift */; }; + 6B71498DEADD20033325A53D27E6191A /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C805181714272769BB5BCEA4814B1D /* SHA2.swift */; }; + 6B815DB2B9AAED0232FEDEC0184C28F1 /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 11F7F4CE35D426643C8DE5645FF76713 /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6CED57BC415DF0F388D893405FE3DC3A /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B061B14116ABEE15B3CE99517103317 /* UInt8+Extension.swift */; }; + 6D2056001A236820F8015BA4A79E161E /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E89406E7E995881E48051C7EC4C9DCB /* race.m */; }; + 6D4618F519FFEDB9117FC4341C7F3F4A /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = DABE6207D44D964FBF0C1EB8B82F13A5 /* Utils.swift */; }; + 6DBDEE14D217B557CE2EA3D1BE065D64 /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BF5A3B81AA637876B3E5AA4D5F124AA /* scalar_4x64.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6DC3B988093A7855E6880FFE8AE3D3B4 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69B4D5C4EED1973AF5815173AB05729B /* Data+Extension.swift */; }; + 6DEBA1C6CA8D2095A1CCE1A0090E23D5 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 74E396D4A3CBCFA52283FA71BFE1ED4C /* hash.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6E1A1FD632248BF8EA8C08628B1DD44A /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59C55840D303F469F1F31EE4867563E5 /* Generics.swift */; }; + 6F5B521B508C0230EF8488842DE2C905 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8EA9E5ADEC0526C987DC2B55F8E04B5 /* SipHasher.swift */; }; + 70C08283C27C54420E80CCFB8C2CEB18 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69B4D5C4EED1973AF5815173AB05729B /* Data+Extension.swift */; }; + 711CA891836C6E9371B8C5DBEDFD346C /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = EA7E3E2AA7DDB383A58F583E451F6C05 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 717B05FECD48B3ED8481296EF0CCF350 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDD33C66C9AA88CB20039B91D106C3BE /* RandomUInt64.swift */; }; + 723881423457C16AFC563593E5F5B7E1 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F58565031EE07098E585B5C3FCC7442 /* RandomBytesSequence.swift */; }; + 7273616B7461B7AEBC1EECEB88851187 /* scrypt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = CD2614924B987A4DF27727D9ABE96822 /* scrypt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 73240BD69BCC26DFFDF04AA384B93E62 /* secp256k1_swift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 345299796DBEE665766F152916E0A531 /* secp256k1_swift-iOS-dummy.m */; }; + 767EBDFEBC77EC1421A3916FBB13E219 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E3C47D7844F81394427D09B0454A241 /* ResultProtocol.swift */; }; + 76A9DE7C8BC7B646D1A0508BF1A38A22 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83BD9FC5270AA1FFFF0B01504C9B8BB7 /* PKCS7.swift */; }; + 76CD5AD83B4FB7CB8D690BBB0E6BF0CA /* PromiseKit.root-CorePromise-Foundation-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CCFDF41D2D776C88B83F392CB5FD7499 /* PromiseKit.root-CorePromise-Foundation-dummy.m */; }; + 76CE4160292720CFEE6F73DFED4DE333 /* PromiseKit.root-CorePromise-Foundation-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B88EAF15DEC2D3207C78A1C1F11E1B1 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 76E0382DDD9E348354DE5C5F8120D2B8 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D016DA64236C44F87FFCE97A6F0A0E06 /* BlockEncryptor.swift */; }; + 77066675DD2B31CAF9BBE16B8F3B4FE2 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61BA4F5A7AAF223AA3BDA0BF814905AA /* AnyPromise.swift */; }; + 773013B84E21E3867773BCAB6E171CBC /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB1D05E6EF6E5D33F3A993B98DD675 /* Shifts.swift */; }; + 784703A2DB2FA871E907D206577630EC /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A83A5B7F0434C3FACA671C5A20D8389 /* eckey_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 78638EB4FF9E1219EC7E04E8B97EB448 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 627C056A389B2501608E18EFAD762A6B /* CCM.swift */; }; + 78ACD91B0A802FD11D3CB4EC25A78D89 /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = E5253ADE5894EBF14D938D154E2B0227 /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 7A0702EE936C773C38F5E4B7F21AB26C /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B27C53CBFBCBC1E6466F7294EFBEA93 /* Multiplication.swift */; }; + 7AE2FD363C4422762B7BC5E2005F7C2F /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C6A6AAF1849184B1A8916E223E9BCB /* String+FoundationExtension.swift */; }; + 7B5BE028C02660F6A97F1D470C96F05D /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD9ED798FEF891C4A3123685AB25017 /* PKCS7Padding.swift */; }; + 7BD84093A79722210529995051394BC9 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C97CDE8E28215118A8265A78EF509D0 /* num.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 7BFB63A076CB21871132CA1C68FA934B /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA5803AF780ED8A2ABA135BAA03479 /* ECB.swift */; }; + 7C414865BEC16506132F9910DBD62F3B /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0974D06B8BD99ADFA971B50A5A2B38CE /* Division.swift */; }; + 7D9DC2803DA6CE9DE07A6C18AF52AFA7 /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D976FDA3B329F00236A2F1D4C6B378 /* when.swift */; }; + 7DB10EF26A0A2F6768F695BE03C0AB86 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B27C53CBFBCBC1E6466F7294EFBEA93 /* Multiplication.swift */; }; + 7DD60FE1FB24311F3522B19B09E05CBF /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B659053EBDBE68F9EB1137C3AFCC9F8 /* lax_der_parsing.c */; }; + 7F754A09D7EA3165D9758A80F307227E /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = B508E0F1A0F3142EB46882B0104D6F6B /* Floating Point Conversion.swift */; }; + 7FE0C78E1D6CF35FD66403216909410B /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 851772A4A36B2700215C3B972F05BB10 /* BigInt.swift */; }; + 7FE6B8EA18532E50F15E7BF3D013B092 /* SwiftRLP-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BFCF7E8508743BB12B3D3A3C1AFF821 /* SwiftRLP-iOS-dummy.m */; }; + 80D571EE008AE23D0AFAC92B6A98204D /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 0194B6C18C95261082F349271D42FE44 /* lax_der_privatekey_parsing.c */; }; + 82C1C3566A5D5A6395F0CC63E2E63881 /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DFFAA6FC4E6A7DCD0DA8AE064B792DA /* Catchable.swift */; }; + 83C9B6E62BE2665CCF9078D50C66331E /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F009B8B3BE27687063703C35463B71 /* BatchedCollection.swift */; }; + 83CD3302FE915E10B107859386387F32 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 93F2C29FA3412D0329780F52C1DD2931 /* dispatch_promise.m */; }; + 848EFB4F6CDA94AAAD25CCB2283E9EAA /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83C510AD112596C90B76C308A60DF14 /* Integer Conversion.swift */; }; + 84AD91997553D782969A046B9146044A /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32019641A223A260B54A3A6633B0BF19 /* StreamDecryptor.swift */; }; + 857F892AC414752BEECA9829E4EA6322 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = C906CE7510F7153C35950FD44AE3C571 /* Operators.swift */; }; + 8593AEFA684E7B84208518E6FC380FB7 /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED52325262247A4879433CE3D7BA1251 /* Int+Extension.swift */; }; + 85FB5B7FC1D897B946EBAE4BEAC9CE4D /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44BE339EC0BDEB80B98E8D988708993F /* UInt64+Extension.swift */; }; + 8601AFFE38D08BA40B4AED33D04654E4 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 705526D46CF8710526DEFD6A81185AFA /* Strideable.swift */; }; + 862C49A4047D7B32FA8ED4644AAF3DE2 /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32019641A223A260B54A3A6633B0BF19 /* StreamDecryptor.swift */; }; + 8645C073FDA17B6DF8E4AADCE0808C3C /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 660B0734DFD6D8C99EE70FDF836AD891 /* HMAC+Foundation.swift */; }; + 87C8D1C1A44E68BA3761B2915728AA1D /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6176C709F1F11238FCAF958F9A75741 /* ChaCha20+Foundation.swift */; }; + 89AD1BFCA3B307CD78AFB34118AC031D /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16FB18636FBF37732FFEDB58EF77090 /* Addition.swift */; }; + 89B40A1B6B4771D884CC857A62E3E33B /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = AC98E623829FE2C9F71C5C97B66118C8 /* AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 89DAA555D3A3650E7AB8AC4853452716 /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BC6D7199E76698CC662BB48AE0E81 /* scrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8A8FAE273220A2C885FE8C452D175166 /* secp256k1_swift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FDABDA201433FD66D894DAEF0761C26 /* secp256k1_swift-macOS-dummy.m */; }; + 8ADF39D418D2741819C863545BBED5D6 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BE4DB426382B15B10062329955F15CC /* scalar.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8B10C87FE35BA83424ABBA01D0669FF8 /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = E0E2C657091728E6CC4D8093DA13C072 /* group.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8B4AC0EBDAD7A87FF683938E057D5338 /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21CDB590E00AE3873562308E5110A4D8 /* Cryptors.swift */; }; + 8BAF1F91DA55BF8A5E86636E90D92F2F /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 8674CB477181A24AA72377A5EF2E312C /* secp256k1.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8CBF1AE067B860433B0A4BE710FFA9BD /* CryptoSwift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BA4DC9927DEE120B1F101C5D3C546B09 /* CryptoSwift-iOS-dummy.m */; }; + 8CCA031DBFC561C2BDB4295AFFE02DCB /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D86C75595B41479AB364568AB89F857 /* Configuration.swift */; }; + 8CFC200142682965D7D13983526BEC97 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA57B8C185D40985D37E5A9E9CB7B3D6 /* HMAC.swift */; }; + 8D3BA883F8AA3E7565A2AE9D8D533F19 /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A65DC6A2E9BC70E1F5211BFB9E2266E3 /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8DCA7529640903D6984416665D803C1D /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E330212AA4C3537D541AD9C197932C16 /* CBCMAC.swift */; }; + 8EAEFFBCB259C139AE42E4967BFCD638 /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FACAD9F572878C98D14B56672DE004C /* PBKDF2.swift */; }; + 8EBBD4D88DD8F98CEC0791A902D2438C /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A65DC6A2E9BC70E1F5211BFB9E2266E3 /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8EE3016E16955D33E67D3A4B526B80B7 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = F465EA5AEC974D4B2AAFFFC2768A91D7 /* afterlife.swift */; }; + 8FFB71FAC919894CCAD2B296EA300E5B /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A8E64677621D080BA0F099180A4886F7 /* Cimpl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 901FC638FD04ABBF641B1BA5289E58B9 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 02EAAF0A84187F4281AB39EBD7DA1B34 /* after.m */; }; + 906F0233096CF30AA2ADD2032085E9EA /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA57B8C185D40985D37E5A9E9CB7B3D6 /* HMAC.swift */; }; + 907425973F15BD66964D73A783E4FD6A /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = E473E833B6236676C6F4E9274FEE290D /* num_gmp.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 911E85408B3D802D7981B85D7192128F /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F009B8B3BE27687063703C35463B71 /* BatchedCollection.swift */; }; + 93BF74723D8898DC3E8DC67317C1B0EB /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = A90907EC55F455C898F8D8E35C2908DC /* SHA1.swift */; }; + 94C3998EDCB3C4B71B110099E7E3E975 /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 2765A0C6E2BE64A4D0916D30633BEA7E /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 96126C56ABEF426B0B801431F709443B /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = 07BA44CF1EA491F2DE0FFA66AADF2764 /* eckey.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 965128CD152E182D548D25166A7A0ABC /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E4AB7C0ABCF3AEC6B3979EC294536E /* AnyPromise.m */; }; + 987DCF48843E8B83BE9F0B5788175D53 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F60E6D7F6C28A5DF688920FB74829E4 /* CBC.swift */; }; + 98AE081420DDB94A9A72C9DE3CEEDB81 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 28668B0DE54AE4E51942A5F50596975C /* NSNotificationCenter+AnyPromise.m */; }; + 98DF8B5D60DAF3B7AC6B1899CCE12A74 /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = E473E833B6236676C6F4E9274FEE290D /* num_gmp.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 99365E9205AEA46510A70B0092872710 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F58565031EE07098E585B5C3FCC7442 /* RandomBytesSequence.swift */; }; + 9B20EF7C315B4E343F0B79DE78C9E355 /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A8E64677621D080BA0F099180A4886F7 /* Cimpl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9B953A89FD0508E9463F5FE0D9F91D44 /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = CEF60C13887D74275029301DCC6A1149 /* scalar_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9BB2691E8EC04617309A1B905F5A652B /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6D16C3019A7CC7FFDD41C97E69DCB84 /* Rabbit.swift */; }; + 9CDABEBBD7BF0889FF7DD3E739FD6B40 /* scrypt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 05829B47F24F4E5C604129AFF8534C15 /* scrypt-iOS-dummy.m */; }; + 9DAE14B88EE655354CACE65717FA211E /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACBB5EB9CDB6065227935806FA94DC6B /* Hashable.swift */; }; + 9E16CCBD9A220CE68E8B8BCFC9134C59 /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 221F16DEDE441F76365153C8EC2D64E3 /* ecmult.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9E9ABC19900EB9A2F58E05DEDE4C9C6A /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC3D6E08FC4B31786E28A3DD414DE71C /* MD5.swift */; }; + 9EF0841FD75468EF3543A5C6A25A9398 /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D4AFA48362F6E5DF72006F39A5F32A5 /* CTR.swift */; }; + 9EF7B2E48C40E82E7EC0E85F6B0222E8 /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E138D3C3327A0AC400395EA7B85D13A /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9F975F5CF4816CD3A6CA2282F5F4E3F2 /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDD6DAB9ACD231BAA0226331BDE67975 /* BlockMode.swift */; }; + 9FA8CF326DCA266C358B26FC42191498 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93E416B2CCEC4490652DE3889013CC4A /* Blowfish+Foundation.swift */; }; + A1636315A5B3017312CFC781DF83901E /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CF0657C69B458EBD464B4F7EF2A1758 /* AEAD.swift */; }; + A1E48947F828D226B1FF667AFDD0C23A /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = CE82C576F4D863F22181DF0D90DA8533 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A1E8398E1FC2566D94EE4D94B48E909A /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66858822A1651FBD671091155D387A8B /* BlockModeOptions.swift */; }; + A26E92B79121B74FDE94799BF2A92C91 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE9FBA3C3EB5037CAB66A887E9BC6DE /* Array+Foundation.swift */; }; + A2A378FB0E28CFD130DD02F25B9420EF /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276BA53B2960C2B624579741823D9DD2 /* UInt32+Extension.swift */; }; + A33313D130AD8E1D44BD46B119D45186 /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = A094ABEA6C6E0AD5B87D62BB32AEA3DA /* util.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A419E91722005FB59C7DC3BEA7AC0733 /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = C02A5DDAE1965271228C7E856C9987C3 /* PBKDF1.swift */; }; + A4342DE847A35E8E98BAAEE729A3FB15 /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5FF562EECDB0679D662D82F7A5AF6C0 /* UIView+Promise.swift */; }; + A4F8D815D07249B30E393C63694BF3D7 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9727D8BDEB33BD75AB806BC0A3EC155C /* Codable.swift */; }; + A65A2E325268ED551F8A5D89FB7E75FD /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF2520CE6C39BFEF4B6C9B87DA7047AD /* HKDF.swift */; }; + A67CFB75EC62364579FB9EB448C61786 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66D54E1981BA238733A8A5E65484B2B5 /* race.swift */; }; + A72461C8573DCDB8310FA557C3BA1DDA /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AA2EF5FFE50FBD8EAB6BEA39D23C942 /* DigestType.swift */; }; + A7799E0318407597777B039DFA8353D2 /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1BC5C341B16D41330279E713831347D9 /* scratch_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A7A7567A6AB8900623AC752D617FFC9F /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = C5648942F9F59CF9D06030DB7B64423A /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A829DDB57163254C51DF6C9896A1666E /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED52325262247A4879433CE3D7BA1251 /* Int+Extension.swift */; }; + A8995C0B368AF79026265F486D640985 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78593F1D5D512221956B4CC2A7432B88 /* Primitive Types.swift */; }; A906E0A776F4CC1306835A29F687E072 /* Pods-web3swift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 25F72E78DF48560F5D210E57844ACDED /* Pods-web3swift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A927C0600827FF278DA9F985A60002E2 /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = A1EC79FCBA910623842C72C09D10B874 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A93F309C7285ACB8ECAA14903BC85237 /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D8AF6DE4770B6AAF9C6F56D533DB5A3 /* Rabbit.swift */; }; - A940EEBB23376DBCC59DC570DA702353 /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A3998EBD9688668E8B5E865E058BC /* Catchable.swift */; }; - A953ACC3543A00D51383ED73301139A4 /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58F3D9D1A1143135DA2F393DCD07C5C /* String+FoundationExtension.swift */; }; - AA08FA2EB9DB4E98494BFDDE5D4B4936 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = C59B01CF94D3592EF9F0F9D53C69D829 /* Bitwise Ops.swift */; }; - AA40ABA19C4E8BBE370471E77BAFC842 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32B1BF3EB7A67274C92EEEEF1D636696 /* BlockCipher.swift */; }; - AA48D3B3A44CD568D493A0326D60EEAC /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77A1B64DBD371FBCB805A100679F87A8 /* Digest.swift */; }; - AB02DBB24DBB4F98005C0C14C342F8FF /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B9D04508C62F823AFD89A1CA232315E /* Prime Test.swift */; }; - ABFA50427C4CC466CBA9B0E7145D83D2 /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = C518BE2221DCB8E9775CF59E3A6C676C /* ecmult.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AC6D836A8BEBC67FAD48B43B80382794 /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8FBDD9B6C2C480F597AF54E4AF5F9B7 /* Padding.swift */; }; - AC9330E734E319351A6F8440BEFFFA1D /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 110E47A2CC58E6173023BB094B2410E4 /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AD14BE19983A139FDFD89FE6E3E68C3E /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 15F777495520F311DC5F6185975B769C /* secp256k1.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AD2857A3144D7DCCD02D55CE8F6F8AA5 /* secp256k1_swift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7950E62D04D3EBAB00EA5CE1411E5A6C /* secp256k1_swift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - ADA008B926487DB6CF8A658A3F3DF11F /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E8B5D15467ED805F6B33150518D8C10 /* Resolver.swift */; }; - AE8E41C185BA7C46465657E84B66F196 /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AAE07003CED08DD7BCB8AC108A4773B /* Scrypt.swift */; }; - AF373538A9B5EB2BFD84D0DD002478A1 /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 88AC1F107B9BEA598C0726780ECDFE87 /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AF81FA4A9B502AA954430195C09DA953 /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51DF3FC4A067409E953FF230FC67D985 /* Deprecations.swift */; }; - AFDA9E12CC7195153491C8CD1C0AAD8B /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = A46C4FE304316D231AC48D068F15FE99 /* Integer Conversion.swift */; }; - B13079439C3B358C138A64E076E53813 /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A689F9898FAC7D6BEBFC64BDDB5CCD33 /* hash_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B264AC2DFBBC420DEE1695859273E0E6 /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8E5FF3E2A379FE71CD1EEE3BB380DD0 /* CipherModeWorker.swift */; }; - B27AC8F7FCD59B1C8879D64E939D9737 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D007141D6A0D170999FBC71CD9227F3F /* Blowfish+Foundation.swift */; }; - B43A930051FDC74CE6667856407BD5CF /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEA00FFA03F2405A1DD8AAB823BC5CAF /* Exponentiation.swift */; }; - B48C458D1CB67A6B566AEFBADAE6DE8A /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8FBDD9B6C2C480F597AF54E4AF5F9B7 /* Padding.swift */; }; - B48F3BF9283F0C38B048D3B5E6C7549A /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 53097BBB7E450CEA3B67F503C72EE715 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B51D722CE376EDFD7B663D9452E900AB /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033169E66A1FD0955634FCFD42D50FA3 /* PBKDF2.swift */; }; - B534D1DE7C6E7115E6A75EE8BAA4819C /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 315EDC3BC73A24F07AB8D9FB44FEEF7D /* MD5.swift */; }; - B640565E1593B250390597C2651078A4 /* BigInt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 97B24FD834901CF3D36423F68C485701 /* BigInt-macOS-dummy.m */; }; + A91379A538F389B10BAB2CE9D406BDCE /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FC6C3CA2D135767617F5F276FF395CC /* CompactMap.swift */; }; + A927C0600827FF278DA9F985A60002E2 /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C71245535F05C90A42683076576BB26 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A940EEBB23376DBCC59DC570DA702353 /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DFFAA6FC4E6A7DCD0DA8AE064B792DA /* Catchable.swift */; }; + AA08FA2EB9DB4E98494BFDDE5D4B4936 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = 161C2D9657DC967FFAC2A37D48134D76 /* Bitwise Ops.swift */; }; + AA4AE37CE61DB029CDA7A78DF0E65A30 /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC3D6E08FC4B31786E28A3DD414DE71C /* MD5.swift */; }; + AB02DBB24DBB4F98005C0C14C342F8FF /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = F31913059D849B57CB91C3B18F4D92EB /* Prime Test.swift */; }; + AB9E1F4EDDB1BFD7F4359B0E1AEF9C78 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEB151B14FA1CAF4FB16D76AE7F505AC /* Cipher.swift */; }; + ABFA50427C4CC466CBA9B0E7145D83D2 /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 221F16DEDE441F76365153C8EC2D64E3 /* ecmult.h */; settings = {ATTRIBUTES = (Project, ); }; }; + AC9330E734E319351A6F8440BEFFFA1D /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 433536C0066CD933A793F8B42877435F /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + AD14BE19983A139FDFD89FE6E3E68C3E /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 8674CB477181A24AA72377A5EF2E312C /* secp256k1.h */; settings = {ATTRIBUTES = (Project, ); }; }; + AD2857A3144D7DCCD02D55CE8F6F8AA5 /* secp256k1_swift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EC9440034E7256986111FBC505567C26 /* secp256k1_swift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + ADA008B926487DB6CF8A658A3F3DF11F /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 092DD25F9A8FD52F554B41FA11289B4C /* Resolver.swift */; }; + ADE49554E5BC26D0FC3CB250EC153F83 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D67B21BD5ECE586715CDCB8EF9F84E24 /* SecureBytes.swift */; }; + AE8E41C185BA7C46465657E84B66F196 /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D20E70F3D0A72813BC2CD93F028FF1F /* Scrypt.swift */; }; + AEF51F69F68DDFB4BD984ACD87DA0517 /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB95DBC141DB412EAF90DE75B00EE345 /* CMAC.swift */; }; + AF373538A9B5EB2BFD84D0DD002478A1 /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = E5253ADE5894EBF14D938D154E2B0227 /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + AF81FA4A9B502AA954430195C09DA953 /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63D47A1599387D37CCA850DB9256283A /* Deprecations.swift */; }; + AFDA9E12CC7195153491C8CD1C0AAD8B /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83C510AD112596C90B76C308A60DF14 /* Integer Conversion.swift */; }; + AFEBE1E855779D74D26F05919F5001AA /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD971533936CC3705E267598BF53A93 /* UInt128.swift */; }; + AFF838D30AE798EA2B0FE11A1ED0729E /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = C02A5DDAE1965271228C7E856C9987C3 /* PBKDF1.swift */; }; + B075220C6A1ACDF3E6ECA9447125C827 /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03938C581D805E7DEA7EF7935F6B4E61 /* Cryptor.swift */; }; + B13079439C3B358C138A64E076E53813 /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A5666EAA8ADD7A2AA3ED33C8DC6028 /* hash_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B1CE9BDAFCAEDA7D99F7545490D1D518 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B2EDCF2255BD0D829F03B0C1BD0A060 /* String+Extension.swift */; }; + B43A930051FDC74CE6667856407BD5CF /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0B695B584A94039305F17CD2B5470FB /* Exponentiation.swift */; }; + B48F3BF9283F0C38B048D3B5E6C7549A /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3ADB1AB7700B235D79CA3AEB2E8540 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B52E20B7BAF9DFF4ACF992979FAA904D /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B061B14116ABEE15B3CE99517103317 /* UInt8+Extension.swift */; }; + B640565E1593B250390597C2651078A4 /* BigInt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 555457AF50F888167C28CEA34B14AAE1 /* BigInt-macOS-dummy.m */; }; B6699C206D4772B76BEAF1722CB04572 /* Pods-web3swift-macOS_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 522015696E45158812DD4C5CF37CD544 /* Pods-web3swift-macOS_Tests-dummy.m */; }; - B6866CBCA4D62537DE060369ACB1B106 /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 69DAF4AC1AD4ABE697F2A9B28B2742A9 /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B69E3F26EF82B14F2BBFCC991285A2FD /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = B206B730E077834821DED823382B92DD /* secp256k1.swift */; }; - B77646BAD0129256BF653BDE0C25222B /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = 36E46262C102F8CBB9AC5809B82A532D /* scalar_4x64.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B892841BE90F7FC437B124E45EFA91BC /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3714BDD6BC325B4A3AA0AEB00B7E0838 /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B9058EEEDD24D3D6D7F1F9014827C9CF /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90782E90E35201E901B4ABD31E7E1C /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B99E4D246BF638E9C0E6DB9216909970 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62DAA30A02BECECD3B564F1546CE3343 /* Process+Promise.swift */; }; - BA33E96D5FF50CFFA5727208AC91DF2B /* SipHash-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7FED111DB9B19BEB67F1E97D34E65AC8 /* SipHash-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BA4F48649886FB0011F6E7F3FBB8C2BB /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = C529FA6121A76BCDB8492FD5C6DB5D6D /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BB18112CCFC26264B7C0E90AE3432518 /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = FF99AA927653D804503A7BA37208076D /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BC1D796F17348CDBE4C46583B92D14C0 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = 10063C7AE612FA73E113299D752D2F9A /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BC710D04EBD70B49A46F4B862BAAB0FF /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DF6BC857A451DB590136C2127E8540C /* SwiftRLP.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BDCD56C5B86F8512F7AB9AB6F5B15475 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 592D721B3C087135B76612BE7D7B3701 /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BE0E1C30E47FC6E0A931819265DF6F30 /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C26BABFAE3BF83287E05135793873F6 /* scalar_8x32.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BE2237E0E9E26533C1E860FD41CF5FB9 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56831D861C9C68AB6445D1B373489CCD /* Box.swift */; }; - BEDC52E4027F817E284B2DD842BFB332 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 213FB9632182CBF9A72A027B86282B5C /* NSURLSession+Promise.swift */; }; - BF9C1C12AD3560167B0800059B4A6D6E /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0046FAD665E019D5EFFFDFC7C04F79EE /* Poly1305.swift */; }; - C0101FD19738FB97383D1C0CF5EEBF77 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 648DE2BEBFB01CEB5B721BA04955EAF1 /* String Conversion.swift */; }; - C0819490E2F049CC22EF3585F49C3F3A /* SwiftRLP-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A7E72167B9780D5627571A312AE1B751 /* SwiftRLP-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C0F8B164DDA6157937A300C207D56E4E /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98D3DA59A50F70D87A13DF72C6E649E1 /* Subtraction.swift */; }; - C1693DEA3241820346B6392F419BE86A /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 292B7230F9D2EF13745202AD62870DFF /* PKCS7.swift */; }; - C19EF72107053AFDFBC57E47EB8050C9 /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 42E8817F1CAA2069A5B0A1A0D0ABA398 /* scrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C3054C3388C651BBCCC0D4D6D37F7584 /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = E13B83B6C950F75854459F690EF3A6ED /* firstly.swift */; }; - C35DA33EC52454F06E06F298C92250B8 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE7FF1850E0AF1A3C0492541BEFE030 /* hang.m */; }; - C420F74F411178FB20F79B022567A36F /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D7A0114EB8569F1C403A6574C016E8 /* Checksum.swift */; }; - C45AB3CBDC8E80549A5258F1EF33B5E4 /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73E1C923DAF11E64DD39A52C483CBBB0 /* UInt128.swift */; }; - C484B1DBDD48E7821272E79EACF8B2B5 /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C03433156B044F013B91599EE579C7D /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C4D7369A6EE4185C3499B0C7F6D4AF54 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 246EC9B3E3D924F7496163E4D7D5574B /* Cipher.swift */; }; - C51722B04CA405219A395C65558614F4 /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3714BDD6BC325B4A3AA0AEB00B7E0838 /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C52AB1611C5012541EB9B2D6F3E7113C /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67946900D6375AEDFA1C113E2A5B2794 /* Cryptors.swift */; }; - C55D7F3112EA0AE1C16D64D5D93FB8E2 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E9C4AE3C0574C05D13445561BFB8C1B /* BlockEncryptor.swift */; }; - C5B7FB9E96E537586482FA629C14406F /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A689F9898FAC7D6BEBFC64BDDB5CCD33 /* hash_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C5C8E105D6B79B679C2C88E2615EAC66 /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 513D1D85D34F76B7E4DAE1B37103BC5A /* UInt32+Extension.swift */; }; - C66FC8C1B1997579D636D39C9BF09BD5 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DB7550812E8FC8658862B062E0A8D6C /* hang.swift */; }; - CA5BBB4A81D6C18A87B54AD3E3CB1DDD /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B9A712542DB104270D877BBE57746F /* Cryptor.swift */; }; - CAB0A085900165D03D871E0ECA7CA215 /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = D459A9A71D9584F44D50CCE76CA32DE1 /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CAB604DC70B6DAD2C4FE1DED7CC67135 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CA875E3478CF42FACB3165CBFAE86BD /* Thenable.swift */; }; - CB23D304433CF4415E534890D75DD1F3 /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4723853D29831D8D4EC86E13EF15FDA /* CMAC.swift */; }; - CB8ABF5FDE083E23F3C8AA384A4D55C3 /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99490114EDAF958B866019F3B4C71077 /* ZeroPadding.swift */; }; - CBAB02308405D4C1CB4271EC4AB971F6 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C015DFFE7F497B97D0DA1C8C7AB69E /* Words and Bits.swift */; }; - CC53CC49FDD4748924F21B50E485DBBD /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58F3D9D1A1143135DA2F393DCD07C5C /* String+FoundationExtension.swift */; }; - CCCBD4698FC15086152F56B19ECA7A8D /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = E39980D5A8BD94928885C59ED6F3555D /* PromiseKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CD4F83E8BF753B40698A55CA22BB0CF1 /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C665B9B4606D9A35F9DFFB15EEB9F10 /* AnyPromise.m */; }; - CD85BECD50309913F23174338AF0667C /* secp256k1_swift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = ABA1CC6FBDF71FC02EE62B784C52CD45 /* secp256k1_swift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CDAF5D27B2605E4DA359618DCDF5618B /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 88F32E8C457272E137BB38662B42445E /* field_10x26.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CE2BCA099CEA37688059295108D416AD /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02BE2C0884A4C644A5B276E1781D2DCA /* Random.swift */; }; - D03604350C4AD6E462633ACEF03DE182 /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68457844D0369DF25FAC63A7E42F3A5C /* BlockMode.swift */; }; - D0B384B3B9706105721D5A04485597A9 /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20BCC1D2F3127FBBB88BCCD1BCD6C558 /* PKCS5.swift */; }; - D1F0182968E66E044F80A9822BE772F0 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C1DB7075FC89AABC9027B89E410DD0 /* Hashable.swift */; }; - D32712369A0978E2F272F6ED44E13D09 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 292B7230F9D2EF13745202AD62870DFF /* PKCS7.swift */; }; - D4124EDD949269E344DC2B3A307C708E /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AE60B95D9DA9615B03EE888C7F908 /* secp256k1.c */; }; - D4FBEF46E2616F942B65FF779B374513 /* BigInt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E2064AA263189FCD4D283C9618B597A /* BigInt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D51658C88F64814325AFD7E26FF01C58 /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033169E66A1FD0955634FCFD42D50FA3 /* PBKDF2.swift */; }; - D55038AE9BE8F3B75F916E492CC29A60 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = C5660E081BC2DA61D02571E01B81C8FE /* scalar.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D5886DBA5DB05624B7B1DFFD6A99A87D /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = E1B2A6CA027F0CF17E40FED49D6A5E70 /* ecmult_const.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D5B55C94D365080FC8CBE5B01BEDA5CE /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A3899E2022CB3FA28CFCB82D4B6CA80 /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D64DA518A10935882F67A35F4EC1E0BD /* SwiftRLP-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 477087D23BFCDB50922E829E500EC396 /* SwiftRLP-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D6BDAA0C8CA8843CE436AA3573C378F9 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B4944DF61F05FF099C70B6640B4431D /* Square Root.swift */; }; - D747179D4F9BC0D43E3C479EBA4B07D0 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DE637C08FD6A423A48096E7D58B1610 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D77D59D158D2FBA4B6AA53805363DB1E /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75724C7E4D6EB3792635A031AD2B1492 /* UInt64+Extension.swift */; }; - D81D753CE65D4B1E0F26F57606BD0F6C /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = C59B01CF94D3592EF9F0F9D53C69D829 /* Bitwise Ops.swift */; }; - D8AEF9279CF6C8CD2D5F716BFAEAC80A /* UIViewPropertyAnimator+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5BEE6336571D98DA94C9A54C8CE9623 /* UIViewPropertyAnimator+Promise.swift */; }; - D94FB219CAD3190A91BCEADD16209ED7 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15F24BE71856015EE791D78582312743 /* race.swift */; }; - D96D172BB1AA748152BA2F82BC6A6B2D /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335A62646C32DC8B2185FA6DD3030CA6 /* when.swift */; }; - D9B3D20980002DAFC3783F7A6B1C91BA /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88EC012A11A5D51BC077A26441D4957B /* NoPadding.swift */; }; - D9CA2110C1387E483376CF056337233E /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B2BE4EB401907B31121C20D9AE85D04 /* scalar_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D9D190B6E0F591841C1B0AC1B8D0C34A /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 52AF65D13B97A0EAA5CC2F9AF6450786 /* NSNotificationCenter+AnyPromise.m */; }; - DD419D08F1AEE92AC819A14720ECD62C /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3C40AC9DDA22566EDFEC3F65AA62472 /* Generics.swift */; }; - DDBF456D98778034F94E7A216E782CBB /* scrypt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AEC7A24CF8E56E0AB30884A90747F2B2 /* scrypt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DE187779397F69A993589FE1F1590714 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = B78A9314F721CE7FE8EE68290ACF962A /* Result.swift */; }; - DE78C90A1789CD75B4B69224EE1C20E1 /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 611BA1395C8C441142D55E0EA236E429 /* scratch_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DF3B173C9C0BFFBAF20FE89888175135 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA753F9B4F076BBCCE353572BDBA6EAE /* CustomStringConvertible.swift */; }; - DF3C881F6AA58663EA27A37DDC93CBD1 /* SipHash-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 31D7B79B518E67916F0205F505B0485D /* SipHash-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E007271BF4C4F9B9D464193F85793C50 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13F4C1E92ACB15583B361380492AA797 /* AES.swift */; }; - E1BD1671D6E0A0FDAC9298373486DA9F /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B4944DF61F05FF099C70B6640B4431D /* Square Root.swift */; }; - E24619AC5BEB6C6F40A086FBC713953F /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9197F30F9D372148520156A011421FE9 /* HMAC.swift */; }; - E254A91C69969B33ED1BF9BDE5B19AED /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C98E405B0267998743280361FC7A320B /* Data Conversion.swift */; }; - E48FE65994D2FDB3496020B0AED10062 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4D6786B6A1F1F3D12539CE8845D610B /* Data+Extension.swift */; }; - E496E4A9940D9E53F87FC94F6FBA613F /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4D6786B6A1F1F3D12539CE8845D610B /* Data+Extension.swift */; }; - E592964873DBC39C36DCEDFC2270519A /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = C5ACF2BE50EB881C466468619A626459 /* num_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E70A831423370AD1CF91BAC1373D3527 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA753F9B4F076BBCCE353572BDBA6EAE /* CustomStringConvertible.swift */; }; - E85B97EE8946089E5E8ED93B60847B7A /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = C5ACF2BE50EB881C466468619A626459 /* num_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E8A145AFD00468A4C9549E156F7A4327 /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D8AF6DE4770B6AAF9C6F56D533DB5A3 /* Rabbit.swift */; }; - E9E664FD3415EAFF7CDFFD33254902E3 /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584C7F09DDD45569AE8365662DEFF8CA /* ECB.swift */; }; - EA1A3BB85FC5453DEA5AE302324D4DAA /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 629A9B1DDCCA7AF069A948D996B8B34C /* Authenticator.swift */; }; - EA3B78E39182A056E17833E10C5DE2E6 /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CF4E411893D167B17A83AB51C8D53D /* ChaCha20+Foundation.swift */; }; - EB5C9979901C255CD26AAD9C2908FC4D /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 638EF15CE0F571BA9C2C5868DA40EBBE /* RandomBytesSequence.swift */; }; - EBC1181767AADF30189982641F9B9648 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B9D04508C62F823AFD89A1CA232315E /* Prime Test.swift */; }; - EC308ACB0BA1C145CC005AA4186B9EB0 /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D1A84D8AEFDC828575F732E2005CA5B /* AEADChaCha20Poly1305.swift */; }; - ECDEF2626BC123966104C5F0B4830936 /* CryptoSwift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 97E0EFD2C6E09D9A91E0B22FB199CF95 /* CryptoSwift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EE0C5BE970F77B1A1478E64F164DDB99 /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59163772C1016907FD12D819A604B18B /* Rabbit+Foundation.swift */; }; - EE3D4BE0F36CB8F41C228439719EEAC4 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ED8894D488852DD8E6F75780785F814 /* NSObject+Promise.swift */; }; - EE9FCCABEB83682D166392D1C12D2BF3 /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C26BABFAE3BF83287E05135793873F6 /* scalar_8x32.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EF56A1A9A97666C4D03AA9AAF5A37918 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10AB7CE8E7FA7C93448EFE94CFEE2C62 /* Strideable.swift */; }; - EF7CEA7D43C041C92F385757253FB874 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = A84CAC1E9ED891BB925E32AD866EF4F8 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EFDC04F64EB4766D33AC8058E12B4561 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E8AD7E4D46EAFE301BAE49458CBADF /* GCD.swift */; }; - F0C24231ACA39257DFE5A318ACC8A896 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = 9ABF1DE4DC6AE445BD89E628E2CF5E94 /* num.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F1713A581AF450456EAEC87DE47CDA88 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06F1FB18FDF42877A101BED0A4736B68 /* Array+Extension.swift */; }; - F185E763BAC53270CAE635AB9CBADB37 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D757EF89803E12ABE5A6DC9D35431A5 /* ecmult_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B6866CBCA4D62537DE060369ACB1B106 /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 2707FB70F6217313CE3FE9D9B5606CDB /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B69E3F26EF82B14F2BBFCC991285A2FD /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B00C58B6D526DBDFF8307C6DA1AFDF1 /* secp256k1.swift */; }; + B716300FB849152C5C4C3DC9C14C8E8D /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55FA26B75C99F4847087C9104EE38E8F /* Authenticator.swift */; }; + B77646BAD0129256BF653BDE0C25222B /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BF5A3B81AA637876B3E5AA4D5F124AA /* scalar_4x64.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B892841BE90F7FC437B124E45EFA91BC /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 89276AC70A47E00E5E08DB5C8D91C6C4 /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B9058EEEDD24D3D6D7F1F9014827C9CF /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0923A9FA118D244659624C1F0BD11796 /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B99E4D246BF638E9C0E6DB9216909970 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 937DFD5ACC6B392C3B22DD0605410F52 /* Process+Promise.swift */; }; + BA33E96D5FF50CFFA5727208AC91DF2B /* SipHash-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C59784B76CA65D06F275EBA259540AC /* SipHash-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BA4F48649886FB0011F6E7F3FBB8C2BB /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = C5648942F9F59CF9D06030DB7B64423A /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BAD670F268A8F2AB9BB2BD41BA18BEFA /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EA534EDF19829F1927C7991BF2EEC2F /* Padding.swift */; }; + BB18112CCFC26264B7C0E90AE3432518 /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = AF7AF6D769E4BBF1B2C201836A906130 /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BB71E3B83F7833D6D6D7FDEAEA0BD96B /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC85A555F579FA10EC96590296D9288 /* CipherModeWorker.swift */; }; + BC1D796F17348CDBE4C46583B92D14C0 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = BE6305D1DE9131CFB173AC969FDB1092 /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BC710D04EBD70B49A46F4B862BAAB0FF /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = F5740FDA157E822449AD928A2FC56532 /* SwiftRLP.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BDCD56C5B86F8512F7AB9AB6F5B15475 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C7D493F1212B046A7AAFC8351D67E4D /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BE0E1C30E47FC6E0A931819265DF6F30 /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = B7CB9A9AD1846703E487266D4F3BCCBB /* scalar_8x32.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BE2237E0E9E26533C1E860FD41CF5FB9 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79370D5C826074DD91DB303B75EACE7D /* Box.swift */; }; + BEDC52E4027F817E284B2DD842BFB332 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39B4575A57EFE3A0630FA12FAE346202 /* NSURLSession+Promise.swift */; }; + C003185B61E62CF4BD4690EDBD0719A3 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93E416B2CCEC4490652DE3889013CC4A /* Blowfish+Foundation.swift */; }; + C0101FD19738FB97383D1C0CF5EEBF77 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07BD7441D03BCED026093ADE867666D4 /* String Conversion.swift */; }; + C0819490E2F049CC22EF3585F49C3F3A /* SwiftRLP-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = BA5CA30AC50EF9F974BA8C9CA66250F4 /* SwiftRLP-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C0951D3A5CDA6E27EDC2A65A700C8D8D /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21CDB590E00AE3873562308E5110A4D8 /* Cryptors.swift */; }; + C0F8B164DDA6157937A300C207D56E4E /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = E684DB7BA3E633421079ECE297E5C154 /* Subtraction.swift */; }; + C19EF72107053AFDFBC57E47EB8050C9 /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BC6D7199E76698CC662BB48AE0E81 /* scrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C3054C3388C651BBCCC0D4D6D37F7584 /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = C33EA4F090C90D1AE636D3B40ECFA945 /* firstly.swift */; }; + C35DA33EC52454F06E06F298C92250B8 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = CEDD84C820765F4B8C5826D1B122200E /* hang.m */; }; + C484B1DBDD48E7821272E79EACF8B2B5 /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 2765A0C6E2BE64A4D0916D30633BEA7E /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C510E3B26A4F4876F89A59D5D2F22006 /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57D914B6D4F8590AF8E3BA6863DB778B /* Collection+Extension.swift */; }; + C51722B04CA405219A395C65558614F4 /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 89276AC70A47E00E5E08DB5C8D91C6C4 /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C5B7FB9E96E537586482FA629C14406F /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A5666EAA8ADD7A2AA3ED33C8DC6028 /* hash_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C66FC8C1B1997579D636D39C9BF09BD5 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D957F2AECF5A8A0E9C7CCE2A55B6C69 /* hang.swift */; }; + C6896E99AC63CF7E9506A6E8CA124CD5 /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D97871DE06423066D52CDBE28B74B3B /* PKCS5.swift */; }; + C70A86EC15752B0731CD015CEF45CAAF /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FACAD9F572878C98D14B56672DE004C /* PBKDF2.swift */; }; + C83FF7FC178BF33DD5052001F05A83BF /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61A90B8C29D973CF2BEE2A33224ACBEF /* Updatable.swift */; }; + C969C4CB640BF795B01F3648075A446D /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 551CAAEDDC5AAACAA24E8A5A86721E97 /* Bit.swift */; }; + CAB0A085900165D03D871E0ECA7CA215 /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 11F7F4CE35D426643C8DE5645FF76713 /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + CAB604DC70B6DAD2C4FE1DED7CC67135 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D111E53D728978DA7C689AD4AFDCA963 /* Thenable.swift */; }; + CAF3800A1D4B45C61035F3A330991F20 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55FA26B75C99F4847087C9104EE38E8F /* Authenticator.swift */; }; + CBAB02308405D4C1CB4271EC4AB971F6 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FE4AFACA87A9BC9B7F46A7AAD878E33 /* Words and Bits.swift */; }; + CC44CC395434DAA9F2F7DA1D8E1C341A /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEC2C04096B2D2B92821B75319989EC8 /* StreamEncryptor.swift */; }; + CCCBD4698FC15086152F56B19ECA7A8D /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = C533250E0867F5CF90717B90B4450C63 /* PromiseKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; + CD1400BD40761FCBE46B17F6B8AA0AE9 /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 660B0734DFD6D8C99EE70FDF836AD891 /* HMAC+Foundation.swift */; }; + CD4F83E8BF753B40698A55CA22BB0CF1 /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E4AB7C0ABCF3AEC6B3979EC294536E /* AnyPromise.m */; }; + CD85BECD50309913F23174338AF0667C /* secp256k1_swift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D11A10393AAAF35194650B10A6ADE234 /* secp256k1_swift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + CDAF5D27B2605E4DA359618DCDF5618B /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 44131C334B408CABBB3E84FE9BEDD5BE /* field_10x26.h */; settings = {ATTRIBUTES = (Project, ); }; }; + CE2BCA099CEA37688059295108D416AD /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC03B1A635B5BB3ABD74980E5A3FFCF1 /* Random.swift */; }; + D1F0182968E66E044F80A9822BE772F0 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACBB5EB9CDB6065227935806FA94DC6B /* Hashable.swift */; }; + D29E48A6FDC719FD2FF024625C37CA22 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 699D800F72CE09977D6EE1687D706BD6 /* BlockCipher.swift */; }; + D2C9540655CD82F8A12305D2B953BD71 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 365AB600024749D54E0AD6D59FC28749 /* NoPadding.swift */; }; + D4124EDD949269E344DC2B3A307C708E /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = B184A67AF0236537BEE898D90E946942 /* secp256k1.c */; }; + D4C0E6966E5FED70544A97ACC237CF3A /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0439A7FDEC4F611C9334DEC15FA25F1B /* Digest.swift */; }; + D4FBEF46E2616F942B65FF779B374513 /* BigInt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CBD2032E8E6117EFD2C15AC9E728128 /* BigInt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D55038AE9BE8F3B75F916E492CC29A60 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BE4DB426382B15B10062329955F15CC /* scalar.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D57E19C3E86448FD0CA3B9742DB49497 /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEC2C04096B2D2B92821B75319989EC8 /* StreamEncryptor.swift */; }; + D5886DBA5DB05624B7B1DFFD6A99A87D /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = A3D2730C3BE7868E162AB4F297A3A7DE /* ecmult_const.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D5B55C94D365080FC8CBE5B01BEDA5CE /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = FF238B78A8B1951C382DC7D8C0DA9412 /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D64DA518A10935882F67A35F4EC1E0BD /* SwiftRLP-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 07A9C5839E7875E75F4AF91C0C630CB2 /* SwiftRLP-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D6BDAA0C8CA8843CE436AA3573C378F9 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91EFA6BFEDFE86C5744B8A08BD45CC1D /* Square Root.swift */; }; + D747179D4F9BC0D43E3C479EBA4B07D0 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E959F3AA4E4F1850C7F42B923C77DDB /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D7875CD7BA041CED180D37E0448C09A8 /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4434E5B7050EF71B04AEAE88F303455 /* Blowfish.swift */; }; + D7AA60A9860ED2E7DD7440AC9D799A04 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 365AB600024749D54E0AD6D59FC28749 /* NoPadding.swift */; }; + D81D753CE65D4B1E0F26F57606BD0F6C /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = 161C2D9657DC967FFAC2A37D48134D76 /* Bitwise Ops.swift */; }; + D8AEF9279CF6C8CD2D5F716BFAEAC80A /* UIViewPropertyAnimator+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08220EE2495D2C17B6366EFD53B51AC3 /* UIViewPropertyAnimator+Promise.swift */; }; + D94FB219CAD3190A91BCEADD16209ED7 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66D54E1981BA238733A8A5E65484B2B5 /* race.swift */; }; + D96D172BB1AA748152BA2F82BC6A6B2D /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D976FDA3B329F00236A2F1D4C6B378 /* when.swift */; }; + D9CA2110C1387E483376CF056337233E /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = CEF60C13887D74275029301DCC6A1149 /* scalar_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D9D190B6E0F591841C1B0AC1B8D0C34A /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 28668B0DE54AE4E51942A5F50596975C /* NSNotificationCenter+AnyPromise.m */; }; + DA1588018CD8315CFCBB2E0806B753E5 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE9FBA3C3EB5037CAB66A887E9BC6DE /* Array+Foundation.swift */; }; + DA1E098DCF3DEE1C5D699424486C1D64 /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9E4625A0B76DCA266EA9671890C8721 /* SHA3.swift */; }; + DAA014164E03E57A7D043C270B6C9B84 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83BD9FC5270AA1FFFF0B01504C9B8BB7 /* PKCS7.swift */; }; + DD7EF0CDE3C0223DD3933632CDB2AB01 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7530E3D35773A67134FC4EA93063F01 /* Utils+Foundation.swift */; }; + DDBF456D98778034F94E7A216E782CBB /* scrypt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3992689C4E8FC6AE9958D04582793809 /* scrypt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DE187779397F69A993589FE1F1590714 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61F02670BA786ECE5640E0C70EA68888 /* Result.swift */; }; + DE78C90A1789CD75B4B69224EE1C20E1 /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1BC5C341B16D41330279E713831347D9 /* scratch_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DE86F4DBFBAE2D9EADB44907B3B7FC1D /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9E4625A0B76DCA266EA9671890C8721 /* SHA3.swift */; }; + DED6A3731F280B7A5C4BA0088245421D /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C6A6AAF1849184B1A8916E223E9BCB /* String+FoundationExtension.swift */; }; + DF3B173C9C0BFFBAF20FE89888175135 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6246D2591B9DFE5339771AC0AF2EA3CA /* CustomStringConvertible.swift */; }; + DF3C881F6AA58663EA27A37DDC93CBD1 /* SipHash-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 099CBD52589F67F91C4263550552B849 /* SipHash-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E15BFF7A7883A5BFB699464499718E52 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D016DA64236C44F87FFCE97A6F0A0E06 /* BlockEncryptor.swift */; }; + E1BD1671D6E0A0FDAC9298373486DA9F /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91EFA6BFEDFE86C5744B8A08BD45CC1D /* Square Root.swift */; }; + E254A91C69969B33ED1BF9BDE5B19AED /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE57BC224E219C65382BB751CCED649D /* Data Conversion.swift */; }; + E350B1B350751D65ED5A630756C5DDAF /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA5803AF780ED8A2ABA135BAA03479 /* ECB.swift */; }; + E38ACED69C24647A7A07B2B72C7580BD /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC3E9B80B8AC54146B2DFEDA0142CAF /* BlockDecryptor.swift */; }; + E4FB02298751B056940AB39261020DAB /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D4AFA48362F6E5DF72006F39A5F32A5 /* CTR.swift */; }; + E592964873DBC39C36DCEDFC2270519A /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 970421396A3184DB620CB61E8AE71F58 /* num_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E6950B7C92641175616A7FE09FA2574F /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED58AECF3C5444FBDEB7453CDD6D6A96 /* Checksum.swift */; }; + E70A831423370AD1CF91BAC1373D3527 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6246D2591B9DFE5339771AC0AF2EA3CA /* CustomStringConvertible.swift */; }; + E85B97EE8946089E5E8ED93B60847B7A /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 970421396A3184DB620CB61E8AE71F58 /* num_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E96D904E355EFA92932B4B71E59472E4 /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDD6DAB9ACD231BAA0226331BDE67975 /* BlockMode.swift */; }; + EB52C8F7723FCC94649C4768B67E2E3A /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = A90907EC55F455C898F8D8E35C2908DC /* SHA1.swift */; }; + EB9345AB32E8C1BCE5C88C239CFAF2B9 /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CF0657C69B458EBD464B4F7EF2A1758 /* AEAD.swift */; }; + EBC1181767AADF30189982641F9B9648 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = F31913059D849B57CB91C3B18F4D92EB /* Prime Test.swift */; }; + EBD3735323AB89C906B5E1C536976080 /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC3E9B80B8AC54146B2DFEDA0142CAF /* BlockDecryptor.swift */; }; + EDEB77EE161E91BE126DB5BECD0D2F88 /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = A130AE149844CDF96BEAFC7381997641 /* AES.Cryptors.swift */; }; + EE3D4BE0F36CB8F41C228439719EEAC4 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4211F7070401959F35EE92C5214007C /* NSObject+Promise.swift */; }; + EE9FCCABEB83682D166392D1C12D2BF3 /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = B7CB9A9AD1846703E487266D4F3BCCBB /* scalar_8x32.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EF2912DE621D3B57FB6A277CBF39B316 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E27EDB736A99A27C20F82D22DC4A707 /* GCM.swift */; }; + EF56A1A9A97666C4D03AA9AAF5A37918 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 705526D46CF8710526DEFD6A81185AFA /* Strideable.swift */; }; + EF7CEA7D43C041C92F385757253FB874 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = E9584FC30610F2691B4EB045534020D8 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EFDC04F64EB4766D33AC8058E12B4561 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 167A6E691DFD15BA9883036B14F41D03 /* GCD.swift */; }; + F0C24231ACA39257DFE5A318ACC8A896 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C97CDE8E28215118A8265A78EF509D0 /* num.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F185E763BAC53270CAE635AB9CBADB37 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A19805DB694C14E29F255EA2BB4603A5 /* ecmult_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F1DD83612B8154D1465CF398FCFA9596 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 627C056A389B2501608E18EFAD762A6B /* CCM.swift */; }; F2242C49CF793215836DA2FE29E8C1E1 /* Pods-web3swift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F688145BCFE1FB8B76299CC261A05E /* Pods-web3swift-iOS-dummy.m */; }; - F226D03CEEB4CA12BF0D0F974840420A /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = BBB1686A6F8A3ECF8119E0B9026493AA /* scalar_low.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F238EF032BC5A70219603EA97FF3FED8 /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01CD4E7B7266FBC96F1DAE5B4F170F2 /* CTR.swift */; }; - F2CEA0F86BECA15D8730D3D53D9EAF69 /* SipHash-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 98208639AD618314C999FC207B7FBA89 /* SipHash-iOS-dummy.m */; }; - F31F62CD0FEA355203A5C5750FC421F7 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63A1F06664FED90C2B7F7989990F9EE3 /* NSTask+AnyPromise.m */; }; - F390BEDEFDEF3DDC2172C32543EDE40B /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 156AC0832786D6E41B095D6E8DD29AC8 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F3A6143F497A16DA1DE0AAC5CD02AA57 /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DA63B5CD137C32932CDB5DB0C7A036C /* Guarantee.swift */; }; - F5AB8AD08E9E0AD8237FC486B02D3AE9 /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC74A6C891271F3176D0A8781C35C2D0 /* Int+Extension.swift */; }; - F6C04F880164DA1647FDF6654CD65CBE /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7840B3270C6F5BC3A89FE4E3AE641898 /* Codable.swift */; }; - F6D5E2F0DFF915694A71C76154312B42 /* PMKUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66515F5856AA8BFE5FEC1F9BF271A5A2 /* PMKUIKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F6EEBE907D9BF3B0332ED86D67236441 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38253CDBFF833980FA0956A34E1BF0C7 /* BigInt.swift */; }; - F7637401A66A3768E3AFB4725B5A68CE /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20BCC1D2F3127FBBB88BCCD1BCD6C558 /* PKCS5.swift */; }; - F76CD6A74599B946F2BEB2CFD466DCF8 /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE18F632CE594C2E2CCA9A0490532CB3 /* StreamEncryptor.swift */; }; - F854EACBF11549213B26B4748FBB94A0 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98D3DA59A50F70D87A13DF72C6E649E1 /* Subtraction.swift */; }; - F98604F0CA9C69371A5FE5D65C6E5466 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = E25079B9D829E2FA59A02142ACC823BA /* UIView+AnyPromise.m */; }; - F9A83224C63AF5F18AED311461D71668 /* BigInt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B30858224DA96CA6252C6F11BF5F589 /* BigInt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FA45DFC8C8AE3AE576A6C13862338138 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A30230BA7EA4657EA54DDA7AB7B05FD /* hash.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FA9AEF2C8D8495DFBB7D202A04CD4C7B /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E9C4AE3C0574C05D13445561BFB8C1B /* BlockEncryptor.swift */; }; - FAD5FD40317211B25BC1F3BAEBFEE6BA /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65695D88202B0FFFBE40038E32FBE234 /* NoError.swift */; }; - FAEE1A63513F87D185820EEEF7DB9506 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE7FF1850E0AF1A3C0492541BEFE030 /* hang.m */; }; - FB15EFD9B279E96538754752538F6F2D /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = 130F36C1478ABB13451E11EE5EC671CA /* Blowfish.swift */; }; - FCD2D464E35870B3F06993770117959D /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = A493659FF25FE0BB4CA590271A53BFB6 /* Salsa.swift */; }; - FE141380D52E6EA72571C40A8DB494D0 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = E390C18F83747553B781457B8A520926 /* after.m */; }; - FED5D5AE6604A69C4648F5EF206C250B /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DF6BC857A451DB590136C2127E8540C /* SwiftRLP.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FF200FE02402662078B4D0C3C7AF4CEE /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 53097BBB7E450CEA3B67F503C72EE715 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FF74BC55A69429C29500972AF8A9DABB /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE0E6B0DB6C8369C0409240023B753BD /* RLP.swift */; }; - FFE4A177B13CFEBE37F77661D03FDE45 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = F415B88D0858CD731ECC4C37D0E1F83A /* SecureBytes.swift */; }; + F226D03CEEB4CA12BF0D0F974840420A /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = B276DAA5AD0B968F80A0769180CCC012 /* scalar_low.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F2CEA0F86BECA15D8730D3D53D9EAF69 /* SipHash-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F04918D981D6BA6B8E1B45E4C1D23089 /* SipHash-iOS-dummy.m */; }; + F31F62CD0FEA355203A5C5750FC421F7 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C64B4995F9A0EBB5D4B5F27B33FB054 /* NSTask+AnyPromise.m */; }; + F390BEDEFDEF3DDC2172C32543EDE40B /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = EA7E3E2AA7DDB383A58F583E451F6C05 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F3A6143F497A16DA1DE0AAC5CD02AA57 /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = C535818543FB132F5085E5ED501095D0 /* Guarantee.swift */; }; + F48FDD8548C612FB765A5F4D3F2AAEB2 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CDA4C5CCCD8DD001D5D629E860B631 /* PCBC.swift */; }; + F6C04F880164DA1647FDF6654CD65CBE /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9727D8BDEB33BD75AB806BC0A3EC155C /* Codable.swift */; }; + F6D5E2F0DFF915694A71C76154312B42 /* PMKUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 002BCC8DEC6CF0087CDD9F17D1CB63D8 /* PMKUIKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F6EEBE907D9BF3B0332ED86D67236441 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 851772A4A36B2700215C3B972F05BB10 /* BigInt.swift */; }; + F854EACBF11549213B26B4748FBB94A0 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = E684DB7BA3E633421079ECE297E5C154 /* Subtraction.swift */; }; + F95445AB786CF29CEA99E52C88BFE706 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897BD312EFC7F005946FCA64E8B5D3F3 /* AES.swift */; }; + F98604F0CA9C69371A5FE5D65C6E5466 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = AE738DB7791144612A4D0951B0C43A7E /* UIView+AnyPromise.m */; }; + F9A83224C63AF5F18AED311461D71668 /* BigInt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B89A9869F658850405B3C9B8EEB11C88 /* BigInt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FA45DFC8C8AE3AE576A6C13862338138 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 74E396D4A3CBCFA52283FA71BFE1ED4C /* hash.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FA47C2FD4BE0AEE4BBB8F078CEDED890 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEB151B14FA1CAF4FB16D76AE7F505AC /* Cipher.swift */; }; + FAD5FD40317211B25BC1F3BAEBFEE6BA /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DC64F1DE162445FC5F9F8F1A2C818B1 /* NoError.swift */; }; + FAEE1A63513F87D185820EEEF7DB9506 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = CEDD84C820765F4B8C5826D1B122200E /* hang.m */; }; + FCD2D464E35870B3F06993770117959D /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05760D356B4317540E7373046A1A3CD6 /* Salsa.swift */; }; + FD6E4E6D2515323B98F8499CAF7D8486 /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = C504B703D6897FF1896886916748D0D6 /* ZeroPadding.swift */; }; + FE141380D52E6EA72571C40A8DB494D0 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 02EAAF0A84187F4281AB39EBD7DA1B34 /* after.m */; }; + FED5D5AE6604A69C4648F5EF206C250B /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = F5740FDA157E822449AD928A2FC56532 /* SwiftRLP.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FF200FE02402662078B4D0C3C7AF4CEE /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3ADB1AB7700B235D79CA3AEB2E8540 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FF74BC55A69429C29500972AF8A9DABB /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 955AD7671107B2FCAF7A725E38DA6513 /* RLP.swift */; }; + FF83256DE909E2F86AEBBF4E51F42EF0 /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57D914B6D4F8590AF8E3BA6863DB778B /* Collection+Extension.swift */; }; + FFD1323B3E415476F73D432694CC4D35 /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6D16C3019A7CC7FFDD41C97E69DCB84 /* Rabbit.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -453,7 +459,7 @@ isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = D618CA243075F5EB0C89F808DD7756D8; + remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; remoteInfo = "CryptoSwift-macOS"; }; 1E0A3209CEDE9B1B33C44AC5926A66C5 /* PBXContainerItemProxy */ = { @@ -544,7 +550,7 @@ isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = D618CA243075F5EB0C89F808DD7756D8; + remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; remoteInfo = "CryptoSwift-macOS"; }; 830B40C3043F87BD797252E75F83EC21 /* PBXContainerItemProxy */ = { @@ -558,7 +564,7 @@ isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 44D204414133961DD4B492AFB5C4DEEB; + remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; remoteInfo = "CryptoSwift-iOS"; }; AC378E3E20AF5D424B6D68F67641CFC3 /* PBXContainerItemProxy */ = { @@ -614,341 +620,344 @@ isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 44D204414133961DD4B492AFB5C4DEEB; + remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; remoteInfo = "CryptoSwift-iOS"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 0046FAD665E019D5EFFFDFC7C04F79EE /* Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Poly1305.swift; path = Sources/CryptoSwift/Poly1305.swift; sourceTree = ""; }; - 00A9E16D69CA56EBD70D7C0B65E06FA1 /* scalar_4x64_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64_impl.h; path = Classes/secp256k1/src/scalar_4x64_impl.h; sourceTree = ""; }; - 01EF1089B1CD3D0F375289721DEB584C /* AEAD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEAD.swift; path = Sources/CryptoSwift/AEAD/AEAD.swift; sourceTree = ""; }; - 029D928F404FA2893E2304CF78B3D8A4 /* BufferStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BufferStorage.swift; path = scrypt/scrypt/BufferStorage.swift; sourceTree = ""; }; - 02BE2C0884A4C644A5B276E1781D2DCA /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = sources/Random.swift; sourceTree = ""; }; - 033169E66A1FD0955634FCFD42D50FA3 /* PBKDF2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF2.swift; path = Sources/CryptoSwift/PKCS/PBKDF2.swift; sourceTree = ""; }; - 0376FB05CE1FC3FC061DD2CFE3DE0C6C /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; + 002BCC8DEC6CF0087CDD9F17D1CB63D8 /* PMKUIKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKUIKit.h; path = Extensions/UIKit/Sources/PMKUIKit.h; sourceTree = ""; }; + 0091667FAE21CC6D590AC1ADB6410352 /* SipHash-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SipHash-macOS.xcconfig"; path = "../SipHash-macOS/SipHash-macOS.xcconfig"; sourceTree = ""; }; + 011262F92057423AD4ECF708E415898D /* Result-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Result-macOS-umbrella.h"; path = "../Result-macOS/Result-macOS-umbrella.h"; sourceTree = ""; }; + 0194B6C18C95261082F349271D42FE44 /* lax_der_privatekey_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_privatekey_parsing.c; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.c; sourceTree = ""; }; + 02EAAF0A84187F4281AB39EBD7DA1B34 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; + 03938C581D805E7DEA7EF7935F6B4E61 /* Cryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptor.swift; path = Sources/CryptoSwift/Cryptor.swift; sourceTree = ""; }; + 03D50310E3C531327909D2D92D68AE95 /* SwiftRLP-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-iOS-prefix.pch"; sourceTree = ""; }; 042CC2D185140E7D725D22562A3E307F /* Pods-web3swift-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-iOS.debug.xcconfig"; sourceTree = ""; }; - 04ECFBF1BF17192FF4F65A2E96AB714F /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = Sources/CryptoSwift/CompactMap.swift; sourceTree = ""; }; - 0543DFF3F653D9C90A60EB28027C61D8 /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; - 056B0F39C844D4045CA15B32CA96A334 /* scrypt-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "scrypt-macOS-dummy.m"; path = "../scrypt-macOS/scrypt-macOS-dummy.m"; sourceTree = ""; }; - 06F1FB18FDF42877A101BED0A4736B68 /* Array+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Extension.swift"; path = "Sources/CryptoSwift/Array+Extension.swift"; sourceTree = ""; }; - 070EBBE505C1F8FCD5F159DDBB5D41C7 /* Cimpl.c */ = {isa = PBXFileReference; includeInIndex = 1; name = Cimpl.c; path = scrypt/Cimpl.c; sourceTree = ""; }; - 0A3899E2022CB3FA28CFCB82D4B6CA80 /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.h"; sourceTree = ""; }; - 0CCC239B4BCB58F6EF7C6E22E0D80102 /* group_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group_impl.h; path = Classes/secp256k1/src/group_impl.h; sourceTree = ""; }; - 0D0DA104251AEFDE2964573040D291E1 /* BigInt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-prefix.pch"; sourceTree = ""; }; - 0D1A84D8AEFDC828575F732E2005CA5B /* AEADChaCha20Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEADChaCha20Poly1305.swift; path = Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift; sourceTree = ""; }; - 0D23E94B867181F85C5901C85231758D /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; + 0439A7FDEC4F611C9334DEC15FA25F1B /* Digest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Digest.swift; path = Sources/CryptoSwift/Digest.swift; sourceTree = ""; }; + 0475C2751B32FD3CB4D4A78B955F50F8 /* scrypt-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "scrypt-iOS.xcconfig"; sourceTree = ""; }; + 05760D356B4317540E7373046A1A3CD6 /* Salsa.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Salsa.swift; path = scrypt/scrypt/Salsa.swift; sourceTree = ""; }; + 05829B47F24F4E5C604129AFF8534C15 /* scrypt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "scrypt-iOS-dummy.m"; sourceTree = ""; }; + 07A9C5839E7875E75F4AF91C0C630CB2 /* SwiftRLP-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-iOS-umbrella.h"; sourceTree = ""; }; + 07BA44CF1EA491F2DE0FFA66AADF2764 /* eckey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey.h; path = Classes/secp256k1/src/eckey.h; sourceTree = ""; }; + 07BD7441D03BCED026093ADE867666D4 /* String Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String Conversion.swift"; path = "sources/String Conversion.swift"; sourceTree = ""; }; + 08220EE2495D2C17B6366EFD53B51AC3 /* UIViewPropertyAnimator+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewPropertyAnimator+Promise.swift"; path = "Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift"; sourceTree = ""; }; + 0923A9FA118D244659624C1F0BD11796 /* UIView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.h"; sourceTree = ""; }; + 092DD25F9A8FD52F554B41FA11289B4C /* Resolver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Resolver.swift; path = Sources/Resolver.swift; sourceTree = ""; }; + 092E8D6F47871894D8044C4145939CD2 /* CryptoSwift-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-iOS-prefix.pch"; sourceTree = ""; }; + 0974D06B8BD99ADFA971B50A5A2B38CE /* Division.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Division.swift; path = sources/Division.swift; sourceTree = ""; }; + 099CBD52589F67F91C4263550552B849 /* SipHash-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-iOS-umbrella.h"; sourceTree = ""; }; + 09E31D2F88F4FB6EC4A90B888DF591B7 /* AES+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AES+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/AES+Foundation.swift"; sourceTree = ""; }; + 0C016E31F7E35964F636011F294536FD /* Result-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Result-iOS.xcconfig"; sourceTree = ""; }; + 0C7D493F1212B046A7AAFC8351D67E4D /* NSURLSession+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLSession+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.h"; sourceTree = ""; }; + 0CCB1D05E6EF6E5D33F3A993B98DD675 /* Shifts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Shifts.swift; path = sources/Shifts.swift; sourceTree = ""; }; + 0CF0657C69B458EBD464B4F7EF2A1758 /* AEAD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEAD.swift; path = Sources/CryptoSwift/AEAD/AEAD.swift; sourceTree = ""; }; + 0D20E70F3D0A72813BC2CD93F028FF1F /* Scrypt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scrypt.swift; path = scrypt/scrypt/Scrypt.swift; sourceTree = ""; }; + 0D4AFA48362F6E5DF72006F39A5F32A5 /* CTR.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CTR.swift; path = Sources/CryptoSwift/BlockMode/CTR.swift; sourceTree = ""; }; + 0D7A08C10688F2510948C9E9742DFF65 /* Result-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "Result-macOS-dummy.m"; path = "../Result-macOS/Result-macOS-dummy.m"; sourceTree = ""; }; 0D88C9D56C3885598E20D9718F3B8F16 /* Pods-web3swift-macOS_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-macOS_Tests.release.xcconfig"; sourceTree = ""; }; - 0EE7FF1850E0AF1A3C0492541BEFE030 /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; - 10063C7AE612FA73E113299D752D2F9A /* secp256k1_ecdh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_ecdh.h; path = Classes/secp256k1/include/secp256k1_ecdh.h; sourceTree = ""; }; - 10AB7CE8E7FA7C93448EFE94CFEE2C62 /* Strideable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Strideable.swift; path = sources/Strideable.swift; sourceTree = ""; }; - 10EE3D627FD85D9AD1BDC05F433526A5 /* GCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCM.swift; path = Sources/CryptoSwift/BlockMode/GCM.swift; sourceTree = ""; }; - 110E47A2CC58E6173023BB094B2410E4 /* scalar_8x32_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32_impl.h; path = Classes/secp256k1/src/scalar_8x32_impl.h; sourceTree = ""; }; - 130F36C1478ABB13451E11EE5EC671CA /* Blowfish.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Blowfish.swift; path = Sources/CryptoSwift/Blowfish.swift; sourceTree = ""; }; - 13F4C1E92ACB15583B361380492AA797 /* AES.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.swift; path = Sources/CryptoSwift/AES.swift; sourceTree = ""; }; - 156AC0832786D6E41B095D6E8DD29AC8 /* field_5x52_asm_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_asm_impl.h; path = Classes/secp256k1/src/field_5x52_asm_impl.h; sourceTree = ""; }; - 15F24BE71856015EE791D78582312743 /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; - 15F777495520F311DC5F6185975B769C /* secp256k1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1.h; path = Classes/secp256k1/include/secp256k1.h; sourceTree = ""; }; - 168126FF7C51CFAB97039CE513235D26 /* SwiftRLP-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SwiftRLP-macOS.xcconfig"; path = "../SwiftRLP-macOS/SwiftRLP-macOS.xcconfig"; sourceTree = ""; }; - 1785BD77598DA961BBC98D4CB9AEEA35 /* Result-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-iOS-prefix.pch"; sourceTree = ""; }; - 1AB58E68E90BDAD2A75EC97AEC91F499 /* SwiftRLP-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftRLP-macOS-prefix.pch"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-prefix.pch"; sourceTree = ""; }; - 1AE91BB385A7A2911773305870D337C6 /* BigUInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigUInt.swift; path = sources/BigUInt.swift; sourceTree = ""; }; + 0E3C47D7844F81394427D09B0454A241 /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; + 10F96D8FE1C5606E4F729FFD623428A3 /* secp256k1_swift-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "secp256k1_swift-macOS.xcconfig"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS.xcconfig"; sourceTree = ""; }; + 11F7F4CE35D426643C8DE5645FF76713 /* libsecp256k1-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "libsecp256k1-config.h"; path = "Classes/libsecp256k1-config.h"; sourceTree = ""; }; + 12BFFA790DC1A19DFC5018C9B37267D2 /* SipHashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHashable.swift; path = SipHash/SipHashable.swift; sourceTree = ""; }; + 161C2D9657DC967FFAC2A37D48134D76 /* Bitwise Ops.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bitwise Ops.swift"; path = "sources/Bitwise Ops.swift"; sourceTree = ""; }; + 167A6E691DFD15BA9883036B14F41D03 /* GCD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCD.swift; path = sources/GCD.swift; sourceTree = ""; }; + 18E4AB7C0ABCF3AEC6B3979EC294536E /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; + 1A3ADB1AB7700B235D79CA3AEB2E8540 /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/recovery/main_impl.h; sourceTree = ""; }; + 1A48FBA7E324AABD9DA453C780537C79 /* field_5x52.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52.h; path = Classes/secp256k1/src/field_5x52.h; sourceTree = ""; }; + 1B27C53CBFBCBC1E6466F7294EFBEA93 /* Multiplication.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multiplication.swift; path = sources/Multiplication.swift; sourceTree = ""; }; + 1B685BD86E597E436351119CA4A20736 /* BigUInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigUInt.swift; path = sources/BigUInt.swift; sourceTree = ""; }; + 1BC5C341B16D41330279E713831347D9 /* scratch_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch_impl.h; path = Classes/secp256k1/src/scratch_impl.h; sourceTree = ""; }; + 1BFCF7E8508743BB12B3D3A3C1AFF821 /* SwiftRLP-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftRLP-iOS-dummy.m"; sourceTree = ""; }; 1C8F00AC871FE0EC2FBD9A40F62753CD /* Pods-web3swift-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-macOS.debug.xcconfig"; sourceTree = ""; }; - 1E8B5D15467ED805F6B33150518D8C10 /* Resolver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Resolver.swift; path = Sources/Resolver.swift; sourceTree = ""; }; - 1ED8894D488852DD8E6F75780785F814 /* NSObject+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Extensions/Foundation/Sources/NSObject+Promise.swift"; sourceTree = ""; }; - 20BCC1D2F3127FBBB88BCCD1BCD6C558 /* PKCS5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS5.swift; path = Sources/CryptoSwift/PKCS/PKCS5.swift; sourceTree = ""; }; - 213FB9632182CBF9A72A027B86282B5C /* NSURLSession+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Promise.swift"; path = "Extensions/Foundation/Sources/NSURLSession+Promise.swift"; sourceTree = ""; }; - 23603E526EB11889D028149C843F4B49 /* PromiseKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-umbrella.h"; sourceTree = ""; }; - 23F8166C962F9CD1D6BD2E5891166222 /* CryptoSwift-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CryptoSwift-macOS-prefix.pch"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; sourceTree = ""; }; - 246EC9B3E3D924F7496163E4D7D5574B /* Cipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cipher.swift; path = Sources/CryptoSwift/Cipher.swift; sourceTree = ""; }; - 247E11C8D6F6ECD1DF148F75673EBF35 /* BlockModeOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockModeOptions.swift; path = Sources/CryptoSwift/BlockMode/BlockModeOptions.swift; sourceTree = ""; }; + 1E012EBA689C972E69BCBC4B98909AD6 /* 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 = ""; }; + 1EBD08D75A25D39EC9FA85F75EFBD0CB /* CryptoSwift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "CryptoSwift-macOS.modulemap"; path = "../CryptoSwift-macOS/CryptoSwift-macOS.modulemap"; sourceTree = ""; }; + 1F4BECA22FA3D5D535FC714D0B2B9EB8 /* Result-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-iOS-dummy.m"; sourceTree = ""; }; + 21CDB590E00AE3873562308E5110A4D8 /* Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptors.swift; path = Sources/CryptoSwift/Cryptors.swift; sourceTree = ""; }; + 221F16DEDE441F76365153C8EC2D64E3 /* ecmult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult.h; path = Classes/secp256k1/src/ecmult.h; sourceTree = ""; }; 24B5C2F89100EAE084E4AF83DDE6303D /* Pods-web3swift-iOS_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-iOS_Tests.debug.xcconfig"; sourceTree = ""; }; 25F72E78DF48560F5D210E57844ACDED /* Pods-web3swift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-web3swift-macOS-umbrella.h"; sourceTree = ""; }; - 260C8496D4BED6EDC41A2FBCF2E87AC6 /* Division.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Division.swift; path = sources/Division.swift; sourceTree = ""; }; 27042DAC0089FE05944B8718DE760F71 /* libPods-web3swift-macOS_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-macOS_Tests.a"; path = "libPods-web3swift-macOS_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 2863AEE30806CB2030DDC59D25CF1C36 /* CryptoSwift-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "CryptoSwift-macOS.xcconfig"; path = "../CryptoSwift-macOS/CryptoSwift-macOS.xcconfig"; sourceTree = ""; }; - 292B7230F9D2EF13745202AD62870DFF /* PKCS7.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7.swift; path = Sources/CryptoSwift/PKCS/PKCS7.swift; sourceTree = ""; }; - 2B2BE4EB401907B31121C20D9AE85D04 /* scalar_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_impl.h; path = Classes/secp256k1/src/scalar_impl.h; sourceTree = ""; }; - 2B30858224DA96CA6252C6F11BF5F589 /* BigInt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-umbrella.h"; sourceTree = ""; }; - 2D0614C48A73B812DC34E2FA48DD6F42 /* PMKFoundation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKFoundation.h; path = Extensions/Foundation/Sources/PMKFoundation.h; sourceTree = ""; }; - 2E2A180DBC09C044075F60A0C97BFD85 /* ChaCha20.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChaCha20.swift; path = Sources/CryptoSwift/ChaCha20.swift; sourceTree = ""; }; - 2E7BEC4ABD719ED13864904F5601B1EB /* CryptoSwift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CryptoSwift-macOS-umbrella.h"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h"; sourceTree = ""; }; - 2EDFAD6F2EC5C3407650B54B9A5A4BE8 /* fwd.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = fwd.h; path = Sources/fwd.h; sourceTree = ""; }; - 3031AC0CB5B141FF9911BEBE31A46493 /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; - 315EDC3BC73A24F07AB8D9FB44FEEF7D /* MD5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MD5.swift; path = Sources/CryptoSwift/MD5.swift; sourceTree = ""; }; - 318283844314BF1D931F35920923C71E /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; - 31D7B79B518E67916F0205F505B0485D /* SipHash-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-iOS-umbrella.h"; sourceTree = ""; }; - 32B1BF3EB7A67274C92EEEEF1D636696 /* BlockCipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockCipher.swift; path = Sources/CryptoSwift/BlockCipher.swift; sourceTree = ""; }; - 335A62646C32DC8B2185FA6DD3030CA6 /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; - 33D848500D6FCCF2177712A255BD02F3 /* BigInt-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "BigInt-macOS.xcconfig"; path = "../BigInt-macOS/BigInt-macOS.xcconfig"; sourceTree = ""; }; - 354EE4D14557CE745D7020B65D22B49D /* HMAC+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "HMAC+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/HMAC+Foundation.swift"; sourceTree = ""; }; - 355524C7DC6BFC49391D4F5AFF2834BA /* 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 = ""; }; + 2707FB70F6217313CE3FE9D9B5606CDB /* lax_der_privatekey_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_privatekey_parsing.h; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.h; sourceTree = ""; }; + 2765A0C6E2BE64A4D0916D30633BEA7E /* lax_der_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_parsing.h; path = Classes/secp256k1/contrib/lax_der_parsing.h; sourceTree = ""; }; + 276BA53B2960C2B624579741823D9DD2 /* UInt32+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt32+Extension.swift"; path = "Sources/CryptoSwift/UInt32+Extension.swift"; sourceTree = ""; }; + 28668B0DE54AE4E51942A5F50596975C /* NSNotificationCenter+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSNotificationCenter+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m"; sourceTree = ""; }; + 2C71245535F05C90A42683076576BB26 /* NSTask+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSTask+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.h"; sourceTree = ""; }; + 2CF235AEEC6AC29CA5A1331269520B36 /* SipHash-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SipHash-macOS.modulemap"; path = "../SipHash-macOS/SipHash-macOS.modulemap"; sourceTree = ""; }; + 2D86C75595B41479AB364568AB89F857 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Configuration.swift; sourceTree = ""; }; + 2DCDC3F74F1C62E2161FC76EF265BED7 /* AEADChaCha20Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEADChaCha20Poly1305.swift; path = Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift; sourceTree = ""; }; + 306BDC01729FF834ADC364D1DDD4797A /* group_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group_impl.h; path = Classes/secp256k1/src/group_impl.h; sourceTree = ""; }; + 318BC6D7199E76698CC662BB48AE0E81 /* scrypt.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scrypt.h; path = scrypt/scrypt.h; sourceTree = ""; }; + 32019641A223A260B54A3A6633B0BF19 /* StreamDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamDecryptor.swift; path = Sources/CryptoSwift/StreamDecryptor.swift; sourceTree = ""; }; + 323129AF4AE1EA178343E46476163880 /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.m"; sourceTree = ""; }; + 3386525472CC553FF40B3AFEE8BCE2DD /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; + 345299796DBEE665766F152916E0A531 /* secp256k1_swift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "secp256k1_swift-iOS-dummy.m"; sourceTree = ""; }; 35FC5E1CB1FA613D068CDE5E32242FEA /* libSipHash-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSipHash-iOS.a"; path = "libSipHash-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 36B1EE4309A9229BE3B132502B9072C0 /* BigInt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "BigInt-macOS.modulemap"; path = "../BigInt-macOS/BigInt-macOS.modulemap"; sourceTree = ""; }; - 36E46262C102F8CBB9AC5809B82A532D /* scalar_4x64.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64.h; path = Classes/secp256k1/src/scalar_4x64.h; sourceTree = ""; }; - 3714BDD6BC325B4A3AA0AEB00B7E0838 /* field_5x52_int128_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_int128_impl.h; path = Classes/secp256k1/src/field_5x52_int128_impl.h; sourceTree = ""; }; - 37F6A1CB837846EE43730D5E42B4E402 /* secp256k1_swift-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "secp256k1_swift-iOS.xcconfig"; sourceTree = ""; }; - 38253CDBFF833980FA0956A34E1BF0C7 /* BigInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigInt.swift; path = sources/BigInt.swift; sourceTree = ""; }; - 38B4EB729C6E19E85E5F7500BBFCACF4 /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; - 3A28FF7FC1FEB17EAFF5DFCB9B40E6D5 /* SipHash-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-iOS-prefix.pch"; sourceTree = ""; }; - 3B4944DF61F05FF099C70B6640B4431D /* Square Root.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Square Root.swift"; path = "sources/Square Root.swift"; sourceTree = ""; }; - 3C665B9B4606D9A35F9DFFB15EEB9F10 /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; - 3D757EF89803E12ABE5A6DC9D35431A5 /* ecmult_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_impl.h; path = Classes/secp256k1/src/ecmult_impl.h; sourceTree = ""; }; - 3DE637C08FD6A423A48096E7D58B1610 /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/ecdh/main_impl.h; sourceTree = ""; }; - 3E4050C50BE4522F2AB113A1EC5B6ABB /* eckey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey.h; path = Classes/secp256k1/src/eckey.h; sourceTree = ""; }; + 365AB600024749D54E0AD6D59FC28749 /* NoPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoPadding.swift; path = Sources/CryptoSwift/NoPadding.swift; sourceTree = ""; }; + 37BA5803AF780ED8A2ABA135BAA03479 /* ECB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ECB.swift; path = Sources/CryptoSwift/BlockMode/ECB.swift; sourceTree = ""; }; + 3965CA10F7B404A9629D09C0513F2A04 /* scrypt-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "scrypt-macOS-prefix.pch"; path = "../scrypt-macOS/scrypt-macOS-prefix.pch"; sourceTree = ""; }; + 3992689C4E8FC6AE9958D04582793809 /* scrypt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-iOS-umbrella.h"; sourceTree = ""; }; + 39B4575A57EFE3A0630FA12FAE346202 /* NSURLSession+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Promise.swift"; path = "Extensions/Foundation/Sources/NSURLSession+Promise.swift"; sourceTree = ""; }; + 3BF5A3B81AA637876B3E5AA4D5F124AA /* scalar_4x64.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64.h; path = Classes/secp256k1/src/scalar_4x64.h; sourceTree = ""; }; + 3C97CDE8E28215118A8265A78EF509D0 /* num.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num.h; path = Classes/secp256k1/src/num.h; sourceTree = ""; }; + 3E49C5D9CD234FDC2304F413D1314EE4 /* Result-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-iOS-umbrella.h"; sourceTree = ""; }; + 3E6E7087B7CBB4230AEFE06A0586FEA1 /* Cimpl.c */ = {isa = PBXFileReference; includeInIndex = 1; name = Cimpl.c; path = scrypt/Cimpl.c; sourceTree = ""; }; 3E91F337EA3979DB5DD84C325A340270 /* Pods-web3swift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swift-macOS-dummy.m"; sourceTree = ""; }; - 3E9C4AE3C0574C05D13445561BFB8C1B /* BlockEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockEncryptor.swift; path = Sources/CryptoSwift/BlockEncryptor.swift; sourceTree = ""; }; - 3EA34A9CDFC021862FD1AC06AF167E44 /* CryptoSwift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "CryptoSwift-macOS.modulemap"; path = "../CryptoSwift-macOS/CryptoSwift-macOS.modulemap"; sourceTree = ""; }; - 3F87EE960E154529EE1313BDE796C821 /* num_gmp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp.h; path = Classes/secp256k1/src/num_gmp.h; sourceTree = ""; }; - 406DA39A86D0ADCD3E417FD3B1B405F8 /* num_gmp_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp_impl.h; path = Classes/secp256k1/src/num_gmp_impl.h; sourceTree = ""; }; - 40B7ACE16AAEA76CA6C9CAE3FE7BFA5F /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/CryptoSwift/Operators.swift; sourceTree = ""; }; - 416DB21C5FE305C78284237079C89388 /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.m"; sourceTree = ""; }; - 4280E4E729C30130E5863D8832C068CC /* SipHash-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SipHash-iOS.modulemap"; sourceTree = ""; }; - 42B2FCE41642FF2B0CA0939EDCA3AD78 /* Cimpl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Cimpl.h; path = scrypt/Cimpl.h; sourceTree = ""; }; - 42E8817F1CAA2069A5B0A1A0D0ABA398 /* scrypt.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scrypt.h; path = scrypt/scrypt.h; sourceTree = ""; }; - 44A4652793E17CB674C8F7E82EA886A1 /* Result-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-iOS-umbrella.h"; sourceTree = ""; }; - 474420A8AF86D361C202C31C918E6BD3 /* CryptoSwift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CryptoSwift-iOS-dummy.m"; sourceTree = ""; }; - 477087D23BFCDB50922E829E500EC396 /* SwiftRLP-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-iOS-umbrella.h"; sourceTree = ""; }; - 47CF4E411893D167B17A83AB51C8D53D /* ChaCha20+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ChaCha20+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift"; sourceTree = ""; }; + 3F58565031EE07098E585B5C3FCC7442 /* RandomBytesSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomBytesSequence.swift; path = Sources/CryptoSwift/RandomBytesSequence.swift; sourceTree = ""; }; + 3F60E6D7F6C28A5DF688920FB74829E4 /* CBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBC.swift; path = Sources/CryptoSwift/BlockMode/CBC.swift; sourceTree = ""; }; + 3FDABDA201433FD66D894DAEF0761C26 /* secp256k1_swift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "secp256k1_swift-macOS-dummy.m"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-dummy.m"; sourceTree = ""; }; + 40497EC0B9D6C3A291AA63F310A549A2 /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; + 40BFCBA4E1D706A666116029D5E0E726 /* Result-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Result-macOS.xcconfig"; path = "../Result-macOS/Result-macOS.xcconfig"; sourceTree = ""; }; + 433536C0066CD933A793F8B42877435F /* scalar_8x32_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32_impl.h; path = Classes/secp256k1/src/scalar_8x32_impl.h; sourceTree = ""; }; + 43CCBB7CEE935A6D645B18B87E5F1A5E /* BigInt-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "BigInt-macOS.xcconfig"; path = "../BigInt-macOS/BigInt-macOS.xcconfig"; sourceTree = ""; }; + 44131C334B408CABBB3E84FE9BEDD5BE /* field_10x26.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26.h; path = Classes/secp256k1/src/field_10x26.h; sourceTree = ""; }; + 44BE339EC0BDEB80B98E8D988708993F /* UInt64+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt64+Extension.swift"; path = "Sources/CryptoSwift/UInt64+Extension.swift"; sourceTree = ""; }; + 46F1CC3195EF29E61FD820B624C49746 /* ChaCha20.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChaCha20.swift; path = Sources/CryptoSwift/ChaCha20.swift; sourceTree = ""; }; + 4747F3231587AB7A49FAEC31459E0E5A /* BigInt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "BigInt-iOS.modulemap"; sourceTree = ""; }; 47DF102368BCFE57F05C91BED865C127 /* libPods-web3swift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-iOS.a"; path = "libPods-web3swift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 48BA596E48FB87148C88E3B7BBB602EB /* secp256k1_swift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "secp256k1_swift-iOS-dummy.m"; sourceTree = ""; }; 4A2E0AD738D348DDA03396C623D814CD /* Pods-web3swift-macOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swift-macOS-acknowledgements.plist"; sourceTree = ""; }; - 4A91DDD53F519E555416888F6747C0D5 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; - 4B90782E90E35201E901B4ABD31E7E1C /* UIView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.h"; sourceTree = ""; }; - 4C0010565A5FA9F18F27870EA632C4D3 /* afterlife.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Extensions/Foundation/Sources/afterlife.swift; sourceTree = ""; }; - 4C05BD716367802B1AA84356C6E21134 /* Result-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "Result-macOS-dummy.m"; path = "../Result-macOS/Result-macOS-dummy.m"; sourceTree = ""; }; - 4DA63B5CD137C32932CDB5DB0C7A036C /* Guarantee.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Guarantee.swift; path = Sources/Guarantee.swift; sourceTree = ""; }; - 4DB7550812E8FC8658862B062E0A8D6C /* hang.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = hang.swift; path = Sources/hang.swift; sourceTree = ""; }; - 510A8C675D48B2B9F8821CFCF830CAC5 /* SipHash-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SipHash-macOS.xcconfig"; path = "../SipHash-macOS/SipHash-macOS.xcconfig"; sourceTree = ""; }; - 513D1D85D34F76B7E4DAE1B37103BC5A /* UInt32+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt32+Extension.swift"; path = "Sources/CryptoSwift/UInt32+Extension.swift"; sourceTree = ""; }; - 51DF3FC4A067409E953FF230FC67D985 /* Deprecations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecations.swift; path = Sources/Deprecations.swift; sourceTree = ""; }; + 4AF7FD66A2EBEED268628A0D0FE4E74D /* SwiftRLP-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SwiftRLP-macOS-dummy.m"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-dummy.m"; sourceTree = ""; }; + 4B00C58B6D526DBDFF8307C6DA1AFDF1 /* secp256k1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = secp256k1.swift; path = Classes/secp256k1.swift; sourceTree = ""; }; + 4B659053EBDBE68F9EB1137C3AFCC9F8 /* lax_der_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_parsing.c; path = Classes/secp256k1/contrib/lax_der_parsing.c; sourceTree = ""; }; + 4FE4AFACA87A9BC9B7F46A7AAD878E33 /* Words and Bits.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Words and Bits.swift"; path = "sources/Words and Bits.swift"; sourceTree = ""; }; + 5124B9DB14585DB3252BDB2B0F4A7FC7 /* secp256k1_swift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "secp256k1_swift-macOS.modulemap"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap"; sourceTree = ""; }; 522015696E45158812DD4C5CF37CD544 /* Pods-web3swift-macOS_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swift-macOS_Tests-dummy.m"; sourceTree = ""; }; - 52AF65D13B97A0EAA5CC2F9AF6450786 /* NSNotificationCenter+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSNotificationCenter+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m"; sourceTree = ""; }; - 52DC772E67709ACAE0A2731E36A63DC0 /* secp256k1_swift-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "secp256k1_swift-macOS.xcconfig"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS.xcconfig"; sourceTree = ""; }; - 53097BBB7E450CEA3B67F503C72EE715 /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/recovery/main_impl.h; sourceTree = ""; }; + 5250B8764D7489940F140620EA371F7F /* CryptoSwift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "CryptoSwift-iOS.modulemap"; sourceTree = ""; }; 5362887D119F1FF10889E08C0A86AC77 /* libscrypt-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libscrypt-macOS.a"; path = "libscrypt-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 547AA2E9890A83EE986E0FE6B230D1E8 /* libSwiftRLP-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSwiftRLP-macOS.a"; path = "libSwiftRLP-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 547B7D1303121A36C02717193279DF7A /* SipHash-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SipHash-macOS-dummy.m"; path = "../SipHash-macOS/SipHash-macOS-dummy.m"; sourceTree = ""; }; 54DEB815C6A515714B4A838D414C3241 /* Pods-web3swift-macOS_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swift-macOS_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 55674F039B757742790CC41D400D1B28 /* scrypt-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "scrypt-macOS-umbrella.h"; path = "../scrypt-macOS/scrypt-macOS-umbrella.h"; sourceTree = ""; }; - 56831D861C9C68AB6445D1B373489CCD /* Box.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Sources/Box.swift; sourceTree = ""; }; - 584C7F09DDD45569AE8365662DEFF8CA /* ECB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ECB.swift; path = Sources/CryptoSwift/BlockMode/ECB.swift; sourceTree = ""; }; - 59163772C1016907FD12D819A604B18B /* Rabbit+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Rabbit+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift"; sourceTree = ""; }; - 592D721B3C087135B76612BE7D7B3701 /* NSURLSession+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLSession+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.h"; sourceTree = ""; }; + 551CAAEDDC5AAACAA24E8A5A86721E97 /* Bit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bit.swift; path = Sources/CryptoSwift/Bit.swift; sourceTree = ""; }; + 555457AF50F888167C28CEA34B14AAE1 /* 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 = ""; }; + 55FA26B75C99F4847087C9104EE38E8F /* Authenticator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Authenticator.swift; path = Sources/CryptoSwift/Authenticator.swift; sourceTree = ""; }; + 57D914B6D4F8590AF8E3BA6863DB778B /* Collection+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Collection+Extension.swift"; path = "Sources/CryptoSwift/Collection+Extension.swift"; sourceTree = ""; }; + 57FE015BCC95654092B0ADF05585E987 /* scratch.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch.h; path = Classes/secp256k1/src/scratch.h; sourceTree = ""; }; 599066091D94A49D4FE779679AFD88E2 /* libSipHash-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSipHash-macOS.a"; path = "libSipHash-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 59C55840D303F469F1F31EE4867563E5 /* Generics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generics.swift; path = Sources/CryptoSwift/Generics.swift; sourceTree = ""; }; 5A6CB64CE9F57BAAAAF807DF850E2C0A /* libResult-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libResult-iOS.a"; path = "libResult-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 5C26BABFAE3BF83287E05135793873F6 /* scalar_8x32.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32.h; path = Classes/secp256k1/src/scalar_8x32.h; sourceTree = ""; }; - 5DB98AE66675F1DDA4A420A12C0BFBC6 /* OFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OFB.swift; path = Sources/CryptoSwift/BlockMode/OFB.swift; sourceTree = ""; }; - 5E7DBCA26552356539B821BC83348925 /* BigInt-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "BigInt-iOS.xcconfig"; sourceTree = ""; }; - 611BA1395C8C441142D55E0EA236E429 /* scratch_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch_impl.h; path = Classes/secp256k1/src/scratch_impl.h; sourceTree = ""; }; + 5B061B14116ABEE15B3CE99517103317 /* UInt8+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt8+Extension.swift"; path = "Sources/CryptoSwift/UInt8+Extension.swift"; sourceTree = ""; }; + 5B2EDCF2255BD0D829F03B0C1BD0A060 /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Extension.swift"; path = "Sources/CryptoSwift/String+Extension.swift"; sourceTree = ""; }; + 5B66168E0567CA1671C74F37384DD7B7 /* scrypt-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "scrypt-macOS-dummy.m"; path = "../scrypt-macOS/scrypt-macOS-dummy.m"; sourceTree = ""; }; + 5B88EAF15DEC2D3207C78A1C1F11E1B1 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PromiseKit.root-CorePromise-Foundation-umbrella.h"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h"; sourceTree = ""; }; + 5E959F3AA4E4F1850C7F42B923C77DDB /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/ecdh/main_impl.h; sourceTree = ""; }; 6190C35184D36B3997B74374A1DEB870 /* libPods-web3swift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-macOS.a"; path = "libPods-web3swift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 61A90B8C29D973CF2BEE2A33224ACBEF /* Updatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Updatable.swift; path = Sources/CryptoSwift/Updatable.swift; sourceTree = ""; }; + 61BA4F5A7AAF223AA3BDA0BF814905AA /* AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; + 61F02670BA786ECE5640E0C70EA68888 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; 61F9B5A069C5D02E065D4AB81C26942D /* libsecp256k1_swift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libsecp256k1_swift-macOS.a"; path = "libsecp256k1_swift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 629A9B1DDCCA7AF069A948D996B8B34C /* Authenticator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Authenticator.swift; path = Sources/CryptoSwift/Authenticator.swift; sourceTree = ""; }; - 62DAA30A02BECECD3B564F1546CE3343 /* Process+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Process+Promise.swift"; path = "Extensions/Foundation/Sources/Process+Promise.swift"; sourceTree = ""; }; - 6304D4D79F57615EFD4626BF126CE5AD /* Bit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bit.swift; path = Sources/CryptoSwift/Bit.swift; sourceTree = ""; }; - 638D0AE5AF7E8F2016849D61CA3C54E4 /* scratch.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch.h; path = Classes/secp256k1/src/scratch.h; sourceTree = ""; }; - 638EF15CE0F571BA9C2C5868DA40EBBE /* RandomBytesSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomBytesSequence.swift; path = Sources/CryptoSwift/RandomBytesSequence.swift; sourceTree = ""; }; - 63A1F06664FED90C2B7F7989990F9EE3 /* NSTask+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSTask+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.m"; sourceTree = ""; }; - 63D12DA56BB356A37E371C2040649482 /* BigInt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "BigInt-iOS.modulemap"; sourceTree = ""; }; - 648DE2BEBFB01CEB5B721BA04955EAF1 /* String Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String Conversion.swift"; path = "sources/String Conversion.swift"; sourceTree = ""; }; - 65695D88202B0FFFBE40038E32FBE234 /* NoError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoError.swift; path = Result/NoError.swift; sourceTree = ""; }; - 65CE212AD1BE3547B620E83B3DA9E60F /* CFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CFB.swift; path = Sources/CryptoSwift/BlockMode/CFB.swift; sourceTree = ""; }; - 66515F5856AA8BFE5FEC1F9BF271A5A2 /* PMKUIKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKUIKit.h; path = Extensions/UIKit/Sources/PMKUIKit.h; sourceTree = ""; }; + 6246D2591B9DFE5339771AC0AF2EA3CA /* CustomStringConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomStringConvertible.swift; path = Sources/CustomStringConvertible.swift; sourceTree = ""; }; + 627C056A389B2501608E18EFAD762A6B /* CCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CCM.swift; path = Sources/CryptoSwift/BlockMode/CCM.swift; sourceTree = ""; }; + 62BD8229A9BC1A38D866BEDF45C366E7 /* secp256k1_swift-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "secp256k1_swift-macOS-prefix.pch"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; sourceTree = ""; }; + 63D47A1599387D37CCA850DB9256283A /* Deprecations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecations.swift; path = Sources/Deprecations.swift; sourceTree = ""; }; + 660B0734DFD6D8C99EE70FDF836AD891 /* HMAC+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "HMAC+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/HMAC+Foundation.swift"; sourceTree = ""; }; + 665306D3A9323800337BE1451D8960E7 /* AnyError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyError.swift; path = Result/AnyError.swift; sourceTree = ""; }; + 66858822A1651FBD671091155D387A8B /* BlockModeOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockModeOptions.swift; path = Sources/CryptoSwift/BlockMode/BlockModeOptions.swift; sourceTree = ""; }; + 66D54E1981BA238733A8A5E65484B2B5 /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; 673FFC4D2B959AB8AEC35D646A85CDCD /* Pods-web3swift-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-iOS.release.xcconfig"; sourceTree = ""; }; - 67580A9D6645C39D002E66190B1B2B66 /* ecmult_const_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const_impl.h; path = Classes/secp256k1/src/ecmult_const_impl.h; sourceTree = ""; }; - 67946900D6375AEDFA1C113E2A5B2794 /* Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptors.swift; path = Sources/CryptoSwift/Cryptors.swift; sourceTree = ""; }; - 68457844D0369DF25FAC63A7E42F3A5C /* BlockMode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockMode.swift; path = Sources/CryptoSwift/BlockMode/BlockMode.swift; sourceTree = ""; }; 686E32EABE020693AEB9B0CBB68DC7AD /* libCryptoSwift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libCryptoSwift-iOS.a"; path = "libCryptoSwift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 68C55BFCA12A87EB647D36A87908A1D1 /* AES.Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.Cryptors.swift; path = Sources/CryptoSwift/AES.Cryptors.swift; sourceTree = ""; }; - 6954BF93957A2CAF08330D9214A7ACF2 /* Utils+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Utils+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Utils+Foundation.swift"; sourceTree = ""; }; - 69DAF4AC1AD4ABE697F2A9B28B2742A9 /* lax_der_privatekey_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_privatekey_parsing.h; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.h; sourceTree = ""; }; - 6B9D04508C62F823AFD89A1CA232315E /* Prime Test.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Prime Test.swift"; path = "sources/Prime Test.swift"; sourceTree = ""; }; - 6BECA27963AB5B81C6487F1AFF447EE3 /* UInt16+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt16+Extension.swift"; path = "Sources/CryptoSwift/UInt16+Extension.swift"; sourceTree = ""; }; - 6C03433156B044F013B91599EE579C7D /* lax_der_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_parsing.h; path = Classes/secp256k1/contrib/lax_der_parsing.h; sourceTree = ""; }; + 699D800F72CE09977D6EE1687D706BD6 /* BlockCipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockCipher.swift; path = Sources/CryptoSwift/BlockCipher.swift; sourceTree = ""; }; + 69B4D5C4EED1973AF5815173AB05729B /* Data+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Extension.swift"; path = "Sources/CryptoSwift/Foundation/Data+Extension.swift"; sourceTree = ""; }; + 6BBC74867F1126D0DB48249F01662F36 /* Result-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Result-macOS-prefix.pch"; path = "../Result-macOS/Result-macOS-prefix.pch"; sourceTree = ""; }; + 6C01FC83057F30818B00CDD8B62AC6B9 /* SipHash-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SipHash-iOS.modulemap"; sourceTree = ""; }; + 6C59784B76CA65D06F275EBA259540AC /* SipHash-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SipHash-macOS-umbrella.h"; path = "../SipHash-macOS/SipHash-macOS-umbrella.h"; sourceTree = ""; }; 6D4A716592C208D7429CE19B82094FA8 /* Pods-web3swift-iOS_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swift-iOS_Tests-acknowledgements.plist"; sourceTree = ""; }; - 6DF6BC857A451DB590136C2127E8540C /* SwiftRLP.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftRLP.h; path = SwiftRLP/SwiftRLP.h; sourceTree = ""; }; - 6F12EBB6BE5A983DB0FE7EBD486FC10B /* scrypt-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "scrypt-macOS-prefix.pch"; path = "../scrypt-macOS/scrypt-macOS-prefix.pch"; sourceTree = ""; }; + 6D957F2AECF5A8A0E9C7CCE2A55B6C69 /* hang.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = hang.swift; path = Sources/hang.swift; sourceTree = ""; }; + 6DF453CEA7E128C1691A0713421CFBBF /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; + 6E138D3C3327A0AC400395EA7B85D13A /* num_gmp_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp_impl.h; path = Classes/secp256k1/src/num_gmp_impl.h; sourceTree = ""; }; + 6EA534EDF19829F1927C7991BF2EEC2F /* Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Padding.swift; path = Sources/CryptoSwift/Padding.swift; sourceTree = ""; }; 6F662C5CB3F9F55D1B8343627F3108A8 /* libResult-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libResult-macOS.a"; path = "libResult-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 709674DD026369E39754079D242C3E66 /* secp256k1_swift-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-iOS-prefix.pch"; sourceTree = ""; }; - 71949CED7683B7766F5B86149AFB03D5 /* SwiftRLP-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SwiftRLP-iOS.modulemap"; sourceTree = ""; }; - 73E1C923DAF11E64DD39A52C483CBBB0 /* UInt128.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UInt128.swift; path = Sources/CryptoSwift/UInt128.swift; sourceTree = ""; }; - 75335D15747F097BD0A9500504DC8775 /* Updatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Updatable.swift; path = Sources/CryptoSwift/Updatable.swift; sourceTree = ""; }; + 6FACAD9F572878C98D14B56672DE004C /* PBKDF2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF2.swift; path = Sources/CryptoSwift/PKCS/PBKDF2.swift; sourceTree = ""; }; + 705526D46CF8710526DEFD6A81185AFA /* Strideable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Strideable.swift; path = sources/Strideable.swift; sourceTree = ""; }; + 71B12B455685D2F4F116288D0FE808FE /* Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Poly1305.swift; path = Sources/CryptoSwift/Poly1305.swift; sourceTree = ""; }; + 73AF6510FE79C3D2EDBCE691D07F6E5E /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; + 74076E38030CF36CF2DEBA8446B2B156 /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; + 74E396D4A3CBCFA52283FA71BFE1ED4C /* hash.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash.h; path = Classes/secp256k1/src/hash.h; sourceTree = ""; }; 753E3CD3CF2AA32CDB11305D429F3C96 /* Pods-web3swift-iOS_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swift-iOS_Tests-acknowledgements.markdown"; sourceTree = ""; }; 755201B560E952C6A5333642B028695A /* libPromiseKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libPromiseKit.a; path = libPromiseKit.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 75724C7E4D6EB3792635A031AD2B1492 /* UInt64+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt64+Extension.swift"; path = "Sources/CryptoSwift/UInt64+Extension.swift"; sourceTree = ""; }; - 75D9DF88CC9C33DAC01E5EFCB0B1513D /* Multiplication.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multiplication.swift; path = sources/Multiplication.swift; sourceTree = ""; }; - 7663F04B24B87395872D526DC48DC43C /* group.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group.h; path = Classes/secp256k1/src/group.h; sourceTree = ""; }; - 77A1B64DBD371FBCB805A100679F87A8 /* Digest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Digest.swift; path = Sources/CryptoSwift/Digest.swift; sourceTree = ""; }; - 77E3BF2EAFA71BF47C10920D60404EE9 /* PromiseKit.root-CorePromise-Foundation-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PromiseKit.root-CorePromise-Foundation-prefix.pch"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; sourceTree = ""; }; - 7840B3270C6F5BC3A89FE4E3AE641898 /* Codable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Codable.swift; path = sources/Codable.swift; sourceTree = ""; }; - 7950E62D04D3EBAB00EA5CE1411E5A6C /* secp256k1_swift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-iOS-umbrella.h"; sourceTree = ""; }; + 77419BCFFD51D71BDCD33CDB50A1DC50 /* BigInt-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "BigInt-iOS.xcconfig"; sourceTree = ""; }; + 78593F1D5D512221956B4CC2A7432B88 /* Primitive Types.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Primitive Types.swift"; path = "SipHash/Primitive Types.swift"; sourceTree = ""; }; + 7895D4EC130402D473CB15EDD68ACA2A /* scrypt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "scrypt-iOS.modulemap"; sourceTree = ""; }; + 79370D5C826074DD91DB303B75EACE7D /* Box.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Sources/Box.swift; sourceTree = ""; }; 79E925BEAA0533C58B6D9871B886DD8A /* Pods-web3swift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-web3swift-iOS.modulemap"; sourceTree = ""; }; - 7A0C50DF8D82115DBAAFF1AA1F45BD18 /* secp256k1_swift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "secp256k1_swift-iOS.modulemap"; sourceTree = ""; }; - 7AAE07003CED08DD7BCB8AC108A4773B /* Scrypt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scrypt.swift; path = scrypt/scrypt/Scrypt.swift; sourceTree = ""; }; - 7B6B5F54FE477086DE9224F151F9D3EA /* ecmult_gen.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen.h; path = Classes/secp256k1/src/ecmult_gen.h; sourceTree = ""; }; - 7CA875E3478CF42FACB3165CBFAE86BD /* Thenable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Thenable.swift; path = Sources/Thenable.swift; sourceTree = ""; }; - 7D484138780C581F7D2CE4E6D0544865 /* BigInt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BigInt-iOS-dummy.m"; sourceTree = ""; }; + 7A37EB85984F608037881FD6E14786A3 /* SipHash-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SipHash-iOS.xcconfig"; sourceTree = ""; }; + 7A45DEA061F03DB9EB78391B810792DD /* Array+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Extension.swift"; path = "Sources/CryptoSwift/Array+Extension.swift"; sourceTree = ""; }; + 7A83A5B7F0434C3FACA671C5A20D8389 /* eckey_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey_impl.h; path = Classes/secp256k1/src/eckey_impl.h; sourceTree = ""; }; + 7D2ED7B574BD12D6937C37D79B6355D2 /* secp256k1_swift-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "secp256k1_swift-iOS.xcconfig"; sourceTree = ""; }; + 7DC64F1DE162445FC5F9F8F1A2C818B1 /* NoError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoError.swift; path = Result/NoError.swift; sourceTree = ""; }; + 7E27EDB736A99A27C20F82D22DC4A707 /* GCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCM.swift; path = Sources/CryptoSwift/BlockMode/GCM.swift; sourceTree = ""; }; 7E8C19543EF3AA4D9801DBE55E22E211 /* Pods-web3swift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-web3swift-iOS-umbrella.h"; sourceTree = ""; }; - 7EECFB1BF73B6EB0684317B85E2EA08E /* util.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = util.h; path = Classes/secp256k1/src/util.h; sourceTree = ""; }; - 7FED111DB9B19BEB67F1E97D34E65AC8 /* SipHash-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SipHash-macOS-umbrella.h"; path = "../SipHash-macOS/SipHash-macOS-umbrella.h"; sourceTree = ""; }; - 7FFE51D4F185433A05C0BD38B8F2A5CC /* HKDF.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HKDF.swift; path = Sources/CryptoSwift/HKDF.swift; sourceTree = ""; }; - 8200921DBAF2BD006E2F13F1F9D5A8C9 /* SwiftRLP-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-iOS-prefix.pch"; sourceTree = ""; }; - 8446B6BDDAE4F9F915BCB9730B980742 /* CryptoSwift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "CryptoSwift-iOS.modulemap"; sourceTree = ""; }; - 889ED076F99BD2AB4920EC9A5ECAFFDE /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; - 88AC1F107B9BEA598C0726780ECDFE87 /* field_10x26_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26_impl.h; path = Classes/secp256k1/src/field_10x26_impl.h; sourceTree = ""; }; - 88EC012A11A5D51BC077A26441D4957B /* NoPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoPadding.swift; path = Sources/CryptoSwift/NoPadding.swift; sourceTree = ""; }; - 88F32E8C457272E137BB38662B42445E /* field_10x26.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26.h; path = Classes/secp256k1/src/field_10x26.h; sourceTree = ""; }; + 8045272A42A0784613BD7057AA86803C /* ecmult_const_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const_impl.h; path = Classes/secp256k1/src/ecmult_const_impl.h; sourceTree = ""; }; + 80D7D244BE8CFD16A741C5261EA757D6 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; + 80ED01586B28193ED2BE26DEF9B57A3C /* ecdsa_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa_impl.h; path = Classes/secp256k1/src/ecdsa_impl.h; sourceTree = ""; }; + 83BD9FC5270AA1FFFF0B01504C9B8BB7 /* PKCS7.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7.swift; path = Sources/CryptoSwift/PKCS/PKCS7.swift; sourceTree = ""; }; + 8488F4ACF6A5A83E41E4C406582AB2C9 /* BigInt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "BigInt-macOS.modulemap"; path = "../BigInt-macOS/BigInt-macOS.modulemap"; sourceTree = ""; }; + 851772A4A36B2700215C3B972F05BB10 /* BigInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigInt.swift; path = sources/BigInt.swift; sourceTree = ""; }; + 853BAAA89F1726DECCF03BC01BBDC64C /* basic-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "basic-config.h"; path = "Classes/secp256k1/src/basic-config.h"; sourceTree = ""; }; + 856FFECE484989935BD3A92DEC7353E2 /* secp256k1_swift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "secp256k1_swift-iOS.modulemap"; sourceTree = ""; }; + 8674CB477181A24AA72377A5EF2E312C /* secp256k1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1.h; path = Classes/secp256k1/include/secp256k1.h; sourceTree = ""; }; + 8798FA9542F2175AA660CDB635E6D6BC /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift"; sourceTree = ""; }; + 87F900B38D104B7DA2F876FEF130BE54 /* SwiftRLP-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SwiftRLP-iOS.modulemap"; sourceTree = ""; }; + 89276AC70A47E00E5E08DB5C8D91C6C4 /* field_5x52_int128_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_int128_impl.h; path = Classes/secp256k1/src/field_5x52_int128_impl.h; sourceTree = ""; }; + 897BD312EFC7F005946FCA64E8B5D3F3 /* AES.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.swift; path = Sources/CryptoSwift/AES.swift; sourceTree = ""; }; + 8A22A5D6311176FFB8CFC5A84B52E457 /* Result-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "Result-macOS.modulemap"; path = "../Result-macOS/Result-macOS.modulemap"; sourceTree = ""; }; + 8A49E7FFAA1F69AF0BFDC8A0CFCB938D /* SipHash-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SipHash-macOS-dummy.m"; path = "../SipHash-macOS/SipHash-macOS-dummy.m"; sourceTree = ""; }; + 8AA2EF5FFE50FBD8EAB6BEA39D23C942 /* DigestType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DigestType.swift; path = Sources/CryptoSwift/DigestType.swift; sourceTree = ""; }; 8B56F6A20A0CF698ECA0EDF6CF4CDD74 /* Pods-web3swift-iOS_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swift-iOS_Tests-dummy.m"; sourceTree = ""; }; - 8B8AE60B95D9DA9615B03EE888C7F908 /* secp256k1.c */ = {isa = PBXFileReference; includeInIndex = 1; name = secp256k1.c; path = Classes/secp256k1/src/secp256k1.c; sourceTree = ""; }; - 8BE11FDB9FE69A172C6101D8842D30EF /* UInt8+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt8+Extension.swift"; path = "Sources/CryptoSwift/UInt8+Extension.swift"; sourceTree = ""; }; - 8C60838D5062772223AD4E011F01E513 /* SwiftRLP-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SwiftRLP-macOS.modulemap"; path = "../SwiftRLP-macOS/SwiftRLP-macOS.modulemap"; sourceTree = ""; }; - 8CBA3A66080B4CF784ADFED0326CBC82 /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Extension.swift"; path = "Sources/CryptoSwift/String+Extension.swift"; sourceTree = ""; }; - 8D81EA62567426F4F97BA1EE4F993378 /* lax_der_privatekey_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_privatekey_parsing.c; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.c; sourceTree = ""; }; - 8E2064AA263189FCD4D283C9618B597A /* 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 = ""; }; - 90B02C30596DAD79E18ADA8E1883B661 /* CryptoSwift-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-iOS-prefix.pch"; sourceTree = ""; }; + 8BE4DB426382B15B10062329955F15CC /* scalar.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar.h; path = Classes/secp256k1/src/scalar.h; sourceTree = ""; }; + 8C3AF144309D8E77765BE0E32200497A /* PromiseKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-umbrella.h"; sourceTree = ""; }; + 8C64B4995F9A0EBB5D4B5F27B33FB054 /* NSTask+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSTask+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.m"; sourceTree = ""; }; + 8D97871DE06423066D52CDBE28B74B3B /* PKCS5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS5.swift; path = Sources/CryptoSwift/PKCS/PKCS5.swift; sourceTree = ""; }; + 8E89406E7E995881E48051C7EC4C9DCB /* race.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = race.m; path = Sources/race.m; sourceTree = ""; }; + 903BE66455FF2F03FD9540A7E5914EC7 /* CFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CFB.swift; path = Sources/CryptoSwift/BlockMode/CFB.swift; sourceTree = ""; }; + 90AB4B8A04595134BFA9D538282F4E41 /* PromiseKit.root-CorePromise-Foundation.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "PromiseKit.root-CorePromise-Foundation.modulemap"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap"; sourceTree = ""; }; 90B410829D6E70A45A22CC62F187A11B /* Pods-web3swift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-web3swift-macOS.modulemap"; sourceTree = ""; }; - 9197F30F9D372148520156A011421FE9 /* HMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HMAC.swift; path = Sources/CryptoSwift/HMAC.swift; sourceTree = ""; }; - 928C9306D44A4F06DEDCFDA02220D548 /* basic-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "basic-config.h"; path = "Classes/secp256k1/src/basic-config.h"; sourceTree = ""; }; - 9520DA623CEB5BEB937C6E2EEC267B31 /* secp256k1_swift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "secp256k1_swift-macOS-dummy.m"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-dummy.m"; sourceTree = ""; }; - 955161BE1368A548FD4EB6DA00435D16 /* UIView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Extensions/UIKit/Sources/UIView+Promise.swift"; sourceTree = ""; }; + 91EFA6BFEDFE86C5744B8A08BD45CC1D /* Square Root.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Square Root.swift"; path = "sources/Square Root.swift"; sourceTree = ""; }; + 937DFD5ACC6B392C3B22DD0605410F52 /* Process+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Process+Promise.swift"; path = "Extensions/Foundation/Sources/Process+Promise.swift"; sourceTree = ""; }; + 938A29097DE727896422B7DD937D51E3 /* ecmult_gen_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen_impl.h; path = Classes/secp256k1/src/ecmult_gen_impl.h; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93E416B2CCEC4490652DE3889013CC4A /* Blowfish+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Blowfish+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift"; sourceTree = ""; }; + 93F2C29FA3412D0329780F52C1DD2931 /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; + 955AD7671107B2FCAF7A725E38DA6513 /* RLP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RLP.swift; path = Classes/RLP.swift; sourceTree = ""; }; 95C397E16B314F921F7784F00C8F183B /* Pods-web3swift-iOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swift-iOS-acknowledgements.plist"; sourceTree = ""; }; - 97B24FD834901CF3D36423F68C485701 /* 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 = ""; }; - 97C1287E8FD172526EC3409612A97C23 /* Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Utils.swift; path = Sources/CryptoSwift/Utils.swift; sourceTree = ""; }; - 97E0EFD2C6E09D9A91E0B22FB199CF95 /* CryptoSwift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-iOS-umbrella.h"; sourceTree = ""; }; - 980A812728AADDDB624727159B4C098E /* secp256k1_swift-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "secp256k1_swift-macOS-prefix.pch"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; sourceTree = ""; }; - 98208639AD618314C999FC207B7FBA89 /* SipHash-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SipHash-iOS-dummy.m"; sourceTree = ""; }; - 98B2E87BB6ACFDFDFA8C3C8F69BE06E2 /* Result-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Result-macOS-umbrella.h"; path = "../Result-macOS/Result-macOS-umbrella.h"; sourceTree = ""; }; - 98D3DA59A50F70D87A13DF72C6E649E1 /* Subtraction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Subtraction.swift; path = sources/Subtraction.swift; sourceTree = ""; }; - 99490114EDAF958B866019F3B4C71077 /* ZeroPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZeroPadding.swift; path = Sources/CryptoSwift/ZeroPadding.swift; sourceTree = ""; }; - 9A30230BA7EA4657EA54DDA7AB7B05FD /* hash.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash.h; path = Classes/secp256k1/src/hash.h; sourceTree = ""; }; - 9ABF1DE4DC6AE445BD89E628E2CF5E94 /* num.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num.h; path = Classes/secp256k1/src/num.h; sourceTree = ""; }; - 9C8C505AC16C4F7922DBC4160AC3448C /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; - 9D7A3998EBD9688668E8B5E865E058BC /* Catchable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catchable.swift; path = Sources/Catchable.swift; sourceTree = ""; }; - 9D8AF6DE4770B6AAF9C6F56D533DB5A3 /* Rabbit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rabbit.swift; path = Sources/CryptoSwift/Rabbit.swift; sourceTree = ""; }; - 9DBCB6B50C94F20FB7E7BC301A007798 /* PKCS7Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7Padding.swift; path = Sources/CryptoSwift/PKCS/PKCS7Padding.swift; sourceTree = ""; }; - 9DC3346C75E669B5227A78FA15785FB3 /* Floating Point Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Floating Point Conversion.swift"; path = "sources/Floating Point Conversion.swift"; sourceTree = ""; }; - A11B379994D50482D207EE8967ED7CDF /* SwiftRLP-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftRLP-iOS-dummy.m"; sourceTree = ""; }; + 96CDA4C5CCCD8DD001D5D629E860B631 /* PCBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PCBC.swift; path = Sources/CryptoSwift/BlockMode/PCBC.swift; sourceTree = ""; }; + 970421396A3184DB620CB61E8AE71F58 /* num_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_impl.h; path = Classes/secp256k1/src/num_impl.h; sourceTree = ""; }; + 971DE8258824419E3875862D386B0558 /* SwiftRLP-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftRLP-macOS-prefix.pch"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-prefix.pch"; sourceTree = ""; }; + 9727D8BDEB33BD75AB806BC0A3EC155C /* Codable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Codable.swift; path = sources/Codable.swift; sourceTree = ""; }; + 983B0C09BEC11115522233D05D8F47D1 /* Comparable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Comparable.swift; path = sources/Comparable.swift; sourceTree = ""; }; + 98C1FF45802004439456C8A350D9155A /* PromiseKit.root-CorePromise-Foundation-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PromiseKit.root-CorePromise-Foundation-prefix.pch"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; sourceTree = ""; }; + 9AD9ED798FEF891C4A3123685AB25017 /* PKCS7Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7Padding.swift; path = Sources/CryptoSwift/PKCS/PKCS7Padding.swift; sourceTree = ""; }; + 9B108AA63200D2A6992501E7B76EF6A0 /* OFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OFB.swift; path = Sources/CryptoSwift/BlockMode/OFB.swift; sourceTree = ""; }; + 9B3C1FAD3DD5A0A918CA3605928E5CA9 /* CryptoSwift-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "CryptoSwift-macOS.xcconfig"; path = "../CryptoSwift-macOS/CryptoSwift-macOS.xcconfig"; sourceTree = ""; }; + 9CBD2032E8E6117EFD2C15AC9E728128 /* 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 = ""; }; + 9DE9FBA3C3EB5037CAB66A887E9BC6DE /* Array+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Array+Foundation.swift"; sourceTree = ""; }; + 9DFFAA6FC4E6A7DCD0DA8AE064B792DA /* Catchable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catchable.swift; path = Sources/Catchable.swift; sourceTree = ""; }; + 9E2278C6E7F3F4C4A66132D0E8E0517D /* PMKFoundation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKFoundation.h; path = Extensions/Foundation/Sources/PMKFoundation.h; sourceTree = ""; }; + 9E3F254D4EBA717445160AB2A3C16AE5 /* SwiftRLP-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SwiftRLP-macOS.modulemap"; path = "../SwiftRLP-macOS/SwiftRLP-macOS.modulemap"; sourceTree = ""; }; + 9FC6C3CA2D135767617F5F276FF395CC /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = Sources/CryptoSwift/CompactMap.swift; sourceTree = ""; }; + A094ABEA6C6E0AD5B87D62BB32AEA3DA /* util.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = util.h; path = Classes/secp256k1/src/util.h; sourceTree = ""; }; + A130AE149844CDF96BEAFC7381997641 /* AES.Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.Cryptors.swift; path = Sources/CryptoSwift/AES.Cryptors.swift; sourceTree = ""; }; A14282AE6AF7AD75A532A9639BE44B88 /* libscrypt-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libscrypt-iOS.a"; path = "libscrypt-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A1EC79FCBA910623842C72C09D10B874 /* NSTask+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSTask+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.h"; sourceTree = ""; }; + A19805DB694C14E29F255EA2BB4603A5 /* ecmult_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_impl.h; path = Classes/secp256k1/src/ecmult_impl.h; sourceTree = ""; }; A322E379ECBC90322624BA7A69FBBDEE /* libsecp256k1_swift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libsecp256k1_swift-iOS.a"; path = "libsecp256k1_swift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A3A74DAAF802F643B5F00446BF21F89A /* CBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBC.swift; path = Sources/CryptoSwift/BlockMode/CBC.swift; sourceTree = ""; }; A3BCB7E3971A174E47D70212430A170B /* libBigInt-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libBigInt-iOS.a"; path = "libBigInt-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A46C4FE304316D231AC48D068F15FE99 /* Integer Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Integer Conversion.swift"; path = "sources/Integer Conversion.swift"; sourceTree = ""; }; - A493659FF25FE0BB4CA590271A53BFB6 /* Salsa.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Salsa.swift; path = scrypt/scrypt/Salsa.swift; sourceTree = ""; }; + A3D2730C3BE7868E162AB4F297A3A7DE /* ecmult_const.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const.h; path = Classes/secp256k1/src/ecmult_const.h; sourceTree = ""; }; + A4072CCBD9D1A294C38285818FBFDA5F /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PromiseKit.modulemap; sourceTree = ""; }; + A4420324C5657482ABEBDA0BB3C73802 /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; + A4A8846DC8DC969B376FC38B435C87F8 /* scrypt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "scrypt-macOS.modulemap"; path = "../scrypt-macOS/scrypt-macOS.modulemap"; sourceTree = ""; }; + A5C805181714272769BB5BCEA4814B1D /* SHA2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA2.swift; path = Sources/CryptoSwift/SHA2.swift; sourceTree = ""; }; A5D9B32B104EA0A137D78B89D4D19D40 /* Pods-web3swift-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-macOS.release.xcconfig"; sourceTree = ""; }; - A689F9898FAC7D6BEBFC64BDDB5CCD33 /* hash_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash_impl.h; path = Classes/secp256k1/src/hash_impl.h; sourceTree = ""; }; - A7E72167B9780D5627571A312AE1B751 /* SwiftRLP-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftRLP-macOS-umbrella.h"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h"; sourceTree = ""; }; - A84CAC1E9ED891BB925E32AD866EF4F8 /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h"; sourceTree = ""; }; - A91F063F0878CD71B91FA6F40B94A8DD /* scrypt-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "scrypt-iOS.xcconfig"; sourceTree = ""; }; - A9B9A712542DB104270D877BBE57746F /* Cryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptor.swift; path = Sources/CryptoSwift/Cryptor.swift; sourceTree = ""; }; - ABA1CC6FBDF71FC02EE62B784C52CD45 /* secp256k1_swift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "secp256k1_swift-macOS-umbrella.h"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h"; sourceTree = ""; }; - ABDC74FFB2FBBD052E941151A2CC6E87 /* lax_der_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_parsing.c; path = Classes/secp256k1/contrib/lax_der_parsing.c; sourceTree = ""; }; - AE037589FFCAACA71A323801729DC4A8 /* Primitive Types.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Primitive Types.swift"; path = "SipHash/Primitive Types.swift"; sourceTree = ""; }; - AEC7A24CF8E56E0AB30884A90747F2B2 /* scrypt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-iOS-umbrella.h"; sourceTree = ""; }; - AF3BC8F62680B30207131C5C87008E38 /* field_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_impl.h; path = Classes/secp256k1/src/field_impl.h; sourceTree = ""; }; - AF778863EFEA29642AB012C4C5FC903D /* PromiseKit.root-CorePromise-Foundation.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "PromiseKit.root-CorePromise-Foundation.modulemap"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap"; sourceTree = ""; }; - B01CD4E7B7266FBC96F1DAE5B4F170F2 /* CTR.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CTR.swift; path = Sources/CryptoSwift/BlockMode/CTR.swift; sourceTree = ""; }; - B206B730E077834821DED823382B92DD /* secp256k1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = secp256k1.swift; path = Classes/secp256k1.swift; sourceTree = ""; }; - B2503DCCE1598BB4D7E580AB0CB8E807 /* BlockDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockDecryptor.swift; path = Sources/CryptoSwift/BlockDecryptor.swift; sourceTree = ""; }; - B2C015DFFE7F497B97D0DA1C8C7AB69E /* Words and Bits.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Words and Bits.swift"; path = "sources/Words and Bits.swift"; sourceTree = ""; }; - B334729A830AF9B565C76134288E4EDF /* Result-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Result-iOS.xcconfig"; sourceTree = ""; }; - B36AB396275697EEE1A5B13BA8A38FE3 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - B3C40AC9DDA22566EDFEC3F65AA62472 /* Generics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generics.swift; path = Sources/CryptoSwift/Generics.swift; sourceTree = ""; }; - B44892C52E2EF6449BEC05C26F4C7481 /* ecdsa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa.h; path = Classes/secp256k1/src/ecdsa.h; sourceTree = ""; }; - B465593568C60A48E4A42D1A047995E4 /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; - B4DF3EE5AB6E8CC14DA313527875575F /* AnyError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyError.swift; path = Result/AnyError.swift; sourceTree = ""; }; + A65DC6A2E9BC70E1F5211BFB9E2266E3 /* scalar_low_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low_impl.h; path = Classes/secp256k1/src/scalar_low_impl.h; sourceTree = ""; }; + A7530E3D35773A67134FC4EA93063F01 /* Utils+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Utils+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Utils+Foundation.swift"; sourceTree = ""; }; + A7A5666EAA8ADD7A2AA3ED33C8DC6028 /* hash_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash_impl.h; path = Classes/secp256k1/src/hash_impl.h; sourceTree = ""; }; + A81557551191339AD284647E9008F3BF /* BigInt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BigInt-iOS-dummy.m"; sourceTree = ""; }; + A8E64677621D080BA0F099180A4886F7 /* Cimpl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Cimpl.h; path = scrypt/Cimpl.h; sourceTree = ""; }; + A90907EC55F455C898F8D8E35C2908DC /* SHA1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA1.swift; path = Sources/CryptoSwift/SHA1.swift; sourceTree = ""; }; + AA57B8C185D40985D37E5A9E9CB7B3D6 /* HMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HMAC.swift; path = Sources/CryptoSwift/HMAC.swift; sourceTree = ""; }; + AC98E623829FE2C9F71C5C97B66118C8 /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; + ACBB5EB9CDB6065227935806FA94DC6B /* Hashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hashable.swift; path = sources/Hashable.swift; sourceTree = ""; }; + AD7DDD48316C5C9CF661C50B3D19698E /* fwd.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = fwd.h; path = Sources/fwd.h; sourceTree = ""; }; + ADC3E9B80B8AC54146B2DFEDA0142CAF /* BlockDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockDecryptor.swift; path = Sources/CryptoSwift/BlockDecryptor.swift; sourceTree = ""; }; + AE738DB7791144612A4D0951B0C43A7E /* UIView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.m"; sourceTree = ""; }; + AEC2C04096B2D2B92821B75319989EC8 /* StreamEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamEncryptor.swift; path = Sources/CryptoSwift/StreamEncryptor.swift; sourceTree = ""; }; + AF7AF6D769E4BBF1B2C201836A906130 /* field_5x52_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_impl.h; path = Classes/secp256k1/src/field_5x52_impl.h; sourceTree = ""; }; + B017F47BE0A65E45E065EA00452F0D28 /* BufferStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BufferStorage.swift; path = scrypt/scrypt/BufferStorage.swift; sourceTree = ""; }; + B16FB18636FBF37732FFEDB58EF77090 /* Addition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Addition.swift; path = sources/Addition.swift; sourceTree = ""; }; + B184A67AF0236537BEE898D90E946942 /* secp256k1.c */ = {isa = PBXFileReference; includeInIndex = 1; name = secp256k1.c; path = Classes/secp256k1/src/secp256k1.c; sourceTree = ""; }; + B276DAA5AD0B968F80A0769180CCC012 /* scalar_low.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low.h; path = Classes/secp256k1/src/scalar_low.h; sourceTree = ""; }; + B3729C94C12C882F36F0F22DD2AA6ED2 /* Result-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-iOS-prefix.pch"; sourceTree = ""; }; + B508E0F1A0F3142EB46882B0104D6F6B /* Floating Point Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Floating Point Conversion.swift"; path = "sources/Floating Point Conversion.swift"; sourceTree = ""; }; B7762E4245191B27674EB7EB82DCFFF1 /* Pods-web3swift-macOS_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-macOS_Tests.debug.xcconfig"; sourceTree = ""; }; - B78A9314F721CE7FE8EE68290ACF962A /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; - B8FBDD9B6C2C480F597AF54E4AF5F9B7 /* Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Padding.swift; path = Sources/CryptoSwift/Padding.swift; sourceTree = ""; }; - B943A73349F77F75B8C3055D2E94C04C /* field.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field.h; path = Classes/secp256k1/src/field.h; sourceTree = ""; }; - B95DAAA20BEFAD1CE76C888E2E5DDB01 /* scrypt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "scrypt-iOS-dummy.m"; sourceTree = ""; }; - B983E877B34D130C7F0E41197599CAF5 /* field_5x52.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52.h; path = Classes/secp256k1/src/field_5x52.h; sourceTree = ""; }; + B7CB9A9AD1846703E487266D4F3BCCBB /* scalar_8x32.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32.h; path = Classes/secp256k1/src/scalar_8x32.h; sourceTree = ""; }; + B89A9869F658850405B3C9B8EEB11C88 /* BigInt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-umbrella.h"; sourceTree = ""; }; + B9E4625A0B76DCA266EA9671890C8721 /* SHA3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA3.swift; path = Sources/CryptoSwift/SHA3.swift; sourceTree = ""; }; + BA4DC9927DEE120B1F101C5D3C546B09 /* CryptoSwift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CryptoSwift-iOS-dummy.m"; sourceTree = ""; }; + BA5CA30AC50EF9F974BA8C9CA66250F4 /* SwiftRLP-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftRLP-macOS-umbrella.h"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h"; sourceTree = ""; }; BAD613601EE703E9FF05CEC481713273 /* libPods-web3swift-iOS_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-iOS_Tests.a"; path = "libPods-web3swift-iOS_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - BADDDC4615BBD4973A52693314F92956 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Configuration.swift; sourceTree = ""; }; - BAE868DDC6B50E704178E9C6A7BCDE4C /* Comparable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Comparable.swift; path = sources/Comparable.swift; sourceTree = ""; }; - BAF5556D32E479626438702FBB2B206E /* race.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = race.m; path = Sources/race.m; sourceTree = ""; }; - BB99BF8C95F80E710325AC9BE5A0BE72 /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; - BBB1686A6F8A3ECF8119E0B9026493AA /* scalar_low.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low.h; path = Classes/secp256k1/src/scalar_low.h; sourceTree = ""; }; - BD5F7052BBE014CE84365A473B829050 /* PromiseKit.root-CorePromise-Foundation.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "PromiseKit.root-CorePromise-Foundation.xcconfig"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.xcconfig"; sourceTree = ""; }; - BE0E6B0DB6C8369C0409240023B753BD /* RLP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RLP.swift; path = Classes/RLP.swift; sourceTree = ""; }; - BED38F4200E2E27BE7EF1306C1EF481F /* CryptoSwift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "CryptoSwift-macOS-dummy.m"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-dummy.m"; sourceTree = ""; }; - C0D7A0114EB8569F1C403A6574C016E8 /* Checksum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Checksum.swift; path = Sources/CryptoSwift/Checksum.swift; sourceTree = ""; }; - C2394F66C9B9661F4F0C5813E12A79FD /* RandomUInt64.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomUInt64.swift; path = SipHash/RandomUInt64.swift; sourceTree = ""; }; - C281F97ACB222EFF0925F55036D61858 /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PromiseKit.modulemap; sourceTree = ""; }; - C37796C11F19D8A45631C9218E297AEA /* scalar_low_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low_impl.h; path = Classes/secp256k1/src/scalar_low_impl.h; sourceTree = ""; }; - C496DED0A0B25D608237C1717DF67DAB /* Result-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Result-macOS-prefix.pch"; path = "../Result-macOS/Result-macOS-prefix.pch"; sourceTree = ""; }; - C518BE2221DCB8E9775CF59E3A6C676C /* ecmult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult.h; path = Classes/secp256k1/src/ecmult.h; sourceTree = ""; }; - C529FA6121A76BCDB8492FD5C6DB5D6D /* secp256k1_recovery.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_recovery.h; path = Classes/secp256k1/include/secp256k1_recovery.h; sourceTree = ""; }; - C562B65B849889DAD0291CF90F4A579F /* scrypt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "scrypt-iOS.modulemap"; sourceTree = ""; }; - C5660E081BC2DA61D02571E01B81C8FE /* scalar.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar.h; path = Classes/secp256k1/src/scalar.h; sourceTree = ""; }; - C59B01CF94D3592EF9F0F9D53C69D829 /* Bitwise Ops.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bitwise Ops.swift"; path = "sources/Bitwise Ops.swift"; sourceTree = ""; }; - C59C9D4690B77F7F188FFCA0081A3AA2 /* SHA2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA2.swift; path = Sources/CryptoSwift/SHA2.swift; sourceTree = ""; }; - C5ACF2BE50EB881C466468619A626459 /* num_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_impl.h; path = Classes/secp256k1/src/num_impl.h; sourceTree = ""; }; - C5EEF0BE65E670AC2535547ABA3099C4 /* PromiseKit.root-CorePromise-Foundation-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PromiseKit.root-CorePromise-Foundation-dummy.m"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-dummy.m"; sourceTree = ""; }; - C8877687340A48EE91240BE1793F223E /* Result-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "Result-macOS.modulemap"; path = "../Result-macOS/Result-macOS.modulemap"; sourceTree = ""; }; - C8E8AD7E4D46EAFE301BAE49458CBADF /* GCD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCD.swift; path = sources/GCD.swift; sourceTree = ""; }; - C98E405B0267998743280361FC7A320B /* Data Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data Conversion.swift"; path = "sources/Data Conversion.swift"; sourceTree = ""; }; - C9B8D6BE88B58CC5E8D7E0021C88A419 /* CryptoSwift-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "CryptoSwift-iOS.xcconfig"; sourceTree = ""; }; - CABC07B9B526CE22A328B2F116773029 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PromiseKit.root-CorePromise-Foundation-umbrella.h"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h"; sourceTree = ""; }; - CACDBA26EFF10F14AAD8F7B3DB4F650E /* BatchedCollection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BatchedCollection.swift; path = Sources/CryptoSwift/BatchedCollection.swift; sourceTree = ""; }; - CCA64A8640FCCC40E3412423E039371A /* scrypt-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "scrypt-macOS.xcconfig"; path = "../scrypt-macOS/scrypt-macOS.xcconfig"; sourceTree = ""; }; - CD229288A14A42E6F98A2F3F4C019A9D /* SipHashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHashable.swift; path = SipHash/SipHashable.swift; sourceTree = ""; }; - CDAA0D27CD19660853301F0480DFD849 /* SwiftRLP-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SwiftRLP-iOS.xcconfig"; sourceTree = ""; }; - CEA00FFA03F2405A1DD8AAB823BC5CAF /* Exponentiation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Exponentiation.swift; path = sources/Exponentiation.swift; sourceTree = ""; }; - CEACC0FFCDDB8D3FD78976F0CAE8FD61 /* ecdsa_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa_impl.h; path = Classes/secp256k1/src/ecdsa_impl.h; sourceTree = ""; }; - D007141D6A0D170999FBC71CD9227F3F /* Blowfish+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Blowfish+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift"; sourceTree = ""; }; - D093F93E69099A9C2F8327DD338BA151 /* secp256k1_swift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "secp256k1_swift-macOS.modulemap"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap"; sourceTree = ""; }; - D099C2689CE8838D1CBF7B7310B03821 /* SHA1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA1.swift; path = Sources/CryptoSwift/SHA1.swift; sourceTree = ""; }; - D1E1805F59DD3B99C4A24A6B69DA1738 /* SHA3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA3.swift; path = Sources/CryptoSwift/SHA3.swift; sourceTree = ""; }; + BB95DBC141DB412EAF90DE75B00EE345 /* CMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CMAC.swift; path = Sources/CryptoSwift/CMAC.swift; sourceTree = ""; }; + BC6C4D45E9DD5B4669397278183B8A6D /* PromiseKit.root-CorePromise-Foundation.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "PromiseKit.root-CorePromise-Foundation.xcconfig"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.xcconfig"; sourceTree = ""; }; + BE6305D1DE9131CFB173AC969FDB1092 /* secp256k1_ecdh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_ecdh.h; path = Classes/secp256k1/include/secp256k1_ecdh.h; sourceTree = ""; }; + BFC0489E9BD48E1BE679A7A9A3B4D875 /* secp256k1_swift-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-iOS-prefix.pch"; sourceTree = ""; }; + BFC2F7559BA52B8D992D11A537D7FEBE /* CryptoSwift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "CryptoSwift-macOS-dummy.m"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-dummy.m"; sourceTree = ""; }; + C02A5DDAE1965271228C7E856C9987C3 /* PBKDF1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF1.swift; path = Sources/CryptoSwift/PKCS/PBKDF1.swift; sourceTree = ""; }; + C0B695B584A94039305F17CD2B5470FB /* Exponentiation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Exponentiation.swift; path = sources/Exponentiation.swift; sourceTree = ""; }; + C0D976FDA3B329F00236A2F1D4C6B378 /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; + C33EA4F090C90D1AE636D3B40ECFA945 /* firstly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = firstly.swift; path = Sources/firstly.swift; sourceTree = ""; }; + C4434E5B7050EF71B04AEAE88F303455 /* Blowfish.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Blowfish.swift; path = Sources/CryptoSwift/Blowfish.swift; sourceTree = ""; }; + C504B703D6897FF1896886916748D0D6 /* ZeroPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZeroPadding.swift; path = Sources/CryptoSwift/ZeroPadding.swift; sourceTree = ""; }; + C533250E0867F5CF90717B90B4450C63 /* PromiseKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; + C535818543FB132F5085E5ED501095D0 /* Guarantee.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Guarantee.swift; path = Sources/Guarantee.swift; sourceTree = ""; }; + C5648942F9F59CF9D06030DB7B64423A /* secp256k1_recovery.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_recovery.h; path = Classes/secp256k1/include/secp256k1_recovery.h; sourceTree = ""; }; + C7E88808C507E7B039F9595A82EBFA36 /* SwiftRLP-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SwiftRLP-macOS.xcconfig"; path = "../SwiftRLP-macOS/SwiftRLP-macOS.xcconfig"; sourceTree = ""; }; + C83C510AD112596C90B76C308A60DF14 /* Integer Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Integer Conversion.swift"; path = "sources/Integer Conversion.swift"; sourceTree = ""; }; + C8EA9E5ADEC0526C987DC2B55F8E04B5 /* SipHasher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHasher.swift; path = SipHash/SipHasher.swift; sourceTree = ""; }; + C906CE7510F7153C35950FD44AE3C571 /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/CryptoSwift/Operators.swift; sourceTree = ""; }; + CCFDF41D2D776C88B83F392CB5FD7499 /* PromiseKit.root-CorePromise-Foundation-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PromiseKit.root-CorePromise-Foundation-dummy.m"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-dummy.m"; sourceTree = ""; }; + CD2614924B987A4DF27727D9ABE96822 /* scrypt-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "scrypt-macOS-umbrella.h"; path = "../scrypt-macOS/scrypt-macOS-umbrella.h"; sourceTree = ""; }; + CD4C2245061DDD251D7082A04D84F218 /* CryptoSwift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CryptoSwift-macOS-umbrella.h"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h"; sourceTree = ""; }; + CDD971533936CC3705E267598BF53A93 /* UInt128.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UInt128.swift; path = Sources/CryptoSwift/UInt128.swift; sourceTree = ""; }; + CE82C576F4D863F22181DF0D90DA8533 /* scalar_4x64_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64_impl.h; path = Classes/secp256k1/src/scalar_4x64_impl.h; sourceTree = ""; }; + CEDD84C820765F4B8C5826D1B122200E /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; + CEF60C13887D74275029301DCC6A1149 /* scalar_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_impl.h; path = Classes/secp256k1/src/scalar_impl.h; sourceTree = ""; }; + D016DA64236C44F87FFCE97A6F0A0E06 /* BlockEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockEncryptor.swift; path = Sources/CryptoSwift/BlockEncryptor.swift; sourceTree = ""; }; + D0C6A6AAF1849184B1A8916E223E9BCB /* String+FoundationExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FoundationExtension.swift"; path = "Sources/CryptoSwift/Foundation/String+FoundationExtension.swift"; sourceTree = ""; }; + D0E5F085DD39FA26739ECAD91284C1F2 /* ecdsa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa.h; path = Classes/secp256k1/src/ecdsa.h; sourceTree = ""; }; + D111E53D728978DA7C689AD4AFDCA963 /* Thenable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Thenable.swift; path = Sources/Thenable.swift; sourceTree = ""; }; + D11A10393AAAF35194650B10A6ADE234 /* secp256k1_swift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "secp256k1_swift-macOS-umbrella.h"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h"; sourceTree = ""; }; D40BD5126F631E22619456FA8B7796CD /* libBigInt-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libBigInt-macOS.a"; path = "libBigInt-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - D459A9A71D9584F44D50CCE76CA32DE1 /* libsecp256k1-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "libsecp256k1-config.h"; path = "Classes/libsecp256k1-config.h"; sourceTree = ""; }; - D58F3D9D1A1143135DA2F393DCD07C5C /* String+FoundationExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FoundationExtension.swift"; path = "Sources/CryptoSwift/Foundation/String+FoundationExtension.swift"; sourceTree = ""; }; - D5BEE6336571D98DA94C9A54C8CE9623 /* UIViewPropertyAnimator+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewPropertyAnimator+Promise.swift"; path = "Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift"; sourceTree = ""; }; - D5C83A501FE934B15E0B51546A92E079 /* Result-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Result-iOS.modulemap"; sourceTree = ""; }; - D606F2C64242F4C4424FF77060007794 /* ecmult_gen_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen_impl.h; path = Classes/secp256k1/src/ecmult_gen_impl.h; sourceTree = ""; }; - D7E660F6E2F237440138C5AAC5BC6476 /* Addition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Addition.swift; path = sources/Addition.swift; sourceTree = ""; }; - D8E5FF3E2A379FE71CD1EEE3BB380DD0 /* CipherModeWorker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CipherModeWorker.swift; path = Sources/CryptoSwift/BlockMode/CipherModeWorker.swift; sourceTree = ""; }; - D8F35E00F2D89D45B3441C99BA910A82 /* NSURLSession+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLSession+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.m"; sourceTree = ""; }; + D4F3DB8A969B504C000E0BD68E9DF848 /* Rabbit+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Rabbit+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift"; sourceTree = ""; }; + D5FF562EECDB0679D662D82F7A5AF6C0 /* UIView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Extensions/UIKit/Sources/UIView+Promise.swift"; sourceTree = ""; }; + D67B21BD5ECE586715CDCB8EF9F84E24 /* SecureBytes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SecureBytes.swift; path = Sources/CryptoSwift/SecureBytes.swift; sourceTree = ""; }; D8F688145BCFE1FB8B76299CC261A05E /* Pods-web3swift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swift-iOS-dummy.m"; sourceTree = ""; }; - D9FE34B65B17D095EB1999C6F5667427 /* AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; DA900039B5D199745C785144030E7BF9 /* Pods-web3swift-macOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swift-macOS-acknowledgements.markdown"; sourceTree = ""; }; + DABE6207D44D964FBF0C1EB8B82F13A5 /* Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Utils.swift; path = Sources/CryptoSwift/Utils.swift; sourceTree = ""; }; DB805D8CD6E362AD3B2474D5C6D7EA6E /* libPromiseKit.root-CorePromise-Foundation.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPromiseKit.root-CorePromise-Foundation.a"; path = "libPromiseKit.root-CorePromise-Foundation.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + DC010BC54E6C05686BE227F75B04535D /* field_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_impl.h; path = Classes/secp256k1/src/field_impl.h; sourceTree = ""; }; + DC03B1A635B5BB3ABD74980E5A3FFCF1 /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = sources/Random.swift; sourceTree = ""; }; + DC3D6E08FC4B31786E28A3DD414DE71C /* MD5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MD5.swift; path = Sources/CryptoSwift/MD5.swift; sourceTree = ""; }; + DCC85A555F579FA10EC96590296D9288 /* CipherModeWorker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CipherModeWorker.swift; path = Sources/CryptoSwift/BlockMode/CipherModeWorker.swift; sourceTree = ""; }; DCCD9B75F811575B41254E2EACE6F115 /* Pods-web3swift-macOS_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swift-macOS_Tests-acknowledgements.plist"; sourceTree = ""; }; - DD23C6C5D50E713EB68838F0DB9E3BDE /* SwiftRLP-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SwiftRLP-macOS-dummy.m"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-dummy.m"; sourceTree = ""; }; - DE18F02725D9CF95A5B3FB51CFF87AE1 /* SipHash-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SipHash-macOS-prefix.pch"; path = "../SipHash-macOS/SipHash-macOS-prefix.pch"; sourceTree = ""; }; - DE18F632CE594C2E2CCA9A0490532CB3 /* StreamEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamEncryptor.swift; path = Sources/CryptoSwift/StreamEncryptor.swift; sourceTree = ""; }; - E13B83B6C950F75854459F690EF3A6ED /* firstly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = firstly.swift; path = Sources/firstly.swift; sourceTree = ""; }; - E1B2A6CA027F0CF17E40FED49D6A5E70 /* ecmult_const.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const.h; path = Classes/secp256k1/src/ecmult_const.h; sourceTree = ""; }; - E25079B9D829E2FA59A02142ACC823BA /* UIView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.m"; sourceTree = ""; }; - E3315426BF4C8B74BC7DAAADC2F23895 /* SipHash-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SipHash-iOS.xcconfig"; sourceTree = ""; }; - E390C18F83747553B781457B8A520926 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; - E39980D5A8BD94928885C59ED6F3555D /* PromiseKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; + DF2520CE6C39BFEF4B6C9B87DA7047AD /* HKDF.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HKDF.swift; path = Sources/CryptoSwift/HKDF.swift; sourceTree = ""; }; + E0D2913DF679358122E366AA30A31733 /* ecmult_gen.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen.h; path = Classes/secp256k1/src/ecmult_gen.h; sourceTree = ""; }; + E0E2C657091728E6CC4D8093DA13C072 /* group.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group.h; path = Classes/secp256k1/src/group.h; sourceTree = ""; }; + E330212AA4C3537D541AD9C197932C16 /* CBCMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBCMAC.swift; path = Sources/CryptoSwift/CBCMAC.swift; sourceTree = ""; }; E3ADB0156604A4FD7CD47B25248088C2 /* Pods-web3swift-iOS_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-iOS_Tests.release.xcconfig"; sourceTree = ""; }; - E4D6786B6A1F1F3D12539CE8845D610B /* Data+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Extension.swift"; path = "Sources/CryptoSwift/Foundation/Data+Extension.swift"; sourceTree = ""; }; - E748C35C819EB524EA9D3EAE51962FD9 /* Result-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Result-macOS.xcconfig"; path = "../Result-macOS/Result-macOS.xcconfig"; sourceTree = ""; }; + E4211F7070401959F35EE92C5214007C /* NSObject+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Extensions/Foundation/Sources/NSObject+Promise.swift"; sourceTree = ""; }; + E473E833B6236676C6F4E9274FEE290D /* num_gmp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp.h; path = Classes/secp256k1/src/num_gmp.h; sourceTree = ""; }; + E5253ADE5894EBF14D938D154E2B0227 /* field_10x26_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26_impl.h; path = Classes/secp256k1/src/field_10x26_impl.h; sourceTree = ""; }; + E590EF6D990EA299BA2660A1BC53DEB9 /* CryptoSwift-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CryptoSwift-macOS-prefix.pch"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; sourceTree = ""; }; + E684DB7BA3E633421079ECE297E5C154 /* Subtraction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Subtraction.swift; path = sources/Subtraction.swift; sourceTree = ""; }; + E6D16C3019A7CC7FFDD41C97E69DCB84 /* Rabbit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rabbit.swift; path = Sources/CryptoSwift/Rabbit.swift; sourceTree = ""; }; E931DAD7852F3C297E4BB3A0A4928BCB /* libCryptoSwift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libCryptoSwift-macOS.a"; path = "libCryptoSwift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - E941110ECDF06A93786B9FC7BCC46C75 /* scrypt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-iOS-prefix.pch"; sourceTree = ""; }; - E9D1AAD6C106478E5F24A9CE500AB6A6 /* SipHash-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SipHash-macOS.modulemap"; path = "../SipHash-macOS/SipHash-macOS.modulemap"; sourceTree = ""; }; - EA753F9B4F076BBCCE353572BDBA6EAE /* CustomStringConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomStringConvertible.swift; path = Sources/CustomStringConvertible.swift; sourceTree = ""; }; - EA9B1AD24E2B5EFD0840B6FD38C85994 /* DigestType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DigestType.swift; path = Sources/CryptoSwift/DigestType.swift; sourceTree = ""; }; + E9584FC30610F2691B4EB045534020D8 /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h"; sourceTree = ""; }; + E9F009B8B3BE27687063703C35463B71 /* BatchedCollection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BatchedCollection.swift; path = Sources/CryptoSwift/BatchedCollection.swift; sourceTree = ""; }; + EA0E1E254A8A60AE7835DB964A9891CD /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; + EA7E3E2AA7DDB383A58F583E451F6C05 /* field_5x52_asm_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_asm_impl.h; path = Classes/secp256k1/src/field_5x52_asm_impl.h; sourceTree = ""; }; EAE702C1BF30A6CA8F718732EC9270FF /* libSwiftRLP-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSwiftRLP-iOS.a"; path = "libSwiftRLP-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - EC74A6C891271F3176D0A8781C35C2D0 /* Int+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Int+Extension.swift"; path = "Sources/CryptoSwift/Int+Extension.swift"; sourceTree = ""; }; - F0551BCBA17CFD8A37D9E9C9F95EB6D0 /* AES+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AES+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/AES+Foundation.swift"; sourceTree = ""; }; - F0BE0F8D8AB5D3091421F18BD6A6A10D /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift"; sourceTree = ""; }; - F342E030AE1A607D64EAC3488CFB51FC /* PBKDF1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF1.swift; path = Sources/CryptoSwift/PKCS/PBKDF1.swift; sourceTree = ""; }; - F415B88D0858CD731ECC4C37D0E1F83A /* SecureBytes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SecureBytes.swift; path = Sources/CryptoSwift/SecureBytes.swift; sourceTree = ""; }; - F421A94F9F1E378421F3B3C56314E368 /* eckey_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey_impl.h; path = Classes/secp256k1/src/eckey_impl.h; sourceTree = ""; }; + EB554DF617A1C02E83AC1D59855D1C02 /* SipHash-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-iOS-prefix.pch"; sourceTree = ""; }; + EC9440034E7256986111FBC505567C26 /* secp256k1_swift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-iOS-umbrella.h"; sourceTree = ""; }; + ECD10A42BA1863127F0B89583918A25F /* Result-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Result-iOS.modulemap"; sourceTree = ""; }; + ED52325262247A4879433CE3D7BA1251 /* Int+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Int+Extension.swift"; path = "Sources/CryptoSwift/Int+Extension.swift"; sourceTree = ""; }; + ED58AECF3C5444FBDEB7453CDD6D6A96 /* Checksum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Checksum.swift; path = Sources/CryptoSwift/Checksum.swift; sourceTree = ""; }; + EE76562D54EFA48803D8FF2937F3AB0A /* scrypt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-iOS-prefix.pch"; sourceTree = ""; }; + EEB151B14FA1CAF4FB16D76AE7F505AC /* Cipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cipher.swift; path = Sources/CryptoSwift/Cipher.swift; sourceTree = ""; }; + EEF44FF851A27BCE1872F1FEBF9A9440 /* CryptoSwift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-iOS-umbrella.h"; sourceTree = ""; }; + F041C44E58385737D071918EF8503628 /* SipHash-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SipHash-macOS-prefix.pch"; path = "../SipHash-macOS/SipHash-macOS-prefix.pch"; sourceTree = ""; }; + F04918D981D6BA6B8E1B45E4C1D23089 /* SipHash-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SipHash-iOS-dummy.m"; sourceTree = ""; }; + F10DABC5ADF2971E57D527449B163046 /* BigInt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-prefix.pch"; sourceTree = ""; }; + F31913059D849B57CB91C3B18F4D92EB /* Prime Test.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Prime Test.swift"; path = "sources/Prime Test.swift"; sourceTree = ""; }; + F40F91A4B7758F182DBA05D9C974003E /* scrypt-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "scrypt-macOS.xcconfig"; path = "../scrypt-macOS/scrypt-macOS.xcconfig"; sourceTree = ""; }; F45D1FF9B0F3BEACB34D069C6F3561F8 /* Pods-web3swift-iOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swift-iOS-acknowledgements.markdown"; sourceTree = ""; }; - F4723853D29831D8D4EC86E13EF15FDA /* CMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CMAC.swift; path = Sources/CryptoSwift/CMAC.swift; sourceTree = ""; }; - F4C1DB7075FC89AABC9027B89E410DD0 /* Hashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hashable.swift; path = sources/Hashable.swift; sourceTree = ""; }; - F80A642AA09FE49288321BA985716AD2 /* Array+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Array+Foundation.swift"; sourceTree = ""; }; - F8C9CB2FB683934AF634C1D10008133A /* scrypt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "scrypt-macOS.modulemap"; path = "../scrypt-macOS/scrypt-macOS.modulemap"; sourceTree = ""; }; - F95154420EF4C760231BA7CBA1A7589A /* PCBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PCBC.swift; path = Sources/CryptoSwift/BlockMode/PCBC.swift; sourceTree = ""; }; - F9891F2E1A2F4A5890CC52561833FA78 /* SipHasher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHasher.swift; path = SipHash/SipHasher.swift; sourceTree = ""; }; - F9E6DDE5A0AF4D0B343E4D3AEE9DF983 /* Collection+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Collection+Extension.swift"; path = "Sources/CryptoSwift/Collection+Extension.swift"; sourceTree = ""; }; - FADA29CA311EF9A86381521A5E4C366B /* Shifts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Shifts.swift; path = sources/Shifts.swift; sourceTree = ""; }; - FF4E4FB6D0F71C472A99E72F368087E0 /* Result-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-iOS-dummy.m"; sourceTree = ""; }; - FF99AA927653D804503A7BA37208076D /* field_5x52_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_impl.h; path = Classes/secp256k1/src/field_5x52_impl.h; sourceTree = ""; }; + F465EA5AEC974D4B2AAFFFC2768A91D7 /* afterlife.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Extensions/Foundation/Sources/afterlife.swift; sourceTree = ""; }; + F5740FDA157E822449AD928A2FC56532 /* SwiftRLP.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftRLP.h; path = SwiftRLP/SwiftRLP.h; sourceTree = ""; }; + F6060667D5D66C779C8BC742A2C7F5F6 /* UInt16+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt16+Extension.swift"; path = "Sources/CryptoSwift/UInt16+Extension.swift"; sourceTree = ""; }; + F6176C709F1F11238FCAF958F9A75741 /* ChaCha20+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ChaCha20+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift"; sourceTree = ""; }; + FBF7CDA54705306F388A9AB6943D5D1A /* SwiftRLP-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SwiftRLP-iOS.xcconfig"; sourceTree = ""; }; + FD06C0D0FAAE077E5B527EA88B8727B1 /* NSURLSession+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLSession+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.m"; sourceTree = ""; }; + FDD33C66C9AA88CB20039B91D106C3BE /* RandomUInt64.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomUInt64.swift; path = SipHash/RandomUInt64.swift; sourceTree = ""; }; + FDD6DAB9ACD231BAA0226331BDE67975 /* BlockMode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockMode.swift; path = Sources/CryptoSwift/BlockMode/BlockMode.swift; sourceTree = ""; }; + FE57BC224E219C65382BB751CCED649D /* Data Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data Conversion.swift"; path = "sources/Data Conversion.swift"; sourceTree = ""; }; + FE6C08A1761D32580CB3EE6E91B5E379 /* field.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field.h; path = Classes/secp256k1/src/field.h; sourceTree = ""; }; + FF238B78A8B1951C382DC7D8C0DA9412 /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.h"; sourceTree = ""; }; + FFA38A7573EBA79AA83EBCA62742C2CA /* CryptoSwift-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "CryptoSwift-iOS.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -966,7 +975,7 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 3250F01FAF9D5E03E02CB4DCD423DB05 /* Frameworks */ = { + 49DDA0C2610D394C727D7031E3440CCF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -1001,7 +1010,7 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 70A99D175AB74D144C6CFD96B60AA491 /* Frameworks */ = { + 6F6453F76274AE713CC0D3CD28EB9C36 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -1159,172 +1168,297 @@ path = "Target Support Files/Pods-web3swift-iOS_Tests"; sourceTree = ""; }; - 0B5A3E0CC65F7553C04A6E5297B32E24 /* Support Files */ = { + 0F8D2E47FE03D3B91B51069F7C273AF4 /* Frameworks */ = { isa = PBXGroup; children = ( - 71949CED7683B7766F5B86149AFB03D5 /* SwiftRLP-iOS.modulemap */, - CDAA0D27CD19660853301F0480DFD849 /* SwiftRLP-iOS.xcconfig */, - A11B379994D50482D207EE8967ED7CDF /* SwiftRLP-iOS-dummy.m */, - 8200921DBAF2BD006E2F13F1F9D5A8C9 /* SwiftRLP-iOS-prefix.pch */, - 477087D23BFCDB50922E829E500EC396 /* SwiftRLP-iOS-umbrella.h */, - 8C60838D5062772223AD4E011F01E513 /* SwiftRLP-macOS.modulemap */, - 168126FF7C51CFAB97039CE513235D26 /* SwiftRLP-macOS.xcconfig */, - DD23C6C5D50E713EB68838F0DB9E3BDE /* SwiftRLP-macOS-dummy.m */, - 1AB58E68E90BDAD2A75EC97AEC91F499 /* SwiftRLP-macOS-prefix.pch */, - A7E72167B9780D5627571A312AE1B751 /* SwiftRLP-macOS-umbrella.h */, ); - name = "Support Files"; - path = "../Target Support Files/SwiftRLP-iOS"; + name = Frameworks; sourceTree = ""; }; - 0F8D2E47FE03D3B91B51069F7C273AF4 /* Frameworks */ = { + 15ED0F64262A5239BFC80BDA3AFECD20 /* CorePromise */ = { isa = PBXGroup; children = ( + 02EAAF0A84187F4281AB39EBD7DA1B34 /* after.m */, + 3386525472CC553FF40B3AFEE8BCE2DD /* after.swift */, + AC98E623829FE2C9F71C5C97B66118C8 /* AnyPromise.h */, + 18E4AB7C0ABCF3AEC6B3979EC294536E /* AnyPromise.m */, + 61BA4F5A7AAF223AA3BDA0BF814905AA /* AnyPromise.swift */, + 79370D5C826074DD91DB303B75EACE7D /* Box.swift */, + 9DFFAA6FC4E6A7DCD0DA8AE064B792DA /* Catchable.swift */, + 2D86C75595B41479AB364568AB89F857 /* Configuration.swift */, + 6246D2591B9DFE5339771AC0AF2EA3CA /* CustomStringConvertible.swift */, + 63D47A1599387D37CCA850DB9256283A /* Deprecations.swift */, + 93F2C29FA3412D0329780F52C1DD2931 /* dispatch_promise.m */, + 80D7D244BE8CFD16A741C5261EA757D6 /* Error.swift */, + C33EA4F090C90D1AE636D3B40ECFA945 /* firstly.swift */, + AD7DDD48316C5C9CF661C50B3D19698E /* fwd.h */, + C535818543FB132F5085E5ED501095D0 /* Guarantee.swift */, + CEDD84C820765F4B8C5826D1B122200E /* hang.m */, + 6D957F2AECF5A8A0E9C7CCE2A55B6C69 /* hang.swift */, + EA0E1E254A8A60AE7835DB964A9891CD /* join.m */, + 73AF6510FE79C3D2EDBCE691D07F6E5E /* Promise.swift */, + C533250E0867F5CF90717B90B4450C63 /* PromiseKit.h */, + 8E89406E7E995881E48051C7EC4C9DCB /* race.m */, + 66D54E1981BA238733A8A5E65484B2B5 /* race.swift */, + 092DD25F9A8FD52F554B41FA11289B4C /* Resolver.swift */, + D111E53D728978DA7C689AD4AFDCA963 /* Thenable.swift */, + A4420324C5657482ABEBDA0BB3C73802 /* when.m */, + C0D976FDA3B329F00236A2F1D4C6B378 /* when.swift */, ); - name = Frameworks; + name = CorePromise; sourceTree = ""; }; - 46CC7F8505D714EA98CC3893D6FC79FC /* scrypt */ = { + 1F160E42E243D1D1DB459D9E7F412751 /* PromiseKit */ = { isa = PBXGroup; children = ( - 029D928F404FA2893E2304CF78B3D8A4 /* BufferStorage.swift */, - 070EBBE505C1F8FCD5F159DDBB5D41C7 /* Cimpl.c */, - 42B2FCE41642FF2B0CA0939EDCA3AD78 /* Cimpl.h */, - A493659FF25FE0BB4CA590271A53BFB6 /* Salsa.swift */, - 42E8817F1CAA2069A5B0A1A0D0ABA398 /* scrypt.h */, - 7AAE07003CED08DD7BCB8AC108A4773B /* Scrypt.swift */, - 626EEF9D696A4E065764705C0F3422FA /* Support Files */, + 15ED0F64262A5239BFC80BDA3AFECD20 /* CorePromise */, + 688E5591DF92C26F674C6863E621649A /* Foundation */, + 67374C05B866118D6EF84A2C25572819 /* Support Files */, + BDEB2A43D2221D8016FA7E76367811E1 /* UIKit */, ); - name = scrypt; - path = scrypt; + name = PromiseKit; + path = PromiseKit; + sourceTree = ""; + }; + 39DFA4602C912016E7B290E983B4A7F6 /* CryptoSwift */ = { + isa = PBXGroup; + children = ( + 0CF0657C69B458EBD464B4F7EF2A1758 /* AEAD.swift */, + 2DCDC3F74F1C62E2161FC76EF265BED7 /* AEADChaCha20Poly1305.swift */, + 897BD312EFC7F005946FCA64E8B5D3F3 /* AES.swift */, + 09E31D2F88F4FB6EC4A90B888DF591B7 /* AES+Foundation.swift */, + A130AE149844CDF96BEAFC7381997641 /* AES.Cryptors.swift */, + 7A45DEA061F03DB9EB78391B810792DD /* Array+Extension.swift */, + 9DE9FBA3C3EB5037CAB66A887E9BC6DE /* Array+Foundation.swift */, + 55FA26B75C99F4847087C9104EE38E8F /* Authenticator.swift */, + E9F009B8B3BE27687063703C35463B71 /* BatchedCollection.swift */, + 551CAAEDDC5AAACAA24E8A5A86721E97 /* Bit.swift */, + 699D800F72CE09977D6EE1687D706BD6 /* BlockCipher.swift */, + ADC3E9B80B8AC54146B2DFEDA0142CAF /* BlockDecryptor.swift */, + D016DA64236C44F87FFCE97A6F0A0E06 /* BlockEncryptor.swift */, + FDD6DAB9ACD231BAA0226331BDE67975 /* BlockMode.swift */, + 66858822A1651FBD671091155D387A8B /* BlockModeOptions.swift */, + C4434E5B7050EF71B04AEAE88F303455 /* Blowfish.swift */, + 93E416B2CCEC4490652DE3889013CC4A /* Blowfish+Foundation.swift */, + 3F60E6D7F6C28A5DF688920FB74829E4 /* CBC.swift */, + E330212AA4C3537D541AD9C197932C16 /* CBCMAC.swift */, + 627C056A389B2501608E18EFAD762A6B /* CCM.swift */, + 903BE66455FF2F03FD9540A7E5914EC7 /* CFB.swift */, + 46F1CC3195EF29E61FD820B624C49746 /* ChaCha20.swift */, + F6176C709F1F11238FCAF958F9A75741 /* ChaCha20+Foundation.swift */, + ED58AECF3C5444FBDEB7453CDD6D6A96 /* Checksum.swift */, + EEB151B14FA1CAF4FB16D76AE7F505AC /* Cipher.swift */, + DCC85A555F579FA10EC96590296D9288 /* CipherModeWorker.swift */, + BB95DBC141DB412EAF90DE75B00EE345 /* CMAC.swift */, + 57D914B6D4F8590AF8E3BA6863DB778B /* Collection+Extension.swift */, + 9FC6C3CA2D135767617F5F276FF395CC /* CompactMap.swift */, + 03938C581D805E7DEA7EF7935F6B4E61 /* Cryptor.swift */, + 21CDB590E00AE3873562308E5110A4D8 /* Cryptors.swift */, + 0D4AFA48362F6E5DF72006F39A5F32A5 /* CTR.swift */, + 69B4D5C4EED1973AF5815173AB05729B /* Data+Extension.swift */, + 0439A7FDEC4F611C9334DEC15FA25F1B /* Digest.swift */, + 8AA2EF5FFE50FBD8EAB6BEA39D23C942 /* DigestType.swift */, + 37BA5803AF780ED8A2ABA135BAA03479 /* ECB.swift */, + 7E27EDB736A99A27C20F82D22DC4A707 /* GCM.swift */, + 59C55840D303F469F1F31EE4867563E5 /* Generics.swift */, + DF2520CE6C39BFEF4B6C9B87DA7047AD /* HKDF.swift */, + AA57B8C185D40985D37E5A9E9CB7B3D6 /* HMAC.swift */, + 660B0734DFD6D8C99EE70FDF836AD891 /* HMAC+Foundation.swift */, + ED52325262247A4879433CE3D7BA1251 /* Int+Extension.swift */, + DC3D6E08FC4B31786E28A3DD414DE71C /* MD5.swift */, + 365AB600024749D54E0AD6D59FC28749 /* NoPadding.swift */, + 9B108AA63200D2A6992501E7B76EF6A0 /* OFB.swift */, + C906CE7510F7153C35950FD44AE3C571 /* Operators.swift */, + 6EA534EDF19829F1927C7991BF2EEC2F /* Padding.swift */, + C02A5DDAE1965271228C7E856C9987C3 /* PBKDF1.swift */, + 6FACAD9F572878C98D14B56672DE004C /* PBKDF2.swift */, + 96CDA4C5CCCD8DD001D5D629E860B631 /* PCBC.swift */, + 8D97871DE06423066D52CDBE28B74B3B /* PKCS5.swift */, + 83BD9FC5270AA1FFFF0B01504C9B8BB7 /* PKCS7.swift */, + 9AD9ED798FEF891C4A3123685AB25017 /* PKCS7Padding.swift */, + 71B12B455685D2F4F116288D0FE808FE /* Poly1305.swift */, + E6D16C3019A7CC7FFDD41C97E69DCB84 /* Rabbit.swift */, + D4F3DB8A969B504C000E0BD68E9DF848 /* Rabbit+Foundation.swift */, + 3F58565031EE07098E585B5C3FCC7442 /* RandomBytesSequence.swift */, + D67B21BD5ECE586715CDCB8EF9F84E24 /* SecureBytes.swift */, + A90907EC55F455C898F8D8E35C2908DC /* SHA1.swift */, + A5C805181714272769BB5BCEA4814B1D /* SHA2.swift */, + B9E4625A0B76DCA266EA9671890C8721 /* SHA3.swift */, + 32019641A223A260B54A3A6633B0BF19 /* StreamDecryptor.swift */, + AEC2C04096B2D2B92821B75319989EC8 /* StreamEncryptor.swift */, + 5B2EDCF2255BD0D829F03B0C1BD0A060 /* String+Extension.swift */, + D0C6A6AAF1849184B1A8916E223E9BCB /* String+FoundationExtension.swift */, + CDD971533936CC3705E267598BF53A93 /* UInt128.swift */, + F6060667D5D66C779C8BC742A2C7F5F6 /* UInt16+Extension.swift */, + 276BA53B2960C2B624579741823D9DD2 /* UInt32+Extension.swift */, + 44BE339EC0BDEB80B98E8D988708993F /* UInt64+Extension.swift */, + 5B061B14116ABEE15B3CE99517103317 /* UInt8+Extension.swift */, + 61A90B8C29D973CF2BEE2A33224ACBEF /* Updatable.swift */, + DABE6207D44D964FBF0C1EB8B82F13A5 /* Utils.swift */, + A7530E3D35773A67134FC4EA93063F01 /* Utils+Foundation.swift */, + C504B703D6897FF1896886916748D0D6 /* ZeroPadding.swift */, + 9B02CB12B4E3FBEF788C7B68B6161612 /* Support Files */, + ); + name = CryptoSwift; + path = CryptoSwift; sourceTree = ""; }; - 4C681E95E22596A4FD865B6B2817D37D /* Support Files */ = { + 465EBB6008CEC55DAD0DFAA7BAB50B26 /* Support Files */ = { isa = PBXGroup; children = ( - C281F97ACB222EFF0925F55036D61858 /* PromiseKit.modulemap */, - 3031AC0CB5B141FF9911BEBE31A46493 /* PromiseKit.xcconfig */, - 0543DFF3F653D9C90A60EB28027C61D8 /* PromiseKit-dummy.m */, - 318283844314BF1D931F35920923C71E /* PromiseKit-prefix.pch */, - 23603E526EB11889D028149C843F4B49 /* PromiseKit-umbrella.h */, - AF778863EFEA29642AB012C4C5FC903D /* PromiseKit.root-CorePromise-Foundation.modulemap */, - BD5F7052BBE014CE84365A473B829050 /* PromiseKit.root-CorePromise-Foundation.xcconfig */, - C5EEF0BE65E670AC2535547ABA3099C4 /* PromiseKit.root-CorePromise-Foundation-dummy.m */, - 77E3BF2EAFA71BF47C10920D60404EE9 /* PromiseKit.root-CorePromise-Foundation-prefix.pch */, - CABC07B9B526CE22A328B2F116773029 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */, + 4747F3231587AB7A49FAEC31459E0E5A /* BigInt-iOS.modulemap */, + 77419BCFFD51D71BDCD33CDB50A1DC50 /* BigInt-iOS.xcconfig */, + A81557551191339AD284647E9008F3BF /* BigInt-iOS-dummy.m */, + F10DABC5ADF2971E57D527449B163046 /* BigInt-iOS-prefix.pch */, + B89A9869F658850405B3C9B8EEB11C88 /* BigInt-iOS-umbrella.h */, + 8488F4ACF6A5A83E41E4C406582AB2C9 /* BigInt-macOS.modulemap */, + 43CCBB7CEE935A6D645B18B87E5F1A5E /* BigInt-macOS.xcconfig */, + 555457AF50F888167C28CEA34B14AAE1 /* BigInt-macOS-dummy.m */, + 1E012EBA689C972E69BCBC4B98909AD6 /* BigInt-macOS-prefix.pch */, + 9CBD2032E8E6117EFD2C15AC9E728128 /* BigInt-macOS-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/PromiseKit"; + path = "../Target Support Files/BigInt-iOS"; sourceTree = ""; }; - 6001D0F553FDEC1064F2E9179A232865 /* CorePromise */ = { + 500695EA7F9BD491B9D1B83B8B251DB6 /* Support Files */ = { isa = PBXGroup; children = ( - E390C18F83747553B781457B8A520926 /* after.m */, - 889ED076F99BD2AB4920EC9A5ECAFFDE /* after.swift */, - 0376FB05CE1FC3FC061DD2CFE3DE0C6C /* AnyPromise.h */, - 3C665B9B4606D9A35F9DFFB15EEB9F10 /* AnyPromise.m */, - D9FE34B65B17D095EB1999C6F5667427 /* AnyPromise.swift */, - 56831D861C9C68AB6445D1B373489CCD /* Box.swift */, - 9D7A3998EBD9688668E8B5E865E058BC /* Catchable.swift */, - BADDDC4615BBD4973A52693314F92956 /* Configuration.swift */, - EA753F9B4F076BBCCE353572BDBA6EAE /* CustomStringConvertible.swift */, - 51DF3FC4A067409E953FF230FC67D985 /* Deprecations.swift */, - 9C8C505AC16C4F7922DBC4160AC3448C /* dispatch_promise.m */, - 4A91DDD53F519E555416888F6747C0D5 /* Error.swift */, - E13B83B6C950F75854459F690EF3A6ED /* firstly.swift */, - 2EDFAD6F2EC5C3407650B54B9A5A4BE8 /* fwd.h */, - 4DA63B5CD137C32932CDB5DB0C7A036C /* Guarantee.swift */, - 0EE7FF1850E0AF1A3C0492541BEFE030 /* hang.m */, - 4DB7550812E8FC8658862B062E0A8D6C /* hang.swift */, - B465593568C60A48E4A42D1A047995E4 /* join.m */, - 0D23E94B867181F85C5901C85231758D /* Promise.swift */, - E39980D5A8BD94928885C59ED6F3555D /* PromiseKit.h */, - BAF5556D32E479626438702FBB2B206E /* race.m */, - 15F24BE71856015EE791D78582312743 /* race.swift */, - 1E8B5D15467ED805F6B33150518D8C10 /* Resolver.swift */, - 7CA875E3478CF42FACB3165CBFAE86BD /* Thenable.swift */, - 38B4EB729C6E19E85E5F7500BBFCACF4 /* when.m */, - 335A62646C32DC8B2185FA6DD3030CA6 /* when.swift */, + 87F900B38D104B7DA2F876FEF130BE54 /* SwiftRLP-iOS.modulemap */, + FBF7CDA54705306F388A9AB6943D5D1A /* SwiftRLP-iOS.xcconfig */, + 1BFCF7E8508743BB12B3D3A3C1AFF821 /* SwiftRLP-iOS-dummy.m */, + 03D50310E3C531327909D2D92D68AE95 /* SwiftRLP-iOS-prefix.pch */, + 07A9C5839E7875E75F4AF91C0C630CB2 /* SwiftRLP-iOS-umbrella.h */, + 9E3F254D4EBA717445160AB2A3C16AE5 /* SwiftRLP-macOS.modulemap */, + C7E88808C507E7B039F9595A82EBFA36 /* SwiftRLP-macOS.xcconfig */, + 4AF7FD66A2EBEED268628A0D0FE4E74D /* SwiftRLP-macOS-dummy.m */, + 971DE8258824419E3875862D386B0558 /* SwiftRLP-macOS-prefix.pch */, + BA5CA30AC50EF9F974BA8C9CA66250F4 /* SwiftRLP-macOS-umbrella.h */, ); - name = CorePromise; + name = "Support Files"; + path = "../Target Support Files/SwiftRLP-iOS"; sourceTree = ""; }; - 61792E5369CB89AA2F94DFF4E72EFEE9 /* secp256k1_swift */ = { + 514C4F100A5BC1252ACC9205AF231647 /* secp256k1_swift */ = { isa = PBXGroup; children = ( - 928C9306D44A4F06DEDCFDA02220D548 /* basic-config.h */, - B44892C52E2EF6449BEC05C26F4C7481 /* ecdsa.h */, - CEACC0FFCDDB8D3FD78976F0CAE8FD61 /* ecdsa_impl.h */, - 3E4050C50BE4522F2AB113A1EC5B6ABB /* eckey.h */, - F421A94F9F1E378421F3B3C56314E368 /* eckey_impl.h */, - C518BE2221DCB8E9775CF59E3A6C676C /* ecmult.h */, - E1B2A6CA027F0CF17E40FED49D6A5E70 /* ecmult_const.h */, - 67580A9D6645C39D002E66190B1B2B66 /* ecmult_const_impl.h */, - 7B6B5F54FE477086DE9224F151F9D3EA /* ecmult_gen.h */, - D606F2C64242F4C4424FF77060007794 /* ecmult_gen_impl.h */, - 3D757EF89803E12ABE5A6DC9D35431A5 /* ecmult_impl.h */, - B943A73349F77F75B8C3055D2E94C04C /* field.h */, - 88F32E8C457272E137BB38662B42445E /* field_10x26.h */, - 88AC1F107B9BEA598C0726780ECDFE87 /* field_10x26_impl.h */, - B983E877B34D130C7F0E41197599CAF5 /* field_5x52.h */, - 156AC0832786D6E41B095D6E8DD29AC8 /* field_5x52_asm_impl.h */, - FF99AA927653D804503A7BA37208076D /* field_5x52_impl.h */, - 3714BDD6BC325B4A3AA0AEB00B7E0838 /* field_5x52_int128_impl.h */, - AF3BC8F62680B30207131C5C87008E38 /* field_impl.h */, - 7663F04B24B87395872D526DC48DC43C /* group.h */, - 0CCC239B4BCB58F6EF7C6E22E0D80102 /* group_impl.h */, - 9A30230BA7EA4657EA54DDA7AB7B05FD /* hash.h */, - A689F9898FAC7D6BEBFC64BDDB5CCD33 /* hash_impl.h */, - ABDC74FFB2FBBD052E941151A2CC6E87 /* lax_der_parsing.c */, - 6C03433156B044F013B91599EE579C7D /* lax_der_parsing.h */, - 8D81EA62567426F4F97BA1EE4F993378 /* lax_der_privatekey_parsing.c */, - 69DAF4AC1AD4ABE697F2A9B28B2742A9 /* lax_der_privatekey_parsing.h */, - D459A9A71D9584F44D50CCE76CA32DE1 /* libsecp256k1-config.h */, - 53097BBB7E450CEA3B67F503C72EE715 /* main_impl.h */, - 3DE637C08FD6A423A48096E7D58B1610 /* main_impl.h */, - 9ABF1DE4DC6AE445BD89E628E2CF5E94 /* num.h */, - 3F87EE960E154529EE1313BDE796C821 /* num_gmp.h */, - 406DA39A86D0ADCD3E417FD3B1B405F8 /* num_gmp_impl.h */, - C5ACF2BE50EB881C466468619A626459 /* num_impl.h */, - C5660E081BC2DA61D02571E01B81C8FE /* scalar.h */, - 36E46262C102F8CBB9AC5809B82A532D /* scalar_4x64.h */, - 00A9E16D69CA56EBD70D7C0B65E06FA1 /* scalar_4x64_impl.h */, - 5C26BABFAE3BF83287E05135793873F6 /* scalar_8x32.h */, - 110E47A2CC58E6173023BB094B2410E4 /* scalar_8x32_impl.h */, - 2B2BE4EB401907B31121C20D9AE85D04 /* scalar_impl.h */, - BBB1686A6F8A3ECF8119E0B9026493AA /* scalar_low.h */, - C37796C11F19D8A45631C9218E297AEA /* scalar_low_impl.h */, - 638D0AE5AF7E8F2016849D61CA3C54E4 /* scratch.h */, - 611BA1395C8C441142D55E0EA236E429 /* scratch_impl.h */, - 8B8AE60B95D9DA9615B03EE888C7F908 /* secp256k1.c */, - 15F777495520F311DC5F6185975B769C /* secp256k1.h */, - B206B730E077834821DED823382B92DD /* secp256k1.swift */, - 10063C7AE612FA73E113299D752D2F9A /* secp256k1_ecdh.h */, - C529FA6121A76BCDB8492FD5C6DB5D6D /* secp256k1_recovery.h */, - 7EECFB1BF73B6EB0684317B85E2EA08E /* util.h */, - F8C717E0B243C4C5C37F1A1BEAC0D082 /* Support Files */, + 853BAAA89F1726DECCF03BC01BBDC64C /* basic-config.h */, + D0E5F085DD39FA26739ECAD91284C1F2 /* ecdsa.h */, + 80ED01586B28193ED2BE26DEF9B57A3C /* ecdsa_impl.h */, + 07BA44CF1EA491F2DE0FFA66AADF2764 /* eckey.h */, + 7A83A5B7F0434C3FACA671C5A20D8389 /* eckey_impl.h */, + 221F16DEDE441F76365153C8EC2D64E3 /* ecmult.h */, + A3D2730C3BE7868E162AB4F297A3A7DE /* ecmult_const.h */, + 8045272A42A0784613BD7057AA86803C /* ecmult_const_impl.h */, + E0D2913DF679358122E366AA30A31733 /* ecmult_gen.h */, + 938A29097DE727896422B7DD937D51E3 /* ecmult_gen_impl.h */, + A19805DB694C14E29F255EA2BB4603A5 /* ecmult_impl.h */, + FE6C08A1761D32580CB3EE6E91B5E379 /* field.h */, + 44131C334B408CABBB3E84FE9BEDD5BE /* field_10x26.h */, + E5253ADE5894EBF14D938D154E2B0227 /* field_10x26_impl.h */, + 1A48FBA7E324AABD9DA453C780537C79 /* field_5x52.h */, + EA7E3E2AA7DDB383A58F583E451F6C05 /* field_5x52_asm_impl.h */, + AF7AF6D769E4BBF1B2C201836A906130 /* field_5x52_impl.h */, + 89276AC70A47E00E5E08DB5C8D91C6C4 /* field_5x52_int128_impl.h */, + DC010BC54E6C05686BE227F75B04535D /* field_impl.h */, + E0E2C657091728E6CC4D8093DA13C072 /* group.h */, + 306BDC01729FF834ADC364D1DDD4797A /* group_impl.h */, + 74E396D4A3CBCFA52283FA71BFE1ED4C /* hash.h */, + A7A5666EAA8ADD7A2AA3ED33C8DC6028 /* hash_impl.h */, + 4B659053EBDBE68F9EB1137C3AFCC9F8 /* lax_der_parsing.c */, + 2765A0C6E2BE64A4D0916D30633BEA7E /* lax_der_parsing.h */, + 0194B6C18C95261082F349271D42FE44 /* lax_der_privatekey_parsing.c */, + 2707FB70F6217313CE3FE9D9B5606CDB /* lax_der_privatekey_parsing.h */, + 11F7F4CE35D426643C8DE5645FF76713 /* libsecp256k1-config.h */, + 1A3ADB1AB7700B235D79CA3AEB2E8540 /* main_impl.h */, + 5E959F3AA4E4F1850C7F42B923C77DDB /* main_impl.h */, + 3C97CDE8E28215118A8265A78EF509D0 /* num.h */, + E473E833B6236676C6F4E9274FEE290D /* num_gmp.h */, + 6E138D3C3327A0AC400395EA7B85D13A /* num_gmp_impl.h */, + 970421396A3184DB620CB61E8AE71F58 /* num_impl.h */, + 8BE4DB426382B15B10062329955F15CC /* scalar.h */, + 3BF5A3B81AA637876B3E5AA4D5F124AA /* scalar_4x64.h */, + CE82C576F4D863F22181DF0D90DA8533 /* scalar_4x64_impl.h */, + B7CB9A9AD1846703E487266D4F3BCCBB /* scalar_8x32.h */, + 433536C0066CD933A793F8B42877435F /* scalar_8x32_impl.h */, + CEF60C13887D74275029301DCC6A1149 /* scalar_impl.h */, + B276DAA5AD0B968F80A0769180CCC012 /* scalar_low.h */, + A65DC6A2E9BC70E1F5211BFB9E2266E3 /* scalar_low_impl.h */, + 57FE015BCC95654092B0ADF05585E987 /* scratch.h */, + 1BC5C341B16D41330279E713831347D9 /* scratch_impl.h */, + B184A67AF0236537BEE898D90E946942 /* secp256k1.c */, + 8674CB477181A24AA72377A5EF2E312C /* secp256k1.h */, + 4B00C58B6D526DBDFF8307C6DA1AFDF1 /* secp256k1.swift */, + BE6305D1DE9131CFB173AC969FDB1092 /* secp256k1_ecdh.h */, + C5648942F9F59CF9D06030DB7B64423A /* secp256k1_recovery.h */, + A094ABEA6C6E0AD5B87D62BB32AEA3DA /* util.h */, + A5C4D9D7AFF383E08F48064F0547394D /* Support Files */, ); name = secp256k1_swift; path = secp256k1_swift; sourceTree = ""; }; - 626EEF9D696A4E065764705C0F3422FA /* Support Files */ = { + 5FFD514D176791D2012564885C0B358D /* SipHash */ = { + isa = PBXGroup; + children = ( + 78593F1D5D512221956B4CC2A7432B88 /* Primitive Types.swift */, + FDD33C66C9AA88CB20039B91D106C3BE /* RandomUInt64.swift */, + 12BFFA790DC1A19DFC5018C9B37267D2 /* SipHashable.swift */, + C8EA9E5ADEC0526C987DC2B55F8E04B5 /* SipHasher.swift */, + 968E195A239C7A2A779AF02DF8828396 /* Support Files */, + ); + name = SipHash; + path = SipHash; + sourceTree = ""; + }; + 67374C05B866118D6EF84A2C25572819 /* Support Files */ = { isa = PBXGroup; children = ( - C562B65B849889DAD0291CF90F4A579F /* scrypt-iOS.modulemap */, - A91F063F0878CD71B91FA6F40B94A8DD /* scrypt-iOS.xcconfig */, - B95DAAA20BEFAD1CE76C888E2E5DDB01 /* scrypt-iOS-dummy.m */, - E941110ECDF06A93786B9FC7BCC46C75 /* scrypt-iOS-prefix.pch */, - AEC7A24CF8E56E0AB30884A90747F2B2 /* scrypt-iOS-umbrella.h */, - F8C9CB2FB683934AF634C1D10008133A /* scrypt-macOS.modulemap */, - CCA64A8640FCCC40E3412423E039371A /* scrypt-macOS.xcconfig */, - 056B0F39C844D4045CA15B32CA96A334 /* scrypt-macOS-dummy.m */, - 6F12EBB6BE5A983DB0FE7EBD486FC10B /* scrypt-macOS-prefix.pch */, - 55674F039B757742790CC41D400D1B28 /* scrypt-macOS-umbrella.h */, + A4072CCBD9D1A294C38285818FBFDA5F /* PromiseKit.modulemap */, + 40497EC0B9D6C3A291AA63F310A549A2 /* PromiseKit.xcconfig */, + 6DF453CEA7E128C1691A0713421CFBBF /* PromiseKit-dummy.m */, + 74076E38030CF36CF2DEBA8446B2B156 /* PromiseKit-prefix.pch */, + 8C3AF144309D8E77765BE0E32200497A /* PromiseKit-umbrella.h */, + 90AB4B8A04595134BFA9D538282F4E41 /* PromiseKit.root-CorePromise-Foundation.modulemap */, + BC6C4D45E9DD5B4669397278183B8A6D /* PromiseKit.root-CorePromise-Foundation.xcconfig */, + CCFDF41D2D776C88B83F392CB5FD7499 /* PromiseKit.root-CorePromise-Foundation-dummy.m */, + 98C1FF45802004439456C8A350D9155A /* PromiseKit.root-CorePromise-Foundation-prefix.pch */, + 5B88EAF15DEC2D3207C78A1C1F11E1B1 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/scrypt-iOS"; + path = "../Target Support Files/PromiseKit"; + sourceTree = ""; + }; + 67F59D2A962E5817273BE58A4B0131FA /* Result */ = { + isa = PBXGroup; + children = ( + 665306D3A9323800337BE1451D8960E7 /* AnyError.swift */, + 7DC64F1DE162445FC5F9F8F1A2C818B1 /* NoError.swift */, + 61F02670BA786ECE5640E0C70EA68888 /* Result.swift */, + 0E3C47D7844F81394427D09B0454A241 /* ResultProtocol.swift */, + 77555C3E6947E6A6C19AF6E5B994282A /* Support Files */, + ); + name = Result; + path = Result; + sourceTree = ""; + }; + 688E5591DF92C26F674C6863E621649A /* Foundation */ = { + isa = PBXGroup; + children = ( + F465EA5AEC974D4B2AAFFFC2768A91D7 /* afterlife.swift */, + E9584FC30610F2691B4EB045534020D8 /* NSNotificationCenter+AnyPromise.h */, + 28668B0DE54AE4E51942A5F50596975C /* NSNotificationCenter+AnyPromise.m */, + 8798FA9542F2175AA660CDB635E6D6BC /* NSNotificationCenter+Promise.swift */, + E4211F7070401959F35EE92C5214007C /* NSObject+Promise.swift */, + 2C71245535F05C90A42683076576BB26 /* NSTask+AnyPromise.h */, + 8C64B4995F9A0EBB5D4B5F27B33FB054 /* NSTask+AnyPromise.m */, + 0C7D493F1212B046A7AAFC8351D67E4D /* NSURLSession+AnyPromise.h */, + FD06C0D0FAAE077E5B527EA88B8727B1 /* NSURLSession+AnyPromise.m */, + 39B4575A57EFE3A0630FA12FAE346202 /* NSURLSession+Promise.swift */, + 9E2278C6E7F3F4C4A66132D0E8E0517D /* PMKFoundation.h */, + 937DFD5ACC6B392C3B22DD0605410F52 /* Process+Promise.swift */, + ); + name = Foundation; sourceTree = ""; }; 6FE5839A998F9D581E5060F0675BF53C /* Pods-web3swift-macOS */ = { @@ -1342,51 +1476,50 @@ path = "Target Support Files/Pods-web3swift-macOS"; sourceTree = ""; }; - 7135BE39A41BACFFF57CF2DA06FCA63A /* Foundation */ = { + 77555C3E6947E6A6C19AF6E5B994282A /* Support Files */ = { isa = PBXGroup; children = ( - 4C0010565A5FA9F18F27870EA632C4D3 /* afterlife.swift */, - A84CAC1E9ED891BB925E32AD866EF4F8 /* NSNotificationCenter+AnyPromise.h */, - 52AF65D13B97A0EAA5CC2F9AF6450786 /* NSNotificationCenter+AnyPromise.m */, - F0BE0F8D8AB5D3091421F18BD6A6A10D /* NSNotificationCenter+Promise.swift */, - 1ED8894D488852DD8E6F75780785F814 /* NSObject+Promise.swift */, - A1EC79FCBA910623842C72C09D10B874 /* NSTask+AnyPromise.h */, - 63A1F06664FED90C2B7F7989990F9EE3 /* NSTask+AnyPromise.m */, - 592D721B3C087135B76612BE7D7B3701 /* NSURLSession+AnyPromise.h */, - D8F35E00F2D89D45B3441C99BA910A82 /* NSURLSession+AnyPromise.m */, - 213FB9632182CBF9A72A027B86282B5C /* NSURLSession+Promise.swift */, - 2D0614C48A73B812DC34E2FA48DD6F42 /* PMKFoundation.h */, - 62DAA30A02BECECD3B564F1546CE3343 /* Process+Promise.swift */, + ECD10A42BA1863127F0B89583918A25F /* Result-iOS.modulemap */, + 0C016E31F7E35964F636011F294536FD /* Result-iOS.xcconfig */, + 1F4BECA22FA3D5D535FC714D0B2B9EB8 /* Result-iOS-dummy.m */, + B3729C94C12C882F36F0F22DD2AA6ED2 /* Result-iOS-prefix.pch */, + 3E49C5D9CD234FDC2304F413D1314EE4 /* Result-iOS-umbrella.h */, + 8A22A5D6311176FFB8CFC5A84B52E457 /* Result-macOS.modulemap */, + 40BFCBA4E1D706A666116029D5E0E726 /* Result-macOS.xcconfig */, + 0D7A08C10688F2510948C9E9742DFF65 /* Result-macOS-dummy.m */, + 6BBC74867F1126D0DB48249F01662F36 /* Result-macOS-prefix.pch */, + 011262F92057423AD4ECF708E415898D /* Result-macOS-umbrella.h */, ); - name = Foundation; + name = "Support Files"; + path = "../Target Support Files/Result-iOS"; sourceTree = ""; }; - 721B03F83DE13DAFDC6542331CAAEF2D /* BigInt */ = { + 77F760D6602BE418D145528348B2C2B5 /* BigInt */ = { isa = PBXGroup; children = ( - D7E660F6E2F237440138C5AAC5BC6476 /* Addition.swift */, - 38253CDBFF833980FA0956A34E1BF0C7 /* BigInt.swift */, - 1AE91BB385A7A2911773305870D337C6 /* BigUInt.swift */, - C59B01CF94D3592EF9F0F9D53C69D829 /* Bitwise Ops.swift */, - 7840B3270C6F5BC3A89FE4E3AE641898 /* Codable.swift */, - BAE868DDC6B50E704178E9C6A7BCDE4C /* Comparable.swift */, - C98E405B0267998743280361FC7A320B /* Data Conversion.swift */, - 260C8496D4BED6EDC41A2FBCF2E87AC6 /* Division.swift */, - CEA00FFA03F2405A1DD8AAB823BC5CAF /* Exponentiation.swift */, - 9DC3346C75E669B5227A78FA15785FB3 /* Floating Point Conversion.swift */, - C8E8AD7E4D46EAFE301BAE49458CBADF /* GCD.swift */, - F4C1DB7075FC89AABC9027B89E410DD0 /* Hashable.swift */, - A46C4FE304316D231AC48D068F15FE99 /* Integer Conversion.swift */, - 75D9DF88CC9C33DAC01E5EFCB0B1513D /* Multiplication.swift */, - 6B9D04508C62F823AFD89A1CA232315E /* Prime Test.swift */, - 02BE2C0884A4C644A5B276E1781D2DCA /* Random.swift */, - FADA29CA311EF9A86381521A5E4C366B /* Shifts.swift */, - 3B4944DF61F05FF099C70B6640B4431D /* Square Root.swift */, - 10AB7CE8E7FA7C93448EFE94CFEE2C62 /* Strideable.swift */, - 648DE2BEBFB01CEB5B721BA04955EAF1 /* String Conversion.swift */, - 98D3DA59A50F70D87A13DF72C6E649E1 /* Subtraction.swift */, - B2C015DFFE7F497B97D0DA1C8C7AB69E /* Words and Bits.swift */, - BD3DBFC1664E2C7581FBF6EA50E35743 /* Support Files */, + B16FB18636FBF37732FFEDB58EF77090 /* Addition.swift */, + 851772A4A36B2700215C3B972F05BB10 /* BigInt.swift */, + 1B685BD86E597E436351119CA4A20736 /* BigUInt.swift */, + 161C2D9657DC967FFAC2A37D48134D76 /* Bitwise Ops.swift */, + 9727D8BDEB33BD75AB806BC0A3EC155C /* Codable.swift */, + 983B0C09BEC11115522233D05D8F47D1 /* Comparable.swift */, + FE57BC224E219C65382BB751CCED649D /* Data Conversion.swift */, + 0974D06B8BD99ADFA971B50A5A2B38CE /* Division.swift */, + C0B695B584A94039305F17CD2B5470FB /* Exponentiation.swift */, + B508E0F1A0F3142EB46882B0104D6F6B /* Floating Point Conversion.swift */, + 167A6E691DFD15BA9883036B14F41D03 /* GCD.swift */, + ACBB5EB9CDB6065227935806FA94DC6B /* Hashable.swift */, + C83C510AD112596C90B76C308A60DF14 /* Integer Conversion.swift */, + 1B27C53CBFBCBC1E6466F7294EFBEA93 /* Multiplication.swift */, + F31913059D849B57CB91C3B18F4D92EB /* Prime Test.swift */, + DC03B1A635B5BB3ABD74980E5A3FFCF1 /* Random.swift */, + 0CCB1D05E6EF6E5D33F3A993B98DD675 /* Shifts.swift */, + 91EFA6BFEDFE86C5744B8A08BD45CC1D /* Square Root.swift */, + 705526D46CF8710526DEFD6A81185AFA /* Strideable.swift */, + 07BD7441D03BCED026093ADE867666D4 /* String Conversion.swift */, + E684DB7BA3E633421079ECE297E5C154 /* Subtraction.swift */, + 4FE4AFACA87A9BC9B7F46A7AAD878E33 /* Words and Bits.swift */, + 465EBB6008CEC55DAD0DFAA7BAB50B26 /* Support Files */, ); name = BigInt; path = BigInt; @@ -1395,273 +1528,152 @@ 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( - B36AB396275697EEE1A5B13BA8A38FE3 /* Podfile */, + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 0F8D2E47FE03D3B91B51069F7C273AF4 /* Frameworks */, - AA8E7F4C055950D0F3783484CBF7F6CE /* Pods */, + 959815D7C3AFCB9AD39A1AF770EA6A91 /* Pods */, 083C1381B3CFEF7D89B7A4A992CA51B1 /* Products */, 0016905C45F8F01C6D080425028330F0 /* Targets Support Files */, ); sourceTree = ""; }; - A7BC2BD4C2116FFAE210C93ECE658487 /* Support Files */ = { + 8ACB65C1763D3BB158F6CE4F35505E40 /* SwiftRLP */ = { isa = PBXGroup; children = ( - 8446B6BDDAE4F9F915BCB9730B980742 /* CryptoSwift-iOS.modulemap */, - C9B8D6BE88B58CC5E8D7E0021C88A419 /* CryptoSwift-iOS.xcconfig */, - 474420A8AF86D361C202C31C918E6BD3 /* CryptoSwift-iOS-dummy.m */, - 90B02C30596DAD79E18ADA8E1883B661 /* CryptoSwift-iOS-prefix.pch */, - 97E0EFD2C6E09D9A91E0B22FB199CF95 /* CryptoSwift-iOS-umbrella.h */, - 3EA34A9CDFC021862FD1AC06AF167E44 /* CryptoSwift-macOS.modulemap */, - 2863AEE30806CB2030DDC59D25CF1C36 /* CryptoSwift-macOS.xcconfig */, - BED38F4200E2E27BE7EF1306C1EF481F /* CryptoSwift-macOS-dummy.m */, - 23F8166C962F9CD1D6BD2E5891166222 /* CryptoSwift-macOS-prefix.pch */, - 2E7BEC4ABD719ED13864904F5601B1EB /* CryptoSwift-macOS-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/CryptoSwift-iOS"; - sourceTree = ""; - }; - AA8E7F4C055950D0F3783484CBF7F6CE /* Pods */ = { - isa = PBXGroup; - children = ( - 721B03F83DE13DAFDC6542331CAAEF2D /* BigInt */, - CE587F558C5FF1907FB3643991215B89 /* CryptoSwift */, - C1AD17F83F159B458EDDF71565DE82B7 /* PromiseKit */, - D45F6E5FDC7755F2007FC7EFCBDBF24A /* Result */, - 46CC7F8505D714EA98CC3893D6FC79FC /* scrypt */, - 61792E5369CB89AA2F94DFF4E72EFEE9 /* secp256k1_swift */, - B11247C91627ED7AB53FAEBAC426E1DB /* SipHash */, - EC8686C3474AC20563F3149326E6D2DF /* SwiftRLP */, - ); - name = Pods; - sourceTree = ""; - }; - AAB417525B4AA28CC55EECA7CFDAB251 /* Pods-web3swift-iOS */ = { - isa = PBXGroup; - children = ( - 79E925BEAA0533C58B6D9871B886DD8A /* Pods-web3swift-iOS.modulemap */, - F45D1FF9B0F3BEACB34D069C6F3561F8 /* Pods-web3swift-iOS-acknowledgements.markdown */, - 95C397E16B314F921F7784F00C8F183B /* Pods-web3swift-iOS-acknowledgements.plist */, - D8F688145BCFE1FB8B76299CC261A05E /* Pods-web3swift-iOS-dummy.m */, - 7E8C19543EF3AA4D9801DBE55E22E211 /* Pods-web3swift-iOS-umbrella.h */, - 042CC2D185140E7D725D22562A3E307F /* Pods-web3swift-iOS.debug.xcconfig */, - 673FFC4D2B959AB8AEC35D646A85CDCD /* Pods-web3swift-iOS.release.xcconfig */, + 955AD7671107B2FCAF7A725E38DA6513 /* RLP.swift */, + F5740FDA157E822449AD928A2FC56532 /* SwiftRLP.h */, + 500695EA7F9BD491B9D1B83B8B251DB6 /* Support Files */, ); - name = "Pods-web3swift-iOS"; - path = "Target Support Files/Pods-web3swift-iOS"; + name = SwiftRLP; + path = SwiftRLP; sourceTree = ""; }; - B11247C91627ED7AB53FAEBAC426E1DB /* SipHash */ = { + 8E6B0C1A447E80EA59FA65477BCF15E1 /* scrypt */ = { isa = PBXGroup; children = ( - AE037589FFCAACA71A323801729DC4A8 /* Primitive Types.swift */, - C2394F66C9B9661F4F0C5813E12A79FD /* RandomUInt64.swift */, - CD229288A14A42E6F98A2F3F4C019A9D /* SipHashable.swift */, - F9891F2E1A2F4A5890CC52561833FA78 /* SipHasher.swift */, - E1F02E842C04D8C75A2B95E3F260E0F2 /* Support Files */, + B017F47BE0A65E45E065EA00452F0D28 /* BufferStorage.swift */, + 3E6E7087B7CBB4230AEFE06A0586FEA1 /* Cimpl.c */, + A8E64677621D080BA0F099180A4886F7 /* Cimpl.h */, + 05760D356B4317540E7373046A1A3CD6 /* Salsa.swift */, + 318BC6D7199E76698CC662BB48AE0E81 /* scrypt.h */, + 0D20E70F3D0A72813BC2CD93F028FF1F /* Scrypt.swift */, + 9328B12651E2E02AA9441B1A29B58289 /* Support Files */, ); - name = SipHash; - path = SipHash; + name = scrypt; + path = scrypt; sourceTree = ""; }; - BD3DBFC1664E2C7581FBF6EA50E35743 /* Support Files */ = { + 9328B12651E2E02AA9441B1A29B58289 /* Support Files */ = { isa = PBXGroup; children = ( - 63D12DA56BB356A37E371C2040649482 /* BigInt-iOS.modulemap */, - 5E7DBCA26552356539B821BC83348925 /* BigInt-iOS.xcconfig */, - 7D484138780C581F7D2CE4E6D0544865 /* BigInt-iOS-dummy.m */, - 0D0DA104251AEFDE2964573040D291E1 /* BigInt-iOS-prefix.pch */, - 2B30858224DA96CA6252C6F11BF5F589 /* BigInt-iOS-umbrella.h */, - 36B1EE4309A9229BE3B132502B9072C0 /* BigInt-macOS.modulemap */, - 33D848500D6FCCF2177712A255BD02F3 /* BigInt-macOS.xcconfig */, - 97B24FD834901CF3D36423F68C485701 /* BigInt-macOS-dummy.m */, - 355524C7DC6BFC49391D4F5AFF2834BA /* BigInt-macOS-prefix.pch */, - 8E2064AA263189FCD4D283C9618B597A /* BigInt-macOS-umbrella.h */, + 7895D4EC130402D473CB15EDD68ACA2A /* scrypt-iOS.modulemap */, + 0475C2751B32FD3CB4D4A78B955F50F8 /* scrypt-iOS.xcconfig */, + 05829B47F24F4E5C604129AFF8534C15 /* scrypt-iOS-dummy.m */, + EE76562D54EFA48803D8FF2937F3AB0A /* scrypt-iOS-prefix.pch */, + 3992689C4E8FC6AE9958D04582793809 /* scrypt-iOS-umbrella.h */, + A4A8846DC8DC969B376FC38B435C87F8 /* scrypt-macOS.modulemap */, + F40F91A4B7758F182DBA05D9C974003E /* scrypt-macOS.xcconfig */, + 5B66168E0567CA1671C74F37384DD7B7 /* scrypt-macOS-dummy.m */, + 3965CA10F7B404A9629D09C0513F2A04 /* scrypt-macOS-prefix.pch */, + CD2614924B987A4DF27727D9ABE96822 /* scrypt-macOS-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/BigInt-iOS"; - sourceTree = ""; - }; - C1AD17F83F159B458EDDF71565DE82B7 /* PromiseKit */ = { - isa = PBXGroup; - children = ( - 6001D0F553FDEC1064F2E9179A232865 /* CorePromise */, - 7135BE39A41BACFFF57CF2DA06FCA63A /* Foundation */, - 4C681E95E22596A4FD865B6B2817D37D /* Support Files */, - FE928D414B5C71EF40AC25C320542734 /* UIKit */, - ); - name = PromiseKit; - path = PromiseKit; - sourceTree = ""; - }; - CE587F558C5FF1907FB3643991215B89 /* CryptoSwift */ = { - isa = PBXGroup; - children = ( - 01EF1089B1CD3D0F375289721DEB584C /* AEAD.swift */, - 0D1A84D8AEFDC828575F732E2005CA5B /* AEADChaCha20Poly1305.swift */, - 13F4C1E92ACB15583B361380492AA797 /* AES.swift */, - F0551BCBA17CFD8A37D9E9C9F95EB6D0 /* AES+Foundation.swift */, - 68C55BFCA12A87EB647D36A87908A1D1 /* AES.Cryptors.swift */, - 06F1FB18FDF42877A101BED0A4736B68 /* Array+Extension.swift */, - F80A642AA09FE49288321BA985716AD2 /* Array+Foundation.swift */, - 629A9B1DDCCA7AF069A948D996B8B34C /* Authenticator.swift */, - CACDBA26EFF10F14AAD8F7B3DB4F650E /* BatchedCollection.swift */, - 6304D4D79F57615EFD4626BF126CE5AD /* Bit.swift */, - 32B1BF3EB7A67274C92EEEEF1D636696 /* BlockCipher.swift */, - B2503DCCE1598BB4D7E580AB0CB8E807 /* BlockDecryptor.swift */, - 3E9C4AE3C0574C05D13445561BFB8C1B /* BlockEncryptor.swift */, - 68457844D0369DF25FAC63A7E42F3A5C /* BlockMode.swift */, - 247E11C8D6F6ECD1DF148F75673EBF35 /* BlockModeOptions.swift */, - 130F36C1478ABB13451E11EE5EC671CA /* Blowfish.swift */, - D007141D6A0D170999FBC71CD9227F3F /* Blowfish+Foundation.swift */, - A3A74DAAF802F643B5F00446BF21F89A /* CBC.swift */, - 65CE212AD1BE3547B620E83B3DA9E60F /* CFB.swift */, - 2E2A180DBC09C044075F60A0C97BFD85 /* ChaCha20.swift */, - 47CF4E411893D167B17A83AB51C8D53D /* ChaCha20+Foundation.swift */, - C0D7A0114EB8569F1C403A6574C016E8 /* Checksum.swift */, - 246EC9B3E3D924F7496163E4D7D5574B /* Cipher.swift */, - D8E5FF3E2A379FE71CD1EEE3BB380DD0 /* CipherModeWorker.swift */, - F4723853D29831D8D4EC86E13EF15FDA /* CMAC.swift */, - F9E6DDE5A0AF4D0B343E4D3AEE9DF983 /* Collection+Extension.swift */, - 04ECFBF1BF17192FF4F65A2E96AB714F /* CompactMap.swift */, - A9B9A712542DB104270D877BBE57746F /* Cryptor.swift */, - 67946900D6375AEDFA1C113E2A5B2794 /* Cryptors.swift */, - B01CD4E7B7266FBC96F1DAE5B4F170F2 /* CTR.swift */, - E4D6786B6A1F1F3D12539CE8845D610B /* Data+Extension.swift */, - 77A1B64DBD371FBCB805A100679F87A8 /* Digest.swift */, - EA9B1AD24E2B5EFD0840B6FD38C85994 /* DigestType.swift */, - 584C7F09DDD45569AE8365662DEFF8CA /* ECB.swift */, - 10EE3D627FD85D9AD1BDC05F433526A5 /* GCM.swift */, - B3C40AC9DDA22566EDFEC3F65AA62472 /* Generics.swift */, - 7FFE51D4F185433A05C0BD38B8F2A5CC /* HKDF.swift */, - 9197F30F9D372148520156A011421FE9 /* HMAC.swift */, - 354EE4D14557CE745D7020B65D22B49D /* HMAC+Foundation.swift */, - EC74A6C891271F3176D0A8781C35C2D0 /* Int+Extension.swift */, - 315EDC3BC73A24F07AB8D9FB44FEEF7D /* MD5.swift */, - 88EC012A11A5D51BC077A26441D4957B /* NoPadding.swift */, - 5DB98AE66675F1DDA4A420A12C0BFBC6 /* OFB.swift */, - 40B7ACE16AAEA76CA6C9CAE3FE7BFA5F /* Operators.swift */, - B8FBDD9B6C2C480F597AF54E4AF5F9B7 /* Padding.swift */, - F342E030AE1A607D64EAC3488CFB51FC /* PBKDF1.swift */, - 033169E66A1FD0955634FCFD42D50FA3 /* PBKDF2.swift */, - F95154420EF4C760231BA7CBA1A7589A /* PCBC.swift */, - 20BCC1D2F3127FBBB88BCCD1BCD6C558 /* PKCS5.swift */, - 292B7230F9D2EF13745202AD62870DFF /* PKCS7.swift */, - 9DBCB6B50C94F20FB7E7BC301A007798 /* PKCS7Padding.swift */, - 0046FAD665E019D5EFFFDFC7C04F79EE /* Poly1305.swift */, - 9D8AF6DE4770B6AAF9C6F56D533DB5A3 /* Rabbit.swift */, - 59163772C1016907FD12D819A604B18B /* Rabbit+Foundation.swift */, - 638EF15CE0F571BA9C2C5868DA40EBBE /* RandomBytesSequence.swift */, - F415B88D0858CD731ECC4C37D0E1F83A /* SecureBytes.swift */, - D099C2689CE8838D1CBF7B7310B03821 /* SHA1.swift */, - C59C9D4690B77F7F188FFCA0081A3AA2 /* SHA2.swift */, - D1E1805F59DD3B99C4A24A6B69DA1738 /* SHA3.swift */, - DE18F632CE594C2E2CCA9A0490532CB3 /* StreamEncryptor.swift */, - 8CBA3A66080B4CF784ADFED0326CBC82 /* String+Extension.swift */, - D58F3D9D1A1143135DA2F393DCD07C5C /* String+FoundationExtension.swift */, - 73E1C923DAF11E64DD39A52C483CBBB0 /* UInt128.swift */, - 6BECA27963AB5B81C6487F1AFF447EE3 /* UInt16+Extension.swift */, - 513D1D85D34F76B7E4DAE1B37103BC5A /* UInt32+Extension.swift */, - 75724C7E4D6EB3792635A031AD2B1492 /* UInt64+Extension.swift */, - 8BE11FDB9FE69A172C6101D8842D30EF /* UInt8+Extension.swift */, - 75335D15747F097BD0A9500504DC8775 /* Updatable.swift */, - 97C1287E8FD172526EC3409612A97C23 /* Utils.swift */, - 6954BF93957A2CAF08330D9214A7ACF2 /* Utils+Foundation.swift */, - 99490114EDAF958B866019F3B4C71077 /* ZeroPadding.swift */, - A7BC2BD4C2116FFAE210C93ECE658487 /* Support Files */, - ); - name = CryptoSwift; - path = CryptoSwift; + path = "../Target Support Files/scrypt-iOS"; sourceTree = ""; }; - D45F6E5FDC7755F2007FC7EFCBDBF24A /* Result */ = { + 959815D7C3AFCB9AD39A1AF770EA6A91 /* Pods */ = { isa = PBXGroup; children = ( - B4DF3EE5AB6E8CC14DA313527875575F /* AnyError.swift */, - 65695D88202B0FFFBE40038E32FBE234 /* NoError.swift */, - B78A9314F721CE7FE8EE68290ACF962A /* Result.swift */, - BB99BF8C95F80E710325AC9BE5A0BE72 /* ResultProtocol.swift */, - F428E795A6218A0503995E6302D472F5 /* Support Files */, + 77F760D6602BE418D145528348B2C2B5 /* BigInt */, + 39DFA4602C912016E7B290E983B4A7F6 /* CryptoSwift */, + 1F160E42E243D1D1DB459D9E7F412751 /* PromiseKit */, + 67F59D2A962E5817273BE58A4B0131FA /* Result */, + 8E6B0C1A447E80EA59FA65477BCF15E1 /* scrypt */, + 514C4F100A5BC1252ACC9205AF231647 /* secp256k1_swift */, + 5FFD514D176791D2012564885C0B358D /* SipHash */, + 8ACB65C1763D3BB158F6CE4F35505E40 /* SwiftRLP */, ); - name = Result; - path = Result; + name = Pods; sourceTree = ""; }; - E1F02E842C04D8C75A2B95E3F260E0F2 /* Support Files */ = { + 968E195A239C7A2A779AF02DF8828396 /* Support Files */ = { isa = PBXGroup; children = ( - 4280E4E729C30130E5863D8832C068CC /* SipHash-iOS.modulemap */, - E3315426BF4C8B74BC7DAAADC2F23895 /* SipHash-iOS.xcconfig */, - 98208639AD618314C999FC207B7FBA89 /* SipHash-iOS-dummy.m */, - 3A28FF7FC1FEB17EAFF5DFCB9B40E6D5 /* SipHash-iOS-prefix.pch */, - 31D7B79B518E67916F0205F505B0485D /* SipHash-iOS-umbrella.h */, - E9D1AAD6C106478E5F24A9CE500AB6A6 /* SipHash-macOS.modulemap */, - 510A8C675D48B2B9F8821CFCF830CAC5 /* SipHash-macOS.xcconfig */, - 547B7D1303121A36C02717193279DF7A /* SipHash-macOS-dummy.m */, - DE18F02725D9CF95A5B3FB51CFF87AE1 /* SipHash-macOS-prefix.pch */, - 7FED111DB9B19BEB67F1E97D34E65AC8 /* SipHash-macOS-umbrella.h */, + 6C01FC83057F30818B00CDD8B62AC6B9 /* SipHash-iOS.modulemap */, + 7A37EB85984F608037881FD6E14786A3 /* SipHash-iOS.xcconfig */, + F04918D981D6BA6B8E1B45E4C1D23089 /* SipHash-iOS-dummy.m */, + EB554DF617A1C02E83AC1D59855D1C02 /* SipHash-iOS-prefix.pch */, + 099CBD52589F67F91C4263550552B849 /* SipHash-iOS-umbrella.h */, + 2CF235AEEC6AC29CA5A1331269520B36 /* SipHash-macOS.modulemap */, + 0091667FAE21CC6D590AC1ADB6410352 /* SipHash-macOS.xcconfig */, + 8A49E7FFAA1F69AF0BFDC8A0CFCB938D /* SipHash-macOS-dummy.m */, + F041C44E58385737D071918EF8503628 /* SipHash-macOS-prefix.pch */, + 6C59784B76CA65D06F275EBA259540AC /* SipHash-macOS-umbrella.h */, ); name = "Support Files"; path = "../Target Support Files/SipHash-iOS"; sourceTree = ""; }; - EC8686C3474AC20563F3149326E6D2DF /* SwiftRLP */ = { + 9B02CB12B4E3FBEF788C7B68B6161612 /* Support Files */ = { isa = PBXGroup; children = ( - BE0E6B0DB6C8369C0409240023B753BD /* RLP.swift */, - 6DF6BC857A451DB590136C2127E8540C /* SwiftRLP.h */, - 0B5A3E0CC65F7553C04A6E5297B32E24 /* Support Files */, + 5250B8764D7489940F140620EA371F7F /* CryptoSwift-iOS.modulemap */, + FFA38A7573EBA79AA83EBCA62742C2CA /* CryptoSwift-iOS.xcconfig */, + BA4DC9927DEE120B1F101C5D3C546B09 /* CryptoSwift-iOS-dummy.m */, + 092E8D6F47871894D8044C4145939CD2 /* CryptoSwift-iOS-prefix.pch */, + EEF44FF851A27BCE1872F1FEBF9A9440 /* CryptoSwift-iOS-umbrella.h */, + 1EBD08D75A25D39EC9FA85F75EFBD0CB /* CryptoSwift-macOS.modulemap */, + 9B3C1FAD3DD5A0A918CA3605928E5CA9 /* CryptoSwift-macOS.xcconfig */, + BFC2F7559BA52B8D992D11A537D7FEBE /* CryptoSwift-macOS-dummy.m */, + E590EF6D990EA299BA2660A1BC53DEB9 /* CryptoSwift-macOS-prefix.pch */, + CD4C2245061DDD251D7082A04D84F218 /* CryptoSwift-macOS-umbrella.h */, ); - name = SwiftRLP; - path = SwiftRLP; + name = "Support Files"; + path = "../Target Support Files/CryptoSwift-iOS"; sourceTree = ""; }; - F428E795A6218A0503995E6302D472F5 /* Support Files */ = { + A5C4D9D7AFF383E08F48064F0547394D /* Support Files */ = { isa = PBXGroup; children = ( - D5C83A501FE934B15E0B51546A92E079 /* Result-iOS.modulemap */, - B334729A830AF9B565C76134288E4EDF /* Result-iOS.xcconfig */, - FF4E4FB6D0F71C472A99E72F368087E0 /* Result-iOS-dummy.m */, - 1785BD77598DA961BBC98D4CB9AEEA35 /* Result-iOS-prefix.pch */, - 44A4652793E17CB674C8F7E82EA886A1 /* Result-iOS-umbrella.h */, - C8877687340A48EE91240BE1793F223E /* Result-macOS.modulemap */, - E748C35C819EB524EA9D3EAE51962FD9 /* Result-macOS.xcconfig */, - 4C05BD716367802B1AA84356C6E21134 /* Result-macOS-dummy.m */, - C496DED0A0B25D608237C1717DF67DAB /* Result-macOS-prefix.pch */, - 98B2E87BB6ACFDFDFA8C3C8F69BE06E2 /* Result-macOS-umbrella.h */, + 856FFECE484989935BD3A92DEC7353E2 /* secp256k1_swift-iOS.modulemap */, + 7D2ED7B574BD12D6937C37D79B6355D2 /* secp256k1_swift-iOS.xcconfig */, + 345299796DBEE665766F152916E0A531 /* secp256k1_swift-iOS-dummy.m */, + BFC0489E9BD48E1BE679A7A9A3B4D875 /* secp256k1_swift-iOS-prefix.pch */, + EC9440034E7256986111FBC505567C26 /* secp256k1_swift-iOS-umbrella.h */, + 5124B9DB14585DB3252BDB2B0F4A7FC7 /* secp256k1_swift-macOS.modulemap */, + 10F96D8FE1C5606E4F729FFD623428A3 /* secp256k1_swift-macOS.xcconfig */, + 3FDABDA201433FD66D894DAEF0761C26 /* secp256k1_swift-macOS-dummy.m */, + 62BD8229A9BC1A38D866BEDF45C366E7 /* secp256k1_swift-macOS-prefix.pch */, + D11A10393AAAF35194650B10A6ADE234 /* secp256k1_swift-macOS-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/Result-iOS"; + path = "../Target Support Files/secp256k1_swift-iOS"; sourceTree = ""; }; - F8C717E0B243C4C5C37F1A1BEAC0D082 /* Support Files */ = { + AAB417525B4AA28CC55EECA7CFDAB251 /* Pods-web3swift-iOS */ = { isa = PBXGroup; children = ( - 7A0C50DF8D82115DBAAFF1AA1F45BD18 /* secp256k1_swift-iOS.modulemap */, - 37F6A1CB837846EE43730D5E42B4E402 /* secp256k1_swift-iOS.xcconfig */, - 48BA596E48FB87148C88E3B7BBB602EB /* secp256k1_swift-iOS-dummy.m */, - 709674DD026369E39754079D242C3E66 /* secp256k1_swift-iOS-prefix.pch */, - 7950E62D04D3EBAB00EA5CE1411E5A6C /* secp256k1_swift-iOS-umbrella.h */, - D093F93E69099A9C2F8327DD338BA151 /* secp256k1_swift-macOS.modulemap */, - 52DC772E67709ACAE0A2731E36A63DC0 /* secp256k1_swift-macOS.xcconfig */, - 9520DA623CEB5BEB937C6E2EEC267B31 /* secp256k1_swift-macOS-dummy.m */, - 980A812728AADDDB624727159B4C098E /* secp256k1_swift-macOS-prefix.pch */, - ABA1CC6FBDF71FC02EE62B784C52CD45 /* secp256k1_swift-macOS-umbrella.h */, + 79E925BEAA0533C58B6D9871B886DD8A /* Pods-web3swift-iOS.modulemap */, + F45D1FF9B0F3BEACB34D069C6F3561F8 /* Pods-web3swift-iOS-acknowledgements.markdown */, + 95C397E16B314F921F7784F00C8F183B /* Pods-web3swift-iOS-acknowledgements.plist */, + D8F688145BCFE1FB8B76299CC261A05E /* Pods-web3swift-iOS-dummy.m */, + 7E8C19543EF3AA4D9801DBE55E22E211 /* Pods-web3swift-iOS-umbrella.h */, + 042CC2D185140E7D725D22562A3E307F /* Pods-web3swift-iOS.debug.xcconfig */, + 673FFC4D2B959AB8AEC35D646A85CDCD /* Pods-web3swift-iOS.release.xcconfig */, ); - name = "Support Files"; - path = "../Target Support Files/secp256k1_swift-iOS"; + name = "Pods-web3swift-iOS"; + path = "Target Support Files/Pods-web3swift-iOS"; sourceTree = ""; }; - FE928D414B5C71EF40AC25C320542734 /* UIKit */ = { + BDEB2A43D2221D8016FA7E76367811E1 /* UIKit */ = { isa = PBXGroup; children = ( - 66515F5856AA8BFE5FEC1F9BF271A5A2 /* PMKUIKit.h */, - 4B90782E90E35201E901B4ABD31E7E1C /* UIView+AnyPromise.h */, - E25079B9D829E2FA59A02142ACC823BA /* UIView+AnyPromise.m */, - 955161BE1368A548FD4EB6DA00435D16 /* UIView+Promise.swift */, - 0A3899E2022CB3FA28CFCB82D4B6CA80 /* UIViewController+AnyPromise.h */, - 416DB21C5FE305C78284237079C89388 /* UIViewController+AnyPromise.m */, - D5BEE6336571D98DA94C9A54C8CE9623 /* UIViewPropertyAnimator+Promise.swift */, + 002BCC8DEC6CF0087CDD9F17D1CB63D8 /* PMKUIKit.h */, + 0923A9FA118D244659624C1F0BD11796 /* UIView+AnyPromise.h */, + AE738DB7791144612A4D0951B0C43A7E /* UIView+AnyPromise.m */, + D5FF562EECDB0679D662D82F7A5AF6C0 /* UIView+Promise.swift */, + FF238B78A8B1951C382DC7D8C0DA9412 /* UIViewController+AnyPromise.h */, + 323129AF4AE1EA178343E46476163880 /* UIViewController+AnyPromise.m */, + 08220EE2495D2C17B6366EFD53B51AC3 /* UIViewPropertyAnimator+Promise.swift */, ); name = UIKit; sourceTree = ""; @@ -1844,14 +1856,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9DBF6F339E3B937E0E0927FF3B30F915 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ECDEF2626BC123966104C5F0B4830936 /* CryptoSwift-iOS-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; A371BC0D140506C3C0BBCD447234E68E /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -1884,19 +1888,19 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - AB508AB6DA110D8EA9894EB86FDC1501 /* Headers */ = { + BF5321B397A280212410C83B84C136C1 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 1CC09F75AC87A194EBB50A8750BAAE94 /* CryptoSwift-macOS-umbrella.h in Headers */, + 31BFC50C75020E436DDA0F9AFA73D067 /* Result-macOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - BF5321B397A280212410C83B84C136C1 /* Headers */ = { + D7B2C3E499A784C0C701CFCC848DD377 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 31BFC50C75020E436DDA0F9AFA73D067 /* Result-macOS-umbrella.h in Headers */, + 563C641A5D7264103E44BCDCC6C6C887 /* CryptoSwift-macOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1909,6 +1913,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D9438E55E725BF04D83CC7EC3D4AF915 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 5145AAE99352DBF420419223083C6C25 /* CryptoSwift-iOS-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; E29620DE5F5BC9B27E091EDD7CFCF1DD /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -2025,24 +2037,6 @@ productReference = 35FC5E1CB1FA613D068CDE5E32242FEA /* libSipHash-iOS.a */; productType = "com.apple.product-type.library.static"; }; - 44D204414133961DD4B492AFB5C4DEEB /* CryptoSwift-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6FBBA029AFB86EC5F02D2B578121B307 /* Build configuration list for PBXNativeTarget "CryptoSwift-iOS" */; - buildPhases = ( - 9DBF6F339E3B937E0E0927FF3B30F915 /* Headers */, - 713698705E8D1E339E70B30159672ECB /* Sources */, - 70A99D175AB74D144C6CFD96B60AA491 /* Frameworks */, - ABE5E8CE69A961334EF804948F80AE71 /* Copy generated compatibility header */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "CryptoSwift-iOS"; - productName = "CryptoSwift-iOS"; - productReference = 686E32EABE020693AEB9B0CBB68DC7AD /* libCryptoSwift-iOS.a */; - productType = "com.apple.product-type.library.static"; - }; 498B5059F6777D5158A7EE62045BD64E /* secp256k1_swift-macOS */ = { isa = PBXNativeTarget; buildConfigurationList = 4DE4E92544E4D3852787DF5ADA292D66 /* Build configuration list for PBXNativeTarget "secp256k1_swift-macOS" */; @@ -2115,6 +2109,24 @@ productReference = 755201B560E952C6A5333642B028695A /* libPromiseKit.a */; productType = "com.apple.product-type.library.static"; }; + 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = F03040809733F3691A82F4D1E80B6BA3 /* Build configuration list for PBXNativeTarget "CryptoSwift-macOS" */; + buildPhases = ( + D7B2C3E499A784C0C701CFCC848DD377 /* Headers */, + A5A45EF12B04C5C92A3AEF6FB3A93BC5 /* Sources */, + 6F6453F76274AE713CC0D3CD28EB9C36 /* Frameworks */, + 06ED1736EBFFBA57E2FEB73C8DE23910 /* Copy generated compatibility header */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "CryptoSwift-macOS"; + productName = "CryptoSwift-macOS"; + productReference = E931DAD7852F3C297E4BB3A0A4928BCB /* libCryptoSwift-macOS.a */; + productType = "com.apple.product-type.library.static"; + }; 7ED7E08B2BE4D50AC5F7E73B32DD2203 /* Pods-web3swift-macOS_Tests */ = { isa = PBXNativeTarget; buildConfigurationList = 91E81CC04B48CAA0AA6D1FB891F14331 /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS_Tests" */; @@ -2208,24 +2220,6 @@ productReference = A14282AE6AF7AD75A532A9639BE44B88 /* libscrypt-iOS.a */; productType = "com.apple.product-type.library.static"; }; - D618CA243075F5EB0C89F808DD7756D8 /* CryptoSwift-macOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 604E68D68F08C230C85D2D819532C6AF /* Build configuration list for PBXNativeTarget "CryptoSwift-macOS" */; - buildPhases = ( - AB508AB6DA110D8EA9894EB86FDC1501 /* Headers */, - 91476055BF4E2BE94112B26E7386F137 /* Sources */, - 3250F01FAF9D5E03E02CB4DCD423DB05 /* Frameworks */, - 59E67DE7F5E16FDFFC57A4EC1FD8581D /* Copy generated compatibility header */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "CryptoSwift-macOS"; - productName = "CryptoSwift-macOS"; - productReference = E931DAD7852F3C297E4BB3A0A4928BCB /* libCryptoSwift-macOS.a */; - productType = "com.apple.product-type.library.static"; - }; DA0577AD76B443C71930FAC764E972C5 /* SwiftRLP-iOS */ = { isa = PBXNativeTarget; buildConfigurationList = 6C6D2DEE61A644A6598FBEDB9971FD63 /* Build configuration list for PBXNativeTarget "SwiftRLP-iOS" */; @@ -2245,6 +2239,24 @@ productReference = EAE702C1BF30A6CA8F718732EC9270FF /* libSwiftRLP-iOS.a */; productType = "com.apple.product-type.library.static"; }; + E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 19CA2EF2646C88FC1D5F4864827AF9A9 /* Build configuration list for PBXNativeTarget "CryptoSwift-iOS" */; + buildPhases = ( + D9438E55E725BF04D83CC7EC3D4AF915 /* Headers */, + 8FA32F9F48C4C6C1BA1B020B1EACED3A /* Sources */, + 49DDA0C2610D394C727D7031E3440CCF /* Frameworks */, + 1F7D245DDE5F17177A665A72104C9D4D /* Copy generated compatibility header */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "CryptoSwift-iOS"; + productName = "CryptoSwift-iOS"; + productReference = 686E32EABE020693AEB9B0CBB68DC7AD /* libCryptoSwift-iOS.a */; + productType = "com.apple.product-type.library.static"; + }; F2C23507954E7580FFDC3A161C6AB0E4 /* Result-macOS */ = { isa = PBXNativeTarget; buildConfigurationList = C6A6186E7DE2AF444E2D9AE0184A0479 /* Build configuration list for PBXNativeTarget "Result-macOS" */; @@ -2348,8 +2360,8 @@ targets = ( AF9F48E6961507C0E2FD7A3CDBC652DA /* BigInt-iOS */, 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */, - 44D204414133961DD4B492AFB5C4DEEB /* CryptoSwift-iOS */, - D618CA243075F5EB0C89F808DD7756D8 /* CryptoSwift-macOS */, + E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */, + 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */, 2892912E4AE0D2C848DA80F38A3430EF /* Pods-web3swift-iOS */, 566C98B9528CB1527582959B19D87238 /* Pods-web3swift-iOS_Tests */, F884BDAA9A34F06758B9377C5C3DE88F /* Pods-web3swift-macOS */, @@ -2371,6 +2383,31 @@ /* End PBXProject section */ /* Begin PBXShellScriptBuildPhase section */ + 06ED1736EBFFBA57E2FEB73C8DE23910 /* Copy generated compatibility header */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", + "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap", + "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h", + ); + name = "Copy generated compatibility header"; + outputFileListPaths = ( + ); + outputPaths = ( + "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", + "${BUILT_PRODUCTS_DIR}/CryptoSwift-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + showEnvVarsInLog = 1; + }; 1B2679AE7A95EBF0FDDB427B7725D76B /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -2396,7 +2433,7 @@ shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 3273D99866B079DA9C80FD4FC0CC368F /* Copy generated compatibility header */ = { + 1F7D245DDE5F17177A665A72104C9D4D /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2405,23 +2442,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap", - "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h", + "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/PromiseKit.root-CorePromise-Foundation-umbrella.h", + "${BUILT_PRODUCTS_DIR}/CryptoSwift-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 48CAA26C5BA7CC4886CFBB5FF41C3C8C /* Copy generated compatibility header */ = { + 3273D99866B079DA9C80FD4FC0CC368F /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2430,23 +2467,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap", + "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/BigInt-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/PromiseKit.root-CorePromise-Foundation-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 59E67DE7F5E16FDFFC57A4EC1FD8581D /* Copy generated compatibility header */ = { + 48CAA26C5BA7CC4886CFBB5FF41C3C8C /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2455,20 +2492,20 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap", - "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/CryptoSwift-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/BigInt-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; 6C5742B45D7CF2819D971BBDF4E63642 /* Copy generated compatibility header */ = { @@ -2571,31 +2608,6 @@ shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - ABE5E8CE69A961334EF804948F80AE71 /* Copy generated compatibility header */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h", - ); - name = "Copy generated compatibility header"; - outputFileListPaths = ( - ); - outputPaths = ( - "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/CryptoSwift-iOS-umbrella.h", - "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; - showEnvVarsInLog = 1; - }; CF48FB28322C0B97DB10FA906EF46EEB /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -2980,86 +2992,7 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 713698705E8D1E339E70B30159672ECB /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9CF22D4A3B62E62B50881D0DE45FBDF9 /* AEAD.swift in Sources */, - 8ABEC41E232F354C6DF2DB60B4AEDF49 /* AEADChaCha20Poly1305.swift in Sources */, - 6ED4064256289FBBEBDBF2C1D4C347CA /* AES+Foundation.swift in Sources */, - 314D8B2F7ACB1285289701FA44D49A3B /* AES.Cryptors.swift in Sources */, - 239D8E853FDFD3C09B0B3A5E85FB64E8 /* AES.swift in Sources */, - F1713A581AF450456EAEC87DE47CDA88 /* Array+Extension.swift in Sources */, - 0BBCC69CD1D17E80AE051FB477BDD3D5 /* Array+Foundation.swift in Sources */, - 2DD480A5DBA913244A3AF776CECCDCF7 /* Authenticator.swift in Sources */, - 3041A5B7E53D75209A5C347950817958 /* BatchedCollection.swift in Sources */, - 8DE8FDE423347EA29D896211A3C2C7CB /* Bit.swift in Sources */, - 0AD8E3063BA9777F2313604C49FB35DC /* BlockCipher.swift in Sources */, - 4FCF1CB933BEBAC5D0892C543D68E658 /* BlockDecryptor.swift in Sources */, - C55D7F3112EA0AE1C16D64D5D93FB8E2 /* BlockEncryptor.swift in Sources */, - 7C84CA8569B6C593005324DE5F49621E /* BlockMode.swift in Sources */, - 5E0F76D46A3F14CC3903F4D072D6652C /* BlockModeOptions.swift in Sources */, - B27AC8F7FCD59B1C8879D64E939D9737 /* Blowfish+Foundation.swift in Sources */, - 7478C4AB680096975DA0F3885DE5128C /* Blowfish.swift in Sources */, - 6483A6AC993D8C5F8983064789F220B8 /* CBC.swift in Sources */, - 7F8D8FBC1A9C67B326A7F5A04BC3658B /* CFB.swift in Sources */, - 5CA9E73F8349BAC9F5EBD1F0589C91AD /* ChaCha20+Foundation.swift in Sources */, - 74602FF913EBE7791DE8B091DBFC2D6E /* ChaCha20.swift in Sources */, - C420F74F411178FB20F79B022567A36F /* Checksum.swift in Sources */, - C4D7369A6EE4185C3499B0C7F6D4AF54 /* Cipher.swift in Sources */, - 991C48377FE8653491950997A605201D /* CipherModeWorker.swift in Sources */, - CB23D304433CF4415E534890D75DD1F3 /* CMAC.swift in Sources */, - 216986247596660CFCD4D997C374D548 /* Collection+Extension.swift in Sources */, - 4E8C968B4D8B860668C9C36CA819BF70 /* CompactMap.swift in Sources */, - 3E20F5E2C7DA6C8B4AF7D05CA526183F /* Cryptor.swift in Sources */, - C52AB1611C5012541EB9B2D6F3E7113C /* Cryptors.swift in Sources */, - A4A59B0BA1E4153A6BF2917EB2C1AF06 /* CryptoSwift-iOS-dummy.m in Sources */, - F238EF032BC5A70219603EA97FF3FED8 /* CTR.swift in Sources */, - E48FE65994D2FDB3496020B0AED10062 /* Data+Extension.swift in Sources */, - 96C6125FB939C1C06CE63AD1E59F88B7 /* Digest.swift in Sources */, - 315E61FA169A73000F63292BBAE8457F /* DigestType.swift in Sources */, - E9E664FD3415EAFF7CDFFD33254902E3 /* ECB.swift in Sources */, - 969BD4FC9172F82D66E704BF544A30AC /* GCM.swift in Sources */, - DD419D08F1AEE92AC819A14720ECD62C /* Generics.swift in Sources */, - 0545829A927B4BB00A483BBE6244387D /* HKDF.swift in Sources */, - 290854FFD3516C0BA20E66AD41986C4C /* HMAC+Foundation.swift in Sources */, - 80D2DC67C9BF404DB886FB1B282408D3 /* HMAC.swift in Sources */, - F5AB8AD08E9E0AD8237FC486B02D3AE9 /* Int+Extension.swift in Sources */, - 9E85EE2DD5C2A60DF3DE739BD1218C76 /* MD5.swift in Sources */, - D9B3D20980002DAFC3783F7A6B1C91BA /* NoPadding.swift in Sources */, - 5BF15FCDA2CA5E504F774B93C1EAA123 /* OFB.swift in Sources */, - 44DF067E138C7E2662D76052B1D15932 /* Operators.swift in Sources */, - AC6D836A8BEBC67FAD48B43B80382794 /* Padding.swift in Sources */, - 93AD3CA5F13CFF076A06516E303A61C9 /* PBKDF1.swift in Sources */, - B51D722CE376EDFD7B663D9452E900AB /* PBKDF2.swift in Sources */, - 76F56049518D4E3F2868ECB003F2990A /* PCBC.swift in Sources */, - F7637401A66A3768E3AFB4725B5A68CE /* PKCS5.swift in Sources */, - D32712369A0978E2F272F6ED44E13D09 /* PKCS7.swift in Sources */, - 9EE54627ED72870C58157B76B89AC3AF /* PKCS7Padding.swift in Sources */, - 9712E5BC7B1EEE1A02EEA6DC76325BEA /* Poly1305.swift in Sources */, - EE0C5BE970F77B1A1478E64F164DDB99 /* Rabbit+Foundation.swift in Sources */, - E8A145AFD00468A4C9549E156F7A4327 /* Rabbit.swift in Sources */, - EB5C9979901C255CD26AAD9C2908FC4D /* RandomBytesSequence.swift in Sources */, - FFE4A177B13CFEBE37F77661D03FDE45 /* SecureBytes.swift in Sources */, - 7AC2E47719C68FABBDF2DF9E567086AF /* SHA1.swift in Sources */, - 9780B00892C127C1916229C06A751F7E /* SHA2.swift in Sources */, - 0D581B37DEE69673B5F6AF763BEAF9F0 /* SHA3.swift in Sources */, - 2BA16B5D2DD651E485E5496216F6996F /* StreamEncryptor.swift in Sources */, - 1E11D4AB7D83F30DC55ED31131C62967 /* String+Extension.swift in Sources */, - A953ACC3543A00D51383ED73301139A4 /* String+FoundationExtension.swift in Sources */, - 79FA79BA765DEEF172BC0384B7E5CE84 /* UInt128.swift in Sources */, - 133747794F37E3A739F51CB04EAEC784 /* UInt16+Extension.swift in Sources */, - C5C8E105D6B79B679C2C88E2615EAC66 /* UInt32+Extension.swift in Sources */, - D77D59D158D2FBA4B6AA53805363DB1E /* UInt64+Extension.swift in Sources */, - 34D61980DF37C53741DC15DEEDCFAC25 /* UInt8+Extension.swift in Sources */, - 22FB7357D696E831ABFF6CDE1BC35757 /* Updatable.swift in Sources */, - 2CD358B6D6909178593465B26D6A6E53 /* Utils+Foundation.swift in Sources */, - 5A8B48EB086264AB7340C7FBF07D7383 /* Utils.swift in Sources */, - CB8ABF5FDE083E23F3C8AA384A4D55C3 /* ZeroPadding.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7BA75396367E53FB54211DB664B4547E /* Sources */ = { + 7BA75396367E53FB54211DB664B4547E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -3071,82 +3004,85 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 91476055BF4E2BE94112B26E7386F137 /* Sources */ = { + 8FA32F9F48C4C6C1BA1B020B1EACED3A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 75383208B98A4BFB61B7418E8B546CCC /* AEAD.swift in Sources */, - EC308ACB0BA1C145CC005AA4186B9EB0 /* AEADChaCha20Poly1305.swift in Sources */, - 5063FE3FE1C30A73A073F3533C508D64 /* AES+Foundation.swift in Sources */, - 49BABAEF57C8A617DA34C25DB757180B /* AES.Cryptors.swift in Sources */, - E007271BF4C4F9B9D464193F85793C50 /* AES.swift in Sources */, - 77EBF711C1B88D92CFC3AFCE6293E015 /* Array+Extension.swift in Sources */, - 6D5CD948E7245E25D3815643B2B4C89D /* Array+Foundation.swift in Sources */, - EA1A3BB85FC5453DEA5AE302324D4DAA /* Authenticator.swift in Sources */, - 36DB5AEC759BAA7C4222B36C8790FA8A /* BatchedCollection.swift in Sources */, - 8E189B54FFC987969C2A26D21DB0FB42 /* Bit.swift in Sources */, - AA40ABA19C4E8BBE370471E77BAFC842 /* BlockCipher.swift in Sources */, - A8FB03192116C7259BDC47B4ED7A1770 /* BlockDecryptor.swift in Sources */, - FA9AEF2C8D8495DFBB7D202A04CD4C7B /* BlockEncryptor.swift in Sources */, - D03604350C4AD6E462633ACEF03DE182 /* BlockMode.swift in Sources */, - 7DAD16539BA5194CA6515AEA28BC29CA /* BlockModeOptions.swift in Sources */, - 3AEDA0F0A0D1B6B201C42C72941FCE3F /* Blowfish+Foundation.swift in Sources */, - FB15EFD9B279E96538754752538F6F2D /* Blowfish.swift in Sources */, - 0FB79BA6789A195C987F2180A58B6AFC /* CBC.swift in Sources */, - 9346676038E479F7475D304CD3939A0F /* CFB.swift in Sources */, - EA3B78E39182A056E17833E10C5DE2E6 /* ChaCha20+Foundation.swift in Sources */, - 8384A7D8940BDD9B50ABF44358E12847 /* ChaCha20.swift in Sources */, - 2FB34A1FAE745E38E438FA434B64D592 /* Checksum.swift in Sources */, - 971CF5DA4334D6FC9E1DE7E8118BF088 /* Cipher.swift in Sources */, - B264AC2DFBBC420DEE1695859273E0E6 /* CipherModeWorker.swift in Sources */, - 7CEBCAAE658C0E0716B41E40BEF8FB3D /* CMAC.swift in Sources */, - 874698320130745EC1465E308033D024 /* Collection+Extension.swift in Sources */, - 3755C12BE9E88D2D7E5765B3CDC80DD9 /* CompactMap.swift in Sources */, - CA5BBB4A81D6C18A87B54AD3E3CB1DDD /* Cryptor.swift in Sources */, - 10650E08C4710FC9327EA77E080EAFBD /* Cryptors.swift in Sources */, - 7ED61B6F717591CD9AEE78153233E125 /* CryptoSwift-macOS-dummy.m in Sources */, - A301F522108F0A22EFA241EBCC8F5AA6 /* CTR.swift in Sources */, - E496E4A9940D9E53F87FC94F6FBA613F /* Data+Extension.swift in Sources */, - AA48D3B3A44CD568D493A0326D60EEAC /* Digest.swift in Sources */, - 5104F193E7D7CB179A24BF3E5235FD3F /* DigestType.swift in Sources */, - A065300D974D4C50642BF3687E0E6C37 /* ECB.swift in Sources */, - 6D44B36B12347BA0E2838B68148C4BB4 /* GCM.swift in Sources */, - A48902823DC75349716A4753B1E660DA /* Generics.swift in Sources */, - 80AE7386A1B299C39AAC7F0C6AEC590D /* HKDF.swift in Sources */, - 08D84886240259762D5D2E88FE06BAB2 /* HMAC+Foundation.swift in Sources */, - E24619AC5BEB6C6F40A086FBC713953F /* HMAC.swift in Sources */, - 092FA91C224FA67526944D6026C42719 /* Int+Extension.swift in Sources */, - B534D1DE7C6E7115E6A75EE8BAA4819C /* MD5.swift in Sources */, - 370C7FFEAB64F443F216B37A2B33F106 /* NoPadding.swift in Sources */, - 7193D179572C3FAD861BD281EBBE0794 /* OFB.swift in Sources */, - 4BA76EF32D81038B1AD2E8C555A3C985 /* Operators.swift in Sources */, - B48C458D1CB67A6B566AEFBADAE6DE8A /* Padding.swift in Sources */, - 2E988C0A4E1C468D0AFA43A95482D911 /* PBKDF1.swift in Sources */, - D51658C88F64814325AFD7E26FF01C58 /* PBKDF2.swift in Sources */, - A01F875E651CCF1697C02EA9BF034852 /* PCBC.swift in Sources */, - D0B384B3B9706105721D5A04485597A9 /* PKCS5.swift in Sources */, - C1693DEA3241820346B6392F419BE86A /* PKCS7.swift in Sources */, - 4407ACFACA948CBA51F56B96A99EE4CE /* PKCS7Padding.swift in Sources */, - BF9C1C12AD3560167B0800059B4A6D6E /* Poly1305.swift in Sources */, - 75603E077E70073F479AE5B3F89CDC8B /* Rabbit+Foundation.swift in Sources */, - A93F309C7285ACB8ECAA14903BC85237 /* Rabbit.swift in Sources */, - 3AC689CBB3DC3931542904E58800704C /* RandomBytesSequence.swift in Sources */, - 312FED65DD6B7D4E4C0AF196082B4292 /* SecureBytes.swift in Sources */, - 69BAB45539E26B90D356BD6D1E6839BD /* SHA1.swift in Sources */, - 61D043FD677FACF7F382F67A430A7F62 /* SHA2.swift in Sources */, - 789A3DD0AA3D7580E0FCF6389C037D56 /* SHA3.swift in Sources */, - F76CD6A74599B946F2BEB2CFD466DCF8 /* StreamEncryptor.swift in Sources */, - 934311E0A7ED33AF227CA6236BE194FA /* String+Extension.swift in Sources */, - CC53CC49FDD4748924F21B50E485DBBD /* String+FoundationExtension.swift in Sources */, - C45AB3CBDC8E80549A5258F1EF33B5E4 /* UInt128.swift in Sources */, - 9CA622EDF0E225A5FE37350E93E7B757 /* UInt16+Extension.swift in Sources */, - 5EABC52C76A5F7DD29136E5C10CAA368 /* UInt32+Extension.swift in Sources */, - 5EBCC3EF4D3AEDA8DE7D24EAF054A21D /* UInt64+Extension.swift in Sources */, - 9940F65AAACFEDF8634F4017D31420A4 /* UInt8+Extension.swift in Sources */, - 8EF9B8FF607B9FD70D85D95EA60C804D /* Updatable.swift in Sources */, - 8CA95863A4A71897EE45477A562A16B3 /* Utils+Foundation.swift in Sources */, - 9E9A8A8B46304D435822D15C3C38A4AC /* Utils.swift in Sources */, - 01E683D1A55DCC27F48AC9CF8CDCBF03 /* ZeroPadding.swift in Sources */, + A1636315A5B3017312CFC781DF83901E /* AEAD.swift in Sources */, + 65D0354F4B4E32CBA63ECDF84AFAD283 /* AEADChaCha20Poly1305.swift in Sources */, + 3819CB7BE87DC385D208FF40C7199DEA /* AES+Foundation.swift in Sources */, + 31D346420CE39369D66215B21F8A3337 /* AES.Cryptors.swift in Sources */, + 11D236D734F12042B70BB21010A7BB31 /* AES.swift in Sources */, + 098D227D8DAE7643ACDF1DBCE8AA4264 /* Array+Extension.swift in Sources */, + DA1588018CD8315CFCBB2E0806B753E5 /* Array+Foundation.swift in Sources */, + CAF3800A1D4B45C61035F3A330991F20 /* Authenticator.swift in Sources */, + 83C9B6E62BE2665CCF9078D50C66331E /* BatchedCollection.swift in Sources */, + 24D38DE85704AB93DCA1AA003FBD6729 /* Bit.swift in Sources */, + 465C38010042DF8DAEFA492DCE294A36 /* BlockCipher.swift in Sources */, + E38ACED69C24647A7A07B2B72C7580BD /* BlockDecryptor.swift in Sources */, + 76E0382DDD9E348354DE5C5F8120D2B8 /* BlockEncryptor.swift in Sources */, + E96D904E355EFA92932B4B71E59472E4 /* BlockMode.swift in Sources */, + 1726CE463B9A337870F28E208B8F268E /* BlockModeOptions.swift in Sources */, + C003185B61E62CF4BD4690EDBD0719A3 /* Blowfish+Foundation.swift in Sources */, + D7875CD7BA041CED180D37E0448C09A8 /* Blowfish.swift in Sources */, + 987DCF48843E8B83BE9F0B5788175D53 /* CBC.swift in Sources */, + 8DCA7529640903D6984416665D803C1D /* CBCMAC.swift in Sources */, + F1DD83612B8154D1465CF398FCFA9596 /* CCM.swift in Sources */, + 447C407907733320787E8F23946656EE /* CFB.swift in Sources */, + 5B4044B103053232D6A987856C610367 /* ChaCha20+Foundation.swift in Sources */, + 35D45B19269F07EA96E6F003C6A1F04D /* ChaCha20.swift in Sources */, + E6950B7C92641175616A7FE09FA2574F /* Checksum.swift in Sources */, + AB9E1F4EDDB1BFD7F4359B0E1AEF9C78 /* Cipher.swift in Sources */, + 527E46A66487D9D5B3FF54359A3951EB /* CipherModeWorker.swift in Sources */, + 48B50CFAD0E4088080A109DCA7B8688F /* CMAC.swift in Sources */, + C510E3B26A4F4876F89A59D5D2F22006 /* Collection+Extension.swift in Sources */, + 279EAE9173342F41D610247C9B8788DE /* CompactMap.swift in Sources */, + 1EAE65FB4A140803FE03F605B5B9AA82 /* Cryptor.swift in Sources */, + 8B4AC0EBDAD7A87FF683938E057D5338 /* Cryptors.swift in Sources */, + 8CBF1AE067B860433B0A4BE710FFA9BD /* CryptoSwift-iOS-dummy.m in Sources */, + E4FB02298751B056940AB39261020DAB /* CTR.swift in Sources */, + 70C08283C27C54420E80CCFB8C2CEB18 /* Data+Extension.swift in Sources */, + 557151A9F797E462E701215A27F7DC21 /* Digest.swift in Sources */, + A72461C8573DCDB8310FA557C3BA1DDA /* DigestType.swift in Sources */, + E350B1B350751D65ED5A630756C5DDAF /* ECB.swift in Sources */, + 3D80464CEDFAD819CD4BCB5190A469E9 /* GCM.swift in Sources */, + 6E1A1FD632248BF8EA8C08628B1DD44A /* Generics.swift in Sources */, + 219282246EF9A166FC2BD24AC6997C06 /* HKDF.swift in Sources */, + 8645C073FDA17B6DF8E4AADCE0808C3C /* HMAC+Foundation.swift in Sources */, + 8CFC200142682965D7D13983526BEC97 /* HMAC.swift in Sources */, + 8593AEFA684E7B84208518E6FC380FB7 /* Int+Extension.swift in Sources */, + AA4AE37CE61DB029CDA7A78DF0E65A30 /* MD5.swift in Sources */, + D7AA60A9860ED2E7DD7440AC9D799A04 /* NoPadding.swift in Sources */, + 1DC075FE4097BF0E29641EDD65D31E86 /* OFB.swift in Sources */, + 318456407793AD399D02863A812ED6DE /* Operators.swift in Sources */, + BAD670F268A8F2AB9BB2BD41BA18BEFA /* Padding.swift in Sources */, + A419E91722005FB59C7DC3BEA7AC0733 /* PBKDF1.swift in Sources */, + 8EAEFFBCB259C139AE42E4967BFCD638 /* PBKDF2.swift in Sources */, + 09BAF87C5E1AF9E3EE4DEA24FF666E43 /* PCBC.swift in Sources */, + C6896E99AC63CF7E9506A6E8CA124CD5 /* PKCS5.swift in Sources */, + 76A9DE7C8BC7B646D1A0508BF1A38A22 /* PKCS7.swift in Sources */, + 7B5BE028C02660F6A97F1D470C96F05D /* PKCS7Padding.swift in Sources */, + 0315EE301733CF0DE349A0C9B65C177F /* Poly1305.swift in Sources */, + 4EB23EA6CB130E3291B0776D3862D748 /* Rabbit+Foundation.swift in Sources */, + FFD1323B3E415476F73D432694CC4D35 /* Rabbit.swift in Sources */, + 99365E9205AEA46510A70B0092872710 /* RandomBytesSequence.swift in Sources */, + ADE49554E5BC26D0FC3CB250EC153F83 /* SecureBytes.swift in Sources */, + 93BF74723D8898DC3E8DC67317C1B0EB /* SHA1.swift in Sources */, + 6B71498DEADD20033325A53D27E6191A /* SHA2.swift in Sources */, + DA1E098DCF3DEE1C5D699424486C1D64 /* SHA3.swift in Sources */, + 862C49A4047D7B32FA8ED4644AAF3DE2 /* StreamDecryptor.swift in Sources */, + CC44CC395434DAA9F2F7DA1D8E1C341A /* StreamEncryptor.swift in Sources */, + B1CE9BDAFCAEDA7D99F7545490D1D518 /* String+Extension.swift in Sources */, + DED6A3731F280B7A5C4BA0088245421D /* String+FoundationExtension.swift in Sources */, + 55620C107463741AB202D7B93B8AC47A /* UInt128.swift in Sources */, + 3867CF007FF0AC14F07271D9E60154CF /* UInt16+Extension.swift in Sources */, + A2A378FB0E28CFD130DD02F25B9420EF /* UInt32+Extension.swift in Sources */, + 3FA010055B3BC4813A4245727D6E2AE7 /* UInt64+Extension.swift in Sources */, + 6CED57BC415DF0F388D893405FE3DC3A /* UInt8+Extension.swift in Sources */, + 0C3EF791FBE499977F647EE7635CC4C9 /* Updatable.swift in Sources */, + DD7EF0CDE3C0223DD3933632CDB2AB01 /* Utils+Foundation.swift in Sources */, + 6D4618F519FFEDB9117FC4341C7F3F4A /* Utils.swift in Sources */, + 4F70068CDD913C18026C4A968EA92E9A /* ZeroPadding.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3170,6 +3106,88 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A5A45EF12B04C5C92A3AEF6FB3A93BC5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EB9345AB32E8C1BCE5C88C239CFAF2B9 /* AEAD.swift in Sources */, + 54CD3C94770F9985D0EDD8AD2D880EEF /* AEADChaCha20Poly1305.swift in Sources */, + 441F98C26072F42F773DDF5C14AC249E /* AES+Foundation.swift in Sources */, + EDEB77EE161E91BE126DB5BECD0D2F88 /* AES.Cryptors.swift in Sources */, + F95445AB786CF29CEA99E52C88BFE706 /* AES.swift in Sources */, + 3B0D18B9FCA958796CDACD6710637030 /* Array+Extension.swift in Sources */, + A26E92B79121B74FDE94799BF2A92C91 /* Array+Foundation.swift in Sources */, + B716300FB849152C5C4C3DC9C14C8E8D /* Authenticator.swift in Sources */, + 911E85408B3D802D7981B85D7192128F /* BatchedCollection.swift in Sources */, + C969C4CB640BF795B01F3648075A446D /* Bit.swift in Sources */, + D29E48A6FDC719FD2FF024625C37CA22 /* BlockCipher.swift in Sources */, + EBD3735323AB89C906B5E1C536976080 /* BlockDecryptor.swift in Sources */, + E15BFF7A7883A5BFB699464499718E52 /* BlockEncryptor.swift in Sources */, + 9F975F5CF4816CD3A6CA2282F5F4E3F2 /* BlockMode.swift in Sources */, + A1E8398E1FC2566D94EE4D94B48E909A /* BlockModeOptions.swift in Sources */, + 9FA8CF326DCA266C358B26FC42191498 /* Blowfish+Foundation.swift in Sources */, + 48EE55837C3546B46DFCD59737CEDC3C /* Blowfish.swift in Sources */, + 2AE019C6FBE28F14BBCF9011859E76C2 /* CBC.swift in Sources */, + 0A396743B4ADF0FA7C12FDF1BA2C5F14 /* CBCMAC.swift in Sources */, + 78638EB4FF9E1219EC7E04E8B97EB448 /* CCM.swift in Sources */, + 3BC2BF6E6B27BFABAEE1C5B8AD2838D7 /* CFB.swift in Sources */, + 87C8D1C1A44E68BA3761B2915728AA1D /* ChaCha20+Foundation.swift in Sources */, + 4C82B6EF64C041919BD1BDFB613CA7AF /* ChaCha20.swift in Sources */, + 272DA3B8E6A36A340F174862DDF47CFA /* Checksum.swift in Sources */, + FA47C2FD4BE0AEE4BBB8F078CEDED890 /* Cipher.swift in Sources */, + BB71E3B83F7833D6D6D7FDEAEA0BD96B /* CipherModeWorker.swift in Sources */, + AEF51F69F68DDFB4BD984ACD87DA0517 /* CMAC.swift in Sources */, + FF83256DE909E2F86AEBBF4E51F42EF0 /* Collection+Extension.swift in Sources */, + A91379A538F389B10BAB2CE9D406BDCE /* CompactMap.swift in Sources */, + B075220C6A1ACDF3E6ECA9447125C827 /* Cryptor.swift in Sources */, + C0951D3A5CDA6E27EDC2A65A700C8D8D /* Cryptors.swift in Sources */, + 0416379BA218FFDEAF901B16AD09831F /* CryptoSwift-macOS-dummy.m in Sources */, + 9EF0841FD75468EF3543A5C6A25A9398 /* CTR.swift in Sources */, + 6DC3B988093A7855E6880FFE8AE3D3B4 /* Data+Extension.swift in Sources */, + D4C0E6966E5FED70544A97ACC237CF3A /* Digest.swift in Sources */, + 55714E2CA2C818B9BB609FE4303A7AE3 /* DigestType.swift in Sources */, + 7BFB63A076CB21871132CA1C68FA934B /* ECB.swift in Sources */, + EF2912DE621D3B57FB6A277CBF39B316 /* GCM.swift in Sources */, + 22FF16F6223F01F3AA966B2E701CBF89 /* Generics.swift in Sources */, + A65A2E325268ED551F8A5D89FB7E75FD /* HKDF.swift in Sources */, + CD1400BD40761FCBE46B17F6B8AA0AE9 /* HMAC+Foundation.swift in Sources */, + 906F0233096CF30AA2ADD2032085E9EA /* HMAC.swift in Sources */, + A829DDB57163254C51DF6C9896A1666E /* Int+Extension.swift in Sources */, + 9E9ABC19900EB9A2F58E05DEDE4C9C6A /* MD5.swift in Sources */, + D2C9540655CD82F8A12305D2B953BD71 /* NoPadding.swift in Sources */, + 44F4771652CF7E4CD82AFFF61B0ED567 /* OFB.swift in Sources */, + 857F892AC414752BEECA9829E4EA6322 /* Operators.swift in Sources */, + 16430D1306BA11693EFE55BE2052FBEB /* Padding.swift in Sources */, + AFF838D30AE798EA2B0FE11A1ED0729E /* PBKDF1.swift in Sources */, + C70A86EC15752B0731CD015CEF45CAAF /* PBKDF2.swift in Sources */, + F48FDD8548C612FB765A5F4D3F2AAEB2 /* PCBC.swift in Sources */, + 41E4BB16EA30C7552FF1E3CA6BC0491D /* PKCS5.swift in Sources */, + DAA014164E03E57A7D043C270B6C9B84 /* PKCS7.swift in Sources */, + 5493B45FC1BD542111A20AC6A58EA0B1 /* PKCS7Padding.swift in Sources */, + 01349159EBEDEB29A5C35BA3B387F596 /* Poly1305.swift in Sources */, + 494A8C06290340CA7C968264669CD5C0 /* Rabbit+Foundation.swift in Sources */, + 9BB2691E8EC04617309A1B905F5A652B /* Rabbit.swift in Sources */, + 723881423457C16AFC563593E5F5B7E1 /* RandomBytesSequence.swift in Sources */, + 50DE88114B7BD18A98F0F45A972079E3 /* SecureBytes.swift in Sources */, + EB52C8F7723FCC94649C4768B67E2E3A /* SHA1.swift in Sources */, + 1736288FC9BC2391AF96F9CCBA1A27D2 /* SHA2.swift in Sources */, + DE86F4DBFBAE2D9EADB44907B3B7FC1D /* SHA3.swift in Sources */, + 84AD91997553D782969A046B9146044A /* StreamDecryptor.swift in Sources */, + D57E19C3E86448FD0CA3B9742DB49497 /* StreamEncryptor.swift in Sources */, + 44AEE69C5AA31A84CCEB7534C0855D78 /* String+Extension.swift in Sources */, + 7AE2FD363C4422762B7BC5E2005F7C2F /* String+FoundationExtension.swift in Sources */, + AFEBE1E855779D74D26F05919F5001AA /* UInt128.swift in Sources */, + 1A8FE1E286DA1769792CED41CA55E329 /* UInt16+Extension.swift in Sources */, + 51B79A81BE02C232299A5DA47E988277 /* UInt32+Extension.swift in Sources */, + 85FB5B7FC1D897B946EBAE4BEAC9CE4D /* UInt64+Extension.swift in Sources */, + B52E20B7BAF9DFF4ACF992979FAA904D /* UInt8+Extension.swift in Sources */, + C83FF7FC178BF33DD5052001F05A83BF /* Updatable.swift in Sources */, + 6121E601434E10D5CC3A01A2C815B0D0 /* Utils+Foundation.swift in Sources */, + 09BF24BCE4F4A393B8E2A8FF610FA924 /* Utils.swift in Sources */, + FD6E4E6D2515323B98F8499CAF7D8486 /* ZeroPadding.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; AE5C44EE6236028D6CCB51608899A34F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -3244,7 +3262,7 @@ 5D5FB078761B0BDFAFD58A94FA1E2357 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "CryptoSwift-macOS"; - target = D618CA243075F5EB0C89F808DD7756D8 /* CryptoSwift-macOS */; + target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; targetProxy = 81302A5702FAB5179E00059495C674D0 /* PBXContainerItemProxy */; }; 61A0C7C5A71562D5B7E98B968E20DA69 /* PBXTargetDependency */ = { @@ -3262,7 +3280,7 @@ 87F1B30D723909893ED4B83C94656F15 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "CryptoSwift-macOS"; - target = D618CA243075F5EB0C89F808DD7756D8 /* CryptoSwift-macOS */; + target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; targetProxy = 19D7329A8315B85B58C8441C1899A592 /* PBXContainerItemProxy */; }; 9D7AAC3DD6D3C5FF1FA407E4509B529D /* PBXTargetDependency */ = { @@ -3304,7 +3322,7 @@ D114C6C7BD73170A69A8A773D9B8C958 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "CryptoSwift-iOS"; - target = 44D204414133961DD4B492AFB5C4DEEB /* CryptoSwift-iOS */; + target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; targetProxy = F964FFD61B8A7C737D6CF0B4A6FCDE08 /* PBXContainerItemProxy */; }; DA81B8EC030393B0ADEBDB02050FCFCB /* PBXTargetDependency */ = { @@ -3316,7 +3334,7 @@ DEDAE6E0420F0B6226E38A36E27FCA91 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "CryptoSwift-iOS"; - target = 44D204414133961DD4B492AFB5C4DEEB /* CryptoSwift-iOS */; + target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; targetProxy = 9F4F45405FD6C2C0442CDE492FDB5FB9 /* PBXContainerItemProxy */; }; DF6D85572A877D19DAFFC67DF1D180D9 /* PBXTargetDependency */ = { @@ -3370,9 +3388,9 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 0902B98C3C916108C745F45E9A520460 /* Release */ = { + 16D02FC5D8B1360961D0964C786FD01A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C9B8D6BE88B58CC5E8D7E0021C88A419 /* CryptoSwift-iOS.xcconfig */; + baseConfigurationReference = FFA38A7573EBA79AA83EBCA62742C2CA /* CryptoSwift-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -3390,41 +3408,43 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; - 0B909F147936EE3B5A2B75910E90133C /* Release */ = { + 1A2FBFC123A5062B1AFCD1139F813593 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E3315426BF4C8B74BC7DAAADC2F23895 /* SipHash-iOS.xcconfig */; + baseConfigurationReference = 1C8F00AC871FE0EC2FBD9A40F62753CD /* Pods-web3swift-macOS.debug.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/SipHash-iOS/SipHash-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-iOS.modulemap"; + EXECUTABLE_PREFIX = lib; + MACH_O_TYPE = staticlib; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SipHash; - PRODUCT_NAME = "SipHash-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; - name = Release; + name = Debug; }; - 159E50336477C361954A9A91DFEBFE03 /* Debug */ = { + 1BCC5A8658E49455E4C0CED34AC9A204 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 168126FF7C51CFAB97039CE513235D26 /* SwiftRLP-macOS.xcconfig */; + baseConfigurationReference = 10F96D8FE1C5606E4F729FFD623428A3 /* secp256k1_swift-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; @@ -3433,98 +3453,109 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SwiftRLP; - PRODUCT_NAME = "SwiftRLP-macOS"; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = "secp256k1_swift-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.1; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; }; name = Debug; }; - 190110B1825C1B9F5BF5A2EBD21E974B /* Release */ = { + 1CFA5364A5C0CACA2DADD1EA40940890 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 33D848500D6FCCF2177712A255BD02F3 /* BigInt-macOS.xcconfig */; + baseConfigurationReference = 10F96D8FE1C5606E4F729FFD623428A3 /* secp256k1_swift-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = "BigInt-macOS"; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = "secp256k1_swift-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; }; name = Release; }; - 21AAE967C2221C4CAECE3D6A43ECA427 /* Debug */ = { + 1E97B1AEB07F9403EB119768EEC01515 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C9B8D6BE88B58CC5E8D7E0021C88A419 /* CryptoSwift-iOS.xcconfig */; + baseConfigurationReference = C7E88808C507E7B039F9595A82EBFA36 /* SwiftRLP-macOS.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap"; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = CryptoSwift; - PRODUCT_NAME = "CryptoSwift-iOS"; + PRODUCT_MODULE_NAME = SwiftRLP; + PRODUCT_NAME = "SwiftRLP-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; + SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.1; }; name = Debug; }; - 25018FC55486B5E6BAE66349531C3C90 /* Debug */ = { + 3C9131BF8D77FFD3F3302CC9B5C5B5E6 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 042CC2D185140E7D725D22562A3E307F /* Pods-web3swift-iOS.debug.xcconfig */; + baseConfigurationReference = 77419BCFFD51D71BDCD33CDB50A1DC50 /* BigInt-iOS.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = "BigInt-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 378C945F1DBC7D5FA8298458F41316FB /* Debug */ = { + 3E7E571193D56B852F45BCA0EDE0AB9F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 37F6A1CB837846EE43730D5E42B4E402 /* secp256k1_swift-iOS.xcconfig */; + baseConfigurationReference = 7D2ED7B574BD12D6937C37D79B6355D2 /* secp256k1_swift-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -3542,115 +3573,67 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 3CC5DCBEED5D9845029A49C658772619 /* Release */ = { + 42E007BDBDF9193BF79BE95940259F6C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CDAA0D27CD19660853301F0480DFD849 /* SwiftRLP-iOS.xcconfig */; + baseConfigurationReference = C7E88808C507E7B039F9595A82EBFA36 /* SwiftRLP-macOS.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap"; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_MODULE_NAME = SwiftRLP; - PRODUCT_NAME = "SwiftRLP-iOS"; + PRODUCT_NAME = "SwiftRLP-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; + SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 438AB316BA6A03F92299860656EDE916 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 37F6A1CB837846EE43730D5E42B4E402 /* secp256k1_swift-iOS.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = secp256k1_swift; - PRODUCT_NAME = "secp256k1_swift-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; }; name = Release; }; - 46BA70D4B299DF8FC60DAF9E8E8A3759 /* Debug */ = { + 4C189926243B31E7A258082A6B093BD5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3031AC0CB5B141FF9911BEBE31A46493 /* PromiseKit.xcconfig */; + baseConfigurationReference = FBF7CDA54705306F388A9AB6943D5D1A /* SwiftRLP-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = Headers/Public/PromiseKit/PromiseKit.modulemap; + GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = PromiseKit; + PRODUCT_MODULE_NAME = SwiftRLP; + PRODUCT_NAME = "SwiftRLP-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 4BA0FC88B78F6A20C8C1F69927D39C04 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 52DC772E67709ACAE0A2731E36A63DC0 /* secp256k1_swift-macOS.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = secp256k1_swift; - PRODUCT_NAME = "secp256k1_swift-macOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; 4CA9B35348640CA3DA1AAB6A01AB2BE4 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 0D88C9D56C3885598E20D9718F3B8F16 /* Pods-web3swift-macOS_Tests.release.xcconfig */; @@ -3674,136 +3657,184 @@ }; name = Release; }; - 5263F1E6888BF7DCE886CF63156B1545 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A5D9B32B104EA0A137D78B89D4D19D40 /* Pods-web3swift-macOS.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - }; - name = Release; - }; - 55D3105FA71C4B27F6E2350877CDAF39 /* Debug */ = { + 50921841075F46C5C393DB5B6A2529EB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 33D848500D6FCCF2177712A255BD02F3 /* BigInt-macOS.xcconfig */; + baseConfigurationReference = 7A37EB85984F608037881FD6E14786A3 /* SipHash-iOS.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/SipHash-iOS/SipHash-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = "BigInt-macOS"; + PRODUCT_MODULE_NAME = SipHash; + PRODUCT_NAME = "SipHash-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; + SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 5DDB390F40DCBEE77D80DB8C549DFFD3 /* Release */ = { + 54BC1E2B4924BE327AAA74950076DC15 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 673FFC4D2B959AB8AEC35D646A85CDCD /* Pods-web3swift-iOS.release.xcconfig */; + baseConfigurationReference = FBF7CDA54705306F388A9AB6943D5D1A /* SwiftRLP-iOS.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = SwiftRLP; + PRODUCT_NAME = "SwiftRLP-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; - 5E8443F4A67DF68FBE469F35CB58733C /* Debug */ = { + 55D2064D6E41D47D3194523E7D5805CC /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2863AEE30806CB2030DDC59D25CF1C36 /* CryptoSwift-macOS.xcconfig */; + baseConfigurationReference = BC6C4D45E9DD5B4669397278183B8A6D /* PromiseKit.root-CorePromise-Foundation.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MODULEMAP_FILE = "Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = CryptoSwift; - PRODUCT_NAME = "CryptoSwift-macOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = "PromiseKit.root-CorePromise-Foundation"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.0; + }; + name = Release; + }; + 5FCBD0A9F6FEC43961BDF6211D4F283C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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_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; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_REQUIRED = NO; + 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 = 9.0; + MACOSX_DEPLOYMENT_TARGET = 10.11; + 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; + SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; - 6C0B5283BB38FB0EC23DE11F13BE108D /* Release */ = { + 60A5DC59ABDBD8D0E90FAADE4366D12E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2863AEE30806CB2030DDC59D25CF1C36 /* CryptoSwift-macOS.xcconfig */; + baseConfigurationReference = FFA38A7573EBA79AA83EBCA62742C2CA /* CryptoSwift-iOS.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_MODULE_NAME = CryptoSwift; - PRODUCT_NAME = "CryptoSwift-macOS"; + PRODUCT_NAME = "CryptoSwift-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; + SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; }; - name = Release; + name = Debug; }; - 7130BF348DD32B0348C1BF51D46F5693 /* Debug */ = { + 637FFE214871E427F5EB980711FE27D4 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1C8F00AC871FE0EC2FBD9A40F62753CD /* Pods-web3swift-macOS.debug.xcconfig */; + baseConfigurationReference = BC6C4D45E9DD5B4669397278183B8A6D /* PromiseKit.root-CorePromise-Foundation.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; @@ -3811,118 +3842,138 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MODULEMAP_FILE = "Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = "PromiseKit.root-CorePromise-Foundation"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; }; name = Debug; }; - 7467E98E3075038532F6FB2D3D48E029 /* Release */ = { + 6B61E32BB5209D45BF8284B26DD646B6 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A91F063F0878CD71B91FA6F40B94A8DD /* scrypt-iOS.xcconfig */; + baseConfigurationReference = F40F91A4B7758F182DBA05D9C974003E /* scrypt-macOS.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/scrypt-iOS/scrypt-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-iOS.modulemap"; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/scrypt-macOS/scrypt-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = "scrypt-iOS"; + PRODUCT_NAME = "scrypt-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; + SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; }; name = Release; }; - 7D25FC136F509F3C9BF9E2524EB485DD /* Release */ = { + 6B6634FBDBCD33490C8F987986D50774 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B334729A830AF9B565C76134288E4EDF /* Result-iOS.xcconfig */; + baseConfigurationReference = 0475C2751B32FD3CB4D4A78B955F50F8 /* scrypt-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/Result-iOS/Result-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/Result/Result-iOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/scrypt-iOS/scrypt-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = "Result-iOS"; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = "scrypt-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; - 83210CA27027B561A7B5E007B06CA4D7 /* Release */ = { + 6E0DC298E298981B18BAF87BA11542F6 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E3ADB0156604A4FD7CD47B25248088C2 /* Pods-web3swift-iOS_Tests.release.xcconfig */; + baseConfigurationReference = 40497EC0B9D6C3A291AA63F310A549A2 /* PromiseKit.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACH_O_TYPE = staticlib; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = Headers/Public/PromiseKit/PromiseKit.modulemap; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = PromiseKit; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; - 8518F8D713080EF1D6A105CF2021EC99 /* Debug */ = { + 75E16E6E94E4CDC1DF735E3C84E87DEC /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B7762E4245191B27674EB7EB82DCFFF1 /* Pods-web3swift-macOS_Tests.debug.xcconfig */; + baseConfigurationReference = 0091667FAE21CC6D590AC1ADB6410352 /* SipHash-macOS.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 10.11; + GCC_PREFIX_HEADER = "Target Support Files/SipHash-macOS/SipHash-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = SipHash; + PRODUCT_NAME = "SipHash-macOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; }; name = Debug; }; - 873776BFD8A229B51D5B14C7F195AA3C /* Release */ = { + 77E92E2063F8A970CD3DF6C52F9CB0A3 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E748C35C819EB524EA9D3EAE51962FD9 /* Result-macOS.xcconfig */; + baseConfigurationReference = 40BFCBA4E1D706A666116029D5E0E726 /* Result-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CODE_SIGN_IDENTITY = "-"; @@ -3942,144 +3993,166 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; }; name = Release; }; - 87685BB09BD987A070CBBDE7937D8E24 /* Debug */ = { + 79E456F1CBDE8C5EE5AA38BC6C38BFE7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E748C35C819EB524EA9D3EAE51962FD9 /* Result-macOS.xcconfig */; + baseConfigurationReference = 0475C2751B32FD3CB4D4A78B955F50F8 /* scrypt-iOS.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/Result-macOS/Result-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/Result/Result-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/scrypt-iOS/scrypt-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = "Result-macOS"; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = "scrypt-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; + SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 8AD7D1D96DB7F5F4AD75E176A6E5BA14 /* Debug */ = { + 7A748354D2BAB28D6D9A5ACD8B138D72 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 52DC772E67709ACAE0A2731E36A63DC0 /* secp256k1_swift-macOS.xcconfig */; + baseConfigurationReference = 9B3C1FAD3DD5A0A918CA3605928E5CA9 /* CryptoSwift-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = secp256k1_swift; - PRODUCT_NAME = "secp256k1_swift-macOS"; + PRODUCT_MODULE_NAME = CryptoSwift; + PRODUCT_NAME = "CryptoSwift-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.2; }; - name = Debug; + name = Release; }; - 8BA71A7BE3D534D4952DA419D9A65E1B /* Debug */ = { + 83210CA27027B561A7B5E007B06CA4D7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CDAA0D27CD19660853301F0480DFD849 /* SwiftRLP-iOS.xcconfig */; + baseConfigurationReference = E3ADB0156604A4FD7CD47B25248088C2 /* Pods-web3swift-iOS_Tests.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap"; + MACH_O_TYPE = staticlib; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SwiftRLP; - PRODUCT_NAME = "SwiftRLP-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 8518F8D713080EF1D6A105CF2021EC99 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B7762E4245191B27674EB7EB82DCFFF1 /* Pods-web3swift-macOS_Tests.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + EXECUTABLE_PREFIX = lib; + MACH_O_TYPE = staticlib; + MACOSX_DEPLOYMENT_TARGET = 10.11; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = macosx; + SKIP_INSTALL = YES; }; name = Debug; }; - 901A8ABA1A0F32437C72ADA21170A7CE /* Release */ = { + 858A2A341A76470B0B603B055357071F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5E7DBCA26552356539B821BC83348925 /* BigInt-iOS.xcconfig */; + baseConfigurationReference = 673FFC4D2B959AB8AEC35D646A85CDCD /* Pods-web3swift-iOS.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-iOS.modulemap"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = "BigInt-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; - 91ED5FFAEE49C0C45E962B59E6711B76 /* Release */ = { + 8671873F3F1E5F1068D77E5606FD46A5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BD5F7052BBE014CE84365A473B829050 /* PromiseKit.root-CorePromise-Foundation.xcconfig */; + baseConfigurationReference = 40BFCBA4E1D706A666116029D5E0E726 /* Result-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/Result-macOS/Result-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/Result/Result-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = "PromiseKit.root-CorePromise-Foundation"; + PRODUCT_MODULE_NAME = Result; + PRODUCT_NAME = "Result-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; }; - name = Release; + name = Debug; }; - 9B951347BC94F70F6DFB0D27D1E0FC17 /* Debug */ = { + 8E915485F5B1E08FF1117FF158D60A69 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BD5F7052BBE014CE84365A473B829050 /* PromiseKit.root-CorePromise-Foundation.xcconfig */; + baseConfigurationReference = F40F91A4B7758F182DBA05D9C974003E /* scrypt-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; @@ -4088,23 +4161,78 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/scrypt-macOS/scrypt-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = "PromiseKit.root-CorePromise-Foundation"; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = "scrypt-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.1; + }; + name = Debug; + }; + 98E0DE5497E5A27A343127F14FA1BF54 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 40497EC0B9D6C3A291AA63F310A549A2 /* PromiseKit.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = Headers/Public/PromiseKit/PromiseKit.modulemap; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = PromiseKit; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - A3625BB68C06D1FB0393AACB165DBA14 /* Debug */ = { + 9F89BA0BDBDA8C292C7AF81AE6E74193 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0091667FAE21CC6D590AC1ADB6410352 /* SipHash-macOS.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/SipHash-macOS/SipHash-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-macOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = SipHash; + PRODUCT_NAME = "SipHash-macOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.0; + }; + name = Release; + }; + 9FC95E93B60448569789C60751C0DD23 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -4136,17 +4264,16 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; 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", + "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -4157,119 +4284,67 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_ENABLE_DEBUG_INFO = NO; 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 = 4.2; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - A87C238E918398E6F4AEB46A8FE21B76 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3031AC0CB5B141FF9911BEBE31A46493 /* PromiseKit.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = Headers/Public/PromiseKit/PromiseKit.modulemap; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = PromiseKit; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - A895391A378F7146617E9C6F48AEF62C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 510A8C675D48B2B9F8821CFCF830CAC5 /* SipHash-macOS.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/SipHash-macOS/SipHash-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-macOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SipHash; - PRODUCT_NAME = "SipHash-macOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SYMROOT = "${SRCROOT}/../build"; }; - name = Debug; + name = Release; }; - AE1103E37ACB95003C3B44F289F6F4AD /* Debug */ = { + A45B3EF7FBB166F549A4ABEE13B6CE87 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B334729A830AF9B565C76134288E4EDF /* Result-iOS.xcconfig */; + baseConfigurationReference = 77419BCFFD51D71BDCD33CDB50A1DC50 /* BigInt-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/Result-iOS/Result-iOS-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/Result/Result-iOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = "Result-iOS"; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = "BigInt-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; }; - name = Debug; + name = Release; }; - B2EBE3B70D631D99E240EF14DD7B0A9F /* Release */ = { + ADB19600F3034CFC88E8930883A97411 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 168126FF7C51CFAB97039CE513235D26 /* SwiftRLP-macOS.xcconfig */; + baseConfigurationReference = 7A37EB85984F608037881FD6E14786A3 /* SipHash-iOS.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/SipHash-iOS/SipHash-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SwiftRLP; - PRODUCT_NAME = "SwiftRLP-macOS"; + PRODUCT_MODULE_NAME = SipHash; + PRODUCT_NAME = "SipHash-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; + SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.1; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; }; name = Release; }; @@ -4294,199 +4369,196 @@ }; name = Debug; }; - C04BFDA2E8EF7282D8A0FAAD68279E43 /* Debug */ = { + C3B95632033BF4A43E88D89D986675EA /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0C016E31F7E35964F636011F294536FD /* Result-iOS.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/Result-iOS/Result-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/Result/Result-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = Result; + PRODUCT_NAME = "Result-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + CCE6ADD3343BBD7115B558970171731E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CCA64A8640FCCC40E3412423E039371A /* scrypt-macOS.xcconfig */; + baseConfigurationReference = 9B3C1FAD3DD5A0A918CA3605928E5CA9 /* CryptoSwift-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/scrypt-macOS/scrypt-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = "scrypt-macOS"; + PRODUCT_MODULE_NAME = CryptoSwift; + PRODUCT_NAME = "CryptoSwift-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.1; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Debug; }; - CB2C61730C420D7E1AED74B447061493 /* Debug */ = { + D64511E0FB285D5E2F638DA67BB31729 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E3315426BF4C8B74BC7DAAADC2F23895 /* SipHash-iOS.xcconfig */; + baseConfigurationReference = 0C016E31F7E35964F636011F294536FD /* Result-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/SipHash-iOS/SipHash-iOS-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/Result-iOS/Result-iOS-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-iOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/Result/Result-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SipHash; - PRODUCT_NAME = "SipHash-iOS"; + PRODUCT_MODULE_NAME = Result; + PRODUCT_NAME = "Result-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - D01478928F4FB100D668550875693C34 /* Release */ = { + E1CA2CF2207508268263503EC77DD1AE /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 7D2ED7B574BD12D6937C37D79B6355D2 /* secp256k1_swift-iOS.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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_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 = 9.0; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = "secp256k1_swift-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.2; - SYMROOT = "${SRCROOT}/../build"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; }; name = Release; }; - D1B49B856065EF89242E527E9E488CEF /* Debug */ = { + ED1F36CA81A4FAAC1C67B05F7E9F4498 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A91F063F0878CD71B91FA6F40B94A8DD /* scrypt-iOS.xcconfig */; + baseConfigurationReference = A5D9B32B104EA0A137D78B89D4D19D40 /* Pods-web3swift-macOS.release.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/scrypt-iOS/scrypt-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-iOS.modulemap"; + EXECUTABLE_PREFIX = lib; + MACH_O_TYPE = staticlib; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = "scrypt-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.1; - TARGETED_DEVICE_FAMILY = "1,2"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; }; - name = Debug; + name = Release; }; - EB39C1FA7B7F12063F7AE8333D2A4C21 /* Debug */ = { + F3FCBAAE6245C7BE73AFC4E87F57843B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5E7DBCA26552356539B821BC83348925 /* BigInt-iOS.xcconfig */; + baseConfigurationReference = 042CC2D185140E7D725D22562A3E307F /* Pods-web3swift-iOS.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-iOS.modulemap"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = "BigInt-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - F06F7DE5660592664DA72D461F7BC4D6 /* Release */ = { + F4CD297453714BA949383E8B4EAB4DA3 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CCA64A8640FCCC40E3412423E039371A /* scrypt-macOS.xcconfig */; + baseConfigurationReference = 43CCBB7CEE935A6D645B18B87E5F1A5E /* BigInt-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/scrypt-macOS/scrypt-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = "scrypt-macOS"; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = "BigInt-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.1; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.0; }; name = Release; }; - FA1664274B2659B28BDF9A0DA85ACD2E /* Release */ = { + F6220DAE297B6F9A75ACF0DCDBBE507C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 510A8C675D48B2B9F8821CFCF830CAC5 /* SipHash-macOS.xcconfig */; + baseConfigurationReference = 43CCBB7CEE935A6D645B18B87E5F1A5E /* BigInt-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CODE_SIGN_IDENTITY = "-"; @@ -4494,84 +4566,85 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/SipHash-macOS/SipHash-macOS-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch"; MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-macOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SipHash; - PRODUCT_NAME = "SipHash-macOS"; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = "BigInt-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; }; - name = Release; + name = Debug; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 249649C0D306826B8AEC43AC3D978C98 /* Build configuration list for PBXNativeTarget "SipHash-macOS" */ = { + 19CA2EF2646C88FC1D5F4864827AF9A9 /* Build configuration list for PBXNativeTarget "CryptoSwift-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - A895391A378F7146617E9C6F48AEF62C /* Debug */, - FA1664274B2659B28BDF9A0DA85ACD2E /* Release */, + 60A5DC59ABDBD8D0E90FAADE4366D12E /* Debug */, + 16D02FC5D8B1360961D0964C786FD01A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 288F5A4EECE69C1DC4494A2655035DA7 /* Build configuration list for PBXNativeTarget "secp256k1_swift-iOS" */ = { + 249649C0D306826B8AEC43AC3D978C98 /* Build configuration list for PBXNativeTarget "SipHash-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 378C945F1DBC7D5FA8298458F41316FB /* Debug */, - 438AB316BA6A03F92299860656EDE916 /* Release */, + 75E16E6E94E4CDC1DF735E3C84E87DEC /* Debug */, + 9F89BA0BDBDA8C292C7AF81AE6E74193 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2D5D9861222B1B7C6B2D720C3CE966C3 /* Build configuration list for PBXNativeTarget "SwiftRLP-macOS" */ = { + 288F5A4EECE69C1DC4494A2655035DA7 /* Build configuration list for PBXNativeTarget "secp256k1_swift-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 159E50336477C361954A9A91DFEBFE03 /* Debug */, - B2EBE3B70D631D99E240EF14DD7B0A9F /* Release */, + 3E7E571193D56B852F45BCA0EDE0AB9F /* Debug */, + E1CA2CF2207508268263503EC77DD1AE /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 2D5D9861222B1B7C6B2D720C3CE966C3 /* Build configuration list for PBXNativeTarget "SwiftRLP-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - A3625BB68C06D1FB0393AACB165DBA14 /* Debug */, - D01478928F4FB100D668550875693C34 /* Release */, + 1E97B1AEB07F9403EB119768EEC01515 /* Debug */, + 42E007BDBDF9193BF79BE95940259F6C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 47C2AA14D9BBB2B7CC5629CE1C553C1B /* Build configuration list for PBXNativeTarget "BigInt-iOS" */ = { + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - EB39C1FA7B7F12063F7AE8333D2A4C21 /* Debug */, - 901A8ABA1A0F32437C72ADA21170A7CE /* Release */, + 5FCBD0A9F6FEC43961BDF6211D4F283C /* Debug */, + 9FC95E93B60448569789C60751C0DD23 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4DE4E92544E4D3852787DF5ADA292D66 /* Build configuration list for PBXNativeTarget "secp256k1_swift-macOS" */ = { + 47C2AA14D9BBB2B7CC5629CE1C553C1B /* Build configuration list for PBXNativeTarget "BigInt-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8AD7D1D96DB7F5F4AD75E176A6E5BA14 /* Debug */, - 4BA0FC88B78F6A20C8C1F69927D39C04 /* Release */, + 3C9131BF8D77FFD3F3302CC9B5C5B5E6 /* Debug */, + A45B3EF7FBB166F549A4ABEE13B6CE87 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 604E68D68F08C230C85D2D819532C6AF /* Build configuration list for PBXNativeTarget "CryptoSwift-macOS" */ = { + 4DE4E92544E4D3852787DF5ADA292D66 /* Build configuration list for PBXNativeTarget "secp256k1_swift-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 5E8443F4A67DF68FBE469F35CB58733C /* Debug */, - 6C0B5283BB38FB0EC23DE11F13BE108D /* Release */, + 1BCC5A8658E49455E4C0CED34AC9A204 /* Debug */, + 1CFA5364A5C0CACA2DADD1EA40940890 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4588,17 +4661,8 @@ 6C6D2DEE61A644A6598FBEDB9971FD63 /* Build configuration list for PBXNativeTarget "SwiftRLP-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8BA71A7BE3D534D4952DA419D9A65E1B /* Debug */, - 3CC5DCBEED5D9845029A49C658772619 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6FBBA029AFB86EC5F02D2B578121B307 /* Build configuration list for PBXNativeTarget "CryptoSwift-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 21AAE967C2221C4CAECE3D6A43ECA427 /* Debug */, - 0902B98C3C916108C745F45E9A520460 /* Release */, + 4C189926243B31E7A258082A6B093BD5 /* Debug */, + 54BC1E2B4924BE327AAA74950076DC15 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4606,8 +4670,8 @@ 7605C90CA002CA15242C3D87F18484A2 /* Build configuration list for PBXNativeTarget "scrypt-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - D1B49B856065EF89242E527E9E488CEF /* Debug */, - 7467E98E3075038532F6FB2D3D48E029 /* Release */, + 79E456F1CBDE8C5EE5AA38BC6C38BFE7 /* Debug */, + 6B6634FBDBCD33490C8F987986D50774 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4615,8 +4679,8 @@ 7AF19CA86BE1CDF981AE337B179CC0BF /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7130BF348DD32B0348C1BF51D46F5693 /* Debug */, - 5263F1E6888BF7DCE886CF63156B1545 /* Release */, + 1A2FBFC123A5062B1AFCD1139F813593 /* Debug */, + ED1F36CA81A4FAAC1C67B05F7E9F4498 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4624,8 +4688,8 @@ 8F03B9047707EFF3F60AA966A45C8A4D /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { isa = XCConfigurationList; buildConfigurations = ( - 46BA70D4B299DF8FC60DAF9E8E8A3759 /* Debug */, - A87C238E918398E6F4AEB46A8FE21B76 /* Release */, + 98E0DE5497E5A27A343127F14FA1BF54 /* Debug */, + 6E0DC298E298981B18BAF87BA11542F6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4642,8 +4706,8 @@ 9F771DCE26E84668F2CA6B9E87224F88 /* Build configuration list for PBXNativeTarget "Result-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - AE1103E37ACB95003C3B44F289F6F4AD /* Debug */, - 7D25FC136F509F3C9BF9E2524EB485DD /* Release */, + D64511E0FB285D5E2F638DA67BB31729 /* Debug */, + C3B95632033BF4A43E88D89D986675EA /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4651,8 +4715,8 @@ A1A3D7F09A5AFD2BD4DA3D3CDACBBCFC /* Build configuration list for PBXNativeTarget "BigInt-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 55D3105FA71C4B27F6E2350877CDAF39 /* Debug */, - 190110B1825C1B9F5BF5A2EBD21E974B /* Release */, + F6220DAE297B6F9A75ACF0DCDBBE507C /* Debug */, + F4CD297453714BA949383E8B4EAB4DA3 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4660,8 +4724,8 @@ A4CBD6E90C567ACBD75570719DB45B51 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 25018FC55486B5E6BAE66349531C3C90 /* Debug */, - 5DDB390F40DCBEE77D80DB8C549DFFD3 /* Release */, + F3FCBAAE6245C7BE73AFC4E87F57843B /* Debug */, + 858A2A341A76470B0B603B055357071F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4669,8 +4733,8 @@ B3BABA326F05564F9B29C631D85A02A9 /* Build configuration list for PBXNativeTarget "PromiseKit.root-CorePromise-Foundation" */ = { isa = XCConfigurationList; buildConfigurations = ( - 9B951347BC94F70F6DFB0D27D1E0FC17 /* Debug */, - 91ED5FFAEE49C0C45E962B59E6711B76 /* Release */, + 637FFE214871E427F5EB980711FE27D4 /* Debug */, + 55D2064D6E41D47D3194523E7D5805CC /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4678,8 +4742,8 @@ C6A6186E7DE2AF444E2D9AE0184A0479 /* Build configuration list for PBXNativeTarget "Result-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 87685BB09BD987A070CBBDE7937D8E24 /* Debug */, - 873776BFD8A229B51D5B14C7F195AA3C /* Release */, + 8671873F3F1E5F1068D77E5606FD46A5 /* Debug */, + 77E92E2063F8A970CD3DF6C52F9CB0A3 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4687,8 +4751,17 @@ C6C3FEF3DB3E9F8728E424120C1A0F0D /* Build configuration list for PBXNativeTarget "scrypt-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - C04BFDA2E8EF7282D8A0FAAD68279E43 /* Debug */, - F06F7DE5660592664DA72D461F7BC4D6 /* Release */, + 8E915485F5B1E08FF1117FF158D60A69 /* Debug */, + 6B61E32BB5209D45BF8284B26DD646B6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F03040809733F3691A82F4D1E80B6BA3 /* Build configuration list for PBXNativeTarget "CryptoSwift-macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CCE6ADD3343BBD7115B558970171731E /* Debug */, + 7A748354D2BAB28D6D9A5ACD8B138D72 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4696,8 +4769,8 @@ F8A195F0CD637B21B4FABEA84B502663 /* Build configuration list for PBXNativeTarget "SipHash-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - CB2C61730C420D7E1AED74B447061493 /* Debug */, - 0B909F147936EE3B5A2B75910E90133C /* Release */, + 50921841075F46C5C393DB5B6A2529EB /* Debug */, + ADB19600F3034CFC88E8930883A97411 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.plist b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.plist index 16b8396d7..7c82be473 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.plist +++ b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.plist @@ -1,239 +1,5 @@ - - 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 - Copyright (C) 2014-2017 Marcin Krzyżanowski <marcin.krzyzanowski@gmail.com> -This software is provided 'as-is', without any express or implied warranty. - -In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - -- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -- This notice may not be removed or altered from any source or binary distribution. -- Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' - License - Attribution - Title - CryptoSwift - Type - PSGroupSpecifier - - - FooterText - Copyright 2016-present, Max Howell; mxcl@me.com - -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 - PromiseKit - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2014 Rob Rix - -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 - Result - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2016 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 - SipHash - Type - PSGroupSpecifier - - - FooterText - Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> - -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 - Apache License 2.0 - Title - SwiftRLP - Type - PSGroupSpecifier - - - FooterText - Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> - -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 - Apache License 2.0 - Title - scrypt - Type - PSGroupSpecifier - - - FooterText - Copyright 2018 Alex Vlasov <av@bankexfoundation.org> (bankexfoundation.org) - -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 - Apache License 2.0 - Title - secp256k1_swift - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - + diff --git a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.debug.xcconfig b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.debug.xcconfig index d0c0868e5..4c856d5b8 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.debug.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.debug.xcconfig @@ -1,7 +1,7 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-iOS" -l"CryptoSwift-iOS" -l"PromiseKit" -l"Result-iOS" -l"SipHash-iOS" -l"SwiftRLP-iOS" -l"scrypt-iOS" -l"secp256k1_swift-iOS" -framework "Foundation" -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.release.xcconfig b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.release.xcconfig index d0c0868e5..4c856d5b8 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.release.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.release.xcconfig @@ -1,7 +1,7 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-iOS" -l"CryptoSwift-iOS" -l"PromiseKit" -l"Result-iOS" -l"SipHash-iOS" -l"SwiftRLP-iOS" -l"scrypt-iOS" -l"secp256k1_swift-iOS" -framework "Foundation" -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests-acknowledgements.plist b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests-acknowledgements.plist index 7acbad1ea..7c82be473 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests-acknowledgements.plist +++ b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests-acknowledgements.plist @@ -1,29 +1,5 @@ - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - + diff --git a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.debug.xcconfig b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.debug.xcconfig index f7e2652f8..76d174683 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.debug.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.debug.xcconfig @@ -1,6 +1,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.release.xcconfig b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.release.xcconfig index f7e2652f8..76d174683 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.release.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.release.xcconfig @@ -1,6 +1,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.plist b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.plist index 16b8396d7..7c82be473 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.plist +++ b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.plist @@ -1,239 +1,5 @@ - - 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 - Copyright (C) 2014-2017 Marcin Krzyżanowski <marcin.krzyzanowski@gmail.com> -This software is provided 'as-is', without any express or implied warranty. - -In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - -- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -- This notice may not be removed or altered from any source or binary distribution. -- Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' - License - Attribution - Title - CryptoSwift - Type - PSGroupSpecifier - - - FooterText - Copyright 2016-present, Max Howell; mxcl@me.com - -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 - PromiseKit - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2014 Rob Rix - -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 - Result - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2016 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 - SipHash - Type - PSGroupSpecifier - - - FooterText - Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> - -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 - Apache License 2.0 - Title - SwiftRLP - Type - PSGroupSpecifier - - - FooterText - Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> - -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 - Apache License 2.0 - Title - scrypt - Type - PSGroupSpecifier - - - FooterText - Copyright 2018 Alex Vlasov <av@bankexfoundation.org> (bankexfoundation.org) - -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 - Apache License 2.0 - Title - secp256k1_swift - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - + diff --git a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig index 70218c0b7..4a27f3b2c 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig @@ -1,7 +1,7 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-macOS" -l"CryptoSwift-macOS" -l"PromiseKit.root-CorePromise-Foundation" -l"Result-macOS" -l"SipHash-macOS" -l"SwiftRLP-macOS" -l"scrypt-macOS" -l"secp256k1_swift-macOS" -framework "Foundation" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig index 70218c0b7..4a27f3b2c 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig @@ -1,7 +1,7 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-macOS" -l"CryptoSwift-macOS" -l"PromiseKit.root-CorePromise-Foundation" -l"Result-macOS" -l"SipHash-macOS" -l"SwiftRLP-macOS" -l"scrypt-macOS" -l"secp256k1_swift-macOS" -framework "Foundation" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests-acknowledgements.plist b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests-acknowledgements.plist index 7acbad1ea..7c82be473 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests-acknowledgements.plist +++ b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests-acknowledgements.plist @@ -1,29 +1,5 @@ - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - + diff --git a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.debug.xcconfig b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.debug.xcconfig index df1512ad8..6f83ba19c 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.debug.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.debug.xcconfig @@ -1,6 +1,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.release.xcconfig b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.release.xcconfig index df1512ad8..6f83ba19c 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.release.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.release.xcconfig @@ -1,6 +1,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/web3swift.xcodeproj/xcshareddata/xcschemes/web3swift_Tests.xcscheme b/web3swift.xcodeproj/xcshareddata/xcschemes/web3swift_Tests.xcscheme deleted file mode 100755 index 81b2bb891..000000000 --- a/web3swift.xcodeproj/xcshareddata/xcschemes/web3swift_Tests.xcscheme +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/web3swift.xcodeproj/xcshareddata/xcschemes/web3swift_local_Tests.xcscheme b/web3swift.xcodeproj/xcshareddata/xcschemes/web3swift_local_Tests.xcscheme deleted file mode 100755 index 612f6254c..000000000 --- a/web3swift.xcodeproj/xcshareddata/xcschemes/web3swift_local_Tests.xcscheme +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/web3swift.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/web3swift.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..0c67376eb --- /dev/null +++ b/web3swift.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,5 @@ + + + + + From e6fdc842128038eb23b41fadf74d99f361d7c7e5 Mon Sep 17 00:00:00 2001 From: BaldyAsh Date: Thu, 25 Oct 2018 13:52:46 +0300 Subject: [PATCH 03/23] fixed --- web3swift.xcodeproj/project.pbxproj | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/web3swift.xcodeproj/project.pbxproj b/web3swift.xcodeproj/project.pbxproj index b4370e140..cb446b57e 100755 --- a/web3swift.xcodeproj/project.pbxproj +++ b/web3swift.xcodeproj/project.pbxproj @@ -203,6 +203,14 @@ B219DC172154F3EE0035BF94 /* ENSResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B219DC162154F3EE0035BF94 /* ENSResolver.swift */; }; B2E668CE214F8A7B00C3CC2D /* ENS.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2E668CD214F8A7B00C3CC2D /* ENS.swift */; }; B350A445E5DB35C60E59AD70 /* libPods-web3swift-macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 57F8C9C48884592DCF561393 /* libPods-web3swift-macOS.a */; }; + E2065FB62181D7D700701068 /* Web3+ERC721.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E94C5F217788E0005F54A0 /* Web3+ERC721.swift */; }; + E2065FB72181D7D700701068 /* JSONRPCrequestDispatcher+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2C590752152835400FF53D3 /* JSONRPCrequestDispatcher+ObjC.swift */; }; + E2065FB82181D7D700701068 /* Promise+Web3+Eth+EstimateGas.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1823F20D79FDB0016741F /* Promise+Web3+Eth+EstimateGas.swift */; }; + E2065FB92181D7D700701068 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81195AAF20D7FF8500ABC6B1 /* Promise+Web3+Contract+GetIndexedEvents.swift */; }; + E2065FBA2181D7D700701068 /* Promise+Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 985BFD4D216E2E0A00B28C14 /* Promise+Web3+TxPool.swift */; }; + E2065FBB2181D7D700701068 /* Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 985BFD49216CE8B100B28C14 /* Web3+TxPool.swift */; }; + E2065FBC2181D7D700701068 /* ENS.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2E668CD214F8A7B00C3CC2D /* ENS.swift */; }; + E2065FBD2181D7D700701068 /* ENSResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B219DC162154F3EE0035BF94 /* ENSResolver.swift */; }; E23B5ADB20EA67D800DC7F32 /* web3swift_AdvancedABIv2_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5ADA20EA67D800DC7F32 /* web3swift_AdvancedABIv2_Tests.swift */; }; E23B5ADD20EA685D00DC7F32 /* web3swift_EIP67_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5ADC20EA685D00DC7F32 /* web3swift_EIP67_Tests.swift */; }; E23B5AE120EA695400DC7F32 /* web3swift_rinkeby_personalSignature_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5AE020EA695400DC7F32 /* web3swift_rinkeby_personalSignature_Tests.swift */; }; @@ -1194,6 +1202,14 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E2065FB62181D7D700701068 /* Web3+ERC721.swift in Sources */, + E2065FB72181D7D700701068 /* JSONRPCrequestDispatcher+ObjC.swift in Sources */, + E2065FB82181D7D700701068 /* Promise+Web3+Eth+EstimateGas.swift in Sources */, + E2065FB92181D7D700701068 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */, + E2065FBA2181D7D700701068 /* Promise+Web3+TxPool.swift in Sources */, + E2065FBB2181D7D700701068 /* Web3+TxPool.swift in Sources */, + E2065FBC2181D7D700701068 /* ENS.swift in Sources */, + E2065FBD2181D7D700701068 /* ENSResolver.swift in Sources */, 8159C50C21352CB700197B91 /* Web3+ERC20.swift in Sources */, 4194811B203630530065A83B /* Web3+HttpProvider.swift in Sources */, 4194811E203630530065A83B /* Web3.swift in Sources */, From 647a3fe0db7fb2a51d83a5d1ce4108610a0f0b68 Mon Sep 17 00:00:00 2001 From: Anton Grigorev Date: Thu, 25 Oct 2018 14:27:45 +0300 Subject: [PATCH 04/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2cdef8fa1..6c24de4d2 100755 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ $ brew install carthage To integrate web3swift into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "web3swift/web3swift" ~> 1.1.9 +github "matterinc/web3swift" "carthage" ``` Run `carthage update` to build the framework and drag the built `web3swift.framework` into your Xcode project. From 100bbd2cf8fe2b241e858cf9ae1ab548d8a8d204 Mon Sep 17 00:00:00 2001 From: BaldyAsh Date: Thu, 25 Oct 2018 16:39:42 +0300 Subject: [PATCH 05/23] added eth address pod, fixes in project --- Podfile | 1 + Podfile.lock | 7 +- .../Classes/EthereumAddress.swift | 20 +- .../EthereumAddress/Classes/Extensions.swift | 226 + .../EthereumAddress/EthereumAddress.h | 23 + Pods/EthereumAddress/LICENSE | 13 + Pods/EthereumAddress/README.md | 3 + .../Private/EthereumAddress/EthereumAddress.h | 1 + .../EthereumAddress-iOS-umbrella.h | 1 + .../EthereumAddress-iOS.modulemap | 1 + .../EthereumAddress-macOS-umbrella.h | 1 + .../EthereumAddress-macOS.modulemap | 1 + .../Public/EthereumAddress/EthereumAddress.h | 1 + Pods/Manifest.lock | 7 +- Pods/Pods.xcodeproj/project.pbxproj | 4861 +++++++++-------- .../EthereumAddress-iOS-dummy.m | 5 + .../EthereumAddress-iOS-prefix.pch | 12 + .../EthereumAddress-iOS-umbrella.h | 17 + .../EthereumAddress-iOS.modulemap | 7 + .../EthereumAddress-iOS.xcconfig | 13 + .../EthereumAddress-macOS-dummy.m | 5 + .../EthereumAddress-macOS-prefix.pch | 12 + .../EthereumAddress-macOS-umbrella.h | 17 + .../EthereumAddress-macOS.modulemap | 7 + .../EthereumAddress-macOS.xcconfig | 13 + ...ds-web3swift-iOS-acknowledgements.markdown | 17 + .../Pods-web3swift-iOS.debug.xcconfig | 12 +- .../Pods-web3swift-iOS.release.xcconfig | 12 +- .../Pods-web3swift-iOS_Tests.debug.xcconfig | 8 +- .../Pods-web3swift-iOS_Tests.release.xcconfig | 8 +- ...-web3swift-macOS-acknowledgements.markdown | 17 + .../Pods-web3swift-macOS.debug.xcconfig | 12 +- .../Pods-web3swift-macOS.release.xcconfig | 12 +- .../Pods-web3swift-macOS_Tests.debug.xcconfig | 8 +- ...ods-web3swift-macOS_Tests.release.xcconfig | 8 +- web3swift.xcodeproj/project.pbxproj | 6 - web3swift/ABIv2/Classes/ABIv2Decoding.swift | 1 + web3swift/ABIv2/Classes/ABIv2Encoding.swift | 1 + .../ABIv2/Classes/ABIv2ParameterTypes.swift | 1 + .../Classes/ComparisonExtensions.swift | 1 + .../Contract/Classes/ContractABIv2.swift | 1 + .../Contract/Classes/ContractProtocol.swift | 1 + .../EthereumFilterEncodingExtensions.swift | 1 + .../Classes/Web3+BrowserFunctions.swift | 1 + .../HookedFunctions/Classes/Web3+Wallet.swift | 1 + .../Classes/AbstractKeystore.swift | 1 + .../Classes/BIP32Keystore.swift | 2 +- .../Classes/EthereumKeystoreV3.swift | 1 + web3swift/KeystoreManager/Classes/IBAN.swift | 1 + .../Classes/KeystoreManager.swift | 1 + .../Classes/PlainKeystore.swift | 2 + .../Classes/EthereumAddress+ObjC.swift | 1 + .../ERC20/Web3+ERC20.swift | 1 + .../ERC721/Web3+ERC721.swift | 1 + .../Promise+Web3+Eth+GetAccounts.swift | 1 + .../Classes/Promise+Web3+Eth+GetBalance.swift | 1 + ...Promise+Web3+Eth+GetTransactionCount.swift | 1 + .../Classes/Promise+Web3+Personal+Sign.swift | 1 + .../Promise+Web3+Personal+UnlockAccount.swift | 1 + .../Transaction/Classes/BloomFilter.swift | 1 + .../Classes/EthereumTransaction.swift | 1 + .../Classes/TransactionSigner.swift | 1 + web3swift/Utils/Classes/EIP67Code.swift | 1 + web3swift/Utils/Classes/EIP681.swift | 1 + web3swift/Utils/Classes/ENS.swift | 1 + web3swift/Utils/Classes/ENSResolver.swift | 1 + web3swift/Web3/Classes/Web3+Contract.swift | 1 + web3swift/Web3/Classes/Web3+Eth.swift | 1 + web3swift/Web3/Classes/Web3+JSONRPC.swift | 1 + web3swift/Web3/Classes/Web3+Options.swift | 1 + web3swift/Web3/Classes/Web3+Personal.swift | 1 + web3swift/Web3/Classes/Web3+Protocols.swift | 1 + web3swift/Web3/Classes/Web3+Structures.swift | 1 + web3swift/Web3/Classes/Web3+Utils.swift | 1 + 74 files changed, 3137 insertions(+), 2298 deletions(-) rename {web3swift/KeystoreManager => Pods/EthereumAddress/EthereumAddress}/Classes/EthereumAddress.swift (89%) mode change 100755 => 100644 create mode 100644 Pods/EthereumAddress/EthereumAddress/Classes/Extensions.swift create mode 100644 Pods/EthereumAddress/EthereumAddress/EthereumAddress.h create mode 100644 Pods/EthereumAddress/LICENSE create mode 100644 Pods/EthereumAddress/README.md create mode 120000 Pods/Headers/Private/EthereumAddress/EthereumAddress.h create mode 120000 Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h create mode 120000 Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap create mode 120000 Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h create mode 120000 Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap create mode 120000 Pods/Headers/Public/EthereumAddress/EthereumAddress.h create mode 100644 Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-dummy.m create mode 100644 Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-prefix.pch create mode 100644 Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-umbrella.h create mode 100644 Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.modulemap create mode 100644 Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.xcconfig create mode 100644 Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-dummy.m create mode 100644 Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch create mode 100644 Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h create mode 100644 Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.modulemap create mode 100644 Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.xcconfig diff --git a/Podfile b/Podfile index ce168077c..55a134971 100755 --- a/Podfile +++ b/Podfile @@ -6,6 +6,7 @@ def import_pods pod 'Result', '~> 4.0' pod 'secp256k1_swift', '~> 1.0.3', :modular_headers => true pod 'SwiftRLP', '~> 1.1' + pod 'EthereumAddress', '~> 1.0.0' end target 'web3swift-macOS' do diff --git a/Podfile.lock b/Podfile.lock index bccb6ed1f..bd8f6bf62 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -2,6 +2,8 @@ PODS: - BigInt (3.1.0): - SipHash (~> 1.2) - CryptoSwift (0.13.0) + - EthereumAddress (1.0.0): + - CryptoSwift (~> 0.13) - PromiseKit (6.4.1): - PromiseKit/CorePromise (= 6.4.1) - PromiseKit/Foundation (= 6.4.1) @@ -22,6 +24,7 @@ PODS: DEPENDENCIES: - BigInt (~> 3.1) - CryptoSwift (~> 0.12) + - EthereumAddress (~> 1.0.0) - PromiseKit (~> 6.4.1) - Result (~> 4.0) - scrypt (~> 2.0) @@ -32,6 +35,7 @@ SPEC REPOS: https://github.com/cocoapods/specs.git: - BigInt - CryptoSwift + - EthereumAddress - PromiseKit - Result - scrypt @@ -42,6 +46,7 @@ SPEC REPOS: SPEC CHECKSUMS: BigInt: 76b5dfdfa3e2e478d4ffdf161aeede5502e2742f CryptoSwift: 16e78bebf567bad1c87b2d58f6547f25b74c31aa + EthereumAddress: f476e1320dca3a0024431e713ede7a09c7eb7796 PromiseKit: 4c76a6506638034e3d7bede97b2ff7743f7bd2dc Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713 scrypt: 3fe5b1a3b0976f97cd87488673a8f7c65708cc84 @@ -49,6 +54,6 @@ SPEC CHECKSUMS: SipHash: fad90a4683e420c52ef28063063dbbce248ea6d4 SwiftRLP: 5512899925f1a9e1c78c902ed3bf857880e814a0 -PODFILE CHECKSUM: 2664c33ef7c46c222ed5963c84c7ebd86a806b9e +PODFILE CHECKSUM: 9f923f3cffffde022aaef140f9cd311a152e9c49 COCOAPODS: 1.6.0.beta.1 diff --git a/web3swift/KeystoreManager/Classes/EthereumAddress.swift b/Pods/EthereumAddress/EthereumAddress/Classes/EthereumAddress.swift old mode 100755 new mode 100644 similarity index 89% rename from web3swift/KeystoreManager/Classes/EthereumAddress.swift rename to Pods/EthereumAddress/EthereumAddress/Classes/EthereumAddress.swift index fe87403fa..da47d982c --- a/web3swift/KeystoreManager/Classes/EthereumAddress.swift +++ b/Pods/EthereumAddress/EthereumAddress/Classes/EthereumAddress.swift @@ -1,13 +1,13 @@ // // EthereumAddress.swift -// web3swift +// EthereumAddress // -// Created by Alexander Vlasov on 07.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -import BigInt +import CryptoSwift public struct EthereumAddress: Equatable { public enum AddressType { @@ -30,7 +30,7 @@ public struct EthereumAddress: Equatable { public var type: AddressType = .normal public static func ==(lhs: EthereumAddress, rhs: EthereumAddress) -> Bool { return lhs.addressData == rhs.addressData && lhs.type == rhs.type -// return lhs.address.lowercased() == rhs.address.lowercased() && lhs.type == rhs.type + // return lhs.address.lowercased() == rhs.address.lowercased() && lhs.type == rhs.type } public var addressData: Data { @@ -39,8 +39,8 @@ public struct EthereumAddress: Equatable { case .normal: guard let dataArray = Data.fromHex(_address) else {return Data()} return dataArray -// guard let d = dataArray.setLengthLeft(20) else { return Data()} -// return d + // guard let d = dataArray.setLengthLeft(20) else { return Data()} + // return d case .contractDeployment: return Data() } @@ -121,9 +121,9 @@ public struct EthereumAddress: Equatable { return EthereumAddress("0x", type: .contractDeployment)! } -// public static func fromIBAN(_ iban: String) -> EthereumAddress { -// -// } + // public static func fromIBAN(_ iban: String) -> EthereumAddress { + // + // } } diff --git a/Pods/EthereumAddress/EthereumAddress/Classes/Extensions.swift b/Pods/EthereumAddress/EthereumAddress/Classes/Extensions.swift new file mode 100644 index 000000000..58cf99d59 --- /dev/null +++ b/Pods/EthereumAddress/EthereumAddress/Classes/Extensions.swift @@ -0,0 +1,226 @@ +// +// Extensions.swift +// EthereumAddress +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation + +extension Data { + func setLengthLeft(_ toBytes: UInt64, isNegative:Bool = false ) -> Data? { + let existingLength = UInt64(self.count) + if (existingLength == toBytes) { + return Data(self) + } else if (existingLength > toBytes) { + return nil + } + var data:Data + if (isNegative) { + data = Data(repeating: UInt8(255), count: Int(toBytes - existingLength)) + } else { + data = Data(repeating: UInt8(0), count: Int(toBytes - existingLength)) + } + data.append(self) + return data + } + + func setLengthRight(_ toBytes: UInt64, isNegative:Bool = false ) -> Data? { + let existingLength = UInt64(self.count) + if (existingLength == toBytes) { + return Data(self) + } else if (existingLength > toBytes) { + return nil + } + var data:Data = Data() + data.append(self) + if (isNegative) { + data.append(Data(repeating: UInt8(255), count: Int(toBytes - existingLength))) + } else { + data.append(Data(repeating: UInt8(0), count:Int(toBytes - existingLength))) + } + return data + } + + static func fromHex(_ hex: String) -> Data? { + let string = hex.lowercased().stripHexPrefix() + let array = Array(hex: string) + if (array.count == 0) { + if (hex == "0x" || hex == "") { + return Data() + } else { + return nil + } + } + return Data(array) + } +} + +extension String { + var fullRange: Range { + return startIndex.. Index? { + guard let range = range(of: String(char)) else { + return nil + } + return range.lowerBound + } + + // func split(intoChunksOf chunkSize: Int) -> [String] { + // var output = [String]() + // let splittedString = self + // .map { $0 } + // .split(intoChunksOf: chunkSize) + // splittedString.forEach { + // output.append($0.map { String($0) }.joined(separator: "")) + // } + // return output + // } + + subscript (bounds: CountableClosedRange) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = index(self.startIndex, offsetBy: bounds.upperBound) + return String(self[start...end]) + } + + subscript (bounds: CountableRange) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = index(self.startIndex, offsetBy: bounds.upperBound) + return String(self[start..) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = self.endIndex + return String(self[start.. String { + let stringLength = self.count + if stringLength < toLength { + return String(repeatElement(character, count: toLength - stringLength)) + self + } else { + return String(self.suffix(toLength)) + } + } + + // func interpretAsBinaryData() -> Data? { + // let padded = self.padding(toLength: ((self.count + 7) / 8) * 8, withPad: "0", startingAt: 0) + // let byteArray = padded.split(intoChunksOf: 8).map { UInt8(strtoul($0, nil, 2)) } + // return Data(byteArray) + // } + + func hasHexPrefix() -> Bool { + return self.hasPrefix("0x") + } + + func stripHexPrefix() -> String { + if self.hasPrefix("0x") { + let indexStart = self.index(self.startIndex, offsetBy: 2) + return String(self[indexStart...]) + } + return self + } + + func addHexPrefix() -> String { + if !self.hasPrefix("0x") { + return "0x" + self + } + return self + } + + func matchingStrings(regex: String) -> [[String]] { + guard let regex = try? NSRegularExpression(pattern: regex, options: []) else { return [] } + let nsString = self as NSString + let results = regex.matches(in: self, options: [], range: NSMakeRange(0, nsString.length)) + return results.map { result in + (0.. Range? { + guard + let from16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location, limitedBy: utf16.endIndex), + let to16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location + nsRange.length, limitedBy: utf16.endIndex), + let from = from16.samePosition(in: self), + let to = to16.samePosition(in: self) + else { return nil } + return from ..< to + } + + var asciiValue: Int { + get { + let s = self.unicodeScalars + return Int(s[s.startIndex].value) + } + } +} + +extension Character { + var asciiValue: Int { + get { + let s = String(self).unicodeScalars + return Int(s[s.startIndex].value) + } + } +} + +extension Array where Element == UInt8 { + init(hex: String) { + self.init(reserveCapacity: hex.unicodeScalars.lazy.underestimatedCount) + var buffer: UInt8? + var skip = hex.hasPrefix("0x") ? 2 : 0 + for char in hex.unicodeScalars.lazy { + guard skip == 0 else { + skip -= 1 + continue + } + guard char.value >= 48 && char.value <= 102 else { + removeAll() + return + } + let v: UInt8 + let c: UInt8 = UInt8(char.value) + switch c { + case let c where c <= 57: + v = c - 48 + case let c where c >= 65 && c <= 70: + v = c - 55 + case let c where c >= 97: + v = c - 87 + default: + removeAll() + return + } + if let b = buffer { + append(b << 4 | v) + buffer = nil + } else { + buffer = v + } + } + if let b = buffer { + append(b) + } + } + + func toHexString() -> String { + return `lazy`.reduce("") { + var s = String($1, radix: 16) + if s.count == 1 { + s = "0" + s + } + return $0 + s + } + } +} diff --git a/Pods/EthereumAddress/EthereumAddress/EthereumAddress.h b/Pods/EthereumAddress/EthereumAddress/EthereumAddress.h new file mode 100644 index 000000000..32cf27a4d --- /dev/null +++ b/Pods/EthereumAddress/EthereumAddress/EthereumAddress.h @@ -0,0 +1,23 @@ +// +// EthereumAddress.h +// EthereumAddress +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +#if TARGET_OS_IPHONE +#import +#else +#import +#endif + +//! Project version number for EthereumAddress. +FOUNDATION_EXPORT double EthereumAddressVersionNumber; + +//! Project version string for EthereumAddress. +FOUNDATION_EXPORT const unsigned char EthereumAddressVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Pods/EthereumAddress/LICENSE b/Pods/EthereumAddress/LICENSE new file mode 100644 index 000000000..d49e6aa41 --- /dev/null +++ b/Pods/EthereumAddress/LICENSE @@ -0,0 +1,13 @@ +Copyright 2018 Alex Vlasov + +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/EthereumAddress/README.md b/Pods/EthereumAddress/README.md new file mode 100644 index 000000000..8678762a3 --- /dev/null +++ b/Pods/EthereumAddress/README.md @@ -0,0 +1,3 @@ +# Ethereum address + +Lightweight implementaiton of Ethereum address native structure with parsing and validation options. diff --git a/Pods/Headers/Private/EthereumAddress/EthereumAddress.h b/Pods/Headers/Private/EthereumAddress/EthereumAddress.h new file mode 120000 index 000000000..17795db36 --- /dev/null +++ b/Pods/Headers/Private/EthereumAddress/EthereumAddress.h @@ -0,0 +1 @@ +../../../EthereumAddress/EthereumAddress/EthereumAddress.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h new file mode 120000 index 000000000..505dcdba1 --- /dev/null +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h @@ -0,0 +1 @@ +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap new file mode 120000 index 000000000..2e8de9c1b --- /dev/null +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap @@ -0,0 +1 @@ +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h new file mode 120000 index 000000000..45c29b7ea --- /dev/null +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h @@ -0,0 +1 @@ +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap new file mode 120000 index 000000000..1814f3891 --- /dev/null +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap @@ -0,0 +1 @@ +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress.h b/Pods/Headers/Public/EthereumAddress/EthereumAddress.h new file mode 120000 index 000000000..17795db36 --- /dev/null +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress.h @@ -0,0 +1 @@ +../../../EthereumAddress/EthereumAddress/EthereumAddress.h \ No newline at end of file diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index bccb6ed1f..bd8f6bf62 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -2,6 +2,8 @@ PODS: - BigInt (3.1.0): - SipHash (~> 1.2) - CryptoSwift (0.13.0) + - EthereumAddress (1.0.0): + - CryptoSwift (~> 0.13) - PromiseKit (6.4.1): - PromiseKit/CorePromise (= 6.4.1) - PromiseKit/Foundation (= 6.4.1) @@ -22,6 +24,7 @@ PODS: DEPENDENCIES: - BigInt (~> 3.1) - CryptoSwift (~> 0.12) + - EthereumAddress (~> 1.0.0) - PromiseKit (~> 6.4.1) - Result (~> 4.0) - scrypt (~> 2.0) @@ -32,6 +35,7 @@ SPEC REPOS: https://github.com/cocoapods/specs.git: - BigInt - CryptoSwift + - EthereumAddress - PromiseKit - Result - scrypt @@ -42,6 +46,7 @@ SPEC REPOS: SPEC CHECKSUMS: BigInt: 76b5dfdfa3e2e478d4ffdf161aeede5502e2742f CryptoSwift: 16e78bebf567bad1c87b2d58f6547f25b74c31aa + EthereumAddress: f476e1320dca3a0024431e713ede7a09c7eb7796 PromiseKit: 4c76a6506638034e3d7bede97b2ff7743f7bd2dc Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713 scrypt: 3fe5b1a3b0976f97cd87488673a8f7c65708cc84 @@ -49,6 +54,6 @@ SPEC CHECKSUMS: SipHash: fad90a4683e420c52ef28063063dbbce248ea6d4 SwiftRLP: 5512899925f1a9e1c78c902ed3bf857880e814a0 -PODFILE CHECKSUM: 2664c33ef7c46c222ed5963c84c7ebd86a806b9e +PODFILE CHECKSUM: 9f923f3cffffde022aaef140f9cd311a152e9c49 COCOAPODS: 1.6.0.beta.1 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index 38e0b215f..bf4ee6f4f 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -7,1031 +7,1084 @@ objects = { /* Begin PBXBuildFile section */ - 007D8C70EA5C374EEFC5A7638DDC710B /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = EA0E1E254A8A60AE7835DB964A9891CD /* join.m */; }; - 00F9F735E6AEACB1D79CC24FE2570030 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3386525472CC553FF40B3AFEE8BCE2DD /* after.swift */; }; - 01349159EBEDEB29A5C35BA3B387F596 /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71B12B455685D2F4F116288D0FE808FE /* Poly1305.swift */; }; - 01383C5F2BD3FBB6187DA01215BCB2FA /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 955AD7671107B2FCAF7A725E38DA6513 /* RLP.swift */; }; - 02CF85F0BB6137CFF5890DC9EF981267 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 937DFD5ACC6B392C3B22DD0605410F52 /* Process+Promise.swift */; }; - 0315EE301733CF0DE349A0C9B65C177F /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71B12B455685D2F4F116288D0FE808FE /* Poly1305.swift */; }; - 036E2618599F02C9CB7D022B49CFFA1A /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 2707FB70F6217313CE3FE9D9B5606CDB /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0416379BA218FFDEAF901B16AD09831F /* CryptoSwift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BFC2F7559BA52B8D992D11A537D7FEBE /* CryptoSwift-macOS-dummy.m */; }; - 05923951C32119A5CA2E4CE5B75CEFBE /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 665306D3A9323800337BE1451D8960E7 /* AnyError.swift */; }; - 073B1A00202EE57EB54BE1D3D540C2DF /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 44131C334B408CABBB3E84FE9BEDD5BE /* field_10x26.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 098D227D8DAE7643ACDF1DBCE8AA4264 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A45DEA061F03DB9EB78391B810792DD /* Array+Extension.swift */; }; - 09BAF87C5E1AF9E3EE4DEA24FF666E43 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CDA4C5CCCD8DD001D5D629E860B631 /* PCBC.swift */; }; - 09BF24BCE4F4A393B8E2A8FF610FA924 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = DABE6207D44D964FBF0C1EB8B82F13A5 /* Utils.swift */; }; - 0A1610D5063DE2AE6FD20FBA35E267E0 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 306BDC01729FF834ADC364D1DDD4797A /* group_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0A396743B4ADF0FA7C12FDF1BA2C5F14 /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E330212AA4C3537D541AD9C197932C16 /* CBCMAC.swift */; }; - 0B21F43DA91211F06BA2166391E44172 /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6C08A1761D32580CB3EE6E91B5E379 /* field.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0C3EF791FBE499977F647EE7635CC4C9 /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61A90B8C29D973CF2BEE2A33224ACBEF /* Updatable.swift */; }; - 0C97CA12738F0F679E2AA3BD6FD899D3 /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = E0E2C657091728E6CC4D8093DA13C072 /* group.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0EA8DA962874703B604E7D0C284F64F1 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79370D5C826074DD91DB303B75EACE7D /* Box.swift */; }; - 105F429373F6706BF003DD2C5E1AA9C6 /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 853BAAA89F1726DECCF03BC01BBDC64C /* basic-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 11D236D734F12042B70BB21010A7BB31 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897BD312EFC7F005946FCA64E8B5D3F3 /* AES.swift */; }; - 1229DEE3B9CC3F49645AF6530096597C /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E89406E7E995881E48051C7EC4C9DCB /* race.m */; }; - 12DA480A98F43E8D514FD77105246316 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C7D493F1212B046A7AAFC8351D67E4D /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 14C6C90D414DDF5959AAD6D49D4BBD77 /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = B184A67AF0236537BEE898D90E946942 /* secp256k1.c */; }; - 14CE101A185E7F4C98959036549EEAD6 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61F02670BA786ECE5640E0C70EA68888 /* Result.swift */; }; - 14DB22276CCD7E7CC84DEAFC67358569 /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = CE82C576F4D863F22181DF0D90DA8533 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 158F6BC9635AF0C4F8FCAD1FB913BB45 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0974D06B8BD99ADFA971B50A5A2B38CE /* Division.swift */; }; - 160B4BF9DB9EB617E146CC2E9C883C7E /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61BA4F5A7AAF223AA3BDA0BF814905AA /* AnyPromise.swift */; }; - 16430D1306BA11693EFE55BE2052FBEB /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EA534EDF19829F1927C7991BF2EEC2F /* Padding.swift */; }; - 1726CE463B9A337870F28E208B8F268E /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66858822A1651FBD671091155D387A8B /* BlockModeOptions.swift */; }; - 172EFB075E38CF4867F6A5978709A512 /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = 07BA44CF1EA491F2DE0FFA66AADF2764 /* eckey.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1736288FC9BC2391AF96F9CCBA1A27D2 /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C805181714272769BB5BCEA4814B1D /* SHA2.swift */; }; - 18657716987587225DBC37ABB461F275 /* Pods-web3swift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E91F337EA3979DB5DD84C325A340270 /* Pods-web3swift-macOS-dummy.m */; }; - 186AD9B44240324FF4C4DBF0A8AC935F /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = 3E6E7087B7CBB4230AEFE06A0586FEA1 /* Cimpl.c */; }; - 187B191D2E4399E1567DB24BD93F0486 /* SipHash-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A49E7FFAA1F69AF0BFDC8A0CFCB938D /* SipHash-macOS-dummy.m */; }; - 1904E18F6CE01618BBBC1B31E43B64EA /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B685BD86E597E436351119CA4A20736 /* BigUInt.swift */; }; - 193CE1B123F216F0140298A506854F9D /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC03B1A635B5BB3ABD74980E5A3FFCF1 /* Random.swift */; }; - 1A8FE1E286DA1769792CED41CA55E329 /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6060667D5D66C779C8BC742A2C7F5F6 /* UInt16+Extension.swift */; }; - 1AAC341916DC64CD28D08BDFED57AC9C /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB1D05E6EF6E5D33F3A993B98DD675 /* Shifts.swift */; }; - 1B1A69F5303E8DD6740A8234E719F76A /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B017F47BE0A65E45E065EA00452F0D28 /* BufferStorage.swift */; }; - 1C12A92A45B56442DF1BF2D3108BD0D6 /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DC64F1DE162445FC5F9F8F1A2C818B1 /* NoError.swift */; }; - 1CDB406411B86AC9E8D84DAB2C97DD36 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73AF6510FE79C3D2EDBCE691D07F6E5E /* Promise.swift */; }; - 1D23298D0D9B4910ADE40DE633078E52 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8798FA9542F2175AA660CDB635E6D6BC /* NSNotificationCenter+Promise.swift */; }; - 1D69BB026569911275C713D240084FF2 /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E5F085DD39FA26739ECAD91284C1F2 /* ecdsa.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1DC075FE4097BF0E29641EDD65D31E86 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B108AA63200D2A6992501E7B76EF6A0 /* OFB.swift */; }; - 1E1385AB09686A96B636755A4447933B /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = AD7DDD48316C5C9CF661C50B3D19698E /* fwd.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1E94C3B3573434FC150CFE79FB8EA24B /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = E9584FC30610F2691B4EB045534020D8 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1EAE65FB4A140803FE03F605B5B9AA82 /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03938C581D805E7DEA7EF7935F6B4E61 /* Cryptor.swift */; }; - 1F22A4026D790826AA156354694CBCC5 /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 092DD25F9A8FD52F554B41FA11289B4C /* Resolver.swift */; }; - 1FCD29F6706433B229F21EA39F8C3597 /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A48FBA7E324AABD9DA453C780537C79 /* field_5x52.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 209D55736C84A40D70E5CEE59018C4BA /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80D7D244BE8CFD16A741C5261EA757D6 /* Error.swift */; }; - 20B709359C09D72B58E11D9B585EBF36 /* scrypt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B66168E0567CA1671C74F37384DD7B7 /* scrypt-macOS-dummy.m */; }; - 2175C9F92182A75746B5770B1C01D70C /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A83A5B7F0434C3FACA671C5A20D8389 /* eckey_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 219282246EF9A166FC2BD24AC6997C06 /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF2520CE6C39BFEF4B6C9B87DA7047AD /* HKDF.swift */; }; - 221D9234B8A18F610B920F836A7855AB /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = F465EA5AEC974D4B2AAFFFC2768A91D7 /* afterlife.swift */; }; - 224BCAC718A8A96B1494162E8F1FFA50 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E959F3AA4E4F1850C7F42B923C77DDB /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 22FF16F6223F01F3AA966B2E701CBF89 /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59C55840D303F469F1F31EE4867563E5 /* Generics.swift */; }; - 238296CA2E8752527657C31802220A24 /* Result-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D7A08C10688F2510948C9E9742DFF65 /* Result-macOS-dummy.m */; }; - 23B9A85EF3D0D9FE26611DBA312205BF /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = EA0E1E254A8A60AE7835DB964A9891CD /* join.m */; }; - 23BB4D6CA0785AB14CFA443BBAB22B54 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9E2278C6E7F3F4C4A66132D0E8E0517D /* PMKFoundation.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 24361E1EC1CCE0031F26E38746EEE1EA /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = AF7AF6D769E4BBF1B2C201836A906130 /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 24D38DE85704AB93DCA1AA003FBD6729 /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 551CAAEDDC5AAACAA24E8A5A86721E97 /* Bit.swift */; }; - 24DA9F0423F82C80205C93EEF0CFF381 /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B017F47BE0A65E45E065EA00452F0D28 /* BufferStorage.swift */; }; - 25C0F08157E3C0F2A0E384774F373EE2 /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 80ED01586B28193ED2BE26DEF9B57A3C /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2618ECD8B43241610183A733721C0AE7 /* SwiftRLP-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AF7FD66A2EBEED268628A0D0FE4E74D /* SwiftRLP-macOS-dummy.m */; }; - 272DA3B8E6A36A340F174862DDF47CFA /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED58AECF3C5444FBDEB7453CDD6D6A96 /* Checksum.swift */; }; - 279EAE9173342F41D610247C9B8788DE /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FC6C3CA2D135767617F5F276FF395CC /* CompactMap.swift */; }; - 27FD0E227A0BCFB5C96957DF1D24F65A /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = AC98E623829FE2C9F71C5C97B66118C8 /* AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2AE019C6FBE28F14BBCF9011859E76C2 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F60E6D7F6C28A5DF688920FB74829E4 /* CBC.swift */; }; - 2C3A50BE13F80D74D2E8E3B3E6F503A5 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = FD06C0D0FAAE077E5B527EA88B8727B1 /* NSURLSession+AnyPromise.m */; }; - 2CADC319FC220364D8D53E197C933DF9 /* Result-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E49C5D9CD234FDC2304F413D1314EE4 /* Result-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2D2FE7ED51FDF3B95792AE43AAA8C9C3 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = E0D2913DF679358122E366AA30A31733 /* ecmult_gen.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2EA3D0F6274B79F77FBD6D089B7067E3 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C64B4995F9A0EBB5D4B5F27B33FB054 /* NSTask+AnyPromise.m */; }; - 2EB46ECD84B1069C5D85756E35BE3A86 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4211F7070401959F35EE92C5214007C /* NSObject+Promise.swift */; }; - 2EDCE4A3A80772C88E0B4031FE4D86C6 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FE4AFACA87A9BC9B7F46A7AAD878E33 /* Words and Bits.swift */; }; - 318456407793AD399D02863A812ED6DE /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = C906CE7510F7153C35950FD44AE3C571 /* Operators.swift */; }; - 31BFC50C75020E436DDA0F9AFA73D067 /* Result-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 011262F92057423AD4ECF708E415898D /* Result-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 31D346420CE39369D66215B21F8A3337 /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = A130AE149844CDF96BEAFC7381997641 /* AES.Cryptors.swift */; }; - 31F0E9474F7FBB1C97F5EF570A5C681A /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DF453CEA7E128C1691A0713421CFBBF /* PromiseKit-dummy.m */; }; - 33194D0CBC51F3CF9555DC514AA2E059 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 93F2C29FA3412D0329780F52C1DD2931 /* dispatch_promise.m */; }; - 3368BFCA6F37472A3F80E757FDFA5EC6 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80D7D244BE8CFD16A741C5261EA757D6 /* Error.swift */; }; - 337EA355DE058979DB126870227A42DF /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = B508E0F1A0F3142EB46882B0104D6F6B /* Floating Point Conversion.swift */; }; - 33D8E60E41F6C1C6591FBED80B4A95E4 /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 8045272A42A0784613BD7057AA86803C /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 34FD56F4316A5EEA70A5285A93B5D29E /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E138D3C3327A0AC400395EA7B85D13A /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 354D68B8C8B6D4C003BDB91E8A1D680A /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07BD7441D03BCED026093ADE867666D4 /* String Conversion.swift */; }; - 358FB06B0B99F2187EA1658EA97F1020 /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 57FE015BCC95654092B0ADF05585E987 /* scratch.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 359269757B7FED4424DD9489F42BBB49 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BFFA790DC1A19DFC5018C9B37267D2 /* SipHashable.swift */; }; - 35D45B19269F07EA96E6F003C6A1F04D /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46F1CC3195EF29E61FD820B624C49746 /* ChaCha20.swift */; }; - 372CD468A7496DF050E653C20AB8AC1B /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 8045272A42A0784613BD7057AA86803C /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 377C6046F93E7409F3996D06ADAD4CC7 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BFFA790DC1A19DFC5018C9B37267D2 /* SipHashable.swift */; }; - 3819CB7BE87DC385D208FF40C7199DEA /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09E31D2F88F4FB6EC4A90B888DF591B7 /* AES+Foundation.swift */; }; - 3867CF007FF0AC14F07271D9E60154CF /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6060667D5D66C779C8BC742A2C7F5F6 /* UInt16+Extension.swift */; }; - 38D8B82703E87B790A4D8C9B749644DF /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 983B0C09BEC11115522233D05D8F47D1 /* Comparable.swift */; }; + 006C73869D28CFC3C08992F0723EE0C6 /* Pods-web3swift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E91F337EA3979DB5DD84C325A340270 /* Pods-web3swift-macOS-dummy.m */; }; + 00CE1E56028E70F6A410464BB8266F28 /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C57A83FBD44C769166BCCC5CD45BD3F /* firstly.swift */; }; + 01349159EBEDEB29A5C35BA3B387F596 /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C8DD41F37C777526C9EA621C9213C9 /* Poly1305.swift */; }; + 014401F351E5C79C50E62052E8AD671C /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 1D7B42933B2D81EED52706C7200A9732 /* lax_der_privatekey_parsing.c */; }; + 01E1753617A93639EEA9E9A55B0315BA /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EA0E0A67D5738512E4618E1AEDA5E3E /* CustomStringConvertible.swift */; }; + 0315EE301733CF0DE349A0C9B65C177F /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C8DD41F37C777526C9EA621C9213C9 /* Poly1305.swift */; }; + 031B3FFCD45AD7672462A575142008AF /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = AEA94352D4A3D0793D359A8C1CB50E4A /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0416379BA218FFDEAF901B16AD09831F /* CryptoSwift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D8D1F94E4F2A45EC9F2154127E14D416 /* CryptoSwift-macOS-dummy.m */; }; + 0676D57F5CE425CA83CAA976ED4030D7 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = C21956F497DCFA1D883CAC00AF330784 /* race.swift */; }; + 068E167EF11A07C17D688B3BBC218D34 /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC7202C545EAC46F224EE9AB6B1F0F7 /* field.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0800D78442F1F493C69F6F6C51A6A7A4 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3A44C98D1E93465803241C08887CDD /* num.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 088ADDDC247990129868BE86AAFDD65F /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C57A83FBD44C769166BCCC5CD45BD3F /* firstly.swift */; }; + 08F8D3D166021760B18C796EF207413F /* EthereumAddress-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF61EAD9C9EC96163CECACFBF3504C3 /* EthereumAddress-macOS-dummy.m */; }; + 098D227D8DAE7643ACDF1DBCE8AA4264 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB290FC3F5ACF0789F4078C376E6ADED /* Array+Extension.swift */; }; + 09BAF87C5E1AF9E3EE4DEA24FF666E43 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C47CE1FE3AEC19CC322E3E03530D21CD /* PCBC.swift */; }; + 09BF24BCE4F4A393B8E2A8FF610FA924 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49A1004ABA6FF6BBB692884F59131E13 /* Utils.swift */; }; + 09F1AC7E0FE7F27B9029F4B3D06DD73E /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74111ED4B5372D2EE9A218621A18699C /* afterlife.swift */; }; + 0A396743B4ADF0FA7C12FDF1BA2C5F14 /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF4D45B809574B97A749EADBA2EFAB02 /* CBCMAC.swift */; }; + 0AB147133F796C59B1000495EDE8F694 /* scrypt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F60B61CB7F6EF778CD12A3622F779434 /* scrypt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0B442DCD3296A492C9C58C8AE14BA0A8 /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = B177F4FEBB7F565C10EB6AABDF0CFB6C /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0B8DCF4FC4B4CC3F687AC9FB1E97504C /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 612CB1FE4A4EF26D20DC64543E17C82A /* when.m */; }; + 0C031445C897BFE6D124AD54FA1B39E4 /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = EE8A73B5FBE9F82E34238AC840FC7331 /* eckey.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0C3EF791FBE499977F647EE7635CC4C9 /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CC384B5F6C90CB968D0AB32162249B6 /* Updatable.swift */; }; + 0C8C916943E653184B644A98632DDC47 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 681146D3345FF5156D09E271666D5EA1 /* group_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0D668C0B0CBE5C06AE7AE80EC0F20207 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = C21956F497DCFA1D883CAC00AF330784 /* race.swift */; }; + 0E7F3356235A21C8DEE7CFC67A802552 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01271B2BB62FE2D72466A630AC9D1BE8 /* Configuration.swift */; }; + 0EDEC46E0BC997FB64753A1C709A4AE7 /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5540F42E4F8BF99A1C7F95349EA8707D /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0EF95CCD3EF4EC40F109D9D364B6504D /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = 40ABB4750B401A88B273D3B180C1FEC9 /* fwd.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0F4C148C5393004D090DC7218E39BB39 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1422C640D1B145BC997D3E0A3FF10339 /* Extensions.swift */; }; + 0FFEBD2D6ACAE3AC711E0208FCEACC40 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 5297103B37D2E5083D67ABE2C60CA382 /* after.m */; }; + 1026302AD9FDCB8A55CB7EBB06DA0D7F /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 635C328C2CAB4B34DEF69D8CFABA3AC1 /* AnyPromise.m */; }; + 11235690EFCBB5F0EBC4A56A7E3AB2DA /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25E9E042655265AEB9322FB01DD7A702 /* Resolver.swift */; }; + 11461F81975B779BC100E7345CE2D793 /* EthereumAddress-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A2766B8B12BFE63523151BC3F80CDF4 /* EthereumAddress-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1158B8A68E881A4243A310CB039AA866 /* Result-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C30494B6003825A7F5E0AE152495E590 /* Result-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 11D236D734F12042B70BB21010A7BB31 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77FB79008E5E4C52EE48B984D12A652E /* AES.swift */; }; + 127EFEFCE576E0CDD1DF3708F20C10BC /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D1AB32F0AE7B734159BB1FBAF7F5078 /* hash.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 12E1E9691B7286282223CB20A574F364 /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = B177F4FEBB7F565C10EB6AABDF0CFB6C /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 13D45CC6E83EFEB9467158ECB394D367 /* EthereumAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 48BBE301C7AC93BA32B43FDCAB55FF55 /* EthereumAddress.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 158F6BC9635AF0C4F8FCAD1FB913BB45 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A86CAF979F3E970071A5FC47D9D7EAC /* Division.swift */; }; + 16430D1306BA11693EFE55BE2052FBEB /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23EA6F524218763DB7E76A6E13387EAC /* Padding.swift */; }; + 1726CE463B9A337870F28E208B8F268E /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 639957AA1B177687176168DC8D443490 /* BlockModeOptions.swift */; }; + 1736288FC9BC2391AF96F9CCBA1A27D2 /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BFCCF45D62D69A50F9ED16BCE93C54A /* SHA2.swift */; }; + 17B2699526C79E4F6A7F890EF0C62A1D /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3ED371C14676A66BA35BCF542FF8B548 /* hash_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 187B191D2E4399E1567DB24BD93F0486 /* SipHash-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E34CB7E7EAC6A9C0F75649FD43EC23F2 /* SipHash-macOS-dummy.m */; }; + 1904E18F6CE01618BBBC1B31E43B64EA /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6633CE6E0F4DA082E8A3374A723A4844 /* BigUInt.swift */; }; + 193CE1B123F216F0140298A506854F9D /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9787E8C8BA8DAE16D659DA569EECED22 /* Random.swift */; }; + 1A8FE1E286DA1769792CED41CA55E329 /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20BE3E8F811475C9F3E6350A16EF3D56 /* UInt16+Extension.swift */; }; + 1AAC341916DC64CD28D08BDFED57AC9C /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7953EE95375573E978E0FAC7F88260CF /* Shifts.swift */; }; + 1B2C98EB955D193734DA944CDBAF4CBB /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C39AD388A82A531C338B26EE00DB9C /* NSNotificationCenter+Promise.swift */; }; + 1B7BD089E927617EA26BDF05EAA765A2 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 982B03AB9D403479BF865D7C3A5B2D4F /* Thenable.swift */; }; + 1B9FF780BC13D12AA66605DC702CE662 /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5595E1873CFBC6061E8C6D86BFF12807 /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1DC075FE4097BF0E29641EDD65D31E86 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8151AFF003D8A45F3E0F171019ED33 /* OFB.swift */; }; + 1EAE65FB4A140803FE03F605B5B9AA82 /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D13D2441410EEFA35EFB1823E238648A /* Cryptor.swift */; }; + 1EE960C5AF0D4947CD23926FF20C2134 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D6CFCC98052B542B8BD8050E0204993 /* Box.swift */; }; + 209C8981858102B13060DA6A94BE0170 /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = 08390C702E93A122CAC37BDF6A07A98C /* scalar_low.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2177A7B4F26FBB839E1C3F07A82887E4 /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE63C0E40FA294F6C512967711E56D9 /* AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 219282246EF9A166FC2BD24AC6997C06 /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D0947D47B9CECD59BC73EAC48D4ED27 /* HKDF.swift */; }; + 21B1C23EA3CD320C60DE1B2C4F849A2C /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = FD3D00DC2D85B010C2EB60CA78D22508 /* hang.m */; }; + 21DE72843C7B514A5D846FB52A8976C0 /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 310A618141B833B61214988468629C13 /* ecmult.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 226FF2D2465A03E4EDF572BE5AF88E19 /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 860EF39282D8941084557A3DCC1D7DF3 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 228339669ABE224EA8C7AE49DC9EE0F8 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5116359962EA1905AC0EB7121E634D9F /* ResultProtocol.swift */; }; + 22FF16F6223F01F3AA966B2E701CBF89 /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = D286B6A0694F7E16078B8E7642CAE6FD /* Generics.swift */; }; + 24D38DE85704AB93DCA1AA003FBD6729 /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86800F1D45016DC59C9BE8B9ABF5B50F /* Bit.swift */; }; + 251FC364DD9D317AB3F31F99BA809724 /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D903E031FC7FD31DA94E1EC68778019 /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 25ADF91F59CF38DA37B5155F3E4D28B8 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68CD2728F142362B577571D597A953D0 /* Promise.swift */; }; + 25DB619FFE4DED74D902A70CD2642ED4 /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B152212D05CB08C4E0B61D8CDFF12C9 /* Guarantee.swift */; }; + 27068BF23AE89103AC017DCE533A0B84 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = AFD5882A04E0E27679FE6AAC8D9CA935 /* UIView+AnyPromise.m */; }; + 272DA3B8E6A36A340F174862DDF47CFA /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC86A3FC56A1BAE1CA3490D081E47F3 /* Checksum.swift */; }; + 274467E80B57985D276837BC38F63C9C /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68CD2728F142362B577571D597A953D0 /* Promise.swift */; }; + 279EAE9173342F41D610247C9B8788DE /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F8B31678A829B043331C94E279F1FD9 /* CompactMap.swift */; }; + 27CC89021B6035E3D3077405BF7D0518 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEA9421290E9294FEA25D9F6D3DDD24C /* Error.swift */; }; + 27DF4C9F60541A50E1E4C29080D83278 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C39AD388A82A531C338B26EE00DB9C /* NSNotificationCenter+Promise.swift */; }; + 2A1509546A4F640E1538711DAC7F3FFD /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = D9A9A6187028CC6AD623334BA2899FDE /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2AC384703D326D9D63AC130A9FFAF78E /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 506B39E37C9D076FA278322A078D548D /* UIViewController+AnyPromise.m */; }; + 2AE019C6FBE28F14BBCF9011859E76C2 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ABE33C91D6B128E8B104ED3630B6ABB /* CBC.swift */; }; + 2AFFA6CFA6FD4C6C4CF3FE7F256F8B04 /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19725B1F6B394E3B97BB387C7E4E4874 /* NoError.swift */; }; + 2B3F7B28D29AE55CF915EC13A381D462 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = 07CB743A805B99BE84DD49F8D999BF5C /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2EDCE4A3A80772C88E0B4031FE4D86C6 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73043D2C83B1F1E5EC8F0E15C2CFE5A5 /* Words and Bits.swift */; }; + 2F6E8156D02A841E2616F0996781F15F /* Result-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 28AB30A05C0D17ABF7D0DBC475F93C23 /* Result-macOS-dummy.m */; }; + 318456407793AD399D02863A812ED6DE /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF137216E20AA1BF3FA0B1A647DB89AC /* Operators.swift */; }; + 318CA76F82F67216CF65AABA4466272E /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = F5AA52D2E5DC0134CBA0CB3219327A53 /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 319DAAEE886E1752C38A946984071408 /* scrypt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F0866AEDD788E4D8B51A31A2FB8C294F /* scrypt-iOS-dummy.m */; }; + 31A75721375ECAB73790FEB75766D87A /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = AEB5F00EFE918C35C091FD2FA7EACBF5 /* group.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 31D346420CE39369D66215B21F8A3337 /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1BDC161E1A001A666E01A22455E14B5 /* AES.Cryptors.swift */; }; + 320D4C619C3083F47C00012810B2EAC4 /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 37B67C2B42A2EC2E689AE41636261351 /* scalar_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 324A108EF1509B26512277B3C3BE7D2D /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C9CD6920241610BE46DBB9D591849AD /* field_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3379FA9A4DA05C88936306809AC0EADA /* Result-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 74F90CB37B5FF688D45EE372C6FE875C /* Result-iOS-dummy.m */; }; + 337EA355DE058979DB126870227A42DF /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D5F98CA61161B592980B259143F48F5 /* Floating Point Conversion.swift */; }; + 33FA2A0C3B7394329B6B9B32D5EE53A2 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DE92E2A606B96369F79D742DFACB7C9 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 354D68B8C8B6D4C003BDB91E8A1D680A /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682CE9677672C1F944AA2896D3BD36FF /* String Conversion.swift */; }; + 359269757B7FED4424DD9489F42BBB49 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28D6357617301A15F1861ECE0B2D728E /* SipHashable.swift */; }; + 35D45B19269F07EA96E6F003C6A1F04D /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE7F6BB14F19AC57CB96B2D06603E845 /* ChaCha20.swift */; }; + 35E543DC36F19E32B3EC8F6652420EEF /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 062A95E74B96944BC0E3A674E72AE85E /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3607BA990F6961ED7E0401406A565C07 /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 63C148A221559836C278AFFB2F0C6D3D /* num_gmp.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 376C09B5EF8BAEF6D7450FDD24DA2530 /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = D7009940ED0BFC1AA385433559754C27 /* join.m */; }; + 377C6046F93E7409F3996D06ADAD4CC7 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28D6357617301A15F1861ECE0B2D728E /* SipHashable.swift */; }; + 37B89B7042E76DF933791631E40CB4AB /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7739AC49E92EA0677899D077C015CE05 /* NSURLSession+Promise.swift */; }; + 3819CB7BE87DC385D208FF40C7199DEA /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC0E5DF49745E221D708C75FC2B03DC7 /* AES+Foundation.swift */; }; + 3867CF007FF0AC14F07271D9E60154CF /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20BE3E8F811475C9F3E6350A16EF3D56 /* UInt16+Extension.swift */; }; + 38D8B82703E87B790A4D8C9B749644DF /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 809F44457475B204EE242D251FDF9E8E /* Comparable.swift */; }; 3A611A77C4E834E1E7F375E6362DB0D7 /* Pods-web3swift-iOS_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B56F6A20A0CF698ECA0EDF6CF4CDD74 /* Pods-web3swift-iOS_Tests-dummy.m */; }; - 3ABE390A4511DB44A24945B088C8E48F /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = DC010BC54E6C05686BE227F75B04535D /* field_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3AC07C0FB85EDC81532D78FAB99C85B1 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B685BD86E597E436351119CA4A20736 /* BigUInt.swift */; }; - 3B0D18B9FCA958796CDACD6710637030 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A45DEA061F03DB9EB78391B810792DD /* Array+Extension.swift */; }; - 3B100200B920BCF7D6974806539B857E /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E5F085DD39FA26739ECAD91284C1F2 /* ecdsa.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3BC2BF6E6B27BFABAEE1C5B8AD2838D7 /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 903BE66455FF2F03FD9540A7E5914EC7 /* CFB.swift */; }; - 3C8A0D6B372B675A5996296B62C25692 /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B659053EBDBE68F9EB1137C3AFCC9F8 /* lax_der_parsing.c */; }; - 3D80464CEDFAD819CD4BCB5190A469E9 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E27EDB736A99A27C20F82D22DC4A707 /* GCM.swift */; }; - 3F474D94A325AFDB74206B0CD0790920 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8EA9E5ADEC0526C987DC2B55F8E04B5 /* SipHasher.swift */; }; - 3FA010055B3BC4813A4245727D6E2AE7 /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44BE339EC0BDEB80B98E8D988708993F /* UInt64+Extension.swift */; }; - 417A2304F303DED593E55D2CAF337305 /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = A3D2730C3BE7868E162AB4F297A3A7DE /* ecmult_const.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 41C19BD34A261EF87BC9282C3A634240 /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = AD7DDD48316C5C9CF661C50B3D19698E /* fwd.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 41E4BB16EA30C7552FF1E3CA6BC0491D /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D97871DE06423066D52CDBE28B74B3B /* PKCS5.swift */; }; - 4216370E79CC772FC2572BB6143CD8BA /* PromiseKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C3AF144309D8E77765BE0E32200497A /* PromiseKit-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 42200366754CDC163F24C7657A6E5426 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = FD06C0D0FAAE077E5B527EA88B8727B1 /* NSURLSession+AnyPromise.m */; }; - 42FF2C1D3648C354550AC88EE5E64B80 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE57BC224E219C65382BB751CCED649D /* Data Conversion.swift */; }; - 4327DB0149A7B915F54982114D289E21 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = BE6305D1DE9131CFB173AC969FDB1092 /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4356FFA7A939D1F7937A48DA948D1F4E /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73AF6510FE79C3D2EDBCE691D07F6E5E /* Promise.swift */; }; - 441F98C26072F42F773DDF5C14AC249E /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09E31D2F88F4FB6EC4A90B888DF591B7 /* AES+Foundation.swift */; }; - 447C407907733320787E8F23946656EE /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 903BE66455FF2F03FD9540A7E5914EC7 /* CFB.swift */; }; - 44AEE69C5AA31A84CCEB7534C0855D78 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B2EDCF2255BD0D829F03B0C1BD0A060 /* String+Extension.swift */; }; - 44F4771652CF7E4CD82AFFF61B0ED567 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B108AA63200D2A6992501E7B76EF6A0 /* OFB.swift */; }; - 4500CFBCFC034D43487B312FC5483807 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = E0D2913DF679358122E366AA30A31733 /* ecmult_gen.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 45482DED636330B9BCE4493225B66813 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 983B0C09BEC11115522233D05D8F47D1 /* Comparable.swift */; }; - 4590A483F08539D557FC4B9123AC3A67 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A19805DB694C14E29F255EA2BB4603A5 /* ecmult_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 465C38010042DF8DAEFA492DCE294A36 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 699D800F72CE09977D6EE1687D706BD6 /* BlockCipher.swift */; }; - 478D6AC79B09119FD888179B7B3E3948 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = C533250E0867F5CF90717B90B4450C63 /* PromiseKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 478E26D3AF13111498519DCF04DF90F4 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39B4575A57EFE3A0630FA12FAE346202 /* NSURLSession+Promise.swift */; }; - 47AE4F4F59DE9319CA4537E806A378A1 /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = C33EA4F090C90D1AE636D3B40ECFA945 /* firstly.swift */; }; - 48B50CFAD0E4088080A109DCA7B8688F /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB95DBC141DB412EAF90DE75B00EE345 /* CMAC.swift */; }; - 48EE55837C3546B46DFCD59737CEDC3C /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4434E5B7050EF71B04AEAE88F303455 /* Blowfish.swift */; }; - 494A8C06290340CA7C968264669CD5C0 /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4F3DB8A969B504C000E0BD68E9DF848 /* Rabbit+Foundation.swift */; }; - 497FABADEE00EF124C8DF6366EB5C7A2 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 306BDC01729FF834ADC364D1DDD4797A /* group_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4B7495F07A37948723508823C5903A2A /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A48FBA7E324AABD9DA453C780537C79 /* field_5x52.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4BAA131CC4AAC980112DCD779019E1A1 /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = A094ABEA6C6E0AD5B87D62BB32AEA3DA /* util.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4C0745766AD773551AD2F67D8A583AE5 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 323129AF4AE1EA178343E46476163880 /* UIViewController+AnyPromise.m */; }; - 4C7033236EE3A20A2AAA6B8F51285FA3 /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 80ED01586B28193ED2BE26DEF9B57A3C /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4C82B6EF64C041919BD1BDFB613CA7AF /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46F1CC3195EF29E61FD820B624C49746 /* ChaCha20.swift */; }; - 4D7DEDC820A1EF913455BC0FBE72FBD6 /* BigInt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A81557551191339AD284647E9008F3BF /* BigInt-iOS-dummy.m */; }; - 4EB23EA6CB130E3291B0776D3862D748 /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4F3DB8A969B504C000E0BD68E9DF848 /* Rabbit+Foundation.swift */; }; - 4F5E15E5AA1C78F5B4AA3588A8CE4C19 /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = 3E6E7087B7CBB4230AEFE06A0586FEA1 /* Cimpl.c */; }; - 4F70068CDD913C18026C4A968EA92E9A /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = C504B703D6897FF1896886916748D0D6 /* ZeroPadding.swift */; }; - 4F8294D7CD9C06B4BAF8625E87D9D05F /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 938A29097DE727896422B7DD937D51E3 /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 50DE88114B7BD18A98F0F45A972079E3 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D67B21BD5ECE586715CDCB8EF9F84E24 /* SecureBytes.swift */; }; - 5111BFCE88BC6C575354E725D7569A17 /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 57FE015BCC95654092B0ADF05585E987 /* scratch.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5145AAE99352DBF420419223083C6C25 /* CryptoSwift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EEF44FF851A27BCE1872F1FEBF9A9440 /* CryptoSwift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 51576520F03EFCAB1BA67BEAA79E81B0 /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = DC010BC54E6C05686BE227F75B04535D /* field_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 517719A8F7EBDD02A80FC21F1246D335 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = A4420324C5657482ABEBDA0BB3C73802 /* when.m */; }; - 5185A27FC19CEB1E69F99F8CE56639A9 /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = B276DAA5AD0B968F80A0769180CCC012 /* scalar_low.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 51B79A81BE02C232299A5DA47E988277 /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276BA53B2960C2B624579741823D9DD2 /* UInt32+Extension.swift */; }; - 51DADAE211CE77CDDD762DF1F5FAA236 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0B695B584A94039305F17CD2B5470FB /* Exponentiation.swift */; }; - 527E46A66487D9D5B3FF54359A3951EB /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC85A555F579FA10EC96590296D9288 /* CipherModeWorker.swift */; }; - 539700CDAD65FF7CAC666B4C99261E10 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = A4420324C5657482ABEBDA0BB3C73802 /* when.m */; }; - 53B8C2D24E27198BE0F12E576F7989F9 /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = C535818543FB132F5085E5ED501095D0 /* Guarantee.swift */; }; - 5493B45FC1BD542111A20AC6A58EA0B1 /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD9ED798FEF891C4A3123685AB25017 /* PKCS7Padding.swift */; }; - 54CD3C94770F9985D0EDD8AD2D880EEF /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DCDC3F74F1C62E2161FC76EF265BED7 /* AEADChaCha20Poly1305.swift */; }; - 55620C107463741AB202D7B93B8AC47A /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD971533936CC3705E267598BF53A93 /* UInt128.swift */; }; - 55714E2CA2C818B9BB609FE4303A7AE3 /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AA2EF5FFE50FBD8EAB6BEA39D23C942 /* DigestType.swift */; }; - 557151A9F797E462E701215A27F7DC21 /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0439A7FDEC4F611C9334DEC15FA25F1B /* Digest.swift */; }; - 557E070EDC1D983960128B12A77AA293 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 167A6E691DFD15BA9883036B14F41D03 /* GCD.swift */; }; - 55AD64D3F27943249ED212756122D497 /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 665306D3A9323800337BE1451D8960E7 /* AnyError.swift */; }; - 563C641A5D7264103E44BCDCC6C6C887 /* CryptoSwift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = CD4C2245061DDD251D7082A04D84F218 /* CryptoSwift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 563E37F7F956CED55AC3793CD37445D3 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D86C75595B41479AB364568AB89F857 /* Configuration.swift */; }; - 569DAD122746A7696C6305FDB8B9ADB8 /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6C08A1761D32580CB3EE6E91B5E379 /* field.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 57757EDFE754713488D29934C64FFCFE /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9E2278C6E7F3F4C4A66132D0E8E0517D /* PMKFoundation.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 58A0398843A05951A20C16C736C2F649 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D111E53D728978DA7C689AD4AFDCA963 /* Thenable.swift */; }; - 5B4044B103053232D6A987856C610367 /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6176C709F1F11238FCAF958F9A75741 /* ChaCha20+Foundation.swift */; }; - 5B412B06CAD963FBFFA763798EEE3AA0 /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 853BAAA89F1726DECCF03BC01BBDC64C /* basic-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5B6447E44DCD6DF880956561D716D42E /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 938A29097DE727896422B7DD937D51E3 /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5C7BE1B24A19199F514AC8688FFF4306 /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 0194B6C18C95261082F349271D42FE44 /* lax_der_privatekey_parsing.c */; }; - 60CD9DF68A22619B2F816E8B1F8DA33A /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E3C47D7844F81394427D09B0454A241 /* ResultProtocol.swift */; }; - 6121E601434E10D5CC3A01A2C815B0D0 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7530E3D35773A67134FC4EA93063F01 /* Utils+Foundation.swift */; }; - 61C9BCD007508C2CB8959FA50BF0F53F /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16FB18636FBF37732FFEDB58EF77090 /* Addition.swift */; }; - 627F0BB24DFEFE1C3CCA592AFF4E01EC /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C71245535F05C90A42683076576BB26 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 62B6EEB28406C9D6FE3A1A146083280A /* Result-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4BECA22FA3D5D535FC714D0B2B9EB8 /* Result-iOS-dummy.m */; }; - 6545F866110FD71A8A7F08C98248F17F /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3386525472CC553FF40B3AFEE8BCE2DD /* after.swift */; }; - 65693FDA33760BA50D20F6D0989BA8E7 /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63D47A1599387D37CCA850DB9256283A /* Deprecations.swift */; }; - 65736CA32B234972A9DE43C69910B99B /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 433536C0066CD933A793F8B42877435F /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 65D0354F4B4E32CBA63ECDF84AFAD283 /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DCDC3F74F1C62E2161FC76EF265BED7 /* AEADChaCha20Poly1305.swift */; }; - 662343AAB2E8FCFC56D2176CE50BE184 /* Pods-web3swift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E8C19543EF3AA4D9801DBE55E22E211 /* Pods-web3swift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 670A949462535EF03D2A9B910CEB4E48 /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B00C58B6D526DBDFF8307C6DA1AFDF1 /* secp256k1.swift */; }; - 678ACAE3280725570F9C7FC768578757 /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05760D356B4317540E7373046A1A3CD6 /* Salsa.swift */; }; - 6817327279945D8425268EF14CDDAC21 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78593F1D5D512221956B4CC2A7432B88 /* Primitive Types.swift */; }; - 68536A3B8BA467CBE4D92F13DDB5D5A3 /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D20E70F3D0A72813BC2CD93F028FF1F /* Scrypt.swift */; }; - 6939FF91657C15B585F34286B8D8BF16 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D957F2AECF5A8A0E9C7CCE2A55B6C69 /* hang.swift */; }; - 698DB1FA7FF3234946A86E51AF828F39 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDD33C66C9AA88CB20039B91D106C3BE /* RandomUInt64.swift */; }; - 6AD0531529517B7D53FB216B173CB4D7 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8798FA9542F2175AA660CDB635E6D6BC /* NSNotificationCenter+Promise.swift */; }; - 6B71498DEADD20033325A53D27E6191A /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C805181714272769BB5BCEA4814B1D /* SHA2.swift */; }; - 6B815DB2B9AAED0232FEDEC0184C28F1 /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 11F7F4CE35D426643C8DE5645FF76713 /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6CED57BC415DF0F388D893405FE3DC3A /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B061B14116ABEE15B3CE99517103317 /* UInt8+Extension.swift */; }; - 6D2056001A236820F8015BA4A79E161E /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E89406E7E995881E48051C7EC4C9DCB /* race.m */; }; - 6D4618F519FFEDB9117FC4341C7F3F4A /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = DABE6207D44D964FBF0C1EB8B82F13A5 /* Utils.swift */; }; - 6DBDEE14D217B557CE2EA3D1BE065D64 /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BF5A3B81AA637876B3E5AA4D5F124AA /* scalar_4x64.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6DC3B988093A7855E6880FFE8AE3D3B4 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69B4D5C4EED1973AF5815173AB05729B /* Data+Extension.swift */; }; - 6DEBA1C6CA8D2095A1CCE1A0090E23D5 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 74E396D4A3CBCFA52283FA71BFE1ED4C /* hash.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6E1A1FD632248BF8EA8C08628B1DD44A /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59C55840D303F469F1F31EE4867563E5 /* Generics.swift */; }; - 6F5B521B508C0230EF8488842DE2C905 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8EA9E5ADEC0526C987DC2B55F8E04B5 /* SipHasher.swift */; }; - 70C08283C27C54420E80CCFB8C2CEB18 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69B4D5C4EED1973AF5815173AB05729B /* Data+Extension.swift */; }; - 711CA891836C6E9371B8C5DBEDFD346C /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = EA7E3E2AA7DDB383A58F583E451F6C05 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 717B05FECD48B3ED8481296EF0CCF350 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDD33C66C9AA88CB20039B91D106C3BE /* RandomUInt64.swift */; }; - 723881423457C16AFC563593E5F5B7E1 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F58565031EE07098E585B5C3FCC7442 /* RandomBytesSequence.swift */; }; - 7273616B7461B7AEBC1EECEB88851187 /* scrypt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = CD2614924B987A4DF27727D9ABE96822 /* scrypt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 73240BD69BCC26DFFDF04AA384B93E62 /* secp256k1_swift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 345299796DBEE665766F152916E0A531 /* secp256k1_swift-iOS-dummy.m */; }; - 767EBDFEBC77EC1421A3916FBB13E219 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E3C47D7844F81394427D09B0454A241 /* ResultProtocol.swift */; }; - 76A9DE7C8BC7B646D1A0508BF1A38A22 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83BD9FC5270AA1FFFF0B01504C9B8BB7 /* PKCS7.swift */; }; - 76CD5AD83B4FB7CB8D690BBB0E6BF0CA /* PromiseKit.root-CorePromise-Foundation-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CCFDF41D2D776C88B83F392CB5FD7499 /* PromiseKit.root-CorePromise-Foundation-dummy.m */; }; - 76CE4160292720CFEE6F73DFED4DE333 /* PromiseKit.root-CorePromise-Foundation-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B88EAF15DEC2D3207C78A1C1F11E1B1 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 76E0382DDD9E348354DE5C5F8120D2B8 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D016DA64236C44F87FFCE97A6F0A0E06 /* BlockEncryptor.swift */; }; - 77066675DD2B31CAF9BBE16B8F3B4FE2 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61BA4F5A7AAF223AA3BDA0BF814905AA /* AnyPromise.swift */; }; - 773013B84E21E3867773BCAB6E171CBC /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB1D05E6EF6E5D33F3A993B98DD675 /* Shifts.swift */; }; - 784703A2DB2FA871E907D206577630EC /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A83A5B7F0434C3FACA671C5A20D8389 /* eckey_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 78638EB4FF9E1219EC7E04E8B97EB448 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 627C056A389B2501608E18EFAD762A6B /* CCM.swift */; }; - 78ACD91B0A802FD11D3CB4EC25A78D89 /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = E5253ADE5894EBF14D938D154E2B0227 /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7A0702EE936C773C38F5E4B7F21AB26C /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B27C53CBFBCBC1E6466F7294EFBEA93 /* Multiplication.swift */; }; - 7AE2FD363C4422762B7BC5E2005F7C2F /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C6A6AAF1849184B1A8916E223E9BCB /* String+FoundationExtension.swift */; }; - 7B5BE028C02660F6A97F1D470C96F05D /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD9ED798FEF891C4A3123685AB25017 /* PKCS7Padding.swift */; }; - 7BD84093A79722210529995051394BC9 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C97CDE8E28215118A8265A78EF509D0 /* num.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7BFB63A076CB21871132CA1C68FA934B /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA5803AF780ED8A2ABA135BAA03479 /* ECB.swift */; }; - 7C414865BEC16506132F9910DBD62F3B /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0974D06B8BD99ADFA971B50A5A2B38CE /* Division.swift */; }; - 7D9DC2803DA6CE9DE07A6C18AF52AFA7 /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D976FDA3B329F00236A2F1D4C6B378 /* when.swift */; }; - 7DB10EF26A0A2F6768F695BE03C0AB86 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B27C53CBFBCBC1E6466F7294EFBEA93 /* Multiplication.swift */; }; - 7DD60FE1FB24311F3522B19B09E05CBF /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B659053EBDBE68F9EB1137C3AFCC9F8 /* lax_der_parsing.c */; }; - 7F754A09D7EA3165D9758A80F307227E /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = B508E0F1A0F3142EB46882B0104D6F6B /* Floating Point Conversion.swift */; }; - 7FE0C78E1D6CF35FD66403216909410B /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 851772A4A36B2700215C3B972F05BB10 /* BigInt.swift */; }; - 7FE6B8EA18532E50F15E7BF3D013B092 /* SwiftRLP-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BFCF7E8508743BB12B3D3A3C1AFF821 /* SwiftRLP-iOS-dummy.m */; }; - 80D571EE008AE23D0AFAC92B6A98204D /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 0194B6C18C95261082F349271D42FE44 /* lax_der_privatekey_parsing.c */; }; - 82C1C3566A5D5A6395F0CC63E2E63881 /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DFFAA6FC4E6A7DCD0DA8AE064B792DA /* Catchable.swift */; }; - 83C9B6E62BE2665CCF9078D50C66331E /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F009B8B3BE27687063703C35463B71 /* BatchedCollection.swift */; }; - 83CD3302FE915E10B107859386387F32 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 93F2C29FA3412D0329780F52C1DD2931 /* dispatch_promise.m */; }; - 848EFB4F6CDA94AAAD25CCB2283E9EAA /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83C510AD112596C90B76C308A60DF14 /* Integer Conversion.swift */; }; - 84AD91997553D782969A046B9146044A /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32019641A223A260B54A3A6633B0BF19 /* StreamDecryptor.swift */; }; - 857F892AC414752BEECA9829E4EA6322 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = C906CE7510F7153C35950FD44AE3C571 /* Operators.swift */; }; - 8593AEFA684E7B84208518E6FC380FB7 /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED52325262247A4879433CE3D7BA1251 /* Int+Extension.swift */; }; - 85FB5B7FC1D897B946EBAE4BEAC9CE4D /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44BE339EC0BDEB80B98E8D988708993F /* UInt64+Extension.swift */; }; - 8601AFFE38D08BA40B4AED33D04654E4 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 705526D46CF8710526DEFD6A81185AFA /* Strideable.swift */; }; - 862C49A4047D7B32FA8ED4644AAF3DE2 /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32019641A223A260B54A3A6633B0BF19 /* StreamDecryptor.swift */; }; - 8645C073FDA17B6DF8E4AADCE0808C3C /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 660B0734DFD6D8C99EE70FDF836AD891 /* HMAC+Foundation.swift */; }; - 87C8D1C1A44E68BA3761B2915728AA1D /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6176C709F1F11238FCAF958F9A75741 /* ChaCha20+Foundation.swift */; }; - 89AD1BFCA3B307CD78AFB34118AC031D /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16FB18636FBF37732FFEDB58EF77090 /* Addition.swift */; }; - 89B40A1B6B4771D884CC857A62E3E33B /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = AC98E623829FE2C9F71C5C97B66118C8 /* AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 89DAA555D3A3650E7AB8AC4853452716 /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BC6D7199E76698CC662BB48AE0E81 /* scrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8A8FAE273220A2C885FE8C452D175166 /* secp256k1_swift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FDABDA201433FD66D894DAEF0761C26 /* secp256k1_swift-macOS-dummy.m */; }; - 8ADF39D418D2741819C863545BBED5D6 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BE4DB426382B15B10062329955F15CC /* scalar.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8B10C87FE35BA83424ABBA01D0669FF8 /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = E0E2C657091728E6CC4D8093DA13C072 /* group.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8B4AC0EBDAD7A87FF683938E057D5338 /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21CDB590E00AE3873562308E5110A4D8 /* Cryptors.swift */; }; - 8BAF1F91DA55BF8A5E86636E90D92F2F /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 8674CB477181A24AA72377A5EF2E312C /* secp256k1.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8CBF1AE067B860433B0A4BE710FFA9BD /* CryptoSwift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BA4DC9927DEE120B1F101C5D3C546B09 /* CryptoSwift-iOS-dummy.m */; }; - 8CCA031DBFC561C2BDB4295AFFE02DCB /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D86C75595B41479AB364568AB89F857 /* Configuration.swift */; }; - 8CFC200142682965D7D13983526BEC97 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA57B8C185D40985D37E5A9E9CB7B3D6 /* HMAC.swift */; }; - 8D3BA883F8AA3E7565A2AE9D8D533F19 /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A65DC6A2E9BC70E1F5211BFB9E2266E3 /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8DCA7529640903D6984416665D803C1D /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E330212AA4C3537D541AD9C197932C16 /* CBCMAC.swift */; }; - 8EAEFFBCB259C139AE42E4967BFCD638 /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FACAD9F572878C98D14B56672DE004C /* PBKDF2.swift */; }; - 8EBBD4D88DD8F98CEC0791A902D2438C /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A65DC6A2E9BC70E1F5211BFB9E2266E3 /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8EE3016E16955D33E67D3A4B526B80B7 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = F465EA5AEC974D4B2AAFFFC2768A91D7 /* afterlife.swift */; }; - 8FFB71FAC919894CCAD2B296EA300E5B /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A8E64677621D080BA0F099180A4886F7 /* Cimpl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 901FC638FD04ABBF641B1BA5289E58B9 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 02EAAF0A84187F4281AB39EBD7DA1B34 /* after.m */; }; - 906F0233096CF30AA2ADD2032085E9EA /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA57B8C185D40985D37E5A9E9CB7B3D6 /* HMAC.swift */; }; - 907425973F15BD66964D73A783E4FD6A /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = E473E833B6236676C6F4E9274FEE290D /* num_gmp.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 911E85408B3D802D7981B85D7192128F /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F009B8B3BE27687063703C35463B71 /* BatchedCollection.swift */; }; - 93BF74723D8898DC3E8DC67317C1B0EB /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = A90907EC55F455C898F8D8E35C2908DC /* SHA1.swift */; }; - 94C3998EDCB3C4B71B110099E7E3E975 /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 2765A0C6E2BE64A4D0916D30633BEA7E /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 96126C56ABEF426B0B801431F709443B /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = 07BA44CF1EA491F2DE0FFA66AADF2764 /* eckey.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 965128CD152E182D548D25166A7A0ABC /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E4AB7C0ABCF3AEC6B3979EC294536E /* AnyPromise.m */; }; - 987DCF48843E8B83BE9F0B5788175D53 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F60E6D7F6C28A5DF688920FB74829E4 /* CBC.swift */; }; - 98AE081420DDB94A9A72C9DE3CEEDB81 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 28668B0DE54AE4E51942A5F50596975C /* NSNotificationCenter+AnyPromise.m */; }; - 98DF8B5D60DAF3B7AC6B1899CCE12A74 /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = E473E833B6236676C6F4E9274FEE290D /* num_gmp.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 99365E9205AEA46510A70B0092872710 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F58565031EE07098E585B5C3FCC7442 /* RandomBytesSequence.swift */; }; - 9B20EF7C315B4E343F0B79DE78C9E355 /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A8E64677621D080BA0F099180A4886F7 /* Cimpl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9B953A89FD0508E9463F5FE0D9F91D44 /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = CEF60C13887D74275029301DCC6A1149 /* scalar_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9BB2691E8EC04617309A1B905F5A652B /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6D16C3019A7CC7FFDD41C97E69DCB84 /* Rabbit.swift */; }; - 9CDABEBBD7BF0889FF7DD3E739FD6B40 /* scrypt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 05829B47F24F4E5C604129AFF8534C15 /* scrypt-iOS-dummy.m */; }; - 9DAE14B88EE655354CACE65717FA211E /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACBB5EB9CDB6065227935806FA94DC6B /* Hashable.swift */; }; - 9E16CCBD9A220CE68E8B8BCFC9134C59 /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 221F16DEDE441F76365153C8EC2D64E3 /* ecmult.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9E9ABC19900EB9A2F58E05DEDE4C9C6A /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC3D6E08FC4B31786E28A3DD414DE71C /* MD5.swift */; }; - 9EF0841FD75468EF3543A5C6A25A9398 /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D4AFA48362F6E5DF72006F39A5F32A5 /* CTR.swift */; }; - 9EF7B2E48C40E82E7EC0E85F6B0222E8 /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E138D3C3327A0AC400395EA7B85D13A /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9F975F5CF4816CD3A6CA2282F5F4E3F2 /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDD6DAB9ACD231BAA0226331BDE67975 /* BlockMode.swift */; }; - 9FA8CF326DCA266C358B26FC42191498 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93E416B2CCEC4490652DE3889013CC4A /* Blowfish+Foundation.swift */; }; - A1636315A5B3017312CFC781DF83901E /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CF0657C69B458EBD464B4F7EF2A1758 /* AEAD.swift */; }; - A1E48947F828D226B1FF667AFDD0C23A /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = CE82C576F4D863F22181DF0D90DA8533 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A1E8398E1FC2566D94EE4D94B48E909A /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66858822A1651FBD671091155D387A8B /* BlockModeOptions.swift */; }; - A26E92B79121B74FDE94799BF2A92C91 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE9FBA3C3EB5037CAB66A887E9BC6DE /* Array+Foundation.swift */; }; - A2A378FB0E28CFD130DD02F25B9420EF /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276BA53B2960C2B624579741823D9DD2 /* UInt32+Extension.swift */; }; - A33313D130AD8E1D44BD46B119D45186 /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = A094ABEA6C6E0AD5B87D62BB32AEA3DA /* util.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A419E91722005FB59C7DC3BEA7AC0733 /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = C02A5DDAE1965271228C7E856C9987C3 /* PBKDF1.swift */; }; - A4342DE847A35E8E98BAAEE729A3FB15 /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5FF562EECDB0679D662D82F7A5AF6C0 /* UIView+Promise.swift */; }; - A4F8D815D07249B30E393C63694BF3D7 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9727D8BDEB33BD75AB806BC0A3EC155C /* Codable.swift */; }; - A65A2E325268ED551F8A5D89FB7E75FD /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF2520CE6C39BFEF4B6C9B87DA7047AD /* HKDF.swift */; }; - A67CFB75EC62364579FB9EB448C61786 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66D54E1981BA238733A8A5E65484B2B5 /* race.swift */; }; - A72461C8573DCDB8310FA557C3BA1DDA /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AA2EF5FFE50FBD8EAB6BEA39D23C942 /* DigestType.swift */; }; - A7799E0318407597777B039DFA8353D2 /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1BC5C341B16D41330279E713831347D9 /* scratch_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A7A7567A6AB8900623AC752D617FFC9F /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = C5648942F9F59CF9D06030DB7B64423A /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A829DDB57163254C51DF6C9896A1666E /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED52325262247A4879433CE3D7BA1251 /* Int+Extension.swift */; }; - A8995C0B368AF79026265F486D640985 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78593F1D5D512221956B4CC2A7432B88 /* Primitive Types.swift */; }; - A906E0A776F4CC1306835A29F687E072 /* Pods-web3swift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 25F72E78DF48560F5D210E57844ACDED /* Pods-web3swift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A91379A538F389B10BAB2CE9D406BDCE /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FC6C3CA2D135767617F5F276FF395CC /* CompactMap.swift */; }; - A927C0600827FF278DA9F985A60002E2 /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C71245535F05C90A42683076576BB26 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A940EEBB23376DBCC59DC570DA702353 /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DFFAA6FC4E6A7DCD0DA8AE064B792DA /* Catchable.swift */; }; - AA08FA2EB9DB4E98494BFDDE5D4B4936 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = 161C2D9657DC967FFAC2A37D48134D76 /* Bitwise Ops.swift */; }; - AA4AE37CE61DB029CDA7A78DF0E65A30 /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC3D6E08FC4B31786E28A3DD414DE71C /* MD5.swift */; }; - AB02DBB24DBB4F98005C0C14C342F8FF /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = F31913059D849B57CB91C3B18F4D92EB /* Prime Test.swift */; }; - AB9E1F4EDDB1BFD7F4359B0E1AEF9C78 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEB151B14FA1CAF4FB16D76AE7F505AC /* Cipher.swift */; }; - ABFA50427C4CC466CBA9B0E7145D83D2 /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 221F16DEDE441F76365153C8EC2D64E3 /* ecmult.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AC9330E734E319351A6F8440BEFFFA1D /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 433536C0066CD933A793F8B42877435F /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AD14BE19983A139FDFD89FE6E3E68C3E /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 8674CB477181A24AA72377A5EF2E312C /* secp256k1.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AD2857A3144D7DCCD02D55CE8F6F8AA5 /* secp256k1_swift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EC9440034E7256986111FBC505567C26 /* secp256k1_swift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - ADA008B926487DB6CF8A658A3F3DF11F /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 092DD25F9A8FD52F554B41FA11289B4C /* Resolver.swift */; }; - ADE49554E5BC26D0FC3CB250EC153F83 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D67B21BD5ECE586715CDCB8EF9F84E24 /* SecureBytes.swift */; }; - AE8E41C185BA7C46465657E84B66F196 /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D20E70F3D0A72813BC2CD93F028FF1F /* Scrypt.swift */; }; - AEF51F69F68DDFB4BD984ACD87DA0517 /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB95DBC141DB412EAF90DE75B00EE345 /* CMAC.swift */; }; - AF373538A9B5EB2BFD84D0DD002478A1 /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = E5253ADE5894EBF14D938D154E2B0227 /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AF81FA4A9B502AA954430195C09DA953 /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63D47A1599387D37CCA850DB9256283A /* Deprecations.swift */; }; - AFDA9E12CC7195153491C8CD1C0AAD8B /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83C510AD112596C90B76C308A60DF14 /* Integer Conversion.swift */; }; - AFEBE1E855779D74D26F05919F5001AA /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD971533936CC3705E267598BF53A93 /* UInt128.swift */; }; - AFF838D30AE798EA2B0FE11A1ED0729E /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = C02A5DDAE1965271228C7E856C9987C3 /* PBKDF1.swift */; }; - B075220C6A1ACDF3E6ECA9447125C827 /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03938C581D805E7DEA7EF7935F6B4E61 /* Cryptor.swift */; }; - B13079439C3B358C138A64E076E53813 /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A5666EAA8ADD7A2AA3ED33C8DC6028 /* hash_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B1CE9BDAFCAEDA7D99F7545490D1D518 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B2EDCF2255BD0D829F03B0C1BD0A060 /* String+Extension.swift */; }; - B43A930051FDC74CE6667856407BD5CF /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0B695B584A94039305F17CD2B5470FB /* Exponentiation.swift */; }; - B48F3BF9283F0C38B048D3B5E6C7549A /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3ADB1AB7700B235D79CA3AEB2E8540 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B52E20B7BAF9DFF4ACF992979FAA904D /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B061B14116ABEE15B3CE99517103317 /* UInt8+Extension.swift */; }; - B640565E1593B250390597C2651078A4 /* BigInt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 555457AF50F888167C28CEA34B14AAE1 /* BigInt-macOS-dummy.m */; }; + 3AA32C95FECA68AA3FF571E0F0AF83BC /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 93A5B46AC7CC995589CAA3D991DC1B29 /* scratch_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3AC07C0FB85EDC81532D78FAB99C85B1 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6633CE6E0F4DA082E8A3374A723A4844 /* BigUInt.swift */; }; + 3B0D18B9FCA958796CDACD6710637030 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB290FC3F5ACF0789F4078C376E6ADED /* Array+Extension.swift */; }; + 3B3E08848BF8EBA88438CCF84389B07F /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = E7E7786C2EC1054AF047E2571B12205F /* util.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3BC2BF6E6B27BFABAEE1C5B8AD2838D7 /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7D5FD5536C89792D33769E9EDFA2DE8 /* CFB.swift */; }; + 3C698382149E46B98B05858131950249 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43941A9CA2F209289C333306CBC5961F /* Process+Promise.swift */; }; + 3D6F8B4564F5BAF43F01ADCFBA720658 /* EthereumAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CB204BDB01A5747B116731490529E2B /* EthereumAddress.swift */; }; + 3D71156680EC3D94A6E1441546C57E6B /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 3ED02D5B7EB6BD54C515B4B06599DA5F /* scratch.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3D80464CEDFAD819CD4BCB5190A469E9 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95F76B715633F358CA7525D8C17738C9 /* GCM.swift */; }; + 3DEC2D219AA42627099A9C723B66AB97 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = DF39D90FCE7EA42EF346003BA8EF96AF /* ecmult_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3F474D94A325AFDB74206B0CD0790920 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBD8BA7DCEF1E0FF9602E3F7BE941878 /* SipHasher.swift */; }; + 3FA010055B3BC4813A4245727D6E2AE7 /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BD790D4294FB459BB05017C05CA1F1E /* UInt64+Extension.swift */; }; + 408DA994AB51EFFDD47DA8B29108EB0D /* SwiftRLP-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D4294CA40AB575970217A19CAA320DC0 /* SwiftRLP-iOS-dummy.m */; }; + 41E4BB16EA30C7552FF1E3CA6BC0491D /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98A9FC519C49C693637C4BC5D0DD6EB7 /* PKCS5.swift */; }; + 42FF2C1D3648C354550AC88EE5E64B80 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755E0B91B0984ADEF77E48E32C147276 /* Data Conversion.swift */; }; + 431FDC470CFD299BE8D98F92F1B01B60 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDD6BBAF4F23E405AA0CA5AA2837BD9 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 441F98C26072F42F773DDF5C14AC249E /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC0E5DF49745E221D708C75FC2B03DC7 /* AES+Foundation.swift */; }; + 447C407907733320787E8F23946656EE /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7D5FD5536C89792D33769E9EDFA2DE8 /* CFB.swift */; }; + 44ACCC6BC3804034F682166BCB280D6C /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF94FCFAAA2F4216A2F89F43E2CDA4DA /* Catchable.swift */; }; + 44AEE69C5AA31A84CCEB7534C0855D78 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D292A1945503B3A000AC47BB73889903 /* String+Extension.swift */; }; + 44F4771652CF7E4CD82AFFF61B0ED567 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8151AFF003D8A45F3E0F171019ED33 /* OFB.swift */; }; + 45482DED636330B9BCE4493225B66813 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 809F44457475B204EE242D251FDF9E8E /* Comparable.swift */; }; + 459BB256132E1224D00C02FA4678450E /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A69383BF153D7728F4793AB68C3C4 /* hang.swift */; }; + 465C38010042DF8DAEFA492DCE294A36 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFCBEFE9DA6D7F361DBB180EB84492D2 /* BlockCipher.swift */; }; + 479CE094426E3868726526A833D58F21 /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 255F9BD02565315A20D36910794D0C10 /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 480D4F1A6DBDF15BDEE2611663CB3BED /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 3ED02D5B7EB6BD54C515B4B06599DA5F /* scratch.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4876BE2384F8243077AD5F55AB07AC4B /* secp256k1_swift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FB320DD9FD83A5F3BAADF33818736C30 /* secp256k1_swift-macOS-dummy.m */; }; + 48B50CFAD0E4088080A109DCA7B8688F /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E942712A2D0087AAF697A0E031459FE /* CMAC.swift */; }; + 48D821F48A258CA9FCC0524545AF23B3 /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FF1BE57EBE989B2B7EDD166127B5FCD9 /* PromiseKit-dummy.m */; }; + 48EE55837C3546B46DFCD59737CEDC3C /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAC966A4293FF7689DD8A3B2877731F3 /* Blowfish.swift */; }; + 494A8C06290340CA7C968264669CD5C0 /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D44F8F4C5F0D588B00DF17BC6518E5E0 /* Rabbit+Foundation.swift */; }; + 4971308DFA5E58345B78AA42538C65DA /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 9821B82F2A2D9E9E0A740B6B4B38A6AB /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4A9382D54AFF6BA0D34C2BE46245192E /* SwiftRLP-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F03C5346C1BA44E2325916DC9CE7B67B /* SwiftRLP-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4C20F5836E09BEAF0175C7F5D2D45F89 /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19725B1F6B394E3B97BB387C7E4E4874 /* NoError.swift */; }; + 4C82B6EF64C041919BD1BDFB613CA7AF /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE7F6BB14F19AC57CB96B2D06603E845 /* ChaCha20.swift */; }; + 4CC995FC29A8A8E8C8C0B0B97A8C5486 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C3F64F8D233B557ADBCBAB5F8D81F1E /* dispatch_promise.m */; }; + 4CDD68A843BFBB60D9186F29785293F9 /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 1D7B42933B2D81EED52706C7200A9732 /* lax_der_privatekey_parsing.c */; }; + 4D47DC986746CEF8703D74068A8201C3 /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93264D7DC7DF888A41AF35694C9CBF60 /* BufferStorage.swift */; }; + 4D7DEDC820A1EF913455BC0FBE72FBD6 /* BigInt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A516C73CD574B0D6BA84C38BB55FBD2D /* BigInt-iOS-dummy.m */; }; + 4E0086DE48C75B11B8E2D08041EEA2A5 /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93264D7DC7DF888A41AF35694C9CBF60 /* BufferStorage.swift */; }; + 4EB23EA6CB130E3291B0776D3862D748 /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D44F8F4C5F0D588B00DF17BC6518E5E0 /* Rabbit+Foundation.swift */; }; + 4F70068CDD913C18026C4A968EA92E9A /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31ABCFEE7AE67562C4CEBB66C7ED4D6 /* ZeroPadding.swift */; }; + 506BDA80E1D1FADE6D2EAE8FE6533C13 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = F1899C74540C37F7D84214CF9F8AD010 /* NSNotificationCenter+AnyPromise.m */; }; + 5085168C5F297AE562EBC81151EAB02B /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = 423E241FA5BBF42BFDDA5E6C6AD2DEB9 /* scalar_8x32.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 50DE88114B7BD18A98F0F45A972079E3 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE3D7030BC429403BBE50F40445229DE /* SecureBytes.swift */; }; + 5145AAE99352DBF420419223083C6C25 /* CryptoSwift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F310D1B89DD81708BBBAED0DDF1B1168 /* CryptoSwift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 515FA154B65878E6DEB79E513C7F7FE3 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F115779D04B6641A1DB99D05887E03 /* NSURLSession+AnyPromise.m */; }; + 51B79A81BE02C232299A5DA47E988277 /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D57256C33A9C97F888F53A4FB7226146 /* UInt32+Extension.swift */; }; + 51DADAE211CE77CDDD762DF1F5FAA236 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89B539CEC7927EBE7BBF7262580A0E18 /* Exponentiation.swift */; }; + 526530B8F45F2C42F4B731C1BC05C532 /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 678FC45FCDC1237D6344CFADDB22F228 /* eckey_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 527E46A66487D9D5B3FF54359A3951EB /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D98916544A0C622EDB88411AE57 /* CipherModeWorker.swift */; }; + 52D04CA795889A574DE97357217965BE /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF08003360A2A59E3E059CBC5496E71 /* ecdsa.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 54275399FAE4959C9EEAC7C7E8EA2031 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840434A830881CF07FBDE172A20CDDDC /* NSObject+Promise.swift */; }; + 5493B45FC1BD542111A20AC6A58EA0B1 /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3E0EFDBB92A100EDE06E9D563ACF26E /* PKCS7Padding.swift */; }; + 54B975339087EB52B33FD2013118BD0A /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3ED371C14676A66BA35BCF542FF8B548 /* hash_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 54CD3C94770F9985D0EDD8AD2D880EEF /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71D09134607D15AB2D81F0CB08D3F055 /* AEADChaCha20Poly1305.swift */; }; + 55368A922AD4C49FF4D8A4042ECBB7F3 /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = C66DD520FECE2C1EE69FD6A9E23EA032 /* field_5x52.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 55620C107463741AB202D7B93B8AC47A /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFD1168E711269E444E38FCAE0B8E5D9 /* UInt128.swift */; }; + 55714E2CA2C818B9BB609FE4303A7AE3 /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F6102F002EDC216C49666462EF952CA /* DigestType.swift */; }; + 557151A9F797E462E701215A27F7DC21 /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ED58E829B835009D9DCD1D8B959FBBD /* Digest.swift */; }; + 557E070EDC1D983960128B12A77AA293 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB4E43C9EB1F78AD84B2314039898608 /* GCD.swift */; }; + 5638014E129B104ED47134518667CC68 /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 282DD884F817856F0FD3D38F8A4447B1 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 563C641A5D7264103E44BCDCC6C6C887 /* CryptoSwift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 26BEF092AF19B017CCEAC5BD6EDFADBC /* CryptoSwift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 56996A02B3DC920077AB801E4E8A0A15 /* Pods-web3swift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E8C19543EF3AA4D9801DBE55E22E211 /* Pods-web3swift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 582EE7A8797F29AD814C0F877E811808 /* Pods-web3swift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 25F72E78DF48560F5D210E57844ACDED /* Pods-web3swift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 599CEF91B917F7C8758E1E13C50B2A90 /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03321ECEB201CDE70DA4F88EE48E2044 /* Salsa.swift */; }; + 59E8068AD7D81375CF6BD6C079A6CD52 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 17856FB7A41BDDB75285F531B03882F4 /* PMKFoundation.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5A7A8C39583FF9303788AA4DAFD6FB1F /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 255F9BD02565315A20D36910794D0C10 /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5B4044B103053232D6A987856C610367 /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441A9CACC96EB9A41D4ABF90FDFFD2C8 /* ChaCha20+Foundation.swift */; }; + 5BFB61E4B72C16BDD714663095E1E602 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F115779D04B6641A1DB99D05887E03 /* NSURLSession+AnyPromise.m */; }; + 5C07AF157556B42E17E1E32A4AEB573B /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 062A95E74B96944BC0E3A674E72AE85E /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5C34CEC8C567D8A533F9FA1327868C96 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = FD3D00DC2D85B010C2EB60CA78D22508 /* hang.m */; }; + 5D3C0267F1EB78B6038FF2898C20A737 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = 0554DC016A3872F60738FE5C366CAF31 /* ecmult_gen.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5D6A8FBA67FCA90E5B02979DDE6FFF43 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 681146D3345FF5156D09E271666D5EA1 /* group_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5E141CAFCF233DCA8F297AA169BA6AE7 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = E022DA9B1DCAC9A88B18D90457826545 /* after.swift */; }; + 5E1BA68C47D734105DD418DE2C795B71 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 86B004B7F6AC62E27D75D02978601A76 /* NSTask+AnyPromise.m */; }; + 5F569BB3EF9E99550253E3309677BFD7 /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8262D72960A17572931F11EC9520938 /* secp256k1.swift */; }; + 6121E601434E10D5CC3A01A2C815B0D0 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EFDF78EEBE9836CDC5AE2FEEC50C17B /* Utils+Foundation.swift */; }; + 618CFC75E3108B18C4DD15C12EC58626 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3A44C98D1E93465803241C08887CDD /* num.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 61C9BCD007508C2CB8959FA50BF0F53F /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3487EA794F9422FD28689C37156DD9FE /* Addition.swift */; }; + 62A5DF1DFBEC0FD06FC3C895F4447790 /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = D8241FAE07EC659EA8EE9D035AB05377 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 655C7AAC2D964E8A317BD69CA59F54DE /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D1D500C8CF88FC87FF7FA43DBC53611 /* AnyError.swift */; }; + 65D0354F4B4E32CBA63ECDF84AFAD283 /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71D09134607D15AB2D81F0CB08D3F055 /* AEADChaCha20Poly1305.swift */; }; + 66260581693FDC3DB887738136636C8F /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D1AB32F0AE7B734159BB1FBAF7F5078 /* hash.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6663694C763AF2F46E6A548540FADB3C /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = E65308F679CCAADBBF14F5DB4971CD21 /* Cimpl.c */; }; + 6817327279945D8425268EF14CDDAC21 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03FE099622DA426E4CBDFEB30B374591 /* Primitive Types.swift */; }; + 68CE1BEB5DEB9671E24DE87773BA920C /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = D8241FAE07EC659EA8EE9D035AB05377 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 698DB1FA7FF3234946A86E51AF828F39 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAC89259204E1C6A18BCD0B7D08C104B /* RandomUInt64.swift */; }; + 6AD72DAC1AE026743E0DFDE9E6854763 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = 944A08F05724AD8D1EC4F7FF0D09BFE6 /* scalar.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6B71498DEADD20033325A53D27E6191A /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BFCCF45D62D69A50F9ED16BCE93C54A /* SHA2.swift */; }; + 6CED57BC415DF0F388D893405FE3DC3A /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B019A1B56440DDAB3267B96FDBD576 /* UInt8+Extension.swift */; }; + 6D0468F188D17EFAC5C4655473D99D74 /* UIViewPropertyAnimator+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D4F789F0354155D07BB3A1463344281 /* UIViewPropertyAnimator+Promise.swift */; }; + 6D4618F519FFEDB9117FC4341C7F3F4A /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49A1004ABA6FF6BBB692884F59131E13 /* Utils.swift */; }; + 6DC3B988093A7855E6880FFE8AE3D3B4 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F14C976AD41B0817186FB67B3B349B /* Data+Extension.swift */; }; + 6E1A1FD632248BF8EA8C08628B1DD44A /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = D286B6A0694F7E16078B8E7642CAE6FD /* Generics.swift */; }; + 6F5B521B508C0230EF8488842DE2C905 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBD8BA7DCEF1E0FF9602E3F7BE941878 /* SipHasher.swift */; }; + 70331820D199129F5DD2EF9609699F32 /* PromiseKit.root-CorePromise-Foundation-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 08CA1065DA6D886DAD8978D531C6C531 /* PromiseKit.root-CorePromise-Foundation-dummy.m */; }; + 70C08283C27C54420E80CCFB8C2CEB18 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F14C976AD41B0817186FB67B3B349B /* Data+Extension.swift */; }; + 717B05FECD48B3ED8481296EF0CCF350 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAC89259204E1C6A18BCD0B7D08C104B /* RandomUInt64.swift */; }; + 723881423457C16AFC563593E5F5B7E1 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B36B7C3689A1ED9FBF4095AF74840 /* RandomBytesSequence.swift */; }; + 73ADC70790A1F8DFBCB7B7F2D1A2264E /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1422C640D1B145BC997D3E0A3FF10339 /* Extensions.swift */; }; + 75F745A947766D56938C0215E2A54C9E /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = BA200D6941B69ACC080DFB132BEFF422 /* num_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 76A9DE7C8BC7B646D1A0508BF1A38A22 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8AF5512E4598482BBFB4AD1BBF8064 /* PKCS7.swift */; }; + 76E0382DDD9E348354DE5C5F8120D2B8 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC4C922D64767063B8D1A270D793373B /* BlockEncryptor.swift */; }; + 773013B84E21E3867773BCAB6E171CBC /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7953EE95375573E978E0FAC7F88260CF /* Shifts.swift */; }; + 78638EB4FF9E1219EC7E04E8B97EB448 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14176496814CB0D56F198301D279FE65 /* CCM.swift */; }; + 78DCC64E4BB4C69177C5391DF4BA6119 /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85BEAAA1888D13FCFC9F1C2AB3A7ABBD /* when.swift */; }; + 79571D2CAB88DA790160FD0CDD3AEFF9 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = DF39D90FCE7EA42EF346003BA8EF96AF /* ecmult_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 79C2298346A483DD086B4A9AC7223820 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1576E0C86B6BE13F5FB685E1357E71C3 /* Result.swift */; }; + 7A0702EE936C773C38F5E4B7F21AB26C /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58F3E29F9DFEE63DA2847094AA590666 /* Multiplication.swift */; }; + 7AE2FD363C4422762B7BC5E2005F7C2F /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA3D1883E9BD064F4B9299B5825061E7 /* String+FoundationExtension.swift */; }; + 7B5BE028C02660F6A97F1D470C96F05D /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3E0EFDBB92A100EDE06E9D563ACF26E /* PKCS7Padding.swift */; }; + 7BFB63A076CB21871132CA1C68FA934B /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98C48C6F1DCE55E9EE6040D50626EF16 /* ECB.swift */; }; + 7C414865BEC16506132F9910DBD62F3B /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A86CAF979F3E970071A5FC47D9D7EAC /* Division.swift */; }; + 7C4A904DCA206E41A88861F990CDE0BC /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41FAB135DE09D3F9136D834CBE3A558A /* Scrypt.swift */; }; + 7DB10EF26A0A2F6768F695BE03C0AB86 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58F3E29F9DFEE63DA2847094AA590666 /* Multiplication.swift */; }; + 7F754A09D7EA3165D9758A80F307227E /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D5F98CA61161B592980B259143F48F5 /* Floating Point Conversion.swift */; }; + 7FE0C78E1D6CF35FD66403216909410B /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AF5980AB239F34C8CB958F30A518A0B /* BigInt.swift */; }; + 804014B054A6AF38DF4D8859000D64D4 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7695A9A41BFEEAD40C0235B913A07672 /* AnyPromise.swift */; }; + 81F2542193E3187EF95CC783A290D239 /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E8F4C6770C979220F90AD2CBA4EA3CE /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8206DF8B40704C8CFE78662D412A422E /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 612CB1FE4A4EF26D20DC64543E17C82A /* when.m */; }; + 8283888B261F0702178960767D664712 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDD6BBAF4F23E405AA0CA5AA2837BD9 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 835E647599AD20789B5A10F1E3BEF888 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D3FAB581FA1884038308CAAD092260 /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 83C9B6E62BE2665CCF9078D50C66331E /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682A1BA8289C74E7B26FAAFA80540F57 /* BatchedCollection.swift */; }; + 848EFB4F6CDA94AAAD25CCB2283E9EAA /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78AC661E237EC28BD38872134D7F7E2B /* Integer Conversion.swift */; }; + 84AD91997553D782969A046B9146044A /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F576E04543F9CA8FD11EFA190633C0F /* StreamDecryptor.swift */; }; + 857F892AC414752BEECA9829E4EA6322 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF137216E20AA1BF3FA0B1A647DB89AC /* Operators.swift */; }; + 8593AEFA684E7B84208518E6FC380FB7 /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E81CDB6F58099035E4B22900B2E0740D /* Int+Extension.swift */; }; + 85FB5B7FC1D897B946EBAE4BEAC9CE4D /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BD790D4294FB459BB05017C05CA1F1E /* UInt64+Extension.swift */; }; + 8601AFFE38D08BA40B4AED33D04654E4 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F32BA5AE4C0BE79090A24F00A3F35AFF /* Strideable.swift */; }; + 862C49A4047D7B32FA8ED4644AAF3DE2 /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F576E04543F9CA8FD11EFA190633C0F /* StreamDecryptor.swift */; }; + 8645C073FDA17B6DF8E4AADCE0808C3C /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF8AF8868130C525C8921A94220CFA6D /* HMAC+Foundation.swift */; }; + 8756026DE126ACD98A35A20C2F344F1D /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E8F4C6770C979220F90AD2CBA4EA3CE /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 87C3D298B9E9216D388BA5B0D015EE50 /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED4A3438C4739D717703BAE1F7020595 /* Deprecations.swift */; }; + 87C8D1C1A44E68BA3761B2915728AA1D /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441A9CACC96EB9A41D4ABF90FDFFD2C8 /* ChaCha20+Foundation.swift */; }; + 8972ED44B8E31FAE3C248BBCCB8E7CC4 /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = CA97BDA6DF1DE11A96470DBF6FBD7C62 /* lax_der_parsing.c */; }; + 899F8A018D26D3A321EB0481C091847F /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85BEAAA1888D13FCFC9F1C2AB3A7ABBD /* when.swift */; }; + 89AD1BFCA3B307CD78AFB34118AC031D /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3487EA794F9422FD28689C37156DD9FE /* Addition.swift */; }; + 8B4AC0EBDAD7A87FF683938E057D5338 /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3391B8242DCA2A16EB9DBB3FF0740ABC /* Cryptors.swift */; }; + 8CBF1AE067B860433B0A4BE710FFA9BD /* CryptoSwift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 09536C3B22879E31B5C0B3426E2FEBCA /* CryptoSwift-iOS-dummy.m */; }; + 8CF0A92E555F6A19FD269B16235D3128 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = AEA94352D4A3D0793D359A8C1CB50E4A /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8CFC200142682965D7D13983526BEC97 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B67DD6B4751EC541A3D153113AFB1B1 /* HMAC.swift */; }; + 8DCA7529640903D6984416665D803C1D /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF4D45B809574B97A749EADBA2EFAB02 /* CBCMAC.swift */; }; + 8DCC706DCFDBCC907AAB009F5C505F8F /* secp256k1_swift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1BBCD0009252A5C66FFA6A2EDAE25173 /* secp256k1_swift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8EAEFFBCB259C139AE42E4967BFCD638 /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9F882189D9E2CE8D7B7DC60BA0D5AF6 /* PBKDF2.swift */; }; + 8F1107E28340C0612A6D8340F38A267D /* secp256k1_swift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D08241C8DB918E40A54A24828275D1C5 /* secp256k1_swift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8FA68F40AE3928B497DDA7C8B828FE74 /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 37B67C2B42A2EC2E689AE41636261351 /* scalar_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 906F0233096CF30AA2ADD2032085E9EA /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B67DD6B4751EC541A3D153113AFB1B1 /* HMAC.swift */; }; + 911E85408B3D802D7981B85D7192128F /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682A1BA8289C74E7B26FAAFA80540F57 /* BatchedCollection.swift */; }; + 91D6972A579E54069CA6674EF1AFDD62 /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = C66DD520FECE2C1EE69FD6A9E23EA032 /* field_5x52.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9307E26E1B1DD066C1B71C66EF7B5B99 /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E75AF68728F33A9AC112BE223CA6718 /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 93BF74723D8898DC3E8DC67317C1B0EB /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC0DBFB306B96AAE65A02CB825C4F0B /* SHA1.swift */; }; + 9426948AD7CCB3A21DB5169851D17835 /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = B9737D99B060F85A0A42A3A30335B14F /* scalar_4x64.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 946EE4F3900E73B0823B57F1AE8C47BD /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 80353B76ABA10ED9D59C18FDA6A16285 /* basic-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9786160112EBD1D91A7AB61E7E585A09 /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = 7DF576FC1DAC9EC11DA44099F4F50AFE /* secp256k1.c */; }; + 97962E30EE5B5298443D563B897E4308 /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = 358F7A798EA72C8BFA7C4AA5D7A22723 /* race.m */; }; + 97AF9F3B17A049614F158AFF9AA5C3FA /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = AEB5F00EFE918C35C091FD2FA7EACBF5 /* group.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 97D8F4B9B56316BD37A2EBCC5A2B7E51 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = 07CB743A805B99BE84DD49F8D999BF5C /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9850A4E789CCD838DE17E0E7A5DCCCCD /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 9411AC5861B33542BF71A1EED7E49FC4 /* scrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 987DCF48843E8B83BE9F0B5788175D53 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ABE33C91D6B128E8B104ED3630B6ABB /* CBC.swift */; }; + 99365E9205AEA46510A70B0092872710 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B36B7C3689A1ED9FBF4095AF74840 /* RandomBytesSequence.swift */; }; + 9970A7335034C125C75BF4CC2B9F3AC5 /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 282DD884F817856F0FD3D38F8A4447B1 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9A899EFE19622CA6723D08C0F8FBB187 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5116359962EA1905AC0EB7121E634D9F /* ResultProtocol.swift */; }; + 9BB2691E8EC04617309A1B905F5A652B /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 906199A857C08F740EA182609488E191 /* Rabbit.swift */; }; + 9DAE14B88EE655354CACE65717FA211E /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD14A2D2C9467CDF73E9EC39F2B97E62 /* Hashable.swift */; }; + 9E9ABC19900EB9A2F58E05DEDE4C9C6A /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0B1B247B08E4A2259D6D21ABAB0304 /* MD5.swift */; }; + 9EF0841FD75468EF3543A5C6A25A9398 /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671394A1108646E9E210CF54FA2C814C /* CTR.swift */; }; + 9F386CB50D39A65571DCFD394C23D8E2 /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 632F66F6756738B3DBCD9FE0F29FD51D /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9F7BA0F07BB50D1DE1036928BF70C2D3 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E67F7B0700CACBB7DFD27A88EFF75C2 /* PromiseKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9F975F5CF4816CD3A6CA2282F5F4E3F2 /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0D95EE88A2B8D781795DF20E0568F6 /* BlockMode.swift */; }; + 9FA8CF326DCA266C358B26FC42191498 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F25882CAD0730D8C76F023B8C6FA287C /* Blowfish+Foundation.swift */; }; + A1636315A5B3017312CFC781DF83901E /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8354A9A75879DFCE10CDFCD8B4B76EF5 /* AEAD.swift */; }; + A1ABA5F58D2757A7C96844AE893C12D1 /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = 423E241FA5BBF42BFDDA5E6C6AD2DEB9 /* scalar_8x32.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A1E8398E1FC2566D94EE4D94B48E909A /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 639957AA1B177687176168DC8D443490 /* BlockModeOptions.swift */; }; + A26E92B79121B74FDE94799BF2A92C91 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB4C3483E321FFBD045AB8FDC37CF8FA /* Array+Foundation.swift */; }; + A2913E511FD4FA1AAEB9256360C0AE51 /* PMKUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 614D3F652018D0D4BB869BAEEC3BFA5D /* PMKUIKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A2A378FB0E28CFD130DD02F25B9420EF /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D57256C33A9C97F888F53A4FB7226146 /* UInt32+Extension.swift */; }; + A373AD2926D810C1056D9FECF17DD66D /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8262D72960A17572931F11EC9520938 /* secp256k1.swift */; }; + A419E91722005FB59C7DC3BEA7AC0733 /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EFE8BF6504756C13783E7D477894264 /* PBKDF1.swift */; }; + A4F8D815D07249B30E393C63694BF3D7 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EA80C3235171417958F658E327CCF8E /* Codable.swift */; }; + A59CBD16B65C3C7ACC4C7D8945875F82 /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = 40ABB4750B401A88B273D3B180C1FEC9 /* fwd.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A65A2E325268ED551F8A5D89FB7E75FD /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D0947D47B9CECD59BC73EAC48D4ED27 /* HKDF.swift */; }; + A72461C8573DCDB8310FA557C3BA1DDA /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F6102F002EDC216C49666462EF952CA /* DigestType.swift */; }; + A829DDB57163254C51DF6C9896A1666E /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E81CDB6F58099035E4B22900B2E0740D /* Int+Extension.swift */; }; + A88812CCF543A4485A540AE2567B4B88 /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = 358F7A798EA72C8BFA7C4AA5D7A22723 /* race.m */; }; + A8995C0B368AF79026265F486D640985 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03FE099622DA426E4CBDFEB30B374591 /* Primitive Types.swift */; }; + A91379A538F389B10BAB2CE9D406BDCE /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F8B31678A829B043331C94E279F1FD9 /* CompactMap.swift */; }; + A9B8D34EAFEA874B2B3937B7F53B5D9B /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D903E031FC7FD31DA94E1EC68778019 /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A9F50ED8E406BC5AB5C9E327233D70A5 /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC7202C545EAC46F224EE9AB6B1F0F7 /* field.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A9FA53CE467640689F8095D7B4FC85E1 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = F1899C74540C37F7D84214CF9F8AD010 /* NSNotificationCenter+AnyPromise.m */; }; + AA08FA2EB9DB4E98494BFDDE5D4B4936 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1FC3BBD92A37B6D1B9844791FDD7F86 /* Bitwise Ops.swift */; }; + AA4AE37CE61DB029CDA7A78DF0E65A30 /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0B1B247B08E4A2259D6D21ABAB0304 /* MD5.swift */; }; + AA93CBB28A057A39E3A55586997114BD /* SwiftRLP-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 41F99637E28F2B9DC1A86CD6B490CE52 /* SwiftRLP-macOS-dummy.m */; }; + AB02DBB24DBB4F98005C0C14C342F8FF /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = F218E50D513522160983106C90B34FBE /* Prime Test.swift */; }; + AB80E1E9C65B4EA954F01811007ADE6D /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 310A618141B833B61214988468629C13 /* ecmult.h */; settings = {ATTRIBUTES = (Project, ); }; }; + AB9036DA4C5904627604A28671470C5A /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49FA7F82B54CC7168B96069F53D66A28 /* RLP.swift */; }; + AB9E1F4EDDB1BFD7F4359B0E1AEF9C78 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B35D82CEB3E05DB842B7FA66505116 /* Cipher.swift */; }; + AC755B14D97E2077CB8911758996D6CC /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 93A5B46AC7CC995589CAA3D991DC1B29 /* scratch_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + ADE49554E5BC26D0FC3CB250EC153F83 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE3D7030BC429403BBE50F40445229DE /* SecureBytes.swift */; }; + AEF51F69F68DDFB4BD984ACD87DA0517 /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E942712A2D0087AAF697A0E031459FE /* CMAC.swift */; }; + AFDA9E12CC7195153491C8CD1C0AAD8B /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78AC661E237EC28BD38872134D7F7E2B /* Integer Conversion.swift */; }; + AFEBE1E855779D74D26F05919F5001AA /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFD1168E711269E444E38FCAE0B8E5D9 /* UInt128.swift */; }; + AFF838D30AE798EA2B0FE11A1ED0729E /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EFE8BF6504756C13783E7D477894264 /* PBKDF1.swift */; }; + B075220C6A1ACDF3E6ECA9447125C827 /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D13D2441410EEFA35EFB1823E238648A /* Cryptor.swift */; }; + B0968028804FC340046D3FDD23551189 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D3FAB581FA1884038308CAAD092260 /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B0EFDD2E40787B3A3359CF16DF3815C3 /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 63C148A221559836C278AFFB2F0C6D3D /* num_gmp.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B1B07B21B7667DE9A83B36AC03BE6175 /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C9CD6920241610BE46DBB9D591849AD /* field_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B1CE9BDAFCAEDA7D99F7545490D1D518 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D292A1945503B3A000AC47BB73889903 /* String+Extension.swift */; }; + B39F6A07D19D7B5044E37E98E6C28320 /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F935D7D51C3BD0EEA31106E0BF9C3D13 /* Cimpl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B43A930051FDC74CE6667856407BD5CF /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89B539CEC7927EBE7BBF7262580A0E18 /* Exponentiation.swift */; }; + B495BF9BD41F0DA630E6BCEF9E48D707 /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E36C3B29C59A6C972DBF40C0EF93D5 /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B52E20B7BAF9DFF4ACF992979FAA904D /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B019A1B56440DDAB3267B96FDBD576 /* UInt8+Extension.swift */; }; + B640565E1593B250390597C2651078A4 /* BigInt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 234968A9A443A0E2CC4FBFBADB4CC6AB /* BigInt-macOS-dummy.m */; }; B6699C206D4772B76BEAF1722CB04572 /* Pods-web3swift-macOS_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 522015696E45158812DD4C5CF37CD544 /* Pods-web3swift-macOS_Tests-dummy.m */; }; - B6866CBCA4D62537DE060369ACB1B106 /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 2707FB70F6217313CE3FE9D9B5606CDB /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B69E3F26EF82B14F2BBFCC991285A2FD /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B00C58B6D526DBDFF8307C6DA1AFDF1 /* secp256k1.swift */; }; - B716300FB849152C5C4C3DC9C14C8E8D /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55FA26B75C99F4847087C9104EE38E8F /* Authenticator.swift */; }; - B77646BAD0129256BF653BDE0C25222B /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BF5A3B81AA637876B3E5AA4D5F124AA /* scalar_4x64.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B892841BE90F7FC437B124E45EFA91BC /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 89276AC70A47E00E5E08DB5C8D91C6C4 /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B9058EEEDD24D3D6D7F1F9014827C9CF /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0923A9FA118D244659624C1F0BD11796 /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B99E4D246BF638E9C0E6DB9216909970 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 937DFD5ACC6B392C3B22DD0605410F52 /* Process+Promise.swift */; }; - BA33E96D5FF50CFFA5727208AC91DF2B /* SipHash-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C59784B76CA65D06F275EBA259540AC /* SipHash-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BA4F48649886FB0011F6E7F3FBB8C2BB /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = C5648942F9F59CF9D06030DB7B64423A /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BAD670F268A8F2AB9BB2BD41BA18BEFA /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EA534EDF19829F1927C7991BF2EEC2F /* Padding.swift */; }; - BB18112CCFC26264B7C0E90AE3432518 /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = AF7AF6D769E4BBF1B2C201836A906130 /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BB71E3B83F7833D6D6D7FDEAEA0BD96B /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC85A555F579FA10EC96590296D9288 /* CipherModeWorker.swift */; }; - BC1D796F17348CDBE4C46583B92D14C0 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = BE6305D1DE9131CFB173AC969FDB1092 /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BC710D04EBD70B49A46F4B862BAAB0FF /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = F5740FDA157E822449AD928A2FC56532 /* SwiftRLP.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BDCD56C5B86F8512F7AB9AB6F5B15475 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C7D493F1212B046A7AAFC8351D67E4D /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BE0E1C30E47FC6E0A931819265DF6F30 /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = B7CB9A9AD1846703E487266D4F3BCCBB /* scalar_8x32.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BE2237E0E9E26533C1E860FD41CF5FB9 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79370D5C826074DD91DB303B75EACE7D /* Box.swift */; }; - BEDC52E4027F817E284B2DD842BFB332 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39B4575A57EFE3A0630FA12FAE346202 /* NSURLSession+Promise.swift */; }; - C003185B61E62CF4BD4690EDBD0719A3 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93E416B2CCEC4490652DE3889013CC4A /* Blowfish+Foundation.swift */; }; - C0101FD19738FB97383D1C0CF5EEBF77 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07BD7441D03BCED026093ADE867666D4 /* String Conversion.swift */; }; - C0819490E2F049CC22EF3585F49C3F3A /* SwiftRLP-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = BA5CA30AC50EF9F974BA8C9CA66250F4 /* SwiftRLP-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C0951D3A5CDA6E27EDC2A65A700C8D8D /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21CDB590E00AE3873562308E5110A4D8 /* Cryptors.swift */; }; - C0F8B164DDA6157937A300C207D56E4E /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = E684DB7BA3E633421079ECE297E5C154 /* Subtraction.swift */; }; - C19EF72107053AFDFBC57E47EB8050C9 /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BC6D7199E76698CC662BB48AE0E81 /* scrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C3054C3388C651BBCCC0D4D6D37F7584 /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = C33EA4F090C90D1AE636D3B40ECFA945 /* firstly.swift */; }; - C35DA33EC52454F06E06F298C92250B8 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = CEDD84C820765F4B8C5826D1B122200E /* hang.m */; }; - C484B1DBDD48E7821272E79EACF8B2B5 /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 2765A0C6E2BE64A4D0916D30633BEA7E /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C510E3B26A4F4876F89A59D5D2F22006 /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57D914B6D4F8590AF8E3BA6863DB778B /* Collection+Extension.swift */; }; - C51722B04CA405219A395C65558614F4 /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 89276AC70A47E00E5E08DB5C8D91C6C4 /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C5B7FB9E96E537586482FA629C14406F /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A5666EAA8ADD7A2AA3ED33C8DC6028 /* hash_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C66FC8C1B1997579D636D39C9BF09BD5 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D957F2AECF5A8A0E9C7CCE2A55B6C69 /* hang.swift */; }; - C6896E99AC63CF7E9506A6E8CA124CD5 /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D97871DE06423066D52CDBE28B74B3B /* PKCS5.swift */; }; - C70A86EC15752B0731CD015CEF45CAAF /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FACAD9F572878C98D14B56672DE004C /* PBKDF2.swift */; }; - C83FF7FC178BF33DD5052001F05A83BF /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61A90B8C29D973CF2BEE2A33224ACBEF /* Updatable.swift */; }; - C969C4CB640BF795B01F3648075A446D /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 551CAAEDDC5AAACAA24E8A5A86721E97 /* Bit.swift */; }; - CAB0A085900165D03D871E0ECA7CA215 /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 11F7F4CE35D426643C8DE5645FF76713 /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CAB604DC70B6DAD2C4FE1DED7CC67135 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D111E53D728978DA7C689AD4AFDCA963 /* Thenable.swift */; }; - CAF3800A1D4B45C61035F3A330991F20 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55FA26B75C99F4847087C9104EE38E8F /* Authenticator.swift */; }; - CBAB02308405D4C1CB4271EC4AB971F6 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FE4AFACA87A9BC9B7F46A7AAD878E33 /* Words and Bits.swift */; }; - CC44CC395434DAA9F2F7DA1D8E1C341A /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEC2C04096B2D2B92821B75319989EC8 /* StreamEncryptor.swift */; }; - CCCBD4698FC15086152F56B19ECA7A8D /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = C533250E0867F5CF90717B90B4450C63 /* PromiseKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CD1400BD40761FCBE46B17F6B8AA0AE9 /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 660B0734DFD6D8C99EE70FDF836AD891 /* HMAC+Foundation.swift */; }; - CD4F83E8BF753B40698A55CA22BB0CF1 /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E4AB7C0ABCF3AEC6B3979EC294536E /* AnyPromise.m */; }; - CD85BECD50309913F23174338AF0667C /* secp256k1_swift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D11A10393AAAF35194650B10A6ADE234 /* secp256k1_swift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CDAF5D27B2605E4DA359618DCDF5618B /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 44131C334B408CABBB3E84FE9BEDD5BE /* field_10x26.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CE2BCA099CEA37688059295108D416AD /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC03B1A635B5BB3ABD74980E5A3FFCF1 /* Random.swift */; }; - D1F0182968E66E044F80A9822BE772F0 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACBB5EB9CDB6065227935806FA94DC6B /* Hashable.swift */; }; - D29E48A6FDC719FD2FF024625C37CA22 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 699D800F72CE09977D6EE1687D706BD6 /* BlockCipher.swift */; }; - D2C9540655CD82F8A12305D2B953BD71 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 365AB600024749D54E0AD6D59FC28749 /* NoPadding.swift */; }; - D4124EDD949269E344DC2B3A307C708E /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = B184A67AF0236537BEE898D90E946942 /* secp256k1.c */; }; - D4C0E6966E5FED70544A97ACC237CF3A /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0439A7FDEC4F611C9334DEC15FA25F1B /* Digest.swift */; }; - D4FBEF46E2616F942B65FF779B374513 /* BigInt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CBD2032E8E6117EFD2C15AC9E728128 /* BigInt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D55038AE9BE8F3B75F916E492CC29A60 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BE4DB426382B15B10062329955F15CC /* scalar.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D57E19C3E86448FD0CA3B9742DB49497 /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEC2C04096B2D2B92821B75319989EC8 /* StreamEncryptor.swift */; }; - D5886DBA5DB05624B7B1DFFD6A99A87D /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = A3D2730C3BE7868E162AB4F297A3A7DE /* ecmult_const.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D5B55C94D365080FC8CBE5B01BEDA5CE /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = FF238B78A8B1951C382DC7D8C0DA9412 /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D64DA518A10935882F67A35F4EC1E0BD /* SwiftRLP-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 07A9C5839E7875E75F4AF91C0C630CB2 /* SwiftRLP-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D6BDAA0C8CA8843CE436AA3573C378F9 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91EFA6BFEDFE86C5744B8A08BD45CC1D /* Square Root.swift */; }; - D747179D4F9BC0D43E3C479EBA4B07D0 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E959F3AA4E4F1850C7F42B923C77DDB /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D7875CD7BA041CED180D37E0448C09A8 /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4434E5B7050EF71B04AEAE88F303455 /* Blowfish.swift */; }; - D7AA60A9860ED2E7DD7440AC9D799A04 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 365AB600024749D54E0AD6D59FC28749 /* NoPadding.swift */; }; - D81D753CE65D4B1E0F26F57606BD0F6C /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = 161C2D9657DC967FFAC2A37D48134D76 /* Bitwise Ops.swift */; }; - D8AEF9279CF6C8CD2D5F716BFAEAC80A /* UIViewPropertyAnimator+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08220EE2495D2C17B6366EFD53B51AC3 /* UIViewPropertyAnimator+Promise.swift */; }; - D94FB219CAD3190A91BCEADD16209ED7 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66D54E1981BA238733A8A5E65484B2B5 /* race.swift */; }; - D96D172BB1AA748152BA2F82BC6A6B2D /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D976FDA3B329F00236A2F1D4C6B378 /* when.swift */; }; - D9CA2110C1387E483376CF056337233E /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = CEF60C13887D74275029301DCC6A1149 /* scalar_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D9D190B6E0F591841C1B0AC1B8D0C34A /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 28668B0DE54AE4E51942A5F50596975C /* NSNotificationCenter+AnyPromise.m */; }; - DA1588018CD8315CFCBB2E0806B753E5 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE9FBA3C3EB5037CAB66A887E9BC6DE /* Array+Foundation.swift */; }; - DA1E098DCF3DEE1C5D699424486C1D64 /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9E4625A0B76DCA266EA9671890C8721 /* SHA3.swift */; }; - DAA014164E03E57A7D043C270B6C9B84 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83BD9FC5270AA1FFFF0B01504C9B8BB7 /* PKCS7.swift */; }; - DD7EF0CDE3C0223DD3933632CDB2AB01 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7530E3D35773A67134FC4EA93063F01 /* Utils+Foundation.swift */; }; - DDBF456D98778034F94E7A216E782CBB /* scrypt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3992689C4E8FC6AE9958D04582793809 /* scrypt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DE187779397F69A993589FE1F1590714 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61F02670BA786ECE5640E0C70EA68888 /* Result.swift */; }; - DE78C90A1789CD75B4B69224EE1C20E1 /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1BC5C341B16D41330279E713831347D9 /* scratch_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DE86F4DBFBAE2D9EADB44907B3B7FC1D /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9E4625A0B76DCA266EA9671890C8721 /* SHA3.swift */; }; - DED6A3731F280B7A5C4BA0088245421D /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C6A6AAF1849184B1A8916E223E9BCB /* String+FoundationExtension.swift */; }; - DF3B173C9C0BFFBAF20FE89888175135 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6246D2591B9DFE5339771AC0AF2EA3CA /* CustomStringConvertible.swift */; }; - DF3C881F6AA58663EA27A37DDC93CBD1 /* SipHash-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 099CBD52589F67F91C4263550552B849 /* SipHash-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E15BFF7A7883A5BFB699464499718E52 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D016DA64236C44F87FFCE97A6F0A0E06 /* BlockEncryptor.swift */; }; - E1BD1671D6E0A0FDAC9298373486DA9F /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91EFA6BFEDFE86C5744B8A08BD45CC1D /* Square Root.swift */; }; - E254A91C69969B33ED1BF9BDE5B19AED /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE57BC224E219C65382BB751CCED649D /* Data Conversion.swift */; }; - E350B1B350751D65ED5A630756C5DDAF /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA5803AF780ED8A2ABA135BAA03479 /* ECB.swift */; }; - E38ACED69C24647A7A07B2B72C7580BD /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC3E9B80B8AC54146B2DFEDA0142CAF /* BlockDecryptor.swift */; }; - E4FB02298751B056940AB39261020DAB /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D4AFA48362F6E5DF72006F39A5F32A5 /* CTR.swift */; }; - E592964873DBC39C36DCEDFC2270519A /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 970421396A3184DB620CB61E8AE71F58 /* num_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E6950B7C92641175616A7FE09FA2574F /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED58AECF3C5444FBDEB7453CDD6D6A96 /* Checksum.swift */; }; - E70A831423370AD1CF91BAC1373D3527 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6246D2591B9DFE5339771AC0AF2EA3CA /* CustomStringConvertible.swift */; }; - E85B97EE8946089E5E8ED93B60847B7A /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 970421396A3184DB620CB61E8AE71F58 /* num_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E96D904E355EFA92932B4B71E59472E4 /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDD6DAB9ACD231BAA0226331BDE67975 /* BlockMode.swift */; }; - EB52C8F7723FCC94649C4768B67E2E3A /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = A90907EC55F455C898F8D8E35C2908DC /* SHA1.swift */; }; - EB9345AB32E8C1BCE5C88C239CFAF2B9 /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CF0657C69B458EBD464B4F7EF2A1758 /* AEAD.swift */; }; - EBC1181767AADF30189982641F9B9648 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = F31913059D849B57CB91C3B18F4D92EB /* Prime Test.swift */; }; - EBD3735323AB89C906B5E1C536976080 /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC3E9B80B8AC54146B2DFEDA0142CAF /* BlockDecryptor.swift */; }; - EDEB77EE161E91BE126DB5BECD0D2F88 /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = A130AE149844CDF96BEAFC7381997641 /* AES.Cryptors.swift */; }; - EE3D4BE0F36CB8F41C228439719EEAC4 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4211F7070401959F35EE92C5214007C /* NSObject+Promise.swift */; }; - EE9FCCABEB83682D166392D1C12D2BF3 /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = B7CB9A9AD1846703E487266D4F3BCCBB /* scalar_8x32.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EF2912DE621D3B57FB6A277CBF39B316 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E27EDB736A99A27C20F82D22DC4A707 /* GCM.swift */; }; - EF56A1A9A97666C4D03AA9AAF5A37918 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 705526D46CF8710526DEFD6A81185AFA /* Strideable.swift */; }; - EF7CEA7D43C041C92F385757253FB874 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = E9584FC30610F2691B4EB045534020D8 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EFDC04F64EB4766D33AC8058E12B4561 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 167A6E691DFD15BA9883036B14F41D03 /* GCD.swift */; }; - F0C24231ACA39257DFE5A318ACC8A896 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C97CDE8E28215118A8265A78EF509D0 /* num.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F185E763BAC53270CAE635AB9CBADB37 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A19805DB694C14E29F255EA2BB4603A5 /* ecmult_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F1DD83612B8154D1465CF398FCFA9596 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 627C056A389B2501608E18EFAD762A6B /* CCM.swift */; }; - F2242C49CF793215836DA2FE29E8C1E1 /* Pods-web3swift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F688145BCFE1FB8B76299CC261A05E /* Pods-web3swift-iOS-dummy.m */; }; - F226D03CEEB4CA12BF0D0F974840420A /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = B276DAA5AD0B968F80A0769180CCC012 /* scalar_low.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F2CEA0F86BECA15D8730D3D53D9EAF69 /* SipHash-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F04918D981D6BA6B8E1B45E4C1D23089 /* SipHash-iOS-dummy.m */; }; - F31F62CD0FEA355203A5C5750FC421F7 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C64B4995F9A0EBB5D4B5F27B33FB054 /* NSTask+AnyPromise.m */; }; - F390BEDEFDEF3DDC2172C32543EDE40B /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = EA7E3E2AA7DDB383A58F583E451F6C05 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F3A6143F497A16DA1DE0AAC5CD02AA57 /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = C535818543FB132F5085E5ED501095D0 /* Guarantee.swift */; }; - F48FDD8548C612FB765A5F4D3F2AAEB2 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CDA4C5CCCD8DD001D5D629E860B631 /* PCBC.swift */; }; - F6C04F880164DA1647FDF6654CD65CBE /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9727D8BDEB33BD75AB806BC0A3EC155C /* Codable.swift */; }; - F6D5E2F0DFF915694A71C76154312B42 /* PMKUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 002BCC8DEC6CF0087CDD9F17D1CB63D8 /* PMKUIKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F6EEBE907D9BF3B0332ED86D67236441 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 851772A4A36B2700215C3B972F05BB10 /* BigInt.swift */; }; - F854EACBF11549213B26B4748FBB94A0 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = E684DB7BA3E633421079ECE297E5C154 /* Subtraction.swift */; }; - F95445AB786CF29CEA99E52C88BFE706 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897BD312EFC7F005946FCA64E8B5D3F3 /* AES.swift */; }; - F98604F0CA9C69371A5FE5D65C6E5466 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = AE738DB7791144612A4D0951B0C43A7E /* UIView+AnyPromise.m */; }; - F9A83224C63AF5F18AED311461D71668 /* BigInt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B89A9869F658850405B3C9B8EEB11C88 /* BigInt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FA45DFC8C8AE3AE576A6C13862338138 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 74E396D4A3CBCFA52283FA71BFE1ED4C /* hash.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FA47C2FD4BE0AEE4BBB8F078CEDED890 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEB151B14FA1CAF4FB16D76AE7F505AC /* Cipher.swift */; }; - FAD5FD40317211B25BC1F3BAEBFEE6BA /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DC64F1DE162445FC5F9F8F1A2C818B1 /* NoError.swift */; }; - FAEE1A63513F87D185820EEEF7DB9506 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = CEDD84C820765F4B8C5826D1B122200E /* hang.m */; }; - FCD2D464E35870B3F06993770117959D /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05760D356B4317540E7373046A1A3CD6 /* Salsa.swift */; }; - FD6E4E6D2515323B98F8499CAF7D8486 /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = C504B703D6897FF1896886916748D0D6 /* ZeroPadding.swift */; }; - FE141380D52E6EA72571C40A8DB494D0 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 02EAAF0A84187F4281AB39EBD7DA1B34 /* after.m */; }; - FED5D5AE6604A69C4648F5EF206C250B /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = F5740FDA157E822449AD928A2FC56532 /* SwiftRLP.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FF200FE02402662078B4D0C3C7AF4CEE /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3ADB1AB7700B235D79CA3AEB2E8540 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FF74BC55A69429C29500972AF8A9DABB /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 955AD7671107B2FCAF7A725E38DA6513 /* RLP.swift */; }; - FF83256DE909E2F86AEBBF4E51F42EF0 /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57D914B6D4F8590AF8E3BA6863DB778B /* Collection+Extension.swift */; }; - FFD1323B3E415476F73D432694CC4D35 /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6D16C3019A7CC7FFDD41C97E69DCB84 /* Rabbit.swift */; }; + B6E2A49CAA2332035A4163610834553C /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = F5AA52D2E5DC0134CBA0CB3219327A53 /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B716300FB849152C5C4C3DC9C14C8E8D /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736C0CC7DF9261F7C240BF88F7D310AD /* Authenticator.swift */; }; + B725B5E58DF7010A5CED552276526B66 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43941A9CA2F209289C333306CBC5961F /* Process+Promise.swift */; }; + B8B0732D6BD64650E99A7C362E617FA8 /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03321ECEB201CDE70DA4F88EE48E2044 /* Salsa.swift */; }; + BA33E96D5FF50CFFA5727208AC91DF2B /* SipHash-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E85EB665265A065E5D96BCE2B87008D /* SipHash-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BAD670F268A8F2AB9BB2BD41BA18BEFA /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23EA6F524218763DB7E76A6E13387EAC /* Padding.swift */; }; + BB71E3B83F7833D6D6D7FDEAEA0BD96B /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D98916544A0C622EDB88411AE57 /* CipherModeWorker.swift */; }; + BB8929C86AEF5AE8E8A10D8061185D47 /* EthereumAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 48BBE301C7AC93BA32B43FDCAB55FF55 /* EthereumAddress.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BBA677442B33921B63BE5CD78F273813 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DE92E2A606B96369F79D742DFACB7C9 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BD0E70C62B7FC0BF874D98D6C855FE1D /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 8787D00BE428B5C383E25BF2ABB38CC4 /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BD755CD92BD7C02AF8A0A289DC9E8446 /* secp256k1_swift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F9D80D5C595654C7E23670359CB76D99 /* secp256k1_swift-iOS-dummy.m */; }; + BF65BC24F142604C88A03D61E2C91A0D /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5540F42E4F8BF99A1C7F95349EA8707D /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C003185B61E62CF4BD4690EDBD0719A3 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F25882CAD0730D8C76F023B8C6FA287C /* Blowfish+Foundation.swift */; }; + C0101FD19738FB97383D1C0CF5EEBF77 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682CE9677672C1F944AA2896D3BD36FF /* String Conversion.swift */; }; + C0951D3A5CDA6E27EDC2A65A700C8D8D /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3391B8242DCA2A16EB9DBB3FF0740ABC /* Cryptors.swift */; }; + C0DD16176212D3F5222CE6886B2A660B /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E75AF68728F33A9AC112BE223CA6718 /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C0F8B164DDA6157937A300C207D56E4E /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DFE72A11A0AF97FFCEBDF19EC395F74 /* Subtraction.swift */; }; + C1276BB9865BF0BA0D8F4229A5202D3A /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = 08390C702E93A122CAC37BDF6A07A98C /* scalar_low.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C35AFE3E2575CF308C100F43FC2B60CB /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = E022DA9B1DCAC9A88B18D90457826545 /* after.swift */; }; + C462144190FE4E9F45F82292FF1A629A /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E8DAE988F4403CE8B047E936F2B4AE1 /* secp256k1.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C462A569CC9699DC1C14CB401D63CF5E /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = D7009940ED0BFC1AA385433559754C27 /* join.m */; }; + C510E3B26A4F4876F89A59D5D2F22006 /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C717226571D60D3C7D8E15B4EDCC2E0F /* Collection+Extension.swift */; }; + C56FB1B1104E7EEA26631D9EA9A9D9DD /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7388674CDE22815644490821F0CB757B /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C6896E99AC63CF7E9506A6E8CA124CD5 /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98A9FC519C49C693637C4BC5D0DD6EB7 /* PKCS5.swift */; }; + C6C9C202FFBD58F21443C1F5CEDFB291 /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = D9A9A6187028CC6AD623334BA2899FDE /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C70A86EC15752B0731CD015CEF45CAAF /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9F882189D9E2CE8D7B7DC60BA0D5AF6 /* PBKDF2.swift */; }; + C804D008E78513D7097A478AE1BDE395 /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 531B65B7CD936ABCBE9D4C182A88CDF0 /* field_10x26.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C83FF7FC178BF33DD5052001F05A83BF /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CC384B5F6C90CB968D0AB32162249B6 /* Updatable.swift */; }; + C880E86722BF8C8B420186E5FCAA564D /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 531B65B7CD936ABCBE9D4C182A88CDF0 /* field_10x26.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C8C18B3FE4D4FD1B2D0467F31FA6D113 /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F02A89B4F4807025E1CB0C26D63CD65 /* SwiftRLP.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C934E91003F09F0E5C50BD3FAA858A6A /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED4A3438C4739D717703BAE1F7020595 /* Deprecations.swift */; }; + C969C4CB640BF795B01F3648075A446D /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86800F1D45016DC59C9BE8B9ABF5B50F /* Bit.swift */; }; + CA0DC69F0F366577F4021A1FB04730B2 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEA9421290E9294FEA25D9F6D3DDD24C /* Error.swift */; }; + CAF3800A1D4B45C61035F3A330991F20 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736C0CC7DF9261F7C240BF88F7D310AD /* Authenticator.swift */; }; + CB57B994F6A2E96E2508F7845D1F97C3 /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = BA200D6941B69ACC080DFB132BEFF422 /* num_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + CBAB02308405D4C1CB4271EC4AB971F6 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73043D2C83B1F1E5EC8F0E15C2CFE5A5 /* Words and Bits.swift */; }; + CBD35C9BC44BFC266C2B4E310F1EB6F9 /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25E9E042655265AEB9322FB01DD7A702 /* Resolver.swift */; }; + CC44CC395434DAA9F2F7DA1D8E1C341A /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7340338CDF774E91E0F647AB7EB91924 /* StreamEncryptor.swift */; }; + CD1400BD40761FCBE46B17F6B8AA0AE9 /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF8AF8868130C525C8921A94220CFA6D /* HMAC+Foundation.swift */; }; + CD433301876DFD79558B30167DD81DED /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7739AC49E92EA0677899D077C015CE05 /* NSURLSession+Promise.swift */; }; + CE2BCA099CEA37688059295108D416AD /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9787E8C8BA8DAE16D659DA569EECED22 /* Random.swift */; }; + CF67AD864C4CE27EECF87985CF9B287E /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = B9737D99B060F85A0A42A3A30335B14F /* scalar_4x64.h */; settings = {ATTRIBUTES = (Project, ); }; }; + CFCAF13F717E0088FD8C51EE4460EBBE /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 860EF39282D8941084557A3DCC1D7DF3 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D04010B8C8B3844F185CA1437FFF5118 /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = E65308F679CCAADBBF14F5DB4971CD21 /* Cimpl.c */; }; + D1F0182968E66E044F80A9822BE772F0 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD14A2D2C9467CDF73E9EC39F2B97E62 /* Hashable.swift */; }; + D1F87BF791595C2F5B4A86F445081ED5 /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41FAB135DE09D3F9136D834CBE3A558A /* Scrypt.swift */; }; + D29E48A6FDC719FD2FF024625C37CA22 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFCBEFE9DA6D7F361DBB180EB84492D2 /* BlockCipher.swift */; }; + D2C9540655CD82F8A12305D2B953BD71 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 915D7A030D48CB0FE8360421BAB29B5B /* NoPadding.swift */; }; + D33063EEBD209F32520B754AD30B31A8 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01271B2BB62FE2D72466A630AC9D1BE8 /* Configuration.swift */; }; + D38BBC7C8903B9EB7803ECA68167DE20 /* EthereumAddress-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 23299E01AF2849576AF87D2A3EB8D494 /* EthereumAddress-iOS-dummy.m */; }; + D4043F69152803AF7B450C9062CFC688 /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 9411AC5861B33542BF71A1EED7E49FC4 /* scrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D44A10DC0AFCD862345B9A0F97E95ED2 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = 944A08F05724AD8D1EC4F7FF0D09BFE6 /* scalar.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D4C0E6966E5FED70544A97ACC237CF3A /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ED58E829B835009D9DCD1D8B959FBBD /* Digest.swift */; }; + D4F42FD2DC81233AD6F6C96B6D8C8D38 /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 80353B76ABA10ED9D59C18FDA6A16285 /* basic-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D4FBEF46E2616F942B65FF779B374513 /* BigInt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B2300EAF13A4BCCC04BBD2896E58716D /* BigInt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D575885715CF6B41AEA644EAE2513FE8 /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 635C328C2CAB4B34DEF69D8CFABA3AC1 /* AnyPromise.m */; }; + D57E19C3E86448FD0CA3B9742DB49497 /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7340338CDF774E91E0F647AB7EB91924 /* StreamEncryptor.swift */; }; + D5C95DA680B56760C10228B520F7499D /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E67F7B0700CACBB7DFD27A88EFF75C2 /* PromiseKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D655D7A0F64343C818BC21A985DA8C5C /* scrypt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F84F141F7B6CD4974D2BDD888FE19496 /* scrypt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D6B5F7FA348E6697E489142154B85107 /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE63C0E40FA294F6C512967711E56D9 /* AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D6BDAA0C8CA8843CE436AA3573C378F9 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 491E82F8B7D6BC0F752EEA10F629435A /* Square Root.swift */; }; + D6BEC5D8B88A2BF435ADEDDA2505900A /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E90C5426B3E9CBBCF9A8B6731836D354 /* UIView+Promise.swift */; }; + D7875CD7BA041CED180D37E0448C09A8 /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAC966A4293FF7689DD8A3B2877731F3 /* Blowfish.swift */; }; + D78C9EA6787B721D75665039BD726BF9 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 982B03AB9D403479BF865D7C3A5B2D4F /* Thenable.swift */; }; + D79B4B114921134D9311CA5A71062C10 /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E5F93B0E61748A9D9906D3305A41EA8 /* ecmult_const.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D7AA60A9860ED2E7DD7440AC9D799A04 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 915D7A030D48CB0FE8360421BAB29B5B /* NoPadding.swift */; }; + D81D753CE65D4B1E0F26F57606BD0F6C /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1FC3BBD92A37B6D1B9844791FDD7F86 /* Bitwise Ops.swift */; }; + D937FEA1E574089DEF1B2FF475B3F2B7 /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF94FCFAAA2F4216A2F89F43E2CDA4DA /* Catchable.swift */; }; + DA1588018CD8315CFCBB2E0806B753E5 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB4C3483E321FFBD045AB8FDC37CF8FA /* Array+Foundation.swift */; }; + DA1E098DCF3DEE1C5D699424486C1D64 /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BAF829379DA2971A7051C2EFAE15E8 /* SHA3.swift */; }; + DA74E106DB2F609C8C444565678896BB /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E36C3B29C59A6C972DBF40C0EF93D5 /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DAA014164E03E57A7D043C270B6C9B84 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8AF5512E4598482BBFB4AD1BBF8064 /* PKCS7.swift */; }; + DB8210FAA307129469E336205657F092 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = 0554DC016A3872F60738FE5C366CAF31 /* ecmult_gen.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DBB230040D2BE00D2D5726E70957B1BE /* EthereumAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CB204BDB01A5747B116731490529E2B /* EthereumAddress.swift */; }; + DC3FC4BC15FF43709E43B8FAA2B6FD3B /* PromiseKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 52059A76F9DA89149396ABB84A8A5780 /* PromiseKit-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DD7964B2315BCC4C1FEF9A2300164025 /* SwiftRLP-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5447D2654ABD868EB73A2BF12AD74DE8 /* SwiftRLP-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DD79FE3BB4C3C7D3A923E6CC1B66064A /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49FA7F82B54CC7168B96069F53D66A28 /* RLP.swift */; }; + DD7EF0CDE3C0223DD3933632CDB2AB01 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EFDF78EEBE9836CDC5AE2FEEC50C17B /* Utils+Foundation.swift */; }; + DE31538BAB4D0DB5B8063517B853894F /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = E7E7786C2EC1054AF047E2571B12205F /* util.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DE86F4DBFBAE2D9EADB44907B3B7FC1D /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BAF829379DA2971A7051C2EFAE15E8 /* SHA3.swift */; }; + DED6A3731F280B7A5C4BA0088245421D /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA3D1883E9BD064F4B9299B5825061E7 /* String+FoundationExtension.swift */; }; + DF3C881F6AA58663EA27A37DDC93CBD1 /* SipHash-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7692AAEAD8E8FFF8D2E46B60CBA56CDA /* SipHash-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DF4ECF7A425192C1C45C4AB1E9BAE553 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EA0E0A67D5738512E4618E1AEDA5E3E /* CustomStringConvertible.swift */; }; + E15BFF7A7883A5BFB699464499718E52 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC4C922D64767063B8D1A270D793373B /* BlockEncryptor.swift */; }; + E1B91043188FBFD92BA078E1EF2912E0 /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E8DAE988F4403CE8B047E936F2B4AE1 /* secp256k1.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E1BD1671D6E0A0FDAC9298373486DA9F /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 491E82F8B7D6BC0F752EEA10F629435A /* Square Root.swift */; }; + E254A91C69969B33ED1BF9BDE5B19AED /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755E0B91B0984ADEF77E48E32C147276 /* Data Conversion.swift */; }; + E254CF34D5F821DC8EAA61755F39ECF3 /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5595E1873CFBC6061E8C6D86BFF12807 /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E262F38BE8D55B54CB886EAC66214BFD /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = CA97BDA6DF1DE11A96470DBF6FBD7C62 /* lax_der_parsing.c */; }; + E26B96712A33AB8CE72BA17C152736E8 /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D1D500C8CF88FC87FF7FA43DBC53611 /* AnyError.swift */; }; + E2F52C65710FEE56EBABD1C599E031E2 /* scrypt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 51FC3239F6613D1D7AE1AAD0F3204A0F /* scrypt-macOS-dummy.m */; }; + E350B1B350751D65ED5A630756C5DDAF /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98C48C6F1DCE55E9EE6040D50626EF16 /* ECB.swift */; }; + E38ACED69C24647A7A07B2B72C7580BD /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D2BE96DBE00949D2B047DC83A759B4C /* BlockDecryptor.swift */; }; + E4831746A0E266E025EE80BCA4EF3BFD /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1576E0C86B6BE13F5FB685E1357E71C3 /* Result.swift */; }; + E4FB02298751B056940AB39261020DAB /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671394A1108646E9E210CF54FA2C814C /* CTR.swift */; }; + E6950B7C92641175616A7FE09FA2574F /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC86A3FC56A1BAE1CA3490D081E47F3 /* Checksum.swift */; }; + E75EA18FC026B0FE0E943667D597D909 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A69383BF153D7728F4793AB68C3C4 /* hang.swift */; }; + E7A8CA29F94135EBCA9E6187C222A42A /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B152212D05CB08C4E0B61D8CDFF12C9 /* Guarantee.swift */; }; + E85D4BCF4C4214A3340D014F0CB27440 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7695A9A41BFEEAD40C0235B913A07672 /* AnyPromise.swift */; }; + E96D904E355EFA92932B4B71E59472E4 /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0D95EE88A2B8D781795DF20E0568F6 /* BlockMode.swift */; }; + EB0DEA3194A067ADEF216B5AEB36E957 /* Pods-web3swift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F688145BCFE1FB8B76299CC261A05E /* Pods-web3swift-iOS-dummy.m */; }; + EB52C8F7723FCC94649C4768B67E2E3A /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC0DBFB306B96AAE65A02CB825C4F0B /* SHA1.swift */; }; + EB5F9E86F880F7DADBC989EAE79A9162 /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7388674CDE22815644490821F0CB757B /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EB61FACF6827E43E518AF99AFE8ADD09 /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF08003360A2A59E3E059CBC5496E71 /* ecdsa.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EB9345AB32E8C1BCE5C88C239CFAF2B9 /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8354A9A75879DFCE10CDFCD8B4B76EF5 /* AEAD.swift */; }; + EBC1181767AADF30189982641F9B9648 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = F218E50D513522160983106C90B34FBE /* Prime Test.swift */; }; + EBD3735323AB89C906B5E1C536976080 /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D2BE96DBE00949D2B047DC83A759B4C /* BlockDecryptor.swift */; }; + EC9F551C20254A1AEC7679ED83D28713 /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F935D7D51C3BD0EEA31106E0BF9C3D13 /* Cimpl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + ECA8F009F06F08BDB92C351F47995210 /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = EE8A73B5FBE9F82E34238AC840FC7331 /* eckey.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EDEB77EE161E91BE126DB5BECD0D2F88 /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1BDC161E1A001A666E01A22455E14B5 /* AES.Cryptors.swift */; }; + EEB835EB989FDE954E0253B6BED77F43 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 5297103B37D2E5083D67ABE2C60CA382 /* after.m */; }; + EEBBD653ACE1E18F44D391EC926D1EF9 /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = 7DF576FC1DAC9EC11DA44099F4F50AFE /* secp256k1.c */; }; + EF2912DE621D3B57FB6A277CBF39B316 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95F76B715633F358CA7525D8C17738C9 /* GCM.swift */; }; + EF2D6E9667E3DC5852A6F092A4BAC763 /* PromiseKit.root-CorePromise-Foundation-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1C0BFC1A022B5AD3BDFC8920FCFD74 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EF56A1A9A97666C4D03AA9AAF5A37918 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F32BA5AE4C0BE79090A24F00A3F35AFF /* Strideable.swift */; }; + EFDC04F64EB4766D33AC8058E12B4561 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB4E43C9EB1F78AD84B2314039898608 /* GCD.swift */; }; + F1566684B5EC4250C3F2D3F422CFD689 /* EthereumAddress-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A734506E75FE208AFB8DA726262FFEC /* EthereumAddress-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F16E441BDD1CCA79E64DCDA49CA4CC50 /* Result-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 67F6E91C8B57C5F8E945603C7F3DB0F2 /* Result-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F1DD83612B8154D1465CF398FCFA9596 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14176496814CB0D56F198301D279FE65 /* CCM.swift */; }; + F2CEA0F86BECA15D8730D3D53D9EAF69 /* SipHash-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C57F4AE68BD0AD2EE5867A1CA2A12FCC /* SipHash-iOS-dummy.m */; }; + F48FDD8548C612FB765A5F4D3F2AAEB2 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C47CE1FE3AEC19CC322E3E03530D21CD /* PCBC.swift */; }; + F4F971E86909084B5DE98EB247D30EAF /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 86B004B7F6AC62E27D75D02978601A76 /* NSTask+AnyPromise.m */; }; + F59F8D1792721D4062D9597FF2370D53 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840434A830881CF07FBDE172A20CDDDC /* NSObject+Promise.swift */; }; + F6C04F880164DA1647FDF6654CD65CBE /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EA80C3235171417958F658E327CCF8E /* Codable.swift */; }; + F6E2A19F261D93BB5E130674AEF90198 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74111ED4B5372D2EE9A218621A18699C /* afterlife.swift */; }; + F6EEBE907D9BF3B0332ED86D67236441 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AF5980AB239F34C8CB958F30A518A0B /* BigInt.swift */; }; + F7A2DF1C44544C5300298F18DF2CB870 /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 9821B82F2A2D9E9E0A740B6B4B38A6AB /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F854EACBF11549213B26B4748FBB94A0 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DFE72A11A0AF97FFCEBDF19EC395F74 /* Subtraction.swift */; }; + F8DD96EC7610D4FCB6C8045D400E5701 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 17856FB7A41BDDB75285F531B03882F4 /* PMKFoundation.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F9451AAFCEDF04CB35C64C98192AC819 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D6CFCC98052B542B8BD8050E0204993 /* Box.swift */; }; + F95445AB786CF29CEA99E52C88BFE706 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77FB79008E5E4C52EE48B984D12A652E /* AES.swift */; }; + F9A83224C63AF5F18AED311461D71668 /* BigInt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B90CC3B80037E1B917D44513A07D0F6C /* BigInt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F9D3A99DCE33C06801BDC5EBADEDFDA9 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C3F64F8D233B557ADBCBAB5F8D81F1E /* dispatch_promise.m */; }; + FA47C2FD4BE0AEE4BBB8F078CEDED890 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B35D82CEB3E05DB842B7FA66505116 /* Cipher.swift */; }; + FB9507F4BB8DEF640A6E3C3BE2A4E619 /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 678FC45FCDC1237D6344CFADDB22F228 /* eckey_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FD6E4E6D2515323B98F8499CAF7D8486 /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31ABCFEE7AE67562C4CEBB66C7ED4D6 /* ZeroPadding.swift */; }; + FE95B067321486A5998C5DD4DF31862A /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E5F93B0E61748A9D9906D3305A41EA8 /* ecmult_const.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FF83256DE909E2F86AEBBF4E51F42EF0 /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C717226571D60D3C7D8E15B4EDCC2E0F /* Collection+Extension.swift */; }; + FFA521581788213B12468D8AA8D2ADBB /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F02A89B4F4807025E1CB0C26D63CD65 /* SwiftRLP.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FFD1323B3E415476F73D432694CC4D35 /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 906199A857C08F740EA182609488E191 /* Rabbit.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 19D7329A8315B85B58C8441C1899A592 /* PBXContainerItemProxy */ = { + 13C00F95FF864E5C7AAC5B0A5CB8498F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; - remoteInfo = "CryptoSwift-macOS"; + remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; + remoteInfo = "CryptoSwift-iOS"; }; - 1E0A3209CEDE9B1B33C44AC5926A66C5 /* PBXContainerItemProxy */ = { + 1D311CE48C7A73E73FD12595C75A78C9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = AF9F48E6961507C0E2FD7A3CDBC652DA; - remoteInfo = "BigInt-iOS"; + remoteGlobalIDString = C87C2E6C438181FF7B92161BFC2DFBEB; + remoteInfo = "Result-macOS"; }; 1E5017C3A1512E67B0318DD1DACDE515 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = F884BDAA9A34F06758B9377C5C3DE88F; + remoteGlobalIDString = 82C35D316B5E8115E43ACCFE4E50137C; remoteInfo = "Pods-web3swift-macOS"; }; - 1F3EEADE6537E330C7A04D4BC33EB5C7 /* PBXContainerItemProxy */ = { + 284C9AFC38A225A506CB24973AEFB321 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 9646F4C6B5DB5298F5EEE5871120A244; - remoteInfo = "BigInt-macOS"; + remoteGlobalIDString = 4FCBE56BC5E931FDC43C642250037C1F; + remoteInfo = "SipHash-macOS"; }; - 284C9AFC38A225A506CB24973AEFB321 /* PBXContainerItemProxy */ = { + 2A170694DEDAF59456D7141DB9F7FACC /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 4FCBE56BC5E931FDC43C642250037C1F; - remoteInfo = "SipHash-macOS"; + remoteGlobalIDString = 1168313AEC7524AEDFC1224C6D3C6E44; + remoteInfo = "EthereumAddress-iOS"; }; - 2B3213357F1CA1AD9298A10F444D0951 /* PBXContainerItemProxy */ = { + 366CCE30759EB3C0FF8E45BE9572B007 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 498B5059F6777D5158A7EE62045BD64E; - remoteInfo = "secp256k1_swift-macOS"; + remoteGlobalIDString = BAA7945626BCC2CCA0CD2C7A0AC13E79; + remoteInfo = "Pods-web3swift-iOS"; }; - 35923DBC7D43F34B3882ED3F64D560CA /* PBXContainerItemProxy */ = { + 38BDFC13BA428BD451594A459B74A302 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 9646F4C6B5DB5298F5EEE5871120A244; - remoteInfo = "BigInt-macOS"; + remoteGlobalIDString = 12455571B54E567146873FF705359CFE; + remoteInfo = "Result-iOS"; }; - 366CCE30759EB3C0FF8E45BE9572B007 /* PBXContainerItemProxy */ = { + 78E3F5567AAF195D28B5DA37D51C8623 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 2892912E4AE0D2C848DA80F38A3430EF; - remoteInfo = "Pods-web3swift-iOS"; + remoteGlobalIDString = 94906F0C68B58FB4B40554812C3BBFD8; + remoteInfo = PromiseKit; }; - 51A46AB20A7BD61878D970BEEA7A6BD1 /* PBXContainerItemProxy */ = { + 8022E9AB3C92BAD10B2AEFCE42C6EDA5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = AF9F48E6961507C0E2FD7A3CDBC652DA; - remoteInfo = "BigInt-iOS"; + remoteGlobalIDString = 7BF3C926294C92422AFB78600D576975; + remoteInfo = "scrypt-macOS"; }; - 5571BEC206C1D03111C6EF3E6C7CED63 /* PBXContainerItemProxy */ = { + 819958A4438F4712BB2395ECD30B2C4D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = DA0577AD76B443C71930FAC764E972C5; - remoteInfo = "SwiftRLP-iOS"; + remoteGlobalIDString = 73527F6F8B0A792EA5FD7085DADC6B93; + remoteInfo = "SwiftRLP-macOS"; }; - 67FA85B98174E1654BF1E1ECAC76CB7F /* PBXContainerItemProxy */ = { + 881B896164342E47B02F93B29ADA3355 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = F2C23507954E7580FFDC3A161C6AB0E4; - remoteInfo = "Result-macOS"; + remoteGlobalIDString = 4FCBE56BC5E931FDC43C642250037C1F; + remoteInfo = "SipHash-macOS"; }; - 71982CBFBFF1DE0F242D9C483783D66C /* PBXContainerItemProxy */ = { + 97F0040393FC590BA7564498436EC95D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 630AEE08CD31743EE32F246198F2C879; - remoteInfo = PromiseKit; + remoteGlobalIDString = 1F803FF778771424C8085D9971D3840F; + remoteInfo = "SwiftRLP-iOS"; }; - 8043A6EE1F8EBE657783820C64B4ECF0 /* PBXContainerItemProxy */ = { + 995B8D8F764EF523079B88A06313F11D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = FE616C0F8645852E1A582197DFC35CD4; - remoteInfo = "SwiftRLP-macOS"; + remoteGlobalIDString = 9646F4C6B5DB5298F5EEE5871120A244; + remoteInfo = "BigInt-macOS"; }; - 81302A5702FAB5179E00059495C674D0 /* PBXContainerItemProxy */ = { + AC378E3E20AF5D424B6D68F67641CFC3 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; - remoteInfo = "CryptoSwift-macOS"; + remoteGlobalIDString = 3B79F6DB09B597AAE9D3EB939DA463D8; + remoteInfo = "SipHash-iOS"; }; - 830B40C3043F87BD797252E75F83EC21 /* PBXContainerItemProxy */ = { + BB90BB48F65D5795C75190C5B68C55DA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = B6DAA867681209B8BCC71EE70D0654A0; - remoteInfo = "scrypt-iOS"; + remoteGlobalIDString = 4C59270F810F2B1FEC2F3D5A77188907; + remoteInfo = "secp256k1_swift-macOS"; }; - 9F4F45405FD6C2C0442CDE492FDB5FB9 /* PBXContainerItemProxy */ = { + BE0F4DBA374559F8940C0B70384476BD /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; - remoteInfo = "CryptoSwift-iOS"; + remoteGlobalIDString = 558049EB555978BC8947ECF2498E78D9; + remoteInfo = "PromiseKit.root-CorePromise-Foundation"; }; - AC378E3E20AF5D424B6D68F67641CFC3 /* PBXContainerItemProxy */ = { + C0F3CE7136EDD63588CA49A936A5759F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 3B79F6DB09B597AAE9D3EB939DA463D8; remoteInfo = "SipHash-iOS"; }; - B6AAE8A429B44CC4133143E68DD626FE /* PBXContainerItemProxy */ = { + CF619704DBA07523055F8D5648DDBAC5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 0FEA45E4A3FB35CD13AAE2348DB3359E; - remoteInfo = "scrypt-macOS"; + remoteGlobalIDString = BB37143ACC20FC450C45EFD6C5660906; + remoteInfo = "scrypt-iOS"; }; - DA69FF9DA2BAA16B70B3669FF391FD00 /* PBXContainerItemProxy */ = { + D3EE8712BA96FE8983FC958E6574EDD5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = F4EB0AFAA3A292F355BF33F9614E125E; - remoteInfo = "PromiseKit.root-CorePromise-Foundation"; + remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; + remoteInfo = "CryptoSwift-macOS"; + }; + E2571A8251835112EFDDA05DFB2E5DB7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = AF9F48E6961507C0E2FD7A3CDBC652DA; + remoteInfo = "BigInt-iOS"; }; - E4816D843489A71F2F868B80C5ED2F48 /* PBXContainerItemProxy */ = { + E34A7F6994A6A82EB46702FB69724C37 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 321AD436B1B1600006FDA48B769B5215; + remoteGlobalIDString = 96225BBE1203595F4D0672A487BB9861; remoteInfo = "secp256k1_swift-iOS"; }; - E602EC1A33624D8E13D2528B9A6E9267 /* PBXContainerItemProxy */ = { + E3B6F092EBFA691E0A430BD173868EE2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = B15A271BA5831BBA626B2A8FEE864C9E; - remoteInfo = "Result-iOS"; + remoteGlobalIDString = 9646F4C6B5DB5298F5EEE5871120A244; + remoteInfo = "BigInt-macOS"; }; - EEE3CE0ACD2A096CC7970CBFFB63CC5E /* PBXContainerItemProxy */ = { + E4535F8068DAE0F786E0E402D0C94ABE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 3B79F6DB09B597AAE9D3EB939DA463D8; - remoteInfo = "SipHash-iOS"; + remoteGlobalIDString = AF9F48E6961507C0E2FD7A3CDBC652DA; + remoteInfo = "BigInt-iOS"; }; - EF2E9952249FA32D778E1825EE332999 /* PBXContainerItemProxy */ = { + E8B4498958DB7A8D6B92BD5B3EC5929C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 4FCBE56BC5E931FDC43C642250037C1F; - remoteInfo = "SipHash-macOS"; + remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; + remoteInfo = "CryptoSwift-macOS"; + }; + ED9EA08A437EDE511FD5DFDA715E57C7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; + remoteInfo = "CryptoSwift-iOS"; }; - F964FFD61B8A7C737D6CF0B4A6FCDE08 /* PBXContainerItemProxy */ = { + F6D2E7AC0942F82635983E5CBB33D700 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; remoteInfo = "CryptoSwift-iOS"; }; + FA5D6DF00D850BA03F64F8B7F8E88175 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; + remoteInfo = "CryptoSwift-macOS"; + }; + FC1CF70CADD772EA1F635C39F8E9A792 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = F5120265F2BDEB78BE6300C2AF965614; + remoteInfo = "EthereumAddress-macOS"; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 002BCC8DEC6CF0087CDD9F17D1CB63D8 /* PMKUIKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKUIKit.h; path = Extensions/UIKit/Sources/PMKUIKit.h; sourceTree = ""; }; - 0091667FAE21CC6D590AC1ADB6410352 /* SipHash-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SipHash-macOS.xcconfig"; path = "../SipHash-macOS/SipHash-macOS.xcconfig"; sourceTree = ""; }; - 011262F92057423AD4ECF708E415898D /* Result-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Result-macOS-umbrella.h"; path = "../Result-macOS/Result-macOS-umbrella.h"; sourceTree = ""; }; - 0194B6C18C95261082F349271D42FE44 /* lax_der_privatekey_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_privatekey_parsing.c; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.c; sourceTree = ""; }; - 02EAAF0A84187F4281AB39EBD7DA1B34 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; - 03938C581D805E7DEA7EF7935F6B4E61 /* Cryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptor.swift; path = Sources/CryptoSwift/Cryptor.swift; sourceTree = ""; }; - 03D50310E3C531327909D2D92D68AE95 /* SwiftRLP-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-iOS-prefix.pch"; sourceTree = ""; }; + 01271B2BB62FE2D72466A630AC9D1BE8 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Configuration.swift; sourceTree = ""; }; + 02516902C16D7E925BA5D0CD9531308D /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; + 0295AAB9A4AEF4BACC811B917B2F75DE /* Result-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-iOS-prefix.pch"; sourceTree = ""; }; + 03321ECEB201CDE70DA4F88EE48E2044 /* Salsa.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Salsa.swift; path = scrypt/scrypt/Salsa.swift; sourceTree = ""; }; + 03FE099622DA426E4CBDFEB30B374591 /* Primitive Types.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Primitive Types.swift"; path = "SipHash/Primitive Types.swift"; sourceTree = ""; }; 042CC2D185140E7D725D22562A3E307F /* Pods-web3swift-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-iOS.debug.xcconfig"; sourceTree = ""; }; - 0439A7FDEC4F611C9334DEC15FA25F1B /* Digest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Digest.swift; path = Sources/CryptoSwift/Digest.swift; sourceTree = ""; }; - 0475C2751B32FD3CB4D4A78B955F50F8 /* scrypt-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "scrypt-iOS.xcconfig"; sourceTree = ""; }; - 05760D356B4317540E7373046A1A3CD6 /* Salsa.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Salsa.swift; path = scrypt/scrypt/Salsa.swift; sourceTree = ""; }; - 05829B47F24F4E5C604129AFF8534C15 /* scrypt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "scrypt-iOS-dummy.m"; sourceTree = ""; }; - 07A9C5839E7875E75F4AF91C0C630CB2 /* SwiftRLP-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-iOS-umbrella.h"; sourceTree = ""; }; - 07BA44CF1EA491F2DE0FFA66AADF2764 /* eckey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey.h; path = Classes/secp256k1/src/eckey.h; sourceTree = ""; }; - 07BD7441D03BCED026093ADE867666D4 /* String Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String Conversion.swift"; path = "sources/String Conversion.swift"; sourceTree = ""; }; - 08220EE2495D2C17B6366EFD53B51AC3 /* UIViewPropertyAnimator+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewPropertyAnimator+Promise.swift"; path = "Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift"; sourceTree = ""; }; - 0923A9FA118D244659624C1F0BD11796 /* UIView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.h"; sourceTree = ""; }; - 092DD25F9A8FD52F554B41FA11289B4C /* Resolver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Resolver.swift; path = Sources/Resolver.swift; sourceTree = ""; }; - 092E8D6F47871894D8044C4145939CD2 /* CryptoSwift-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-iOS-prefix.pch"; sourceTree = ""; }; - 0974D06B8BD99ADFA971B50A5A2B38CE /* Division.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Division.swift; path = sources/Division.swift; sourceTree = ""; }; - 099CBD52589F67F91C4263550552B849 /* SipHash-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-iOS-umbrella.h"; sourceTree = ""; }; - 09E31D2F88F4FB6EC4A90B888DF591B7 /* AES+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AES+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/AES+Foundation.swift"; sourceTree = ""; }; - 0C016E31F7E35964F636011F294536FD /* Result-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Result-iOS.xcconfig"; sourceTree = ""; }; - 0C7D493F1212B046A7AAFC8351D67E4D /* NSURLSession+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLSession+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.h"; sourceTree = ""; }; - 0CCB1D05E6EF6E5D33F3A993B98DD675 /* Shifts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Shifts.swift; path = sources/Shifts.swift; sourceTree = ""; }; - 0CF0657C69B458EBD464B4F7EF2A1758 /* AEAD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEAD.swift; path = Sources/CryptoSwift/AEAD/AEAD.swift; sourceTree = ""; }; - 0D20E70F3D0A72813BC2CD93F028FF1F /* Scrypt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scrypt.swift; path = scrypt/scrypt/Scrypt.swift; sourceTree = ""; }; - 0D4AFA48362F6E5DF72006F39A5F32A5 /* CTR.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CTR.swift; path = Sources/CryptoSwift/BlockMode/CTR.swift; sourceTree = ""; }; - 0D7A08C10688F2510948C9E9742DFF65 /* Result-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "Result-macOS-dummy.m"; path = "../Result-macOS/Result-macOS-dummy.m"; sourceTree = ""; }; + 049ABCA847872C85F1B4A543A069DB7F /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PromiseKit.modulemap; sourceTree = ""; }; + 0554DC016A3872F60738FE5C366CAF31 /* ecmult_gen.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen.h; path = Classes/secp256k1/src/ecmult_gen.h; sourceTree = ""; }; + 062A95E74B96944BC0E3A674E72AE85E /* ecmult_gen_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen_impl.h; path = Classes/secp256k1/src/ecmult_gen_impl.h; sourceTree = ""; }; + 07CB743A805B99BE84DD49F8D999BF5C /* secp256k1_ecdh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_ecdh.h; path = Classes/secp256k1/include/secp256k1_ecdh.h; sourceTree = ""; }; + 08390C702E93A122CAC37BDF6A07A98C /* scalar_low.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low.h; path = Classes/secp256k1/src/scalar_low.h; sourceTree = ""; }; + 08CA1065DA6D886DAD8978D531C6C531 /* PromiseKit.root-CorePromise-Foundation-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PromiseKit.root-CorePromise-Foundation-dummy.m"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-dummy.m"; sourceTree = ""; }; + 09536C3B22879E31B5C0B3426E2FEBCA /* CryptoSwift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CryptoSwift-iOS-dummy.m"; sourceTree = ""; }; + 09601767E682E0D86F15EF42B2DCAD46 /* CryptoSwift-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-iOS-prefix.pch"; sourceTree = ""; }; + 0A734506E75FE208AFB8DA726262FFEC /* EthereumAddress-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EthereumAddress-macOS-umbrella.h"; path = "../EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h"; sourceTree = ""; }; + 0B152212D05CB08C4E0B61D8CDFF12C9 /* Guarantee.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Guarantee.swift; path = Sources/Guarantee.swift; sourceTree = ""; }; + 0C57A83FBD44C769166BCCC5CD45BD3F /* firstly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = firstly.swift; path = Sources/firstly.swift; sourceTree = ""; }; + 0D0947D47B9CECD59BC73EAC48D4ED27 /* HKDF.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HKDF.swift; path = Sources/CryptoSwift/HKDF.swift; sourceTree = ""; }; + 0D2BE96DBE00949D2B047DC83A759B4C /* BlockDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockDecryptor.swift; path = Sources/CryptoSwift/BlockDecryptor.swift; sourceTree = ""; }; 0D88C9D56C3885598E20D9718F3B8F16 /* Pods-web3swift-macOS_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-macOS_Tests.release.xcconfig"; sourceTree = ""; }; - 0E3C47D7844F81394427D09B0454A241 /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; - 10F96D8FE1C5606E4F729FFD623428A3 /* secp256k1_swift-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "secp256k1_swift-macOS.xcconfig"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS.xcconfig"; sourceTree = ""; }; - 11F7F4CE35D426643C8DE5645FF76713 /* libsecp256k1-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "libsecp256k1-config.h"; path = "Classes/libsecp256k1-config.h"; sourceTree = ""; }; - 12BFFA790DC1A19DFC5018C9B37267D2 /* SipHashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHashable.swift; path = SipHash/SipHashable.swift; sourceTree = ""; }; - 161C2D9657DC967FFAC2A37D48134D76 /* Bitwise Ops.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bitwise Ops.swift"; path = "sources/Bitwise Ops.swift"; sourceTree = ""; }; - 167A6E691DFD15BA9883036B14F41D03 /* GCD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCD.swift; path = sources/GCD.swift; sourceTree = ""; }; - 18E4AB7C0ABCF3AEC6B3979EC294536E /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; - 1A3ADB1AB7700B235D79CA3AEB2E8540 /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/recovery/main_impl.h; sourceTree = ""; }; - 1A48FBA7E324AABD9DA453C780537C79 /* field_5x52.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52.h; path = Classes/secp256k1/src/field_5x52.h; sourceTree = ""; }; - 1B27C53CBFBCBC1E6466F7294EFBEA93 /* Multiplication.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multiplication.swift; path = sources/Multiplication.swift; sourceTree = ""; }; - 1B685BD86E597E436351119CA4A20736 /* BigUInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigUInt.swift; path = sources/BigUInt.swift; sourceTree = ""; }; - 1BC5C341B16D41330279E713831347D9 /* scratch_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch_impl.h; path = Classes/secp256k1/src/scratch_impl.h; sourceTree = ""; }; - 1BFCF7E8508743BB12B3D3A3C1AFF821 /* SwiftRLP-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftRLP-iOS-dummy.m"; sourceTree = ""; }; + 0DE0997E93980E728205BE4BF37B5FBC /* scrypt-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "scrypt-iOS.xcconfig"; sourceTree = ""; }; + 0E67F7B0700CACBB7DFD27A88EFF75C2 /* PromiseKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; + 0EA0E0A67D5738512E4618E1AEDA5E3E /* CustomStringConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomStringConvertible.swift; path = Sources/CustomStringConvertible.swift; sourceTree = ""; }; + 0EC0DBFB306B96AAE65A02CB825C4F0B /* SHA1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA1.swift; path = Sources/CryptoSwift/SHA1.swift; sourceTree = ""; }; + 0F02A89B4F4807025E1CB0C26D63CD65 /* SwiftRLP.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftRLP.h; path = SwiftRLP/SwiftRLP.h; sourceTree = ""; }; + 10E2FD109C104BBFF96C8BEAE5D93A6E /* libPromiseKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libPromiseKit.a; path = libPromiseKit.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 121546801BC1F73B1E78D3BA38876A8C /* EthereumAddress-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EthereumAddress-macOS-prefix.pch"; path = "../EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch"; sourceTree = ""; }; + 12838912E9C17379AEEDB5CEF54ED779 /* Result-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Result-iOS.modulemap"; sourceTree = ""; }; + 1412597E34EB8268006B0BCFF20BB89A /* secp256k1_swift-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "secp256k1_swift-iOS.xcconfig"; sourceTree = ""; }; + 14176496814CB0D56F198301D279FE65 /* CCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CCM.swift; path = Sources/CryptoSwift/BlockMode/CCM.swift; sourceTree = ""; }; + 1422C640D1B145BC997D3E0A3FF10339 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = EthereumAddress/Classes/Extensions.swift; sourceTree = ""; }; + 145A69383BF153D7728F4793AB68C3C4 /* hang.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = hang.swift; path = Sources/hang.swift; sourceTree = ""; }; + 15206D43EDA63AD479C638B175342338 /* Result-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Result-macOS.xcconfig"; path = "../Result-macOS/Result-macOS.xcconfig"; sourceTree = ""; }; + 1576E0C86B6BE13F5FB685E1357E71C3 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; + 17856FB7A41BDDB75285F531B03882F4 /* PMKFoundation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKFoundation.h; path = Extensions/Foundation/Sources/PMKFoundation.h; sourceTree = ""; }; + 17F353B4B162974207D9F48A62765D99 /* libscrypt-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libscrypt-iOS.a"; path = "libscrypt-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 19725B1F6B394E3B97BB387C7E4E4874 /* NoError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoError.swift; path = Result/NoError.swift; sourceTree = ""; }; + 1A86CAF979F3E970071A5FC47D9D7EAC /* Division.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Division.swift; path = sources/Division.swift; sourceTree = ""; }; + 1BBCD0009252A5C66FFA6A2EDAE25173 /* secp256k1_swift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "secp256k1_swift-macOS-umbrella.h"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h"; sourceTree = ""; }; 1C8F00AC871FE0EC2FBD9A40F62753CD /* Pods-web3swift-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-macOS.debug.xcconfig"; sourceTree = ""; }; - 1E012EBA689C972E69BCBC4B98909AD6 /* 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 = ""; }; - 1EBD08D75A25D39EC9FA85F75EFBD0CB /* CryptoSwift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "CryptoSwift-macOS.modulemap"; path = "../CryptoSwift-macOS/CryptoSwift-macOS.modulemap"; sourceTree = ""; }; - 1F4BECA22FA3D5D535FC714D0B2B9EB8 /* Result-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-iOS-dummy.m"; sourceTree = ""; }; - 21CDB590E00AE3873562308E5110A4D8 /* Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptors.swift; path = Sources/CryptoSwift/Cryptors.swift; sourceTree = ""; }; - 221F16DEDE441F76365153C8EC2D64E3 /* ecmult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult.h; path = Classes/secp256k1/src/ecmult.h; sourceTree = ""; }; + 1D7B42933B2D81EED52706C7200A9732 /* lax_der_privatekey_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_privatekey_parsing.c; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.c; sourceTree = ""; }; + 1D8151AFF003D8A45F3E0F171019ED33 /* OFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OFB.swift; path = Sources/CryptoSwift/BlockMode/OFB.swift; sourceTree = ""; }; + 1DF1726C7221A0B7805EF3E180CE8007 /* libPods-web3swift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-macOS.a"; path = "libPods-web3swift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1EDD6BBAF4F23E405AA0CA5AA2837BD9 /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/ecdh/main_impl.h; sourceTree = ""; }; + 1F0D95EE88A2B8D781795DF20E0568F6 /* BlockMode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockMode.swift; path = Sources/CryptoSwift/BlockMode/BlockMode.swift; sourceTree = ""; }; + 20BE3E8F811475C9F3E6350A16EF3D56 /* UInt16+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt16+Extension.swift"; path = "Sources/CryptoSwift/UInt16+Extension.swift"; sourceTree = ""; }; + 20D278014F2D90DDD7C703E49B6727B7 /* libsecp256k1_swift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libsecp256k1_swift-iOS.a"; path = "libsecp256k1_swift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 23299E01AF2849576AF87D2A3EB8D494 /* EthereumAddress-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EthereumAddress-iOS-dummy.m"; sourceTree = ""; }; + 234968A9A443A0E2CC4FBFBADB4CC6AB /* 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 = ""; }; + 23EA6F524218763DB7E76A6E13387EAC /* Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Padding.swift; path = Sources/CryptoSwift/Padding.swift; sourceTree = ""; }; 24B5C2F89100EAE084E4AF83DDE6303D /* Pods-web3swift-iOS_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-iOS_Tests.debug.xcconfig"; sourceTree = ""; }; + 255F9BD02565315A20D36910794D0C10 /* libsecp256k1-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "libsecp256k1-config.h"; path = "Classes/libsecp256k1-config.h"; sourceTree = ""; }; + 25E9E042655265AEB9322FB01DD7A702 /* Resolver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Resolver.swift; path = Sources/Resolver.swift; sourceTree = ""; }; 25F72E78DF48560F5D210E57844ACDED /* Pods-web3swift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-web3swift-macOS-umbrella.h"; sourceTree = ""; }; - 27042DAC0089FE05944B8718DE760F71 /* libPods-web3swift-macOS_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-macOS_Tests.a"; path = "libPods-web3swift-macOS_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 2707FB70F6217313CE3FE9D9B5606CDB /* lax_der_privatekey_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_privatekey_parsing.h; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.h; sourceTree = ""; }; - 2765A0C6E2BE64A4D0916D30633BEA7E /* lax_der_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_parsing.h; path = Classes/secp256k1/contrib/lax_der_parsing.h; sourceTree = ""; }; - 276BA53B2960C2B624579741823D9DD2 /* UInt32+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt32+Extension.swift"; path = "Sources/CryptoSwift/UInt32+Extension.swift"; sourceTree = ""; }; - 28668B0DE54AE4E51942A5F50596975C /* NSNotificationCenter+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSNotificationCenter+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m"; sourceTree = ""; }; - 2C71245535F05C90A42683076576BB26 /* NSTask+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSTask+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.h"; sourceTree = ""; }; - 2CF235AEEC6AC29CA5A1331269520B36 /* SipHash-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SipHash-macOS.modulemap"; path = "../SipHash-macOS/SipHash-macOS.modulemap"; sourceTree = ""; }; - 2D86C75595B41479AB364568AB89F857 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Configuration.swift; sourceTree = ""; }; - 2DCDC3F74F1C62E2161FC76EF265BED7 /* AEADChaCha20Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEADChaCha20Poly1305.swift; path = Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift; sourceTree = ""; }; - 306BDC01729FF834ADC364D1DDD4797A /* group_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group_impl.h; path = Classes/secp256k1/src/group_impl.h; sourceTree = ""; }; - 318BC6D7199E76698CC662BB48AE0E81 /* scrypt.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scrypt.h; path = scrypt/scrypt.h; sourceTree = ""; }; - 32019641A223A260B54A3A6633B0BF19 /* StreamDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamDecryptor.swift; path = Sources/CryptoSwift/StreamDecryptor.swift; sourceTree = ""; }; - 323129AF4AE1EA178343E46476163880 /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.m"; sourceTree = ""; }; - 3386525472CC553FF40B3AFEE8BCE2DD /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; - 345299796DBEE665766F152916E0A531 /* secp256k1_swift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "secp256k1_swift-iOS-dummy.m"; sourceTree = ""; }; - 35FC5E1CB1FA613D068CDE5E32242FEA /* libSipHash-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSipHash-iOS.a"; path = "libSipHash-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 365AB600024749D54E0AD6D59FC28749 /* NoPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoPadding.swift; path = Sources/CryptoSwift/NoPadding.swift; sourceTree = ""; }; - 37BA5803AF780ED8A2ABA135BAA03479 /* ECB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ECB.swift; path = Sources/CryptoSwift/BlockMode/ECB.swift; sourceTree = ""; }; - 3965CA10F7B404A9629D09C0513F2A04 /* scrypt-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "scrypt-macOS-prefix.pch"; path = "../scrypt-macOS/scrypt-macOS-prefix.pch"; sourceTree = ""; }; - 3992689C4E8FC6AE9958D04582793809 /* scrypt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-iOS-umbrella.h"; sourceTree = ""; }; - 39B4575A57EFE3A0630FA12FAE346202 /* NSURLSession+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Promise.swift"; path = "Extensions/Foundation/Sources/NSURLSession+Promise.swift"; sourceTree = ""; }; - 3BF5A3B81AA637876B3E5AA4D5F124AA /* scalar_4x64.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64.h; path = Classes/secp256k1/src/scalar_4x64.h; sourceTree = ""; }; - 3C97CDE8E28215118A8265A78EF509D0 /* num.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num.h; path = Classes/secp256k1/src/num.h; sourceTree = ""; }; - 3E49C5D9CD234FDC2304F413D1314EE4 /* Result-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-iOS-umbrella.h"; sourceTree = ""; }; - 3E6E7087B7CBB4230AEFE06A0586FEA1 /* Cimpl.c */ = {isa = PBXFileReference; includeInIndex = 1; name = Cimpl.c; path = scrypt/Cimpl.c; sourceTree = ""; }; + 26BEF092AF19B017CCEAC5BD6EDFADBC /* CryptoSwift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CryptoSwift-macOS-umbrella.h"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h"; sourceTree = ""; }; + 282DD884F817856F0FD3D38F8A4447B1 /* field_5x52_asm_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_asm_impl.h; path = Classes/secp256k1/src/field_5x52_asm_impl.h; sourceTree = ""; }; + 28AB30A05C0D17ABF7D0DBC475F93C23 /* Result-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "Result-macOS-dummy.m"; path = "../Result-macOS/Result-macOS-dummy.m"; sourceTree = ""; }; + 28D6357617301A15F1861ECE0B2D728E /* SipHashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHashable.swift; path = SipHash/SipHashable.swift; sourceTree = ""; }; + 28F6D61D90FB438C4CB2856FA258E35B /* EthereumAddress-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumAddress-iOS-prefix.pch"; sourceTree = ""; }; + 2AF08003360A2A59E3E059CBC5496E71 /* ecdsa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa.h; path = Classes/secp256k1/src/ecdsa.h; sourceTree = ""; }; + 2BC7202C545EAC46F224EE9AB6B1F0F7 /* field.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field.h; path = Classes/secp256k1/src/field.h; sourceTree = ""; }; + 2BE63C0E40FA294F6C512967711E56D9 /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; + 2D1D500C8CF88FC87FF7FA43DBC53611 /* AnyError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyError.swift; path = Result/AnyError.swift; sourceTree = ""; }; + 2D4F789F0354155D07BB3A1463344281 /* UIViewPropertyAnimator+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewPropertyAnimator+Promise.swift"; path = "Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift"; sourceTree = ""; }; + 310A618141B833B61214988468629C13 /* ecmult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult.h; path = Classes/secp256k1/src/ecmult.h; sourceTree = ""; }; + 3391B8242DCA2A16EB9DBB3FF0740ABC /* Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptors.swift; path = Sources/CryptoSwift/Cryptors.swift; sourceTree = ""; }; + 3487EA794F9422FD28689C37156DD9FE /* Addition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Addition.swift; path = sources/Addition.swift; sourceTree = ""; }; + 358F7A798EA72C8BFA7C4AA5D7A22723 /* race.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = race.m; path = Sources/race.m; sourceTree = ""; }; + 37B67C2B42A2EC2E689AE41636261351 /* scalar_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_impl.h; path = Classes/secp256k1/src/scalar_impl.h; sourceTree = ""; }; + 39A04A76F1A947E73DA6CC6FE271B82D /* CryptoSwift-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CryptoSwift-macOS-prefix.pch"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; sourceTree = ""; }; + 3ABE33C91D6B128E8B104ED3630B6ABB /* CBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBC.swift; path = Sources/CryptoSwift/BlockMode/CBC.swift; sourceTree = ""; }; + 3C9CD6920241610BE46DBB9D591849AD /* field_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_impl.h; path = Classes/secp256k1/src/field_impl.h; sourceTree = ""; }; + 3D2AD51705C652FD9094CEDC59DFB4FC /* SwiftRLP-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SwiftRLP-macOS.xcconfig"; path = "../SwiftRLP-macOS/SwiftRLP-macOS.xcconfig"; sourceTree = ""; }; + 3D6CFCC98052B542B8BD8050E0204993 /* Box.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Sources/Box.swift; sourceTree = ""; }; + 3E5F93B0E61748A9D9906D3305A41EA8 /* ecmult_const.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const.h; path = Classes/secp256k1/src/ecmult_const.h; sourceTree = ""; }; + 3E75AF68728F33A9AC112BE223CA6718 /* num_gmp_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp_impl.h; path = Classes/secp256k1/src/num_gmp_impl.h; sourceTree = ""; }; + 3E8DAE988F4403CE8B047E936F2B4AE1 /* secp256k1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1.h; path = Classes/secp256k1/include/secp256k1.h; sourceTree = ""; }; + 3E8F4C6770C979220F90AD2CBA4EA3CE /* field_5x52_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_impl.h; path = Classes/secp256k1/src/field_5x52_impl.h; sourceTree = ""; }; 3E91F337EA3979DB5DD84C325A340270 /* Pods-web3swift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swift-macOS-dummy.m"; sourceTree = ""; }; - 3F58565031EE07098E585B5C3FCC7442 /* RandomBytesSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomBytesSequence.swift; path = Sources/CryptoSwift/RandomBytesSequence.swift; sourceTree = ""; }; - 3F60E6D7F6C28A5DF688920FB74829E4 /* CBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBC.swift; path = Sources/CryptoSwift/BlockMode/CBC.swift; sourceTree = ""; }; - 3FDABDA201433FD66D894DAEF0761C26 /* secp256k1_swift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "secp256k1_swift-macOS-dummy.m"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-dummy.m"; sourceTree = ""; }; - 40497EC0B9D6C3A291AA63F310A549A2 /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; - 40BFCBA4E1D706A666116029D5E0E726 /* Result-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Result-macOS.xcconfig"; path = "../Result-macOS/Result-macOS.xcconfig"; sourceTree = ""; }; - 433536C0066CD933A793F8B42877435F /* scalar_8x32_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32_impl.h; path = Classes/secp256k1/src/scalar_8x32_impl.h; sourceTree = ""; }; - 43CCBB7CEE935A6D645B18B87E5F1A5E /* BigInt-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "BigInt-macOS.xcconfig"; path = "../BigInt-macOS/BigInt-macOS.xcconfig"; sourceTree = ""; }; - 44131C334B408CABBB3E84FE9BEDD5BE /* field_10x26.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26.h; path = Classes/secp256k1/src/field_10x26.h; sourceTree = ""; }; - 44BE339EC0BDEB80B98E8D988708993F /* UInt64+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt64+Extension.swift"; path = "Sources/CryptoSwift/UInt64+Extension.swift"; sourceTree = ""; }; - 46F1CC3195EF29E61FD820B624C49746 /* ChaCha20.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChaCha20.swift; path = Sources/CryptoSwift/ChaCha20.swift; sourceTree = ""; }; - 4747F3231587AB7A49FAEC31459E0E5A /* BigInt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "BigInt-iOS.modulemap"; sourceTree = ""; }; - 47DF102368BCFE57F05C91BED865C127 /* libPods-web3swift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-iOS.a"; path = "libPods-web3swift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3ED02D5B7EB6BD54C515B4B06599DA5F /* scratch.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch.h; path = Classes/secp256k1/src/scratch.h; sourceTree = ""; }; + 3ED371C14676A66BA35BCF542FF8B548 /* hash_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash_impl.h; path = Classes/secp256k1/src/hash_impl.h; sourceTree = ""; }; + 40ABB4750B401A88B273D3B180C1FEC9 /* fwd.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = fwd.h; path = Sources/fwd.h; sourceTree = ""; }; + 41B019A1B56440DDAB3267B96FDBD576 /* UInt8+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt8+Extension.swift"; path = "Sources/CryptoSwift/UInt8+Extension.swift"; sourceTree = ""; }; + 41F99637E28F2B9DC1A86CD6B490CE52 /* SwiftRLP-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SwiftRLP-macOS-dummy.m"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-dummy.m"; sourceTree = ""; }; + 41FAB135DE09D3F9136D834CBE3A558A /* Scrypt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scrypt.swift; path = scrypt/scrypt/Scrypt.swift; sourceTree = ""; }; + 423E241FA5BBF42BFDDA5E6C6AD2DEB9 /* scalar_8x32.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32.h; path = Classes/secp256k1/src/scalar_8x32.h; sourceTree = ""; }; + 42F14C976AD41B0817186FB67B3B349B /* Data+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Extension.swift"; path = "Sources/CryptoSwift/Foundation/Data+Extension.swift"; sourceTree = ""; }; + 42F561AD37AE0579CA9921A14A3A0943 /* Result-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Result-macOS-prefix.pch"; path = "../Result-macOS/Result-macOS-prefix.pch"; sourceTree = ""; }; + 435339C16A1550DDCDCD1B4731E89DBD /* Result-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Result-iOS.xcconfig"; sourceTree = ""; }; + 43941A9CA2F209289C333306CBC5961F /* Process+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Process+Promise.swift"; path = "Extensions/Foundation/Sources/Process+Promise.swift"; sourceTree = ""; }; + 441A9CACC96EB9A41D4ABF90FDFFD2C8 /* ChaCha20+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ChaCha20+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift"; sourceTree = ""; }; + 453B783DD499D624880A972C2DC8C94A /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; + 48BBE301C7AC93BA32B43FDCAB55FF55 /* EthereumAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EthereumAddress.h; path = EthereumAddress/EthereumAddress.h; sourceTree = ""; }; + 491E82F8B7D6BC0F752EEA10F629435A /* Square Root.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Square Root.swift"; path = "sources/Square Root.swift"; sourceTree = ""; }; + 49A1004ABA6FF6BBB692884F59131E13 /* Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Utils.swift; path = Sources/CryptoSwift/Utils.swift; sourceTree = ""; }; + 49FA7F82B54CC7168B96069F53D66A28 /* RLP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RLP.swift; path = Classes/RLP.swift; sourceTree = ""; }; + 4A2766B8B12BFE63523151BC3F80CDF4 /* EthereumAddress-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumAddress-iOS-umbrella.h"; sourceTree = ""; }; 4A2E0AD738D348DDA03396C623D814CD /* Pods-web3swift-macOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swift-macOS-acknowledgements.plist"; sourceTree = ""; }; - 4AF7FD66A2EBEED268628A0D0FE4E74D /* SwiftRLP-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SwiftRLP-macOS-dummy.m"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-dummy.m"; sourceTree = ""; }; - 4B00C58B6D526DBDFF8307C6DA1AFDF1 /* secp256k1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = secp256k1.swift; path = Classes/secp256k1.swift; sourceTree = ""; }; - 4B659053EBDBE68F9EB1137C3AFCC9F8 /* lax_der_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_parsing.c; path = Classes/secp256k1/contrib/lax_der_parsing.c; sourceTree = ""; }; - 4FE4AFACA87A9BC9B7F46A7AAD878E33 /* Words and Bits.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Words and Bits.swift"; path = "sources/Words and Bits.swift"; sourceTree = ""; }; - 5124B9DB14585DB3252BDB2B0F4A7FC7 /* secp256k1_swift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "secp256k1_swift-macOS.modulemap"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap"; sourceTree = ""; }; + 4BD790D4294FB459BB05017C05CA1F1E /* UInt64+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt64+Extension.swift"; path = "Sources/CryptoSwift/UInt64+Extension.swift"; sourceTree = ""; }; + 4BF61EAD9C9EC96163CECACFBF3504C3 /* EthereumAddress-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EthereumAddress-macOS-dummy.m"; path = "../EthereumAddress-macOS/EthereumAddress-macOS-dummy.m"; sourceTree = ""; }; + 4C332617281C7BEB03040C92EF610543 /* libsecp256k1_swift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libsecp256k1_swift-macOS.a"; path = "libsecp256k1_swift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4D5B77EB47B2435BCBF83C39D0D576F5 /* libCryptoSwift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libCryptoSwift-macOS.a"; path = "libCryptoSwift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4E85EB665265A065E5D96BCE2B87008D /* SipHash-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SipHash-macOS-umbrella.h"; path = "../SipHash-macOS/SipHash-macOS-umbrella.h"; sourceTree = ""; }; + 4F8B31678A829B043331C94E279F1FD9 /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = Sources/CryptoSwift/CompactMap.swift; sourceTree = ""; }; + 506B39E37C9D076FA278322A078D548D /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.m"; sourceTree = ""; }; + 5116359962EA1905AC0EB7121E634D9F /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; + 51FC3239F6613D1D7AE1AAD0F3204A0F /* scrypt-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "scrypt-macOS-dummy.m"; path = "../scrypt-macOS/scrypt-macOS-dummy.m"; sourceTree = ""; }; + 52059A76F9DA89149396ABB84A8A5780 /* PromiseKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-umbrella.h"; sourceTree = ""; }; 522015696E45158812DD4C5CF37CD544 /* Pods-web3swift-macOS_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swift-macOS_Tests-dummy.m"; sourceTree = ""; }; - 5250B8764D7489940F140620EA371F7F /* CryptoSwift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "CryptoSwift-iOS.modulemap"; sourceTree = ""; }; - 5362887D119F1FF10889E08C0A86AC77 /* libscrypt-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libscrypt-macOS.a"; path = "libscrypt-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 547AA2E9890A83EE986E0FE6B230D1E8 /* libSwiftRLP-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSwiftRLP-macOS.a"; path = "libSwiftRLP-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5297103B37D2E5083D67ABE2C60CA382 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; + 52B35D82CEB3E05DB842B7FA66505116 /* Cipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cipher.swift; path = Sources/CryptoSwift/Cipher.swift; sourceTree = ""; }; + 531B65B7CD936ABCBE9D4C182A88CDF0 /* field_10x26.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26.h; path = Classes/secp256k1/src/field_10x26.h; sourceTree = ""; }; + 53C768170DFB632A3ADBD2A703116B8E /* libEthereumAddress-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libEthereumAddress-macOS.a"; path = "libEthereumAddress-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5447D2654ABD868EB73A2BF12AD74DE8 /* SwiftRLP-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftRLP-macOS-umbrella.h"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h"; sourceTree = ""; }; 54DEB815C6A515714B4A838D414C3241 /* Pods-web3swift-macOS_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swift-macOS_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 551CAAEDDC5AAACAA24E8A5A86721E97 /* Bit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bit.swift; path = Sources/CryptoSwift/Bit.swift; sourceTree = ""; }; - 555457AF50F888167C28CEA34B14AAE1 /* 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 = ""; }; - 55FA26B75C99F4847087C9104EE38E8F /* Authenticator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Authenticator.swift; path = Sources/CryptoSwift/Authenticator.swift; sourceTree = ""; }; - 57D914B6D4F8590AF8E3BA6863DB778B /* Collection+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Collection+Extension.swift"; path = "Sources/CryptoSwift/Collection+Extension.swift"; sourceTree = ""; }; - 57FE015BCC95654092B0ADF05585E987 /* scratch.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch.h; path = Classes/secp256k1/src/scratch.h; sourceTree = ""; }; - 599066091D94A49D4FE779679AFD88E2 /* libSipHash-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSipHash-macOS.a"; path = "libSipHash-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 59C55840D303F469F1F31EE4867563E5 /* Generics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generics.swift; path = Sources/CryptoSwift/Generics.swift; sourceTree = ""; }; - 5A6CB64CE9F57BAAAAF807DF850E2C0A /* libResult-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libResult-iOS.a"; path = "libResult-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 5B061B14116ABEE15B3CE99517103317 /* UInt8+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt8+Extension.swift"; path = "Sources/CryptoSwift/UInt8+Extension.swift"; sourceTree = ""; }; - 5B2EDCF2255BD0D829F03B0C1BD0A060 /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Extension.swift"; path = "Sources/CryptoSwift/String+Extension.swift"; sourceTree = ""; }; - 5B66168E0567CA1671C74F37384DD7B7 /* scrypt-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "scrypt-macOS-dummy.m"; path = "../scrypt-macOS/scrypt-macOS-dummy.m"; sourceTree = ""; }; - 5B88EAF15DEC2D3207C78A1C1F11E1B1 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PromiseKit.root-CorePromise-Foundation-umbrella.h"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h"; sourceTree = ""; }; - 5E959F3AA4E4F1850C7F42B923C77DDB /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/ecdh/main_impl.h; sourceTree = ""; }; - 6190C35184D36B3997B74374A1DEB870 /* libPods-web3swift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-macOS.a"; path = "libPods-web3swift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 61A90B8C29D973CF2BEE2A33224ACBEF /* Updatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Updatable.swift; path = Sources/CryptoSwift/Updatable.swift; sourceTree = ""; }; - 61BA4F5A7AAF223AA3BDA0BF814905AA /* AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; - 61F02670BA786ECE5640E0C70EA68888 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; - 61F9B5A069C5D02E065D4AB81C26942D /* libsecp256k1_swift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libsecp256k1_swift-macOS.a"; path = "libsecp256k1_swift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 6246D2591B9DFE5339771AC0AF2EA3CA /* CustomStringConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomStringConvertible.swift; path = Sources/CustomStringConvertible.swift; sourceTree = ""; }; - 627C056A389B2501608E18EFAD762A6B /* CCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CCM.swift; path = Sources/CryptoSwift/BlockMode/CCM.swift; sourceTree = ""; }; - 62BD8229A9BC1A38D866BEDF45C366E7 /* secp256k1_swift-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "secp256k1_swift-macOS-prefix.pch"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; sourceTree = ""; }; - 63D47A1599387D37CCA850DB9256283A /* Deprecations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecations.swift; path = Sources/Deprecations.swift; sourceTree = ""; }; - 660B0734DFD6D8C99EE70FDF836AD891 /* HMAC+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "HMAC+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/HMAC+Foundation.swift"; sourceTree = ""; }; - 665306D3A9323800337BE1451D8960E7 /* AnyError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyError.swift; path = Result/AnyError.swift; sourceTree = ""; }; - 66858822A1651FBD671091155D387A8B /* BlockModeOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockModeOptions.swift; path = Sources/CryptoSwift/BlockMode/BlockModeOptions.swift; sourceTree = ""; }; - 66D54E1981BA238733A8A5E65484B2B5 /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; + 5540F42E4F8BF99A1C7F95349EA8707D /* field_5x52_int128_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_int128_impl.h; path = Classes/secp256k1/src/field_5x52_int128_impl.h; sourceTree = ""; }; + 5595E1873CFBC6061E8C6D86BFF12807 /* scalar_low_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low_impl.h; path = Classes/secp256k1/src/scalar_low_impl.h; sourceTree = ""; }; + 55F115779D04B6641A1DB99D05887E03 /* NSURLSession+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLSession+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.m"; sourceTree = ""; }; + 58D4D38A480BA09A08C8523AF72783C5 /* libSipHash-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSipHash-macOS.a"; path = "libSipHash-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 58F3E29F9DFEE63DA2847094AA590666 /* Multiplication.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multiplication.swift; path = sources/Multiplication.swift; sourceTree = ""; }; + 5C3CED0A47AF7E341A3EBD1849B12F6F /* EthereumAddress-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "EthereumAddress-macOS.modulemap"; path = "../EthereumAddress-macOS/EthereumAddress-macOS.modulemap"; sourceTree = ""; }; + 5CAF8471B488702419FE2C532D4D11EA /* secp256k1_swift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "secp256k1_swift-iOS.modulemap"; sourceTree = ""; }; + 5DFE72A11A0AF97FFCEBDF19EC395F74 /* Subtraction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Subtraction.swift; path = sources/Subtraction.swift; sourceTree = ""; }; + 5ED58E829B835009D9DCD1D8B959FBBD /* Digest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Digest.swift; path = Sources/CryptoSwift/Digest.swift; sourceTree = ""; }; + 5EFE8BF6504756C13783E7D477894264 /* PBKDF1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF1.swift; path = Sources/CryptoSwift/PKCS/PBKDF1.swift; sourceTree = ""; }; + 6007139C44683BCB89A01696BBBD497F /* 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 = ""; }; + 612CB1FE4A4EF26D20DC64543E17C82A /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; + 614D3F652018D0D4BB869BAEEC3BFA5D /* PMKUIKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKUIKit.h; path = Extensions/UIKit/Sources/PMKUIKit.h; sourceTree = ""; }; + 632F66F6756738B3DBCD9FE0F29FD51D /* UIView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.h"; sourceTree = ""; }; + 635C328C2CAB4B34DEF69D8CFABA3AC1 /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; + 639957AA1B177687176168DC8D443490 /* BlockModeOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockModeOptions.swift; path = Sources/CryptoSwift/BlockMode/BlockModeOptions.swift; sourceTree = ""; }; + 63C148A221559836C278AFFB2F0C6D3D /* num_gmp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp.h; path = Classes/secp256k1/src/num_gmp.h; sourceTree = ""; }; + 656AF5A70C93A14D7EF9E1E97A73DA9F /* scrypt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-iOS-prefix.pch"; sourceTree = ""; }; + 6633CE6E0F4DA082E8A3374A723A4844 /* BigUInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigUInt.swift; path = sources/BigUInt.swift; sourceTree = ""; }; + 666BE65938A502C928B35D6EB5CA9FDA /* libResult-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libResult-iOS.a"; path = "libResult-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 671394A1108646E9E210CF54FA2C814C /* CTR.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CTR.swift; path = Sources/CryptoSwift/BlockMode/CTR.swift; sourceTree = ""; }; 673FFC4D2B959AB8AEC35D646A85CDCD /* Pods-web3swift-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-iOS.release.xcconfig"; sourceTree = ""; }; - 686E32EABE020693AEB9B0CBB68DC7AD /* libCryptoSwift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libCryptoSwift-iOS.a"; path = "libCryptoSwift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 699D800F72CE09977D6EE1687D706BD6 /* BlockCipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockCipher.swift; path = Sources/CryptoSwift/BlockCipher.swift; sourceTree = ""; }; - 69B4D5C4EED1973AF5815173AB05729B /* Data+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Extension.swift"; path = "Sources/CryptoSwift/Foundation/Data+Extension.swift"; sourceTree = ""; }; - 6BBC74867F1126D0DB48249F01662F36 /* Result-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Result-macOS-prefix.pch"; path = "../Result-macOS/Result-macOS-prefix.pch"; sourceTree = ""; }; - 6C01FC83057F30818B00CDD8B62AC6B9 /* SipHash-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SipHash-iOS.modulemap"; sourceTree = ""; }; - 6C59784B76CA65D06F275EBA259540AC /* SipHash-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SipHash-macOS-umbrella.h"; path = "../SipHash-macOS/SipHash-macOS-umbrella.h"; sourceTree = ""; }; + 678FC45FCDC1237D6344CFADDB22F228 /* eckey_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey_impl.h; path = Classes/secp256k1/src/eckey_impl.h; sourceTree = ""; }; + 67F6E91C8B57C5F8E945603C7F3DB0F2 /* Result-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Result-macOS-umbrella.h"; path = "../Result-macOS/Result-macOS-umbrella.h"; sourceTree = ""; }; + 681146D3345FF5156D09E271666D5EA1 /* group_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group_impl.h; path = Classes/secp256k1/src/group_impl.h; sourceTree = ""; }; + 682A1BA8289C74E7B26FAAFA80540F57 /* BatchedCollection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BatchedCollection.swift; path = Sources/CryptoSwift/BatchedCollection.swift; sourceTree = ""; }; + 682CE9677672C1F944AA2896D3BD36FF /* String Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String Conversion.swift"; path = "sources/String Conversion.swift"; sourceTree = ""; }; + 68CD2728F142362B577571D597A953D0 /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; + 6A0F097AEAD44F8F983B8D4F884FDE42 /* libSwiftRLP-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSwiftRLP-macOS.a"; path = "libSwiftRLP-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 6D4A716592C208D7429CE19B82094FA8 /* Pods-web3swift-iOS_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swift-iOS_Tests-acknowledgements.plist"; sourceTree = ""; }; - 6D957F2AECF5A8A0E9C7CCE2A55B6C69 /* hang.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = hang.swift; path = Sources/hang.swift; sourceTree = ""; }; - 6DF453CEA7E128C1691A0713421CFBBF /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; - 6E138D3C3327A0AC400395EA7B85D13A /* num_gmp_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp_impl.h; path = Classes/secp256k1/src/num_gmp_impl.h; sourceTree = ""; }; - 6EA534EDF19829F1927C7991BF2EEC2F /* Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Padding.swift; path = Sources/CryptoSwift/Padding.swift; sourceTree = ""; }; - 6F662C5CB3F9F55D1B8343627F3108A8 /* libResult-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libResult-macOS.a"; path = "libResult-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 6FACAD9F572878C98D14B56672DE004C /* PBKDF2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF2.swift; path = Sources/CryptoSwift/PKCS/PBKDF2.swift; sourceTree = ""; }; - 705526D46CF8710526DEFD6A81185AFA /* Strideable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Strideable.swift; path = sources/Strideable.swift; sourceTree = ""; }; - 71B12B455685D2F4F116288D0FE808FE /* Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Poly1305.swift; path = Sources/CryptoSwift/Poly1305.swift; sourceTree = ""; }; - 73AF6510FE79C3D2EDBCE691D07F6E5E /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; - 74076E38030CF36CF2DEBA8446B2B156 /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; - 74E396D4A3CBCFA52283FA71BFE1ED4C /* hash.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash.h; path = Classes/secp256k1/src/hash.h; sourceTree = ""; }; + 6E942712A2D0087AAF697A0E031459FE /* CMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CMAC.swift; path = Sources/CryptoSwift/CMAC.swift; sourceTree = ""; }; + 71D09134607D15AB2D81F0CB08D3F055 /* AEADChaCha20Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEADChaCha20Poly1305.swift; path = Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift; sourceTree = ""; }; + 73043D2C83B1F1E5EC8F0E15C2CFE5A5 /* Words and Bits.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Words and Bits.swift"; path = "sources/Words and Bits.swift"; sourceTree = ""; }; + 7340338CDF774E91E0F647AB7EB91924 /* StreamEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamEncryptor.swift; path = Sources/CryptoSwift/StreamEncryptor.swift; sourceTree = ""; }; + 736C0CC7DF9261F7C240BF88F7D310AD /* Authenticator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Authenticator.swift; path = Sources/CryptoSwift/Authenticator.swift; sourceTree = ""; }; + 7388674CDE22815644490821F0CB757B /* scalar_8x32_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32_impl.h; path = Classes/secp256k1/src/scalar_8x32_impl.h; sourceTree = ""; }; + 74111ED4B5372D2EE9A218621A18699C /* afterlife.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Extensions/Foundation/Sources/afterlife.swift; sourceTree = ""; }; + 74F90CB37B5FF688D45EE372C6FE875C /* Result-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-iOS-dummy.m"; sourceTree = ""; }; + 750CBC755AD04183E9D574E073F02223 /* SwiftRLP-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftRLP-macOS-prefix.pch"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-prefix.pch"; sourceTree = ""; }; 753E3CD3CF2AA32CDB11305D429F3C96 /* Pods-web3swift-iOS_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swift-iOS_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 755201B560E952C6A5333642B028695A /* libPromiseKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libPromiseKit.a; path = libPromiseKit.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 77419BCFFD51D71BDCD33CDB50A1DC50 /* BigInt-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "BigInt-iOS.xcconfig"; sourceTree = ""; }; - 78593F1D5D512221956B4CC2A7432B88 /* Primitive Types.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Primitive Types.swift"; path = "SipHash/Primitive Types.swift"; sourceTree = ""; }; - 7895D4EC130402D473CB15EDD68ACA2A /* scrypt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "scrypt-iOS.modulemap"; sourceTree = ""; }; - 79370D5C826074DD91DB303B75EACE7D /* Box.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Sources/Box.swift; sourceTree = ""; }; + 755E0B91B0984ADEF77E48E32C147276 /* Data Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data Conversion.swift"; path = "sources/Data Conversion.swift"; sourceTree = ""; }; + 7573EC5C506627456A38A22DC6C134BA /* libPods-web3swift-macOS_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-macOS_Tests.a"; path = "libPods-web3swift-macOS_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 75DE42DDF2D327BA352CD0F8C0DA4B0F /* libResult-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libResult-macOS.a"; path = "libResult-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 7692AAEAD8E8FFF8D2E46B60CBA56CDA /* SipHash-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-iOS-umbrella.h"; sourceTree = ""; }; + 7695A9A41BFEEAD40C0235B913A07672 /* AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; + 7739AC49E92EA0677899D077C015CE05 /* NSURLSession+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Promise.swift"; path = "Extensions/Foundation/Sources/NSURLSession+Promise.swift"; sourceTree = ""; }; + 77FB79008E5E4C52EE48B984D12A652E /* AES.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.swift; path = Sources/CryptoSwift/AES.swift; sourceTree = ""; }; + 78AC661E237EC28BD38872134D7F7E2B /* Integer Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Integer Conversion.swift"; path = "sources/Integer Conversion.swift"; sourceTree = ""; }; + 7953EE95375573E978E0FAC7F88260CF /* Shifts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Shifts.swift; path = sources/Shifts.swift; sourceTree = ""; }; 79E925BEAA0533C58B6D9871B886DD8A /* Pods-web3swift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-web3swift-iOS.modulemap"; sourceTree = ""; }; - 7A37EB85984F608037881FD6E14786A3 /* SipHash-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SipHash-iOS.xcconfig"; sourceTree = ""; }; - 7A45DEA061F03DB9EB78391B810792DD /* Array+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Extension.swift"; path = "Sources/CryptoSwift/Array+Extension.swift"; sourceTree = ""; }; - 7A83A5B7F0434C3FACA671C5A20D8389 /* eckey_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey_impl.h; path = Classes/secp256k1/src/eckey_impl.h; sourceTree = ""; }; - 7D2ED7B574BD12D6937C37D79B6355D2 /* secp256k1_swift-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "secp256k1_swift-iOS.xcconfig"; sourceTree = ""; }; - 7DC64F1DE162445FC5F9F8F1A2C818B1 /* NoError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoError.swift; path = Result/NoError.swift; sourceTree = ""; }; - 7E27EDB736A99A27C20F82D22DC4A707 /* GCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCM.swift; path = Sources/CryptoSwift/BlockMode/GCM.swift; sourceTree = ""; }; + 7B67DD6B4751EC541A3D153113AFB1B1 /* HMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HMAC.swift; path = Sources/CryptoSwift/HMAC.swift; sourceTree = ""; }; + 7CB204BDB01A5747B116731490529E2B /* EthereumAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumAddress.swift; path = EthereumAddress/Classes/EthereumAddress.swift; sourceTree = ""; }; + 7CC384B5F6C90CB968D0AB32162249B6 /* Updatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Updatable.swift; path = Sources/CryptoSwift/Updatable.swift; sourceTree = ""; }; + 7D903E031FC7FD31DA94E1EC68778019 /* lax_der_privatekey_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_privatekey_parsing.h; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.h; sourceTree = ""; }; + 7DE92E2A606B96369F79D742DFACB7C9 /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h"; sourceTree = ""; }; + 7DF576FC1DAC9EC11DA44099F4F50AFE /* secp256k1.c */ = {isa = PBXFileReference; includeInIndex = 1; name = secp256k1.c; path = Classes/secp256k1/src/secp256k1.c; sourceTree = ""; }; 7E8C19543EF3AA4D9801DBE55E22E211 /* Pods-web3swift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-web3swift-iOS-umbrella.h"; sourceTree = ""; }; - 8045272A42A0784613BD7057AA86803C /* ecmult_const_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const_impl.h; path = Classes/secp256k1/src/ecmult_const_impl.h; sourceTree = ""; }; - 80D7D244BE8CFD16A741C5261EA757D6 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; - 80ED01586B28193ED2BE26DEF9B57A3C /* ecdsa_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa_impl.h; path = Classes/secp256k1/src/ecdsa_impl.h; sourceTree = ""; }; - 83BD9FC5270AA1FFFF0B01504C9B8BB7 /* PKCS7.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7.swift; path = Sources/CryptoSwift/PKCS/PKCS7.swift; sourceTree = ""; }; - 8488F4ACF6A5A83E41E4C406582AB2C9 /* BigInt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "BigInt-macOS.modulemap"; path = "../BigInt-macOS/BigInt-macOS.modulemap"; sourceTree = ""; }; - 851772A4A36B2700215C3B972F05BB10 /* BigInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigInt.swift; path = sources/BigInt.swift; sourceTree = ""; }; - 853BAAA89F1726DECCF03BC01BBDC64C /* basic-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "basic-config.h"; path = "Classes/secp256k1/src/basic-config.h"; sourceTree = ""; }; - 856FFECE484989935BD3A92DEC7353E2 /* secp256k1_swift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "secp256k1_swift-iOS.modulemap"; sourceTree = ""; }; - 8674CB477181A24AA72377A5EF2E312C /* secp256k1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1.h; path = Classes/secp256k1/include/secp256k1.h; sourceTree = ""; }; - 8798FA9542F2175AA660CDB635E6D6BC /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift"; sourceTree = ""; }; - 87F900B38D104B7DA2F876FEF130BE54 /* SwiftRLP-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SwiftRLP-iOS.modulemap"; sourceTree = ""; }; - 89276AC70A47E00E5E08DB5C8D91C6C4 /* field_5x52_int128_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_int128_impl.h; path = Classes/secp256k1/src/field_5x52_int128_impl.h; sourceTree = ""; }; - 897BD312EFC7F005946FCA64E8B5D3F3 /* AES.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.swift; path = Sources/CryptoSwift/AES.swift; sourceTree = ""; }; - 8A22A5D6311176FFB8CFC5A84B52E457 /* Result-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "Result-macOS.modulemap"; path = "../Result-macOS/Result-macOS.modulemap"; sourceTree = ""; }; - 8A49E7FFAA1F69AF0BFDC8A0CFCB938D /* SipHash-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SipHash-macOS-dummy.m"; path = "../SipHash-macOS/SipHash-macOS-dummy.m"; sourceTree = ""; }; - 8AA2EF5FFE50FBD8EAB6BEA39D23C942 /* DigestType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DigestType.swift; path = Sources/CryptoSwift/DigestType.swift; sourceTree = ""; }; + 7EFDF78EEBE9836CDC5AE2FEEC50C17B /* Utils+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Utils+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Utils+Foundation.swift"; sourceTree = ""; }; + 80353B76ABA10ED9D59C18FDA6A16285 /* basic-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "basic-config.h"; path = "Classes/secp256k1/src/basic-config.h"; sourceTree = ""; }; + 809F44457475B204EE242D251FDF9E8E /* Comparable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Comparable.swift; path = sources/Comparable.swift; sourceTree = ""; }; + 80E74674EB94CDFBB8B77B11BACD6046 /* scrypt-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "scrypt-macOS.xcconfig"; path = "../scrypt-macOS/scrypt-macOS.xcconfig"; sourceTree = ""; }; + 81909D98916544A0C622EDB88411AE57 /* CipherModeWorker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CipherModeWorker.swift; path = Sources/CryptoSwift/BlockMode/CipherModeWorker.swift; sourceTree = ""; }; + 82E0889BDE7E61BD4767DCF66AB18FF7 /* CryptoSwift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "CryptoSwift-iOS.modulemap"; sourceTree = ""; }; + 8354A9A75879DFCE10CDFCD8B4B76EF5 /* AEAD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEAD.swift; path = Sources/CryptoSwift/AEAD/AEAD.swift; sourceTree = ""; }; + 83818CBF92E26919EE29AD92612A44AF /* SwiftRLP-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SwiftRLP-macOS.modulemap"; path = "../SwiftRLP-macOS/SwiftRLP-macOS.modulemap"; sourceTree = ""; }; + 840434A830881CF07FBDE172A20CDDDC /* NSObject+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Extensions/Foundation/Sources/NSObject+Promise.swift"; sourceTree = ""; }; + 85BEAAA1888D13FCFC9F1C2AB3A7ABBD /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; + 860EF39282D8941084557A3DCC1D7DF3 /* NSTask+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSTask+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.h"; sourceTree = ""; }; + 86800F1D45016DC59C9BE8B9ABF5B50F /* Bit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bit.swift; path = Sources/CryptoSwift/Bit.swift; sourceTree = ""; }; + 86B004B7F6AC62E27D75D02978601A76 /* NSTask+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSTask+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.m"; sourceTree = ""; }; + 86B372DE536C71560B5E85E340F3F6C9 /* PromiseKit.root-CorePromise-Foundation-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PromiseKit.root-CorePromise-Foundation-prefix.pch"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; sourceTree = ""; }; + 8787D00BE428B5C383E25BF2ABB38CC4 /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.h"; sourceTree = ""; }; + 8823C42C614B0067E2C89A5AE71DA77D /* BigInt-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "BigInt-macOS.xcconfig"; path = "../BigInt-macOS/BigInt-macOS.xcconfig"; sourceTree = ""; }; + 89B539CEC7927EBE7BBF7262580A0E18 /* Exponentiation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Exponentiation.swift; path = sources/Exponentiation.swift; sourceTree = ""; }; + 8AF5980AB239F34C8CB958F30A518A0B /* BigInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigInt.swift; path = sources/BigInt.swift; sourceTree = ""; }; 8B56F6A20A0CF698ECA0EDF6CF4CDD74 /* Pods-web3swift-iOS_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swift-iOS_Tests-dummy.m"; sourceTree = ""; }; - 8BE4DB426382B15B10062329955F15CC /* scalar.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar.h; path = Classes/secp256k1/src/scalar.h; sourceTree = ""; }; - 8C3AF144309D8E77765BE0E32200497A /* PromiseKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-umbrella.h"; sourceTree = ""; }; - 8C64B4995F9A0EBB5D4B5F27B33FB054 /* NSTask+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSTask+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.m"; sourceTree = ""; }; - 8D97871DE06423066D52CDBE28B74B3B /* PKCS5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS5.swift; path = Sources/CryptoSwift/PKCS/PKCS5.swift; sourceTree = ""; }; - 8E89406E7E995881E48051C7EC4C9DCB /* race.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = race.m; path = Sources/race.m; sourceTree = ""; }; - 903BE66455FF2F03FD9540A7E5914EC7 /* CFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CFB.swift; path = Sources/CryptoSwift/BlockMode/CFB.swift; sourceTree = ""; }; - 90AB4B8A04595134BFA9D538282F4E41 /* PromiseKit.root-CorePromise-Foundation.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "PromiseKit.root-CorePromise-Foundation.modulemap"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap"; sourceTree = ""; }; + 8C3F64F8D233B557ADBCBAB5F8D81F1E /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; + 8CC8A14105420D222F37BBB95BFBF1A3 /* secp256k1_swift-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "secp256k1_swift-macOS.xcconfig"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS.xcconfig"; sourceTree = ""; }; + 8EA80C3235171417958F658E327CCF8E /* Codable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Codable.swift; path = sources/Codable.swift; sourceTree = ""; }; + 8ED7C1CFBF67F4C0CD5645DF35F608F7 /* scrypt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "scrypt-iOS.modulemap"; sourceTree = ""; }; + 8F6102F002EDC216C49666462EF952CA /* DigestType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DigestType.swift; path = Sources/CryptoSwift/DigestType.swift; sourceTree = ""; }; + 906199A857C08F740EA182609488E191 /* Rabbit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rabbit.swift; path = Sources/CryptoSwift/Rabbit.swift; sourceTree = ""; }; + 907E15C94AE5E8DC2C60CE2BFA69AB19 /* BigInt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-prefix.pch"; sourceTree = ""; }; 90B410829D6E70A45A22CC62F187A11B /* Pods-web3swift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-web3swift-macOS.modulemap"; sourceTree = ""; }; - 91EFA6BFEDFE86C5744B8A08BD45CC1D /* Square Root.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Square Root.swift"; path = "sources/Square Root.swift"; sourceTree = ""; }; - 937DFD5ACC6B392C3B22DD0605410F52 /* Process+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Process+Promise.swift"; path = "Extensions/Foundation/Sources/Process+Promise.swift"; sourceTree = ""; }; - 938A29097DE727896422B7DD937D51E3 /* ecmult_gen_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen_impl.h; path = Classes/secp256k1/src/ecmult_gen_impl.h; sourceTree = ""; }; + 915D7A030D48CB0FE8360421BAB29B5B /* NoPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoPadding.swift; path = Sources/CryptoSwift/NoPadding.swift; sourceTree = ""; }; + 919A091F1E72F11C9C10844CC5454B2F /* SipHash-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SipHash-macOS.modulemap"; path = "../SipHash-macOS/SipHash-macOS.modulemap"; sourceTree = ""; }; + 93264D7DC7DF888A41AF35694C9CBF60 /* BufferStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BufferStorage.swift; path = scrypt/scrypt/BufferStorage.swift; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 93E416B2CCEC4490652DE3889013CC4A /* Blowfish+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Blowfish+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift"; sourceTree = ""; }; - 93F2C29FA3412D0329780F52C1DD2931 /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; - 955AD7671107B2FCAF7A725E38DA6513 /* RLP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RLP.swift; path = Classes/RLP.swift; sourceTree = ""; }; + 93A5B46AC7CC995589CAA3D991DC1B29 /* scratch_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch_impl.h; path = Classes/secp256k1/src/scratch_impl.h; sourceTree = ""; }; + 9411AC5861B33542BF71A1EED7E49FC4 /* scrypt.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scrypt.h; path = scrypt/scrypt.h; sourceTree = ""; }; + 944A08F05724AD8D1EC4F7FF0D09BFE6 /* scalar.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar.h; path = Classes/secp256k1/src/scalar.h; sourceTree = ""; }; 95C397E16B314F921F7784F00C8F183B /* Pods-web3swift-iOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swift-iOS-acknowledgements.plist"; sourceTree = ""; }; - 96CDA4C5CCCD8DD001D5D629E860B631 /* PCBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PCBC.swift; path = Sources/CryptoSwift/BlockMode/PCBC.swift; sourceTree = ""; }; - 970421396A3184DB620CB61E8AE71F58 /* num_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_impl.h; path = Classes/secp256k1/src/num_impl.h; sourceTree = ""; }; - 971DE8258824419E3875862D386B0558 /* SwiftRLP-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftRLP-macOS-prefix.pch"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-prefix.pch"; sourceTree = ""; }; - 9727D8BDEB33BD75AB806BC0A3EC155C /* Codable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Codable.swift; path = sources/Codable.swift; sourceTree = ""; }; - 983B0C09BEC11115522233D05D8F47D1 /* Comparable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Comparable.swift; path = sources/Comparable.swift; sourceTree = ""; }; - 98C1FF45802004439456C8A350D9155A /* PromiseKit.root-CorePromise-Foundation-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PromiseKit.root-CorePromise-Foundation-prefix.pch"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; sourceTree = ""; }; - 9AD9ED798FEF891C4A3123685AB25017 /* PKCS7Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7Padding.swift; path = Sources/CryptoSwift/PKCS/PKCS7Padding.swift; sourceTree = ""; }; - 9B108AA63200D2A6992501E7B76EF6A0 /* OFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OFB.swift; path = Sources/CryptoSwift/BlockMode/OFB.swift; sourceTree = ""; }; - 9B3C1FAD3DD5A0A918CA3605928E5CA9 /* CryptoSwift-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "CryptoSwift-macOS.xcconfig"; path = "../CryptoSwift-macOS/CryptoSwift-macOS.xcconfig"; sourceTree = ""; }; - 9CBD2032E8E6117EFD2C15AC9E728128 /* 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 = ""; }; - 9DE9FBA3C3EB5037CAB66A887E9BC6DE /* Array+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Array+Foundation.swift"; sourceTree = ""; }; - 9DFFAA6FC4E6A7DCD0DA8AE064B792DA /* Catchable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catchable.swift; path = Sources/Catchable.swift; sourceTree = ""; }; - 9E2278C6E7F3F4C4A66132D0E8E0517D /* PMKFoundation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKFoundation.h; path = Extensions/Foundation/Sources/PMKFoundation.h; sourceTree = ""; }; - 9E3F254D4EBA717445160AB2A3C16AE5 /* SwiftRLP-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SwiftRLP-macOS.modulemap"; path = "../SwiftRLP-macOS/SwiftRLP-macOS.modulemap"; sourceTree = ""; }; - 9FC6C3CA2D135767617F5F276FF395CC /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = Sources/CryptoSwift/CompactMap.swift; sourceTree = ""; }; - A094ABEA6C6E0AD5B87D62BB32AEA3DA /* util.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = util.h; path = Classes/secp256k1/src/util.h; sourceTree = ""; }; - A130AE149844CDF96BEAFC7381997641 /* AES.Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.Cryptors.swift; path = Sources/CryptoSwift/AES.Cryptors.swift; sourceTree = ""; }; - A14282AE6AF7AD75A532A9639BE44B88 /* libscrypt-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libscrypt-iOS.a"; path = "libscrypt-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A19805DB694C14E29F255EA2BB4603A5 /* ecmult_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_impl.h; path = Classes/secp256k1/src/ecmult_impl.h; sourceTree = ""; }; - A322E379ECBC90322624BA7A69FBBDEE /* libsecp256k1_swift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libsecp256k1_swift-iOS.a"; path = "libsecp256k1_swift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A3BCB7E3971A174E47D70212430A170B /* libBigInt-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libBigInt-iOS.a"; path = "libBigInt-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A3D2730C3BE7868E162AB4F297A3A7DE /* ecmult_const.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const.h; path = Classes/secp256k1/src/ecmult_const.h; sourceTree = ""; }; - A4072CCBD9D1A294C38285818FBFDA5F /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PromiseKit.modulemap; sourceTree = ""; }; - A4420324C5657482ABEBDA0BB3C73802 /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; - A4A8846DC8DC969B376FC38B435C87F8 /* scrypt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "scrypt-macOS.modulemap"; path = "../scrypt-macOS/scrypt-macOS.modulemap"; sourceTree = ""; }; - A5C805181714272769BB5BCEA4814B1D /* SHA2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA2.swift; path = Sources/CryptoSwift/SHA2.swift; sourceTree = ""; }; + 95C8DD41F37C777526C9EA621C9213C9 /* Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Poly1305.swift; path = Sources/CryptoSwift/Poly1305.swift; sourceTree = ""; }; + 95F76B715633F358CA7525D8C17738C9 /* GCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCM.swift; path = Sources/CryptoSwift/BlockMode/GCM.swift; sourceTree = ""; }; + 97504B2FA23741AEEDD649E58BF39870 /* libEthereumAddress-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libEthereumAddress-iOS.a"; path = "libEthereumAddress-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 9787E8C8BA8DAE16D659DA569EECED22 /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = sources/Random.swift; sourceTree = ""; }; + 9821B82F2A2D9E9E0A740B6B4B38A6AB /* field_10x26_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26_impl.h; path = Classes/secp256k1/src/field_10x26_impl.h; sourceTree = ""; }; + 982B03AB9D403479BF865D7C3A5B2D4F /* Thenable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Thenable.swift; path = Sources/Thenable.swift; sourceTree = ""; }; + 98A9FC519C49C693637C4BC5D0DD6EB7 /* PKCS5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS5.swift; path = Sources/CryptoSwift/PKCS/PKCS5.swift; sourceTree = ""; }; + 98C48C6F1DCE55E9EE6040D50626EF16 /* ECB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ECB.swift; path = Sources/CryptoSwift/BlockMode/ECB.swift; sourceTree = ""; }; + 9B7B36B7C3689A1ED9FBF4095AF74840 /* RandomBytesSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomBytesSequence.swift; path = Sources/CryptoSwift/RandomBytesSequence.swift; sourceTree = ""; }; + 9BFCCF45D62D69A50F9ED16BCE93C54A /* SHA2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA2.swift; path = Sources/CryptoSwift/SHA2.swift; sourceTree = ""; }; + 9D1AB32F0AE7B734159BB1FBAF7F5078 /* hash.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash.h; path = Classes/secp256k1/src/hash.h; sourceTree = ""; }; + 9D5F98CA61161B592980B259143F48F5 /* Floating Point Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Floating Point Conversion.swift"; path = "sources/Floating Point Conversion.swift"; sourceTree = ""; }; + 9E8B25F37CB474A2BE03252DDC5BA0BE /* CryptoSwift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "CryptoSwift-macOS.modulemap"; path = "../CryptoSwift-macOS/CryptoSwift-macOS.modulemap"; sourceTree = ""; }; + 9F576E04543F9CA8FD11EFA190633C0F /* StreamDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamDecryptor.swift; path = Sources/CryptoSwift/StreamDecryptor.swift; sourceTree = ""; }; + A0347CA8676D7E491A4DA559FB78007F /* SipHash-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SipHash-iOS.xcconfig"; sourceTree = ""; }; + A09088A41F90C0893A27DEF1C26D11AB /* libPromiseKit.root-CorePromise-Foundation.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPromiseKit.root-CorePromise-Foundation.a"; path = "libPromiseKit.root-CorePromise-Foundation.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + A0CE29B48517362C21FF1B3F9DCB7619 /* scrypt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "scrypt-macOS.modulemap"; path = "../scrypt-macOS/scrypt-macOS.modulemap"; sourceTree = ""; }; + A2A0CFEEC4EEE7DD9F58B6A45DE63C89 /* BigInt-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "BigInt-iOS.xcconfig"; sourceTree = ""; }; + A516C73CD574B0D6BA84C38BB55FBD2D /* BigInt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BigInt-iOS-dummy.m"; sourceTree = ""; }; A5D9B32B104EA0A137D78B89D4D19D40 /* Pods-web3swift-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-macOS.release.xcconfig"; sourceTree = ""; }; - A65DC6A2E9BC70E1F5211BFB9E2266E3 /* scalar_low_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low_impl.h; path = Classes/secp256k1/src/scalar_low_impl.h; sourceTree = ""; }; - A7530E3D35773A67134FC4EA93063F01 /* Utils+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Utils+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Utils+Foundation.swift"; sourceTree = ""; }; - A7A5666EAA8ADD7A2AA3ED33C8DC6028 /* hash_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash_impl.h; path = Classes/secp256k1/src/hash_impl.h; sourceTree = ""; }; - A81557551191339AD284647E9008F3BF /* BigInt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BigInt-iOS-dummy.m"; sourceTree = ""; }; - A8E64677621D080BA0F099180A4886F7 /* Cimpl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Cimpl.h; path = scrypt/Cimpl.h; sourceTree = ""; }; - A90907EC55F455C898F8D8E35C2908DC /* SHA1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA1.swift; path = Sources/CryptoSwift/SHA1.swift; sourceTree = ""; }; - AA57B8C185D40985D37E5A9E9CB7B3D6 /* HMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HMAC.swift; path = Sources/CryptoSwift/HMAC.swift; sourceTree = ""; }; - AC98E623829FE2C9F71C5C97B66118C8 /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; - ACBB5EB9CDB6065227935806FA94DC6B /* Hashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hashable.swift; path = sources/Hashable.swift; sourceTree = ""; }; - AD7DDD48316C5C9CF661C50B3D19698E /* fwd.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = fwd.h; path = Sources/fwd.h; sourceTree = ""; }; - ADC3E9B80B8AC54146B2DFEDA0142CAF /* BlockDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockDecryptor.swift; path = Sources/CryptoSwift/BlockDecryptor.swift; sourceTree = ""; }; - AE738DB7791144612A4D0951B0C43A7E /* UIView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.m"; sourceTree = ""; }; - AEC2C04096B2D2B92821B75319989EC8 /* StreamEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamEncryptor.swift; path = Sources/CryptoSwift/StreamEncryptor.swift; sourceTree = ""; }; - AF7AF6D769E4BBF1B2C201836A906130 /* field_5x52_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_impl.h; path = Classes/secp256k1/src/field_5x52_impl.h; sourceTree = ""; }; - B017F47BE0A65E45E065EA00452F0D28 /* BufferStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BufferStorage.swift; path = scrypt/scrypt/BufferStorage.swift; sourceTree = ""; }; - B16FB18636FBF37732FFEDB58EF77090 /* Addition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Addition.swift; path = sources/Addition.swift; sourceTree = ""; }; - B184A67AF0236537BEE898D90E946942 /* secp256k1.c */ = {isa = PBXFileReference; includeInIndex = 1; name = secp256k1.c; path = Classes/secp256k1/src/secp256k1.c; sourceTree = ""; }; - B276DAA5AD0B968F80A0769180CCC012 /* scalar_low.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low.h; path = Classes/secp256k1/src/scalar_low.h; sourceTree = ""; }; - B3729C94C12C882F36F0F22DD2AA6ED2 /* Result-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-iOS-prefix.pch"; sourceTree = ""; }; - B508E0F1A0F3142EB46882B0104D6F6B /* Floating Point Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Floating Point Conversion.swift"; path = "sources/Floating Point Conversion.swift"; sourceTree = ""; }; + A7C42C91EB3AFB8674EB313560E4D9A8 /* EthereumAddress-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "EthereumAddress-iOS.modulemap"; sourceTree = ""; }; + A8865640371B98CE908E1A9A63C4B984 /* libCryptoSwift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libCryptoSwift-iOS.a"; path = "libCryptoSwift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + AA1E87AB6BC235D2BF0B5287F5ADD105 /* EthereumAddress-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "EthereumAddress-macOS.xcconfig"; path = "../EthereumAddress-macOS/EthereumAddress-macOS.xcconfig"; sourceTree = ""; }; + AB4C3483E321FFBD045AB8FDC37CF8FA /* Array+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Array+Foundation.swift"; sourceTree = ""; }; + AC8ED311289866CD8ED870EF0C3C5CF3 /* libBigInt-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libBigInt-iOS.a"; path = "libBigInt-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + AD76DBA7730870FE66D77B1FC33E49E0 /* EthereumAddress-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "EthereumAddress-iOS.xcconfig"; sourceTree = ""; }; + ADC86A3FC56A1BAE1CA3490D081E47F3 /* Checksum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Checksum.swift; path = Sources/CryptoSwift/Checksum.swift; sourceTree = ""; }; + AEA94352D4A3D0793D359A8C1CB50E4A /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/recovery/main_impl.h; sourceTree = ""; }; + AEB5F00EFE918C35C091FD2FA7EACBF5 /* group.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group.h; path = Classes/secp256k1/src/group.h; sourceTree = ""; }; + AFD1168E711269E444E38FCAE0B8E5D9 /* UInt128.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UInt128.swift; path = Sources/CryptoSwift/UInt128.swift; sourceTree = ""; }; + AFD5882A04E0E27679FE6AAC8D9CA935 /* UIView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.m"; sourceTree = ""; }; + B177F4FEBB7F565C10EB6AABDF0CFB6C /* ecmult_const_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const_impl.h; path = Classes/secp256k1/src/ecmult_const_impl.h; sourceTree = ""; }; + B2300EAF13A4BCCC04BBD2896E58716D /* 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 = ""; }; + B2E36C3B29C59A6C972DBF40C0EF93D5 /* ecdsa_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa_impl.h; path = Classes/secp256k1/src/ecdsa_impl.h; sourceTree = ""; }; + B41DB7D6043E138E3CA32DF5B5194D9B /* Result-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "Result-macOS.modulemap"; path = "../Result-macOS/Result-macOS.modulemap"; sourceTree = ""; }; + B42A16A3F62043A99FFE8BDB6DB55ACB /* BigInt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "BigInt-macOS.modulemap"; path = "../BigInt-macOS/BigInt-macOS.modulemap"; sourceTree = ""; }; + B5874904C32DED94E05CFD33023E2A19 /* SwiftRLP-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SwiftRLP-iOS.modulemap"; sourceTree = ""; }; + B6112FCF75FBFC58E314A40652665F06 /* CryptoSwift-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "CryptoSwift-iOS.xcconfig"; sourceTree = ""; }; B7762E4245191B27674EB7EB82DCFFF1 /* Pods-web3swift-macOS_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-macOS_Tests.debug.xcconfig"; sourceTree = ""; }; - B7CB9A9AD1846703E487266D4F3BCCBB /* scalar_8x32.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32.h; path = Classes/secp256k1/src/scalar_8x32.h; sourceTree = ""; }; - B89A9869F658850405B3C9B8EEB11C88 /* BigInt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-umbrella.h"; sourceTree = ""; }; - B9E4625A0B76DCA266EA9671890C8721 /* SHA3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA3.swift; path = Sources/CryptoSwift/SHA3.swift; sourceTree = ""; }; - BA4DC9927DEE120B1F101C5D3C546B09 /* CryptoSwift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CryptoSwift-iOS-dummy.m"; sourceTree = ""; }; - BA5CA30AC50EF9F974BA8C9CA66250F4 /* SwiftRLP-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftRLP-macOS-umbrella.h"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h"; sourceTree = ""; }; - BAD613601EE703E9FF05CEC481713273 /* libPods-web3swift-iOS_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-iOS_Tests.a"; path = "libPods-web3swift-iOS_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - BB95DBC141DB412EAF90DE75B00EE345 /* CMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CMAC.swift; path = Sources/CryptoSwift/CMAC.swift; sourceTree = ""; }; - BC6C4D45E9DD5B4669397278183B8A6D /* PromiseKit.root-CorePromise-Foundation.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "PromiseKit.root-CorePromise-Foundation.xcconfig"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.xcconfig"; sourceTree = ""; }; - BE6305D1DE9131CFB173AC969FDB1092 /* secp256k1_ecdh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_ecdh.h; path = Classes/secp256k1/include/secp256k1_ecdh.h; sourceTree = ""; }; - BFC0489E9BD48E1BE679A7A9A3B4D875 /* secp256k1_swift-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-iOS-prefix.pch"; sourceTree = ""; }; - BFC2F7559BA52B8D992D11A537D7FEBE /* CryptoSwift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "CryptoSwift-macOS-dummy.m"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-dummy.m"; sourceTree = ""; }; - C02A5DDAE1965271228C7E856C9987C3 /* PBKDF1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF1.swift; path = Sources/CryptoSwift/PKCS/PBKDF1.swift; sourceTree = ""; }; - C0B695B584A94039305F17CD2B5470FB /* Exponentiation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Exponentiation.swift; path = sources/Exponentiation.swift; sourceTree = ""; }; - C0D976FDA3B329F00236A2F1D4C6B378 /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; - C33EA4F090C90D1AE636D3B40ECFA945 /* firstly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = firstly.swift; path = Sources/firstly.swift; sourceTree = ""; }; - C4434E5B7050EF71B04AEAE88F303455 /* Blowfish.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Blowfish.swift; path = Sources/CryptoSwift/Blowfish.swift; sourceTree = ""; }; - C504B703D6897FF1896886916748D0D6 /* ZeroPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZeroPadding.swift; path = Sources/CryptoSwift/ZeroPadding.swift; sourceTree = ""; }; - C533250E0867F5CF90717B90B4450C63 /* PromiseKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; - C535818543FB132F5085E5ED501095D0 /* Guarantee.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Guarantee.swift; path = Sources/Guarantee.swift; sourceTree = ""; }; - C5648942F9F59CF9D06030DB7B64423A /* secp256k1_recovery.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_recovery.h; path = Classes/secp256k1/include/secp256k1_recovery.h; sourceTree = ""; }; - C7E88808C507E7B039F9595A82EBFA36 /* SwiftRLP-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SwiftRLP-macOS.xcconfig"; path = "../SwiftRLP-macOS/SwiftRLP-macOS.xcconfig"; sourceTree = ""; }; - C83C510AD112596C90B76C308A60DF14 /* Integer Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Integer Conversion.swift"; path = "sources/Integer Conversion.swift"; sourceTree = ""; }; - C8EA9E5ADEC0526C987DC2B55F8E04B5 /* SipHasher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHasher.swift; path = SipHash/SipHasher.swift; sourceTree = ""; }; - C906CE7510F7153C35950FD44AE3C571 /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/CryptoSwift/Operators.swift; sourceTree = ""; }; - CCFDF41D2D776C88B83F392CB5FD7499 /* PromiseKit.root-CorePromise-Foundation-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PromiseKit.root-CorePromise-Foundation-dummy.m"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-dummy.m"; sourceTree = ""; }; - CD2614924B987A4DF27727D9ABE96822 /* scrypt-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "scrypt-macOS-umbrella.h"; path = "../scrypt-macOS/scrypt-macOS-umbrella.h"; sourceTree = ""; }; - CD4C2245061DDD251D7082A04D84F218 /* CryptoSwift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CryptoSwift-macOS-umbrella.h"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h"; sourceTree = ""; }; - CDD971533936CC3705E267598BF53A93 /* UInt128.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UInt128.swift; path = Sources/CryptoSwift/UInt128.swift; sourceTree = ""; }; - CE82C576F4D863F22181DF0D90DA8533 /* scalar_4x64_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64_impl.h; path = Classes/secp256k1/src/scalar_4x64_impl.h; sourceTree = ""; }; - CEDD84C820765F4B8C5826D1B122200E /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; - CEF60C13887D74275029301DCC6A1149 /* scalar_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_impl.h; path = Classes/secp256k1/src/scalar_impl.h; sourceTree = ""; }; - D016DA64236C44F87FFCE97A6F0A0E06 /* BlockEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockEncryptor.swift; path = Sources/CryptoSwift/BlockEncryptor.swift; sourceTree = ""; }; - D0C6A6AAF1849184B1A8916E223E9BCB /* String+FoundationExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FoundationExtension.swift"; path = "Sources/CryptoSwift/Foundation/String+FoundationExtension.swift"; sourceTree = ""; }; - D0E5F085DD39FA26739ECAD91284C1F2 /* ecdsa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa.h; path = Classes/secp256k1/src/ecdsa.h; sourceTree = ""; }; - D111E53D728978DA7C689AD4AFDCA963 /* Thenable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Thenable.swift; path = Sources/Thenable.swift; sourceTree = ""; }; - D11A10393AAAF35194650B10A6ADE234 /* secp256k1_swift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "secp256k1_swift-macOS-umbrella.h"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h"; sourceTree = ""; }; - D40BD5126F631E22619456FA8B7796CD /* libBigInt-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libBigInt-macOS.a"; path = "libBigInt-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - D4F3DB8A969B504C000E0BD68E9DF848 /* Rabbit+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Rabbit+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift"; sourceTree = ""; }; - D5FF562EECDB0679D662D82F7A5AF6C0 /* UIView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Extensions/UIKit/Sources/UIView+Promise.swift"; sourceTree = ""; }; - D67B21BD5ECE586715CDCB8EF9F84E24 /* SecureBytes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SecureBytes.swift; path = Sources/CryptoSwift/SecureBytes.swift; sourceTree = ""; }; + B7D5FD5536C89792D33769E9EDFA2DE8 /* CFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CFB.swift; path = Sources/CryptoSwift/BlockMode/CFB.swift; sourceTree = ""; }; + B90CC3B80037E1B917D44513A07D0F6C /* BigInt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-umbrella.h"; sourceTree = ""; }; + B9737D99B060F85A0A42A3A30335B14F /* scalar_4x64.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64.h; path = Classes/secp256k1/src/scalar_4x64.h; sourceTree = ""; }; + BA200D6941B69ACC080DFB132BEFF422 /* num_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_impl.h; path = Classes/secp256k1/src/num_impl.h; sourceTree = ""; }; + BC0E5DF49745E221D708C75FC2B03DC7 /* AES+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AES+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/AES+Foundation.swift"; sourceTree = ""; }; + BD14A2D2C9467CDF73E9EC39F2B97E62 /* Hashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hashable.swift; path = sources/Hashable.swift; sourceTree = ""; }; + C05A424003F07748E6FAD6C9A57EEC23 /* BigInt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "BigInt-iOS.modulemap"; sourceTree = ""; }; + C06A130503E666429FAF2F0101641EE7 /* secp256k1_swift-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "secp256k1_swift-macOS-prefix.pch"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; sourceTree = ""; }; + C1BDC161E1A001A666E01A22455E14B5 /* AES.Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.Cryptors.swift; path = Sources/CryptoSwift/AES.Cryptors.swift; sourceTree = ""; }; + C21956F497DCFA1D883CAC00AF330784 /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; + C30494B6003825A7F5E0AE152495E590 /* Result-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-iOS-umbrella.h"; sourceTree = ""; }; + C31ABCFEE7AE67562C4CEBB66C7ED4D6 /* ZeroPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZeroPadding.swift; path = Sources/CryptoSwift/ZeroPadding.swift; sourceTree = ""; }; + C47CE1FE3AEC19CC322E3E03530D21CD /* PCBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PCBC.swift; path = Sources/CryptoSwift/BlockMode/PCBC.swift; sourceTree = ""; }; + C4D487F201A77E03F9ADC03703A1A897 /* scrypt-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "scrypt-macOS-prefix.pch"; path = "../scrypt-macOS/scrypt-macOS-prefix.pch"; sourceTree = ""; }; + C57F4AE68BD0AD2EE5867A1CA2A12FCC /* SipHash-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SipHash-iOS-dummy.m"; sourceTree = ""; }; + C66DD520FECE2C1EE69FD6A9E23EA032 /* field_5x52.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52.h; path = Classes/secp256k1/src/field_5x52.h; sourceTree = ""; }; + C6D3FAB581FA1884038308CAAD092260 /* NSURLSession+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLSession+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.h"; sourceTree = ""; }; + C717226571D60D3C7D8E15B4EDCC2E0F /* Collection+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Collection+Extension.swift"; path = "Sources/CryptoSwift/Collection+Extension.swift"; sourceTree = ""; }; + CA8015AE976B6601CC46035D043423E4 /* PromiseKit.root-CorePromise-Foundation.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "PromiseKit.root-CorePromise-Foundation.modulemap"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap"; sourceTree = ""; }; + CA97BDA6DF1DE11A96470DBF6FBD7C62 /* lax_der_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_parsing.c; path = Classes/secp256k1/contrib/lax_der_parsing.c; sourceTree = ""; }; + CAC966A4293FF7689DD8A3B2877731F3 /* Blowfish.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Blowfish.swift; path = Sources/CryptoSwift/Blowfish.swift; sourceTree = ""; }; + CB0B1B247B08E4A2259D6D21ABAB0304 /* MD5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MD5.swift; path = Sources/CryptoSwift/MD5.swift; sourceTree = ""; }; + CB4E43C9EB1F78AD84B2314039898608 /* GCD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCD.swift; path = sources/GCD.swift; sourceTree = ""; }; + CC4C922D64767063B8D1A270D793373B /* BlockEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockEncryptor.swift; path = Sources/CryptoSwift/BlockEncryptor.swift; sourceTree = ""; }; + CD8AF5512E4598482BBFB4AD1BBF8064 /* PKCS7.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7.swift; path = Sources/CryptoSwift/PKCS/PKCS7.swift; sourceTree = ""; }; + CEA9421290E9294FEA25D9F6D3DDD24C /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; + D08241C8DB918E40A54A24828275D1C5 /* secp256k1_swift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-iOS-umbrella.h"; sourceTree = ""; }; + D13D2441410EEFA35EFB1823E238648A /* Cryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptor.swift; path = Sources/CryptoSwift/Cryptor.swift; sourceTree = ""; }; + D1FC3BBD92A37B6D1B9844791FDD7F86 /* Bitwise Ops.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bitwise Ops.swift"; path = "sources/Bitwise Ops.swift"; sourceTree = ""; }; + D275AC61F658F73CFA8823434BCA3406 /* libPods-web3swift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-iOS.a"; path = "libPods-web3swift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + D286B6A0694F7E16078B8E7642CAE6FD /* Generics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generics.swift; path = Sources/CryptoSwift/Generics.swift; sourceTree = ""; }; + D292A1945503B3A000AC47BB73889903 /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Extension.swift"; path = "Sources/CryptoSwift/String+Extension.swift"; sourceTree = ""; }; + D3E0EFDBB92A100EDE06E9D563ACF26E /* PKCS7Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7Padding.swift; path = Sources/CryptoSwift/PKCS/PKCS7Padding.swift; sourceTree = ""; }; + D4294CA40AB575970217A19CAA320DC0 /* SwiftRLP-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftRLP-iOS-dummy.m"; sourceTree = ""; }; + D44F8F4C5F0D588B00DF17BC6518E5E0 /* Rabbit+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Rabbit+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift"; sourceTree = ""; }; + D57256C33A9C97F888F53A4FB7226146 /* UInt32+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt32+Extension.swift"; path = "Sources/CryptoSwift/UInt32+Extension.swift"; sourceTree = ""; }; + D6AB002E9D0C7DDC501F8673C4419E81 /* SipHash-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SipHash-macOS-prefix.pch"; path = "../SipHash-macOS/SipHash-macOS-prefix.pch"; sourceTree = ""; }; + D7009940ED0BFC1AA385433559754C27 /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; + D8241FAE07EC659EA8EE9D035AB05377 /* scalar_4x64_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64_impl.h; path = Classes/secp256k1/src/scalar_4x64_impl.h; sourceTree = ""; }; + D8D1F94E4F2A45EC9F2154127E14D416 /* CryptoSwift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "CryptoSwift-macOS-dummy.m"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-dummy.m"; sourceTree = ""; }; D8F688145BCFE1FB8B76299CC261A05E /* Pods-web3swift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swift-iOS-dummy.m"; sourceTree = ""; }; + D9A9A6187028CC6AD623334BA2899FDE /* lax_der_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_parsing.h; path = Classes/secp256k1/contrib/lax_der_parsing.h; sourceTree = ""; }; + D9C39AD388A82A531C338B26EE00DB9C /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift"; sourceTree = ""; }; + D9F882189D9E2CE8D7B7DC60BA0D5AF6 /* PBKDF2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF2.swift; path = Sources/CryptoSwift/PKCS/PBKDF2.swift; sourceTree = ""; }; DA900039B5D199745C785144030E7BF9 /* Pods-web3swift-macOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swift-macOS-acknowledgements.markdown"; sourceTree = ""; }; - DABE6207D44D964FBF0C1EB8B82F13A5 /* Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Utils.swift; path = Sources/CryptoSwift/Utils.swift; sourceTree = ""; }; - DB805D8CD6E362AD3B2474D5C6D7EA6E /* libPromiseKit.root-CorePromise-Foundation.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPromiseKit.root-CorePromise-Foundation.a"; path = "libPromiseKit.root-CorePromise-Foundation.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - DC010BC54E6C05686BE227F75B04535D /* field_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_impl.h; path = Classes/secp256k1/src/field_impl.h; sourceTree = ""; }; - DC03B1A635B5BB3ABD74980E5A3FFCF1 /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = sources/Random.swift; sourceTree = ""; }; - DC3D6E08FC4B31786E28A3DD414DE71C /* MD5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MD5.swift; path = Sources/CryptoSwift/MD5.swift; sourceTree = ""; }; - DCC85A555F579FA10EC96590296D9288 /* CipherModeWorker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CipherModeWorker.swift; path = Sources/CryptoSwift/BlockMode/CipherModeWorker.swift; sourceTree = ""; }; + DAC89259204E1C6A18BCD0B7D08C104B /* RandomUInt64.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomUInt64.swift; path = SipHash/RandomUInt64.swift; sourceTree = ""; }; DCCD9B75F811575B41254E2EACE6F115 /* Pods-web3swift-macOS_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swift-macOS_Tests-acknowledgements.plist"; sourceTree = ""; }; - DF2520CE6C39BFEF4B6C9B87DA7047AD /* HKDF.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HKDF.swift; path = Sources/CryptoSwift/HKDF.swift; sourceTree = ""; }; - E0D2913DF679358122E366AA30A31733 /* ecmult_gen.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen.h; path = Classes/secp256k1/src/ecmult_gen.h; sourceTree = ""; }; - E0E2C657091728E6CC4D8093DA13C072 /* group.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group.h; path = Classes/secp256k1/src/group.h; sourceTree = ""; }; - E330212AA4C3537D541AD9C197932C16 /* CBCMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBCMAC.swift; path = Sources/CryptoSwift/CBCMAC.swift; sourceTree = ""; }; + DF39D90FCE7EA42EF346003BA8EF96AF /* ecmult_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_impl.h; path = Classes/secp256k1/src/ecmult_impl.h; sourceTree = ""; }; + DF4D45B809574B97A749EADBA2EFAB02 /* CBCMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBCMAC.swift; path = Sources/CryptoSwift/CBCMAC.swift; sourceTree = ""; }; + E022DA9B1DCAC9A88B18D90457826545 /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; + E26835835263C5B5310353A54E6AA37E /* secp256k1_swift-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-iOS-prefix.pch"; sourceTree = ""; }; + E34CB7E7EAC6A9C0F75649FD43EC23F2 /* SipHash-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SipHash-macOS-dummy.m"; path = "../SipHash-macOS/SipHash-macOS-dummy.m"; sourceTree = ""; }; + E34EBA5D815562B6AEF202EEF42D4456 /* SwiftRLP-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SwiftRLP-iOS.xcconfig"; sourceTree = ""; }; E3ADB0156604A4FD7CD47B25248088C2 /* Pods-web3swift-iOS_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-iOS_Tests.release.xcconfig"; sourceTree = ""; }; - E4211F7070401959F35EE92C5214007C /* NSObject+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Extensions/Foundation/Sources/NSObject+Promise.swift"; sourceTree = ""; }; - E473E833B6236676C6F4E9274FEE290D /* num_gmp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp.h; path = Classes/secp256k1/src/num_gmp.h; sourceTree = ""; }; - E5253ADE5894EBF14D938D154E2B0227 /* field_10x26_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26_impl.h; path = Classes/secp256k1/src/field_10x26_impl.h; sourceTree = ""; }; - E590EF6D990EA299BA2660A1BC53DEB9 /* CryptoSwift-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CryptoSwift-macOS-prefix.pch"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; sourceTree = ""; }; - E684DB7BA3E633421079ECE297E5C154 /* Subtraction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Subtraction.swift; path = sources/Subtraction.swift; sourceTree = ""; }; - E6D16C3019A7CC7FFDD41C97E69DCB84 /* Rabbit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rabbit.swift; path = Sources/CryptoSwift/Rabbit.swift; sourceTree = ""; }; - E931DAD7852F3C297E4BB3A0A4928BCB /* libCryptoSwift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libCryptoSwift-macOS.a"; path = "libCryptoSwift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - E9584FC30610F2691B4EB045534020D8 /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h"; sourceTree = ""; }; - E9F009B8B3BE27687063703C35463B71 /* BatchedCollection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BatchedCollection.swift; path = Sources/CryptoSwift/BatchedCollection.swift; sourceTree = ""; }; - EA0E1E254A8A60AE7835DB964A9891CD /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; - EA7E3E2AA7DDB383A58F583E451F6C05 /* field_5x52_asm_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_asm_impl.h; path = Classes/secp256k1/src/field_5x52_asm_impl.h; sourceTree = ""; }; - EAE702C1BF30A6CA8F718732EC9270FF /* libSwiftRLP-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSwiftRLP-iOS.a"; path = "libSwiftRLP-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - EB554DF617A1C02E83AC1D59855D1C02 /* SipHash-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-iOS-prefix.pch"; sourceTree = ""; }; - EC9440034E7256986111FBC505567C26 /* secp256k1_swift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-iOS-umbrella.h"; sourceTree = ""; }; - ECD10A42BA1863127F0B89583918A25F /* Result-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Result-iOS.modulemap"; sourceTree = ""; }; - ED52325262247A4879433CE3D7BA1251 /* Int+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Int+Extension.swift"; path = "Sources/CryptoSwift/Int+Extension.swift"; sourceTree = ""; }; - ED58AECF3C5444FBDEB7453CDD6D6A96 /* Checksum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Checksum.swift; path = Sources/CryptoSwift/Checksum.swift; sourceTree = ""; }; - EE76562D54EFA48803D8FF2937F3AB0A /* scrypt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-iOS-prefix.pch"; sourceTree = ""; }; - EEB151B14FA1CAF4FB16D76AE7F505AC /* Cipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cipher.swift; path = Sources/CryptoSwift/Cipher.swift; sourceTree = ""; }; - EEF44FF851A27BCE1872F1FEBF9A9440 /* CryptoSwift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-iOS-umbrella.h"; sourceTree = ""; }; - F041C44E58385737D071918EF8503628 /* SipHash-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SipHash-macOS-prefix.pch"; path = "../SipHash-macOS/SipHash-macOS-prefix.pch"; sourceTree = ""; }; - F04918D981D6BA6B8E1B45E4C1D23089 /* SipHash-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SipHash-iOS-dummy.m"; sourceTree = ""; }; - F10DABC5ADF2971E57D527449B163046 /* BigInt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-prefix.pch"; sourceTree = ""; }; - F31913059D849B57CB91C3B18F4D92EB /* Prime Test.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Prime Test.swift"; path = "sources/Prime Test.swift"; sourceTree = ""; }; - F40F91A4B7758F182DBA05D9C974003E /* scrypt-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "scrypt-macOS.xcconfig"; path = "../scrypt-macOS/scrypt-macOS.xcconfig"; sourceTree = ""; }; + E65308F679CCAADBBF14F5DB4971CD21 /* Cimpl.c */ = {isa = PBXFileReference; includeInIndex = 1; name = Cimpl.c; path = scrypt/Cimpl.c; sourceTree = ""; }; + E79185DFEB64004C5523F725F3DC89B0 /* CryptoSwift-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "CryptoSwift-macOS.xcconfig"; path = "../CryptoSwift-macOS/CryptoSwift-macOS.xcconfig"; sourceTree = ""; }; + E7E7786C2EC1054AF047E2571B12205F /* util.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = util.h; path = Classes/secp256k1/src/util.h; sourceTree = ""; }; + E81CDB6F58099035E4B22900B2E0740D /* Int+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Int+Extension.swift"; path = "Sources/CryptoSwift/Int+Extension.swift"; sourceTree = ""; }; + E8554570D5B7F10CEE0823FEB5B80B8D /* PromiseKit.root-CorePromise-Foundation.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "PromiseKit.root-CorePromise-Foundation.xcconfig"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.xcconfig"; sourceTree = ""; }; + E90C5426B3E9CBBCF9A8B6731836D354 /* UIView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Extensions/UIKit/Sources/UIView+Promise.swift"; sourceTree = ""; }; + EA3D1883E9BD064F4B9299B5825061E7 /* String+FoundationExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FoundationExtension.swift"; path = "Sources/CryptoSwift/Foundation/String+FoundationExtension.swift"; sourceTree = ""; }; + EA5498F48A9D57F5578FB70B8544C14C /* secp256k1_swift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "secp256k1_swift-macOS.modulemap"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap"; sourceTree = ""; }; + EB0E2A41F4665970E5124BB49E1B4D55 /* SipHash-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-iOS-prefix.pch"; sourceTree = ""; }; + EB3A44C98D1E93465803241C08887CDD /* num.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num.h; path = Classes/secp256k1/src/num.h; sourceTree = ""; }; + EBD8BA7DCEF1E0FF9602E3F7BE941878 /* SipHasher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHasher.swift; path = SipHash/SipHasher.swift; sourceTree = ""; }; + EBF499BFE8AA65F3D4DF5B33BA57DC88 /* SwiftRLP-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-iOS-prefix.pch"; sourceTree = ""; }; + ED4A3438C4739D717703BAE1F7020595 /* Deprecations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecations.swift; path = Sources/Deprecations.swift; sourceTree = ""; }; + EE67CD504E9DAC9DEA10C48C45C9E86B /* SipHash-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SipHash-iOS.modulemap"; sourceTree = ""; }; + EE7F6BB14F19AC57CB96B2D06603E845 /* ChaCha20.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChaCha20.swift; path = Sources/CryptoSwift/ChaCha20.swift; sourceTree = ""; }; + EE8A73B5FBE9F82E34238AC840FC7331 /* eckey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey.h; path = Classes/secp256k1/src/eckey.h; sourceTree = ""; }; + EF13999388904A7883CEA9B745018AAF /* libBigInt-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libBigInt-macOS.a"; path = "libBigInt-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + EFCBEFE9DA6D7F361DBB180EB84492D2 /* BlockCipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockCipher.swift; path = Sources/CryptoSwift/BlockCipher.swift; sourceTree = ""; }; + F03C5346C1BA44E2325916DC9CE7B67B /* SwiftRLP-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-iOS-umbrella.h"; sourceTree = ""; }; + F0866AEDD788E4D8B51A31A2FB8C294F /* scrypt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "scrypt-iOS-dummy.m"; sourceTree = ""; }; + F1899C74540C37F7D84214CF9F8AD010 /* NSNotificationCenter+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSNotificationCenter+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m"; sourceTree = ""; }; + F218E50D513522160983106C90B34FBE /* Prime Test.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Prime Test.swift"; path = "sources/Prime Test.swift"; sourceTree = ""; }; + F25882CAD0730D8C76F023B8C6FA287C /* Blowfish+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Blowfish+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift"; sourceTree = ""; }; + F310D1B89DD81708BBBAED0DDF1B1168 /* CryptoSwift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-iOS-umbrella.h"; sourceTree = ""; }; + F32BA5AE4C0BE79090A24F00A3F35AFF /* Strideable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Strideable.swift; path = sources/Strideable.swift; sourceTree = ""; }; F45D1FF9B0F3BEACB34D069C6F3561F8 /* Pods-web3swift-iOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swift-iOS-acknowledgements.markdown"; sourceTree = ""; }; - F465EA5AEC974D4B2AAFFFC2768A91D7 /* afterlife.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Extensions/Foundation/Sources/afterlife.swift; sourceTree = ""; }; - F5740FDA157E822449AD928A2FC56532 /* SwiftRLP.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftRLP.h; path = SwiftRLP/SwiftRLP.h; sourceTree = ""; }; - F6060667D5D66C779C8BC742A2C7F5F6 /* UInt16+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt16+Extension.swift"; path = "Sources/CryptoSwift/UInt16+Extension.swift"; sourceTree = ""; }; - F6176C709F1F11238FCAF958F9A75741 /* ChaCha20+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ChaCha20+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift"; sourceTree = ""; }; - FBF7CDA54705306F388A9AB6943D5D1A /* SwiftRLP-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SwiftRLP-iOS.xcconfig"; sourceTree = ""; }; - FD06C0D0FAAE077E5B527EA88B8727B1 /* NSURLSession+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLSession+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.m"; sourceTree = ""; }; - FDD33C66C9AA88CB20039B91D106C3BE /* RandomUInt64.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomUInt64.swift; path = SipHash/RandomUInt64.swift; sourceTree = ""; }; - FDD6DAB9ACD231BAA0226331BDE67975 /* BlockMode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockMode.swift; path = Sources/CryptoSwift/BlockMode/BlockMode.swift; sourceTree = ""; }; - FE57BC224E219C65382BB751CCED649D /* Data Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data Conversion.swift"; path = "sources/Data Conversion.swift"; sourceTree = ""; }; - FE6C08A1761D32580CB3EE6E91B5E379 /* field.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field.h; path = Classes/secp256k1/src/field.h; sourceTree = ""; }; - FF238B78A8B1951C382DC7D8C0DA9412 /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.h"; sourceTree = ""; }; - FFA38A7573EBA79AA83EBCA62742C2CA /* CryptoSwift-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "CryptoSwift-iOS.xcconfig"; sourceTree = ""; }; + F4BAF829379DA2971A7051C2EFAE15E8 /* SHA3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA3.swift; path = Sources/CryptoSwift/SHA3.swift; sourceTree = ""; }; + F4F0BCD366AE2D51D6C35C2192996DBD /* libscrypt-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libscrypt-macOS.a"; path = "libscrypt-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + F5AA52D2E5DC0134CBA0CB3219327A53 /* secp256k1_recovery.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_recovery.h; path = Classes/secp256k1/include/secp256k1_recovery.h; sourceTree = ""; }; + F60B61CB7F6EF778CD12A3622F779434 /* scrypt-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "scrypt-macOS-umbrella.h"; path = "../scrypt-macOS/scrypt-macOS-umbrella.h"; sourceTree = ""; }; + F8262D72960A17572931F11EC9520938 /* secp256k1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = secp256k1.swift; path = Classes/secp256k1.swift; sourceTree = ""; }; + F84F141F7B6CD4974D2BDD888FE19496 /* scrypt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-iOS-umbrella.h"; sourceTree = ""; }; + F935D7D51C3BD0EEA31106E0BF9C3D13 /* Cimpl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Cimpl.h; path = scrypt/Cimpl.h; sourceTree = ""; }; + F99CCF5FD903883FB3C524CA2FB43E2C /* libSipHash-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSipHash-iOS.a"; path = "libSipHash-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + F9C126B6106FA68D54B74E0DD65E0F8E /* SipHash-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SipHash-macOS.xcconfig"; path = "../SipHash-macOS/SipHash-macOS.xcconfig"; sourceTree = ""; }; + F9D80D5C595654C7E23670359CB76D99 /* secp256k1_swift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "secp256k1_swift-iOS-dummy.m"; sourceTree = ""; }; + FA1C0BFC1A022B5AD3BDFC8920FCFD74 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PromiseKit.root-CorePromise-Foundation-umbrella.h"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h"; sourceTree = ""; }; + FB290FC3F5ACF0789F4078C376E6ADED /* Array+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Extension.swift"; path = "Sources/CryptoSwift/Array+Extension.swift"; sourceTree = ""; }; + FB320DD9FD83A5F3BAADF33818736C30 /* secp256k1_swift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "secp256k1_swift-macOS-dummy.m"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-dummy.m"; sourceTree = ""; }; + FD3D00DC2D85B010C2EB60CA78D22508 /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; + FDADCB9A8CD9274EA3AC09BE3B7E0F66 /* libSwiftRLP-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSwiftRLP-iOS.a"; path = "libSwiftRLP-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + FE3D7030BC429403BBE50F40445229DE /* SecureBytes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SecureBytes.swift; path = Sources/CryptoSwift/SecureBytes.swift; sourceTree = ""; }; + FF137216E20AA1BF3FA0B1A647DB89AC /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/CryptoSwift/Operators.swift; sourceTree = ""; }; + FF1BE57EBE989B2B7EDD166127B5FCD9 /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; + FF66C3EFCA475A91734C76A5D546BE1A /* libPods-web3swift-iOS_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-iOS_Tests.a"; path = "libPods-web3swift-iOS_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + FF8AF8868130C525C8921A94220CFA6D /* HMAC+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "HMAC+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/HMAC+Foundation.swift"; sourceTree = ""; }; + FF94FCFAAA2F4216A2F89F43E2CDA4DA /* Catchable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catchable.swift; path = Sources/Catchable.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 05A70FBCB8915FD658E02DE77827E7FA /* Frameworks */ = { + 03011555EFED1D5408D878A307E7F27B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 061F0F73B4A7C0BAB618CCF28AB43EED /* Frameworks */ = { + 05577BA791C80220E64423A3DA803314 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 49DDA0C2610D394C727D7031E3440CCF /* Frameworks */ = { + 2714EC0418F441D39321DBFD3CFC5BF3 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 4E7DEA46EDFAFBE63B1CD6EAFC6C3635 /* Frameworks */ = { + 2E1C020D358710A3E399DC2793603432 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 5673E920CAB46CF5F49271F4E543C37A /* Frameworks */ = { + 3AAC28C160F50900EE61CA27D4E2EF5D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 6254566B8B2CAF2B5CD7A1BC7EFE00D8 /* Frameworks */ = { + 3AE77EFED90447A6B1DAC12064BA51E9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 677BBE6ACD652CB4EE4E00DD6589A287 /* Frameworks */ = { + 49DDA0C2610D394C727D7031E3440CCF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 6F6453F76274AE713CC0D3CD28EB9C36 /* Frameworks */ = { + 5266E30913229719A172673D2CC2CC9B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 70C1112079F88597259241434EA48AF3 /* Frameworks */ = { + 6EC658BB78F973B687A770E4EC1E8853 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 803328A4C9D919A350F04AB5D9FBBC0A /* Frameworks */ = { + 6F6453F76274AE713CC0D3CD28EB9C36 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 8953A204F873D6D4AB03311B82CAF3F9 /* Frameworks */ = { + 803328A4C9D919A350F04AB5D9FBBC0A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -1045,7 +1098,7 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 8C5B3C77007E4A6710E826D840A9A9F3 /* Frameworks */ = { + 9D409A2942E61980145880BF513A7F7D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -1059,28 +1112,28 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - C9A84F4AAB9686DF357AEF1364E35684 /* Frameworks */ = { + B244EFB510B7723225BAE6675E63CE10 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - D2A4B152651F01134ED378054CE50C8D /* Frameworks */ = { + CDD5EEE59EED703D7D057105BF3320CA /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - D8EAD2ED245F44C0D223758BC854E517 /* Frameworks */ = { + D2A4B152651F01134ED378054CE50C8D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - EAF36CFF054C71E816A6740B45DABA2D /* Frameworks */ = { + D45B18240A0BA70F5BD174A232F95C45 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -1094,6 +1147,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + F8DE994896B53C78B2E78A42E3193FFC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; FA42B5B3447A1D1A233689BB1B366630 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1101,6 +1161,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + FC3AA5C1EA87DD47338B9100FB46F5DD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -1115,6 +1182,21 @@ name = "Targets Support Files"; sourceTree = ""; }; + 05B4DA0C32E1BAA8E12B2E57FB88CCC7 /* scrypt */ = { + isa = PBXGroup; + children = ( + 93264D7DC7DF888A41AF35694C9CBF60 /* BufferStorage.swift */, + E65308F679CCAADBBF14F5DB4971CD21 /* Cimpl.c */, + F935D7D51C3BD0EEA31106E0BF9C3D13 /* Cimpl.h */, + 03321ECEB201CDE70DA4F88EE48E2044 /* Salsa.swift */, + 9411AC5861B33542BF71A1EED7E49FC4 /* scrypt.h */, + 41FAB135DE09D3F9136D834CBE3A558A /* Scrypt.swift */, + C983EA1AC8F89B7B13410C24C8F9C35D /* Support Files */, + ); + name = scrypt; + path = scrypt; + sourceTree = ""; + }; 074B5AF920A574FC168DA49C8D334690 /* Pods-web3swift-macOS_Tests */ = { isa = PBXGroup; children = ( @@ -1128,33 +1210,6 @@ path = "Target Support Files/Pods-web3swift-macOS_Tests"; sourceTree = ""; }; - 083C1381B3CFEF7D89B7A4A992CA51B1 /* Products */ = { - isa = PBXGroup; - children = ( - A3BCB7E3971A174E47D70212430A170B /* libBigInt-iOS.a */, - D40BD5126F631E22619456FA8B7796CD /* libBigInt-macOS.a */, - 686E32EABE020693AEB9B0CBB68DC7AD /* libCryptoSwift-iOS.a */, - E931DAD7852F3C297E4BB3A0A4928BCB /* libCryptoSwift-macOS.a */, - 47DF102368BCFE57F05C91BED865C127 /* libPods-web3swift-iOS.a */, - BAD613601EE703E9FF05CEC481713273 /* libPods-web3swift-iOS_Tests.a */, - 6190C35184D36B3997B74374A1DEB870 /* libPods-web3swift-macOS.a */, - 27042DAC0089FE05944B8718DE760F71 /* libPods-web3swift-macOS_Tests.a */, - 755201B560E952C6A5333642B028695A /* libPromiseKit.a */, - DB805D8CD6E362AD3B2474D5C6D7EA6E /* libPromiseKit.root-CorePromise-Foundation.a */, - 5A6CB64CE9F57BAAAAF807DF850E2C0A /* libResult-iOS.a */, - 6F662C5CB3F9F55D1B8343627F3108A8 /* libResult-macOS.a */, - A14282AE6AF7AD75A532A9639BE44B88 /* libscrypt-iOS.a */, - 5362887D119F1FF10889E08C0A86AC77 /* libscrypt-macOS.a */, - A322E379ECBC90322624BA7A69FBBDEE /* libsecp256k1_swift-iOS.a */, - 61F9B5A069C5D02E065D4AB81C26942D /* libsecp256k1_swift-macOS.a */, - 35FC5E1CB1FA613D068CDE5E32242FEA /* libSipHash-iOS.a */, - 599066091D94A49D4FE779679AFD88E2 /* libSipHash-macOS.a */, - EAE702C1BF30A6CA8F718732EC9270FF /* libSwiftRLP-iOS.a */, - 547AA2E9890A83EE986E0FE6B230D1E8 /* libSwiftRLP-macOS.a */, - ); - name = Products; - sourceTree = ""; - }; 088CBEDD2E17F09CAC27FDABD9102BD4 /* Pods-web3swift-iOS_Tests */ = { isa = PBXGroup; children = ( @@ -1168,297 +1223,226 @@ path = "Target Support Files/Pods-web3swift-iOS_Tests"; sourceTree = ""; }; - 0F8D2E47FE03D3B91B51069F7C273AF4 /* Frameworks */ = { + 0E22312CDA1302633680E34AA7319FE8 /* Support Files */ = { isa = PBXGroup; children = ( + EE67CD504E9DAC9DEA10C48C45C9E86B /* SipHash-iOS.modulemap */, + A0347CA8676D7E491A4DA559FB78007F /* SipHash-iOS.xcconfig */, + C57F4AE68BD0AD2EE5867A1CA2A12FCC /* SipHash-iOS-dummy.m */, + EB0E2A41F4665970E5124BB49E1B4D55 /* SipHash-iOS-prefix.pch */, + 7692AAEAD8E8FFF8D2E46B60CBA56CDA /* SipHash-iOS-umbrella.h */, + 919A091F1E72F11C9C10844CC5454B2F /* SipHash-macOS.modulemap */, + F9C126B6106FA68D54B74E0DD65E0F8E /* SipHash-macOS.xcconfig */, + E34CB7E7EAC6A9C0F75649FD43EC23F2 /* SipHash-macOS-dummy.m */, + D6AB002E9D0C7DDC501F8673C4419E81 /* SipHash-macOS-prefix.pch */, + 4E85EB665265A065E5D96BCE2B87008D /* SipHash-macOS-umbrella.h */, ); - name = Frameworks; + name = "Support Files"; + path = "../Target Support Files/SipHash-iOS"; sourceTree = ""; }; - 15ED0F64262A5239BFC80BDA3AFECD20 /* CorePromise */ = { + 0F8D2E47FE03D3B91B51069F7C273AF4 /* Frameworks */ = { isa = PBXGroup; children = ( - 02EAAF0A84187F4281AB39EBD7DA1B34 /* after.m */, - 3386525472CC553FF40B3AFEE8BCE2DD /* after.swift */, - AC98E623829FE2C9F71C5C97B66118C8 /* AnyPromise.h */, - 18E4AB7C0ABCF3AEC6B3979EC294536E /* AnyPromise.m */, - 61BA4F5A7AAF223AA3BDA0BF814905AA /* AnyPromise.swift */, - 79370D5C826074DD91DB303B75EACE7D /* Box.swift */, - 9DFFAA6FC4E6A7DCD0DA8AE064B792DA /* Catchable.swift */, - 2D86C75595B41479AB364568AB89F857 /* Configuration.swift */, - 6246D2591B9DFE5339771AC0AF2EA3CA /* CustomStringConvertible.swift */, - 63D47A1599387D37CCA850DB9256283A /* Deprecations.swift */, - 93F2C29FA3412D0329780F52C1DD2931 /* dispatch_promise.m */, - 80D7D244BE8CFD16A741C5261EA757D6 /* Error.swift */, - C33EA4F090C90D1AE636D3B40ECFA945 /* firstly.swift */, - AD7DDD48316C5C9CF661C50B3D19698E /* fwd.h */, - C535818543FB132F5085E5ED501095D0 /* Guarantee.swift */, - CEDD84C820765F4B8C5826D1B122200E /* hang.m */, - 6D957F2AECF5A8A0E9C7CCE2A55B6C69 /* hang.swift */, - EA0E1E254A8A60AE7835DB964A9891CD /* join.m */, - 73AF6510FE79C3D2EDBCE691D07F6E5E /* Promise.swift */, - C533250E0867F5CF90717B90B4450C63 /* PromiseKit.h */, - 8E89406E7E995881E48051C7EC4C9DCB /* race.m */, - 66D54E1981BA238733A8A5E65484B2B5 /* race.swift */, - 092DD25F9A8FD52F554B41FA11289B4C /* Resolver.swift */, - D111E53D728978DA7C689AD4AFDCA963 /* Thenable.swift */, - A4420324C5657482ABEBDA0BB3C73802 /* when.m */, - C0D976FDA3B329F00236A2F1D4C6B378 /* when.swift */, ); - name = CorePromise; + name = Frameworks; sourceTree = ""; }; - 1F160E42E243D1D1DB459D9E7F412751 /* PromiseKit */ = { + 1AC78478C51907110096C348221D88EC /* Pods */ = { isa = PBXGroup; children = ( - 15ED0F64262A5239BFC80BDA3AFECD20 /* CorePromise */, - 688E5591DF92C26F674C6863E621649A /* Foundation */, - 67374C05B866118D6EF84A2C25572819 /* Support Files */, - BDEB2A43D2221D8016FA7E76367811E1 /* UIKit */, + D744BED64DE3B64CE5A12B74A22D228D /* BigInt */, + 56BBFF8639CCDA4A35DED29BDD33D528 /* CryptoSwift */, + 361AF2F3A6AA13AA5E964E778F7E85BD /* EthereumAddress */, + 54B37D075BCFF2BF04A3CC7CB9D1C6F9 /* PromiseKit */, + 541E7AD1499C6B8095A27B0F22098CE0 /* Result */, + 05B4DA0C32E1BAA8E12B2E57FB88CCC7 /* scrypt */, + F60B65C0BEC31AA822288722889BD576 /* secp256k1_swift */, + 652884AA38DA09A2444762C072AAE0FE /* SipHash */, + 2FD28755727C4877D11F1FACC2821028 /* SwiftRLP */, ); - name = PromiseKit; - path = PromiseKit; + name = Pods; sourceTree = ""; }; - 39DFA4602C912016E7B290E983B4A7F6 /* CryptoSwift */ = { + 1C95D05EA1244C1219298719A0647D65 /* Foundation */ = { isa = PBXGroup; children = ( - 0CF0657C69B458EBD464B4F7EF2A1758 /* AEAD.swift */, - 2DCDC3F74F1C62E2161FC76EF265BED7 /* AEADChaCha20Poly1305.swift */, - 897BD312EFC7F005946FCA64E8B5D3F3 /* AES.swift */, - 09E31D2F88F4FB6EC4A90B888DF591B7 /* AES+Foundation.swift */, - A130AE149844CDF96BEAFC7381997641 /* AES.Cryptors.swift */, - 7A45DEA061F03DB9EB78391B810792DD /* Array+Extension.swift */, - 9DE9FBA3C3EB5037CAB66A887E9BC6DE /* Array+Foundation.swift */, - 55FA26B75C99F4847087C9104EE38E8F /* Authenticator.swift */, - E9F009B8B3BE27687063703C35463B71 /* BatchedCollection.swift */, - 551CAAEDDC5AAACAA24E8A5A86721E97 /* Bit.swift */, - 699D800F72CE09977D6EE1687D706BD6 /* BlockCipher.swift */, - ADC3E9B80B8AC54146B2DFEDA0142CAF /* BlockDecryptor.swift */, - D016DA64236C44F87FFCE97A6F0A0E06 /* BlockEncryptor.swift */, - FDD6DAB9ACD231BAA0226331BDE67975 /* BlockMode.swift */, - 66858822A1651FBD671091155D387A8B /* BlockModeOptions.swift */, - C4434E5B7050EF71B04AEAE88F303455 /* Blowfish.swift */, - 93E416B2CCEC4490652DE3889013CC4A /* Blowfish+Foundation.swift */, - 3F60E6D7F6C28A5DF688920FB74829E4 /* CBC.swift */, - E330212AA4C3537D541AD9C197932C16 /* CBCMAC.swift */, - 627C056A389B2501608E18EFAD762A6B /* CCM.swift */, - 903BE66455FF2F03FD9540A7E5914EC7 /* CFB.swift */, - 46F1CC3195EF29E61FD820B624C49746 /* ChaCha20.swift */, - F6176C709F1F11238FCAF958F9A75741 /* ChaCha20+Foundation.swift */, - ED58AECF3C5444FBDEB7453CDD6D6A96 /* Checksum.swift */, - EEB151B14FA1CAF4FB16D76AE7F505AC /* Cipher.swift */, - DCC85A555F579FA10EC96590296D9288 /* CipherModeWorker.swift */, - BB95DBC141DB412EAF90DE75B00EE345 /* CMAC.swift */, - 57D914B6D4F8590AF8E3BA6863DB778B /* Collection+Extension.swift */, - 9FC6C3CA2D135767617F5F276FF395CC /* CompactMap.swift */, - 03938C581D805E7DEA7EF7935F6B4E61 /* Cryptor.swift */, - 21CDB590E00AE3873562308E5110A4D8 /* Cryptors.swift */, - 0D4AFA48362F6E5DF72006F39A5F32A5 /* CTR.swift */, - 69B4D5C4EED1973AF5815173AB05729B /* Data+Extension.swift */, - 0439A7FDEC4F611C9334DEC15FA25F1B /* Digest.swift */, - 8AA2EF5FFE50FBD8EAB6BEA39D23C942 /* DigestType.swift */, - 37BA5803AF780ED8A2ABA135BAA03479 /* ECB.swift */, - 7E27EDB736A99A27C20F82D22DC4A707 /* GCM.swift */, - 59C55840D303F469F1F31EE4867563E5 /* Generics.swift */, - DF2520CE6C39BFEF4B6C9B87DA7047AD /* HKDF.swift */, - AA57B8C185D40985D37E5A9E9CB7B3D6 /* HMAC.swift */, - 660B0734DFD6D8C99EE70FDF836AD891 /* HMAC+Foundation.swift */, - ED52325262247A4879433CE3D7BA1251 /* Int+Extension.swift */, - DC3D6E08FC4B31786E28A3DD414DE71C /* MD5.swift */, - 365AB600024749D54E0AD6D59FC28749 /* NoPadding.swift */, - 9B108AA63200D2A6992501E7B76EF6A0 /* OFB.swift */, - C906CE7510F7153C35950FD44AE3C571 /* Operators.swift */, - 6EA534EDF19829F1927C7991BF2EEC2F /* Padding.swift */, - C02A5DDAE1965271228C7E856C9987C3 /* PBKDF1.swift */, - 6FACAD9F572878C98D14B56672DE004C /* PBKDF2.swift */, - 96CDA4C5CCCD8DD001D5D629E860B631 /* PCBC.swift */, - 8D97871DE06423066D52CDBE28B74B3B /* PKCS5.swift */, - 83BD9FC5270AA1FFFF0B01504C9B8BB7 /* PKCS7.swift */, - 9AD9ED798FEF891C4A3123685AB25017 /* PKCS7Padding.swift */, - 71B12B455685D2F4F116288D0FE808FE /* Poly1305.swift */, - E6D16C3019A7CC7FFDD41C97E69DCB84 /* Rabbit.swift */, - D4F3DB8A969B504C000E0BD68E9DF848 /* Rabbit+Foundation.swift */, - 3F58565031EE07098E585B5C3FCC7442 /* RandomBytesSequence.swift */, - D67B21BD5ECE586715CDCB8EF9F84E24 /* SecureBytes.swift */, - A90907EC55F455C898F8D8E35C2908DC /* SHA1.swift */, - A5C805181714272769BB5BCEA4814B1D /* SHA2.swift */, - B9E4625A0B76DCA266EA9671890C8721 /* SHA3.swift */, - 32019641A223A260B54A3A6633B0BF19 /* StreamDecryptor.swift */, - AEC2C04096B2D2B92821B75319989EC8 /* StreamEncryptor.swift */, - 5B2EDCF2255BD0D829F03B0C1BD0A060 /* String+Extension.swift */, - D0C6A6AAF1849184B1A8916E223E9BCB /* String+FoundationExtension.swift */, - CDD971533936CC3705E267598BF53A93 /* UInt128.swift */, - F6060667D5D66C779C8BC742A2C7F5F6 /* UInt16+Extension.swift */, - 276BA53B2960C2B624579741823D9DD2 /* UInt32+Extension.swift */, - 44BE339EC0BDEB80B98E8D988708993F /* UInt64+Extension.swift */, - 5B061B14116ABEE15B3CE99517103317 /* UInt8+Extension.swift */, - 61A90B8C29D973CF2BEE2A33224ACBEF /* Updatable.swift */, - DABE6207D44D964FBF0C1EB8B82F13A5 /* Utils.swift */, - A7530E3D35773A67134FC4EA93063F01 /* Utils+Foundation.swift */, - C504B703D6897FF1896886916748D0D6 /* ZeroPadding.swift */, - 9B02CB12B4E3FBEF788C7B68B6161612 /* Support Files */, + 74111ED4B5372D2EE9A218621A18699C /* afterlife.swift */, + 7DE92E2A606B96369F79D742DFACB7C9 /* NSNotificationCenter+AnyPromise.h */, + F1899C74540C37F7D84214CF9F8AD010 /* NSNotificationCenter+AnyPromise.m */, + D9C39AD388A82A531C338B26EE00DB9C /* NSNotificationCenter+Promise.swift */, + 840434A830881CF07FBDE172A20CDDDC /* NSObject+Promise.swift */, + 860EF39282D8941084557A3DCC1D7DF3 /* NSTask+AnyPromise.h */, + 86B004B7F6AC62E27D75D02978601A76 /* NSTask+AnyPromise.m */, + C6D3FAB581FA1884038308CAAD092260 /* NSURLSession+AnyPromise.h */, + 55F115779D04B6641A1DB99D05887E03 /* NSURLSession+AnyPromise.m */, + 7739AC49E92EA0677899D077C015CE05 /* NSURLSession+Promise.swift */, + 17856FB7A41BDDB75285F531B03882F4 /* PMKFoundation.h */, + 43941A9CA2F209289C333306CBC5961F /* Process+Promise.swift */, ); - name = CryptoSwift; - path = CryptoSwift; + name = Foundation; sourceTree = ""; }; - 465EBB6008CEC55DAD0DFAA7BAB50B26 /* Support Files */ = { + 2FD28755727C4877D11F1FACC2821028 /* SwiftRLP */ = { isa = PBXGroup; children = ( - 4747F3231587AB7A49FAEC31459E0E5A /* BigInt-iOS.modulemap */, - 77419BCFFD51D71BDCD33CDB50A1DC50 /* BigInt-iOS.xcconfig */, - A81557551191339AD284647E9008F3BF /* BigInt-iOS-dummy.m */, - F10DABC5ADF2971E57D527449B163046 /* BigInt-iOS-prefix.pch */, - B89A9869F658850405B3C9B8EEB11C88 /* BigInt-iOS-umbrella.h */, - 8488F4ACF6A5A83E41E4C406582AB2C9 /* BigInt-macOS.modulemap */, - 43CCBB7CEE935A6D645B18B87E5F1A5E /* BigInt-macOS.xcconfig */, - 555457AF50F888167C28CEA34B14AAE1 /* BigInt-macOS-dummy.m */, - 1E012EBA689C972E69BCBC4B98909AD6 /* BigInt-macOS-prefix.pch */, - 9CBD2032E8E6117EFD2C15AC9E728128 /* BigInt-macOS-umbrella.h */, + 49FA7F82B54CC7168B96069F53D66A28 /* RLP.swift */, + 0F02A89B4F4807025E1CB0C26D63CD65 /* SwiftRLP.h */, + A33DC2AD3BADDA5A006F792ED154E7A5 /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/BigInt-iOS"; + name = SwiftRLP; + path = SwiftRLP; sourceTree = ""; }; - 500695EA7F9BD491B9D1B83B8B251DB6 /* Support Files */ = { + 361AF2F3A6AA13AA5E964E778F7E85BD /* EthereumAddress */ = { isa = PBXGroup; children = ( - 87F900B38D104B7DA2F876FEF130BE54 /* SwiftRLP-iOS.modulemap */, - FBF7CDA54705306F388A9AB6943D5D1A /* SwiftRLP-iOS.xcconfig */, - 1BFCF7E8508743BB12B3D3A3C1AFF821 /* SwiftRLP-iOS-dummy.m */, - 03D50310E3C531327909D2D92D68AE95 /* SwiftRLP-iOS-prefix.pch */, - 07A9C5839E7875E75F4AF91C0C630CB2 /* SwiftRLP-iOS-umbrella.h */, - 9E3F254D4EBA717445160AB2A3C16AE5 /* SwiftRLP-macOS.modulemap */, - C7E88808C507E7B039F9595A82EBFA36 /* SwiftRLP-macOS.xcconfig */, - 4AF7FD66A2EBEED268628A0D0FE4E74D /* SwiftRLP-macOS-dummy.m */, - 971DE8258824419E3875862D386B0558 /* SwiftRLP-macOS-prefix.pch */, - BA5CA30AC50EF9F974BA8C9CA66250F4 /* SwiftRLP-macOS-umbrella.h */, + 48BBE301C7AC93BA32B43FDCAB55FF55 /* EthereumAddress.h */, + 7CB204BDB01A5747B116731490529E2B /* EthereumAddress.swift */, + 1422C640D1B145BC997D3E0A3FF10339 /* Extensions.swift */, + A8CB084B7ACB8AC7C10C0B25D0347442 /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/SwiftRLP-iOS"; + name = EthereumAddress; + path = EthereumAddress; sourceTree = ""; }; - 514C4F100A5BC1252ACC9205AF231647 /* secp256k1_swift */ = { + 541E7AD1499C6B8095A27B0F22098CE0 /* Result */ = { isa = PBXGroup; children = ( - 853BAAA89F1726DECCF03BC01BBDC64C /* basic-config.h */, - D0E5F085DD39FA26739ECAD91284C1F2 /* ecdsa.h */, - 80ED01586B28193ED2BE26DEF9B57A3C /* ecdsa_impl.h */, - 07BA44CF1EA491F2DE0FFA66AADF2764 /* eckey.h */, - 7A83A5B7F0434C3FACA671C5A20D8389 /* eckey_impl.h */, - 221F16DEDE441F76365153C8EC2D64E3 /* ecmult.h */, - A3D2730C3BE7868E162AB4F297A3A7DE /* ecmult_const.h */, - 8045272A42A0784613BD7057AA86803C /* ecmult_const_impl.h */, - E0D2913DF679358122E366AA30A31733 /* ecmult_gen.h */, - 938A29097DE727896422B7DD937D51E3 /* ecmult_gen_impl.h */, - A19805DB694C14E29F255EA2BB4603A5 /* ecmult_impl.h */, - FE6C08A1761D32580CB3EE6E91B5E379 /* field.h */, - 44131C334B408CABBB3E84FE9BEDD5BE /* field_10x26.h */, - E5253ADE5894EBF14D938D154E2B0227 /* field_10x26_impl.h */, - 1A48FBA7E324AABD9DA453C780537C79 /* field_5x52.h */, - EA7E3E2AA7DDB383A58F583E451F6C05 /* field_5x52_asm_impl.h */, - AF7AF6D769E4BBF1B2C201836A906130 /* field_5x52_impl.h */, - 89276AC70A47E00E5E08DB5C8D91C6C4 /* field_5x52_int128_impl.h */, - DC010BC54E6C05686BE227F75B04535D /* field_impl.h */, - E0E2C657091728E6CC4D8093DA13C072 /* group.h */, - 306BDC01729FF834ADC364D1DDD4797A /* group_impl.h */, - 74E396D4A3CBCFA52283FA71BFE1ED4C /* hash.h */, - A7A5666EAA8ADD7A2AA3ED33C8DC6028 /* hash_impl.h */, - 4B659053EBDBE68F9EB1137C3AFCC9F8 /* lax_der_parsing.c */, - 2765A0C6E2BE64A4D0916D30633BEA7E /* lax_der_parsing.h */, - 0194B6C18C95261082F349271D42FE44 /* lax_der_privatekey_parsing.c */, - 2707FB70F6217313CE3FE9D9B5606CDB /* lax_der_privatekey_parsing.h */, - 11F7F4CE35D426643C8DE5645FF76713 /* libsecp256k1-config.h */, - 1A3ADB1AB7700B235D79CA3AEB2E8540 /* main_impl.h */, - 5E959F3AA4E4F1850C7F42B923C77DDB /* main_impl.h */, - 3C97CDE8E28215118A8265A78EF509D0 /* num.h */, - E473E833B6236676C6F4E9274FEE290D /* num_gmp.h */, - 6E138D3C3327A0AC400395EA7B85D13A /* num_gmp_impl.h */, - 970421396A3184DB620CB61E8AE71F58 /* num_impl.h */, - 8BE4DB426382B15B10062329955F15CC /* scalar.h */, - 3BF5A3B81AA637876B3E5AA4D5F124AA /* scalar_4x64.h */, - CE82C576F4D863F22181DF0D90DA8533 /* scalar_4x64_impl.h */, - B7CB9A9AD1846703E487266D4F3BCCBB /* scalar_8x32.h */, - 433536C0066CD933A793F8B42877435F /* scalar_8x32_impl.h */, - CEF60C13887D74275029301DCC6A1149 /* scalar_impl.h */, - B276DAA5AD0B968F80A0769180CCC012 /* scalar_low.h */, - A65DC6A2E9BC70E1F5211BFB9E2266E3 /* scalar_low_impl.h */, - 57FE015BCC95654092B0ADF05585E987 /* scratch.h */, - 1BC5C341B16D41330279E713831347D9 /* scratch_impl.h */, - B184A67AF0236537BEE898D90E946942 /* secp256k1.c */, - 8674CB477181A24AA72377A5EF2E312C /* secp256k1.h */, - 4B00C58B6D526DBDFF8307C6DA1AFDF1 /* secp256k1.swift */, - BE6305D1DE9131CFB173AC969FDB1092 /* secp256k1_ecdh.h */, - C5648942F9F59CF9D06030DB7B64423A /* secp256k1_recovery.h */, - A094ABEA6C6E0AD5B87D62BB32AEA3DA /* util.h */, - A5C4D9D7AFF383E08F48064F0547394D /* Support Files */, + 2D1D500C8CF88FC87FF7FA43DBC53611 /* AnyError.swift */, + 19725B1F6B394E3B97BB387C7E4E4874 /* NoError.swift */, + 1576E0C86B6BE13F5FB685E1357E71C3 /* Result.swift */, + 5116359962EA1905AC0EB7121E634D9F /* ResultProtocol.swift */, + 6CC6E9D88684D92EB1CEF51FF7B16C04 /* Support Files */, ); - name = secp256k1_swift; - path = secp256k1_swift; + name = Result; + path = Result; sourceTree = ""; }; - 5FFD514D176791D2012564885C0B358D /* SipHash */ = { + 54B37D075BCFF2BF04A3CC7CB9D1C6F9 /* PromiseKit */ = { isa = PBXGroup; children = ( - 78593F1D5D512221956B4CC2A7432B88 /* Primitive Types.swift */, - FDD33C66C9AA88CB20039B91D106C3BE /* RandomUInt64.swift */, - 12BFFA790DC1A19DFC5018C9B37267D2 /* SipHashable.swift */, - C8EA9E5ADEC0526C987DC2B55F8E04B5 /* SipHasher.swift */, - 968E195A239C7A2A779AF02DF8828396 /* Support Files */, + F026F54B353351B219A0C4BE3E0C2871 /* CorePromise */, + 1C95D05EA1244C1219298719A0647D65 /* Foundation */, + 9B38CA57FC54E4DA492DC4C23904561E /* Support Files */, + D62BC46C0C93C11AECF63AC21156635E /* UIKit */, ); - name = SipHash; - path = SipHash; + name = PromiseKit; + path = PromiseKit; sourceTree = ""; }; - 67374C05B866118D6EF84A2C25572819 /* Support Files */ = { + 56BBFF8639CCDA4A35DED29BDD33D528 /* CryptoSwift */ = { isa = PBXGroup; children = ( - A4072CCBD9D1A294C38285818FBFDA5F /* PromiseKit.modulemap */, - 40497EC0B9D6C3A291AA63F310A549A2 /* PromiseKit.xcconfig */, - 6DF453CEA7E128C1691A0713421CFBBF /* PromiseKit-dummy.m */, - 74076E38030CF36CF2DEBA8446B2B156 /* PromiseKit-prefix.pch */, - 8C3AF144309D8E77765BE0E32200497A /* PromiseKit-umbrella.h */, - 90AB4B8A04595134BFA9D538282F4E41 /* PromiseKit.root-CorePromise-Foundation.modulemap */, - BC6C4D45E9DD5B4669397278183B8A6D /* PromiseKit.root-CorePromise-Foundation.xcconfig */, - CCFDF41D2D776C88B83F392CB5FD7499 /* PromiseKit.root-CorePromise-Foundation-dummy.m */, - 98C1FF45802004439456C8A350D9155A /* PromiseKit.root-CorePromise-Foundation-prefix.pch */, - 5B88EAF15DEC2D3207C78A1C1F11E1B1 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */, + 8354A9A75879DFCE10CDFCD8B4B76EF5 /* AEAD.swift */, + 71D09134607D15AB2D81F0CB08D3F055 /* AEADChaCha20Poly1305.swift */, + 77FB79008E5E4C52EE48B984D12A652E /* AES.swift */, + BC0E5DF49745E221D708C75FC2B03DC7 /* AES+Foundation.swift */, + C1BDC161E1A001A666E01A22455E14B5 /* AES.Cryptors.swift */, + FB290FC3F5ACF0789F4078C376E6ADED /* Array+Extension.swift */, + AB4C3483E321FFBD045AB8FDC37CF8FA /* Array+Foundation.swift */, + 736C0CC7DF9261F7C240BF88F7D310AD /* Authenticator.swift */, + 682A1BA8289C74E7B26FAAFA80540F57 /* BatchedCollection.swift */, + 86800F1D45016DC59C9BE8B9ABF5B50F /* Bit.swift */, + EFCBEFE9DA6D7F361DBB180EB84492D2 /* BlockCipher.swift */, + 0D2BE96DBE00949D2B047DC83A759B4C /* BlockDecryptor.swift */, + CC4C922D64767063B8D1A270D793373B /* BlockEncryptor.swift */, + 1F0D95EE88A2B8D781795DF20E0568F6 /* BlockMode.swift */, + 639957AA1B177687176168DC8D443490 /* BlockModeOptions.swift */, + CAC966A4293FF7689DD8A3B2877731F3 /* Blowfish.swift */, + F25882CAD0730D8C76F023B8C6FA287C /* Blowfish+Foundation.swift */, + 3ABE33C91D6B128E8B104ED3630B6ABB /* CBC.swift */, + DF4D45B809574B97A749EADBA2EFAB02 /* CBCMAC.swift */, + 14176496814CB0D56F198301D279FE65 /* CCM.swift */, + B7D5FD5536C89792D33769E9EDFA2DE8 /* CFB.swift */, + EE7F6BB14F19AC57CB96B2D06603E845 /* ChaCha20.swift */, + 441A9CACC96EB9A41D4ABF90FDFFD2C8 /* ChaCha20+Foundation.swift */, + ADC86A3FC56A1BAE1CA3490D081E47F3 /* Checksum.swift */, + 52B35D82CEB3E05DB842B7FA66505116 /* Cipher.swift */, + 81909D98916544A0C622EDB88411AE57 /* CipherModeWorker.swift */, + 6E942712A2D0087AAF697A0E031459FE /* CMAC.swift */, + C717226571D60D3C7D8E15B4EDCC2E0F /* Collection+Extension.swift */, + 4F8B31678A829B043331C94E279F1FD9 /* CompactMap.swift */, + D13D2441410EEFA35EFB1823E238648A /* Cryptor.swift */, + 3391B8242DCA2A16EB9DBB3FF0740ABC /* Cryptors.swift */, + 671394A1108646E9E210CF54FA2C814C /* CTR.swift */, + 42F14C976AD41B0817186FB67B3B349B /* Data+Extension.swift */, + 5ED58E829B835009D9DCD1D8B959FBBD /* Digest.swift */, + 8F6102F002EDC216C49666462EF952CA /* DigestType.swift */, + 98C48C6F1DCE55E9EE6040D50626EF16 /* ECB.swift */, + 95F76B715633F358CA7525D8C17738C9 /* GCM.swift */, + D286B6A0694F7E16078B8E7642CAE6FD /* Generics.swift */, + 0D0947D47B9CECD59BC73EAC48D4ED27 /* HKDF.swift */, + 7B67DD6B4751EC541A3D153113AFB1B1 /* HMAC.swift */, + FF8AF8868130C525C8921A94220CFA6D /* HMAC+Foundation.swift */, + E81CDB6F58099035E4B22900B2E0740D /* Int+Extension.swift */, + CB0B1B247B08E4A2259D6D21ABAB0304 /* MD5.swift */, + 915D7A030D48CB0FE8360421BAB29B5B /* NoPadding.swift */, + 1D8151AFF003D8A45F3E0F171019ED33 /* OFB.swift */, + FF137216E20AA1BF3FA0B1A647DB89AC /* Operators.swift */, + 23EA6F524218763DB7E76A6E13387EAC /* Padding.swift */, + 5EFE8BF6504756C13783E7D477894264 /* PBKDF1.swift */, + D9F882189D9E2CE8D7B7DC60BA0D5AF6 /* PBKDF2.swift */, + C47CE1FE3AEC19CC322E3E03530D21CD /* PCBC.swift */, + 98A9FC519C49C693637C4BC5D0DD6EB7 /* PKCS5.swift */, + CD8AF5512E4598482BBFB4AD1BBF8064 /* PKCS7.swift */, + D3E0EFDBB92A100EDE06E9D563ACF26E /* PKCS7Padding.swift */, + 95C8DD41F37C777526C9EA621C9213C9 /* Poly1305.swift */, + 906199A857C08F740EA182609488E191 /* Rabbit.swift */, + D44F8F4C5F0D588B00DF17BC6518E5E0 /* Rabbit+Foundation.swift */, + 9B7B36B7C3689A1ED9FBF4095AF74840 /* RandomBytesSequence.swift */, + FE3D7030BC429403BBE50F40445229DE /* SecureBytes.swift */, + 0EC0DBFB306B96AAE65A02CB825C4F0B /* SHA1.swift */, + 9BFCCF45D62D69A50F9ED16BCE93C54A /* SHA2.swift */, + F4BAF829379DA2971A7051C2EFAE15E8 /* SHA3.swift */, + 9F576E04543F9CA8FD11EFA190633C0F /* StreamDecryptor.swift */, + 7340338CDF774E91E0F647AB7EB91924 /* StreamEncryptor.swift */, + D292A1945503B3A000AC47BB73889903 /* String+Extension.swift */, + EA3D1883E9BD064F4B9299B5825061E7 /* String+FoundationExtension.swift */, + AFD1168E711269E444E38FCAE0B8E5D9 /* UInt128.swift */, + 20BE3E8F811475C9F3E6350A16EF3D56 /* UInt16+Extension.swift */, + D57256C33A9C97F888F53A4FB7226146 /* UInt32+Extension.swift */, + 4BD790D4294FB459BB05017C05CA1F1E /* UInt64+Extension.swift */, + 41B019A1B56440DDAB3267B96FDBD576 /* UInt8+Extension.swift */, + 7CC384B5F6C90CB968D0AB32162249B6 /* Updatable.swift */, + 49A1004ABA6FF6BBB692884F59131E13 /* Utils.swift */, + 7EFDF78EEBE9836CDC5AE2FEEC50C17B /* Utils+Foundation.swift */, + C31ABCFEE7AE67562C4CEBB66C7ED4D6 /* ZeroPadding.swift */, + A5E4D51B8435BEA960C87E86236F1E08 /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/PromiseKit"; + name = CryptoSwift; + path = CryptoSwift; sourceTree = ""; }; - 67F59D2A962E5817273BE58A4B0131FA /* Result */ = { + 652884AA38DA09A2444762C072AAE0FE /* SipHash */ = { isa = PBXGroup; children = ( - 665306D3A9323800337BE1451D8960E7 /* AnyError.swift */, - 7DC64F1DE162445FC5F9F8F1A2C818B1 /* NoError.swift */, - 61F02670BA786ECE5640E0C70EA68888 /* Result.swift */, - 0E3C47D7844F81394427D09B0454A241 /* ResultProtocol.swift */, - 77555C3E6947E6A6C19AF6E5B994282A /* Support Files */, + 03FE099622DA426E4CBDFEB30B374591 /* Primitive Types.swift */, + DAC89259204E1C6A18BCD0B7D08C104B /* RandomUInt64.swift */, + 28D6357617301A15F1861ECE0B2D728E /* SipHashable.swift */, + EBD8BA7DCEF1E0FF9602E3F7BE941878 /* SipHasher.swift */, + 0E22312CDA1302633680E34AA7319FE8 /* Support Files */, ); - name = Result; - path = Result; + name = SipHash; + path = SipHash; sourceTree = ""; }; - 688E5591DF92C26F674C6863E621649A /* Foundation */ = { + 6CC6E9D88684D92EB1CEF51FF7B16C04 /* Support Files */ = { isa = PBXGroup; children = ( - F465EA5AEC974D4B2AAFFFC2768A91D7 /* afterlife.swift */, - E9584FC30610F2691B4EB045534020D8 /* NSNotificationCenter+AnyPromise.h */, - 28668B0DE54AE4E51942A5F50596975C /* NSNotificationCenter+AnyPromise.m */, - 8798FA9542F2175AA660CDB635E6D6BC /* NSNotificationCenter+Promise.swift */, - E4211F7070401959F35EE92C5214007C /* NSObject+Promise.swift */, - 2C71245535F05C90A42683076576BB26 /* NSTask+AnyPromise.h */, - 8C64B4995F9A0EBB5D4B5F27B33FB054 /* NSTask+AnyPromise.m */, - 0C7D493F1212B046A7AAFC8351D67E4D /* NSURLSession+AnyPromise.h */, - FD06C0D0FAAE077E5B527EA88B8727B1 /* NSURLSession+AnyPromise.m */, - 39B4575A57EFE3A0630FA12FAE346202 /* NSURLSession+Promise.swift */, - 9E2278C6E7F3F4C4A66132D0E8E0517D /* PMKFoundation.h */, - 937DFD5ACC6B392C3B22DD0605410F52 /* Process+Promise.swift */, + 12838912E9C17379AEEDB5CEF54ED779 /* Result-iOS.modulemap */, + 435339C16A1550DDCDCD1B4731E89DBD /* Result-iOS.xcconfig */, + 74F90CB37B5FF688D45EE372C6FE875C /* Result-iOS-dummy.m */, + 0295AAB9A4AEF4BACC811B917B2F75DE /* Result-iOS-prefix.pch */, + C30494B6003825A7F5E0AE152495E590 /* Result-iOS-umbrella.h */, + B41DB7D6043E138E3CA32DF5B5194D9B /* Result-macOS.modulemap */, + 15206D43EDA63AD479C638B175342338 /* Result-macOS.xcconfig */, + 28AB30A05C0D17ABF7D0DBC475F93C23 /* Result-macOS-dummy.m */, + 42F561AD37AE0579CA9921A14A3A0943 /* Result-macOS-prefix.pch */, + 67F6E91C8B57C5F8E945603C7F3DB0F2 /* Result-macOS-umbrella.h */, ); - name = Foundation; + name = "Support Files"; + path = "../Target Support Files/Result-iOS"; sourceTree = ""; }; 6FE5839A998F9D581E5060F0675BF53C /* Pods-web3swift-macOS */ = { @@ -1476,53 +1460,22 @@ path = "Target Support Files/Pods-web3swift-macOS"; sourceTree = ""; }; - 77555C3E6947E6A6C19AF6E5B994282A /* Support Files */ = { + 717DC5E859A757E25C926AA3C8443397 /* Support Files */ = { isa = PBXGroup; children = ( - ECD10A42BA1863127F0B89583918A25F /* Result-iOS.modulemap */, - 0C016E31F7E35964F636011F294536FD /* Result-iOS.xcconfig */, - 1F4BECA22FA3D5D535FC714D0B2B9EB8 /* Result-iOS-dummy.m */, - B3729C94C12C882F36F0F22DD2AA6ED2 /* Result-iOS-prefix.pch */, - 3E49C5D9CD234FDC2304F413D1314EE4 /* Result-iOS-umbrella.h */, - 8A22A5D6311176FFB8CFC5A84B52E457 /* Result-macOS.modulemap */, - 40BFCBA4E1D706A666116029D5E0E726 /* Result-macOS.xcconfig */, - 0D7A08C10688F2510948C9E9742DFF65 /* Result-macOS-dummy.m */, - 6BBC74867F1126D0DB48249F01662F36 /* Result-macOS-prefix.pch */, - 011262F92057423AD4ECF708E415898D /* Result-macOS-umbrella.h */, + C05A424003F07748E6FAD6C9A57EEC23 /* BigInt-iOS.modulemap */, + A2A0CFEEC4EEE7DD9F58B6A45DE63C89 /* BigInt-iOS.xcconfig */, + A516C73CD574B0D6BA84C38BB55FBD2D /* BigInt-iOS-dummy.m */, + 907E15C94AE5E8DC2C60CE2BFA69AB19 /* BigInt-iOS-prefix.pch */, + B90CC3B80037E1B917D44513A07D0F6C /* BigInt-iOS-umbrella.h */, + B42A16A3F62043A99FFE8BDB6DB55ACB /* BigInt-macOS.modulemap */, + 8823C42C614B0067E2C89A5AE71DA77D /* BigInt-macOS.xcconfig */, + 234968A9A443A0E2CC4FBFBADB4CC6AB /* BigInt-macOS-dummy.m */, + 6007139C44683BCB89A01696BBBD497F /* BigInt-macOS-prefix.pch */, + B2300EAF13A4BCCC04BBD2896E58716D /* BigInt-macOS-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/Result-iOS"; - sourceTree = ""; - }; - 77F760D6602BE418D145528348B2C2B5 /* BigInt */ = { - isa = PBXGroup; - children = ( - B16FB18636FBF37732FFEDB58EF77090 /* Addition.swift */, - 851772A4A36B2700215C3B972F05BB10 /* BigInt.swift */, - 1B685BD86E597E436351119CA4A20736 /* BigUInt.swift */, - 161C2D9657DC967FFAC2A37D48134D76 /* Bitwise Ops.swift */, - 9727D8BDEB33BD75AB806BC0A3EC155C /* Codable.swift */, - 983B0C09BEC11115522233D05D8F47D1 /* Comparable.swift */, - FE57BC224E219C65382BB751CCED649D /* Data Conversion.swift */, - 0974D06B8BD99ADFA971B50A5A2B38CE /* Division.swift */, - C0B695B584A94039305F17CD2B5470FB /* Exponentiation.swift */, - B508E0F1A0F3142EB46882B0104D6F6B /* Floating Point Conversion.swift */, - 167A6E691DFD15BA9883036B14F41D03 /* GCD.swift */, - ACBB5EB9CDB6065227935806FA94DC6B /* Hashable.swift */, - C83C510AD112596C90B76C308A60DF14 /* Integer Conversion.swift */, - 1B27C53CBFBCBC1E6466F7294EFBEA93 /* Multiplication.swift */, - F31913059D849B57CB91C3B18F4D92EB /* Prime Test.swift */, - DC03B1A635B5BB3ABD74980E5A3FFCF1 /* Random.swift */, - 0CCB1D05E6EF6E5D33F3A993B98DD675 /* Shifts.swift */, - 91EFA6BFEDFE86C5744B8A08BD45CC1D /* Square Root.swift */, - 705526D46CF8710526DEFD6A81185AFA /* Strideable.swift */, - 07BD7441D03BCED026093ADE867666D4 /* String Conversion.swift */, - E684DB7BA3E633421079ECE297E5C154 /* Subtraction.swift */, - 4FE4AFACA87A9BC9B7F46A7AAD878E33 /* Words and Bits.swift */, - 465EBB6008CEC55DAD0DFAA7BAB50B26 /* Support Files */, - ); - name = BigInt; - path = BigInt; + path = "../Target Support Files/BigInt-iOS"; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { @@ -1530,123 +1483,100 @@ children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 0F8D2E47FE03D3B91B51069F7C273AF4 /* Frameworks */, - 959815D7C3AFCB9AD39A1AF770EA6A91 /* Pods */, - 083C1381B3CFEF7D89B7A4A992CA51B1 /* Products */, + 1AC78478C51907110096C348221D88EC /* Pods */, + BC988C585F01918CDC758DA84387BAF3 /* Products */, 0016905C45F8F01C6D080425028330F0 /* Targets Support Files */, ); sourceTree = ""; }; - 8ACB65C1763D3BB158F6CE4F35505E40 /* SwiftRLP */ = { - isa = PBXGroup; - children = ( - 955AD7671107B2FCAF7A725E38DA6513 /* RLP.swift */, - F5740FDA157E822449AD928A2FC56532 /* SwiftRLP.h */, - 500695EA7F9BD491B9D1B83B8B251DB6 /* Support Files */, - ); - name = SwiftRLP; - path = SwiftRLP; - sourceTree = ""; - }; - 8E6B0C1A447E80EA59FA65477BCF15E1 /* scrypt */ = { - isa = PBXGroup; - children = ( - B017F47BE0A65E45E065EA00452F0D28 /* BufferStorage.swift */, - 3E6E7087B7CBB4230AEFE06A0586FEA1 /* Cimpl.c */, - A8E64677621D080BA0F099180A4886F7 /* Cimpl.h */, - 05760D356B4317540E7373046A1A3CD6 /* Salsa.swift */, - 318BC6D7199E76698CC662BB48AE0E81 /* scrypt.h */, - 0D20E70F3D0A72813BC2CD93F028FF1F /* Scrypt.swift */, - 9328B12651E2E02AA9441B1A29B58289 /* Support Files */, - ); - name = scrypt; - path = scrypt; - sourceTree = ""; - }; - 9328B12651E2E02AA9441B1A29B58289 /* Support Files */ = { + 9B38CA57FC54E4DA492DC4C23904561E /* Support Files */ = { isa = PBXGroup; children = ( - 7895D4EC130402D473CB15EDD68ACA2A /* scrypt-iOS.modulemap */, - 0475C2751B32FD3CB4D4A78B955F50F8 /* scrypt-iOS.xcconfig */, - 05829B47F24F4E5C604129AFF8534C15 /* scrypt-iOS-dummy.m */, - EE76562D54EFA48803D8FF2937F3AB0A /* scrypt-iOS-prefix.pch */, - 3992689C4E8FC6AE9958D04582793809 /* scrypt-iOS-umbrella.h */, - A4A8846DC8DC969B376FC38B435C87F8 /* scrypt-macOS.modulemap */, - F40F91A4B7758F182DBA05D9C974003E /* scrypt-macOS.xcconfig */, - 5B66168E0567CA1671C74F37384DD7B7 /* scrypt-macOS-dummy.m */, - 3965CA10F7B404A9629D09C0513F2A04 /* scrypt-macOS-prefix.pch */, - CD2614924B987A4DF27727D9ABE96822 /* scrypt-macOS-umbrella.h */, + 049ABCA847872C85F1B4A543A069DB7F /* PromiseKit.modulemap */, + 453B783DD499D624880A972C2DC8C94A /* PromiseKit.xcconfig */, + FF1BE57EBE989B2B7EDD166127B5FCD9 /* PromiseKit-dummy.m */, + 02516902C16D7E925BA5D0CD9531308D /* PromiseKit-prefix.pch */, + 52059A76F9DA89149396ABB84A8A5780 /* PromiseKit-umbrella.h */, + CA8015AE976B6601CC46035D043423E4 /* PromiseKit.root-CorePromise-Foundation.modulemap */, + E8554570D5B7F10CEE0823FEB5B80B8D /* PromiseKit.root-CorePromise-Foundation.xcconfig */, + 08CA1065DA6D886DAD8978D531C6C531 /* PromiseKit.root-CorePromise-Foundation-dummy.m */, + 86B372DE536C71560B5E85E340F3F6C9 /* PromiseKit.root-CorePromise-Foundation-prefix.pch */, + FA1C0BFC1A022B5AD3BDFC8920FCFD74 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/scrypt-iOS"; + path = "../Target Support Files/PromiseKit"; sourceTree = ""; }; - 959815D7C3AFCB9AD39A1AF770EA6A91 /* Pods */ = { + 9F433791C3C200F7BC10E40694405F12 /* Support Files */ = { isa = PBXGroup; children = ( - 77F760D6602BE418D145528348B2C2B5 /* BigInt */, - 39DFA4602C912016E7B290E983B4A7F6 /* CryptoSwift */, - 1F160E42E243D1D1DB459D9E7F412751 /* PromiseKit */, - 67F59D2A962E5817273BE58A4B0131FA /* Result */, - 8E6B0C1A447E80EA59FA65477BCF15E1 /* scrypt */, - 514C4F100A5BC1252ACC9205AF231647 /* secp256k1_swift */, - 5FFD514D176791D2012564885C0B358D /* SipHash */, - 8ACB65C1763D3BB158F6CE4F35505E40 /* SwiftRLP */, + 5CAF8471B488702419FE2C532D4D11EA /* secp256k1_swift-iOS.modulemap */, + 1412597E34EB8268006B0BCFF20BB89A /* secp256k1_swift-iOS.xcconfig */, + F9D80D5C595654C7E23670359CB76D99 /* secp256k1_swift-iOS-dummy.m */, + E26835835263C5B5310353A54E6AA37E /* secp256k1_swift-iOS-prefix.pch */, + D08241C8DB918E40A54A24828275D1C5 /* secp256k1_swift-iOS-umbrella.h */, + EA5498F48A9D57F5578FB70B8544C14C /* secp256k1_swift-macOS.modulemap */, + 8CC8A14105420D222F37BBB95BFBF1A3 /* secp256k1_swift-macOS.xcconfig */, + FB320DD9FD83A5F3BAADF33818736C30 /* secp256k1_swift-macOS-dummy.m */, + C06A130503E666429FAF2F0101641EE7 /* secp256k1_swift-macOS-prefix.pch */, + 1BBCD0009252A5C66FFA6A2EDAE25173 /* secp256k1_swift-macOS-umbrella.h */, ); - name = Pods; + name = "Support Files"; + path = "../Target Support Files/secp256k1_swift-iOS"; sourceTree = ""; }; - 968E195A239C7A2A779AF02DF8828396 /* Support Files */ = { + A33DC2AD3BADDA5A006F792ED154E7A5 /* Support Files */ = { isa = PBXGroup; children = ( - 6C01FC83057F30818B00CDD8B62AC6B9 /* SipHash-iOS.modulemap */, - 7A37EB85984F608037881FD6E14786A3 /* SipHash-iOS.xcconfig */, - F04918D981D6BA6B8E1B45E4C1D23089 /* SipHash-iOS-dummy.m */, - EB554DF617A1C02E83AC1D59855D1C02 /* SipHash-iOS-prefix.pch */, - 099CBD52589F67F91C4263550552B849 /* SipHash-iOS-umbrella.h */, - 2CF235AEEC6AC29CA5A1331269520B36 /* SipHash-macOS.modulemap */, - 0091667FAE21CC6D590AC1ADB6410352 /* SipHash-macOS.xcconfig */, - 8A49E7FFAA1F69AF0BFDC8A0CFCB938D /* SipHash-macOS-dummy.m */, - F041C44E58385737D071918EF8503628 /* SipHash-macOS-prefix.pch */, - 6C59784B76CA65D06F275EBA259540AC /* SipHash-macOS-umbrella.h */, + B5874904C32DED94E05CFD33023E2A19 /* SwiftRLP-iOS.modulemap */, + E34EBA5D815562B6AEF202EEF42D4456 /* SwiftRLP-iOS.xcconfig */, + D4294CA40AB575970217A19CAA320DC0 /* SwiftRLP-iOS-dummy.m */, + EBF499BFE8AA65F3D4DF5B33BA57DC88 /* SwiftRLP-iOS-prefix.pch */, + F03C5346C1BA44E2325916DC9CE7B67B /* SwiftRLP-iOS-umbrella.h */, + 83818CBF92E26919EE29AD92612A44AF /* SwiftRLP-macOS.modulemap */, + 3D2AD51705C652FD9094CEDC59DFB4FC /* SwiftRLP-macOS.xcconfig */, + 41F99637E28F2B9DC1A86CD6B490CE52 /* SwiftRLP-macOS-dummy.m */, + 750CBC755AD04183E9D574E073F02223 /* SwiftRLP-macOS-prefix.pch */, + 5447D2654ABD868EB73A2BF12AD74DE8 /* SwiftRLP-macOS-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/SipHash-iOS"; + path = "../Target Support Files/SwiftRLP-iOS"; sourceTree = ""; }; - 9B02CB12B4E3FBEF788C7B68B6161612 /* Support Files */ = { + A5E4D51B8435BEA960C87E86236F1E08 /* Support Files */ = { isa = PBXGroup; children = ( - 5250B8764D7489940F140620EA371F7F /* CryptoSwift-iOS.modulemap */, - FFA38A7573EBA79AA83EBCA62742C2CA /* CryptoSwift-iOS.xcconfig */, - BA4DC9927DEE120B1F101C5D3C546B09 /* CryptoSwift-iOS-dummy.m */, - 092E8D6F47871894D8044C4145939CD2 /* CryptoSwift-iOS-prefix.pch */, - EEF44FF851A27BCE1872F1FEBF9A9440 /* CryptoSwift-iOS-umbrella.h */, - 1EBD08D75A25D39EC9FA85F75EFBD0CB /* CryptoSwift-macOS.modulemap */, - 9B3C1FAD3DD5A0A918CA3605928E5CA9 /* CryptoSwift-macOS.xcconfig */, - BFC2F7559BA52B8D992D11A537D7FEBE /* CryptoSwift-macOS-dummy.m */, - E590EF6D990EA299BA2660A1BC53DEB9 /* CryptoSwift-macOS-prefix.pch */, - CD4C2245061DDD251D7082A04D84F218 /* CryptoSwift-macOS-umbrella.h */, + 82E0889BDE7E61BD4767DCF66AB18FF7 /* CryptoSwift-iOS.modulemap */, + B6112FCF75FBFC58E314A40652665F06 /* CryptoSwift-iOS.xcconfig */, + 09536C3B22879E31B5C0B3426E2FEBCA /* CryptoSwift-iOS-dummy.m */, + 09601767E682E0D86F15EF42B2DCAD46 /* CryptoSwift-iOS-prefix.pch */, + F310D1B89DD81708BBBAED0DDF1B1168 /* CryptoSwift-iOS-umbrella.h */, + 9E8B25F37CB474A2BE03252DDC5BA0BE /* CryptoSwift-macOS.modulemap */, + E79185DFEB64004C5523F725F3DC89B0 /* CryptoSwift-macOS.xcconfig */, + D8D1F94E4F2A45EC9F2154127E14D416 /* CryptoSwift-macOS-dummy.m */, + 39A04A76F1A947E73DA6CC6FE271B82D /* CryptoSwift-macOS-prefix.pch */, + 26BEF092AF19B017CCEAC5BD6EDFADBC /* CryptoSwift-macOS-umbrella.h */, ); name = "Support Files"; path = "../Target Support Files/CryptoSwift-iOS"; sourceTree = ""; }; - A5C4D9D7AFF383E08F48064F0547394D /* Support Files */ = { + A8CB084B7ACB8AC7C10C0B25D0347442 /* Support Files */ = { isa = PBXGroup; children = ( - 856FFECE484989935BD3A92DEC7353E2 /* secp256k1_swift-iOS.modulemap */, - 7D2ED7B574BD12D6937C37D79B6355D2 /* secp256k1_swift-iOS.xcconfig */, - 345299796DBEE665766F152916E0A531 /* secp256k1_swift-iOS-dummy.m */, - BFC0489E9BD48E1BE679A7A9A3B4D875 /* secp256k1_swift-iOS-prefix.pch */, - EC9440034E7256986111FBC505567C26 /* secp256k1_swift-iOS-umbrella.h */, - 5124B9DB14585DB3252BDB2B0F4A7FC7 /* secp256k1_swift-macOS.modulemap */, - 10F96D8FE1C5606E4F729FFD623428A3 /* secp256k1_swift-macOS.xcconfig */, - 3FDABDA201433FD66D894DAEF0761C26 /* secp256k1_swift-macOS-dummy.m */, - 62BD8229A9BC1A38D866BEDF45C366E7 /* secp256k1_swift-macOS-prefix.pch */, - D11A10393AAAF35194650B10A6ADE234 /* secp256k1_swift-macOS-umbrella.h */, + A7C42C91EB3AFB8674EB313560E4D9A8 /* EthereumAddress-iOS.modulemap */, + AD76DBA7730870FE66D77B1FC33E49E0 /* EthereumAddress-iOS.xcconfig */, + 23299E01AF2849576AF87D2A3EB8D494 /* EthereumAddress-iOS-dummy.m */, + 28F6D61D90FB438C4CB2856FA258E35B /* EthereumAddress-iOS-prefix.pch */, + 4A2766B8B12BFE63523151BC3F80CDF4 /* EthereumAddress-iOS-umbrella.h */, + 5C3CED0A47AF7E341A3EBD1849B12F6F /* EthereumAddress-macOS.modulemap */, + AA1E87AB6BC235D2BF0B5287F5ADD105 /* EthereumAddress-macOS.xcconfig */, + 4BF61EAD9C9EC96163CECACFBF3504C3 /* EthereumAddress-macOS-dummy.m */, + 121546801BC1F73B1E78D3BA38876A8C /* EthereumAddress-macOS-prefix.pch */, + 0A734506E75FE208AFB8DA726262FFEC /* EthereumAddress-macOS-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/secp256k1_swift-iOS"; + path = "../Target Support Files/EthereumAddress-iOS"; sourceTree = ""; }; AAB417525B4AA28CC55EECA7CFDAB251 /* Pods-web3swift-iOS */ = { @@ -1664,28 +1594,225 @@ path = "Target Support Files/Pods-web3swift-iOS"; sourceTree = ""; }; - BDEB2A43D2221D8016FA7E76367811E1 /* UIKit */ = { + BC988C585F01918CDC758DA84387BAF3 /* Products */ = { + isa = PBXGroup; + children = ( + AC8ED311289866CD8ED870EF0C3C5CF3 /* libBigInt-iOS.a */, + EF13999388904A7883CEA9B745018AAF /* libBigInt-macOS.a */, + A8865640371B98CE908E1A9A63C4B984 /* libCryptoSwift-iOS.a */, + 4D5B77EB47B2435BCBF83C39D0D576F5 /* libCryptoSwift-macOS.a */, + 97504B2FA23741AEEDD649E58BF39870 /* libEthereumAddress-iOS.a */, + 53C768170DFB632A3ADBD2A703116B8E /* libEthereumAddress-macOS.a */, + D275AC61F658F73CFA8823434BCA3406 /* libPods-web3swift-iOS.a */, + FF66C3EFCA475A91734C76A5D546BE1A /* libPods-web3swift-iOS_Tests.a */, + 1DF1726C7221A0B7805EF3E180CE8007 /* libPods-web3swift-macOS.a */, + 7573EC5C506627456A38A22DC6C134BA /* libPods-web3swift-macOS_Tests.a */, + 10E2FD109C104BBFF96C8BEAE5D93A6E /* libPromiseKit.a */, + A09088A41F90C0893A27DEF1C26D11AB /* libPromiseKit.root-CorePromise-Foundation.a */, + 666BE65938A502C928B35D6EB5CA9FDA /* libResult-iOS.a */, + 75DE42DDF2D327BA352CD0F8C0DA4B0F /* libResult-macOS.a */, + 17F353B4B162974207D9F48A62765D99 /* libscrypt-iOS.a */, + F4F0BCD366AE2D51D6C35C2192996DBD /* libscrypt-macOS.a */, + 20D278014F2D90DDD7C703E49B6727B7 /* libsecp256k1_swift-iOS.a */, + 4C332617281C7BEB03040C92EF610543 /* libsecp256k1_swift-macOS.a */, + F99CCF5FD903883FB3C524CA2FB43E2C /* libSipHash-iOS.a */, + 58D4D38A480BA09A08C8523AF72783C5 /* libSipHash-macOS.a */, + FDADCB9A8CD9274EA3AC09BE3B7E0F66 /* libSwiftRLP-iOS.a */, + 6A0F097AEAD44F8F983B8D4F884FDE42 /* libSwiftRLP-macOS.a */, + ); + name = Products; + sourceTree = ""; + }; + C983EA1AC8F89B7B13410C24C8F9C35D /* Support Files */ = { + isa = PBXGroup; + children = ( + 8ED7C1CFBF67F4C0CD5645DF35F608F7 /* scrypt-iOS.modulemap */, + 0DE0997E93980E728205BE4BF37B5FBC /* scrypt-iOS.xcconfig */, + F0866AEDD788E4D8B51A31A2FB8C294F /* scrypt-iOS-dummy.m */, + 656AF5A70C93A14D7EF9E1E97A73DA9F /* scrypt-iOS-prefix.pch */, + F84F141F7B6CD4974D2BDD888FE19496 /* scrypt-iOS-umbrella.h */, + A0CE29B48517362C21FF1B3F9DCB7619 /* scrypt-macOS.modulemap */, + 80E74674EB94CDFBB8B77B11BACD6046 /* scrypt-macOS.xcconfig */, + 51FC3239F6613D1D7AE1AAD0F3204A0F /* scrypt-macOS-dummy.m */, + C4D487F201A77E03F9ADC03703A1A897 /* scrypt-macOS-prefix.pch */, + F60B61CB7F6EF778CD12A3622F779434 /* scrypt-macOS-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/scrypt-iOS"; + sourceTree = ""; + }; + D62BC46C0C93C11AECF63AC21156635E /* UIKit */ = { isa = PBXGroup; children = ( - 002BCC8DEC6CF0087CDD9F17D1CB63D8 /* PMKUIKit.h */, - 0923A9FA118D244659624C1F0BD11796 /* UIView+AnyPromise.h */, - AE738DB7791144612A4D0951B0C43A7E /* UIView+AnyPromise.m */, - D5FF562EECDB0679D662D82F7A5AF6C0 /* UIView+Promise.swift */, - FF238B78A8B1951C382DC7D8C0DA9412 /* UIViewController+AnyPromise.h */, - 323129AF4AE1EA178343E46476163880 /* UIViewController+AnyPromise.m */, - 08220EE2495D2C17B6366EFD53B51AC3 /* UIViewPropertyAnimator+Promise.swift */, + 614D3F652018D0D4BB869BAEEC3BFA5D /* PMKUIKit.h */, + 632F66F6756738B3DBCD9FE0F29FD51D /* UIView+AnyPromise.h */, + AFD5882A04E0E27679FE6AAC8D9CA935 /* UIView+AnyPromise.m */, + E90C5426B3E9CBBCF9A8B6731836D354 /* UIView+Promise.swift */, + 8787D00BE428B5C383E25BF2ABB38CC4 /* UIViewController+AnyPromise.h */, + 506B39E37C9D076FA278322A078D548D /* UIViewController+AnyPromise.m */, + 2D4F789F0354155D07BB3A1463344281 /* UIViewPropertyAnimator+Promise.swift */, ); name = UIKit; sourceTree = ""; }; + D744BED64DE3B64CE5A12B74A22D228D /* BigInt */ = { + isa = PBXGroup; + children = ( + 3487EA794F9422FD28689C37156DD9FE /* Addition.swift */, + 8AF5980AB239F34C8CB958F30A518A0B /* BigInt.swift */, + 6633CE6E0F4DA082E8A3374A723A4844 /* BigUInt.swift */, + D1FC3BBD92A37B6D1B9844791FDD7F86 /* Bitwise Ops.swift */, + 8EA80C3235171417958F658E327CCF8E /* Codable.swift */, + 809F44457475B204EE242D251FDF9E8E /* Comparable.swift */, + 755E0B91B0984ADEF77E48E32C147276 /* Data Conversion.swift */, + 1A86CAF979F3E970071A5FC47D9D7EAC /* Division.swift */, + 89B539CEC7927EBE7BBF7262580A0E18 /* Exponentiation.swift */, + 9D5F98CA61161B592980B259143F48F5 /* Floating Point Conversion.swift */, + CB4E43C9EB1F78AD84B2314039898608 /* GCD.swift */, + BD14A2D2C9467CDF73E9EC39F2B97E62 /* Hashable.swift */, + 78AC661E237EC28BD38872134D7F7E2B /* Integer Conversion.swift */, + 58F3E29F9DFEE63DA2847094AA590666 /* Multiplication.swift */, + F218E50D513522160983106C90B34FBE /* Prime Test.swift */, + 9787E8C8BA8DAE16D659DA569EECED22 /* Random.swift */, + 7953EE95375573E978E0FAC7F88260CF /* Shifts.swift */, + 491E82F8B7D6BC0F752EEA10F629435A /* Square Root.swift */, + F32BA5AE4C0BE79090A24F00A3F35AFF /* Strideable.swift */, + 682CE9677672C1F944AA2896D3BD36FF /* String Conversion.swift */, + 5DFE72A11A0AF97FFCEBDF19EC395F74 /* Subtraction.swift */, + 73043D2C83B1F1E5EC8F0E15C2CFE5A5 /* Words and Bits.swift */, + 717DC5E859A757E25C926AA3C8443397 /* Support Files */, + ); + name = BigInt; + path = BigInt; + sourceTree = ""; + }; + F026F54B353351B219A0C4BE3E0C2871 /* CorePromise */ = { + isa = PBXGroup; + children = ( + 5297103B37D2E5083D67ABE2C60CA382 /* after.m */, + E022DA9B1DCAC9A88B18D90457826545 /* after.swift */, + 2BE63C0E40FA294F6C512967711E56D9 /* AnyPromise.h */, + 635C328C2CAB4B34DEF69D8CFABA3AC1 /* AnyPromise.m */, + 7695A9A41BFEEAD40C0235B913A07672 /* AnyPromise.swift */, + 3D6CFCC98052B542B8BD8050E0204993 /* Box.swift */, + FF94FCFAAA2F4216A2F89F43E2CDA4DA /* Catchable.swift */, + 01271B2BB62FE2D72466A630AC9D1BE8 /* Configuration.swift */, + 0EA0E0A67D5738512E4618E1AEDA5E3E /* CustomStringConvertible.swift */, + ED4A3438C4739D717703BAE1F7020595 /* Deprecations.swift */, + 8C3F64F8D233B557ADBCBAB5F8D81F1E /* dispatch_promise.m */, + CEA9421290E9294FEA25D9F6D3DDD24C /* Error.swift */, + 0C57A83FBD44C769166BCCC5CD45BD3F /* firstly.swift */, + 40ABB4750B401A88B273D3B180C1FEC9 /* fwd.h */, + 0B152212D05CB08C4E0B61D8CDFF12C9 /* Guarantee.swift */, + FD3D00DC2D85B010C2EB60CA78D22508 /* hang.m */, + 145A69383BF153D7728F4793AB68C3C4 /* hang.swift */, + D7009940ED0BFC1AA385433559754C27 /* join.m */, + 68CD2728F142362B577571D597A953D0 /* Promise.swift */, + 0E67F7B0700CACBB7DFD27A88EFF75C2 /* PromiseKit.h */, + 358F7A798EA72C8BFA7C4AA5D7A22723 /* race.m */, + C21956F497DCFA1D883CAC00AF330784 /* race.swift */, + 25E9E042655265AEB9322FB01DD7A702 /* Resolver.swift */, + 982B03AB9D403479BF865D7C3A5B2D4F /* Thenable.swift */, + 612CB1FE4A4EF26D20DC64543E17C82A /* when.m */, + 85BEAAA1888D13FCFC9F1C2AB3A7ABBD /* when.swift */, + ); + name = CorePromise; + sourceTree = ""; + }; + F60B65C0BEC31AA822288722889BD576 /* secp256k1_swift */ = { + isa = PBXGroup; + children = ( + 80353B76ABA10ED9D59C18FDA6A16285 /* basic-config.h */, + 2AF08003360A2A59E3E059CBC5496E71 /* ecdsa.h */, + B2E36C3B29C59A6C972DBF40C0EF93D5 /* ecdsa_impl.h */, + EE8A73B5FBE9F82E34238AC840FC7331 /* eckey.h */, + 678FC45FCDC1237D6344CFADDB22F228 /* eckey_impl.h */, + 310A618141B833B61214988468629C13 /* ecmult.h */, + 3E5F93B0E61748A9D9906D3305A41EA8 /* ecmult_const.h */, + B177F4FEBB7F565C10EB6AABDF0CFB6C /* ecmult_const_impl.h */, + 0554DC016A3872F60738FE5C366CAF31 /* ecmult_gen.h */, + 062A95E74B96944BC0E3A674E72AE85E /* ecmult_gen_impl.h */, + DF39D90FCE7EA42EF346003BA8EF96AF /* ecmult_impl.h */, + 2BC7202C545EAC46F224EE9AB6B1F0F7 /* field.h */, + 531B65B7CD936ABCBE9D4C182A88CDF0 /* field_10x26.h */, + 9821B82F2A2D9E9E0A740B6B4B38A6AB /* field_10x26_impl.h */, + C66DD520FECE2C1EE69FD6A9E23EA032 /* field_5x52.h */, + 282DD884F817856F0FD3D38F8A4447B1 /* field_5x52_asm_impl.h */, + 3E8F4C6770C979220F90AD2CBA4EA3CE /* field_5x52_impl.h */, + 5540F42E4F8BF99A1C7F95349EA8707D /* field_5x52_int128_impl.h */, + 3C9CD6920241610BE46DBB9D591849AD /* field_impl.h */, + AEB5F00EFE918C35C091FD2FA7EACBF5 /* group.h */, + 681146D3345FF5156D09E271666D5EA1 /* group_impl.h */, + 9D1AB32F0AE7B734159BB1FBAF7F5078 /* hash.h */, + 3ED371C14676A66BA35BCF542FF8B548 /* hash_impl.h */, + CA97BDA6DF1DE11A96470DBF6FBD7C62 /* lax_der_parsing.c */, + D9A9A6187028CC6AD623334BA2899FDE /* lax_der_parsing.h */, + 1D7B42933B2D81EED52706C7200A9732 /* lax_der_privatekey_parsing.c */, + 7D903E031FC7FD31DA94E1EC68778019 /* lax_der_privatekey_parsing.h */, + 255F9BD02565315A20D36910794D0C10 /* libsecp256k1-config.h */, + AEA94352D4A3D0793D359A8C1CB50E4A /* main_impl.h */, + 1EDD6BBAF4F23E405AA0CA5AA2837BD9 /* main_impl.h */, + EB3A44C98D1E93465803241C08887CDD /* num.h */, + 63C148A221559836C278AFFB2F0C6D3D /* num_gmp.h */, + 3E75AF68728F33A9AC112BE223CA6718 /* num_gmp_impl.h */, + BA200D6941B69ACC080DFB132BEFF422 /* num_impl.h */, + 944A08F05724AD8D1EC4F7FF0D09BFE6 /* scalar.h */, + B9737D99B060F85A0A42A3A30335B14F /* scalar_4x64.h */, + D8241FAE07EC659EA8EE9D035AB05377 /* scalar_4x64_impl.h */, + 423E241FA5BBF42BFDDA5E6C6AD2DEB9 /* scalar_8x32.h */, + 7388674CDE22815644490821F0CB757B /* scalar_8x32_impl.h */, + 37B67C2B42A2EC2E689AE41636261351 /* scalar_impl.h */, + 08390C702E93A122CAC37BDF6A07A98C /* scalar_low.h */, + 5595E1873CFBC6061E8C6D86BFF12807 /* scalar_low_impl.h */, + 3ED02D5B7EB6BD54C515B4B06599DA5F /* scratch.h */, + 93A5B46AC7CC995589CAA3D991DC1B29 /* scratch_impl.h */, + 7DF576FC1DAC9EC11DA44099F4F50AFE /* secp256k1.c */, + 3E8DAE988F4403CE8B047E936F2B4AE1 /* secp256k1.h */, + F8262D72960A17572931F11EC9520938 /* secp256k1.swift */, + 07CB743A805B99BE84DD49F8D999BF5C /* secp256k1_ecdh.h */, + F5AA52D2E5DC0134CBA0CB3219327A53 /* secp256k1_recovery.h */, + E7E7786C2EC1054AF047E2571B12205F /* util.h */, + 9F433791C3C200F7BC10E40694405F12 /* Support Files */, + ); + name = secp256k1_swift; + path = secp256k1_swift; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 1981098BE859E5C5C86D4B2DB76FCB79 /* Headers */ = { + 0A517913ECA631FD90F898E1AC9F73FA /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + F1566684B5EC4250C3F2D3F422CFD689 /* EthereumAddress-macOS-umbrella.h in Headers */, + 13D45CC6E83EFEB9467158ECB394D367 /* EthereumAddress.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1D082DF5FB317A292B865320EA4330E8 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 582EE7A8797F29AD814C0F877E811808 /* Pods-web3swift-macOS-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 263A6BE4E6989F362AA0E5FEC75D6EB8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 662343AAB2E8FCFC56D2176CE50BE184 /* Pods-web3swift-iOS-umbrella.h in Headers */, + 2177A7B4F26FBB839E1C3F07A82887E4 /* AnyPromise.h in Headers */, + 0EF95CCD3EF4EC40F109D9D364B6504D /* fwd.h in Headers */, + 33FA2A0C3B7394329B6B9B32D5EE53A2 /* NSNotificationCenter+AnyPromise.h in Headers */, + CFCAF13F717E0088FD8C51EE4460EBBE /* NSTask+AnyPromise.h in Headers */, + B0968028804FC340046D3FDD23551189 /* NSURLSession+AnyPromise.h in Headers */, + 59E8068AD7D81375CF6BD6C079A6CD52 /* PMKFoundation.h in Headers */, + A2913E511FD4FA1AAEB9256360C0AE51 /* PMKUIKit.h in Headers */, + DC3FC4BC15FF43709E43B8FAA2B6FD3B /* PromiseKit-umbrella.h in Headers */, + 9F7BA0F07BB50D1DE1036928BF70C2D3 /* PromiseKit.h in Headers */, + 9F386CB50D39A65571DCFD394C23D8E2 /* UIView+AnyPromise.h in Headers */, + BD0E70C62B7FC0BF874D98D6C855FE1D /* UIViewController+AnyPromise.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1712,75 +1839,66 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 5ECD580778CAAFD4B701E7D6ABE86577 /* Headers */ = { + 54DF3F44A9C01544510F7FA211E2D61A /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 105F429373F6706BF003DD2C5E1AA9C6 /* basic-config.h in Headers */, - 3B100200B920BCF7D6974806539B857E /* ecdsa.h in Headers */, - 4C7033236EE3A20A2AAA6B8F51285FA3 /* ecdsa_impl.h in Headers */, - 172EFB075E38CF4867F6A5978709A512 /* eckey.h in Headers */, - 784703A2DB2FA871E907D206577630EC /* eckey_impl.h in Headers */, - ABFA50427C4CC466CBA9B0E7145D83D2 /* ecmult.h in Headers */, - 417A2304F303DED593E55D2CAF337305 /* ecmult_const.h in Headers */, - 372CD468A7496DF050E653C20AB8AC1B /* ecmult_const_impl.h in Headers */, - 2D2FE7ED51FDF3B95792AE43AAA8C9C3 /* ecmult_gen.h in Headers */, - 5B6447E44DCD6DF880956561D716D42E /* ecmult_gen_impl.h in Headers */, - F185E763BAC53270CAE635AB9CBADB37 /* ecmult_impl.h in Headers */, - 0B21F43DA91211F06BA2166391E44172 /* field.h in Headers */, - CDAF5D27B2605E4DA359618DCDF5618B /* field_10x26.h in Headers */, - AF373538A9B5EB2BFD84D0DD002478A1 /* field_10x26_impl.h in Headers */, - 1FCD29F6706433B229F21EA39F8C3597 /* field_5x52.h in Headers */, - 711CA891836C6E9371B8C5DBEDFD346C /* field_5x52_asm_impl.h in Headers */, - 24361E1EC1CCE0031F26E38746EEE1EA /* field_5x52_impl.h in Headers */, - B892841BE90F7FC437B124E45EFA91BC /* field_5x52_int128_impl.h in Headers */, - 3ABE390A4511DB44A24945B088C8E48F /* field_impl.h in Headers */, - 8B10C87FE35BA83424ABBA01D0669FF8 /* group.h in Headers */, - 0A1610D5063DE2AE6FD20FBA35E267E0 /* group_impl.h in Headers */, - 6DEBA1C6CA8D2095A1CCE1A0090E23D5 /* hash.h in Headers */, - C5B7FB9E96E537586482FA629C14406F /* hash_impl.h in Headers */, - 94C3998EDCB3C4B71B110099E7E3E975 /* lax_der_parsing.h in Headers */, - 036E2618599F02C9CB7D022B49CFFA1A /* lax_der_privatekey_parsing.h in Headers */, - 6B815DB2B9AAED0232FEDEC0184C28F1 /* libsecp256k1-config.h in Headers */, - FF200FE02402662078B4D0C3C7AF4CEE /* main_impl.h in Headers */, - 224BCAC718A8A96B1494162E8F1FFA50 /* main_impl.h in Headers */, - F0C24231ACA39257DFE5A318ACC8A896 /* num.h in Headers */, - 98DF8B5D60DAF3B7AC6B1899CCE12A74 /* num_gmp.h in Headers */, - 9EF7B2E48C40E82E7EC0E85F6B0222E8 /* num_gmp_impl.h in Headers */, - E85B97EE8946089E5E8ED93B60847B7A /* num_impl.h in Headers */, - 8ADF39D418D2741819C863545BBED5D6 /* scalar.h in Headers */, - 6DBDEE14D217B557CE2EA3D1BE065D64 /* scalar_4x64.h in Headers */, - A1E48947F828D226B1FF667AFDD0C23A /* scalar_4x64_impl.h in Headers */, - BE0E1C30E47FC6E0A931819265DF6F30 /* scalar_8x32.h in Headers */, - AC9330E734E319351A6F8440BEFFFA1D /* scalar_8x32_impl.h in Headers */, - 9B953A89FD0508E9463F5FE0D9F91D44 /* scalar_impl.h in Headers */, - 5185A27FC19CEB1E69F99F8CE56639A9 /* scalar_low.h in Headers */, - 8EBBD4D88DD8F98CEC0791A902D2438C /* scalar_low_impl.h in Headers */, - 358FB06B0B99F2187EA1658EA97F1020 /* scratch.h in Headers */, - A7799E0318407597777B039DFA8353D2 /* scratch_impl.h in Headers */, - AD14BE19983A139FDFD89FE6E3E68C3E /* secp256k1.h in Headers */, - 4327DB0149A7B915F54982114D289E21 /* secp256k1_ecdh.h in Headers */, - A7A7567A6AB8900623AC752D617FFC9F /* secp256k1_recovery.h in Headers */, - AD2857A3144D7DCCD02D55CE8F6F8AA5 /* secp256k1_swift-iOS-umbrella.h in Headers */, - A33313D130AD8E1D44BD46B119D45186 /* util.h in Headers */, + 11461F81975B779BC100E7345CE2D793 /* EthereumAddress-iOS-umbrella.h in Headers */, + BB8929C86AEF5AE8E8A10D8061185D47 /* EthereumAddress.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6AC43EC948A0FAC9BE645CA2CD5DEC98 /* Headers */ = { + 7473267694EB25007FA3A05AD22C3D27 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 89B40A1B6B4771D884CC857A62E3E33B /* AnyPromise.h in Headers */, - 41C19BD34A261EF87BC9282C3A634240 /* fwd.h in Headers */, - 1E94C3B3573434FC150CFE79FB8EA24B /* NSNotificationCenter+AnyPromise.h in Headers */, - 627F0BB24DFEFE1C3CCA592AFF4E01EC /* NSTask+AnyPromise.h in Headers */, - BDCD56C5B86F8512F7AB9AB6F5B15475 /* NSURLSession+AnyPromise.h in Headers */, - 23BB4D6CA0785AB14CFA443BBAB22B54 /* PMKFoundation.h in Headers */, - F6D5E2F0DFF915694A71C76154312B42 /* PMKUIKit.h in Headers */, - 4216370E79CC772FC2572BB6143CD8BA /* PromiseKit-umbrella.h in Headers */, - 478D6AC79B09119FD888179B7B3E3948 /* PromiseKit.h in Headers */, - B9058EEEDD24D3D6D7F1F9014827C9CF /* UIView+AnyPromise.h in Headers */, - D5B55C94D365080FC8CBE5B01BEDA5CE /* UIViewController+AnyPromise.h in Headers */, + 946EE4F3900E73B0823B57F1AE8C47BD /* basic-config.h in Headers */, + EB61FACF6827E43E518AF99AFE8ADD09 /* ecdsa.h in Headers */, + DA74E106DB2F609C8C444565678896BB /* ecdsa_impl.h in Headers */, + 0C031445C897BFE6D124AD54FA1B39E4 /* eckey.h in Headers */, + 526530B8F45F2C42F4B731C1BC05C532 /* eckey_impl.h in Headers */, + 21DE72843C7B514A5D846FB52A8976C0 /* ecmult.h in Headers */, + FE95B067321486A5998C5DD4DF31862A /* ecmult_const.h in Headers */, + 12E1E9691B7286282223CB20A574F364 /* ecmult_const_impl.h in Headers */, + 5D3C0267F1EB78B6038FF2898C20A737 /* ecmult_gen.h in Headers */, + 35E543DC36F19E32B3EC8F6652420EEF /* ecmult_gen_impl.h in Headers */, + 3DEC2D219AA42627099A9C723B66AB97 /* ecmult_impl.h in Headers */, + 068E167EF11A07C17D688B3BBC218D34 /* field.h in Headers */, + C804D008E78513D7097A478AE1BDE395 /* field_10x26.h in Headers */, + 4971308DFA5E58345B78AA42538C65DA /* field_10x26_impl.h in Headers */, + 55368A922AD4C49FF4D8A4042ECBB7F3 /* field_5x52.h in Headers */, + 9970A7335034C125C75BF4CC2B9F3AC5 /* field_5x52_asm_impl.h in Headers */, + 81F2542193E3187EF95CC783A290D239 /* field_5x52_impl.h in Headers */, + 0EDEC46E0BC997FB64753A1C709A4AE7 /* field_5x52_int128_impl.h in Headers */, + B1B07B21B7667DE9A83B36AC03BE6175 /* field_impl.h in Headers */, + 97AF9F3B17A049614F158AFF9AA5C3FA /* group.h in Headers */, + 5D6A8FBA67FCA90E5B02979DDE6FFF43 /* group_impl.h in Headers */, + 66260581693FDC3DB887738136636C8F /* hash.h in Headers */, + 54B975339087EB52B33FD2013118BD0A /* hash_impl.h in Headers */, + 2A1509546A4F640E1538711DAC7F3FFD /* lax_der_parsing.h in Headers */, + A9B8D34EAFEA874B2B3937B7F53B5D9B /* lax_der_privatekey_parsing.h in Headers */, + 479CE094426E3868726526A833D58F21 /* libsecp256k1-config.h in Headers */, + 031B3FFCD45AD7672462A575142008AF /* main_impl.h in Headers */, + 431FDC470CFD299BE8D98F92F1B01B60 /* main_impl.h in Headers */, + 0800D78442F1F493C69F6F6C51A6A7A4 /* num.h in Headers */, + 3607BA990F6961ED7E0401406A565C07 /* num_gmp.h in Headers */, + C0DD16176212D3F5222CE6886B2A660B /* num_gmp_impl.h in Headers */, + CB57B994F6A2E96E2508F7845D1F97C3 /* num_impl.h in Headers */, + 6AD72DAC1AE026743E0DFDE9E6854763 /* scalar.h in Headers */, + CF67AD864C4CE27EECF87985CF9B287E /* scalar_4x64.h in Headers */, + 68CE1BEB5DEB9671E24DE87773BA920C /* scalar_4x64_impl.h in Headers */, + 5085168C5F297AE562EBC81151EAB02B /* scalar_8x32.h in Headers */, + EB5F9E86F880F7DADBC989EAE79A9162 /* scalar_8x32_impl.h in Headers */, + 320D4C619C3083F47C00012810B2EAC4 /* scalar_impl.h in Headers */, + C1276BB9865BF0BA0D8F4229A5202D3A /* scalar_low.h in Headers */, + 1B9FF780BC13D12AA66605DC702CE662 /* scalar_low_impl.h in Headers */, + 480D4F1A6DBDF15BDEE2611663CB3BED /* scratch.h in Headers */, + AC755B14D97E2077CB8911758996D6CC /* scratch_impl.h in Headers */, + C462144190FE4E9F45F82292FF1A629A /* secp256k1.h in Headers */, + 97D8F4B9B56316BD37A2EBCC5A2B7E51 /* secp256k1_ecdh.h in Headers */, + 318CA76F82F67216CF65AABA4466272E /* secp256k1_recovery.h in Headers */, + 8F1107E28340C0612A6D8340F38A267D /* secp256k1_swift-iOS-umbrella.h in Headers */, + 3B3E08848BF8EBA88438CCF84389B07F /* util.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1792,107 +1910,106 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9607E87258F2BE9B2F545A986B186DCB /* Headers */ = { + 7782F816841C0EB71FD1F1F31BE73647 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 5B412B06CAD963FBFFA763798EEE3AA0 /* basic-config.h in Headers */, - 1D69BB026569911275C713D240084FF2 /* ecdsa.h in Headers */, - 25C0F08157E3C0F2A0E384774F373EE2 /* ecdsa_impl.h in Headers */, - 96126C56ABEF426B0B801431F709443B /* eckey.h in Headers */, - 2175C9F92182A75746B5770B1C01D70C /* eckey_impl.h in Headers */, - 9E16CCBD9A220CE68E8B8BCFC9134C59 /* ecmult.h in Headers */, - D5886DBA5DB05624B7B1DFFD6A99A87D /* ecmult_const.h in Headers */, - 33D8E60E41F6C1C6591FBED80B4A95E4 /* ecmult_const_impl.h in Headers */, - 4500CFBCFC034D43487B312FC5483807 /* ecmult_gen.h in Headers */, - 4F8294D7CD9C06B4BAF8625E87D9D05F /* ecmult_gen_impl.h in Headers */, - 4590A483F08539D557FC4B9123AC3A67 /* ecmult_impl.h in Headers */, - 569DAD122746A7696C6305FDB8B9ADB8 /* field.h in Headers */, - 073B1A00202EE57EB54BE1D3D540C2DF /* field_10x26.h in Headers */, - 78ACD91B0A802FD11D3CB4EC25A78D89 /* field_10x26_impl.h in Headers */, - 4B7495F07A37948723508823C5903A2A /* field_5x52.h in Headers */, - F390BEDEFDEF3DDC2172C32543EDE40B /* field_5x52_asm_impl.h in Headers */, - BB18112CCFC26264B7C0E90AE3432518 /* field_5x52_impl.h in Headers */, - C51722B04CA405219A395C65558614F4 /* field_5x52_int128_impl.h in Headers */, - 51576520F03EFCAB1BA67BEAA79E81B0 /* field_impl.h in Headers */, - 0C97CA12738F0F679E2AA3BD6FD899D3 /* group.h in Headers */, - 497FABADEE00EF124C8DF6366EB5C7A2 /* group_impl.h in Headers */, - FA45DFC8C8AE3AE576A6C13862338138 /* hash.h in Headers */, - B13079439C3B358C138A64E076E53813 /* hash_impl.h in Headers */, - C484B1DBDD48E7821272E79EACF8B2B5 /* lax_der_parsing.h in Headers */, - B6866CBCA4D62537DE060369ACB1B106 /* lax_der_privatekey_parsing.h in Headers */, - CAB0A085900165D03D871E0ECA7CA215 /* libsecp256k1-config.h in Headers */, - B48F3BF9283F0C38B048D3B5E6C7549A /* main_impl.h in Headers */, - D747179D4F9BC0D43E3C479EBA4B07D0 /* main_impl.h in Headers */, - 7BD84093A79722210529995051394BC9 /* num.h in Headers */, - 907425973F15BD66964D73A783E4FD6A /* num_gmp.h in Headers */, - 34FD56F4316A5EEA70A5285A93B5D29E /* num_gmp_impl.h in Headers */, - E592964873DBC39C36DCEDFC2270519A /* num_impl.h in Headers */, - D55038AE9BE8F3B75F916E492CC29A60 /* scalar.h in Headers */, - B77646BAD0129256BF653BDE0C25222B /* scalar_4x64.h in Headers */, - 14DB22276CCD7E7CC84DEAFC67358569 /* scalar_4x64_impl.h in Headers */, - EE9FCCABEB83682D166392D1C12D2BF3 /* scalar_8x32.h in Headers */, - 65736CA32B234972A9DE43C69910B99B /* scalar_8x32_impl.h in Headers */, - D9CA2110C1387E483376CF056337233E /* scalar_impl.h in Headers */, - F226D03CEEB4CA12BF0D0F974840420A /* scalar_low.h in Headers */, - 8D3BA883F8AA3E7565A2AE9D8D533F19 /* scalar_low_impl.h in Headers */, - 5111BFCE88BC6C575354E725D7569A17 /* scratch.h in Headers */, - DE78C90A1789CD75B4B69224EE1C20E1 /* scratch_impl.h in Headers */, - 8BAF1F91DA55BF8A5E86636E90D92F2F /* secp256k1.h in Headers */, - BC1D796F17348CDBE4C46583B92D14C0 /* secp256k1_ecdh.h in Headers */, - BA4F48649886FB0011F6E7F3FBB8C2BB /* secp256k1_recovery.h in Headers */, - CD85BECD50309913F23174338AF0667C /* secp256k1_swift-macOS-umbrella.h in Headers */, - 4BAA131CC4AAC980112DCD779019E1A1 /* util.h in Headers */, + D6B5F7FA348E6697E489142154B85107 /* AnyPromise.h in Headers */, + A59CBD16B65C3C7ACC4C7D8945875F82 /* fwd.h in Headers */, + BBA677442B33921B63BE5CD78F273813 /* NSNotificationCenter+AnyPromise.h in Headers */, + 226FF2D2465A03E4EDF572BE5AF88E19 /* NSTask+AnyPromise.h in Headers */, + 835E647599AD20789B5A10F1E3BEF888 /* NSURLSession+AnyPromise.h in Headers */, + F8DD96EC7610D4FCB6C8045D400E5701 /* PMKFoundation.h in Headers */, + D5C95DA680B56760C10228B520F7499D /* PromiseKit.h in Headers */, + EF2D6E9667E3DC5852A6F092A4BAC763 /* PromiseKit.root-CorePromise-Foundation-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9A5A878586015ED235C4295E5F7F3765 /* Headers */ = { + 96B2181F13A512676DE43FB3511AFDDA /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 8FFB71FAC919894CCAD2B296EA300E5B /* Cimpl.h in Headers */, - DDBF456D98778034F94E7A216E782CBB /* scrypt-iOS-umbrella.h in Headers */, - 89DAA555D3A3650E7AB8AC4853452716 /* scrypt.h in Headers */, + 56996A02B3DC920077AB801E4E8A0A15 /* Pods-web3swift-iOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - A371BC0D140506C3C0BBCD447234E68E /* Headers */ = { + A84BA0453988997BEFD8DEA9765B62E6 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 27FD0E227A0BCFB5C96957DF1D24F65A /* AnyPromise.h in Headers */, - 1E1385AB09686A96B636755A4447933B /* fwd.h in Headers */, - EF7CEA7D43C041C92F385757253FB874 /* NSNotificationCenter+AnyPromise.h in Headers */, - A927C0600827FF278DA9F985A60002E2 /* NSTask+AnyPromise.h in Headers */, - 12DA480A98F43E8D514FD77105246316 /* NSURLSession+AnyPromise.h in Headers */, - 57757EDFE754713488D29934C64FFCFE /* PMKFoundation.h in Headers */, - CCCBD4698FC15086152F56B19ECA7A8D /* PromiseKit.h in Headers */, - 76CE4160292720CFEE6F73DFED4DE333 /* PromiseKit.root-CorePromise-Foundation-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - A84BA0453988997BEFD8DEA9765B62E6 /* Headers */ = { + A8FE7F6CDE2FD821EC0D93ADE70A49E2 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + EC9F551C20254A1AEC7679ED83D28713 /* Cimpl.h in Headers */, + D655D7A0F64343C818BC21A985DA8C5C /* scrypt-iOS-umbrella.h in Headers */, + D4043F69152803AF7B450C9062CFC688 /* scrypt.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - A8DE16093534A6F0A340F319169F6F12 /* Headers */ = { + CB3C81D7E2AD5293B63D12B9684C0961 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 9B20EF7C315B4E343F0B79DE78C9E355 /* Cimpl.h in Headers */, - 7273616B7461B7AEBC1EECEB88851187 /* scrypt-macOS-umbrella.h in Headers */, - C19EF72107053AFDFBC57E47EB8050C9 /* scrypt.h in Headers */, + D4F42FD2DC81233AD6F6C96B6D8C8D38 /* basic-config.h in Headers */, + 52D04CA795889A574DE97357217965BE /* ecdsa.h in Headers */, + B495BF9BD41F0DA630E6BCEF9E48D707 /* ecdsa_impl.h in Headers */, + ECA8F009F06F08BDB92C351F47995210 /* eckey.h in Headers */, + FB9507F4BB8DEF640A6E3C3BE2A4E619 /* eckey_impl.h in Headers */, + AB80E1E9C65B4EA954F01811007ADE6D /* ecmult.h in Headers */, + D79B4B114921134D9311CA5A71062C10 /* ecmult_const.h in Headers */, + 0B442DCD3296A492C9C58C8AE14BA0A8 /* ecmult_const_impl.h in Headers */, + DB8210FAA307129469E336205657F092 /* ecmult_gen.h in Headers */, + 5C07AF157556B42E17E1E32A4AEB573B /* ecmult_gen_impl.h in Headers */, + 79571D2CAB88DA790160FD0CDD3AEFF9 /* ecmult_impl.h in Headers */, + A9F50ED8E406BC5AB5C9E327233D70A5 /* field.h in Headers */, + C880E86722BF8C8B420186E5FCAA564D /* field_10x26.h in Headers */, + F7A2DF1C44544C5300298F18DF2CB870 /* field_10x26_impl.h in Headers */, + 91D6972A579E54069CA6674EF1AFDD62 /* field_5x52.h in Headers */, + 5638014E129B104ED47134518667CC68 /* field_5x52_asm_impl.h in Headers */, + 8756026DE126ACD98A35A20C2F344F1D /* field_5x52_impl.h in Headers */, + BF65BC24F142604C88A03D61E2C91A0D /* field_5x52_int128_impl.h in Headers */, + 324A108EF1509B26512277B3C3BE7D2D /* field_impl.h in Headers */, + 31A75721375ECAB73790FEB75766D87A /* group.h in Headers */, + 0C8C916943E653184B644A98632DDC47 /* group_impl.h in Headers */, + 127EFEFCE576E0CDD1DF3708F20C10BC /* hash.h in Headers */, + 17B2699526C79E4F6A7F890EF0C62A1D /* hash_impl.h in Headers */, + C6C9C202FFBD58F21443C1F5CEDFB291 /* lax_der_parsing.h in Headers */, + 251FC364DD9D317AB3F31F99BA809724 /* lax_der_privatekey_parsing.h in Headers */, + 5A7A8C39583FF9303788AA4DAFD6FB1F /* libsecp256k1-config.h in Headers */, + 8CF0A92E555F6A19FD269B16235D3128 /* main_impl.h in Headers */, + 8283888B261F0702178960767D664712 /* main_impl.h in Headers */, + 618CFC75E3108B18C4DD15C12EC58626 /* num.h in Headers */, + B0EFDD2E40787B3A3359CF16DF3815C3 /* num_gmp.h in Headers */, + 9307E26E1B1DD066C1B71C66EF7B5B99 /* num_gmp_impl.h in Headers */, + 75F745A947766D56938C0215E2A54C9E /* num_impl.h in Headers */, + D44A10DC0AFCD862345B9A0F97E95ED2 /* scalar.h in Headers */, + 9426948AD7CCB3A21DB5169851D17835 /* scalar_4x64.h in Headers */, + 62A5DF1DFBEC0FD06FC3C895F4447790 /* scalar_4x64_impl.h in Headers */, + A1ABA5F58D2757A7C96844AE893C12D1 /* scalar_8x32.h in Headers */, + C56FB1B1104E7EEA26631D9EA9A9D9DD /* scalar_8x32_impl.h in Headers */, + 8FA68F40AE3928B497DDA7C8B828FE74 /* scalar_impl.h in Headers */, + 209C8981858102B13060DA6A94BE0170 /* scalar_low.h in Headers */, + E254CF34D5F821DC8EAA61755F39ECF3 /* scalar_low_impl.h in Headers */, + 3D71156680EC3D94A6E1441546C57E6B /* scratch.h in Headers */, + 3AA32C95FECA68AA3FF571E0F0AF83BC /* scratch_impl.h in Headers */, + E1B91043188FBFD92BA078E1EF2912E0 /* secp256k1.h in Headers */, + 2B3F7B28D29AE55CF915EC13A381D462 /* secp256k1_ecdh.h in Headers */, + B6E2A49CAA2332035A4163610834553C /* secp256k1_recovery.h in Headers */, + 8DCC706DCFDBCC907AAB009F5C505F8F /* secp256k1_swift-macOS-umbrella.h in Headers */, + DE31538BAB4D0DB5B8063517B853894F /* util.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - BF5321B397A280212410C83B84C136C1 /* Headers */ = { + CC4236511CD7C868D12303BE91525247 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 31BFC50C75020E436DDA0F9AFA73D067 /* Result-macOS-umbrella.h in Headers */, + DD7964B2315BCC4C1FEF9A2300164025 /* SwiftRLP-macOS-umbrella.h in Headers */, + FFA521581788213B12468D8AA8D2ADBB /* SwiftRLP.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1904,12 +2021,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - D88DB71CC260DB80493F932D9E58CA54 /* Headers */ = { + D91516EF5FCA28AFEFF8D262E5ECD885 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C0819490E2F049CC22EF3585F49C3F3A /* SwiftRLP-macOS-umbrella.h in Headers */, - FED5D5AE6604A69C4648F5EF206C250B /* SwiftRLP.h in Headers */, + B39F6A07D19D7B5044E37E98E6C28320 /* Cimpl.h in Headers */, + 0AB147133F796C59B1000495EDE8F694 /* scrypt-macOS-umbrella.h in Headers */, + 9850A4E789CCD838DE17E0E7A5DCCCCD /* scrypt.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1921,102 +2039,96 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - E29620DE5F5BC9B27E091EDD7CFCF1DD /* Headers */ = { + DEE5DA4E58FF6A20FDACF29BD5C03C3C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - D64DA518A10935882F67A35F4EC1E0BD /* SwiftRLP-iOS-umbrella.h in Headers */, - BC710D04EBD70B49A46F4B862BAAB0FF /* SwiftRLP.h in Headers */, + 1158B8A68E881A4243A310CB039AA866 /* Result-iOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - E890CFA1980C43A46D50F4542FAAE7BC /* Headers */ = { + EC1E56131ACB90EB216C276F366EFECD /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A906E0A776F4CC1306835A29F687E072 /* Pods-web3swift-macOS-umbrella.h in Headers */, + BA33E96D5FF50CFFA5727208AC91DF2B /* SipHash-macOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - EC1E56131ACB90EB216C276F366EFECD /* Headers */ = { + EF326D981A695869EEB5F69BCE9A78B8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - BA33E96D5FF50CFFA5727208AC91DF2B /* SipHash-macOS-umbrella.h in Headers */, + F16E441BDD1CCA79E64DCDA49CA4CC50 /* Result-macOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - F91FBA45CAE0B90864200888F8084516 /* Headers */ = { + F314FD63C0A0062B8F1A89675ED05324 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 2CADC319FC220364D8D53E197C933DF9 /* Result-iOS-umbrella.h in Headers */, + 4A9382D54AFF6BA0D34C2BE46245192E /* SwiftRLP-iOS-umbrella.h in Headers */, + C8C18B3FE4D4FD1B2D0467F31FA6D113 /* SwiftRLP.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 0FEA45E4A3FB35CD13AAE2348DB3359E /* scrypt-macOS */ = { + 1168313AEC7524AEDFC1224C6D3C6E44 /* EthereumAddress-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = C6C3FEF3DB3E9F8728E424120C1A0F0D /* Build configuration list for PBXNativeTarget "scrypt-macOS" */; + buildConfigurationList = EFED2FA879D330888BF8C00E65240ADA /* Build configuration list for PBXNativeTarget "EthereumAddress-iOS" */; buildPhases = ( - A8DE16093534A6F0A340F319169F6F12 /* Headers */, - BE8BE6B0DA1BF467D2B6288460FFE2D2 /* Sources */, - 8C5B3C77007E4A6710E826D840A9A9F3 /* Frameworks */, - 77D95416D98B893ED6F91D851144C141 /* Copy generated compatibility header */, + 54DF3F44A9C01544510F7FA211E2D61A /* Headers */, + 4F126988CBC888A0714AF1DA260B78DD /* Sources */, + 03011555EFED1D5408D878A307E7F27B /* Frameworks */, + 18E6AE424D462D0BB6055CFFEA61E572 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - 87F1B30D723909893ED4B83C94656F15 /* PBXTargetDependency */, + 41F78C658B3F9F5219DDE2ECF3E07F6D /* PBXTargetDependency */, ); - name = "scrypt-macOS"; - productName = "scrypt-macOS"; - productReference = 5362887D119F1FF10889E08C0A86AC77 /* libscrypt-macOS.a */; + name = "EthereumAddress-iOS"; + productName = "EthereumAddress-iOS"; + productReference = 97504B2FA23741AEEDD649E58BF39870 /* libEthereumAddress-iOS.a */; productType = "com.apple.product-type.library.static"; }; - 2892912E4AE0D2C848DA80F38A3430EF /* Pods-web3swift-iOS */ = { + 12455571B54E567146873FF705359CFE /* Result-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = A4CBD6E90C567ACBD75570719DB45B51 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS" */; + buildConfigurationList = 284AECDC661FAF7860EC1BEC7692301D /* Build configuration list for PBXNativeTarget "Result-iOS" */; buildPhases = ( - 1981098BE859E5C5C86D4B2DB76FCB79 /* Headers */, - 6B494B14C59C4221F3ED47D69E275808 /* Sources */, - C9A84F4AAB9686DF357AEF1364E35684 /* Frameworks */, + DEE5DA4E58FF6A20FDACF29BD5C03C3C /* Headers */, + 9C8F84D70CD3951B1660E208CB29441B /* Sources */, + 9D409A2942E61980145880BF513A7F7D /* Frameworks */, + AE8C8A4E08BFF14A2F1693B22AA97C5B /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - F7E883C0A0130109CAC9B2F121277455 /* PBXTargetDependency */, - D114C6C7BD73170A69A8A773D9B8C958 /* PBXTargetDependency */, - EEB4F61BD057F839E2C48E58F59F68BA /* PBXTargetDependency */, - 0E9C45A587EE356A1AFB76CFA06A3A1B /* PBXTargetDependency */, - 545A441DCFCEDAFC57A8880D6F3A258B /* PBXTargetDependency */, - FBC886A1348A04B6C34EE2F136A089A8 /* PBXTargetDependency */, - FF861C5299B110723B953D74908F199E /* PBXTargetDependency */, - C5FABAD4CCBCB7C1EF48E4B3573BD61E /* PBXTargetDependency */, ); - name = "Pods-web3swift-iOS"; - productName = "Pods-web3swift-iOS"; - productReference = 47DF102368BCFE57F05C91BED865C127 /* libPods-web3swift-iOS.a */; + name = "Result-iOS"; + productName = "Result-iOS"; + productReference = 666BE65938A502C928B35D6EB5CA9FDA /* libResult-iOS.a */; productType = "com.apple.product-type.library.static"; }; - 321AD436B1B1600006FDA48B769B5215 /* secp256k1_swift-iOS */ = { + 1F803FF778771424C8085D9971D3840F /* SwiftRLP-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 288F5A4EECE69C1DC4494A2655035DA7 /* Build configuration list for PBXNativeTarget "secp256k1_swift-iOS" */; + buildConfigurationList = E4CD22EC0D9A9A7E229C67906906F7A4 /* Build configuration list for PBXNativeTarget "SwiftRLP-iOS" */; buildPhases = ( - 5ECD580778CAAFD4B701E7D6ABE86577 /* Headers */, - AE5C44EE6236028D6CCB51608899A34F /* Sources */, - 4E7DEA46EDFAFBE63B1CD6EAFC6C3635 /* Frameworks */, - FFCF2F5B98A7CDB28B45E293903AF1D7 /* Copy generated compatibility header */, + F314FD63C0A0062B8F1A89675ED05324 /* Headers */, + 7554990BF3A60368D06DE120F92AFA9D /* Sources */, + 3AAC28C160F50900EE61CA27D4E2EF5D /* Frameworks */, + B1CDA63AFDA7BE620B34E4FDC752C9EB /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( + 02BA5612135F3D656000F3174E527D10 /* PBXTargetDependency */, ); - name = "secp256k1_swift-iOS"; - productName = "secp256k1_swift-iOS"; - productReference = A322E379ECBC90322624BA7A69FBBDEE /* libsecp256k1_swift-iOS.a */; + name = "SwiftRLP-iOS"; + productName = "SwiftRLP-iOS"; + productReference = FDADCB9A8CD9274EA3AC09BE3B7E0F66 /* libSwiftRLP-iOS.a */; productType = "com.apple.product-type.library.static"; }; 3B79F6DB09B597AAE9D3EB939DA463D8 /* SipHash-iOS */ = { @@ -2034,17 +2146,17 @@ ); name = "SipHash-iOS"; productName = "SipHash-iOS"; - productReference = 35FC5E1CB1FA613D068CDE5E32242FEA /* libSipHash-iOS.a */; + productReference = F99CCF5FD903883FB3C524CA2FB43E2C /* libSipHash-iOS.a */; productType = "com.apple.product-type.library.static"; }; - 498B5059F6777D5158A7EE62045BD64E /* secp256k1_swift-macOS */ = { + 4C59270F810F2B1FEC2F3D5A77188907 /* secp256k1_swift-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 4DE4E92544E4D3852787DF5ADA292D66 /* Build configuration list for PBXNativeTarget "secp256k1_swift-macOS" */; + buildConfigurationList = 65490D7667F9A157CAE31446FC797991 /* Build configuration list for PBXNativeTarget "secp256k1_swift-macOS" */; buildPhases = ( - 9607E87258F2BE9B2F545A986B186DCB /* Headers */, - 591DC71F3ADDB8E51AB956C1961BB8E9 /* Sources */, - 8953A204F873D6D4AB03311B82CAF3F9 /* Frameworks */, - D763E7BFA00A8B570DD43729C0BD44C3 /* Copy generated compatibility header */, + CB3C81D7E2AD5293B63D12B9684C0961 /* Headers */, + F4783445DE7F29598185898BF1D1FA23 /* Sources */, + 05577BA791C80220E64423A3DA803314 /* Frameworks */, + 5EA346A1CAF71500DC1ACEDD14097686 /* Copy generated compatibility header */, ); buildRules = ( ); @@ -2052,7 +2164,7 @@ ); name = "secp256k1_swift-macOS"; productName = "secp256k1_swift-macOS"; - productReference = 61F9B5A069C5D02E065D4AB81C26942D /* libsecp256k1_swift-macOS.a */; + productReference = 4C332617281C7BEB03040C92EF610543 /* libsecp256k1_swift-macOS.a */; productType = "com.apple.product-type.library.static"; }; 4FCBE56BC5E931FDC43C642250037C1F /* SipHash-macOS */ = { @@ -2070,43 +2182,62 @@ ); name = "SipHash-macOS"; productName = "SipHash-macOS"; - productReference = 599066091D94A49D4FE779679AFD88E2 /* libSipHash-macOS.a */; + productReference = 58D4D38A480BA09A08C8523AF72783C5 /* libSipHash-macOS.a */; productType = "com.apple.product-type.library.static"; }; - 566C98B9528CB1527582959B19D87238 /* Pods-web3swift-iOS_Tests */ = { + 558049EB555978BC8947ECF2498E78D9 /* PromiseKit.root-CorePromise-Foundation */ = { isa = PBXNativeTarget; - buildConfigurationList = 62550B15363844675EDB2F185CB619A8 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS_Tests" */; + buildConfigurationList = 9CB97BD184404FE5F62F017C3CF306D5 /* Build configuration list for PBXNativeTarget "PromiseKit.root-CorePromise-Foundation" */; buildPhases = ( - A84BA0453988997BEFD8DEA9765B62E6 /* Headers */, - A27CC87411918F0608EA9F4339733D80 /* Sources */, - 9FA0F642AE177D3FA07814A41F264B1A /* Frameworks */, + 7782F816841C0EB71FD1F1F31BE73647 /* Headers */, + 5EF30E27818FB63FE5D68283E679752C /* Sources */, + 3AE77EFED90447A6B1DAC12064BA51E9 /* Frameworks */, + 4F32BCC17F8E7CDDD337CE7D1F53727A /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - F3DDE7BB170DA1519FDDE4BA03AB73FA /* PBXTargetDependency */, ); - name = "Pods-web3swift-iOS_Tests"; + name = "PromiseKit.root-CorePromise-Foundation"; + productName = "PromiseKit.root-CorePromise-Foundation"; + productReference = A09088A41F90C0893A27DEF1C26D11AB /* libPromiseKit.root-CorePromise-Foundation.a */; + productType = "com.apple.product-type.library.static"; + }; + 566C98B9528CB1527582959B19D87238 /* Pods-web3swift-iOS_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 62550B15363844675EDB2F185CB619A8 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS_Tests" */; + buildPhases = ( + A84BA0453988997BEFD8DEA9765B62E6 /* Headers */, + A27CC87411918F0608EA9F4339733D80 /* Sources */, + 9FA0F642AE177D3FA07814A41F264B1A /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + F3DDE7BB170DA1519FDDE4BA03AB73FA /* PBXTargetDependency */, + ); + name = "Pods-web3swift-iOS_Tests"; productName = "Pods-web3swift-iOS_Tests"; - productReference = BAD613601EE703E9FF05CEC481713273 /* libPods-web3swift-iOS_Tests.a */; + productReference = FF66C3EFCA475A91734C76A5D546BE1A /* libPods-web3swift-iOS_Tests.a */; productType = "com.apple.product-type.library.static"; }; - 630AEE08CD31743EE32F246198F2C879 /* PromiseKit */ = { + 73527F6F8B0A792EA5FD7085DADC6B93 /* SwiftRLP-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 8F03B9047707EFF3F60AA966A45C8A4D /* Build configuration list for PBXNativeTarget "PromiseKit" */; + buildConfigurationList = D2A09E63159C968138E6CBA9147D559A /* Build configuration list for PBXNativeTarget "SwiftRLP-macOS" */; buildPhases = ( - 6AC43EC948A0FAC9BE645CA2CD5DEC98 /* Headers */, - 069A396A87E9DFA61B3D746948C21D80 /* Sources */, - 061F0F73B4A7C0BAB618CCF28AB43EED /* Frameworks */, - A606E4482D3A10C9199F501DE300C580 /* Copy generated compatibility header */, + CC4236511CD7C868D12303BE91525247 /* Headers */, + AC55CD23CEB47B0B14D8B2BE25385074 /* Sources */, + 2E1C020D358710A3E399DC2793603432 /* Frameworks */, + DCFDAE6889A2F2AA8B57D01D168586DA /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( + CD84CCD9860362B77E623B72E64A8990 /* PBXTargetDependency */, ); - name = PromiseKit; - productName = PromiseKit; - productReference = 755201B560E952C6A5333642B028695A /* libPromiseKit.a */; + name = "SwiftRLP-macOS"; + productName = "SwiftRLP-macOS"; + productReference = 6A0F097AEAD44F8F983B8D4F884FDE42 /* libSwiftRLP-macOS.a */; productType = "com.apple.product-type.library.static"; }; 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */ = { @@ -2124,7 +2255,26 @@ ); name = "CryptoSwift-macOS"; productName = "CryptoSwift-macOS"; - productReference = E931DAD7852F3C297E4BB3A0A4928BCB /* libCryptoSwift-macOS.a */; + productReference = 4D5B77EB47B2435BCBF83C39D0D576F5 /* libCryptoSwift-macOS.a */; + productType = "com.apple.product-type.library.static"; + }; + 7BF3C926294C92422AFB78600D576975 /* scrypt-macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = EC990DC713F41C8185113CC18FD8B395 /* Build configuration list for PBXNativeTarget "scrypt-macOS" */; + buildPhases = ( + D91516EF5FCA28AFEFF8D262E5ECD885 /* Headers */, + F26428FB9A70DF978834F0A0F8B50B0F /* Sources */, + D45B18240A0BA70F5BD174A232F95C45 /* Frameworks */, + A419CDD858739CE2F6F3DD9DA2F2853A /* Copy generated compatibility header */, + ); + buildRules = ( + ); + dependencies = ( + D25FD61F0F8712699C186B8B64A1A47B /* PBXTargetDependency */, + ); + name = "scrypt-macOS"; + productName = "scrypt-macOS"; + productReference = F4F0BCD366AE2D51D6C35C2192996DBD /* libscrypt-macOS.a */; productType = "com.apple.product-type.library.static"; }; 7ED7E08B2BE4D50AC5F7E73B32DD2203 /* Pods-web3swift-macOS_Tests */ = { @@ -2142,7 +2292,69 @@ ); name = "Pods-web3swift-macOS_Tests"; productName = "Pods-web3swift-macOS_Tests"; - productReference = 27042DAC0089FE05944B8718DE760F71 /* libPods-web3swift-macOS_Tests.a */; + productReference = 7573EC5C506627456A38A22DC6C134BA /* libPods-web3swift-macOS_Tests.a */; + productType = "com.apple.product-type.library.static"; + }; + 82C35D316B5E8115E43ACCFE4E50137C /* Pods-web3swift-macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0039F2F377814CD2485BC36E354F85D8 /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS" */; + buildPhases = ( + 1D082DF5FB317A292B865320EA4330E8 /* Headers */, + 74A501CE727E95B4C6687723037D9862 /* Sources */, + 6EC658BB78F973B687A770E4EC1E8853 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 9E296E6501EBD5FDE5817558B2BF7E2A /* PBXTargetDependency */, + DCCED206D4BBB569EEFCBD6A2C1BAC88 /* PBXTargetDependency */, + 2055448327DB15BA03467F050E753FB0 /* PBXTargetDependency */, + 9F20C8D399DE8D34DCEEE1FDF42CFCAA /* PBXTargetDependency */, + 985A809AF607C0CA13161FCFE50F4C36 /* PBXTargetDependency */, + 82AAC9DD7930B8C6339DED045709C87D /* PBXTargetDependency */, + FE4F7F2A1F792D695B3070E073F67F11 /* PBXTargetDependency */, + C6510E8CFAB977BE7B6241436DAC4841 /* PBXTargetDependency */, + 1E5CC3B070AA071ADEB9D014A865CC6C /* PBXTargetDependency */, + ); + name = "Pods-web3swift-macOS"; + productName = "Pods-web3swift-macOS"; + productReference = 1DF1726C7221A0B7805EF3E180CE8007 /* libPods-web3swift-macOS.a */; + productType = "com.apple.product-type.library.static"; + }; + 94906F0C68B58FB4B40554812C3BBFD8 /* PromiseKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 303C8E6272AD70A3BDE63EE51C697D17 /* Build configuration list for PBXNativeTarget "PromiseKit" */; + buildPhases = ( + 263A6BE4E6989F362AA0E5FEC75D6EB8 /* Headers */, + D0BD425EF1B48E5B0B78F0ED11C0ECB2 /* Sources */, + 2714EC0418F441D39321DBFD3CFC5BF3 /* Frameworks */, + 129DD7E5FF17BAF38DCB561CC264C271 /* Copy generated compatibility header */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PromiseKit; + productName = PromiseKit; + productReference = 10E2FD109C104BBFF96C8BEAE5D93A6E /* libPromiseKit.a */; + productType = "com.apple.product-type.library.static"; + }; + 96225BBE1203595F4D0672A487BB9861 /* secp256k1_swift-iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09CA449448E7309DBC21A6BD3E319838 /* Build configuration list for PBXNativeTarget "secp256k1_swift-iOS" */; + buildPhases = ( + 7473267694EB25007FA3A05AD22C3D27 /* Headers */, + BBEEDB9A5DAE6E4AB8C4F6B6B2EF4BB2 /* Sources */, + FC3AA5C1EA87DD47338B9100FB46F5DD /* Frameworks */, + 0FC126F948C80B2A20574CD7FEE827AC /* Copy generated compatibility header */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "secp256k1_swift-iOS"; + productName = "secp256k1_swift-iOS"; + productReference = 20D278014F2D90DDD7C703E49B6727B7 /* libsecp256k1_swift-iOS.a */; productType = "com.apple.product-type.library.static"; }; 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */ = { @@ -2161,7 +2373,7 @@ ); name = "BigInt-macOS"; productName = "BigInt-macOS"; - productReference = D40BD5126F631E22619456FA8B7796CD /* libBigInt-macOS.a */; + productReference = EF13999388904A7883CEA9B745018AAF /* libBigInt-macOS.a */; productType = "com.apple.product-type.library.static"; }; AF9F48E6961507C0E2FD7A3CDBC652DA /* BigInt-iOS */ = { @@ -2180,63 +2392,70 @@ ); name = "BigInt-iOS"; productName = "BigInt-iOS"; - productReference = A3BCB7E3971A174E47D70212430A170B /* libBigInt-iOS.a */; + productReference = AC8ED311289866CD8ED870EF0C3C5CF3 /* libBigInt-iOS.a */; productType = "com.apple.product-type.library.static"; }; - B15A271BA5831BBA626B2A8FEE864C9E /* Result-iOS */ = { + BAA7945626BCC2CCA0CD2C7A0AC13E79 /* Pods-web3swift-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 9F771DCE26E84668F2CA6B9E87224F88 /* Build configuration list for PBXNativeTarget "Result-iOS" */; + buildConfigurationList = 3EF9AD5BB38D4B8D81F2E10D31B8FC16 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS" */; buildPhases = ( - F91FBA45CAE0B90864200888F8084516 /* Headers */, - 97393369835E668457D42683CB3D37E8 /* Sources */, - 70C1112079F88597259241434EA48AF3 /* Frameworks */, - CF48FB28322C0B97DB10FA906EF46EEB /* Copy generated compatibility header */, + 96B2181F13A512676DE43FB3511AFDDA /* Headers */, + A2ACE7E19845A64A7A861D0789B5556A /* Sources */, + 5266E30913229719A172673D2CC2CC9B /* Frameworks */, ); buildRules = ( ); dependencies = ( + 38A31696BE8B09855448DB541DAF6CAF /* PBXTargetDependency */, + 2269634CF395C023BD0DE456EDC0E905 /* PBXTargetDependency */, + 695E61EC945DAB26310EFF15776F8416 /* PBXTargetDependency */, + FCBCE9AAE7712F633822A4305BA498B6 /* PBXTargetDependency */, + 755A1B5E06A6BE022C3FC0DD1BEEE56D /* PBXTargetDependency */, + 2C8BE55B42F306995084EBB384828202 /* PBXTargetDependency */, + 3608CB885D6B6B4B853ECBAC44A93F46 /* PBXTargetDependency */, + 4DC8DD86030434C6B1D0B5A99DEFAD48 /* PBXTargetDependency */, + 6380C782AA285DFB888C8E8249285814 /* PBXTargetDependency */, ); - name = "Result-iOS"; - productName = "Result-iOS"; - productReference = 5A6CB64CE9F57BAAAAF807DF850E2C0A /* libResult-iOS.a */; + name = "Pods-web3swift-iOS"; + productName = "Pods-web3swift-iOS"; + productReference = D275AC61F658F73CFA8823434BCA3406 /* libPods-web3swift-iOS.a */; productType = "com.apple.product-type.library.static"; }; - B6DAA867681209B8BCC71EE70D0654A0 /* scrypt-iOS */ = { + BB37143ACC20FC450C45EFD6C5660906 /* scrypt-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 7605C90CA002CA15242C3D87F18484A2 /* Build configuration list for PBXNativeTarget "scrypt-iOS" */; + buildConfigurationList = D9AC1A700A507419692FC870E90C8799 /* Build configuration list for PBXNativeTarget "scrypt-iOS" */; buildPhases = ( - 9A5A878586015ED235C4295E5F7F3765 /* Headers */, - 625DCE12F33E67472BE981CF2C3D8D59 /* Sources */, - 6254566B8B2CAF2B5CD7A1BC7EFE00D8 /* Frameworks */, - D2A9FA1CF30E66466D424F322696A570 /* Copy generated compatibility header */, + A8FE7F6CDE2FD821EC0D93ADE70A49E2 /* Headers */, + ADC13DDD5F0DDA1F9E13741ADBA5EB90 /* Sources */, + F8DE994896B53C78B2E78A42E3193FFC /* Frameworks */, + 8ACF3921958AA4E38424E2A472946D83 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - DEDAE6E0420F0B6226E38A36E27FCA91 /* PBXTargetDependency */, + 419DB448EDECEAD154DB39A4EFDB540A /* PBXTargetDependency */, ); name = "scrypt-iOS"; productName = "scrypt-iOS"; - productReference = A14282AE6AF7AD75A532A9639BE44B88 /* libscrypt-iOS.a */; + productReference = 17F353B4B162974207D9F48A62765D99 /* libscrypt-iOS.a */; productType = "com.apple.product-type.library.static"; }; - DA0577AD76B443C71930FAC764E972C5 /* SwiftRLP-iOS */ = { + C87C2E6C438181FF7B92161BFC2DFBEB /* Result-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 6C6D2DEE61A644A6598FBEDB9971FD63 /* Build configuration list for PBXNativeTarget "SwiftRLP-iOS" */; + buildConfigurationList = 8B657CEEE4B76901522B282FFC7FE8DA /* Build configuration list for PBXNativeTarget "Result-macOS" */; buildPhases = ( - E29620DE5F5BC9B27E091EDD7CFCF1DD /* Headers */, - BDE8FF8430801826F2311E4A726D6AA2 /* Sources */, - 677BBE6ACD652CB4EE4E00DD6589A287 /* Frameworks */, - E16B0ADF0D4859AC7B9E5B25D1D99737 /* Copy generated compatibility header */, + EF326D981A695869EEB5F69BCE9A78B8 /* Headers */, + 1C3EF99237B7E5AF16765F5F4EBE5BE1 /* Sources */, + B244EFB510B7723225BAE6675E63CE10 /* Frameworks */, + 1C1219009207B65EA3F5EDD5F43FEA59 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - E79CE6FB4D42E5E11A7F83044F9DDE2A /* PBXTargetDependency */, ); - name = "SwiftRLP-iOS"; - productName = "SwiftRLP-iOS"; - productReference = EAE702C1BF30A6CA8F718732EC9270FF /* libSwiftRLP-iOS.a */; + name = "Result-macOS"; + productName = "Result-macOS"; + productReference = 75DE42DDF2D327BA352CD0F8C0DA4B0F /* libResult-macOS.a */; productType = "com.apple.product-type.library.static"; }; E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */ = { @@ -2254,87 +2473,26 @@ ); name = "CryptoSwift-iOS"; productName = "CryptoSwift-iOS"; - productReference = 686E32EABE020693AEB9B0CBB68DC7AD /* libCryptoSwift-iOS.a */; - productType = "com.apple.product-type.library.static"; - }; - F2C23507954E7580FFDC3A161C6AB0E4 /* Result-macOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = C6A6186E7DE2AF444E2D9AE0184A0479 /* Build configuration list for PBXNativeTarget "Result-macOS" */; - buildPhases = ( - BF5321B397A280212410C83B84C136C1 /* Headers */, - 3FF5076712D3DA34C798CD9D101B4F40 /* Sources */, - EAF36CFF054C71E816A6740B45DABA2D /* Frameworks */, - 6C5742B45D7CF2819D971BBDF4E63642 /* Copy generated compatibility header */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Result-macOS"; - productName = "Result-macOS"; - productReference = 6F662C5CB3F9F55D1B8343627F3108A8 /* libResult-macOS.a */; - productType = "com.apple.product-type.library.static"; - }; - F4EB0AFAA3A292F355BF33F9614E125E /* PromiseKit.root-CorePromise-Foundation */ = { - isa = PBXNativeTarget; - buildConfigurationList = B3BABA326F05564F9B29C631D85A02A9 /* Build configuration list for PBXNativeTarget "PromiseKit.root-CorePromise-Foundation" */; - buildPhases = ( - A371BC0D140506C3C0BBCD447234E68E /* Headers */, - 6636BC235F98E7D2EBDF592BD5B5FFBE /* Sources */, - D8EAD2ED245F44C0D223758BC854E517 /* Frameworks */, - 3273D99866B079DA9C80FD4FC0CC368F /* Copy generated compatibility header */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "PromiseKit.root-CorePromise-Foundation"; - productName = "PromiseKit.root-CorePromise-Foundation"; - productReference = DB805D8CD6E362AD3B2474D5C6D7EA6E /* libPromiseKit.root-CorePromise-Foundation.a */; + productReference = A8865640371B98CE908E1A9A63C4B984 /* libCryptoSwift-iOS.a */; productType = "com.apple.product-type.library.static"; }; - F884BDAA9A34F06758B9377C5C3DE88F /* Pods-web3swift-macOS */ = { + F5120265F2BDEB78BE6300C2AF965614 /* EthereumAddress-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 7AF19CA86BE1CDF981AE337B179CC0BF /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS" */; + buildConfigurationList = 88E198CDBBB0CAA2D5B912F48E5A8119 /* Build configuration list for PBXNativeTarget "EthereumAddress-macOS" */; buildPhases = ( - E890CFA1980C43A46D50F4542FAAE7BC /* Headers */, - C4A012A57A14E671D4C1D570BDB15BA0 /* Sources */, - 05A70FBCB8915FD658E02DE77827E7FA /* Frameworks */, + 0A517913ECA631FD90F898E1AC9F73FA /* Headers */, + 5C6F1730FAE5A8F910B63E28BED3C00B /* Sources */, + CDD5EEE59EED703D7D057105BF3320CA /* Frameworks */, + 64018E648C861544061787069E1652CF /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - B70AFA61252EF7C185E0A83F61E40089 /* PBXTargetDependency */, - 5D5FB078761B0BDFAFD58A94FA1E2357 /* PBXTargetDependency */, - F9D4CA180533C7D2D10B0309068C01EB /* PBXTargetDependency */, - 809C4E986CB3B9FC9CB2BC9B6C1EB391 /* PBXTargetDependency */, - DF6D85572A877D19DAFFC67DF1D180D9 /* PBXTargetDependency */, - 61A0C7C5A71562D5B7E98B968E20DA69 /* PBXTargetDependency */, - 9D7AAC3DD6D3C5FF1FA407E4509B529D /* PBXTargetDependency */, - B9E11C250C8CF155875A0B2FB480E6BA /* PBXTargetDependency */, + A22F26BA9F6F020F5AA933DCCC6209D2 /* PBXTargetDependency */, ); - name = "Pods-web3swift-macOS"; - productName = "Pods-web3swift-macOS"; - productReference = 6190C35184D36B3997B74374A1DEB870 /* libPods-web3swift-macOS.a */; - productType = "com.apple.product-type.library.static"; - }; - FE616C0F8645852E1A582197DFC35CD4 /* SwiftRLP-macOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2D5D9861222B1B7C6B2D720C3CE966C3 /* Build configuration list for PBXNativeTarget "SwiftRLP-macOS" */; - buildPhases = ( - D88DB71CC260DB80493F932D9E58CA54 /* Headers */, - F8DF2C603FEBDA8D9954844AE56388A4 /* Sources */, - 5673E920CAB46CF5F49271F4E543C37A /* Frameworks */, - E2304C105AC85C1CACA27F85C07B7F16 /* Copy generated compatibility header */, - ); - buildRules = ( - ); - dependencies = ( - AE1F2CE326361908A43EB02F0B9812CB /* PBXTargetDependency */, - ); - name = "SwiftRLP-macOS"; - productName = "SwiftRLP-macOS"; - productReference = 547AA2E9890A83EE986E0FE6B230D1E8 /* libSwiftRLP-macOS.a */; + name = "EthereumAddress-macOS"; + productName = "EthereumAddress-macOS"; + productReference = 53C768170DFB632A3ADBD2A703116B8E /* libEthereumAddress-macOS.a */; productType = "com.apple.product-type.library.static"; }; /* End PBXNativeTarget section */ @@ -2354,7 +2512,7 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 083C1381B3CFEF7D89B7A4A992CA51B1 /* Products */; + productRefGroup = BC988C585F01918CDC758DA84387BAF3 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( @@ -2362,22 +2520,24 @@ 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */, E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */, 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */, - 2892912E4AE0D2C848DA80F38A3430EF /* Pods-web3swift-iOS */, + 1168313AEC7524AEDFC1224C6D3C6E44 /* EthereumAddress-iOS */, + F5120265F2BDEB78BE6300C2AF965614 /* EthereumAddress-macOS */, + BAA7945626BCC2CCA0CD2C7A0AC13E79 /* Pods-web3swift-iOS */, 566C98B9528CB1527582959B19D87238 /* Pods-web3swift-iOS_Tests */, - F884BDAA9A34F06758B9377C5C3DE88F /* Pods-web3swift-macOS */, + 82C35D316B5E8115E43ACCFE4E50137C /* Pods-web3swift-macOS */, 7ED7E08B2BE4D50AC5F7E73B32DD2203 /* Pods-web3swift-macOS_Tests */, - 630AEE08CD31743EE32F246198F2C879 /* PromiseKit */, - F4EB0AFAA3A292F355BF33F9614E125E /* PromiseKit.root-CorePromise-Foundation */, - B15A271BA5831BBA626B2A8FEE864C9E /* Result-iOS */, - F2C23507954E7580FFDC3A161C6AB0E4 /* Result-macOS */, - B6DAA867681209B8BCC71EE70D0654A0 /* scrypt-iOS */, - 0FEA45E4A3FB35CD13AAE2348DB3359E /* scrypt-macOS */, - 321AD436B1B1600006FDA48B769B5215 /* secp256k1_swift-iOS */, - 498B5059F6777D5158A7EE62045BD64E /* secp256k1_swift-macOS */, + 94906F0C68B58FB4B40554812C3BBFD8 /* PromiseKit */, + 558049EB555978BC8947ECF2498E78D9 /* PromiseKit.root-CorePromise-Foundation */, + 12455571B54E567146873FF705359CFE /* Result-iOS */, + C87C2E6C438181FF7B92161BFC2DFBEB /* Result-macOS */, + BB37143ACC20FC450C45EFD6C5660906 /* scrypt-iOS */, + 7BF3C926294C92422AFB78600D576975 /* scrypt-macOS */, + 96225BBE1203595F4D0672A487BB9861 /* secp256k1_swift-iOS */, + 4C59270F810F2B1FEC2F3D5A77188907 /* secp256k1_swift-macOS */, 3B79F6DB09B597AAE9D3EB939DA463D8 /* SipHash-iOS */, 4FCBE56BC5E931FDC43C642250037C1F /* SipHash-macOS */, - DA0577AD76B443C71930FAC764E972C5 /* SwiftRLP-iOS */, - FE616C0F8645852E1A582197DFC35CD4 /* SwiftRLP-macOS */, + 1F803FF778771424C8085D9971D3840F /* SwiftRLP-iOS */, + 73527F6F8B0A792EA5FD7085DADC6B93 /* SwiftRLP-macOS */, ); }; /* End PBXProject section */ @@ -2408,7 +2568,7 @@ shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 1B2679AE7A95EBF0FDDB427B7725D76B /* Copy generated compatibility header */ = { + 0FC126F948C80B2A20574CD7FEE827AC /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2417,23 +2577,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS.modulemap", - "${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/SipHash-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/secp256k1_swift-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 1F7D245DDE5F17177A665A72104C9D4D /* Copy generated compatibility header */ = { + 129DD7E5FF17BAF38DCB561CC264C271 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2442,23 +2602,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.modulemap", + "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/CryptoSwift-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/PromiseKit-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 3273D99866B079DA9C80FD4FC0CC368F /* Copy generated compatibility header */ = { + 18E6AE424D462D0BB6055CFFEA61E572 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2467,23 +2627,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap", - "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h", + "${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/PromiseKit.root-CorePromise-Foundation-umbrella.h", + "${BUILT_PRODUCTS_DIR}/EthereumAddress-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 48CAA26C5BA7CC4886CFBB5FF41C3C8C /* Copy generated compatibility header */ = { + 1B2679AE7A95EBF0FDDB427B7725D76B /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2492,23 +2652,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS.modulemap", + "${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/BigInt-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/SipHash-macOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 6C5742B45D7CF2819D971BBDF4E63642 /* Copy generated compatibility header */ = { + 1C1219009207B65EA3F5EDD5F43FEA59 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2533,7 +2693,7 @@ shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 755BFC4B404D1BFF99616B0008872FF1 /* Copy generated compatibility header */ = { + 1F7D245DDE5F17177A665A72104C9D4D /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2542,23 +2702,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/BigInt/BigInt-macOS.modulemap", - "${PODS_ROOT}/Headers/Public/BigInt/BigInt-macOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/BigInt-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/CryptoSwift-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 77D95416D98B893ED6F91D851144C141 /* Copy generated compatibility header */ = { + 48CAA26C5BA7CC4886CFBB5FF41C3C8C /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2567,23 +2727,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/scrypt/scrypt-macOS.modulemap", - "${PODS_ROOT}/Headers/Public/scrypt/scrypt-macOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/scrypt-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/BigInt-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - A606E4482D3A10C9199F501DE300C580 /* Copy generated compatibility header */ = { + 4F32BCC17F8E7CDDD337CE7D1F53727A /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2592,23 +2752,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.modulemap", - "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit-umbrella.h", + "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap", + "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/PromiseKit-umbrella.h", + "${BUILT_PRODUCTS_DIR}/PromiseKit.root-CorePromise-Foundation-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - CF48FB28322C0B97DB10FA906EF46EEB /* Copy generated compatibility header */ = { + 5EA346A1CAF71500DC1ACEDD14097686 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2617,23 +2777,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/Result/Result-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/Result/Result-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap", + "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/Result-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/secp256k1_swift-macOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - D2A9FA1CF30E66466D424F322696A570 /* Copy generated compatibility header */ = { + 64018E648C861544061787069E1652CF /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2642,23 +2802,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap", + "${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/scrypt-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/EthereumAddress-macOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - D763E7BFA00A8B570DD43729C0BD44C3 /* Copy generated compatibility header */ = { + 755BFC4B404D1BFF99616B0008872FF1 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2667,23 +2827,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap", - "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/BigInt/BigInt-macOS.modulemap", + "${PODS_ROOT}/Headers/Public/BigInt/BigInt-macOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/secp256k1_swift-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/BigInt-macOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - E16B0ADF0D4859AC7B9E5B25D1D99737 /* Copy generated compatibility header */ = { + 8ACF3921958AA4E38424E2A472946D83 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2692,23 +2852,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/SwiftRLP-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/scrypt-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - E2304C105AC85C1CACA27F85C07B7F16 /* Copy generated compatibility header */ = { + A419CDD858739CE2F6F3DD9DA2F2853A /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2717,23 +2877,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap", - "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/scrypt/scrypt-macOS.modulemap", + "${PODS_ROOT}/Headers/Public/scrypt/scrypt-macOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/SwiftRLP-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/scrypt-macOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - EDC821DB128FBEFA92BC6BC351D2709A /* Copy generated compatibility header */ = { + AE8C8A4E08BFF14A2F1693B22AA97C5B /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2742,23 +2902,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/SipHash/SipHash-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/SipHash/SipHash-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/Result/Result-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/Result/Result-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/SipHash-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/Result-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - FFCF2F5B98A7CDB28B45E293903AF1D7 /* Copy generated compatibility header */ = { + B1CDA63AFDA7BE620B34E4FDC752C9EB /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2767,79 +2927,86 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/secp256k1_swift-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/SwiftRLP-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 069A396A87E9DFA61B3D746948C21D80 /* Sources */ = { - isa = PBXSourcesBuildPhase; + DCFDAE6889A2F2AA8B57D01D168586DA /* Copy generated compatibility header */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( - 901FC638FD04ABBF641B1BA5289E58B9 /* after.m in Sources */, - 6545F866110FD71A8A7F08C98248F17F /* after.swift in Sources */, - 8EE3016E16955D33E67D3A4B526B80B7 /* afterlife.swift in Sources */, - 965128CD152E182D548D25166A7A0ABC /* AnyPromise.m in Sources */, - 77066675DD2B31CAF9BBE16B8F3B4FE2 /* AnyPromise.swift in Sources */, - 0EA8DA962874703B604E7D0C284F64F1 /* Box.swift in Sources */, - 82C1C3566A5D5A6395F0CC63E2E63881 /* Catchable.swift in Sources */, - 8CCA031DBFC561C2BDB4295AFFE02DCB /* Configuration.swift in Sources */, - DF3B173C9C0BFFBAF20FE89888175135 /* CustomStringConvertible.swift in Sources */, - AF81FA4A9B502AA954430195C09DA953 /* Deprecations.swift in Sources */, - 83CD3302FE915E10B107859386387F32 /* dispatch_promise.m in Sources */, - 209D55736C84A40D70E5CEE59018C4BA /* Error.swift in Sources */, - C3054C3388C651BBCCC0D4D6D37F7584 /* firstly.swift in Sources */, - F3A6143F497A16DA1DE0AAC5CD02AA57 /* Guarantee.swift in Sources */, - C35DA33EC52454F06E06F298C92250B8 /* hang.m in Sources */, - 6939FF91657C15B585F34286B8D8BF16 /* hang.swift in Sources */, - 007D8C70EA5C374EEFC5A7638DDC710B /* join.m in Sources */, - D9D190B6E0F591841C1B0AC1B8D0C34A /* NSNotificationCenter+AnyPromise.m in Sources */, - 1D23298D0D9B4910ADE40DE633078E52 /* NSNotificationCenter+Promise.swift in Sources */, - EE3D4BE0F36CB8F41C228439719EEAC4 /* NSObject+Promise.swift in Sources */, - 2EA3D0F6274B79F77FBD6D089B7067E3 /* NSTask+AnyPromise.m in Sources */, - 2C3A50BE13F80D74D2E8E3B3E6F503A5 /* NSURLSession+AnyPromise.m in Sources */, - 478E26D3AF13111498519DCF04DF90F4 /* NSURLSession+Promise.swift in Sources */, - 02CF85F0BB6137CFF5890DC9EF981267 /* Process+Promise.swift in Sources */, - 1CDB406411B86AC9E8D84DAB2C97DD36 /* Promise.swift in Sources */, - 31F0E9474F7FBB1C97F5EF570A5C681A /* PromiseKit-dummy.m in Sources */, - 6D2056001A236820F8015BA4A79E161E /* race.m in Sources */, - D94FB219CAD3190A91BCEADD16209ED7 /* race.swift in Sources */, - ADA008B926487DB6CF8A658A3F3DF11F /* Resolver.swift in Sources */, - CAB604DC70B6DAD2C4FE1DED7CC67135 /* Thenable.swift in Sources */, - F98604F0CA9C69371A5FE5D65C6E5466 /* UIView+AnyPromise.m in Sources */, - A4342DE847A35E8E98BAAEE729A3FB15 /* UIView+Promise.swift in Sources */, - 4C0745766AD773551AD2F67D8A583AE5 /* UIViewController+AnyPromise.m in Sources */, - D8AEF9279CF6C8CD2D5F716BFAEAC80A /* UIViewPropertyAnimator+Promise.swift in Sources */, - 517719A8F7EBDD02A80FC21F1246D335 /* when.m in Sources */, - D96D172BB1AA748152BA2F82BC6A6B2D /* when.swift in Sources */, + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", + "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap", + "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h", + ); + name = "Copy generated compatibility header"; + outputFileListPaths = ( + ); + outputPaths = ( + "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", + "${BUILT_PRODUCTS_DIR}/SwiftRLP-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + showEnvVarsInLog = 1; }; - 104CDA071EC594D0742ECA77BC001352 /* Sources */ = { - isa = PBXSourcesBuildPhase; + EDC821DB128FBEFA92BC6BC351D2709A /* Copy generated compatibility header */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( - 61C9BCD007508C2CB8959FA50BF0F53F /* Addition.swift in Sources */, - 4D7DEDC820A1EF913455BC0FBE72FBD6 /* BigInt-iOS-dummy.m in Sources */, - F6EEBE907D9BF3B0332ED86D67236441 /* BigInt.swift in Sources */, - 1904E18F6CE01618BBBC1B31E43B64EA /* BigUInt.swift in Sources */, - AA08FA2EB9DB4E98494BFDDE5D4B4936 /* Bitwise Ops.swift in Sources */, - F6C04F880164DA1647FDF6654CD65CBE /* Codable.swift in Sources */, - 45482DED636330B9BCE4493225B66813 /* Comparable.swift in Sources */, + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", + "${PODS_ROOT}/Headers/Public/SipHash/SipHash-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/SipHash/SipHash-iOS-umbrella.h", + ); + name = "Copy generated compatibility header"; + outputFileListPaths = ( + ); + outputPaths = ( + "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", + "${BUILT_PRODUCTS_DIR}/SipHash-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + showEnvVarsInLog = 1; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 104CDA071EC594D0742ECA77BC001352 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 61C9BCD007508C2CB8959FA50BF0F53F /* Addition.swift in Sources */, + 4D7DEDC820A1EF913455BC0FBE72FBD6 /* BigInt-iOS-dummy.m in Sources */, + F6EEBE907D9BF3B0332ED86D67236441 /* BigInt.swift in Sources */, + 1904E18F6CE01618BBBC1B31E43B64EA /* BigUInt.swift in Sources */, + AA08FA2EB9DB4E98494BFDDE5D4B4936 /* Bitwise Ops.swift in Sources */, + F6C04F880164DA1647FDF6654CD65CBE /* Codable.swift in Sources */, + 45482DED636330B9BCE4493225B66813 /* Comparable.swift in Sources */, 42FF2C1D3648C354550AC88EE5E64B80 /* Data Conversion.swift in Sources */, 158F6BC9635AF0C4F8FCAD1FB913BB45 /* Division.swift in Sources */, B43A930051FDC74CE6667856407BD5CF /* Exponentiation.swift in Sources */, @@ -2859,15 +3026,25 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 3FF5076712D3DA34C798CD9D101B4F40 /* Sources */ = { + 1C3EF99237B7E5AF16765F5F4EBE5BE1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 655C7AAC2D964E8A317BD69CA59F54DE /* AnyError.swift in Sources */, + 4C20F5836E09BEAF0175C7F5D2D45F89 /* NoError.swift in Sources */, + 2F6E8156D02A841E2616F0996781F15F /* Result-macOS-dummy.m in Sources */, + 79C2298346A483DD086B4A9AC7223820 /* Result.swift in Sources */, + 9A899EFE19622CA6723D08C0F8FBB187 /* ResultProtocol.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F126988CBC888A0714AF1DA260B78DD /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 55AD64D3F27943249ED212756122D497 /* AnyError.swift in Sources */, - 1C12A92A45B56442DF1BF2D3108BD0D6 /* NoError.swift in Sources */, - 238296CA2E8752527657C31802220A24 /* Result-macOS-dummy.m in Sources */, - DE187779397F69A993589FE1F1590714 /* Result.swift in Sources */, - 60CD9DF68A22619B2F816E8B1F8DA33A /* ResultProtocol.swift in Sources */, + D38BBC7C8903B9EB7803ECA68167DE20 /* EthereumAddress-iOS-dummy.m in Sources */, + 3D6F8B4564F5BAF43F01ADCFBA720658 /* EthereumAddress.swift in Sources */, + 0F4C148C5393004D090DC7218E39BB39 /* Extensions.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2901,66 +3078,52 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 591DC71F3ADDB8E51AB956C1961BB8E9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7DD60FE1FB24311F3522B19B09E05CBF /* lax_der_parsing.c in Sources */, - 80D571EE008AE23D0AFAC92B6A98204D /* lax_der_privatekey_parsing.c in Sources */, - 14C6C90D414DDF5959AAD6D49D4BBD77 /* secp256k1.c in Sources */, - 670A949462535EF03D2A9B910CEB4E48 /* secp256k1.swift in Sources */, - 8A8FAE273220A2C885FE8C452D175166 /* secp256k1_swift-macOS-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 625DCE12F33E67472BE981CF2C3D8D59 /* Sources */ = { + 5C6F1730FAE5A8F910B63E28BED3C00B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 24DA9F0423F82C80205C93EEF0CFF381 /* BufferStorage.swift in Sources */, - 186AD9B44240324FF4C4DBF0A8AC935F /* Cimpl.c in Sources */, - FCD2D464E35870B3F06993770117959D /* Salsa.swift in Sources */, - 9CDABEBBD7BF0889FF7DD3E739FD6B40 /* scrypt-iOS-dummy.m in Sources */, - AE8E41C185BA7C46465657E84B66F196 /* Scrypt.swift in Sources */, + 08F8D3D166021760B18C796EF207413F /* EthereumAddress-macOS-dummy.m in Sources */, + DBB230040D2BE00D2D5726E70957B1BE /* EthereumAddress.swift in Sources */, + 73ADC70790A1F8DFBCB7B7F2D1A2264E /* Extensions.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6636BC235F98E7D2EBDF592BD5B5FFBE /* Sources */ = { + 5EF30E27818FB63FE5D68283E679752C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - FE141380D52E6EA72571C40A8DB494D0 /* after.m in Sources */, - 00F9F735E6AEACB1D79CC24FE2570030 /* after.swift in Sources */, - 221D9234B8A18F610B920F836A7855AB /* afterlife.swift in Sources */, - CD4F83E8BF753B40698A55CA22BB0CF1 /* AnyPromise.m in Sources */, - 160B4BF9DB9EB617E146CC2E9C883C7E /* AnyPromise.swift in Sources */, - BE2237E0E9E26533C1E860FD41CF5FB9 /* Box.swift in Sources */, - A940EEBB23376DBCC59DC570DA702353 /* Catchable.swift in Sources */, - 563E37F7F956CED55AC3793CD37445D3 /* Configuration.swift in Sources */, - E70A831423370AD1CF91BAC1373D3527 /* CustomStringConvertible.swift in Sources */, - 65693FDA33760BA50D20F6D0989BA8E7 /* Deprecations.swift in Sources */, - 33194D0CBC51F3CF9555DC514AA2E059 /* dispatch_promise.m in Sources */, - 3368BFCA6F37472A3F80E757FDFA5EC6 /* Error.swift in Sources */, - 47AE4F4F59DE9319CA4537E806A378A1 /* firstly.swift in Sources */, - 53B8C2D24E27198BE0F12E576F7989F9 /* Guarantee.swift in Sources */, - FAEE1A63513F87D185820EEEF7DB9506 /* hang.m in Sources */, - C66FC8C1B1997579D636D39C9BF09BD5 /* hang.swift in Sources */, - 23B9A85EF3D0D9FE26611DBA312205BF /* join.m in Sources */, - 98AE081420DDB94A9A72C9DE3CEEDB81 /* NSNotificationCenter+AnyPromise.m in Sources */, - 6AD0531529517B7D53FB216B173CB4D7 /* NSNotificationCenter+Promise.swift in Sources */, - 2EB46ECD84B1069C5D85756E35BE3A86 /* NSObject+Promise.swift in Sources */, - F31F62CD0FEA355203A5C5750FC421F7 /* NSTask+AnyPromise.m in Sources */, - 42200366754CDC163F24C7657A6E5426 /* NSURLSession+AnyPromise.m in Sources */, - BEDC52E4027F817E284B2DD842BFB332 /* NSURLSession+Promise.swift in Sources */, - B99E4D246BF638E9C0E6DB9216909970 /* Process+Promise.swift in Sources */, - 4356FFA7A939D1F7937A48DA948D1F4E /* Promise.swift in Sources */, - 76CD5AD83B4FB7CB8D690BBB0E6BF0CA /* PromiseKit.root-CorePromise-Foundation-dummy.m in Sources */, - 1229DEE3B9CC3F49645AF6530096597C /* race.m in Sources */, - A67CFB75EC62364579FB9EB448C61786 /* race.swift in Sources */, - 1F22A4026D790826AA156354694CBCC5 /* Resolver.swift in Sources */, - 58A0398843A05951A20C16C736C2F649 /* Thenable.swift in Sources */, - 539700CDAD65FF7CAC666B4C99261E10 /* when.m in Sources */, - 7D9DC2803DA6CE9DE07A6C18AF52AFA7 /* when.swift in Sources */, + 0FFEBD2D6ACAE3AC711E0208FCEACC40 /* after.m in Sources */, + C35AFE3E2575CF308C100F43FC2B60CB /* after.swift in Sources */, + F6E2A19F261D93BB5E130674AEF90198 /* afterlife.swift in Sources */, + D575885715CF6B41AEA644EAE2513FE8 /* AnyPromise.m in Sources */, + E85D4BCF4C4214A3340D014F0CB27440 /* AnyPromise.swift in Sources */, + 1EE960C5AF0D4947CD23926FF20C2134 /* Box.swift in Sources */, + 44ACCC6BC3804034F682166BCB280D6C /* Catchable.swift in Sources */, + 0E7F3356235A21C8DEE7CFC67A802552 /* Configuration.swift in Sources */, + 01E1753617A93639EEA9E9A55B0315BA /* CustomStringConvertible.swift in Sources */, + C934E91003F09F0E5C50BD3FAA858A6A /* Deprecations.swift in Sources */, + 4CC995FC29A8A8E8C8C0B0B97A8C5486 /* dispatch_promise.m in Sources */, + 27CC89021B6035E3D3077405BF7D0518 /* Error.swift in Sources */, + 088ADDDC247990129868BE86AAFDD65F /* firstly.swift in Sources */, + E7A8CA29F94135EBCA9E6187C222A42A /* Guarantee.swift in Sources */, + 5C34CEC8C567D8A533F9FA1327868C96 /* hang.m in Sources */, + 459BB256132E1224D00C02FA4678450E /* hang.swift in Sources */, + C462A569CC9699DC1C14CB401D63CF5E /* join.m in Sources */, + A9FA53CE467640689F8095D7B4FC85E1 /* NSNotificationCenter+AnyPromise.m in Sources */, + 27DF4C9F60541A50E1E4C29080D83278 /* NSNotificationCenter+Promise.swift in Sources */, + F59F8D1792721D4062D9597FF2370D53 /* NSObject+Promise.swift in Sources */, + 5E1BA68C47D734105DD418DE2C795B71 /* NSTask+AnyPromise.m in Sources */, + 515FA154B65878E6DEB79E513C7F7FE3 /* NSURLSession+AnyPromise.m in Sources */, + 37B89B7042E76DF933791631E40CB4AB /* NSURLSession+Promise.swift in Sources */, + 3C698382149E46B98B05858131950249 /* Process+Promise.swift in Sources */, + 25ADF91F59CF38DA37B5155F3E4D28B8 /* Promise.swift in Sources */, + 70331820D199129F5DD2EF9609699F32 /* PromiseKit.root-CorePromise-Foundation-dummy.m in Sources */, + 97962E30EE5B5298443D563B897E4308 /* race.m in Sources */, + 0D668C0B0CBE5C06AE7AE80EC0F20207 /* race.swift in Sources */, + CBD35C9BC44BFC266C2B4E310F1EB6F9 /* Resolver.swift in Sources */, + D78C9EA6787B721D75665039BD726BF9 /* Thenable.swift in Sources */, + 8206DF8B40704C8CFE78662D412A422E /* when.m in Sources */, + 78DCC64E4BB4C69177C5391DF4BA6119 /* when.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2976,19 +3139,28 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 6B494B14C59C4221F3ED47D69E275808 /* Sources */ = { + 6F5CC9B499993EA733C785A3803C553D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B6699C206D4772B76BEAF1722CB04572 /* Pods-web3swift-macOS_Tests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 74A501CE727E95B4C6687723037D9862 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - F2242C49CF793215836DA2FE29E8C1E1 /* Pods-web3swift-iOS-dummy.m in Sources */, + 006C73869D28CFC3C08992F0723EE0C6 /* Pods-web3swift-macOS-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6F5CC9B499993EA733C785A3803C553D /* Sources */ = { + 7554990BF3A60368D06DE120F92AFA9D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - B6699C206D4772B76BEAF1722CB04572 /* Pods-web3swift-macOS_Tests-dummy.m in Sources */, + AB9036DA4C5904627604A28671470C5A /* RLP.swift in Sources */, + 408DA994AB51EFFDD47DA8B29108EB0D /* SwiftRLP-iOS-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3086,15 +3258,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 97393369835E668457D42683CB3D37E8 /* Sources */ = { + 9C8F84D70CD3951B1660E208CB29441B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 05923951C32119A5CA2E4CE5B75CEFBE /* AnyError.swift in Sources */, - FAD5FD40317211B25BC1F3BAEBFEE6BA /* NoError.swift in Sources */, - 62B6EEB28406C9D6FE3A1A146083280A /* Result-iOS-dummy.m in Sources */, - 14CE101A185E7F4C98959036549EEAD6 /* Result.swift in Sources */, - 767EBDFEBC77EC1421A3916FBB13E219 /* ResultProtocol.swift in Sources */, + E26B96712A33AB8CE72BA17C152736E8 /* AnyError.swift in Sources */, + 2AFFA6CFA6FD4C6C4CF3FE7F256F8B04 /* NoError.swift in Sources */, + 3379FA9A4DA05C88936306809AC0EADA /* Result-iOS-dummy.m in Sources */, + E4831746A0E266E025EE80BCA4EF3BFD /* Result.swift in Sources */, + 228339669ABE224EA8C7AE49DC9EE0F8 /* ResultProtocol.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3106,6 +3278,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A2ACE7E19845A64A7A861D0789B5556A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EB0DEA3194A067ADEF216B5AEB36E957 /* Pods-web3swift-iOS-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; A5A45EF12B04C5C92A3AEF6FB3A93BC5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -3188,64 +3368,132 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - AE5C44EE6236028D6CCB51608899A34F /* Sources */ = { + AC55CD23CEB47B0B14D8B2BE25385074 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DD79FE3BB4C3C7D3A923E6CC1B66064A /* RLP.swift in Sources */, + AA93CBB28A057A39E3A55586997114BD /* SwiftRLP-macOS-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + ADC13DDD5F0DDA1F9E13741ADBA5EB90 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 3C8A0D6B372B675A5996296B62C25692 /* lax_der_parsing.c in Sources */, - 5C7BE1B24A19199F514AC8688FFF4306 /* lax_der_privatekey_parsing.c in Sources */, - D4124EDD949269E344DC2B3A307C708E /* secp256k1.c in Sources */, - B69E3F26EF82B14F2BBFCC991285A2FD /* secp256k1.swift in Sources */, - 73240BD69BCC26DFFDF04AA384B93E62 /* secp256k1_swift-iOS-dummy.m in Sources */, + 4E0086DE48C75B11B8E2D08041EEA2A5 /* BufferStorage.swift in Sources */, + D04010B8C8B3844F185CA1437FFF5118 /* Cimpl.c in Sources */, + B8B0732D6BD64650E99A7C362E617FA8 /* Salsa.swift in Sources */, + 319DAAEE886E1752C38A946984071408 /* scrypt-iOS-dummy.m in Sources */, + 7C4A904DCA206E41A88861F990CDE0BC /* Scrypt.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - BDE8FF8430801826F2311E4A726D6AA2 /* Sources */ = { + BBEEDB9A5DAE6E4AB8C4F6B6B2EF4BB2 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 01383C5F2BD3FBB6187DA01215BCB2FA /* RLP.swift in Sources */, - 7FE6B8EA18532E50F15E7BF3D013B092 /* SwiftRLP-iOS-dummy.m in Sources */, + 8972ED44B8E31FAE3C248BBCCB8E7CC4 /* lax_der_parsing.c in Sources */, + 014401F351E5C79C50E62052E8AD671C /* lax_der_privatekey_parsing.c in Sources */, + EEBBD653ACE1E18F44D391EC926D1EF9 /* secp256k1.c in Sources */, + A373AD2926D810C1056D9FECF17DD66D /* secp256k1.swift in Sources */, + BD755CD92BD7C02AF8A0A289DC9E8446 /* secp256k1_swift-iOS-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - BE8BE6B0DA1BF467D2B6288460FFE2D2 /* Sources */ = { + D0BD425EF1B48E5B0B78F0ED11C0ECB2 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 1B1A69F5303E8DD6740A8234E719F76A /* BufferStorage.swift in Sources */, - 4F5E15E5AA1C78F5B4AA3588A8CE4C19 /* Cimpl.c in Sources */, - 678ACAE3280725570F9C7FC768578757 /* Salsa.swift in Sources */, - 20B709359C09D72B58E11D9B585EBF36 /* scrypt-macOS-dummy.m in Sources */, - 68536A3B8BA467CBE4D92F13DDB5D5A3 /* Scrypt.swift in Sources */, + EEB835EB989FDE954E0253B6BED77F43 /* after.m in Sources */, + 5E141CAFCF233DCA8F297AA169BA6AE7 /* after.swift in Sources */, + 09F1AC7E0FE7F27B9029F4B3D06DD73E /* afterlife.swift in Sources */, + 1026302AD9FDCB8A55CB7EBB06DA0D7F /* AnyPromise.m in Sources */, + 804014B054A6AF38DF4D8859000D64D4 /* AnyPromise.swift in Sources */, + F9451AAFCEDF04CB35C64C98192AC819 /* Box.swift in Sources */, + D937FEA1E574089DEF1B2FF475B3F2B7 /* Catchable.swift in Sources */, + D33063EEBD209F32520B754AD30B31A8 /* Configuration.swift in Sources */, + DF4ECF7A425192C1C45C4AB1E9BAE553 /* CustomStringConvertible.swift in Sources */, + 87C3D298B9E9216D388BA5B0D015EE50 /* Deprecations.swift in Sources */, + F9D3A99DCE33C06801BDC5EBADEDFDA9 /* dispatch_promise.m in Sources */, + CA0DC69F0F366577F4021A1FB04730B2 /* Error.swift in Sources */, + 00CE1E56028E70F6A410464BB8266F28 /* firstly.swift in Sources */, + 25DB619FFE4DED74D902A70CD2642ED4 /* Guarantee.swift in Sources */, + 21B1C23EA3CD320C60DE1B2C4F849A2C /* hang.m in Sources */, + E75EA18FC026B0FE0E943667D597D909 /* hang.swift in Sources */, + 376C09B5EF8BAEF6D7450FDD24DA2530 /* join.m in Sources */, + 506BDA80E1D1FADE6D2EAE8FE6533C13 /* NSNotificationCenter+AnyPromise.m in Sources */, + 1B2C98EB955D193734DA944CDBAF4CBB /* NSNotificationCenter+Promise.swift in Sources */, + 54275399FAE4959C9EEAC7C7E8EA2031 /* NSObject+Promise.swift in Sources */, + F4F971E86909084B5DE98EB247D30EAF /* NSTask+AnyPromise.m in Sources */, + 5BFB61E4B72C16BDD714663095E1E602 /* NSURLSession+AnyPromise.m in Sources */, + CD433301876DFD79558B30167DD81DED /* NSURLSession+Promise.swift in Sources */, + B725B5E58DF7010A5CED552276526B66 /* Process+Promise.swift in Sources */, + 274467E80B57985D276837BC38F63C9C /* Promise.swift in Sources */, + 48D821F48A258CA9FCC0524545AF23B3 /* PromiseKit-dummy.m in Sources */, + A88812CCF543A4485A540AE2567B4B88 /* race.m in Sources */, + 0676D57F5CE425CA83CAA976ED4030D7 /* race.swift in Sources */, + 11235690EFCBB5F0EBC4A56A7E3AB2DA /* Resolver.swift in Sources */, + 1B7BD089E927617EA26BDF05EAA765A2 /* Thenable.swift in Sources */, + 27068BF23AE89103AC017DCE533A0B84 /* UIView+AnyPromise.m in Sources */, + D6BEC5D8B88A2BF435ADEDDA2505900A /* UIView+Promise.swift in Sources */, + 2AC384703D326D9D63AC130A9FFAF78E /* UIViewController+AnyPromise.m in Sources */, + 6D0468F188D17EFAC5C4655473D99D74 /* UIViewPropertyAnimator+Promise.swift in Sources */, + 0B8DCF4FC4B4CC3F687AC9FB1E97504C /* when.m in Sources */, + 899F8A018D26D3A321EB0481C091847F /* when.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - C4A012A57A14E671D4C1D570BDB15BA0 /* Sources */ = { + F26428FB9A70DF978834F0A0F8B50B0F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 18657716987587225DBC37ABB461F275 /* Pods-web3swift-macOS-dummy.m in Sources */, + 4D47DC986746CEF8703D74068A8201C3 /* BufferStorage.swift in Sources */, + 6663694C763AF2F46E6A548540FADB3C /* Cimpl.c in Sources */, + 599CEF91B917F7C8758E1E13C50B2A90 /* Salsa.swift in Sources */, + E2F52C65710FEE56EBABD1C599E031E2 /* scrypt-macOS-dummy.m in Sources */, + D1F87BF791595C2F5B4A86F445081ED5 /* Scrypt.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - F8DF2C603FEBDA8D9954844AE56388A4 /* Sources */ = { + F4783445DE7F29598185898BF1D1FA23 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - FF74BC55A69429C29500972AF8A9DABB /* RLP.swift in Sources */, - 2618ECD8B43241610183A733721C0AE7 /* SwiftRLP-macOS-dummy.m in Sources */, + E262F38BE8D55B54CB886EAC66214BFD /* lax_der_parsing.c in Sources */, + 4CDD68A843BFBB60D9186F29785293F9 /* lax_der_privatekey_parsing.c in Sources */, + 9786160112EBD1D91A7AB61E7E585A09 /* secp256k1.c in Sources */, + 5F569BB3EF9E99550253E3309677BFD7 /* secp256k1.swift in Sources */, + 4876BE2384F8243077AD5F55AB07AC4B /* secp256k1_swift-macOS-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 0E9C45A587EE356A1AFB76CFA06A3A1B /* PBXTargetDependency */ = { + 02BA5612135F3D656000F3174E527D10 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "Result-iOS"; - target = B15A271BA5831BBA626B2A8FEE864C9E /* Result-iOS */; - targetProxy = E602EC1A33624D8E13D2528B9A6E9267 /* PBXContainerItemProxy */; + name = "BigInt-iOS"; + target = AF9F48E6961507C0E2FD7A3CDBC652DA /* BigInt-iOS */; + targetProxy = E4535F8068DAE0F786E0E402D0C94ABE /* PBXContainerItemProxy */; + }; + 1E5CC3B070AA071ADEB9D014A865CC6C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "secp256k1_swift-macOS"; + target = 4C59270F810F2B1FEC2F3D5A77188907 /* secp256k1_swift-macOS */; + targetProxy = BB90BB48F65D5795C75190C5B68C55DA /* PBXContainerItemProxy */; + }; + 2055448327DB15BA03467F050E753FB0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "EthereumAddress-macOS"; + target = F5120265F2BDEB78BE6300C2AF965614 /* EthereumAddress-macOS */; + targetProxy = FC1CF70CADD772EA1F635C39F8E9A792 /* PBXContainerItemProxy */; + }; + 2269634CF395C023BD0DE456EDC0E905 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "CryptoSwift-iOS"; + target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; + targetProxy = 13C00F95FF864E5C7AAC5B0A5CB8498F /* PBXContainerItemProxy */; }; 2A5B940C38D42B8D734A160124EFFE9A /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -3253,170 +3501,174 @@ target = 3B79F6DB09B597AAE9D3EB939DA463D8 /* SipHash-iOS */; targetProxy = AC378E3E20AF5D424B6D68F67641CFC3 /* PBXContainerItemProxy */; }; - 545A441DCFCEDAFC57A8880D6F3A258B /* PBXTargetDependency */ = { + 2C8BE55B42F306995084EBB384828202 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "SipHash-iOS"; target = 3B79F6DB09B597AAE9D3EB939DA463D8 /* SipHash-iOS */; - targetProxy = EEE3CE0ACD2A096CC7970CBFFB63CC5E /* PBXContainerItemProxy */; - }; - 5D5FB078761B0BDFAFD58A94FA1E2357 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "CryptoSwift-macOS"; - target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; - targetProxy = 81302A5702FAB5179E00059495C674D0 /* PBXContainerItemProxy */; + targetProxy = C0F3CE7136EDD63588CA49A936A5759F /* PBXContainerItemProxy */; }; - 61A0C7C5A71562D5B7E98B968E20DA69 /* PBXTargetDependency */ = { + 3608CB885D6B6B4B853ECBAC44A93F46 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "SwiftRLP-macOS"; - target = FE616C0F8645852E1A582197DFC35CD4 /* SwiftRLP-macOS */; - targetProxy = 8043A6EE1F8EBE657783820C64B4ECF0 /* PBXContainerItemProxy */; + name = "SwiftRLP-iOS"; + target = 1F803FF778771424C8085D9971D3840F /* SwiftRLP-iOS */; + targetProxy = 97F0040393FC590BA7564498436EC95D /* PBXContainerItemProxy */; }; - 809C4E986CB3B9FC9CB2BC9B6C1EB391 /* PBXTargetDependency */ = { + 38A31696BE8B09855448DB541DAF6CAF /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "Result-macOS"; - target = F2C23507954E7580FFDC3A161C6AB0E4 /* Result-macOS */; - targetProxy = 67FA85B98174E1654BF1E1ECAC76CB7F /* PBXContainerItemProxy */; + name = "BigInt-iOS"; + target = AF9F48E6961507C0E2FD7A3CDBC652DA /* BigInt-iOS */; + targetProxy = E2571A8251835112EFDDA05DFB2E5DB7 /* PBXContainerItemProxy */; }; - 87F1B30D723909893ED4B83C94656F15 /* PBXTargetDependency */ = { + 419DB448EDECEAD154DB39A4EFDB540A /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "CryptoSwift-macOS"; - target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; - targetProxy = 19D7329A8315B85B58C8441C1899A592 /* PBXContainerItemProxy */; + name = "CryptoSwift-iOS"; + target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; + targetProxy = ED9EA08A437EDE511FD5DFDA715E57C7 /* PBXContainerItemProxy */; }; - 9D7AAC3DD6D3C5FF1FA407E4509B529D /* PBXTargetDependency */ = { + 41F78C658B3F9F5219DDE2ECF3E07F6D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "scrypt-macOS"; - target = 0FEA45E4A3FB35CD13AAE2348DB3359E /* scrypt-macOS */; - targetProxy = B6AAE8A429B44CC4133143E68DD626FE /* PBXContainerItemProxy */; + name = "CryptoSwift-iOS"; + target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; + targetProxy = F6D2E7AC0942F82635983E5CBB33D700 /* PBXContainerItemProxy */; }; - AE1F2CE326361908A43EB02F0B9812CB /* PBXTargetDependency */ = { + 4DC8DD86030434C6B1D0B5A99DEFAD48 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "BigInt-macOS"; - target = 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */; - targetProxy = 1F3EEADE6537E330C7A04D4BC33EB5C7 /* PBXContainerItemProxy */; + name = "scrypt-iOS"; + target = BB37143ACC20FC450C45EFD6C5660906 /* scrypt-iOS */; + targetProxy = CF619704DBA07523055F8D5648DDBAC5 /* PBXContainerItemProxy */; }; - B70AFA61252EF7C185E0A83F61E40089 /* PBXTargetDependency */ = { + 6380C782AA285DFB888C8E8249285814 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "BigInt-macOS"; - target = 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */; - targetProxy = 35923DBC7D43F34B3882ED3F64D560CA /* PBXContainerItemProxy */; + name = "secp256k1_swift-iOS"; + target = 96225BBE1203595F4D0672A487BB9861 /* secp256k1_swift-iOS */; + targetProxy = E34A7F6994A6A82EB46702FB69724C37 /* PBXContainerItemProxy */; }; - B9E11C250C8CF155875A0B2FB480E6BA /* PBXTargetDependency */ = { + 695E61EC945DAB26310EFF15776F8416 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "secp256k1_swift-macOS"; - target = 498B5059F6777D5158A7EE62045BD64E /* secp256k1_swift-macOS */; - targetProxy = 2B3213357F1CA1AD9298A10F444D0951 /* PBXContainerItemProxy */; + name = "EthereumAddress-iOS"; + target = 1168313AEC7524AEDFC1224C6D3C6E44 /* EthereumAddress-iOS */; + targetProxy = 2A170694DEDAF59456D7141DB9F7FACC /* PBXContainerItemProxy */; }; - C5FABAD4CCBCB7C1EF48E4B3573BD61E /* PBXTargetDependency */ = { + 755A1B5E06A6BE022C3FC0DD1BEEE56D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "secp256k1_swift-iOS"; - target = 321AD436B1B1600006FDA48B769B5215 /* secp256k1_swift-iOS */; - targetProxy = E4816D843489A71F2F868B80C5ED2F48 /* PBXContainerItemProxy */; + name = "Result-iOS"; + target = 12455571B54E567146873FF705359CFE /* Result-iOS */; + targetProxy = 38BDFC13BA428BD451594A459B74A302 /* PBXContainerItemProxy */; }; - C6D935F507D2100088E917501A5BB59D /* PBXTargetDependency */ = { + 82AAC9DD7930B8C6339DED045709C87D /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "SipHash-macOS"; target = 4FCBE56BC5E931FDC43C642250037C1F /* SipHash-macOS */; - targetProxy = 284C9AFC38A225A506CB24973AEFB321 /* PBXContainerItemProxy */; + targetProxy = 881B896164342E47B02F93B29ADA3355 /* PBXContainerItemProxy */; }; - D114C6C7BD73170A69A8A773D9B8C958 /* PBXTargetDependency */ = { + 985A809AF607C0CA13161FCFE50F4C36 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "CryptoSwift-iOS"; - target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; - targetProxy = F964FFD61B8A7C737D6CF0B4A6FCDE08 /* PBXContainerItemProxy */; + name = "Result-macOS"; + target = C87C2E6C438181FF7B92161BFC2DFBEB /* Result-macOS */; + targetProxy = 1D311CE48C7A73E73FD12595C75A78C9 /* PBXContainerItemProxy */; }; - DA81B8EC030393B0ADEBDB02050FCFCB /* PBXTargetDependency */ = { + 9E296E6501EBD5FDE5817558B2BF7E2A /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "Pods-web3swift-macOS"; - target = F884BDAA9A34F06758B9377C5C3DE88F /* Pods-web3swift-macOS */; - targetProxy = 1E5017C3A1512E67B0318DD1DACDE515 /* PBXContainerItemProxy */; + name = "BigInt-macOS"; + target = 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */; + targetProxy = E3B6F092EBFA691E0A430BD173868EE2 /* PBXContainerItemProxy */; }; - DEDAE6E0420F0B6226E38A36E27FCA91 /* PBXTargetDependency */ = { + 9F20C8D399DE8D34DCEEE1FDF42CFCAA /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "CryptoSwift-iOS"; - target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; - targetProxy = 9F4F45405FD6C2C0442CDE492FDB5FB9 /* PBXContainerItemProxy */; + name = "PromiseKit.root-CorePromise-Foundation"; + target = 558049EB555978BC8947ECF2498E78D9 /* PromiseKit.root-CorePromise-Foundation */; + targetProxy = BE0F4DBA374559F8940C0B70384476BD /* PBXContainerItemProxy */; + }; + A22F26BA9F6F020F5AA933DCCC6209D2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "CryptoSwift-macOS"; + target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; + targetProxy = D3EE8712BA96FE8983FC958E6574EDD5 /* PBXContainerItemProxy */; + }; + C6510E8CFAB977BE7B6241436DAC4841 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "scrypt-macOS"; + target = 7BF3C926294C92422AFB78600D576975 /* scrypt-macOS */; + targetProxy = 8022E9AB3C92BAD10B2AEFCE42C6EDA5 /* PBXContainerItemProxy */; }; - DF6D85572A877D19DAFFC67DF1D180D9 /* PBXTargetDependency */ = { + C6D935F507D2100088E917501A5BB59D /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "SipHash-macOS"; target = 4FCBE56BC5E931FDC43C642250037C1F /* SipHash-macOS */; - targetProxy = EF2E9952249FA32D778E1825EE332999 /* PBXContainerItemProxy */; + targetProxy = 284C9AFC38A225A506CB24973AEFB321 /* PBXContainerItemProxy */; }; - E79CE6FB4D42E5E11A7F83044F9DDE2A /* PBXTargetDependency */ = { + CD84CCD9860362B77E623B72E64A8990 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "BigInt-iOS"; - target = AF9F48E6961507C0E2FD7A3CDBC652DA /* BigInt-iOS */; - targetProxy = 51A46AB20A7BD61878D970BEEA7A6BD1 /* PBXContainerItemProxy */; + name = "BigInt-macOS"; + target = 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */; + targetProxy = 995B8D8F764EF523079B88A06313F11D /* PBXContainerItemProxy */; }; - EEB4F61BD057F839E2C48E58F59F68BA /* PBXTargetDependency */ = { + D25FD61F0F8712699C186B8B64A1A47B /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = PromiseKit; - target = 630AEE08CD31743EE32F246198F2C879 /* PromiseKit */; - targetProxy = 71982CBFBFF1DE0F242D9C483783D66C /* PBXContainerItemProxy */; + name = "CryptoSwift-macOS"; + target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; + targetProxy = FA5D6DF00D850BA03F64F8B7F8E88175 /* PBXContainerItemProxy */; }; - F3DDE7BB170DA1519FDDE4BA03AB73FA /* PBXTargetDependency */ = { + DA81B8EC030393B0ADEBDB02050FCFCB /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "Pods-web3swift-iOS"; - target = 2892912E4AE0D2C848DA80F38A3430EF /* Pods-web3swift-iOS */; - targetProxy = 366CCE30759EB3C0FF8E45BE9572B007 /* PBXContainerItemProxy */; + name = "Pods-web3swift-macOS"; + target = 82C35D316B5E8115E43ACCFE4E50137C /* Pods-web3swift-macOS */; + targetProxy = 1E5017C3A1512E67B0318DD1DACDE515 /* PBXContainerItemProxy */; }; - F7E883C0A0130109CAC9B2F121277455 /* PBXTargetDependency */ = { + DCCED206D4BBB569EEFCBD6A2C1BAC88 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "BigInt-iOS"; - target = AF9F48E6961507C0E2FD7A3CDBC652DA /* BigInt-iOS */; - targetProxy = 1E0A3209CEDE9B1B33C44AC5926A66C5 /* PBXContainerItemProxy */; + name = "CryptoSwift-macOS"; + target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; + targetProxy = E8B4498958DB7A8D6B92BD5B3EC5929C /* PBXContainerItemProxy */; }; - F9D4CA180533C7D2D10B0309068C01EB /* PBXTargetDependency */ = { + F3DDE7BB170DA1519FDDE4BA03AB73FA /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "PromiseKit.root-CorePromise-Foundation"; - target = F4EB0AFAA3A292F355BF33F9614E125E /* PromiseKit.root-CorePromise-Foundation */; - targetProxy = DA69FF9DA2BAA16B70B3669FF391FD00 /* PBXContainerItemProxy */; + name = "Pods-web3swift-iOS"; + target = BAA7945626BCC2CCA0CD2C7A0AC13E79 /* Pods-web3swift-iOS */; + targetProxy = 366CCE30759EB3C0FF8E45BE9572B007 /* PBXContainerItemProxy */; }; - FBC886A1348A04B6C34EE2F136A089A8 /* PBXTargetDependency */ = { + FCBCE9AAE7712F633822A4305BA498B6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "SwiftRLP-iOS"; - target = DA0577AD76B443C71930FAC764E972C5 /* SwiftRLP-iOS */; - targetProxy = 5571BEC206C1D03111C6EF3E6C7CED63 /* PBXContainerItemProxy */; + name = PromiseKit; + target = 94906F0C68B58FB4B40554812C3BBFD8 /* PromiseKit */; + targetProxy = 78E3F5567AAF195D28B5DA37D51C8623 /* PBXContainerItemProxy */; }; - FF861C5299B110723B953D74908F199E /* PBXTargetDependency */ = { + FE4F7F2A1F792D695B3070E073F67F11 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "scrypt-iOS"; - target = B6DAA867681209B8BCC71EE70D0654A0 /* scrypt-iOS */; - targetProxy = 830B40C3043F87BD797252E75F83EC21 /* PBXContainerItemProxy */; + name = "SwiftRLP-macOS"; + target = 73527F6F8B0A792EA5FD7085DADC6B93 /* SwiftRLP-macOS */; + targetProxy = 819958A4438F4712BB2395ECD30B2C4D /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 16D02FC5D8B1360961D0964C786FD01A /* Release */ = { + 0642CE789E80E243CAD03C3BC1721169 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FFA38A7573EBA79AA83EBCA62742C2CA /* CryptoSwift-iOS.xcconfig */; + baseConfigurationReference = 1412597E34EB8268006B0BCFF20BB89A /* secp256k1_swift-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = CryptoSwift; - PRODUCT_NAME = "CryptoSwift-iOS"; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = "secp256k1_swift-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.2; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; }; - name = Release; + name = Debug; }; - 1A2FBFC123A5062B1AFCD1139F813593 /* Debug */ = { + 0D0B0751228CE1672D4155CDC48E48F4 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 1C8F00AC871FE0EC2FBD9A40F62753CD /* Pods-web3swift-macOS.debug.xcconfig */; buildSettings = { @@ -3442,9 +3694,62 @@ }; name = Debug; }; - 1BCC5A8658E49455E4C0CED34AC9A204 /* Debug */ = { + 15B89B467BEBF88DB7C0DE281DDCB2FF /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 673FFC4D2B959AB8AEC35D646A85CDCD /* Pods-web3swift-iOS.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 16D02FC5D8B1360961D0964C786FD01A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B6112FCF75FBFC58E314A40652665F06 /* CryptoSwift-iOS.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = CryptoSwift; + PRODUCT_NAME = "CryptoSwift-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 1C87E448DBFBA3CE908FC5D7F08DE3D2 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 10F96D8FE1C5606E4F729FFD623428A3 /* secp256k1_swift-macOS.xcconfig */; + baseConfigurationReference = AA1E87AB6BC235D2BF0B5287F5ADD105 /* EthereumAddress-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; @@ -3453,26 +3758,27 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = secp256k1_swift; - PRODUCT_NAME = "secp256k1_swift-macOS"; + PRODUCT_MODULE_NAME = EthereumAddress; + PRODUCT_NAME = "EthereumAddress-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.1; }; - name = Debug; + name = Release; }; - 1CFA5364A5C0CACA2DADD1EA40940890 /* Release */ = { + 2890913C8C2255F2C5BC543B4A827893 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 10F96D8FE1C5606E4F729FFD623428A3 /* secp256k1_swift-macOS.xcconfig */; + baseConfigurationReference = 8CC8A14105420D222F37BBB95BFBF1A3 /* secp256k1_swift-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; @@ -3493,15 +3799,14 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; }; - name = Release; + name = Debug; }; - 1E97B1AEB07F9403EB119768EEC01515 /* Debug */ = { + 316F6BD6837503631E1CD02ECF315A0C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C7E88808C507E7B039F9595A82EBFA36 /* SwiftRLP-macOS.xcconfig */; + baseConfigurationReference = 3D2AD51705C652FD9094CEDC59DFB4FC /* SwiftRLP-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; @@ -3522,53 +3827,82 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.1; }; - name = Debug; + name = Release; }; - 3C9131BF8D77FFD3F3302CC9B5C5B5E6 /* Debug */ = { + 34FE96C4DC053075469BE4E0C218A785 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 77419BCFFD51D71BDCD33CDB50A1DC50 /* BigInt-iOS.xcconfig */; + baseConfigurationReference = 453B783DD499D624880A972C2DC8C94A /* PromiseKit.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-iOS.modulemap"; + MODULEMAP_FILE = Headers/Public/PromiseKit/PromiseKit.modulemap; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = "BigInt-iOS"; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = PromiseKit; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 3A052F4E8E3344EF5CE29C1EB82A8C14 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 435339C16A1550DDCDCD1B4731E89DBD /* Result-iOS.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/Result-iOS/Result-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/Result/Result-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = Result; + PRODUCT_NAME = "Result-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 3E7E571193D56B852F45BCA0EDE0AB9F /* Debug */ = { + 3C9131BF8D77FFD3F3302CC9B5C5B5E6 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7D2ED7B574BD12D6937C37D79B6355D2 /* secp256k1_swift-iOS.xcconfig */; + baseConfigurationReference = A2A0CFEEC4EEE7DD9F58B6A45DE63C89 /* BigInt-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = secp256k1_swift; - PRODUCT_NAME = "secp256k1_swift-iOS"; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = "BigInt-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -3579,9 +3913,37 @@ }; name = Debug; }; - 42E007BDBDF9193BF79BE95940259F6C /* Release */ = { + 3E84B79C8DEC705D62A979F5FA5D0A9E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C7E88808C507E7B039F9595A82EBFA36 /* SwiftRLP-macOS.xcconfig */; + baseConfigurationReference = 0DE0997E93980E728205BE4BF37B5FBC /* scrypt-iOS.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/scrypt-iOS/scrypt-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = "scrypt-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 4508C23FF6409DCFED0ED597F8011CA1 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3D2AD51705C652FD9094CEDC59DFB4FC /* SwiftRLP-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; @@ -3602,34 +3964,57 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.1; }; - name = Release; + name = Debug; }; - 4C189926243B31E7A258082A6B093BD5 /* Debug */ = { + 47188C6950FED720E501753BF199E23B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FBF7CDA54705306F388A9AB6943D5D1A /* SwiftRLP-iOS.xcconfig */; + baseConfigurationReference = 042CC2D185140E7D725D22562A3E307F /* Pods-web3swift-iOS.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 4CA82ACA864529495D52E03B2D33BC1C /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 453B783DD499D624880A972C2DC8C94A /* PromiseKit.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = Headers/Public/PromiseKit/PromiseKit.modulemap; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SwiftRLP; - PRODUCT_NAME = "SwiftRLP-iOS"; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = PromiseKit; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.1; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -3659,7 +4044,7 @@ }; 50921841075F46C5C393DB5B6A2529EB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7A37EB85984F608037881FD6E14786A3 /* SipHash-iOS.xcconfig */; + baseConfigurationReference = A0347CA8676D7E491A4DA559FB78007F /* SipHash-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -3683,37 +4068,38 @@ }; name = Debug; }; - 54BC1E2B4924BE327AAA74950076DC15 /* Release */ = { + 51D81D04D0379E038D2741ED941215DC /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FBF7CDA54705306F388A9AB6943D5D1A /* SwiftRLP-iOS.xcconfig */; + baseConfigurationReference = 8CC8A14105420D222F37BBB95BFBF1A3 /* secp256k1_swift-macOS.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap"; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SwiftRLP; - PRODUCT_NAME = "SwiftRLP-iOS"; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = "secp256k1_swift-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; + SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; + SWIFT_VERSION = 4.0; }; name = Release; }; - 55D2064D6E41D47D3194523E7D5805CC /* Release */ = { + 5603C29AD11DB39738D16FEC45182D72 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BC6C4D45E9DD5B4669397278183B8A6D /* PromiseKit.root-CorePromise-Foundation.xcconfig */; + baseConfigurationReference = 80E74674EB94CDFBB8B77B11BACD6046 /* scrypt-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; @@ -3722,21 +4108,48 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/scrypt-macOS/scrypt-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = "PromiseKit.root-CorePromise-Foundation"; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = "scrypt-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.1; + }; + name = Debug; + }; + 57848671E21C73A121EDCE1F4B6205BD /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1412597E34EB8268006B0BCFF20BB89A /* secp256k1_swift-iOS.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = "secp256k1_swift-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; }; name = Release; }; @@ -3807,7 +4220,7 @@ }; 60A5DC59ABDBD8D0E90FAADE4366D12E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FFA38A7573EBA79AA83EBCA62742C2CA /* CryptoSwift-iOS.xcconfig */; + baseConfigurationReference = B6112FCF75FBFC58E314A40652665F06 /* CryptoSwift-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -3831,122 +4244,37 @@ }; name = Debug; }; - 637FFE214871E427F5EB980711FE27D4 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BC6C4D45E9DD5B4669397278183B8A6D /* PromiseKit.root-CorePromise-Foundation.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = "PromiseKit.root-CorePromise-Foundation"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - 6B61E32BB5209D45BF8284B26DD646B6 /* Release */ = { + 7237D3F1652E355B7101C5937B046651 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F40F91A4B7758F182DBA05D9C974003E /* scrypt-macOS.xcconfig */; + baseConfigurationReference = 15206D43EDA63AD479C638B175342338 /* Result-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/scrypt-macOS/scrypt-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/Result-macOS/Result-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/Result/Result-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = "scrypt-macOS"; + PRODUCT_MODULE_NAME = Result; + PRODUCT_NAME = "Result-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.1; - }; - name = Release; - }; - 6B6634FBDBCD33490C8F987986D50774 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 0475C2751B32FD3CB4D4A78B955F50F8 /* scrypt-iOS.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/scrypt-iOS/scrypt-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-iOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = "scrypt-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 6E0DC298E298981B18BAF87BA11542F6 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 40497EC0B9D6C3A291AA63F310A549A2 /* PromiseKit.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = Headers/Public/PromiseKit/PromiseKit.modulemap; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = PromiseKit; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; }; name = Release; }; 75E16E6E94E4CDC1DF735E3C84E87DEC /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0091667FAE21CC6D590AC1ADB6410352 /* SipHash-macOS.xcconfig */; + baseConfigurationReference = F9C126B6106FA68D54B74E0DD65E0F8E /* SipHash-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CODE_SIGN_IDENTITY = "-"; @@ -3971,63 +4299,9 @@ }; name = Debug; }; - 77E92E2063F8A970CD3DF6C52F9CB0A3 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 40BFCBA4E1D706A666116029D5E0E726 /* Result-macOS.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/Result-macOS/Result-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/Result/Result-macOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = "Result-macOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; - 79E456F1CBDE8C5EE5AA38BC6C38BFE7 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 0475C2751B32FD3CB4D4A78B955F50F8 /* scrypt-iOS.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/scrypt-iOS/scrypt-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-iOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = "scrypt-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.1; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; 7A748354D2BAB28D6D9A5ACD8B138D72 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9B3C1FAD3DD5A0A918CA3605928E5CA9 /* CryptoSwift-macOS.xcconfig */; + baseConfigurationReference = E79185DFEB64004C5523F725F3DC89B0 /* CryptoSwift-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CODE_SIGN_IDENTITY = "-"; @@ -4075,84 +4349,86 @@ }; name = Release; }; - 8518F8D713080EF1D6A105CF2021EC99 /* Debug */ = { + 8407FD653C37937082E32CEB87697C14 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B7762E4245191B27674EB7EB82DCFFF1 /* Pods-web3swift-macOS_Tests.debug.xcconfig */; + baseConfigurationReference = AD76DBA7730870FE66D77B1FC33E49E0 /* EthereumAddress-iOS.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 10.11; + GCC_PREFIX_HEADER = "Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - SDKROOT = macosx; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = EthereumAddress; + PRODUCT_NAME = "EthereumAddress-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 858A2A341A76470B0B603B055357071F /* Release */ = { + 8518F8D713080EF1D6A105CF2021EC99 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 673FFC4D2B959AB8AEC35D646A85CDCD /* Pods-web3swift-iOS.release.xcconfig */; + baseConfigurationReference = B7762E4245191B27674EB7EB82DCFFF1 /* Pods-web3swift-macOS_Tests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = "iPhone Developer"; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + EXECUTABLE_PREFIX = lib; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.modulemap"; + MACOSX_DEPLOYMENT_TARGET = 10.11; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - SDKROOT = iphoneos; + SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; }; - name = Release; + name = Debug; }; - 8671873F3F1E5F1068D77E5606FD46A5 /* Debug */ = { + 9070795000D1F467DF9FAE6D7D640250 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 40BFCBA4E1D706A666116029D5E0E726 /* Result-macOS.xcconfig */; + baseConfigurationReference = 435339C16A1550DDCDCD1B4731E89DBD /* Result-iOS.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/Result-macOS/Result-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/Result/Result-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/Result-iOS/Result-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/Result/Result-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = "Result-macOS"; + PRODUCT_NAME = "Result-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; + SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; }; - name = Debug; + name = Release; }; - 8E915485F5B1E08FF1117FF158D60A69 /* Debug */ = { + 999EC6E913D2F808DD5EECBDADBE2FBF /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F40F91A4B7758F182DBA05D9C974003E /* scrypt-macOS.xcconfig */; + baseConfigurationReference = E8554570D5B7F10CEE0823FEB5B80B8D /* PromiseKit.root-CorePromise-Foundation.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; @@ -4161,52 +4437,55 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/scrypt-macOS/scrypt-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MODULEMAP_FILE = "Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = "scrypt-macOS"; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = "PromiseKit.root-CorePromise-Foundation"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.1; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.0; }; - name = Debug; + name = Release; }; - 98E0DE5497E5A27A343127F14FA1BF54 /* Debug */ = { + 9D532168CC77D42DF0462F9BCBD80F2E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 40497EC0B9D6C3A291AA63F310A549A2 /* PromiseKit.xcconfig */; + baseConfigurationReference = E8554570D5B7F10CEE0823FEB5B80B8D /* PromiseKit.root-CorePromise-Foundation.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = Headers/Public/PromiseKit/PromiseKit.modulemap; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MODULEMAP_FILE = "Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = PromiseKit; + PRODUCT_NAME = "PromiseKit.root-CorePromise-Foundation"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; + SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; 9F89BA0BDBDA8C292C7AF81AE6E74193 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0091667FAE21CC6D590AC1ADB6410352 /* SipHash-macOS.xcconfig */; + baseConfigurationReference = F9C126B6106FA68D54B74E0DD65E0F8E /* SipHash-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CODE_SIGN_IDENTITY = "-"; @@ -4294,7 +4573,7 @@ }; A45B3EF7FBB166F549A4ABEE13B6CE87 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 77419BCFFD51D71BDCD33CDB50A1DC50 /* BigInt-iOS.xcconfig */; + baseConfigurationReference = A2A0CFEEC4EEE7DD9F58B6A45DE63C89 /* BigInt-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -4322,7 +4601,7 @@ }; ADB19600F3034CFC88E8930883A97411 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7A37EB85984F608037881FD6E14786A3 /* SipHash-iOS.xcconfig */; + baseConfigurationReference = A0347CA8676D7E491A4DA559FB78007F /* SipHash-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -4369,120 +4648,118 @@ }; name = Debug; }; - C3B95632033BF4A43E88D89D986675EA /* Release */ = { + CCE6ADD3343BBD7115B558970171731E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0C016E31F7E35964F636011F294536FD /* Result-iOS.xcconfig */; + baseConfigurationReference = E79185DFEB64004C5523F725F3DC89B0 /* CryptoSwift-macOS.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/Result-iOS/Result-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/Result/Result-iOS.modulemap"; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = "Result-iOS"; + PRODUCT_MODULE_NAME = CryptoSwift; + PRODUCT_NAME = "CryptoSwift-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; + SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; - name = Release; + name = Debug; }; - CCE6ADD3343BBD7115B558970171731E /* Debug */ = { + D24ACCB30483674C8F98FEE6781F8A91 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9B3C1FAD3DD5A0A918CA3605928E5CA9 /* CryptoSwift-macOS.xcconfig */; + baseConfigurationReference = A5D9B32B104EA0A137D78B89D4D19D40 /* Pods-web3swift-macOS.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap"; + MACH_O_TYPE = staticlib; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = CryptoSwift; - PRODUCT_NAME = "CryptoSwift-macOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; }; - name = Debug; + name = Release; }; - D64511E0FB285D5E2F638DA67BB31729 /* Debug */ = { + D33969CE1C6C7CFBA07904BEF1C4B035 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0C016E31F7E35964F636011F294536FD /* Result-iOS.xcconfig */; + baseConfigurationReference = 15206D43EDA63AD479C638B175342338 /* Result-macOS.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/Result-iOS/Result-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/Result/Result-iOS.modulemap"; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/Result-macOS/Result-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/Result/Result-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = "Result-iOS"; + PRODUCT_NAME = "Result-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; + SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - E1CA2CF2207508268263503EC77DD1AE /* Release */ = { + DCCDA1002E48EAEF2C988A5C6EBBF971 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7D2ED7B574BD12D6937C37D79B6355D2 /* secp256k1_swift-iOS.xcconfig */; + baseConfigurationReference = E34EBA5D815562B6AEF202EEF42D4456 /* SwiftRLP-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = secp256k1_swift; - PRODUCT_NAME = "secp256k1_swift-iOS"; + PRODUCT_MODULE_NAME = SwiftRLP; + PRODUCT_NAME = "SwiftRLP-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; - ED1F36CA81A4FAAC1C67B05F7E9F4498 /* Release */ = { + E2903A9A477CD5FC7A1AA02D234622F7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A5D9B32B104EA0A137D78B89D4D19D40 /* Pods-web3swift-macOS.release.xcconfig */; + baseConfigurationReference = 80E74674EB94CDFBB8B77B11BACD6046 /* scrypt-macOS.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; @@ -4490,47 +4767,109 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - MACH_O_TYPE = staticlib; + GCC_PREFIX_HEADER = "Target Support Files/scrypt-macOS/scrypt-macOS-prefix.pch"; MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = "scrypt-macOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.1; }; name = Release; }; - F3FCBAAE6245C7BE73AFC4E87F57843B /* Debug */ = { + E5411E931BB177D29281DC9404230DD1 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 042CC2D185140E7D725D22562A3E307F /* Pods-web3swift-iOS.debug.xcconfig */; + baseConfigurationReference = 0DE0997E93980E728205BE4BF37B5FBC /* scrypt-iOS.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/scrypt-iOS/scrypt-iOS-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = "scrypt-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + EAB93834CF69459E8D9F59D7D266CC6A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AD76DBA7730870FE66D77B1FC33E49E0 /* EthereumAddress-iOS.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = EthereumAddress; + PRODUCT_NAME = "EthereumAddress-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + F0201DAF490AE92696849A72FDE47927 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AA1E87AB6BC235D2BF0B5287F5ADD105 /* EthereumAddress-macOS.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = EthereumAddress; + PRODUCT_NAME = "EthereumAddress-macOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.1; }; name = Debug; }; F4CD297453714BA949383E8B4EAB4DA3 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 43CCBB7CEE935A6D645B18B87E5F1A5E /* BigInt-macOS.xcconfig */; + baseConfigurationReference = 8823C42C614B0067E2C89A5AE71DA77D /* BigInt-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CODE_SIGN_IDENTITY = "-"; @@ -4558,7 +4897,7 @@ }; F6220DAE297B6F9A75ACF0DCDBBE507C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 43CCBB7CEE935A6D645B18B87E5F1A5E /* BigInt-macOS.xcconfig */; + baseConfigurationReference = 8823C42C614B0067E2C89A5AE71DA77D /* BigInt-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CODE_SIGN_IDENTITY = "-"; @@ -4583,41 +4922,76 @@ }; name = Debug; }; + FEB6E9194937DDA3A6F6493F676E2004 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E34EBA5D815562B6AEF202EEF42D4456 /* SwiftRLP-iOS.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = SwiftRLP; + PRODUCT_NAME = "SwiftRLP-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 19CA2EF2646C88FC1D5F4864827AF9A9 /* Build configuration list for PBXNativeTarget "CryptoSwift-iOS" */ = { + 0039F2F377814CD2485BC36E354F85D8 /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 60A5DC59ABDBD8D0E90FAADE4366D12E /* Debug */, - 16D02FC5D8B1360961D0964C786FD01A /* Release */, + 0D0B0751228CE1672D4155CDC48E48F4 /* Debug */, + D24ACCB30483674C8F98FEE6781F8A91 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 249649C0D306826B8AEC43AC3D978C98 /* Build configuration list for PBXNativeTarget "SipHash-macOS" */ = { + 09CA449448E7309DBC21A6BD3E319838 /* Build configuration list for PBXNativeTarget "secp256k1_swift-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 75E16E6E94E4CDC1DF735E3C84E87DEC /* Debug */, - 9F89BA0BDBDA8C292C7AF81AE6E74193 /* Release */, + 0642CE789E80E243CAD03C3BC1721169 /* Debug */, + 57848671E21C73A121EDCE1F4B6205BD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 19CA2EF2646C88FC1D5F4864827AF9A9 /* Build configuration list for PBXNativeTarget "CryptoSwift-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 60A5DC59ABDBD8D0E90FAADE4366D12E /* Debug */, + 16D02FC5D8B1360961D0964C786FD01A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 288F5A4EECE69C1DC4494A2655035DA7 /* Build configuration list for PBXNativeTarget "secp256k1_swift-iOS" */ = { + 249649C0D306826B8AEC43AC3D978C98 /* Build configuration list for PBXNativeTarget "SipHash-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 3E7E571193D56B852F45BCA0EDE0AB9F /* Debug */, - E1CA2CF2207508268263503EC77DD1AE /* Release */, + 75E16E6E94E4CDC1DF735E3C84E87DEC /* Debug */, + 9F89BA0BDBDA8C292C7AF81AE6E74193 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2D5D9861222B1B7C6B2D720C3CE966C3 /* Build configuration list for PBXNativeTarget "SwiftRLP-macOS" */ = { + 284AECDC661FAF7860EC1BEC7692301D /* Build configuration list for PBXNativeTarget "Result-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1E97B1AEB07F9403EB119768EEC01515 /* Debug */, - 42E007BDBDF9193BF79BE95940259F6C /* Release */, + 3A052F4E8E3344EF5CE29C1EB82A8C14 /* Debug */, + 9070795000D1F467DF9FAE6D7D640250 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4631,65 +5005,65 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 47C2AA14D9BBB2B7CC5629CE1C553C1B /* Build configuration list for PBXNativeTarget "BigInt-iOS" */ = { + 303C8E6272AD70A3BDE63EE51C697D17 /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { isa = XCConfigurationList; buildConfigurations = ( - 3C9131BF8D77FFD3F3302CC9B5C5B5E6 /* Debug */, - A45B3EF7FBB166F549A4ABEE13B6CE87 /* Release */, + 4CA82ACA864529495D52E03B2D33BC1C /* Debug */, + 34FE96C4DC053075469BE4E0C218A785 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4DE4E92544E4D3852787DF5ADA292D66 /* Build configuration list for PBXNativeTarget "secp256k1_swift-macOS" */ = { + 3EF9AD5BB38D4B8D81F2E10D31B8FC16 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1BCC5A8658E49455E4C0CED34AC9A204 /* Debug */, - 1CFA5364A5C0CACA2DADD1EA40940890 /* Release */, + 47188C6950FED720E501753BF199E23B /* Debug */, + 15B89B467BEBF88DB7C0DE281DDCB2FF /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 62550B15363844675EDB2F185CB619A8 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS_Tests" */ = { + 47C2AA14D9BBB2B7CC5629CE1C553C1B /* Build configuration list for PBXNativeTarget "BigInt-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - B3F7C2C3054C9BA9D5FEAF7BBEB5B707 /* Debug */, - 83210CA27027B561A7B5E007B06CA4D7 /* Release */, + 3C9131BF8D77FFD3F3302CC9B5C5B5E6 /* Debug */, + A45B3EF7FBB166F549A4ABEE13B6CE87 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 6C6D2DEE61A644A6598FBEDB9971FD63 /* Build configuration list for PBXNativeTarget "SwiftRLP-iOS" */ = { + 62550B15363844675EDB2F185CB619A8 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4C189926243B31E7A258082A6B093BD5 /* Debug */, - 54BC1E2B4924BE327AAA74950076DC15 /* Release */, + B3F7C2C3054C9BA9D5FEAF7BBEB5B707 /* Debug */, + 83210CA27027B561A7B5E007B06CA4D7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 7605C90CA002CA15242C3D87F18484A2 /* Build configuration list for PBXNativeTarget "scrypt-iOS" */ = { + 65490D7667F9A157CAE31446FC797991 /* Build configuration list for PBXNativeTarget "secp256k1_swift-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 79E456F1CBDE8C5EE5AA38BC6C38BFE7 /* Debug */, - 6B6634FBDBCD33490C8F987986D50774 /* Release */, + 2890913C8C2255F2C5BC543B4A827893 /* Debug */, + 51D81D04D0379E038D2741ED941215DC /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 7AF19CA86BE1CDF981AE337B179CC0BF /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS" */ = { + 88E198CDBBB0CAA2D5B912F48E5A8119 /* Build configuration list for PBXNativeTarget "EthereumAddress-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1A2FBFC123A5062B1AFCD1139F813593 /* Debug */, - ED1F36CA81A4FAAC1C67B05F7E9F4498 /* Release */, + F0201DAF490AE92696849A72FDE47927 /* Debug */, + 1C87E448DBFBA3CE908FC5D7F08DE3D2 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 8F03B9047707EFF3F60AA966A45C8A4D /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { + 8B657CEEE4B76901522B282FFC7FE8DA /* Build configuration list for PBXNativeTarget "Result-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 98E0DE5497E5A27A343127F14FA1BF54 /* Debug */, - 6E0DC298E298981B18BAF87BA11542F6 /* Release */, + D33969CE1C6C7CFBA07904BEF1C4B035 /* Debug */, + 7237D3F1652E355B7101C5937B046651 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4703,11 +5077,11 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 9F771DCE26E84668F2CA6B9E87224F88 /* Build configuration list for PBXNativeTarget "Result-iOS" */ = { + 9CB97BD184404FE5F62F017C3CF306D5 /* Build configuration list for PBXNativeTarget "PromiseKit.root-CorePromise-Foundation" */ = { isa = XCConfigurationList; buildConfigurations = ( - D64511E0FB285D5E2F638DA67BB31729 /* Debug */, - C3B95632033BF4A43E88D89D986675EA /* Release */, + 9D532168CC77D42DF0462F9BCBD80F2E /* Debug */, + 999EC6E913D2F808DD5EECBDADBE2FBF /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4721,38 +5095,47 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A4CBD6E90C567ACBD75570719DB45B51 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS" */ = { + D2A09E63159C968138E6CBA9147D559A /* Build configuration list for PBXNativeTarget "SwiftRLP-macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4508C23FF6409DCFED0ED597F8011CA1 /* Debug */, + 316F6BD6837503631E1CD02ECF315A0C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D9AC1A700A507419692FC870E90C8799 /* Build configuration list for PBXNativeTarget "scrypt-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - F3FCBAAE6245C7BE73AFC4E87F57843B /* Debug */, - 858A2A341A76470B0B603B055357071F /* Release */, + E5411E931BB177D29281DC9404230DD1 /* Debug */, + 3E84B79C8DEC705D62A979F5FA5D0A9E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - B3BABA326F05564F9B29C631D85A02A9 /* Build configuration list for PBXNativeTarget "PromiseKit.root-CorePromise-Foundation" */ = { + E4CD22EC0D9A9A7E229C67906906F7A4 /* Build configuration list for PBXNativeTarget "SwiftRLP-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 637FFE214871E427F5EB980711FE27D4 /* Debug */, - 55D2064D6E41D47D3194523E7D5805CC /* Release */, + FEB6E9194937DDA3A6F6493F676E2004 /* Debug */, + DCCDA1002E48EAEF2C988A5C6EBBF971 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - C6A6186E7DE2AF444E2D9AE0184A0479 /* Build configuration list for PBXNativeTarget "Result-macOS" */ = { + EC990DC713F41C8185113CC18FD8B395 /* Build configuration list for PBXNativeTarget "scrypt-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8671873F3F1E5F1068D77E5606FD46A5 /* Debug */, - 77E92E2063F8A970CD3DF6C52F9CB0A3 /* Release */, + 5603C29AD11DB39738D16FEC45182D72 /* Debug */, + E2903A9A477CD5FC7A1AA02D234622F7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - C6C3FEF3DB3E9F8728E424120C1A0F0D /* Build configuration list for PBXNativeTarget "scrypt-macOS" */ = { + EFED2FA879D330888BF8C00E65240ADA /* Build configuration list for PBXNativeTarget "EthereumAddress-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8E915485F5B1E08FF1117FF158D60A69 /* Debug */, - 6B61E32BB5209D45BF8284B26DD646B6 /* Release */, + 8407FD653C37937082E32CEB87697C14 /* Debug */, + EAB93834CF69459E8D9F59D7D266CC6A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-dummy.m b/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-dummy.m new file mode 100644 index 000000000..4235c2b2f --- /dev/null +++ b/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_EthereumAddress_iOS : NSObject +@end +@implementation PodsDummy_EthereumAddress_iOS +@end diff --git a/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-prefix.pch b/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-prefix.pch new file mode 100644 index 000000000..beb2a2441 --- /dev/null +++ b/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-prefix.pch @@ -0,0 +1,12 @@ +#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/EthereumAddress-iOS/EthereumAddress-iOS-umbrella.h b/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-umbrella.h new file mode 100644 index 000000000..d19195a1e --- /dev/null +++ b/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "EthereumAddress.h" + +FOUNDATION_EXPORT double EthereumAddressVersionNumber; +FOUNDATION_EXPORT const unsigned char EthereumAddressVersionString[]; + diff --git a/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.modulemap b/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.modulemap new file mode 100644 index 000000000..9df80dae3 --- /dev/null +++ b/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.modulemap @@ -0,0 +1,7 @@ +module EthereumAddress { + umbrella header "EthereumAddress-iOS-umbrella.h" + exclude header "EthereumAddress-macOS-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.xcconfig b/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.xcconfig new file mode 100644 index 000000000..28d69dba6 --- /dev/null +++ b/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.xcconfig @@ -0,0 +1,13 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS +DEFINES_MODULE = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/EthereumAddress" "${PODS_ROOT}/Headers/Public" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/EthereumAddress +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" diff --git a/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-dummy.m b/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-dummy.m new file mode 100644 index 000000000..1146275e2 --- /dev/null +++ b/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_EthereumAddress_macOS : NSObject +@end +@implementation PodsDummy_EthereumAddress_macOS +@end diff --git a/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch b/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch new file mode 100644 index 000000000..082f8af22 --- /dev/null +++ b/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch @@ -0,0 +1,12 @@ +#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/EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h b/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h new file mode 100644 index 000000000..ab4ebeafa --- /dev/null +++ b/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "EthereumAddress.h" + +FOUNDATION_EXPORT double EthereumAddressVersionNumber; +FOUNDATION_EXPORT const unsigned char EthereumAddressVersionString[]; + diff --git a/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.modulemap b/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.modulemap new file mode 100644 index 000000000..3a8fe9f18 --- /dev/null +++ b/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.modulemap @@ -0,0 +1,7 @@ +module EthereumAddress { + umbrella header "EthereumAddress-macOS-umbrella.h" + exclude header "EthereumAddress-iOS-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.xcconfig b/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.xcconfig new file mode 100644 index 000000000..0a9348865 --- /dev/null +++ b/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.xcconfig @@ -0,0 +1,13 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS +DEFINES_MODULE = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/EthereumAddress" "${PODS_ROOT}/Headers/Public" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/EthereumAddress +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" diff --git a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.markdown b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.markdown index 77e7ff082..0f6b0a223 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.markdown +++ b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.markdown @@ -39,6 +39,23 @@ Permission is granted to anyone to use this software for any purpose,including c - This notice may not be removed or altered from any source or binary distribution. - Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' +## EthereumAddress + +Copyright 2018 Alex Vlasov + +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. + + ## PromiseKit Copyright 2016-present, Max Howell; mxcl@me.com diff --git a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.debug.xcconfig b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.debug.xcconfig index 4c856d5b8..fcd73c87e 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.debug.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.debug.xcconfig @@ -1,11 +1,11 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-iOS" -l"CryptoSwift-iOS" -l"PromiseKit" -l"Result-iOS" -l"SipHash-iOS" -l"SwiftRLP-iOS" -l"scrypt-iOS" -l"secp256k1_swift-iOS" -framework "Foundation" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" +OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-iOS" -l"CryptoSwift-iOS" -l"EthereumAddress-iOS" -l"PromiseKit" -l"Result-iOS" -l"SipHash-iOS" -l"SwiftRLP-iOS" -l"scrypt-iOS" -l"secp256k1_swift-iOS" -framework "Foundation" -framework "UIKit" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" $(PODS_TARGET_SRCROOT)/scrypt +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" $(PODS_TARGET_SRCROOT)/scrypt diff --git a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.release.xcconfig b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.release.xcconfig index 4c856d5b8..fcd73c87e 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.release.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.release.xcconfig @@ -1,11 +1,11 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-iOS" -l"CryptoSwift-iOS" -l"PromiseKit" -l"Result-iOS" -l"SipHash-iOS" -l"SwiftRLP-iOS" -l"scrypt-iOS" -l"secp256k1_swift-iOS" -framework "Foundation" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" +OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-iOS" -l"CryptoSwift-iOS" -l"EthereumAddress-iOS" -l"PromiseKit" -l"Result-iOS" -l"SipHash-iOS" -l"SwiftRLP-iOS" -l"scrypt-iOS" -l"secp256k1_swift-iOS" -framework "Foundation" -framework "UIKit" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" $(PODS_TARGET_SRCROOT)/scrypt +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" $(PODS_TARGET_SRCROOT)/scrypt diff --git a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.debug.xcconfig b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.debug.xcconfig index 76d174683..b0625230f 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.debug.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.debug.xcconfig @@ -1,10 +1,10 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" diff --git a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.release.xcconfig b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.release.xcconfig index 76d174683..b0625230f 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.release.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.release.xcconfig @@ -1,10 +1,10 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" diff --git a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.markdown b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.markdown index 77e7ff082..0f6b0a223 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.markdown +++ b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.markdown @@ -39,6 +39,23 @@ Permission is granted to anyone to use this software for any purpose,including c - This notice may not be removed or altered from any source or binary distribution. - Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' +## EthereumAddress + +Copyright 2018 Alex Vlasov + +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. + + ## PromiseKit Copyright 2016-present, Max Howell; mxcl@me.com diff --git a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig index 4a27f3b2c..22e0383cb 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig @@ -1,11 +1,11 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-macOS" -l"CryptoSwift-macOS" -l"PromiseKit.root-CorePromise-Foundation" -l"Result-macOS" -l"SipHash-macOS" -l"SwiftRLP-macOS" -l"scrypt-macOS" -l"secp256k1_swift-macOS" -framework "Foundation" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" +OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-macOS" -l"CryptoSwift-macOS" -l"EthereumAddress-macOS" -l"PromiseKit.root-CorePromise-Foundation" -l"Result-macOS" -l"SipHash-macOS" -l"SwiftRLP-macOS" -l"scrypt-macOS" -l"secp256k1_swift-macOS" -framework "Foundation" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" $(PODS_TARGET_SRCROOT)/scrypt +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" $(PODS_TARGET_SRCROOT)/scrypt diff --git a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig index 4a27f3b2c..22e0383cb 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig @@ -1,11 +1,11 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-macOS" -l"CryptoSwift-macOS" -l"PromiseKit.root-CorePromise-Foundation" -l"Result-macOS" -l"SipHash-macOS" -l"SwiftRLP-macOS" -l"scrypt-macOS" -l"secp256k1_swift-macOS" -framework "Foundation" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" +OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-macOS" -l"CryptoSwift-macOS" -l"EthereumAddress-macOS" -l"PromiseKit.root-CorePromise-Foundation" -l"Result-macOS" -l"SipHash-macOS" -l"SwiftRLP-macOS" -l"scrypt-macOS" -l"secp256k1_swift-macOS" -framework "Foundation" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" $(PODS_TARGET_SRCROOT)/scrypt +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" $(PODS_TARGET_SRCROOT)/scrypt diff --git a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.debug.xcconfig b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.debug.xcconfig index 6f83ba19c..2063b1f6d 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.debug.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.debug.xcconfig @@ -1,10 +1,10 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" diff --git a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.release.xcconfig b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.release.xcconfig index 6f83ba19c..2063b1f6d 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.release.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.release.xcconfig @@ -1,10 +1,10 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" diff --git a/web3swift.xcodeproj/project.pbxproj b/web3swift.xcodeproj/project.pbxproj index cb446b57e..0dc328d16 100755 --- a/web3swift.xcodeproj/project.pbxproj +++ b/web3swift.xcodeproj/project.pbxproj @@ -28,7 +28,6 @@ 41948125203630530065A83B /* Web3+Methods.swift in Sources */ = {isa = PBXBuildFile; fileRef = 810B0F9B1FEC520500CF0DA2 /* Web3+Methods.swift */; }; 41948126203630530065A83B /* Web3+Eth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 810B0F9D1FEC5B9C00CF0DA2 /* Web3+Eth.swift */; }; 4194812C203630530065A83B /* KeystoreManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8113D2B81FD7E1590074282C /* KeystoreManager.swift */; }; - 4194812D203630530065A83B /* EthereumAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 817EBB0F2004FE2800E02EAA /* EthereumAddress.swift */; }; 4194812E203630530065A83B /* AbstractKeystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 817EBB2420066E2B00E02EAA /* AbstractKeystore.swift */; }; 41948130203630530065A83B /* BIP32Keystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 815630012007B53C00A0EC2F /* BIP32Keystore.swift */; }; 41948131203630530065A83B /* BIP32KeystoreJSONStructure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81562FFF2007B48800A0EC2F /* BIP32KeystoreJSONStructure.swift */; }; @@ -81,7 +80,6 @@ 815C74C820ECBF3E00DE2AC4 /* web3swift_User_cases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 815C74C720ECBF3E00DE2AC4 /* web3swift_User_cases.swift */; }; 8160E5CE20B8245A0070070B /* IBAN.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8160E5CD20B8245A0070070B /* IBAN.swift */; }; 8160E5CF20B8245A0070070B /* IBAN.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8160E5CD20B8245A0070070B /* IBAN.swift */; }; - 817EBB102004FE2800E02EAA /* EthereumAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 817EBB0F2004FE2800E02EAA /* EthereumAddress.swift */; }; 817EBB122004FE2F00E02EAA /* BIP32HDNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 817EBB112004FE2F00E02EAA /* BIP32HDNode.swift */; }; 817EBB162004FE4200E02EAA /* Web3+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 817EBB142004FE4200E02EAA /* Web3+HttpProvider.swift */; }; 817EBB1F2006265400E02EAA /* Base58.swift in Sources */ = {isa = PBXBuildFile; fileRef = 817EBB1E2006265400E02EAA /* Base58.swift */; }; @@ -293,7 +291,6 @@ 8159C50D2135901700197B91 /* web3swift_ERC20_Class_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_ERC20_Class_Tests.swift; sourceTree = ""; }; 815C74C720ECBF3E00DE2AC4 /* web3swift_User_cases.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_User_cases.swift; sourceTree = ""; }; 8160E5CD20B8245A0070070B /* IBAN.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IBAN.swift; sourceTree = ""; }; - 817EBB0F2004FE2800E02EAA /* EthereumAddress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EthereumAddress.swift; sourceTree = ""; }; 817EBB112004FE2F00E02EAA /* BIP32HDNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BIP32HDNode.swift; sourceTree = ""; }; 817EBB142004FE4200E02EAA /* Web3+HttpProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Web3+HttpProvider.swift"; sourceTree = ""; }; 817EBB1E2006265400E02EAA /* Base58.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Base58.swift; sourceTree = ""; }; @@ -564,7 +561,6 @@ children = ( 817EBB2420066E2B00E02EAA /* AbstractKeystore.swift */, 8113D2B81FD7E1590074282C /* KeystoreManager.swift */, - 817EBB0F2004FE2800E02EAA /* EthereumAddress.swift */, 815630012007B53C00A0EC2F /* BIP32Keystore.swift */, 81562FFF2007B48800A0EC2F /* BIP32KeystoreJSONStructure.swift */, 817EBB112004FE2F00E02EAA /* BIP32HDNode.swift */, @@ -1108,7 +1104,6 @@ 81D7D97220A31FB700A193EC /* ComparisonExtensions.swift in Sources */, 817EBB27200673D100E02EAA /* KeystoreV3JSONStructure.swift in Sources */, 81C5DA11207254F600424CD6 /* ABIv2.swift in Sources */, - 817EBB102004FE2800E02EAA /* EthereumAddress.swift in Sources */, 81FB21FE207BB297007F9A83 /* EIP67Code.swift in Sources */, 81A1821A20D5A6F70016741F /* Promise+HttpProvider.swift in Sources */, 81A1823720D6E2BB0016741F /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */, @@ -1234,7 +1229,6 @@ 81A1823E20D79C2C0016741F /* Promise+Web3+Eth+SendRawTransaction.swift in Sources */, 81A1823D20D79C290016741F /* Promise+Web3+Eth+Call.swift in Sources */, 81C5DA12207254F600424CD6 /* ABIv2.swift in Sources */, - 4194812D203630530065A83B /* EthereumAddress.swift in Sources */, 81FB21FF207BB297007F9A83 /* EIP67Code.swift in Sources */, 81C5DA0F207254D000424CD6 /* ABIv2Elements.swift in Sources */, 81A1821B20D5A6F80016741F /* Promise+HttpProvider.swift in Sources */, diff --git a/web3swift/ABIv2/Classes/ABIv2Decoding.swift b/web3swift/ABIv2/Classes/ABIv2Decoding.swift index f5cb4badc..2b451cb24 100755 --- a/web3swift/ABIv2/Classes/ABIv2Decoding.swift +++ b/web3swift/ABIv2/Classes/ABIv2Decoding.swift @@ -8,6 +8,7 @@ import Foundation import BigInt +import EthereumAddress public struct ABIv2Decoder { diff --git a/web3swift/ABIv2/Classes/ABIv2Encoding.swift b/web3swift/ABIv2/Classes/ABIv2Encoding.swift index c24b8c5a2..a8feaff54 100755 --- a/web3swift/ABIv2/Classes/ABIv2Encoding.swift +++ b/web3swift/ABIv2/Classes/ABIv2Encoding.swift @@ -8,6 +8,7 @@ import Foundation import BigInt +import EthereumAddress public struct ABIv2Encoder { diff --git a/web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift b/web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift index 72e0c495a..21248cca6 100755 --- a/web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift +++ b/web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift @@ -8,6 +8,7 @@ import Foundation import BigInt +import EthereumAddress extension ABIv2.Element { diff --git a/web3swift/Contract/Classes/ComparisonExtensions.swift b/web3swift/Contract/Classes/ComparisonExtensions.swift index 6c2bdead7..a0a72f018 100755 --- a/web3swift/Contract/Classes/ComparisonExtensions.swift +++ b/web3swift/Contract/Classes/ComparisonExtensions.swift @@ -8,6 +8,7 @@ import Foundation import BigInt +import EthereumAddress extension BigUInt: EventFilterComparable { public func isEqualTo(_ other: AnyObject) -> Bool { diff --git a/web3swift/Contract/Classes/ContractABIv2.swift b/web3swift/Contract/Classes/ContractABIv2.swift index 8526e7324..cc4665610 100755 --- a/web3swift/Contract/Classes/ContractABIv2.swift +++ b/web3swift/Contract/Classes/ContractABIv2.swift @@ -8,6 +8,7 @@ import Foundation import BigInt +import EthereumAddress public struct ContractV2:ContractProtocol { diff --git a/web3swift/Contract/Classes/ContractProtocol.swift b/web3swift/Contract/Classes/ContractProtocol.swift index 7a33479d9..3c5849630 100755 --- a/web3swift/Contract/Classes/ContractProtocol.swift +++ b/web3swift/Contract/Classes/ContractProtocol.swift @@ -8,6 +8,7 @@ import Foundation import BigInt +import EthereumAddress public protocol ContractProtocol { var address: EthereumAddress? {get set} diff --git a/web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift b/web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift index 61eab4d48..8abf520b1 100755 --- a/web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift +++ b/web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift @@ -8,6 +8,7 @@ import Foundation import BigInt +import EthereumAddress extension BigUInt: EventFilterEncodable { public func eventFilterEncoded() -> String? { diff --git a/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift b/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift index 3c3603d2f..008c2e8bb 100755 --- a/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift +++ b/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift @@ -9,6 +9,7 @@ import Foundation import BigInt import secp256k1_swift +import EthereumAddress extension web3.BrowserFunctions { diff --git a/web3swift/HookedFunctions/Classes/Web3+Wallet.swift b/web3swift/HookedFunctions/Classes/Web3+Wallet.swift index 49ce41dbd..bee0783c2 100755 --- a/web3swift/HookedFunctions/Classes/Web3+Wallet.swift +++ b/web3swift/HookedFunctions/Classes/Web3+Wallet.swift @@ -8,6 +8,7 @@ import Foundation import BigInt import Result +import EthereumAddress extension web3.Web3Wallet { diff --git a/web3swift/KeystoreManager/Classes/AbstractKeystore.swift b/web3swift/KeystoreManager/Classes/AbstractKeystore.swift index e755b208e..9912f4f48 100755 --- a/web3swift/KeystoreManager/Classes/AbstractKeystore.swift +++ b/web3swift/KeystoreManager/Classes/AbstractKeystore.swift @@ -7,6 +7,7 @@ // import Foundation +import EthereumAddress public typealias TransactionIntermediate = web3.web3contract.TransactionIntermediate diff --git a/web3swift/KeystoreManager/Classes/BIP32Keystore.swift b/web3swift/KeystoreManager/Classes/BIP32Keystore.swift index 35c5732e9..a88460346 100755 --- a/web3swift/KeystoreManager/Classes/BIP32Keystore.swift +++ b/web3swift/KeystoreManager/Classes/BIP32Keystore.swift @@ -9,7 +9,7 @@ import Foundation import CryptoSwift import Foundation - +import EthereumAddress public class BIP32Keystore: AbstractKeystore { // Protocol diff --git a/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift b/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift index 08accb764..dcbf23d14 100755 --- a/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift +++ b/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift @@ -10,6 +10,7 @@ import Foundation import CryptoSwift import Foundation import secp256k1_swift +import EthereumAddress public class EthereumKeystoreV3: AbstractKeystore { // Class diff --git a/web3swift/KeystoreManager/Classes/IBAN.swift b/web3swift/KeystoreManager/Classes/IBAN.swift index 314b91fdd..de39ef368 100755 --- a/web3swift/KeystoreManager/Classes/IBAN.swift +++ b/web3swift/KeystoreManager/Classes/IBAN.swift @@ -8,6 +8,7 @@ import Foundation import BigInt +import EthereumAddress public struct ICAP { public var asset: String diff --git a/web3swift/KeystoreManager/Classes/KeystoreManager.swift b/web3swift/KeystoreManager/Classes/KeystoreManager.swift index 1da69d1b4..d722e33fc 100755 --- a/web3swift/KeystoreManager/Classes/KeystoreManager.swift +++ b/web3swift/KeystoreManager/Classes/KeystoreManager.swift @@ -7,6 +7,7 @@ // import Foundation +import EthereumAddress public class KeystoreManager: AbstractKeystore { public var isHDKeystore: Bool = false diff --git a/web3swift/KeystoreManager/Classes/PlainKeystore.swift b/web3swift/KeystoreManager/Classes/PlainKeystore.swift index 729d6ad28..3cd2937fc 100755 --- a/web3swift/KeystoreManager/Classes/PlainKeystore.swift +++ b/web3swift/KeystoreManager/Classes/PlainKeystore.swift @@ -9,6 +9,8 @@ import Foundation import secp256k1_swift +import EthereumAddress + public class PlainKeystore: AbstractKeystore { private var privateKey: Data diff --git a/web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift b/web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift index d03bc832c..9ae1dd23d 100755 --- a/web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift +++ b/web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift @@ -7,6 +7,7 @@ // import Foundation +import EthereumAddress @objc(EthereumAddress) public final class _ObjCEthereumAddress: NSObject{ diff --git a/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift b/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift index 6d74f2f88..4e07319da 100644 --- a/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift +++ b/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift @@ -9,6 +9,7 @@ import Foundation import BigInt import Result +import EthereumAddress // This namespace contains functions to work with ERC20 tokens. // variables are lazyly evaluated or global token information (name, ticker, total supply) diff --git a/web3swift/PrecompiledContracts/ERC721/Web3+ERC721.swift b/web3swift/PrecompiledContracts/ERC721/Web3+ERC721.swift index 17b14a4c2..03662a9e5 100644 --- a/web3swift/PrecompiledContracts/ERC721/Web3+ERC721.swift +++ b/web3swift/PrecompiledContracts/ERC721/Web3+ERC721.swift @@ -9,6 +9,7 @@ import Foundation import BigInt import Result +import EthereumAddress // This namespace contains functions to work with ERC721 tokens. // can be imperatively read and saved diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift index eadac28a6..7a067e285 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift @@ -9,6 +9,7 @@ import Foundation import BigInt import PromiseKit +import EthereumAddress extension web3.Eth { public func getAccountsPromise() -> Promise<[EthereumAddress]> { diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift index 6d8271e27..12bccd559 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift @@ -9,6 +9,7 @@ import Foundation import PromiseKit import BigInt +import EthereumAddress extension web3.Eth { public func getBalancePromise(address: EthereumAddress, onBlock: String = "latest") -> Promise { diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift index 0ed83e186..60cdfbb57 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift @@ -9,6 +9,7 @@ import Foundation import BigInt import PromiseKit +import EthereumAddress extension web3.Eth { public func getTransactionCountPromise(address: EthereumAddress, onBlock: String = "latest") -> Promise { diff --git a/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift b/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift index 552c3f266..163dbfdac 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift @@ -9,6 +9,7 @@ import Foundation import BigInt import PromiseKit +import EthereumAddress extension web3.Personal { diff --git a/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift b/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift index ceed0c8e6..c1b6cd470 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift @@ -9,6 +9,7 @@ import Foundation import BigInt import PromiseKit +import EthereumAddress extension web3.Personal { func unlockAccountPromise(account: EthereumAddress, password:String = "web3swift", seconds: UInt64 = 300) -> Promise { diff --git a/web3swift/Transaction/Classes/BloomFilter.swift b/web3swift/Transaction/Classes/BloomFilter.swift index d84b782db..cb0938e3b 100755 --- a/web3swift/Transaction/Classes/BloomFilter.swift +++ b/web3swift/Transaction/Classes/BloomFilter.swift @@ -9,6 +9,7 @@ import Foundation import BigInt import CryptoSwift +import EthereumAddress public struct EthereumBloomFilter{ public var bytes = Data(repeatElement(UInt8(0), count: 256)) diff --git a/web3swift/Transaction/Classes/EthereumTransaction.swift b/web3swift/Transaction/Classes/EthereumTransaction.swift index 48a419983..5d55d99e2 100755 --- a/web3swift/Transaction/Classes/EthereumTransaction.swift +++ b/web3swift/Transaction/Classes/EthereumTransaction.swift @@ -10,6 +10,7 @@ import Foundation import BigInt import SwiftRLP import secp256k1_swift +import EthereumAddress public struct EthereumTransaction: CustomStringConvertible { public var nonce: BigUInt diff --git a/web3swift/Transaction/Classes/TransactionSigner.swift b/web3swift/Transaction/Classes/TransactionSigner.swift index 12439ef0d..8a4878ce4 100755 --- a/web3swift/Transaction/Classes/TransactionSigner.swift +++ b/web3swift/Transaction/Classes/TransactionSigner.swift @@ -10,6 +10,7 @@ import Foundation import Result import BigInt import secp256k1_swift +import EthereumAddress public enum TransactionSignerError: Error { case signatureError(String) diff --git a/web3swift/Utils/Classes/EIP67Code.swift b/web3swift/Utils/Classes/EIP67Code.swift index e7ab8c394..63320ad91 100755 --- a/web3swift/Utils/Classes/EIP67Code.swift +++ b/web3swift/Utils/Classes/EIP67Code.swift @@ -9,6 +9,7 @@ import Foundation import CoreImage import BigInt +import EthereumAddress extension Web3 { diff --git a/web3swift/Utils/Classes/EIP681.swift b/web3swift/Utils/Classes/EIP681.swift index f0b20a6e5..e60ce5055 100644 --- a/web3swift/Utils/Classes/EIP681.swift +++ b/web3swift/Utils/Classes/EIP681.swift @@ -8,6 +8,7 @@ import Foundation import BigInt +import EthereumAddress extension Web3 { diff --git a/web3swift/Utils/Classes/ENS.swift b/web3swift/Utils/Classes/ENS.swift index c326c7739..07047edd7 100644 --- a/web3swift/Utils/Classes/ENS.swift +++ b/web3swift/Utils/Classes/ENS.swift @@ -6,6 +6,7 @@ import Foundation import BigInt import Result +import EthereumAddress public class ENS { diff --git a/web3swift/Utils/Classes/ENSResolver.swift b/web3swift/Utils/Classes/ENSResolver.swift index 18b4af41b..37ca5066b 100644 --- a/web3swift/Utils/Classes/ENSResolver.swift +++ b/web3swift/Utils/Classes/ENSResolver.swift @@ -9,6 +9,7 @@ import Foundation import BigInt import Result +import EthereumAddress public struct ResolverENS { let web3: web3 diff --git a/web3swift/Web3/Classes/Web3+Contract.swift b/web3swift/Web3/Classes/Web3+Contract.swift index 4ff94023d..aefe0d6cd 100755 --- a/web3swift/Web3/Classes/Web3+Contract.swift +++ b/web3swift/Web3/Classes/Web3+Contract.swift @@ -8,6 +8,7 @@ import Foundation import BigInt +import EthereumAddress extension web3 { diff --git a/web3swift/Web3/Classes/Web3+Eth.swift b/web3swift/Web3/Classes/Web3+Eth.swift index dcc02e2e9..8e6e85f5d 100755 --- a/web3swift/Web3/Classes/Web3+Eth.swift +++ b/web3swift/Web3/Classes/Web3+Eth.swift @@ -9,6 +9,7 @@ import Foundation import BigInt import Result +import EthereumAddress extension web3.Eth { diff --git a/web3swift/Web3/Classes/Web3+JSONRPC.swift b/web3swift/Web3/Classes/Web3+JSONRPC.swift index 3ed53576c..7af3121be 100755 --- a/web3swift/Web3/Classes/Web3+JSONRPC.swift +++ b/web3swift/Web3/Classes/Web3+JSONRPC.swift @@ -8,6 +8,7 @@ import Foundation import BigInt +import EthereumAddress /// Global counter object to enumerate JSON RPC requests. public struct Counter { diff --git a/web3swift/Web3/Classes/Web3+Options.swift b/web3swift/Web3/Classes/Web3+Options.swift index dfd353b5d..88b8028a9 100755 --- a/web3swift/Web3/Classes/Web3+Options.swift +++ b/web3swift/Web3/Classes/Web3+Options.swift @@ -8,6 +8,7 @@ import Foundation import BigInt +import EthereumAddress public protocol Web3OptionsInheritable { var options: Web3Options {get} diff --git a/web3swift/Web3/Classes/Web3+Personal.swift b/web3swift/Web3/Classes/Web3+Personal.swift index 47b0aea7e..af3b7f1be 100755 --- a/web3swift/Web3/Classes/Web3+Personal.swift +++ b/web3swift/Web3/Classes/Web3+Personal.swift @@ -9,6 +9,7 @@ import Foundation import BigInt import Result +import EthereumAddress extension web3.Personal { diff --git a/web3swift/Web3/Classes/Web3+Protocols.swift b/web3swift/Web3/Classes/Web3+Protocols.swift index 47f9c4f21..18cb29645 100755 --- a/web3swift/Web3/Classes/Web3+Protocols.swift +++ b/web3swift/Web3/Classes/Web3+Protocols.swift @@ -10,6 +10,7 @@ import Foundation import BigInt import Result import class PromiseKit.Promise +import EthereumAddress /// Protocol for generic Ethereum event parsing results public protocol EventParserResultProtocol { diff --git a/web3swift/Web3/Classes/Web3+Structures.swift b/web3swift/Web3/Classes/Web3+Structures.swift index 183ec7f29..09e4f561b 100755 --- a/web3swift/Web3/Classes/Web3+Structures.swift +++ b/web3swift/Web3/Classes/Web3+Structures.swift @@ -7,6 +7,7 @@ import Foundation import BigInt +import EthereumAddress fileprivate func decodeHexToData(_ container: KeyedDecodingContainer, key: KeyedDecodingContainer.Key, allowOptional:Bool = false) throws -> Data? { if (allowOptional) { diff --git a/web3swift/Web3/Classes/Web3+Utils.swift b/web3swift/Web3/Classes/Web3+Utils.swift index 9c7e67509..c94185dcd 100755 --- a/web3swift/Web3/Classes/Web3+Utils.swift +++ b/web3swift/Web3/Classes/Web3+Utils.swift @@ -11,6 +11,7 @@ import BigInt import CryptoSwift import SwiftRLP import secp256k1_swift +import EthereumAddress public typealias Web3Utils = Web3.Utils From 3e90f67273ccb630fd0166364e451b410471ab9d Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Mon, 29 Oct 2018 20:59:14 +0300 Subject: [PATCH 06/23] - Remove "Result" - Switch from Web3Options to more native structure - Change from "TransactionIntermediate" to "ReadTransaction" and "WriteTransaction" --- Podfile | 3 +- Podfile.lock | 13 +- .../EthereumABI/EthereumABI/Classes/ABI.swift | 28 + .../EthereumABI/Classes/ABIDecoding.swift | 37 +- .../EthereumABI/Classes/ABIElements.swift | 152 +- .../EthereumABI/Classes/ABIEncoding.swift | 19 +- .../EthereumABI/Classes/ABIExtensions.swift | 271 + .../Classes/ABIParameterTypes.swift | 27 +- .../EthereumABI/Classes/ABIParsing.swift | 105 +- .../EthereumABI/Classes/ABITypeParser.swift | 33 +- Pods/EthereumABI/EthereumABI/EthereumABI.h | 23 + Pods/EthereumABI/LICENSE | 13 + Pods/EthereumABI/README.md | 3 + .../Headers/Private/EthereumABI/EthereumABI.h | 1 + .../Public/BigInt/BigInt-iOS-umbrella.h | 2 +- .../Public/BigInt/BigInt-iOS.modulemap | 2 +- .../Public/BigInt/BigInt-macOS-umbrella.h | 2 +- .../Public/BigInt/BigInt-macOS.modulemap | 2 +- .../CryptoSwift/CryptoSwift-iOS-umbrella.h | 2 +- .../CryptoSwift/CryptoSwift-iOS.modulemap | 2 +- .../CryptoSwift/CryptoSwift-macOS-umbrella.h | 2 +- .../CryptoSwift/CryptoSwift-macOS.modulemap | 2 +- .../EthereumABI/EthereumABI-iOS-umbrella.h | 1 + .../EthereumABI/EthereumABI-iOS.modulemap | 1 + .../EthereumABI/EthereumABI-macOS-umbrella.h | 1 + .../EthereumABI/EthereumABI-macOS.modulemap | 1 + Pods/Headers/Public/EthereumABI/EthereumABI.h | 1 + .../EthereumAddress-iOS-umbrella.h | 2 +- .../EthereumAddress-iOS.modulemap | 2 +- .../EthereumAddress-macOS-umbrella.h | 2 +- .../EthereumAddress-macOS.modulemap | 2 +- .../Public/PromiseKit/PromiseKit-umbrella.h | 2 +- .../Public/PromiseKit/PromiseKit.modulemap | 2 +- ...Kit.root-CorePromise-Foundation-umbrella.h | 2 +- ...eKit.root-CorePromise-Foundation.modulemap | 2 +- .../Public/Result/Result-iOS-umbrella.h | 2 +- .../Public/Result/Result-iOS.modulemap | 2 +- .../Public/Result/Result-macOS-umbrella.h | 2 +- .../Public/Result/Result-macOS.modulemap | 2 +- .../Public/SipHash/SipHash-iOS-umbrella.h | 2 +- .../Public/SipHash/SipHash-iOS.modulemap | 2 +- .../Public/SipHash/SipHash-macOS-umbrella.h | 2 +- .../Public/SipHash/SipHash-macOS.modulemap | 2 +- .../Public/SwiftRLP/SwiftRLP-iOS-umbrella.h | 2 +- .../Public/SwiftRLP/SwiftRLP-iOS.modulemap | 2 +- .../Public/SwiftRLP/SwiftRLP-macOS-umbrella.h | 2 +- .../Public/SwiftRLP/SwiftRLP-macOS.modulemap | 2 +- .../Public/scrypt/scrypt-iOS-umbrella.h | 2 +- .../Public/scrypt/scrypt-iOS.modulemap | 2 +- .../Public/scrypt/scrypt-macOS-umbrella.h | 2 +- .../Public/scrypt/scrypt-macOS.modulemap | 2 +- .../secp256k1_swift-iOS-umbrella.h | 2 +- .../secp256k1_swift-iOS.modulemap | 2 +- .../secp256k1_swift-macOS-umbrella.h | 2 +- .../secp256k1_swift-macOS.modulemap | 2 +- Pods/Manifest.lock | 13 +- Pods/Pods.xcodeproj/project.pbxproj | 5502 +++++++++-------- .../EthereumABI-iOS/EthereumABI-iOS-dummy.m | 5 + .../EthereumABI-iOS-prefix.pch | 12 + .../EthereumABI-iOS-umbrella.h | 17 + .../EthereumABI-iOS/EthereumABI-iOS.modulemap | 7 + .../EthereumABI-iOS/EthereumABI-iOS.xcconfig | 13 + .../EthereumABI-macOS-dummy.m | 5 + .../EthereumABI-macOS-prefix.pch | 12 + .../EthereumABI-macOS-umbrella.h | 17 + .../EthereumABI-macOS.modulemap | 7 + .../EthereumABI-macOS.xcconfig | 13 + ...ds-web3swift-iOS-acknowledgements.markdown | 17 + .../Pods-web3swift-iOS-acknowledgements.plist | 282 +- .../Pods-web3swift-iOS.debug.xcconfig | 12 +- .../Pods-web3swift-iOS.release.xcconfig | 12 +- ...web3swift-iOS_Tests-acknowledgements.plist | 26 +- .../Pods-web3swift-iOS_Tests.debug.xcconfig | 8 +- .../Pods-web3swift-iOS_Tests.release.xcconfig | 8 +- ...-web3swift-macOS-acknowledgements.markdown | 17 + ...ods-web3swift-macOS-acknowledgements.plist | 282 +- .../Pods-web3swift-macOS.debug.xcconfig | 12 +- .../Pods-web3swift-macOS.release.xcconfig | 12 +- ...b3swift-macOS_Tests-acknowledgements.plist | 26 +- .../Pods-web3swift-macOS_Tests.debug.xcconfig | 8 +- ...ods-web3swift-macOS_Tests.release.xcconfig | 8 +- web3swift.podspec | 9 +- web3swift.xcodeproj/project.pbxproj | 156 +- web3swift/ABIv2/Classes/ABIv2.swift | 31 - .../Contract/Classes/ContractProtocol.swift | 8 +- ...ractABIv2.swift => EthereumContract.swift} | 193 +- .../Contract/Classes/EventFiltering.swift | 7 +- .../Classes/Web3+BrowserFunctions.swift | 9 +- .../Classes/AbstractKeystore.swift | 3 - .../Classes/Promise+Web3+Eth+Call.swift | 4 +- .../Promise+Web3+Eth+EstimateGas.swift | 4 +- .../Promise+Web3+Eth+SendTransaction.swift | 31 +- .../Classes/Promise+Web3+TxPool.swift | 1 - .../Classes/EthereumTransaction.swift | 8 +- .../Classes/TransactionSigner.swift | 10 +- web3swift/Utils/Classes/EIP67Code.swift | 3 +- web3swift/Utils/Classes/EIP681.swift | 36 +- web3swift/Web3/Classes/Web3+Contract.swift | 50 +- web3swift/Web3/Classes/Web3+Eth.swift | 492 +- web3swift/Web3/Classes/Web3+EventParser.swift | 13 +- web3swift/Web3/Classes/Web3+Eventloop.swift | 11 + .../Web3/Classes/Web3+HttpProvider.swift | 6 +- web3swift/Web3/Classes/Web3+Infura.swift | 6 +- web3swift/Web3/Classes/Web3+Instance.swift | 51 +- web3swift/Web3/Classes/Web3+JSONRPC.swift | 6 +- web3swift/Web3/Classes/Web3+Methods.swift | 6 +- .../Classes/Web3+MutatingTransaction.swift | 142 + web3swift/Web3/Classes/Web3+Options.swift | 199 +- web3swift/Web3/Classes/Web3+Personal.swift | 6 +- web3swift/Web3/Classes/Web3+Protocols.swift | 8 +- .../Classes/Web3+ReadingTransaction.swift | 84 + web3swift/Web3/Classes/Web3+Structures.swift | 7 +- .../Web3+TransactionIntermediate.swift | 60 +- web3swift/Web3/Classes/Web3+TxPool.swift | 9 +- web3swift/Web3/Classes/Web3+Utils.swift | 6 +- web3swift/Web3/Classes/Web3.swift | 6 +- web3swiftTests/web3swift_ABI_Tests.swift | 368 -- 117 files changed, 5276 insertions(+), 3931 deletions(-) create mode 100755 Pods/EthereumABI/EthereumABI/Classes/ABI.swift rename web3swift/ABIv2/Classes/ABIv2Decoding.swift => Pods/EthereumABI/EthereumABI/Classes/ABIDecoding.swift (90%) rename web3swift/ABIv2/Classes/ABIv2Elements.swift => Pods/EthereumABI/EthereumABI/Classes/ABIElements.swift (54%) rename web3swift/ABIv2/Classes/ABIv2Encoding.swift => Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift (96%) create mode 100644 Pods/EthereumABI/EthereumABI/Classes/ABIExtensions.swift rename web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift => Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift (90%) rename web3swift/ABIv2/Classes/ABIv2Parsing.swift => Pods/EthereumABI/EthereumABI/Classes/ABIParsing.swift (50%) rename web3swift/ABIv2/Classes/ABIv2TypeParser.swift => Pods/EthereumABI/EthereumABI/Classes/ABITypeParser.swift (72%) create mode 100644 Pods/EthereumABI/EthereumABI/EthereumABI.h create mode 100644 Pods/EthereumABI/LICENSE create mode 100644 Pods/EthereumABI/README.md create mode 120000 Pods/Headers/Private/EthereumABI/EthereumABI.h create mode 120000 Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h create mode 120000 Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap create mode 120000 Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h create mode 120000 Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap create mode 120000 Pods/Headers/Public/EthereumABI/EthereumABI.h create mode 100644 Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-dummy.m create mode 100644 Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-prefix.pch create mode 100644 Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-umbrella.h create mode 100644 Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.modulemap create mode 100644 Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.xcconfig create mode 100644 Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-dummy.m create mode 100644 Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-prefix.pch create mode 100644 Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-umbrella.h create mode 100644 Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.modulemap create mode 100644 Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.xcconfig delete mode 100755 web3swift/ABIv2/Classes/ABIv2.swift rename web3swift/Contract/Classes/{ContractABIv2.swift => EthereumContract.swift} (51%) create mode 100644 web3swift/Web3/Classes/Web3+Eventloop.swift create mode 100644 web3swift/Web3/Classes/Web3+MutatingTransaction.swift create mode 100644 web3swift/Web3/Classes/Web3+ReadingTransaction.swift delete mode 100755 web3swiftTests/web3swift_ABI_Tests.swift diff --git a/Podfile b/Podfile index 55a134971..0fe39d88b 100755 --- a/Podfile +++ b/Podfile @@ -2,11 +2,12 @@ def import_pods pod 'scrypt', '~> 2.0' pod "PromiseKit", "~> 6.4.1" pod 'BigInt', '~> 3.1' - pod 'CryptoSwift', '~> 0.12' + pod 'CryptoSwift', '~> 0.13' pod 'Result', '~> 4.0' pod 'secp256k1_swift', '~> 1.0.3', :modular_headers => true pod 'SwiftRLP', '~> 1.1' pod 'EthereumAddress', '~> 1.0.0' + pod 'EthereumABI', '~>1.1.1' end target 'web3swift-macOS' do diff --git a/Podfile.lock b/Podfile.lock index bd8f6bf62..c66bc7947 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -2,6 +2,10 @@ PODS: - BigInt (3.1.0): - SipHash (~> 1.2) - CryptoSwift (0.13.0) + - EthereumABI (1.1.1): + - BigInt (~> 3.1) + - CryptoSwift (~> 0.13) + - EthereumAddress (~> 1.0.0) - EthereumAddress (1.0.0): - CryptoSwift (~> 0.13) - PromiseKit (6.4.1): @@ -23,7 +27,8 @@ PODS: DEPENDENCIES: - BigInt (~> 3.1) - - CryptoSwift (~> 0.12) + - CryptoSwift (~> 0.13) + - EthereumABI (~> 1.1.1) - EthereumAddress (~> 1.0.0) - PromiseKit (~> 6.4.1) - Result (~> 4.0) @@ -35,6 +40,7 @@ SPEC REPOS: https://github.com/cocoapods/specs.git: - BigInt - CryptoSwift + - EthereumABI - EthereumAddress - PromiseKit - Result @@ -46,6 +52,7 @@ SPEC REPOS: SPEC CHECKSUMS: BigInt: 76b5dfdfa3e2e478d4ffdf161aeede5502e2742f CryptoSwift: 16e78bebf567bad1c87b2d58f6547f25b74c31aa + EthereumABI: f040f5429e5a4366d028c88b88d9441e137593af EthereumAddress: f476e1320dca3a0024431e713ede7a09c7eb7796 PromiseKit: 4c76a6506638034e3d7bede97b2ff7743f7bd2dc Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713 @@ -54,6 +61,6 @@ SPEC CHECKSUMS: SipHash: fad90a4683e420c52ef28063063dbbce248ea6d4 SwiftRLP: 5512899925f1a9e1c78c902ed3bf857880e814a0 -PODFILE CHECKSUM: 9f923f3cffffde022aaef140f9cd311a152e9c49 +PODFILE CHECKSUM: 72534436a5f24d6d07a676642432e134a85ff3e5 -COCOAPODS: 1.6.0.beta.1 +COCOAPODS: 1.6.0.beta.2 diff --git a/Pods/EthereumABI/EthereumABI/Classes/ABI.swift b/Pods/EthereumABI/EthereumABI/Classes/ABI.swift new file mode 100755 index 000000000..1bcca4d84 --- /dev/null +++ b/Pods/EthereumABI/EthereumABI/Classes/ABI.swift @@ -0,0 +1,28 @@ +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation + +public struct ABI { + +} + +protocol ABIElementPropertiesProtocol { + var isStatic: Bool {get} + var isArray: Bool {get} + var isTuple: Bool {get} + var arraySize: ABI.Element.ArraySize {get} + var subtype: ABI.Element.ParameterType? {get} + var memoryUsage: UInt64 {get} + var emptyValue: Any {get} +} + +protocol ABIEncoding { + var abiRepresentation: String {get} +} + +protocol ABIValidation { + var isValid: Bool {get} +} diff --git a/web3swift/ABIv2/Classes/ABIv2Decoding.swift b/Pods/EthereumABI/EthereumABI/Classes/ABIDecoding.swift similarity index 90% rename from web3swift/ABIv2/Classes/ABIv2Decoding.swift rename to Pods/EthereumABI/EthereumABI/Classes/ABIDecoding.swift index 2b451cb24..1ef76c1d9 100755 --- a/web3swift/ABIv2/Classes/ABIv2Decoding.swift +++ b/Pods/EthereumABI/EthereumABI/Classes/ABIDecoding.swift @@ -1,28 +1,25 @@ // -// ABIv2Decoding.swift -// web3swift -// -// Created by Alexander Vlasov on 04.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt import EthereumAddress -public struct ABIv2Decoder { +public struct ABIDecoder { } -extension ABIv2Decoder { - public static func decode(types: [ABIv2.Element.InOut], data: Data) -> [AnyObject]? { - let params = types.compactMap { (el) -> ABIv2.Element.ParameterType in +extension ABIDecoder { + public static func decode(types: [ABI.Element.InOut], data: Data) -> [AnyObject]? { + let params = types.compactMap { (el) -> ABI.Element.ParameterType in return el.type } return decode(types: params, data: data) } - public static func decode(types: [ABIv2.Element.ParameterType], data: Data) -> [AnyObject]? { + public static func decode(types: [ABI.Element.ParameterType], data: Data) -> [AnyObject]? { // print("Full data: \n" + data.toHexString()) var toReturn = [AnyObject]() var consumed: UInt64 = 0 @@ -36,7 +33,7 @@ extension ABIv2Decoder { return toReturn } - public static func decodeSignleType(type: ABIv2.Element.ParameterType, data: Data, pointer: UInt64 = 0) -> (value: AnyObject?, bytesConsumed: UInt64?) { + public static func decodeSignleType(type: ABI.Element.ParameterType, data: Data, pointer: UInt64 = 0) -> (value: AnyObject?, bytesConsumed: UInt64?) { let (elData, nextPtr) = followTheData(type: type, data: data, pointer: pointer) guard let elementItself = elData, let nextElementPointer = nextPtr else { return (nil, nil) @@ -184,7 +181,7 @@ extension ABIv2Decoder { return (nil, nil) } - fileprivate static func followTheData(type: ABIv2.Element.ParameterType, data: Data, pointer: UInt64 = 0) -> (elementEncoding: Data?, nextElementPointer: UInt64?) { + fileprivate static func followTheData(type: ABI.Element.ParameterType, data: Data, pointer: UInt64 = 0) -> (elementEncoding: Data?, nextElementPointer: UInt64?) { // print("Follow the data: \n" + data.toHexString()) // print("At pointer: \n" + String(pointer)) if type.isStatic { @@ -220,14 +217,14 @@ extension ABIv2Decoder { } } - public static func decodeLog(event: ABIv2.Element.Event, eventLog: EventLog) -> [String:Any]? { - if event.topic != eventLog.topics[0] && !event.anonymous { + public static func decodeLog(event: ABI.Element.Event, eventLogTopics: [Data], eventLogData: Data) -> [String:Any]? { + if event.topic != eventLogTopics[0] && !event.anonymous { return nil } var eventContent = [String: Any]() eventContent["name"]=event.name - let logs = eventLog.topics - let dataForProcessing = eventLog.data + let logs = eventLogTopics + let dataForProcessing = eventLogData let indexedInputs = event.inputs.filter { (inp) -> Bool in return inp.indexed } @@ -237,7 +234,7 @@ extension ABIv2Decoder { let nonIndexedInputs = event.inputs.filter { (inp) -> Bool in return !inp.indexed } - let nonIndexedTypes = nonIndexedInputs.compactMap { (inp) -> ABIv2.Element.ParameterType in + let nonIndexedTypes = nonIndexedInputs.compactMap { (inp) -> ABI.Element.ParameterType in return inp.type } guard logs.count == indexedInputs.count + 1 else {return nil} @@ -246,16 +243,16 @@ extension ABIv2Decoder { let data = logs[i+1] let input = indexedInputs[i] if !input.type.isStatic || input.type.isArray || input.type.memoryUsage != 32 { - let (v, _) = ABIv2Decoder.decodeSignleType(type: .bytes(length: 32), data: data) + let (v, _) = ABIDecoder.decodeSignleType(type: .bytes(length: 32), data: data) guard let valueUnwrapped = v else {return nil} indexedValues.append(valueUnwrapped) } else { - let (v, _) = ABIv2Decoder.decodeSignleType(type: input.type, data: data) + let (v, _) = ABIDecoder.decodeSignleType(type: input.type, data: data) guard let valueUnwrapped = v else {return nil} indexedValues.append(valueUnwrapped) } } - let v = ABIv2Decoder.decode(types: nonIndexedTypes, data: dataForProcessing) + let v = ABIDecoder.decode(types: nonIndexedTypes, data: dataForProcessing) guard let nonIndexedValues = v else {return nil} var indexedInputCounter = 0 var nonIndexedInputCounter = 0 diff --git a/web3swift/ABIv2/Classes/ABIv2Elements.swift b/Pods/EthereumABI/EthereumABI/Classes/ABIElements.swift similarity index 54% rename from web3swift/ABIv2/Classes/ABIv2Elements.swift rename to Pods/EthereumABI/EthereumABI/Classes/ABIElements.swift index ec6e455b3..523f68741 100755 --- a/web3swift/ABIv2/Classes/ABIv2Elements.swift +++ b/Pods/EthereumABI/EthereumABI/Classes/ABIElements.swift @@ -1,38 +1,35 @@ // -// ABIElements.swift -// web3swift -// -// Created by Alexander Vlasov on 06.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt -public extension ABIv2 { +public extension ABI { // JSON Decoding public struct Input: Decodable { - var name: String? - var type: String - var indexed: Bool? - var components: [Input]? + public var name: String? + public var type: String + public var indexed: Bool? + public var components: [Input]? } public struct Output: Decodable { - var name: String? - var type: String - var components: [Output]? + public var name: String? + public var type: String + public var components: [Output]? } public struct Record: Decodable { - var name: String? - var type: String? - var payable: Bool? - var constant: Bool? - var stateMutability: String? - var inputs: [ABIv2.Input]? - var outputs: [ABIv2.Output]? - var anonymous: Bool? + public var name: String? + public var type: String? + public var payable: Bool? + public var constant: Bool? + public var stateMutability: String? + public var inputs: [ABI.Input]? + public var outputs: [ABI.Output]? + public var anonymous: Bool? } public enum Element { @@ -47,50 +44,113 @@ public extension ABIv2 { case fallback(Fallback) case event(Event) + public enum StateMutability { + case payable + case mutating + case view + case pure + + var isConstant: Bool { + switch self { + case .payable: + return false + case .mutating: + return false + default: + return true + } + } + + var isPayable: Bool { + switch self { + case .payable: + return true + default: + return false + } + } + } + public struct InOut { public let name: String public let type: ParameterType + + public init(name: String, type: ParameterType) { + self.name = name + self.type = type + } } public struct Function { public let name: String? public let inputs: [InOut] public let outputs: [InOut] + public let stateMutability: StateMutability? = nil public let constant: Bool public let payable: Bool + + public init(name: String?, inputs: [InOut], outputs: [InOut], constant: Bool, payable: Bool) { + self.name = name + self.inputs = inputs + self.outputs = outputs + self.constant = constant + self.payable = payable + } } public struct Constructor { - let inputs: [InOut] - let constant: Bool - let payable: Bool + public let inputs: [InOut] + public let constant: Bool + public let payable: Bool + public init(inputs: [InOut], constant: Bool, payable: Bool) { + self.inputs = inputs + self.constant = constant + self.payable = payable + } } public struct Fallback { - let constant: Bool - let payable: Bool + public let constant: Bool + public let payable: Bool + + public init(constant: Bool, payable: Bool) { + self.constant = constant + self.payable = payable + } } public struct Event { - let name: String - let inputs: [Input] - let anonymous: Bool + public let name: String + public let inputs: [Input] + public let anonymous: Bool - struct Input { - let name: String - let type: ParameterType - let indexed: Bool + public init(name: String, inputs: [Input], anonymous: Bool) { + self.name = name + self.inputs = inputs + self.anonymous = anonymous + } + + public struct Input { + public let name: String + public let type: ParameterType + public let indexed: Bool + + public init(name: String, type: ParameterType, indexed: Bool) { + self.name = name + self.type = type + self.indexed = indexed + } } } } } -extension ABIv2.Element { - func encodeParameters(_ parameters: [AnyObject]) -> Data? { +extension ABI.Element { + public func encodeParameters(_ parameters: [AnyObject]) -> Data? { switch self { case .constructor(let constructor): guard parameters.count == constructor.inputs.count else {return nil} - guard let data = ABIv2Encoder.encode(types: constructor.inputs, values: parameters) else {return nil} + guard let data = ABIEncoder.encode(types: constructor.inputs, values: parameters) else {return nil} return data case .event(_): return nil @@ -99,14 +159,14 @@ extension ABIv2.Element { case .function(let function): guard parameters.count == function.inputs.count else {return nil} let signature = function.methodEncoding - guard let data = ABIv2Encoder.encode(types: function.inputs, values: parameters) else {return nil} + guard let data = ABIEncoder.encode(types: function.inputs, values: parameters) else {return nil} return signature + data } } } -extension ABIv2.Element { - func decodeReturnData(_ data: Data) -> [String:Any]? { +extension ABI.Element { + public func decodeReturnData(_ data: Data) -> [String:Any]? { switch self { case .constructor(_): return nil @@ -129,7 +189,7 @@ extension ABIv2.Element { guard function.outputs.count*32 <= data.count else {return nil} var returnArray = [String:Any]() var i = 0; - guard let values = ABIv2Decoder.decode(types: function.outputs, data: data) else {return nil} + guard let values = ABIDecoder.decode(types: function.outputs, data: data) else {return nil} for output in function.outputs { let name = "\(i)" returnArray[name] = values[i] @@ -142,7 +202,7 @@ extension ABIv2.Element { } } - func decodeInputData(_ rawData: Data) -> [String: Any]? { + public func decodeInputData(_ rawData: Data) -> [String: Any]? { var data = rawData var sig: Data? = nil switch rawData.count % 32 { @@ -170,7 +230,7 @@ extension ABIv2.Element { guard function.inputs.count*32 <= data.count else {return nil} var returnArray = [String:Any]() var i = 0; - guard let values = ABIv2Decoder.decode(types: function.inputs, data: data) else {return nil} + guard let values = ABIDecoder.decode(types: function.inputs, data: data) else {return nil} for input in function.inputs { let name = "\(i)" returnArray[name] = values[i] @@ -202,7 +262,7 @@ extension ABIv2.Element { guard function.inputs.count*32 <= data.count else {return nil} var returnArray = [String:Any]() var i = 0; - guard let values = ABIv2Decoder.decode(types: function.inputs, data: data) else {return nil} + guard let values = ABIDecoder.decode(types: function.inputs, data: data) else {return nil} for input in function.inputs { let name = "\(i)" returnArray[name] = values[i] @@ -216,9 +276,9 @@ extension ABIv2.Element { } } -extension ABIv2.Element.Event { - func decodeReturnedLogs(_ eventLog: EventLog) -> [String:Any]? { - guard let eventContent = ABIv2Decoder.decodeLog(event: self, eventLog: eventLog) else {return nil} +extension ABI.Element.Event { + public func decodeReturnedLogs(eventLogTopics: [Data], eventLogData: Data) -> [String:Any]? { + guard let eventContent = ABIDecoder.decodeLog(event: self, eventLogTopics: eventLogTopics, eventLogData: eventLogData) else {return nil} return eventContent } } diff --git a/web3swift/ABIv2/Classes/ABIv2Encoding.swift b/Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift similarity index 96% rename from web3swift/ABIv2/Classes/ABIv2Encoding.swift rename to Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift index a8feaff54..e163dc0a2 100755 --- a/web3swift/ABIv2/Classes/ABIv2Encoding.swift +++ b/Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift @@ -1,20 +1,17 @@ // -// ABIv2Encoding.swift -// web3swift -// -// Created by Alexander Vlasov on 03.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt import EthereumAddress -public struct ABIv2Encoder { +public struct ABIEncoder { } -extension ABIv2Encoder { +extension ABIEncoder { public static func convertToBigUInt(_ value: AnyObject) -> BigUInt? { switch value { case let v as BigUInt: @@ -137,15 +134,15 @@ extension ABIv2Encoder { } - public static func encode(types: [ABIv2.Element.InOut], values: [AnyObject]) -> Data? { + public static func encode(types: [ABI.Element.InOut], values: [AnyObject]) -> Data? { guard types.count == values.count else {return nil} - let params = types.compactMap { (el) -> ABIv2.Element.ParameterType in + let params = types.compactMap { (el) -> ABI.Element.ParameterType in return el.type } return encode(types: params, values: values) } - public static func encode(types: [ABIv2.Element.ParameterType], values: [AnyObject]) -> Data? { + public static func encode(types: [ABI.Element.ParameterType], values: [AnyObject]) -> Data? { guard types.count == values.count else {return nil} var tails = [Data]() var heads = [Data]() @@ -183,7 +180,7 @@ extension ABIv2Encoder { return headsConcatenated + tailsConcatenated } - public static func encodeSingleType(type: ABIv2.Element.ParameterType, value: AnyObject) -> Data? { + public static func encodeSingleType(type: ABI.Element.ParameterType, value: AnyObject) -> Data? { switch type { case .uint(_): if let biguint = convertToBigUInt(value) { diff --git a/Pods/EthereumABI/EthereumABI/Classes/ABIExtensions.swift b/Pods/EthereumABI/EthereumABI/Classes/ABIExtensions.swift new file mode 100644 index 000000000..f006e44e9 --- /dev/null +++ b/Pods/EthereumABI/EthereumABI/Classes/ABIExtensions.swift @@ -0,0 +1,271 @@ +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt + +extension Data { + func setLengthLeft(_ toBytes: UInt64, isNegative:Bool = false ) -> Data? { + let existingLength = UInt64(self.count) + if (existingLength == toBytes) { + return Data(self) + } else if (existingLength > toBytes) { + return nil + } + var data:Data + if (isNegative) { + data = Data(repeating: UInt8(255), count: Int(toBytes - existingLength)) + } else { + data = Data(repeating: UInt8(0), count: Int(toBytes - existingLength)) + } + data.append(self) + return data + } + + func setLengthRight(_ toBytes: UInt64, isNegative:Bool = false ) -> Data? { + let existingLength = UInt64(self.count) + if (existingLength == toBytes) { + return Data(self) + } else if (existingLength > toBytes) { + return nil + } + var data:Data = Data() + data.append(self) + if (isNegative) { + data.append(Data(repeating: UInt8(255), count: Int(toBytes - existingLength))) + } else { + data.append(Data(repeating: UInt8(0), count:Int(toBytes - existingLength))) + } + return data + } + + static func fromHex(_ hex: String) -> Data? { + let string = hex.lowercased().stripHexPrefix() + let array = Array(hex: string) + if (array.count == 0) { + if (hex == "0x" || hex == "") { + return Data() + } else { + return nil + } + } + return Data(array) + } +} + +extension BigInt { + func toTwosComplement() -> Data { + if (self.sign == BigInt.Sign.plus) { + return self.magnitude.serialize() + } else { + let serializedLength = self.magnitude.serialize().count + let MAX = BigUInt(1) << (serializedLength*8) + let twoComplement = MAX - self.magnitude + return twoComplement.serialize() + } + } +} + +extension BigUInt { + func abiEncode(bits: UInt64) -> Data? { + let data = self.serialize() + let paddedLength = UInt64((bits + 7) / 8) + let padded = data.setLengthLeft(paddedLength) + return padded + } +} + +extension BigInt { + func abiEncode(bits: UInt64) -> Data? { + let isNegative = self < (BigInt(0)) + let data = self.toTwosComplement() + let paddedLength = UInt64((bits + 7) / 8) + let padded = data.setLengthLeft(paddedLength, isNegative: isNegative) + return padded + } +} + +extension BigInt { + static func fromTwosComplement(data: Data) -> BigInt { + let isPositive = ((data[0] & 128) >> 7) == 0 + if (isPositive) { + let magnitude = BigUInt(data) + return BigInt(magnitude) + } else { + let MAX = (BigUInt(1) << (data.count*8)) + let magnitude = MAX - BigUInt(data) + let bigint = BigInt(0) - BigInt(magnitude) + return bigint + } + } +} + +extension String { + var fullRange: Range { + return startIndex.. Index? { + guard let range = range(of: String(char)) else { + return nil + } + return range.lowerBound + } + +// func split(intoChunksOf chunkSize: Int) -> [String] { +// var output = [String]() +// let splittedString = self +// .map { $0 } +// .split(intoChunksOf: chunkSize) +// splittedString.forEach { +// output.append($0.map { String($0) }.joined(separator: "")) +// } +// return output +// } + + subscript (bounds: CountableClosedRange) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = index(self.startIndex, offsetBy: bounds.upperBound) + return String(self[start...end]) + } + + subscript (bounds: CountableRange) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = index(self.startIndex, offsetBy: bounds.upperBound) + return String(self[start..) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = self.endIndex + return String(self[start.. String { + let stringLength = self.count + if stringLength < toLength { + return String(repeatElement(character, count: toLength - stringLength)) + self + } else { + return String(self.suffix(toLength)) + } + } + +// func interpretAsBinaryData() -> Data? { +// let padded = self.padding(toLength: ((self.count + 7) / 8) * 8, withPad: "0", startingAt: 0) +// let byteArray = padded.split(intoChunksOf: 8).map { UInt8(strtoul($0, nil, 2)) } +// return Data(byteArray) +// } + + func hasHexPrefix() -> Bool { + return self.hasPrefix("0x") + } + + func stripHexPrefix() -> String { + if self.hasPrefix("0x") { + let indexStart = self.index(self.startIndex, offsetBy: 2) + return String(self[indexStart...]) + } + return self + } + + func addHexPrefix() -> String { + if !self.hasPrefix("0x") { + return "0x" + self + } + return self + } + + func matchingStrings(regex: String) -> [[String]] { + guard let regex = try? NSRegularExpression(pattern: regex, options: []) else { return [] } + let nsString = self as NSString + let results = regex.matches(in: self, options: [], range: NSMakeRange(0, nsString.length)) + return results.map { result in + (0.. Range? { + guard + let from16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location, limitedBy: utf16.endIndex), + let to16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location + nsRange.length, limitedBy: utf16.endIndex), + let from = from16.samePosition(in: self), + let to = to16.samePosition(in: self) + else { return nil } + return from ..< to + } + + var asciiValue: Int { + get { + let s = self.unicodeScalars + return Int(s[s.startIndex].value) + } + } +} + +extension Character { + var asciiValue: Int { + get { + let s = String(self).unicodeScalars + return Int(s[s.startIndex].value) + } + } +} + +extension Array where Element == UInt8 { + init(hex: String) { + self.init(reserveCapacity: hex.unicodeScalars.lazy.underestimatedCount) + var buffer: UInt8? + var skip = hex.hasPrefix("0x") ? 2 : 0 + for char in hex.unicodeScalars.lazy { + guard skip == 0 else { + skip -= 1 + continue + } + guard char.value >= 48 && char.value <= 102 else { + removeAll() + return + } + let v: UInt8 + let c: UInt8 = UInt8(char.value) + switch c { + case let c where c <= 57: + v = c - 48 + case let c where c >= 65 && c <= 70: + v = c - 55 + case let c where c >= 97: + v = c - 87 + default: + removeAll() + return + } + if let b = buffer { + append(b << 4 | v) + buffer = nil + } else { + buffer = v + } + } + if let b = buffer { + append(b) + } + } + + func toHexString() -> String { + return `lazy`.reduce("") { + var s = String($1, radix: 16) + if s.count == 1 { + s = "0" + s + } + return $0 + s + } + } +} diff --git a/web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift b/Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift similarity index 90% rename from web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift rename to Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift index 21248cca6..469c155fd 100755 --- a/web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift +++ b/Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift @@ -1,19 +1,16 @@ // -// ABIv2ParameterTypes.swift -// web3swift -// -// Created by Alexander Vlasov on 02.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt import EthereumAddress -extension ABIv2.Element { +extension ABI.Element { /// Specifies the type that parameters in a contract have. - public enum ParameterType: ABIv2ElementPropertiesProtocol { + public enum ParameterType: ABIElementPropertiesProtocol { case uint(bits: UInt64) case int(bits: UInt64) case address @@ -71,7 +68,7 @@ extension ABIv2.Element { } } - var subtype: ABIv2.Element.ParameterType? { + var subtype: ABI.Element.ParameterType? { switch self { case .array(type: let type, length: _): return type @@ -130,7 +127,7 @@ extension ABIv2.Element { } } - var arraySize: ABIv2.Element.ArraySize { + var arraySize: ABI.Element.ArraySize { switch self { case .array(type: _, length: let length): if (length == 0) { @@ -146,8 +143,8 @@ extension ABIv2.Element { } -extension ABIv2.Element.ParameterType: Equatable { - public static func ==(lhs: ABIv2.Element.ParameterType, rhs: ABIv2.Element.ParameterType) -> Bool { +extension ABI.Element.ParameterType: Equatable { + public static func ==(lhs: ABI.Element.ParameterType, rhs: ABI.Element.ParameterType) -> Bool { switch (lhs, rhs) { case let (.uint(length1), .uint(length2)): return length1 == length2 @@ -173,7 +170,7 @@ extension ABIv2.Element.ParameterType: Equatable { } } -extension ABIv2.Element.Function { +extension ABI.Element.Function { public var signature: String { return "\(name ?? "")(\(inputs.map { $0.type.abiRepresentation }.joined(separator: ",")))" } @@ -188,7 +185,7 @@ extension ABIv2.Element.Function { } // MARK: - Event topic -extension ABIv2.Element.Event { +extension ABI.Element.Event { public var signature: String { return "\(name)(\(inputs.map { $0.type.abiRepresentation }.joined(separator: ",")))" } @@ -199,7 +196,7 @@ extension ABIv2.Element.Event { } -extension ABIv2.Element.ParameterType: ABIv2Encoding { +extension ABI.Element.ParameterType: ABIEncoding { public var abiRepresentation: String { switch self { case .uint(let bits): @@ -231,7 +228,7 @@ extension ABIv2.Element.ParameterType: ABIv2Encoding { } } -extension ABIv2.Element.ParameterType: ABIv2Validation { +extension ABI.Element.ParameterType: ABIValidation { public var isValid: Bool { switch self { case .uint(let bits), .int(let bits): diff --git a/web3swift/ABIv2/Classes/ABIv2Parsing.swift b/Pods/EthereumABI/EthereumABI/Classes/ABIParsing.swift similarity index 50% rename from web3swift/ABIv2/Classes/ABIv2Parsing.swift rename to Pods/EthereumABI/EthereumABI/Classes/ABIParsing.swift index 5ae447ca4..f99c13295 100755 --- a/web3swift/ABIv2/Classes/ABIv2Parsing.swift +++ b/Pods/EthereumABI/EthereumABI/Classes/ABIParsing.swift @@ -1,16 +1,13 @@ // -// ABIParser.swift -// web3swift -// -// Created by Alexander Vlasov on 06.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -extension ABIv2 { +extension ABI { - public enum ParsingError: Error { + public enum ParsingError: Swift.Error { case invalidJsonFile case elementTypeInvalid case elementNameInvalid @@ -37,69 +34,69 @@ extension ABIv2 { } -extension ABIv2.Record { - public func parse() throws -> ABIv2.Element { +extension ABI.Record { + public func parse() throws -> ABI.Element { let typeString = self.type != nil ? self.type! : "function" - guard let type = ABIv2.ElementType(rawValue: typeString) else { - throw ABIv2.ParsingError.elementTypeInvalid + guard let type = ABI.ElementType(rawValue: typeString) else { + throw ABI.ParsingError.elementTypeInvalid } return try parseToElement(from: self, type: type) } } -fileprivate func parseToElement(from abiRecord: ABIv2.Record, type: ABIv2.ElementType) throws -> ABIv2.Element { +fileprivate func parseToElement(from abiRecord: ABI.Record, type: ABI.ElementType) throws -> ABI.Element { switch type { case .function: let function = try parseFunction(abiRecord: abiRecord) - return ABIv2.Element.function(function) + return ABI.Element.function(function) case .constructor: let constructor = try parseConstructor(abiRecord: abiRecord) - return ABIv2.Element.constructor(constructor) + return ABI.Element.constructor(constructor) case .fallback: let fallback = try parseFallback(abiRecord: abiRecord) - return ABIv2.Element.fallback(fallback) + return ABI.Element.fallback(fallback) case .event: let event = try parseEvent(abiRecord: abiRecord) - return ABIv2.Element.event(event) + return ABI.Element.event(event) } } -fileprivate func parseFunction(abiRecord:ABIv2.Record) throws -> ABIv2.Element.Function { - let inputs = try abiRecord.inputs?.map({ (input:ABIv2.Input) throws -> ABIv2.Element.InOut in +fileprivate func parseFunction(abiRecord:ABI.Record) throws -> ABI.Element.Function { + let inputs = try abiRecord.inputs?.map({ (input:ABI.Input) throws -> ABI.Element.InOut in let nativeInput = try input.parse() return nativeInput }) - let abiInputs = inputs != nil ? inputs! : [ABIv2.Element.InOut]() - let outputs = try abiRecord.outputs?.map({ (output:ABIv2.Output) throws -> ABIv2.Element.InOut in + let abiInputs = inputs != nil ? inputs! : [ABI.Element.InOut]() + let outputs = try abiRecord.outputs?.map({ (output:ABI.Output) throws -> ABI.Element.InOut in let nativeOutput = try output.parse() return nativeOutput }) - let abiOutputs = outputs != nil ? outputs! : [ABIv2.Element.InOut]() + let abiOutputs = outputs != nil ? outputs! : [ABI.Element.InOut]() let name = abiRecord.name != nil ? abiRecord.name! : "" let payable = abiRecord.stateMutability != nil ? (abiRecord.stateMutability == "payable" || abiRecord.payable!) : false let constant = (abiRecord.constant == true || abiRecord.stateMutability == "view" || abiRecord.stateMutability == "pure") - let functionElement = ABIv2.Element.Function(name: name, inputs: abiInputs, outputs: abiOutputs, constant: constant, payable: payable) + let functionElement = ABI.Element.Function(name: name, inputs: abiInputs, outputs: abiOutputs, constant: constant, payable: payable) return functionElement } -fileprivate func parseFallback(abiRecord:ABIv2.Record) throws -> ABIv2.Element.Fallback { +fileprivate func parseFallback(abiRecord:ABI.Record) throws -> ABI.Element.Fallback { let payable = (abiRecord.stateMutability == "payable" || abiRecord.payable!) var constant = abiRecord.constant == true if (abiRecord.stateMutability == "view" || abiRecord.stateMutability == "pure") { constant = true } - let functionElement = ABIv2.Element.Fallback(constant: constant, payable: payable) + let functionElement = ABI.Element.Fallback(constant: constant, payable: payable) return functionElement } -fileprivate func parseConstructor(abiRecord:ABIv2.Record) throws -> ABIv2.Element.Constructor { - let inputs = try abiRecord.inputs?.map({ (input:ABIv2.Input) throws -> ABIv2.Element.InOut in +fileprivate func parseConstructor(abiRecord:ABI.Record) throws -> ABI.Element.Constructor { + let inputs = try abiRecord.inputs?.map({ (input:ABI.Input) throws -> ABI.Element.InOut in let nativeInput = try input.parse() return nativeInput }) - let abiInputs = inputs != nil ? inputs! : [ABIv2.Element.InOut]() + let abiInputs = inputs != nil ? inputs! : [ABI.Element.InOut]() var payable = false if (abiRecord.payable != nil) { payable = abiRecord.payable! @@ -108,79 +105,79 @@ fileprivate func parseConstructor(abiRecord:ABIv2.Record) throws -> ABIv2.Elemen payable = true } let constant = false - let functionElement = ABIv2.Element.Constructor(inputs: abiInputs, constant: constant, payable: payable) + let functionElement = ABI.Element.Constructor(inputs: abiInputs, constant: constant, payable: payable) return functionElement } -fileprivate func parseEvent(abiRecord:ABIv2.Record) throws -> ABIv2.Element.Event { - let inputs = try abiRecord.inputs?.map({ (input:ABIv2.Input) throws -> ABIv2.Element.Event.Input in +fileprivate func parseEvent(abiRecord:ABI.Record) throws -> ABI.Element.Event { + let inputs = try abiRecord.inputs?.map({ (input:ABI.Input) throws -> ABI.Element.Event.Input in let nativeInput = try input.parseForEvent() return nativeInput }) - let abiInputs = inputs != nil ? inputs! : [ABIv2.Element.Event.Input]() + let abiInputs = inputs != nil ? inputs! : [ABI.Element.Event.Input]() let name = abiRecord.name != nil ? abiRecord.name! : "" let anonymous = abiRecord.anonymous != nil ? abiRecord.anonymous! : false - let functionElement = ABIv2.Element.Event(name: name, inputs: abiInputs, anonymous: anonymous) + let functionElement = ABI.Element.Event(name: name, inputs: abiInputs, anonymous: anonymous) return functionElement } -extension ABIv2.Input { - func parse() throws -> ABIv2.Element.InOut { +extension ABI.Input { + func parse() throws -> ABI.Element.InOut { let name = self.name != nil ? self.name! : "" - let parameterType = try ABIv2TypeParser.parseTypeString(self.type) + let parameterType = try ABITypeParser.parseTypeString(self.type) if case .tuple(types: _) = parameterType { - let components = try self.components?.compactMap({ (inp: ABIv2.Input) throws -> ABIv2.Element.ParameterType in + let components = try self.components?.compactMap({ (inp: ABI.Input) throws -> ABI.Element.ParameterType in let input = try inp.parse() return input.type }) - let type = ABIv2.Element.ParameterType.tuple(types: components!) - let nativeInput = ABIv2.Element.InOut(name: name, type: type) + let type = ABI.Element.ParameterType.tuple(types: components!) + let nativeInput = ABI.Element.InOut(name: name, type: type) return nativeInput } else { - let nativeInput = ABIv2.Element.InOut(name: name, type: parameterType) + let nativeInput = ABI.Element.InOut(name: name, type: parameterType) return nativeInput } } - func parseForEvent() throws -> ABIv2.Element.Event.Input{ + func parseForEvent() throws -> ABI.Element.Event.Input{ let name = self.name != nil ? self.name! : "" - let parameterType = try ABIv2TypeParser.parseTypeString(self.type) + let parameterType = try ABITypeParser.parseTypeString(self.type) let indexed = self.indexed == true - return ABIv2.Element.Event.Input(name:name, type: parameterType, indexed: indexed) + return ABI.Element.Event.Input(name:name, type: parameterType, indexed: indexed) } } -extension ABIv2.Output { - func parse() throws -> ABIv2.Element.InOut { +extension ABI.Output { + func parse() throws -> ABI.Element.InOut { let name = self.name != nil ? self.name! : "" - let parameterType = try ABIv2TypeParser.parseTypeString(self.type) + let parameterType = try ABITypeParser.parseTypeString(self.type) switch parameterType { case .tuple(types: _): - let components = try self.components?.compactMap({ (inp: ABIv2.Output) throws -> ABIv2.Element.ParameterType in + let components = try self.components?.compactMap({ (inp: ABI.Output) throws -> ABI.Element.ParameterType in let input = try inp.parse() return input.type }) - let type = ABIv2.Element.ParameterType.tuple(types: components!) - let nativeInput = ABIv2.Element.InOut(name: name, type: type) + let type = ABI.Element.ParameterType.tuple(types: components!) + let nativeInput = ABI.Element.InOut(name: name, type: type) return nativeInput case .array(type: let subtype, length: let length): switch subtype { case .tuple(types: _): - let components = try self.components?.compactMap({ (inp: ABIv2.Output) throws -> ABIv2.Element.ParameterType in + let components = try self.components?.compactMap({ (inp: ABI.Output) throws -> ABI.Element.ParameterType in let input = try inp.parse() return input.type }) - let nestedSubtype = ABIv2.Element.ParameterType.tuple(types: components!) - let properType = ABIv2.Element.ParameterType.array(type: nestedSubtype, length: length) - let nativeInput = ABIv2.Element.InOut(name: name, type: properType) + let nestedSubtype = ABI.Element.ParameterType.tuple(types: components!) + let properType = ABI.Element.ParameterType.array(type: nestedSubtype, length: length) + let nativeInput = ABI.Element.InOut(name: name, type: properType) return nativeInput default: - let nativeInput = ABIv2.Element.InOut(name: name, type: parameterType) + let nativeInput = ABI.Element.InOut(name: name, type: parameterType) return nativeInput } default: - let nativeInput = ABIv2.Element.InOut(name: name, type: parameterType) + let nativeInput = ABI.Element.InOut(name: name, type: parameterType) return nativeInput } } diff --git a/web3swift/ABIv2/Classes/ABIv2TypeParser.swift b/Pods/EthereumABI/EthereumABI/Classes/ABITypeParser.swift similarity index 72% rename from web3swift/ABIv2/Classes/ABIv2TypeParser.swift rename to Pods/EthereumABI/EthereumABI/Classes/ABITypeParser.swift index 370dc26fe..274712471 100755 --- a/web3swift/ABIv2/Classes/ABIv2TypeParser.swift +++ b/Pods/EthereumABI/EthereumABI/Classes/ABITypeParser.swift @@ -1,14 +1,11 @@ // -// ABIv2TypeParser.swift -// web3swift -// -// Created by Alexander Vlasov on 03.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -public struct ABIv2TypeParser { +public struct ABITypeParser { private enum BaseParameterType: String { case address @@ -21,7 +18,7 @@ public struct ABIv2TypeParser { case tuple } - private static func baseTypeMatch(from string: String, length: UInt64 = 0) -> ABIv2.Element.ParameterType? { + static func baseTypeMatch(from string: String, length: UInt64 = 0) -> ABI.Element.ParameterType? { switch BaseParameterType(rawValue: string) { case .address?: return .address @@ -41,26 +38,26 @@ public struct ABIv2TypeParser { case .string?: return .string case .tuple?: - return .tuple(types: [ABIv2.Element.ParameterType]()) + return .tuple(types: [ABI.Element.ParameterType]()) default: return nil } } - public static func parseTypeString(_ string:String) throws -> ABIv2.Element.ParameterType { + public static func parseTypeString(_ string:String) throws -> ABI.Element.ParameterType { let (type, tail) = recursiveParseType(string) - guard let t = type, tail == nil else {throw Web3Error.inputError(desc: "Failed to parse ABI element " + string)} + guard let t = type, tail == nil else {throw ABI.ParsingError.elementTypeInvalid} return t } - public static func recursiveParseType(_ string: String) -> (type: ABIv2.Element.ParameterType?, tail: String?) { - let matcher = try! NSRegularExpression(pattern: ABIv2.TypeParsingExpressions.typeEatingRegex, options: NSRegularExpression.Options.dotMatchesLineSeparators) + static func recursiveParseType(_ string: String) -> (type: ABI.Element.ParameterType?, tail: String?) { + let matcher = try! NSRegularExpression(pattern: ABI.TypeParsingExpressions.typeEatingRegex, options: NSRegularExpression.Options.dotMatchesLineSeparators) let match = matcher.matches(in: string, options: NSRegularExpression.MatchingOptions.anchored, range: string.fullNSRange) guard match.count == 1 else { return (nil, nil) } var tail: String = "" - var type: ABIv2.Element.ParameterType? + var type: ABI.Element.ParameterType? guard match[0].numberOfRanges >= 1 else {return (nil, nil)} guard let baseTypeRange = Range(match[0].range(at: 1), in: string) else {return (nil, nil)} let baseTypeString = String(string[baseTypeRange]) @@ -86,22 +83,22 @@ public struct ABIv2TypeParser { return recursiveParseArray(baseType: type!, string: tail) } - public static func recursiveParseArray(baseType: ABIv2.Element.ParameterType, string: String) -> (type: ABIv2.Element.ParameterType?, tail: String?) { - let matcher = try! NSRegularExpression(pattern: ABIv2.TypeParsingExpressions.arrayEatingRegex, options: NSRegularExpression.Options.dotMatchesLineSeparators) + static func recursiveParseArray(baseType: ABI.Element.ParameterType, string: String) -> (type: ABI.Element.ParameterType?, tail: String?) { + let matcher = try! NSRegularExpression(pattern: ABI.TypeParsingExpressions.arrayEatingRegex, options: NSRegularExpression.Options.dotMatchesLineSeparators) let match = matcher.matches(in: string, options: NSRegularExpression.MatchingOptions.anchored, range: string.fullNSRange) guard match.count == 1 else {return (nil, nil)} var tail: String = "" - var type: ABIv2.Element.ParameterType? + var type: ABI.Element.ParameterType? guard match[0].numberOfRanges >= 1 else {return (nil, nil)} guard let baseArrayRange = Range(match[0].range(at: 1), in: string) else {return (nil, nil)} let baseArrayString = String(string[baseArrayRange]) if match[0].numberOfRanges >= 2, let exactArrayRange = Range(match[0].range(at: 2), in: string) { let lengthString = String(string[exactArrayRange]) guard let arrayLength = UInt64(lengthString) else {return (nil, nil)} - let baseType = ABIv2.Element.ParameterType.array(type: baseType, length: arrayLength) + let baseType = ABI.Element.ParameterType.array(type: baseType, length: arrayLength) type = baseType } else { - let baseType = ABIv2.Element.ParameterType.array(type: baseType, length: 0) + let baseType = ABI.Element.ParameterType.array(type: baseType, length: 0) type = baseType } tail = string.replacingCharacters(in: string.range(of: baseArrayString)!, with: "") diff --git a/Pods/EthereumABI/EthereumABI/EthereumABI.h b/Pods/EthereumABI/EthereumABI/EthereumABI.h new file mode 100644 index 000000000..f2d5c0b75 --- /dev/null +++ b/Pods/EthereumABI/EthereumABI/EthereumABI.h @@ -0,0 +1,23 @@ +// +// EthereumABI.h +// EthereumABI +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +#if TARGET_OS_IPHONE +#import +#else +#import +#endif + +//! Project version number for EthereumABI. +FOUNDATION_EXPORT double EthereumABIVersionNumber; + +//! Project version string for EthereumABI. +FOUNDATION_EXPORT const unsigned char EthereumABIVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Pods/EthereumABI/LICENSE b/Pods/EthereumABI/LICENSE new file mode 100644 index 000000000..d49e6aa41 --- /dev/null +++ b/Pods/EthereumABI/LICENSE @@ -0,0 +1,13 @@ +Copyright 2018 Alex Vlasov + +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/EthereumABI/README.md b/Pods/EthereumABI/README.md new file mode 100644 index 000000000..0e96dc82f --- /dev/null +++ b/Pods/EthereumABI/README.md @@ -0,0 +1,3 @@ +# Description + +Ethereum ABI parsing, decoding and encoding module for other projects diff --git a/Pods/Headers/Private/EthereumABI/EthereumABI.h b/Pods/Headers/Private/EthereumABI/EthereumABI.h new file mode 120000 index 000000000..6b3bc1af1 --- /dev/null +++ b/Pods/Headers/Private/EthereumABI/EthereumABI.h @@ -0,0 +1 @@ +../../../EthereumABI/EthereumABI/EthereumABI.h \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h b/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h index 54c439564..d04d0f479 120000 --- a/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h +++ b/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap b/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap index 5827ffd6f..5e3ba93be 120000 --- a/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap +++ b/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h b/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h index 15cd9101e..7c100fb6e 120000 --- a/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h +++ b/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap b/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap index db0458375..309999e26 120000 --- a/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap +++ b/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h index 38ee2e270..53d6c211e 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap index d3c8afa43..c3e3c3a34 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h index 4f6598359..1bf7d4d73 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap index 13bb9bda2..19cb03653 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h b/Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h new file mode 120000 index 000000000..82745e647 --- /dev/null +++ b/Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h @@ -0,0 +1 @@ +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap b/Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap new file mode 120000 index 000000000..bff509710 --- /dev/null +++ b/Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap @@ -0,0 +1 @@ +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h b/Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h new file mode 120000 index 000000000..c4a703b51 --- /dev/null +++ b/Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h @@ -0,0 +1 @@ +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap b/Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap new file mode 120000 index 000000000..c270ce50e --- /dev/null +++ b/Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap @@ -0,0 +1 @@ +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI.h b/Pods/Headers/Public/EthereumABI/EthereumABI.h new file mode 120000 index 000000000..6b3bc1af1 --- /dev/null +++ b/Pods/Headers/Public/EthereumABI/EthereumABI.h @@ -0,0 +1 @@ +../../../EthereumABI/EthereumABI/EthereumABI.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h index 505dcdba1..48a0c2378 120000 --- a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap index 2e8de9c1b..5daa54791 120000 --- a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h index 45c29b7ea..ec4284bbd 120000 --- a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap index 1814f3891..71f266362 120000 --- a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h b/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h index 384f088cd..54a39550a 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h +++ b/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap b/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap index 5b105d963..03e17826b 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap +++ b/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h index 6026bec84..2202ae821 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h +++ b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap index 515bc96ce..377be965b 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap +++ b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-iOS-umbrella.h b/Pods/Headers/Public/Result/Result-iOS-umbrella.h index 5017bcc62..a7f847b9e 120000 --- a/Pods/Headers/Public/Result/Result-iOS-umbrella.h +++ b/Pods/Headers/Public/Result/Result-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-iOS.modulemap b/Pods/Headers/Public/Result/Result-iOS.modulemap index a9cb518ea..bc4f23ca4 120000 --- a/Pods/Headers/Public/Result/Result-iOS.modulemap +++ b/Pods/Headers/Public/Result/Result-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-macOS-umbrella.h b/Pods/Headers/Public/Result/Result-macOS-umbrella.h index d933679ed..5c92b47bc 120000 --- a/Pods/Headers/Public/Result/Result-macOS-umbrella.h +++ b/Pods/Headers/Public/Result/Result-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-macOS.modulemap b/Pods/Headers/Public/Result/Result-macOS.modulemap index 6ff87c94a..a1725381e 120000 --- a/Pods/Headers/Public/Result/Result-macOS.modulemap +++ b/Pods/Headers/Public/Result/Result-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h b/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h index 736829e4f..909a01c80 120000 --- a/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h +++ b/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap b/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap index 363bde1c4..60dbe3748 120000 --- a/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap +++ b/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h b/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h index c56e6a45b..b1f95e224 120000 --- a/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h +++ b/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap b/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap index 835353525..5ea25fc9c 120000 --- a/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap +++ b/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h index b77347325..b1b552e68 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap index ae407f989..0842d08e1 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h index 4740a4f84..b77715c02 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap index d1421e204..c5cebdd37 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h b/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h index 1c81cd5a7..e82a48440 120000 --- a/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h +++ b/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap b/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap index 02bd8338d..082fbbbba 120000 --- a/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap +++ b/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h b/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h index 75f99866d..7a0dabd86 120000 --- a/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h +++ b/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap b/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap index 2e33aed25..9ec4c6ed1 120000 --- a/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap +++ b/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h index 70cc63a67..554c654f1 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap index c5b6fa265..44829fb84 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h index d75b444d6..56967ab47 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap index c0e372d55..0ec25a913 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap \ No newline at end of file diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index bd8f6bf62..c66bc7947 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -2,6 +2,10 @@ PODS: - BigInt (3.1.0): - SipHash (~> 1.2) - CryptoSwift (0.13.0) + - EthereumABI (1.1.1): + - BigInt (~> 3.1) + - CryptoSwift (~> 0.13) + - EthereumAddress (~> 1.0.0) - EthereumAddress (1.0.0): - CryptoSwift (~> 0.13) - PromiseKit (6.4.1): @@ -23,7 +27,8 @@ PODS: DEPENDENCIES: - BigInt (~> 3.1) - - CryptoSwift (~> 0.12) + - CryptoSwift (~> 0.13) + - EthereumABI (~> 1.1.1) - EthereumAddress (~> 1.0.0) - PromiseKit (~> 6.4.1) - Result (~> 4.0) @@ -35,6 +40,7 @@ SPEC REPOS: https://github.com/cocoapods/specs.git: - BigInt - CryptoSwift + - EthereumABI - EthereumAddress - PromiseKit - Result @@ -46,6 +52,7 @@ SPEC REPOS: SPEC CHECKSUMS: BigInt: 76b5dfdfa3e2e478d4ffdf161aeede5502e2742f CryptoSwift: 16e78bebf567bad1c87b2d58f6547f25b74c31aa + EthereumABI: f040f5429e5a4366d028c88b88d9441e137593af EthereumAddress: f476e1320dca3a0024431e713ede7a09c7eb7796 PromiseKit: 4c76a6506638034e3d7bede97b2ff7743f7bd2dc Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713 @@ -54,6 +61,6 @@ SPEC CHECKSUMS: SipHash: fad90a4683e420c52ef28063063dbbce248ea6d4 SwiftRLP: 5512899925f1a9e1c78c902ed3bf857880e814a0 -PODFILE CHECKSUM: 9f923f3cffffde022aaef140f9cd311a152e9c49 +PODFILE CHECKSUM: 72534436a5f24d6d07a676642432e134a85ff3e5 -COCOAPODS: 1.6.0.beta.1 +COCOAPODS: 1.6.0.beta.2 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index bf4ee6f4f..70a06ecce 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -7,485 +7,542 @@ objects = { /* Begin PBXBuildFile section */ - 006C73869D28CFC3C08992F0723EE0C6 /* Pods-web3swift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E91F337EA3979DB5DD84C325A340270 /* Pods-web3swift-macOS-dummy.m */; }; - 00CE1E56028E70F6A410464BB8266F28 /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C57A83FBD44C769166BCCC5CD45BD3F /* firstly.swift */; }; - 01349159EBEDEB29A5C35BA3B387F596 /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C8DD41F37C777526C9EA621C9213C9 /* Poly1305.swift */; }; - 014401F351E5C79C50E62052E8AD671C /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 1D7B42933B2D81EED52706C7200A9732 /* lax_der_privatekey_parsing.c */; }; - 01E1753617A93639EEA9E9A55B0315BA /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EA0E0A67D5738512E4618E1AEDA5E3E /* CustomStringConvertible.swift */; }; - 0315EE301733CF0DE349A0C9B65C177F /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C8DD41F37C777526C9EA621C9213C9 /* Poly1305.swift */; }; - 031B3FFCD45AD7672462A575142008AF /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = AEA94352D4A3D0793D359A8C1CB50E4A /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0416379BA218FFDEAF901B16AD09831F /* CryptoSwift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D8D1F94E4F2A45EC9F2154127E14D416 /* CryptoSwift-macOS-dummy.m */; }; - 0676D57F5CE425CA83CAA976ED4030D7 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = C21956F497DCFA1D883CAC00AF330784 /* race.swift */; }; - 068E167EF11A07C17D688B3BBC218D34 /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC7202C545EAC46F224EE9AB6B1F0F7 /* field.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0800D78442F1F493C69F6F6C51A6A7A4 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3A44C98D1E93465803241C08887CDD /* num.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 088ADDDC247990129868BE86AAFDD65F /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C57A83FBD44C769166BCCC5CD45BD3F /* firstly.swift */; }; - 08F8D3D166021760B18C796EF207413F /* EthereumAddress-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF61EAD9C9EC96163CECACFBF3504C3 /* EthereumAddress-macOS-dummy.m */; }; - 098D227D8DAE7643ACDF1DBCE8AA4264 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB290FC3F5ACF0789F4078C376E6ADED /* Array+Extension.swift */; }; - 09BAF87C5E1AF9E3EE4DEA24FF666E43 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C47CE1FE3AEC19CC322E3E03530D21CD /* PCBC.swift */; }; - 09BF24BCE4F4A393B8E2A8FF610FA924 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49A1004ABA6FF6BBB692884F59131E13 /* Utils.swift */; }; - 09F1AC7E0FE7F27B9029F4B3D06DD73E /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74111ED4B5372D2EE9A218621A18699C /* afterlife.swift */; }; - 0A396743B4ADF0FA7C12FDF1BA2C5F14 /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF4D45B809574B97A749EADBA2EFAB02 /* CBCMAC.swift */; }; - 0AB147133F796C59B1000495EDE8F694 /* scrypt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F60B61CB7F6EF778CD12A3622F779434 /* scrypt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0B442DCD3296A492C9C58C8AE14BA0A8 /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = B177F4FEBB7F565C10EB6AABDF0CFB6C /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0B8DCF4FC4B4CC3F687AC9FB1E97504C /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 612CB1FE4A4EF26D20DC64543E17C82A /* when.m */; }; - 0C031445C897BFE6D124AD54FA1B39E4 /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = EE8A73B5FBE9F82E34238AC840FC7331 /* eckey.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0C3EF791FBE499977F647EE7635CC4C9 /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CC384B5F6C90CB968D0AB32162249B6 /* Updatable.swift */; }; - 0C8C916943E653184B644A98632DDC47 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 681146D3345FF5156D09E271666D5EA1 /* group_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0D668C0B0CBE5C06AE7AE80EC0F20207 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = C21956F497DCFA1D883CAC00AF330784 /* race.swift */; }; - 0E7F3356235A21C8DEE7CFC67A802552 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01271B2BB62FE2D72466A630AC9D1BE8 /* Configuration.swift */; }; - 0EDEC46E0BC997FB64753A1C709A4AE7 /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5540F42E4F8BF99A1C7F95349EA8707D /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0EF95CCD3EF4EC40F109D9D364B6504D /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = 40ABB4750B401A88B273D3B180C1FEC9 /* fwd.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0F4C148C5393004D090DC7218E39BB39 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1422C640D1B145BC997D3E0A3FF10339 /* Extensions.swift */; }; - 0FFEBD2D6ACAE3AC711E0208FCEACC40 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 5297103B37D2E5083D67ABE2C60CA382 /* after.m */; }; - 1026302AD9FDCB8A55CB7EBB06DA0D7F /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 635C328C2CAB4B34DEF69D8CFABA3AC1 /* AnyPromise.m */; }; - 11235690EFCBB5F0EBC4A56A7E3AB2DA /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25E9E042655265AEB9322FB01DD7A702 /* Resolver.swift */; }; - 11461F81975B779BC100E7345CE2D793 /* EthereumAddress-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A2766B8B12BFE63523151BC3F80CDF4 /* EthereumAddress-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1158B8A68E881A4243A310CB039AA866 /* Result-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C30494B6003825A7F5E0AE152495E590 /* Result-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 11D236D734F12042B70BB21010A7BB31 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77FB79008E5E4C52EE48B984D12A652E /* AES.swift */; }; - 127EFEFCE576E0CDD1DF3708F20C10BC /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D1AB32F0AE7B734159BB1FBAF7F5078 /* hash.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 12E1E9691B7286282223CB20A574F364 /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = B177F4FEBB7F565C10EB6AABDF0CFB6C /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 13D45CC6E83EFEB9467158ECB394D367 /* EthereumAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 48BBE301C7AC93BA32B43FDCAB55FF55 /* EthereumAddress.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 158F6BC9635AF0C4F8FCAD1FB913BB45 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A86CAF979F3E970071A5FC47D9D7EAC /* Division.swift */; }; - 16430D1306BA11693EFE55BE2052FBEB /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23EA6F524218763DB7E76A6E13387EAC /* Padding.swift */; }; - 1726CE463B9A337870F28E208B8F268E /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 639957AA1B177687176168DC8D443490 /* BlockModeOptions.swift */; }; - 1736288FC9BC2391AF96F9CCBA1A27D2 /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BFCCF45D62D69A50F9ED16BCE93C54A /* SHA2.swift */; }; - 17B2699526C79E4F6A7F890EF0C62A1D /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3ED371C14676A66BA35BCF542FF8B548 /* hash_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 187B191D2E4399E1567DB24BD93F0486 /* SipHash-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E34CB7E7EAC6A9C0F75649FD43EC23F2 /* SipHash-macOS-dummy.m */; }; - 1904E18F6CE01618BBBC1B31E43B64EA /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6633CE6E0F4DA082E8A3374A723A4844 /* BigUInt.swift */; }; - 193CE1B123F216F0140298A506854F9D /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9787E8C8BA8DAE16D659DA569EECED22 /* Random.swift */; }; - 1A8FE1E286DA1769792CED41CA55E329 /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20BE3E8F811475C9F3E6350A16EF3D56 /* UInt16+Extension.swift */; }; - 1AAC341916DC64CD28D08BDFED57AC9C /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7953EE95375573E978E0FAC7F88260CF /* Shifts.swift */; }; - 1B2C98EB955D193734DA944CDBAF4CBB /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C39AD388A82A531C338B26EE00DB9C /* NSNotificationCenter+Promise.swift */; }; - 1B7BD089E927617EA26BDF05EAA765A2 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 982B03AB9D403479BF865D7C3A5B2D4F /* Thenable.swift */; }; - 1B9FF780BC13D12AA66605DC702CE662 /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5595E1873CFBC6061E8C6D86BFF12807 /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1DC075FE4097BF0E29641EDD65D31E86 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8151AFF003D8A45F3E0F171019ED33 /* OFB.swift */; }; - 1EAE65FB4A140803FE03F605B5B9AA82 /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D13D2441410EEFA35EFB1823E238648A /* Cryptor.swift */; }; - 1EE960C5AF0D4947CD23926FF20C2134 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D6CFCC98052B542B8BD8050E0204993 /* Box.swift */; }; - 209C8981858102B13060DA6A94BE0170 /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = 08390C702E93A122CAC37BDF6A07A98C /* scalar_low.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2177A7B4F26FBB839E1C3F07A82887E4 /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE63C0E40FA294F6C512967711E56D9 /* AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 219282246EF9A166FC2BD24AC6997C06 /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D0947D47B9CECD59BC73EAC48D4ED27 /* HKDF.swift */; }; - 21B1C23EA3CD320C60DE1B2C4F849A2C /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = FD3D00DC2D85B010C2EB60CA78D22508 /* hang.m */; }; - 21DE72843C7B514A5D846FB52A8976C0 /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 310A618141B833B61214988468629C13 /* ecmult.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 226FF2D2465A03E4EDF572BE5AF88E19 /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 860EF39282D8941084557A3DCC1D7DF3 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 228339669ABE224EA8C7AE49DC9EE0F8 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5116359962EA1905AC0EB7121E634D9F /* ResultProtocol.swift */; }; - 22FF16F6223F01F3AA966B2E701CBF89 /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = D286B6A0694F7E16078B8E7642CAE6FD /* Generics.swift */; }; - 24D38DE85704AB93DCA1AA003FBD6729 /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86800F1D45016DC59C9BE8B9ABF5B50F /* Bit.swift */; }; - 251FC364DD9D317AB3F31F99BA809724 /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D903E031FC7FD31DA94E1EC68778019 /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 25ADF91F59CF38DA37B5155F3E4D28B8 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68CD2728F142362B577571D597A953D0 /* Promise.swift */; }; - 25DB619FFE4DED74D902A70CD2642ED4 /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B152212D05CB08C4E0B61D8CDFF12C9 /* Guarantee.swift */; }; - 27068BF23AE89103AC017DCE533A0B84 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = AFD5882A04E0E27679FE6AAC8D9CA935 /* UIView+AnyPromise.m */; }; - 272DA3B8E6A36A340F174862DDF47CFA /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC86A3FC56A1BAE1CA3490D081E47F3 /* Checksum.swift */; }; - 274467E80B57985D276837BC38F63C9C /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68CD2728F142362B577571D597A953D0 /* Promise.swift */; }; - 279EAE9173342F41D610247C9B8788DE /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F8B31678A829B043331C94E279F1FD9 /* CompactMap.swift */; }; - 27CC89021B6035E3D3077405BF7D0518 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEA9421290E9294FEA25D9F6D3DDD24C /* Error.swift */; }; - 27DF4C9F60541A50E1E4C29080D83278 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C39AD388A82A531C338B26EE00DB9C /* NSNotificationCenter+Promise.swift */; }; - 2A1509546A4F640E1538711DAC7F3FFD /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = D9A9A6187028CC6AD623334BA2899FDE /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2AC384703D326D9D63AC130A9FFAF78E /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 506B39E37C9D076FA278322A078D548D /* UIViewController+AnyPromise.m */; }; - 2AE019C6FBE28F14BBCF9011859E76C2 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ABE33C91D6B128E8B104ED3630B6ABB /* CBC.swift */; }; - 2AFFA6CFA6FD4C6C4CF3FE7F256F8B04 /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19725B1F6B394E3B97BB387C7E4E4874 /* NoError.swift */; }; - 2B3F7B28D29AE55CF915EC13A381D462 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = 07CB743A805B99BE84DD49F8D999BF5C /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2EDCE4A3A80772C88E0B4031FE4D86C6 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73043D2C83B1F1E5EC8F0E15C2CFE5A5 /* Words and Bits.swift */; }; - 2F6E8156D02A841E2616F0996781F15F /* Result-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 28AB30A05C0D17ABF7D0DBC475F93C23 /* Result-macOS-dummy.m */; }; - 318456407793AD399D02863A812ED6DE /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF137216E20AA1BF3FA0B1A647DB89AC /* Operators.swift */; }; - 318CA76F82F67216CF65AABA4466272E /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = F5AA52D2E5DC0134CBA0CB3219327A53 /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 319DAAEE886E1752C38A946984071408 /* scrypt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F0866AEDD788E4D8B51A31A2FB8C294F /* scrypt-iOS-dummy.m */; }; - 31A75721375ECAB73790FEB75766D87A /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = AEB5F00EFE918C35C091FD2FA7EACBF5 /* group.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 31D346420CE39369D66215B21F8A3337 /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1BDC161E1A001A666E01A22455E14B5 /* AES.Cryptors.swift */; }; - 320D4C619C3083F47C00012810B2EAC4 /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 37B67C2B42A2EC2E689AE41636261351 /* scalar_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 324A108EF1509B26512277B3C3BE7D2D /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C9CD6920241610BE46DBB9D591849AD /* field_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3379FA9A4DA05C88936306809AC0EADA /* Result-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 74F90CB37B5FF688D45EE372C6FE875C /* Result-iOS-dummy.m */; }; - 337EA355DE058979DB126870227A42DF /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D5F98CA61161B592980B259143F48F5 /* Floating Point Conversion.swift */; }; - 33FA2A0C3B7394329B6B9B32D5EE53A2 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DE92E2A606B96369F79D742DFACB7C9 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 354D68B8C8B6D4C003BDB91E8A1D680A /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682CE9677672C1F944AA2896D3BD36FF /* String Conversion.swift */; }; - 359269757B7FED4424DD9489F42BBB49 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28D6357617301A15F1861ECE0B2D728E /* SipHashable.swift */; }; - 35D45B19269F07EA96E6F003C6A1F04D /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE7F6BB14F19AC57CB96B2D06603E845 /* ChaCha20.swift */; }; - 35E543DC36F19E32B3EC8F6652420EEF /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 062A95E74B96944BC0E3A674E72AE85E /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3607BA990F6961ED7E0401406A565C07 /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 63C148A221559836C278AFFB2F0C6D3D /* num_gmp.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 376C09B5EF8BAEF6D7450FDD24DA2530 /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = D7009940ED0BFC1AA385433559754C27 /* join.m */; }; - 377C6046F93E7409F3996D06ADAD4CC7 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28D6357617301A15F1861ECE0B2D728E /* SipHashable.swift */; }; - 37B89B7042E76DF933791631E40CB4AB /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7739AC49E92EA0677899D077C015CE05 /* NSURLSession+Promise.swift */; }; - 3819CB7BE87DC385D208FF40C7199DEA /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC0E5DF49745E221D708C75FC2B03DC7 /* AES+Foundation.swift */; }; - 3867CF007FF0AC14F07271D9E60154CF /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20BE3E8F811475C9F3E6350A16EF3D56 /* UInt16+Extension.swift */; }; - 38D8B82703E87B790A4D8C9B749644DF /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 809F44457475B204EE242D251FDF9E8E /* Comparable.swift */; }; + 0020B3469BA74AE230A3980EAE138C7A /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 0DCAB923DFB091E9F4A71F5FD29FEB40 /* field_10x26.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 01349159EBEDEB29A5C35BA3B387F596 /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = C174EE4F0CE9A869F2E898CFF8A36484 /* Poly1305.swift */; }; + 0194087258D01A6AAD57DD0DCF7F9971 /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F20EF6148A6A9322390DD71721B5343D /* NoError.swift */; }; + 030B22879409F834B4FD21C5F8DFDDCD /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 0DCAB923DFB091E9F4A71F5FD29FEB40 /* field_10x26.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0315EE301733CF0DE349A0C9B65C177F /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = C174EE4F0CE9A869F2E898CFF8A36484 /* Poly1305.swift */; }; + 0416379BA218FFDEAF901B16AD09831F /* CryptoSwift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B9103BCEE6F57F21DC2CDA536BA8D0F /* CryptoSwift-macOS-dummy.m */; }; + 0698C088B99DA6A050F31AABA173ED61 /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = DF72EE1FD04A0B49CB495E9980F6B8A9 /* AnyPromise.m */; }; + 06AFCBEE04085CA117D6CEA63CF64C27 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E664638E84199C40F931B3593272F8D /* NSObject+Promise.swift */; }; + 06E5B8C23C8BCD1E8F04C48C360B615E /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BF71F803FD375964F60D0271834711E /* AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0803200FCF34AD13D541A796839CFD8C /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C93F4B7E331943729BE3CFC4F439C2A /* ecmult.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 098D227D8DAE7643ACDF1DBCE8AA4264 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5430F65435F42C41489D6A5D36494E0B /* Array+Extension.swift */; }; + 09BAF87C5E1AF9E3EE4DEA24FF666E43 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0CB4379D0092F51F5C1232B3CD03D3 /* PCBC.swift */; }; + 09BF24BCE4F4A393B8E2A8FF610FA924 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5A15DC755B12D8CCABB5B073B63856F /* Utils.swift */; }; + 0A396743B4ADF0FA7C12FDF1BA2C5F14 /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9883FCDA0DBDA6DCA8C5923AB1B3F45A /* CBCMAC.swift */; }; + 0ADC230F620426946507547899D899B6 /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = B8EBC720E3207E6F08965D7549AAFEC6 /* SwiftRLP.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0B3D630F66F9E1B3BC7A654E42366967 /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = F7ED977AF2E31DEA78D850BDE6C9F601 /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0B987FF04FAAC3E2C96DBE0C52BDBD62 /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FB6255E4560252B9DC0BE760F34C261 /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0BE78CEAD41114017D74519E3B67A0A2 /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9A9A0105BAE9E5BEE9ADD4B17A58DD8 /* Deprecations.swift */; }; + 0C3EF791FBE499977F647EE7635CC4C9 /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27DE68FEECDD098908A9003BDA40307F /* Updatable.swift */; }; + 0C67CB16C374D9368E38EB149B7CEEF8 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 582D7324492EFDB22783F0B7B2FA6859 /* Thenable.swift */; }; + 0D05ABBC7CC7C8489D2A4282581CA5E2 /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = D4C96A2C2C3B9F8977AD08B6FBEDE552 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0E5539016575272AA3BFC2BEC1D7EB53 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FFFD5E940B31BAEC3CCFD05B093B6F8 /* NSTask+AnyPromise.m */; }; + 0EE3C6323A8EDEAB638639DD05932581 /* ABIEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6314619E8FCD5D07FBD2BA0BA5C58C15 /* ABIEncoding.swift */; }; + 0EF9D11A3631D7F8BE44552285F4A63F /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E13ACAF5A7893C3C300B8B880422662 /* ecdsa.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0F4BC161113C9EBF41626D66606EB70E /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C43D53E5A934E216CB1B7DD01DE877B /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0FA9B674BE83227DB456D1E8CDBD426A /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = E94EF5B041036E702BC404B7118A8F9E /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 103C1056FCEF16B87FAC9DC37BADA0AF /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = F7E0FE543A2A814147E52BD4424892FD /* fwd.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 11B9993FADEB6211B59663345DE5E978 /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 4624EFF8C97C1CBAF2910297112CF9E8 /* lax_der_parsing.c */; }; + 11D236D734F12042B70BB21010A7BB31 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32E6FCC003B1158AFE68C8101E9DC9B0 /* AES.swift */; }; + 11F368D67F8A1E7E97B1DBD198C94069 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = EE9322C93C8E91E65E7CE9C01CB02F70 /* UIView+AnyPromise.m */; }; + 12E9BA35700BF9E489BC75ABC6088E61 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 874DB4C8A2FF4D5197C42063F7939C9A /* Result.swift */; }; + 13F006A331F4F7D1E7A9C31C925C8434 /* EthereumABI-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 98229C7D8E3906BD4C8DCD833704588C /* EthereumABI-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 149D4B201B632E438223FBA71B4394D3 /* Result-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0536186C77B05CB18765BFD4670AC3D1 /* Result-macOS-dummy.m */; }; + 153311AB46ACF9C1960DF5E52EF0E7B9 /* Result-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 279857EBC2D837FCAB656991E73C8C39 /* Result-iOS-dummy.m */; }; + 158F6BC9635AF0C4F8FCAD1FB913BB45 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDB10140BE59AEE481C7E08EDC79971D /* Division.swift */; }; + 162C34742BB8CDD3E2987A46C854F282 /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F20EF6148A6A9322390DD71721B5343D /* NoError.swift */; }; + 16430D1306BA11693EFE55BE2052FBEB /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3654C41FDB74088592DA713158476E5B /* Padding.swift */; }; + 16DEF17C280AFAD959ECEED27F7FDCD6 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71C4ACD478692712EEF2FF8BB7F4A160 /* AnyPromise.swift */; }; + 1726CE463B9A337870F28E208B8F268E /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CBF6B2F887499D9631619E0D53008D /* BlockModeOptions.swift */; }; + 1736288FC9BC2391AF96F9CCBA1A27D2 /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840549A6DE0F91C91EE1712E3C57D6ED /* SHA2.swift */; }; + 187B191D2E4399E1567DB24BD93F0486 /* SipHash-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BF0D275DC3AF207D0A444A28CB773AA5 /* SipHash-macOS-dummy.m */; }; + 1904E18F6CE01618BBBC1B31E43B64EA /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2AB0FA3FFAC3EBB0D9CACE786196AC1 /* BigUInt.swift */; }; + 193CE1B123F216F0140298A506854F9D /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = C04C575F1277CF14F506F691F9C669FC /* Random.swift */; }; + 1974CBE5CBA7E90AF2951744F9F700DA /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F106BE3FED3F7D139A061124A9FF0251 /* Cimpl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1A05748E830513D5B126B463DC61CA60 /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 12EC94EA370709920BAE52B23A048E1A /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1A8FE1E286DA1769792CED41CA55E329 /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E5CE0F5663064C7672E5299F1B3B7DF /* UInt16+Extension.swift */; }; + 1AAC341916DC64CD28D08BDFED57AC9C /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F4B350BCCE6D995C937B1D56E4F9022 /* Shifts.swift */; }; + 1ACFA20B8643D974578D0B37E658A0A9 /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 12EC94EA370709920BAE52B23A048E1A /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1BEB60D584CDD65F08A874EC1961CE4C /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A051E774D4D49F8D0B94D9E529E3A524 /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1C4DEFB88F8A0938532DA2184D2402AC /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49C5823B0C264F4AC2DF38C68F097FEA /* NSURLSession+Promise.swift */; }; + 1D68B343368ADE35129C5CDCCDCCD468 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 49F74127A936A7C34D38E84140D1EFAC /* group_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1D9EE21994BB9C1FDCBA47554188C89B /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = F265D345562C600DE93E2D4EA31ED76D /* Resolver.swift */; }; + 1DC075FE4097BF0E29641EDD65D31E86 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 258EB69CA13649BFEBC389916A418DAD /* OFB.swift */; }; + 1EAE65FB4A140803FE03F605B5B9AA82 /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F2F682F960F536C585085773DF5BBA1 /* Cryptor.swift */; }; + 1F193DAAE1079FC10178E752783B032F /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E9C2CC8E90A38FD011723EB814A5A52 /* scratch_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 201B3540FF03FB8315A0024F4467C68F /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = C799FC61BB50110B0EF9812635A7CF8F /* race.swift */; }; + 213DE58F64F93C8508CCDEBE7CBD97D4 /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = E9FDE304B6122EEAE8A1FC91742A69E6 /* scalar_8x32.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2143F6BFBCB27696AC66E1E88312361D /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80ACF3AED1948ECBBAF9BEFFC3482423 /* Extensions.swift */; }; + 219282246EF9A166FC2BD24AC6997C06 /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FFAEDF6DDF0B48C4B8E16F6F9C59A5F /* HKDF.swift */; }; + 21B3C21C7A16A522F0F463F9FB046A5E /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = ADB4E2DA064200DDCD42C634CBC39977 /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 21EB006D3FD9C27B88742E512E7B227D /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D1B636300E29159DFA920C5BA2E5F7C /* num.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 22D545D72C019120381A23F2008D216E /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C93F4B7E331943729BE3CFC4F439C2A /* ecmult.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 22FF16F6223F01F3AA966B2E701CBF89 /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EF69CEB8B2C8F6223E5A84FF9855D71 /* Generics.swift */; }; + 2369A748CC5CAD0D29225D30090B0131 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 582D7324492EFDB22783F0B7B2FA6859 /* Thenable.swift */; }; + 2469775BF29544EFC833E726E761A6D5 /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F90DB66AA0BD6E09A8253873368008F /* AnyError.swift */; }; + 2477779866B98A08454D05619FA403DC /* ABITypeParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4F1681CFA49EA17D6A73339A9C1A44A /* ABITypeParser.swift */; }; + 24D38DE85704AB93DCA1AA003FBD6729 /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92C1E2F71DB75395E28DC3213425381D /* Bit.swift */; }; + 24ED5E0F58443FB2E91C07D5B453E591 /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E13ACAF5A7893C3C300B8B880422662 /* ecdsa.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 25851E22505E49BED0DF4DAE6C033724 /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = F265D345562C600DE93E2D4EA31ED76D /* Resolver.swift */; }; + 25B3A19A863EF1BC095B228C6CC55239 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EB87A244E5248ADD8D124225B21323F /* PromiseKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 25F9AEA143C2B354BBD7BEEEDECF6116 /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F4EAABE2F37A5C4CBF734D74EA94EBB /* UIView+Promise.swift */; }; + 2688E6C9E4E219F10E1154D94A3353B5 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = DD5583797A4DF2B5636D036CDD472CD0 /* hang.m */; }; + 272DA3B8E6A36A340F174862DDF47CFA /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C25934B3D3377624DF16153BF76578 /* Checksum.swift */; }; + 279EAE9173342F41D610247C9B8788DE /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C619FA5855429D15B556163471403E5 /* CompactMap.swift */; }; + 28228E86E8A57346F45744E805645CC7 /* PromiseKit.root-CorePromise-Foundation-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DA0CDB938B1F875D679C20362C887E17 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2A7E41504F95438DB79E852FB720F8B8 /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D8573A6F8E2A67DD73406C5B3ECBB5 /* join.m */; }; + 2AB0EAF55461D364004CD6F3DAF5585B /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = F3BCAAFEDF865BD7F6D1C36246EEE02A /* field.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2AE019C6FBE28F14BBCF9011859E76C2 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224F4E958C4909EF47CB0A9F43F48030 /* CBC.swift */; }; + 2C47366FB3A3D0F2A380489DC0AB4EC6 /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 07853D5BF50E26B878B7B1D18CF18F06 /* scrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2C573766EEF17A6CCBC46524208BCA4D /* EthereumAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = C4AD5698CEACE94C1CAD1C0317E14905 /* EthereumAddress.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2D6C2BF004933839288FE0AD05169574 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = 516F61020B364118837B9099CD918F5F /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2EDCE4A3A80772C88E0B4031FE4D86C6 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D6E2E2ED41464CEB00832B492D67ECB /* Words and Bits.swift */; }; + 31280DB99D63393FE7EBF701C18A7151 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = 516F61020B364118837B9099CD918F5F /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 31648EA9AB41381E4C683FCFD69B5B97 /* ABIExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E4AA08906784FF9AA2B198938456276 /* ABIExtensions.swift */; }; + 318456407793AD399D02863A812ED6DE /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = B468DE556C27A7C396C7B5ECC7DCF12E /* Operators.swift */; }; + 31D346420CE39369D66215B21F8A3337 /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = B453F34A70203AF07F27C5AE1B2A0518 /* AES.Cryptors.swift */; }; + 32DAD7BC31D1813B10BB3069A4E8A563 /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = F3BCAAFEDF865BD7F6D1C36246EEE02A /* field.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 337EA355DE058979DB126870227A42DF /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0930D7CD22CBEC2C752C14A123807624 /* Floating Point Conversion.swift */; }; + 33E0957D577926FA5916FE4D0A9A431A /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 247DF1F9FE8902AA1A74867E7854662F /* dispatch_promise.m */; }; + 341353A9C8AA2DF577CD96527EE2225D /* ABIDecoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7A2D1D0062F350907B747E2A192E438 /* ABIDecoding.swift */; }; + 3415B2D18705344A178286314A9C0038 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 874DB4C8A2FF4D5197C42063F7939C9A /* Result.swift */; }; + 354D68B8C8B6D4C003BDB91E8A1D680A /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68D5DF1B1384D6392013199F71BACD06 /* String Conversion.swift */; }; + 359269757B7FED4424DD9489F42BBB49 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B99B34DE805578131F4C0D5BFE276614 /* SipHashable.swift */; }; + 35D45B19269F07EA96E6F003C6A1F04D /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = F62C08D51F07D8799AD6CB646A710F41 /* ChaCha20.swift */; }; + 377C6046F93E7409F3996D06ADAD4CC7 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B99B34DE805578131F4C0D5BFE276614 /* SipHashable.swift */; }; + 3819CB7BE87DC385D208FF40C7199DEA /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9883A143C0F77B2C2AF7E05BF805F25 /* AES+Foundation.swift */; }; + 38261BBD61EB4CE9C0D8D02EFD788CC4 /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = B9A05629BB0205300B694B527AD16E56 /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 384CC535308CA645694E4C8ABAAF97F5 /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A1687163A14D55D2EF896A97CD937491 /* hash_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3851107FB3FA5A4E70BE628AF438BC19 /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C4685C831E862AD0F75DC78A3A5B61 /* Catchable.swift */; }; + 3867CF007FF0AC14F07271D9E60154CF /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E5CE0F5663064C7672E5299F1B3B7DF /* UInt16+Extension.swift */; }; + 3873EA28EA1C34A735654F3652FE1237 /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 58FEC74B279A9D31ADE339DE27E86FA9 /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 387F8491EE0600C1B119837221A22252 /* ABIParsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B3D040637E19F37C0D7EB3C1A6A991 /* ABIParsing.swift */; }; + 38D8B82703E87B790A4D8C9B749644DF /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DE5DD5643C155A18A460273094ACDA1 /* Comparable.swift */; }; + 39681148F2D32BE962A511F427CD42ED /* secp256k1_swift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CC444A933C805567A3F012F3CEE72D08 /* secp256k1_swift-macOS-dummy.m */; }; 3A611A77C4E834E1E7F375E6362DB0D7 /* Pods-web3swift-iOS_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B56F6A20A0CF698ECA0EDF6CF4CDD74 /* Pods-web3swift-iOS_Tests-dummy.m */; }; - 3AA32C95FECA68AA3FF571E0F0AF83BC /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 93A5B46AC7CC995589CAA3D991DC1B29 /* scratch_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3AC07C0FB85EDC81532D78FAB99C85B1 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6633CE6E0F4DA082E8A3374A723A4844 /* BigUInt.swift */; }; - 3B0D18B9FCA958796CDACD6710637030 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB290FC3F5ACF0789F4078C376E6ADED /* Array+Extension.swift */; }; - 3B3E08848BF8EBA88438CCF84389B07F /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = E7E7786C2EC1054AF047E2571B12205F /* util.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3BC2BF6E6B27BFABAEE1C5B8AD2838D7 /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7D5FD5536C89792D33769E9EDFA2DE8 /* CFB.swift */; }; - 3C698382149E46B98B05858131950249 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43941A9CA2F209289C333306CBC5961F /* Process+Promise.swift */; }; - 3D6F8B4564F5BAF43F01ADCFBA720658 /* EthereumAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CB204BDB01A5747B116731490529E2B /* EthereumAddress.swift */; }; - 3D71156680EC3D94A6E1441546C57E6B /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 3ED02D5B7EB6BD54C515B4B06599DA5F /* scratch.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3D80464CEDFAD819CD4BCB5190A469E9 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95F76B715633F358CA7525D8C17738C9 /* GCM.swift */; }; - 3DEC2D219AA42627099A9C723B66AB97 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = DF39D90FCE7EA42EF346003BA8EF96AF /* ecmult_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3F474D94A325AFDB74206B0CD0790920 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBD8BA7DCEF1E0FF9602E3F7BE941878 /* SipHasher.swift */; }; - 3FA010055B3BC4813A4245727D6E2AE7 /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BD790D4294FB459BB05017C05CA1F1E /* UInt64+Extension.swift */; }; - 408DA994AB51EFFDD47DA8B29108EB0D /* SwiftRLP-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D4294CA40AB575970217A19CAA320DC0 /* SwiftRLP-iOS-dummy.m */; }; - 41E4BB16EA30C7552FF1E3CA6BC0491D /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98A9FC519C49C693637C4BC5D0DD6EB7 /* PKCS5.swift */; }; - 42FF2C1D3648C354550AC88EE5E64B80 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755E0B91B0984ADEF77E48E32C147276 /* Data Conversion.swift */; }; - 431FDC470CFD299BE8D98F92F1B01B60 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDD6BBAF4F23E405AA0CA5AA2837BD9 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 441F98C26072F42F773DDF5C14AC249E /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC0E5DF49745E221D708C75FC2B03DC7 /* AES+Foundation.swift */; }; - 447C407907733320787E8F23946656EE /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7D5FD5536C89792D33769E9EDFA2DE8 /* CFB.swift */; }; - 44ACCC6BC3804034F682166BCB280D6C /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF94FCFAAA2F4216A2F89F43E2CDA4DA /* Catchable.swift */; }; - 44AEE69C5AA31A84CCEB7534C0855D78 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D292A1945503B3A000AC47BB73889903 /* String+Extension.swift */; }; - 44F4771652CF7E4CD82AFFF61B0ED567 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8151AFF003D8A45F3E0F171019ED33 /* OFB.swift */; }; - 45482DED636330B9BCE4493225B66813 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 809F44457475B204EE242D251FDF9E8E /* Comparable.swift */; }; - 459BB256132E1224D00C02FA4678450E /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A69383BF153D7728F4793AB68C3C4 /* hang.swift */; }; - 465C38010042DF8DAEFA492DCE294A36 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFCBEFE9DA6D7F361DBB180EB84492D2 /* BlockCipher.swift */; }; - 479CE094426E3868726526A833D58F21 /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 255F9BD02565315A20D36910794D0C10 /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 480D4F1A6DBDF15BDEE2611663CB3BED /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 3ED02D5B7EB6BD54C515B4B06599DA5F /* scratch.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4876BE2384F8243077AD5F55AB07AC4B /* secp256k1_swift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FB320DD9FD83A5F3BAADF33818736C30 /* secp256k1_swift-macOS-dummy.m */; }; - 48B50CFAD0E4088080A109DCA7B8688F /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E942712A2D0087AAF697A0E031459FE /* CMAC.swift */; }; - 48D821F48A258CA9FCC0524545AF23B3 /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FF1BE57EBE989B2B7EDD166127B5FCD9 /* PromiseKit-dummy.m */; }; - 48EE55837C3546B46DFCD59737CEDC3C /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAC966A4293FF7689DD8A3B2877731F3 /* Blowfish.swift */; }; - 494A8C06290340CA7C968264669CD5C0 /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D44F8F4C5F0D588B00DF17BC6518E5E0 /* Rabbit+Foundation.swift */; }; - 4971308DFA5E58345B78AA42538C65DA /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 9821B82F2A2D9E9E0A740B6B4B38A6AB /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4A9382D54AFF6BA0D34C2BE46245192E /* SwiftRLP-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F03C5346C1BA44E2325916DC9CE7B67B /* SwiftRLP-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4C20F5836E09BEAF0175C7F5D2D45F89 /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19725B1F6B394E3B97BB387C7E4E4874 /* NoError.swift */; }; - 4C82B6EF64C041919BD1BDFB613CA7AF /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE7F6BB14F19AC57CB96B2D06603E845 /* ChaCha20.swift */; }; - 4CC995FC29A8A8E8C8C0B0B97A8C5486 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C3F64F8D233B557ADBCBAB5F8D81F1E /* dispatch_promise.m */; }; - 4CDD68A843BFBB60D9186F29785293F9 /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 1D7B42933B2D81EED52706C7200A9732 /* lax_der_privatekey_parsing.c */; }; - 4D47DC986746CEF8703D74068A8201C3 /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93264D7DC7DF888A41AF35694C9CBF60 /* BufferStorage.swift */; }; - 4D7DEDC820A1EF913455BC0FBE72FBD6 /* BigInt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A516C73CD574B0D6BA84C38BB55FBD2D /* BigInt-iOS-dummy.m */; }; - 4E0086DE48C75B11B8E2D08041EEA2A5 /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93264D7DC7DF888A41AF35694C9CBF60 /* BufferStorage.swift */; }; - 4EB23EA6CB130E3291B0776D3862D748 /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D44F8F4C5F0D588B00DF17BC6518E5E0 /* Rabbit+Foundation.swift */; }; - 4F70068CDD913C18026C4A968EA92E9A /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31ABCFEE7AE67562C4CEBB66C7ED4D6 /* ZeroPadding.swift */; }; - 506BDA80E1D1FADE6D2EAE8FE6533C13 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = F1899C74540C37F7D84214CF9F8AD010 /* NSNotificationCenter+AnyPromise.m */; }; - 5085168C5F297AE562EBC81151EAB02B /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = 423E241FA5BBF42BFDDA5E6C6AD2DEB9 /* scalar_8x32.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 50DE88114B7BD18A98F0F45A972079E3 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE3D7030BC429403BBE50F40445229DE /* SecureBytes.swift */; }; - 5145AAE99352DBF420419223083C6C25 /* CryptoSwift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F310D1B89DD81708BBBAED0DDF1B1168 /* CryptoSwift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 515FA154B65878E6DEB79E513C7F7FE3 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F115779D04B6641A1DB99D05887E03 /* NSURLSession+AnyPromise.m */; }; - 51B79A81BE02C232299A5DA47E988277 /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D57256C33A9C97F888F53A4FB7226146 /* UInt32+Extension.swift */; }; - 51DADAE211CE77CDDD762DF1F5FAA236 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89B539CEC7927EBE7BBF7262580A0E18 /* Exponentiation.swift */; }; - 526530B8F45F2C42F4B731C1BC05C532 /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 678FC45FCDC1237D6344CFADDB22F228 /* eckey_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 527E46A66487D9D5B3FF54359A3951EB /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D98916544A0C622EDB88411AE57 /* CipherModeWorker.swift */; }; - 52D04CA795889A574DE97357217965BE /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF08003360A2A59E3E059CBC5496E71 /* ecdsa.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 54275399FAE4959C9EEAC7C7E8EA2031 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840434A830881CF07FBDE172A20CDDDC /* NSObject+Promise.swift */; }; - 5493B45FC1BD542111A20AC6A58EA0B1 /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3E0EFDBB92A100EDE06E9D563ACF26E /* PKCS7Padding.swift */; }; - 54B975339087EB52B33FD2013118BD0A /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3ED371C14676A66BA35BCF542FF8B548 /* hash_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 54CD3C94770F9985D0EDD8AD2D880EEF /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71D09134607D15AB2D81F0CB08D3F055 /* AEADChaCha20Poly1305.swift */; }; - 55368A922AD4C49FF4D8A4042ECBB7F3 /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = C66DD520FECE2C1EE69FD6A9E23EA032 /* field_5x52.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 55620C107463741AB202D7B93B8AC47A /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFD1168E711269E444E38FCAE0B8E5D9 /* UInt128.swift */; }; - 55714E2CA2C818B9BB609FE4303A7AE3 /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F6102F002EDC216C49666462EF952CA /* DigestType.swift */; }; - 557151A9F797E462E701215A27F7DC21 /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ED58E829B835009D9DCD1D8B959FBBD /* Digest.swift */; }; - 557E070EDC1D983960128B12A77AA293 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB4E43C9EB1F78AD84B2314039898608 /* GCD.swift */; }; - 5638014E129B104ED47134518667CC68 /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 282DD884F817856F0FD3D38F8A4447B1 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 563C641A5D7264103E44BCDCC6C6C887 /* CryptoSwift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 26BEF092AF19B017CCEAC5BD6EDFADBC /* CryptoSwift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 56996A02B3DC920077AB801E4E8A0A15 /* Pods-web3swift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E8C19543EF3AA4D9801DBE55E22E211 /* Pods-web3swift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 582EE7A8797F29AD814C0F877E811808 /* Pods-web3swift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 25F72E78DF48560F5D210E57844ACDED /* Pods-web3swift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 599CEF91B917F7C8758E1E13C50B2A90 /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03321ECEB201CDE70DA4F88EE48E2044 /* Salsa.swift */; }; - 59E8068AD7D81375CF6BD6C079A6CD52 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 17856FB7A41BDDB75285F531B03882F4 /* PMKFoundation.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5A7A8C39583FF9303788AA4DAFD6FB1F /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 255F9BD02565315A20D36910794D0C10 /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5B4044B103053232D6A987856C610367 /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441A9CACC96EB9A41D4ABF90FDFFD2C8 /* ChaCha20+Foundation.swift */; }; - 5BFB61E4B72C16BDD714663095E1E602 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F115779D04B6641A1DB99D05887E03 /* NSURLSession+AnyPromise.m */; }; - 5C07AF157556B42E17E1E32A4AEB573B /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 062A95E74B96944BC0E3A674E72AE85E /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5C34CEC8C567D8A533F9FA1327868C96 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = FD3D00DC2D85B010C2EB60CA78D22508 /* hang.m */; }; - 5D3C0267F1EB78B6038FF2898C20A737 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = 0554DC016A3872F60738FE5C366CAF31 /* ecmult_gen.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5D6A8FBA67FCA90E5B02979DDE6FFF43 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 681146D3345FF5156D09E271666D5EA1 /* group_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5E141CAFCF233DCA8F297AA169BA6AE7 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = E022DA9B1DCAC9A88B18D90457826545 /* after.swift */; }; - 5E1BA68C47D734105DD418DE2C795B71 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 86B004B7F6AC62E27D75D02978601A76 /* NSTask+AnyPromise.m */; }; - 5F569BB3EF9E99550253E3309677BFD7 /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8262D72960A17572931F11EC9520938 /* secp256k1.swift */; }; - 6121E601434E10D5CC3A01A2C815B0D0 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EFDF78EEBE9836CDC5AE2FEEC50C17B /* Utils+Foundation.swift */; }; - 618CFC75E3108B18C4DD15C12EC58626 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3A44C98D1E93465803241C08887CDD /* num.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 61C9BCD007508C2CB8959FA50BF0F53F /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3487EA794F9422FD28689C37156DD9FE /* Addition.swift */; }; - 62A5DF1DFBEC0FD06FC3C895F4447790 /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = D8241FAE07EC659EA8EE9D035AB05377 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 655C7AAC2D964E8A317BD69CA59F54DE /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D1D500C8CF88FC87FF7FA43DBC53611 /* AnyError.swift */; }; - 65D0354F4B4E32CBA63ECDF84AFAD283 /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71D09134607D15AB2D81F0CB08D3F055 /* AEADChaCha20Poly1305.swift */; }; - 66260581693FDC3DB887738136636C8F /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D1AB32F0AE7B734159BB1FBAF7F5078 /* hash.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6663694C763AF2F46E6A548540FADB3C /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = E65308F679CCAADBBF14F5DB4971CD21 /* Cimpl.c */; }; - 6817327279945D8425268EF14CDDAC21 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03FE099622DA426E4CBDFEB30B374591 /* Primitive Types.swift */; }; - 68CE1BEB5DEB9671E24DE87773BA920C /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = D8241FAE07EC659EA8EE9D035AB05377 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 698DB1FA7FF3234946A86E51AF828F39 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAC89259204E1C6A18BCD0B7D08C104B /* RandomUInt64.swift */; }; - 6AD72DAC1AE026743E0DFDE9E6854763 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = 944A08F05724AD8D1EC4F7FF0D09BFE6 /* scalar.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6B71498DEADD20033325A53D27E6191A /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BFCCF45D62D69A50F9ED16BCE93C54A /* SHA2.swift */; }; - 6CED57BC415DF0F388D893405FE3DC3A /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B019A1B56440DDAB3267B96FDBD576 /* UInt8+Extension.swift */; }; - 6D0468F188D17EFAC5C4655473D99D74 /* UIViewPropertyAnimator+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D4F789F0354155D07BB3A1463344281 /* UIViewPropertyAnimator+Promise.swift */; }; - 6D4618F519FFEDB9117FC4341C7F3F4A /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49A1004ABA6FF6BBB692884F59131E13 /* Utils.swift */; }; - 6DC3B988093A7855E6880FFE8AE3D3B4 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F14C976AD41B0817186FB67B3B349B /* Data+Extension.swift */; }; - 6E1A1FD632248BF8EA8C08628B1DD44A /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = D286B6A0694F7E16078B8E7642CAE6FD /* Generics.swift */; }; - 6F5B521B508C0230EF8488842DE2C905 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBD8BA7DCEF1E0FF9602E3F7BE941878 /* SipHasher.swift */; }; - 70331820D199129F5DD2EF9609699F32 /* PromiseKit.root-CorePromise-Foundation-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 08CA1065DA6D886DAD8978D531C6C531 /* PromiseKit.root-CorePromise-Foundation-dummy.m */; }; - 70C08283C27C54420E80CCFB8C2CEB18 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F14C976AD41B0817186FB67B3B349B /* Data+Extension.swift */; }; - 717B05FECD48B3ED8481296EF0CCF350 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAC89259204E1C6A18BCD0B7D08C104B /* RandomUInt64.swift */; }; - 723881423457C16AFC563593E5F5B7E1 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B36B7C3689A1ED9FBF4095AF74840 /* RandomBytesSequence.swift */; }; - 73ADC70790A1F8DFBCB7B7F2D1A2264E /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1422C640D1B145BC997D3E0A3FF10339 /* Extensions.swift */; }; - 75F745A947766D56938C0215E2A54C9E /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = BA200D6941B69ACC080DFB132BEFF422 /* num_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 76A9DE7C8BC7B646D1A0508BF1A38A22 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8AF5512E4598482BBFB4AD1BBF8064 /* PKCS7.swift */; }; - 76E0382DDD9E348354DE5C5F8120D2B8 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC4C922D64767063B8D1A270D793373B /* BlockEncryptor.swift */; }; - 773013B84E21E3867773BCAB6E171CBC /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7953EE95375573E978E0FAC7F88260CF /* Shifts.swift */; }; - 78638EB4FF9E1219EC7E04E8B97EB448 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14176496814CB0D56F198301D279FE65 /* CCM.swift */; }; - 78DCC64E4BB4C69177C5391DF4BA6119 /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85BEAAA1888D13FCFC9F1C2AB3A7ABBD /* when.swift */; }; - 79571D2CAB88DA790160FD0CDD3AEFF9 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = DF39D90FCE7EA42EF346003BA8EF96AF /* ecmult_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 79C2298346A483DD086B4A9AC7223820 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1576E0C86B6BE13F5FB685E1357E71C3 /* Result.swift */; }; - 7A0702EE936C773C38F5E4B7F21AB26C /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58F3E29F9DFEE63DA2847094AA590666 /* Multiplication.swift */; }; - 7AE2FD363C4422762B7BC5E2005F7C2F /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA3D1883E9BD064F4B9299B5825061E7 /* String+FoundationExtension.swift */; }; - 7B5BE028C02660F6A97F1D470C96F05D /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3E0EFDBB92A100EDE06E9D563ACF26E /* PKCS7Padding.swift */; }; - 7BFB63A076CB21871132CA1C68FA934B /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98C48C6F1DCE55E9EE6040D50626EF16 /* ECB.swift */; }; - 7C414865BEC16506132F9910DBD62F3B /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A86CAF979F3E970071A5FC47D9D7EAC /* Division.swift */; }; - 7C4A904DCA206E41A88861F990CDE0BC /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41FAB135DE09D3F9136D834CBE3A558A /* Scrypt.swift */; }; - 7DB10EF26A0A2F6768F695BE03C0AB86 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58F3E29F9DFEE63DA2847094AA590666 /* Multiplication.swift */; }; - 7F754A09D7EA3165D9758A80F307227E /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D5F98CA61161B592980B259143F48F5 /* Floating Point Conversion.swift */; }; - 7FE0C78E1D6CF35FD66403216909410B /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AF5980AB239F34C8CB958F30A518A0B /* BigInt.swift */; }; - 804014B054A6AF38DF4D8859000D64D4 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7695A9A41BFEEAD40C0235B913A07672 /* AnyPromise.swift */; }; - 81F2542193E3187EF95CC783A290D239 /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E8F4C6770C979220F90AD2CBA4EA3CE /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8206DF8B40704C8CFE78662D412A422E /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 612CB1FE4A4EF26D20DC64543E17C82A /* when.m */; }; - 8283888B261F0702178960767D664712 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDD6BBAF4F23E405AA0CA5AA2837BD9 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 835E647599AD20789B5A10F1E3BEF888 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D3FAB581FA1884038308CAAD092260 /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 83C9B6E62BE2665CCF9078D50C66331E /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682A1BA8289C74E7B26FAAFA80540F57 /* BatchedCollection.swift */; }; - 848EFB4F6CDA94AAAD25CCB2283E9EAA /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78AC661E237EC28BD38872134D7F7E2B /* Integer Conversion.swift */; }; - 84AD91997553D782969A046B9146044A /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F576E04543F9CA8FD11EFA190633C0F /* StreamDecryptor.swift */; }; - 857F892AC414752BEECA9829E4EA6322 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF137216E20AA1BF3FA0B1A647DB89AC /* Operators.swift */; }; - 8593AEFA684E7B84208518E6FC380FB7 /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E81CDB6F58099035E4B22900B2E0740D /* Int+Extension.swift */; }; - 85FB5B7FC1D897B946EBAE4BEAC9CE4D /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BD790D4294FB459BB05017C05CA1F1E /* UInt64+Extension.swift */; }; - 8601AFFE38D08BA40B4AED33D04654E4 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F32BA5AE4C0BE79090A24F00A3F35AFF /* Strideable.swift */; }; - 862C49A4047D7B32FA8ED4644AAF3DE2 /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F576E04543F9CA8FD11EFA190633C0F /* StreamDecryptor.swift */; }; - 8645C073FDA17B6DF8E4AADCE0808C3C /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF8AF8868130C525C8921A94220CFA6D /* HMAC+Foundation.swift */; }; - 8756026DE126ACD98A35A20C2F344F1D /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E8F4C6770C979220F90AD2CBA4EA3CE /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 87C3D298B9E9216D388BA5B0D015EE50 /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED4A3438C4739D717703BAE1F7020595 /* Deprecations.swift */; }; - 87C8D1C1A44E68BA3761B2915728AA1D /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441A9CACC96EB9A41D4ABF90FDFFD2C8 /* ChaCha20+Foundation.swift */; }; - 8972ED44B8E31FAE3C248BBCCB8E7CC4 /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = CA97BDA6DF1DE11A96470DBF6FBD7C62 /* lax_der_parsing.c */; }; - 899F8A018D26D3A321EB0481C091847F /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85BEAAA1888D13FCFC9F1C2AB3A7ABBD /* when.swift */; }; - 89AD1BFCA3B307CD78AFB34118AC031D /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3487EA794F9422FD28689C37156DD9FE /* Addition.swift */; }; - 8B4AC0EBDAD7A87FF683938E057D5338 /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3391B8242DCA2A16EB9DBB3FF0740ABC /* Cryptors.swift */; }; - 8CBF1AE067B860433B0A4BE710FFA9BD /* CryptoSwift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 09536C3B22879E31B5C0B3426E2FEBCA /* CryptoSwift-iOS-dummy.m */; }; - 8CF0A92E555F6A19FD269B16235D3128 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = AEA94352D4A3D0793D359A8C1CB50E4A /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8CFC200142682965D7D13983526BEC97 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B67DD6B4751EC541A3D153113AFB1B1 /* HMAC.swift */; }; - 8DCA7529640903D6984416665D803C1D /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF4D45B809574B97A749EADBA2EFAB02 /* CBCMAC.swift */; }; - 8DCC706DCFDBCC907AAB009F5C505F8F /* secp256k1_swift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1BBCD0009252A5C66FFA6A2EDAE25173 /* secp256k1_swift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8EAEFFBCB259C139AE42E4967BFCD638 /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9F882189D9E2CE8D7B7DC60BA0D5AF6 /* PBKDF2.swift */; }; - 8F1107E28340C0612A6D8340F38A267D /* secp256k1_swift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D08241C8DB918E40A54A24828275D1C5 /* secp256k1_swift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8FA68F40AE3928B497DDA7C8B828FE74 /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 37B67C2B42A2EC2E689AE41636261351 /* scalar_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 906F0233096CF30AA2ADD2032085E9EA /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B67DD6B4751EC541A3D153113AFB1B1 /* HMAC.swift */; }; - 911E85408B3D802D7981B85D7192128F /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682A1BA8289C74E7B26FAAFA80540F57 /* BatchedCollection.swift */; }; - 91D6972A579E54069CA6674EF1AFDD62 /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = C66DD520FECE2C1EE69FD6A9E23EA032 /* field_5x52.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9307E26E1B1DD066C1B71C66EF7B5B99 /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E75AF68728F33A9AC112BE223CA6718 /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 93BF74723D8898DC3E8DC67317C1B0EB /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC0DBFB306B96AAE65A02CB825C4F0B /* SHA1.swift */; }; - 9426948AD7CCB3A21DB5169851D17835 /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = B9737D99B060F85A0A42A3A30335B14F /* scalar_4x64.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 946EE4F3900E73B0823B57F1AE8C47BD /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 80353B76ABA10ED9D59C18FDA6A16285 /* basic-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9786160112EBD1D91A7AB61E7E585A09 /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = 7DF576FC1DAC9EC11DA44099F4F50AFE /* secp256k1.c */; }; - 97962E30EE5B5298443D563B897E4308 /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = 358F7A798EA72C8BFA7C4AA5D7A22723 /* race.m */; }; - 97AF9F3B17A049614F158AFF9AA5C3FA /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = AEB5F00EFE918C35C091FD2FA7EACBF5 /* group.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 97D8F4B9B56316BD37A2EBCC5A2B7E51 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = 07CB743A805B99BE84DD49F8D999BF5C /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9850A4E789CCD838DE17E0E7A5DCCCCD /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 9411AC5861B33542BF71A1EED7E49FC4 /* scrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 987DCF48843E8B83BE9F0B5788175D53 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ABE33C91D6B128E8B104ED3630B6ABB /* CBC.swift */; }; - 99365E9205AEA46510A70B0092872710 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B36B7C3689A1ED9FBF4095AF74840 /* RandomBytesSequence.swift */; }; - 9970A7335034C125C75BF4CC2B9F3AC5 /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 282DD884F817856F0FD3D38F8A4447B1 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9A899EFE19622CA6723D08C0F8FBB187 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5116359962EA1905AC0EB7121E634D9F /* ResultProtocol.swift */; }; - 9BB2691E8EC04617309A1B905F5A652B /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 906199A857C08F740EA182609488E191 /* Rabbit.swift */; }; - 9DAE14B88EE655354CACE65717FA211E /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD14A2D2C9467CDF73E9EC39F2B97E62 /* Hashable.swift */; }; - 9E9ABC19900EB9A2F58E05DEDE4C9C6A /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0B1B247B08E4A2259D6D21ABAB0304 /* MD5.swift */; }; - 9EF0841FD75468EF3543A5C6A25A9398 /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671394A1108646E9E210CF54FA2C814C /* CTR.swift */; }; - 9F386CB50D39A65571DCFD394C23D8E2 /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 632F66F6756738B3DBCD9FE0F29FD51D /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9F7BA0F07BB50D1DE1036928BF70C2D3 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E67F7B0700CACBB7DFD27A88EFF75C2 /* PromiseKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9F975F5CF4816CD3A6CA2282F5F4E3F2 /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0D95EE88A2B8D781795DF20E0568F6 /* BlockMode.swift */; }; - 9FA8CF326DCA266C358B26FC42191498 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F25882CAD0730D8C76F023B8C6FA287C /* Blowfish+Foundation.swift */; }; - A1636315A5B3017312CFC781DF83901E /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8354A9A75879DFCE10CDFCD8B4B76EF5 /* AEAD.swift */; }; - A1ABA5F58D2757A7C96844AE893C12D1 /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = 423E241FA5BBF42BFDDA5E6C6AD2DEB9 /* scalar_8x32.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A1E8398E1FC2566D94EE4D94B48E909A /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 639957AA1B177687176168DC8D443490 /* BlockModeOptions.swift */; }; - A26E92B79121B74FDE94799BF2A92C91 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB4C3483E321FFBD045AB8FDC37CF8FA /* Array+Foundation.swift */; }; - A2913E511FD4FA1AAEB9256360C0AE51 /* PMKUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 614D3F652018D0D4BB869BAEEC3BFA5D /* PMKUIKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A2A378FB0E28CFD130DD02F25B9420EF /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D57256C33A9C97F888F53A4FB7226146 /* UInt32+Extension.swift */; }; - A373AD2926D810C1056D9FECF17DD66D /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8262D72960A17572931F11EC9520938 /* secp256k1.swift */; }; - A419E91722005FB59C7DC3BEA7AC0733 /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EFE8BF6504756C13783E7D477894264 /* PBKDF1.swift */; }; - A4F8D815D07249B30E393C63694BF3D7 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EA80C3235171417958F658E327CCF8E /* Codable.swift */; }; - A59CBD16B65C3C7ACC4C7D8945875F82 /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = 40ABB4750B401A88B273D3B180C1FEC9 /* fwd.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A65A2E325268ED551F8A5D89FB7E75FD /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D0947D47B9CECD59BC73EAC48D4ED27 /* HKDF.swift */; }; - A72461C8573DCDB8310FA557C3BA1DDA /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F6102F002EDC216C49666462EF952CA /* DigestType.swift */; }; - A829DDB57163254C51DF6C9896A1666E /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E81CDB6F58099035E4B22900B2E0740D /* Int+Extension.swift */; }; - A88812CCF543A4485A540AE2567B4B88 /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = 358F7A798EA72C8BFA7C4AA5D7A22723 /* race.m */; }; - A8995C0B368AF79026265F486D640985 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03FE099622DA426E4CBDFEB30B374591 /* Primitive Types.swift */; }; - A91379A538F389B10BAB2CE9D406BDCE /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F8B31678A829B043331C94E279F1FD9 /* CompactMap.swift */; }; - A9B8D34EAFEA874B2B3937B7F53B5D9B /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D903E031FC7FD31DA94E1EC68778019 /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A9F50ED8E406BC5AB5C9E327233D70A5 /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC7202C545EAC46F224EE9AB6B1F0F7 /* field.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A9FA53CE467640689F8095D7B4FC85E1 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = F1899C74540C37F7D84214CF9F8AD010 /* NSNotificationCenter+AnyPromise.m */; }; - AA08FA2EB9DB4E98494BFDDE5D4B4936 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1FC3BBD92A37B6D1B9844791FDD7F86 /* Bitwise Ops.swift */; }; - AA4AE37CE61DB029CDA7A78DF0E65A30 /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0B1B247B08E4A2259D6D21ABAB0304 /* MD5.swift */; }; - AA93CBB28A057A39E3A55586997114BD /* SwiftRLP-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 41F99637E28F2B9DC1A86CD6B490CE52 /* SwiftRLP-macOS-dummy.m */; }; - AB02DBB24DBB4F98005C0C14C342F8FF /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = F218E50D513522160983106C90B34FBE /* Prime Test.swift */; }; - AB80E1E9C65B4EA954F01811007ADE6D /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 310A618141B833B61214988468629C13 /* ecmult.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AB9036DA4C5904627604A28671470C5A /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49FA7F82B54CC7168B96069F53D66A28 /* RLP.swift */; }; - AB9E1F4EDDB1BFD7F4359B0E1AEF9C78 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B35D82CEB3E05DB842B7FA66505116 /* Cipher.swift */; }; - AC755B14D97E2077CB8911758996D6CC /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 93A5B46AC7CC995589CAA3D991DC1B29 /* scratch_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - ADE49554E5BC26D0FC3CB250EC153F83 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE3D7030BC429403BBE50F40445229DE /* SecureBytes.swift */; }; - AEF51F69F68DDFB4BD984ACD87DA0517 /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E942712A2D0087AAF697A0E031459FE /* CMAC.swift */; }; - AFDA9E12CC7195153491C8CD1C0AAD8B /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78AC661E237EC28BD38872134D7F7E2B /* Integer Conversion.swift */; }; - AFEBE1E855779D74D26F05919F5001AA /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFD1168E711269E444E38FCAE0B8E5D9 /* UInt128.swift */; }; - AFF838D30AE798EA2B0FE11A1ED0729E /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EFE8BF6504756C13783E7D477894264 /* PBKDF1.swift */; }; - B075220C6A1ACDF3E6ECA9447125C827 /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D13D2441410EEFA35EFB1823E238648A /* Cryptor.swift */; }; - B0968028804FC340046D3FDD23551189 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D3FAB581FA1884038308CAAD092260 /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B0EFDD2E40787B3A3359CF16DF3815C3 /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 63C148A221559836C278AFFB2F0C6D3D /* num_gmp.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B1B07B21B7667DE9A83B36AC03BE6175 /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C9CD6920241610BE46DBB9D591849AD /* field_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B1CE9BDAFCAEDA7D99F7545490D1D518 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D292A1945503B3A000AC47BB73889903 /* String+Extension.swift */; }; - B39F6A07D19D7B5044E37E98E6C28320 /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F935D7D51C3BD0EEA31106E0BF9C3D13 /* Cimpl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B43A930051FDC74CE6667856407BD5CF /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89B539CEC7927EBE7BBF7262580A0E18 /* Exponentiation.swift */; }; - B495BF9BD41F0DA630E6BCEF9E48D707 /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E36C3B29C59A6C972DBF40C0EF93D5 /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B52E20B7BAF9DFF4ACF992979FAA904D /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B019A1B56440DDAB3267B96FDBD576 /* UInt8+Extension.swift */; }; - B640565E1593B250390597C2651078A4 /* BigInt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 234968A9A443A0E2CC4FBFBADB4CC6AB /* BigInt-macOS-dummy.m */; }; + 3AC07C0FB85EDC81532D78FAB99C85B1 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2AB0FA3FFAC3EBB0D9CACE786196AC1 /* BigUInt.swift */; }; + 3B0D18B9FCA958796CDACD6710637030 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5430F65435F42C41489D6A5D36494E0B /* Array+Extension.swift */; }; + 3BC2BF6E6B27BFABAEE1C5B8AD2838D7 /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3649CFBA1E54D6AD5C50879B03ED6866 /* CFB.swift */; }; + 3C1A5CA548BBD6346EA3C326AF0E1044 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2716312EADA930757B04015685EFD479 /* scalar.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3D104A9C54922EADF90311DDFF2CB44A /* EthereumABI.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F068DD5C61D68DFAF437EAAC56F1139 /* EthereumABI.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3D80464CEDFAD819CD4BCB5190A469E9 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B830B448B480E1AE7466CE0AB7565D1 /* GCM.swift */; }; + 3E5C1C698DFB2439892653C0F04DF498 /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 052A5D977253AD46619C79759D031E6B /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3F474D94A325AFDB74206B0CD0790920 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4638850DD91EB5F2EFCF18E99D4D87FA /* SipHasher.swift */; }; + 3FA010055B3BC4813A4245727D6E2AE7 /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA94DDC1F5525609A6FBA3EB53F09037 /* UInt64+Extension.swift */; }; + 4062448019AF90DB11E3860898E8EAEB /* secp256k1_swift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D1EDEFFF233BE2D7F100C45B95D49336 /* secp256k1_swift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 407A49373ABBE880240E941F98D7F117 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FB5F00D821CDC9BDA7F7709F07DD0F3 /* after.m */; }; + 41E4BB16EA30C7552FF1E3CA6BC0491D /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = F964C89C691E6FE6350F48A4A3E1DD52 /* PKCS5.swift */; }; + 42920ECBDE0A9803B1C7380ADD62A568 /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C43D53E5A934E216CB1B7DD01DE877B /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 42FF2C1D3648C354550AC88EE5E64B80 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B8BA477868467E169FF27E9193A10DA /* Data Conversion.swift */; }; + 441F98C26072F42F773DDF5C14AC249E /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9883A143C0F77B2C2AF7E05BF805F25 /* AES+Foundation.swift */; }; + 447C407907733320787E8F23946656EE /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3649CFBA1E54D6AD5C50879B03ED6866 /* CFB.swift */; }; + 44AEE69C5AA31A84CCEB7534C0855D78 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A59FDACCE16F10DF39EA55249CA72D /* String+Extension.swift */; }; + 44C09B849F87D5EC7B9C8348E301AB1B /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EFC88D3858F1B2D4952BAA697C360D3 /* Guarantee.swift */; }; + 44F4771652CF7E4CD82AFFF61B0ED567 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 258EB69CA13649BFEBC389916A418DAD /* OFB.swift */; }; + 45482DED636330B9BCE4493225B66813 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DE5DD5643C155A18A460273094ACDA1 /* Comparable.swift */; }; + 46374BB7EC19111A4297CFE9832387F6 /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = DF72EE1FD04A0B49CB495E9980F6B8A9 /* AnyPromise.m */; }; + 465C38010042DF8DAEFA492DCE294A36 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4992855757033544670BD38D4484C08 /* BlockCipher.swift */; }; + 46930C6A0C648E4A7A0830282F53E996 /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE7344E86789EA2ACF6B000EE6E0275 /* firstly.swift */; }; + 47C119777E312AE6602A93BA0027D876 /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = D318DFC773B02CFC92B543471C937BA7 /* secp256k1.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 47CD85DFCA1848F901AAB6D6F6F1DC78 /* EthereumAddress-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B4F5205894DF6FD73EF8CFA7609DA7D9 /* EthereumAddress-macOS-dummy.m */; }; + 4882343A2039DD16BE3AE92E332AD44C /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 052A5D977253AD46619C79759D031E6B /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 48B50CFAD0E4088080A109DCA7B8688F /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EE579B1A3A156C9DE84CC0E9CC7F51 /* CMAC.swift */; }; + 48EE55837C3546B46DFCD59737CEDC3C /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = F063BD5FB8772F058E36A1292962E899 /* Blowfish.swift */; }; + 48FD7843C2FD1E7F947576CB4F364A22 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = F269536FCE8F92893C1DF08F94904EBD /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4908E7728A0935FCB6EF210407119794 /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 81ECE7FE7C889AF9F1B739830D9A59B0 /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 494A8C06290340CA7C968264669CD5C0 /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DCC7CDEAA23666C0D7F819861149F89 /* Rabbit+Foundation.swift */; }; + 4A46B113C4612B07CA848FC63240296D /* EthereumAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFAA80681A91BDC50EFC4294353BC5BA /* EthereumAddress.swift */; }; + 4ABF0E379FBEF92B4F0B8B68CBE09230 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75D8491537B933BEB0BB26FA5415C295 /* afterlife.swift */; }; + 4AFCC9EC62D8433A0A0083506BFA0830 /* PromiseKit.root-CorePromise-Foundation-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 452B760316F8326FC21782A105163581 /* PromiseKit.root-CorePromise-Foundation-dummy.m */; }; + 4B0E14BAB8E59688BEDD2B5C94E261FA /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75D8491537B933BEB0BB26FA5415C295 /* afterlife.swift */; }; + 4B79D71DD2FC55BCBB35E1F397441057 /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = E05424B44F6AFD35E237815F926FEEEB /* eckey_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4C418DDDF37352D82DC8A316EB35D643 /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 76F047FAB60C9A09C857EC109DAC9FC4 /* num_gmp.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4C82B6EF64C041919BD1BDFB613CA7AF /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = F62C08D51F07D8799AD6CB646A710F41 /* ChaCha20.swift */; }; + 4D65A0EA2474E1ACE27EB99A8C868A09 /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 76F047FAB60C9A09C857EC109DAC9FC4 /* num_gmp.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4D7DEDC820A1EF913455BC0FBE72FBD6 /* BigInt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E74F31CDCAA43E3665CAB99746882DD /* BigInt-iOS-dummy.m */; }; + 4D7F63CA708D40E84A6C8968CDB4D223 /* ABIElements.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B4899E422658B96ADF84B5239C418D /* ABIElements.swift */; }; + 4EB23EA6CB130E3291B0776D3862D748 /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DCC7CDEAA23666C0D7F819861149F89 /* Rabbit+Foundation.swift */; }; + 4F70068CDD913C18026C4A968EA92E9A /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6E02047F0F6A6150C26B56EEF63F55B /* ZeroPadding.swift */; }; + 509748BEA3EC752BC3A2AC9B055DE91C /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70E24C26EF4EF9C8244E7F94F175FD51 /* Configuration.swift */; }; + 50DE88114B7BD18A98F0F45A972079E3 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16973E34A2E1AB31C96F6ECF88E284D7 /* SecureBytes.swift */; }; + 5145AAE99352DBF420419223083C6C25 /* CryptoSwift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 303781526174E2DFA273950F9C1AEDBC /* CryptoSwift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 51B79A81BE02C232299A5DA47E988277 /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 857BD06ABAFBE1C5C176886E254BE8E6 /* UInt32+Extension.swift */; }; + 51DADAE211CE77CDDD762DF1F5FAA236 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4289C87C5EC42792CDDDCFC5592AADF7 /* Exponentiation.swift */; }; + 527E46A66487D9D5B3FF54359A3951EB /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1D1692A2F154E2828E569943ED540D4 /* CipherModeWorker.swift */; }; + 52E178194B9296D51D79BF2B7A4F7BA5 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71C4ACD478692712EEF2FF8BB7F4A160 /* AnyPromise.swift */; }; + 5342EFAEB9363EEF4AA9D23C58E28589 /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = 442D6200CC1781151499F7FAF44C0366 /* Cimpl.c */; }; + 5493B45FC1BD542111A20AC6A58EA0B1 /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45F5F772F0EEFC0C3E42DAF65DB4121F /* PKCS7Padding.swift */; }; + 54CC4EB0BFBA6950C9FF3ACBAF3E871D /* SwiftRLP-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E1A2664214C7FF4C93A67058FDACDE9 /* SwiftRLP-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 54CD3C94770F9985D0EDD8AD2D880EEF /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C27B7CBA5225481973EDA23AF49981 /* AEADChaCha20Poly1305.swift */; }; + 54EC85190D1C1948AEC85A67298BDBFD /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = EA5B0A3B538B56303C1A061E2514BF07 /* hash.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 551E69D2CA91185ACDFCBFDE5505A63F /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9BBD4AE4B529B25E9E4FE7C8493181 /* after.swift */; }; + 553AD1CA02592C774AFF2659115B4DB1 /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 982E6E4B839762B67F92588D34990052 /* num_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 55620C107463741AB202D7B93B8AC47A /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = F60D6D403033B0F37C22533C4A05A1E4 /* UInt128.swift */; }; + 55714E2CA2C818B9BB609FE4303A7AE3 /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C14CAC03510776AA4E99EA944110DFD9 /* DigestType.swift */; }; + 557151A9F797E462E701215A27F7DC21 /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 721ECA637BED3AE2394AA1573B89D998 /* Digest.swift */; }; + 557E070EDC1D983960128B12A77AA293 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB02248C062005D2F2620C9F81EC5ED4 /* GCD.swift */; }; + 563C641A5D7264103E44BCDCC6C6C887 /* CryptoSwift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D8EC3860FD1A1DA54C00A1498D1F1D9E /* CryptoSwift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 564FD746E26C5BFC311765163F88EF1E /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BF71F803FD375964F60D0271834711E /* AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 56959B7098D09A061F7F7721E757E1E2 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D010E670FE8C5A9AAC9A8464ED42B3A /* ecmult_gen.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 57BEB3200D2E2AA64E34C9960AC0A503 /* EthereumABI-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 48DE6A16D72E33E779AE2257CA5D34BC /* EthereumABI-iOS-dummy.m */; }; + 582D36FB6BBE4D4259CBFC9B837E7F79 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D1B636300E29159DFA920C5BA2E5F7C /* num.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5916092AA6D7F2AABFCF33B48F68672B /* Pods-web3swift-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 25F72E78DF48560F5D210E57844ACDED /* Pods-web3swift-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 591B707CCE5C69B79289D27F93215603 /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 15BED946B8A96EDBF82439D38353B748 /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5A176FB29F73DA5B94E9257DE93AD928 /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A69680CF78C97C6DA250B325FFD04251 /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5B4044B103053232D6A987856C610367 /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA93B396CDC9BA5785D41386B95B4AE2 /* ChaCha20+Foundation.swift */; }; + 5B842BF7DAD152B00F2629737F22DF42 /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3077E6B0E7210AC2CB18E0691714F0 /* eckey.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5BFC536A9D0ED05F329623FFFE9B9C6C /* ABIEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6314619E8FCD5D07FBD2BA0BA5C58C15 /* ABIEncoding.swift */; }; + 5E0D7EA7DC572DB4F63B87D4243AA73E /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2716312EADA930757B04015685EFD479 /* scalar.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 60398D9C8DCDC7FEDC52DC8AF907D1D9 /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 86CE3A28090BEEF1B09E865F4962D871 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 60D4DE7DC97871E36FBF75DC91E7A248 /* EthereumABI.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F068DD5C61D68DFAF437EAAC56F1139 /* EthereumABI.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6121E601434E10D5CC3A01A2C815B0D0 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F98F9737D714C11C13F01403ECACC354 /* Utils+Foundation.swift */; }; + 61C9BCD007508C2CB8959FA50BF0F53F /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03C5B3B2079547713108CA0A75C2D683 /* Addition.swift */; }; + 64B09F51D747BE80ACF3869000E89585 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0EE85F786503354B347C059417EBAD2 /* CustomStringConvertible.swift */; }; + 64B44E304433C6993AB07F47614BBC5E /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = B2AE7121F5348D2FDCD4FD763A42FB0C /* NSURLSession+AnyPromise.m */; }; + 65D0354F4B4E32CBA63ECDF84AFAD283 /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C27B7CBA5225481973EDA23AF49981 /* AEADChaCha20Poly1305.swift */; }; + 67EA838CFD7F6CF89A7A056B09B63C06 /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = E9FDE304B6122EEAE8A1FC91742A69E6 /* scalar_8x32.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6817327279945D8425268EF14CDDAC21 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E446483743D975168011448637ED65 /* Primitive Types.swift */; }; + 69527E264B7CB8895C3299409B518A2F /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E9C2CC8E90A38FD011723EB814A5A52 /* scratch_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6970C806A3C7873A22DA26802EE63912 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49C5823B0C264F4AC2DF38C68F097FEA /* NSURLSession+Promise.swift */; }; + 698DB1FA7FF3234946A86E51AF828F39 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86A87591096A3CD9071AD2D94874973C /* RandomUInt64.swift */; }; + 69A4B05BCEDEACD5C3C10D2B2913F919 /* UIViewPropertyAnimator+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = C279D46376D66FBA43CD88224B12208B /* UIViewPropertyAnimator+Promise.swift */; }; + 6A484692AA6F59EEA3EC6137FB6AFFCF /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = FA4C0B3D9EC3E926E106CA2DE8CDEAF9 /* ecmult_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6A6F08C9310263A607DD61DF9EC1EA5F /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9BBD4AE4B529B25E9E4FE7C8493181 /* after.swift */; }; + 6AAD33E6E1945969931C25BAD27B42BA /* EthereumAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFAA80681A91BDC50EFC4294353BC5BA /* EthereumAddress.swift */; }; + 6B2DC610BB5ACC7953553D5C4FA39033 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = DD5583797A4DF2B5636D036CDD472CD0 /* hang.m */; }; + 6B71498DEADD20033325A53D27E6191A /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840549A6DE0F91C91EE1712E3C57D6ED /* SHA2.swift */; }; + 6C983FCC57A9424B92E0AD5F05317431 /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6B67028CCAE6818C78DBC12D8329550 /* RLP.swift */; }; + 6CED57BC415DF0F388D893405FE3DC3A /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD5252D2AAE2CE2F1FFDA208DD0EFB4C /* UInt8+Extension.swift */; }; + 6D4618F519FFEDB9117FC4341C7F3F4A /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5A15DC755B12D8CCABB5B073B63856F /* Utils.swift */; }; + 6DC3B988093A7855E6880FFE8AE3D3B4 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDD6E2BFD8131F124DFD131BA3C6D90E /* Data+Extension.swift */; }; + 6E1A1FD632248BF8EA8C08628B1DD44A /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EF69CEB8B2C8F6223E5A84FF9855D71 /* Generics.swift */; }; + 6F5B521B508C0230EF8488842DE2C905 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4638850DD91EB5F2EFCF18E99D4D87FA /* SipHasher.swift */; }; + 70C08283C27C54420E80CCFB8C2CEB18 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDD6E2BFD8131F124DFD131BA3C6D90E /* Data+Extension.swift */; }; + 71567D015EC37FC03AE550A23ED89908 /* PromiseKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 04464806E7EED788DFE4F8D62793DD29 /* PromiseKit-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 717B05FECD48B3ED8481296EF0CCF350 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86A87591096A3CD9071AD2D94874973C /* RandomUInt64.swift */; }; + 723881423457C16AFC563593E5F5B7E1 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42AC215BDD4E22070E88E9837549CD1 /* RandomBytesSequence.swift */; }; + 726D7B79EE2D9BE951DB54D2130E9BCA /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5300C71B6A3AB50A1D7ED70A41FAAD6B /* field_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 73197ACF23C4CCEC651FB50DA6AF71A9 /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = AD85FC46DA6BEAA980010B0C5F2BEED3 /* secp256k1.c */; }; + 734152CA029292005DD1062B744B320A /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = D895276EEA2D99E4EBF5B7FE4596872B /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 74931156BC39F4870C2DE0792BE32405 /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = B9A05629BB0205300B694B527AD16E56 /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 76A9DE7C8BC7B646D1A0508BF1A38A22 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C5181B2E5F94EAFEF5F04D83E0FFD13 /* PKCS7.swift */; }; + 76E0382DDD9E348354DE5C5F8120D2B8 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F9EE37EACAF96F7344C1F0AEA46F02C /* BlockEncryptor.swift */; }; + 773013B84E21E3867773BCAB6E171CBC /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F4B350BCCE6D995C937B1D56E4F9022 /* Shifts.swift */; }; + 78638EB4FF9E1219EC7E04E8B97EB448 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31BA61BBC2E9A900CDFD9106099E71AF /* CCM.swift */; }; + 7866E902E917458E48CDFA6D0513288C /* secp256k1_swift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EDD86700A4552C712FAC348BB69DACD9 /* secp256k1_swift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 7A0702EE936C773C38F5E4B7F21AB26C /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A57E22BE5970C0F858EB10A32A3019D /* Multiplication.swift */; }; + 7AE2FD363C4422762B7BC5E2005F7C2F /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2742B99A93E16E813DA0B71800AAA56 /* String+FoundationExtension.swift */; }; + 7AFF4F6002793DD750318A9334D3BB0F /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E4426237EBEE47CAC169D6291F77423 /* when.swift */; }; + 7B5BE028C02660F6A97F1D470C96F05D /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45F5F772F0EEFC0C3E42DAF65DB4121F /* PKCS7Padding.swift */; }; + 7BE64ADC0FA2EBA004233D25BA3BA004 /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = 20F31FF3FC3A98D10214EF6C7199FCB5 /* race.m */; }; + 7BFB63A076CB21871132CA1C68FA934B /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F1D20DF17340D045A1FDC2D1D64449D /* ECB.swift */; }; + 7C414865BEC16506132F9910DBD62F3B /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDB10140BE59AEE481C7E08EDC79971D /* Division.swift */; }; + 7DB10EF26A0A2F6768F695BE03C0AB86 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A57E22BE5970C0F858EB10A32A3019D /* Multiplication.swift */; }; + 7E19F8D4DDBF7633E4FB267CBD766735 /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = 003EF4269A56F0C44E64E737009329A6 /* util.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 7F754A09D7EA3165D9758A80F307227E /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0930D7CD22CBEC2C752C14A123807624 /* Floating Point Conversion.swift */; }; + 7FE0C78E1D6CF35FD66403216909410B /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1782185CE59A4E4F74A5C0258C3B5F61 /* BigInt.swift */; }; + 803429C07CB9F5378967751502E38A45 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85CA122AC057DBDA1FC65BCB8FC33684 /* ResultProtocol.swift */; }; + 8104031319BC96F60BFD0F501909D797 /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F90DB66AA0BD6E09A8253873368008F /* AnyError.swift */; }; + 81AEF5216BF27FF1FAF23471914CFB03 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = B2AE7121F5348D2FDCD4FD763A42FB0C /* NSURLSession+AnyPromise.m */; }; + 82AF1E6C9907EE09A09AB83C5B1818ED /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = F6575BB4E0B2AD0E5B88C62A5EDA6FCB /* group.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 82C94A26B21102E331D831274DF3E5F3 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79B85C952F225CDFB5B272237402E77E /* hang.swift */; }; + 83270E867F5862F72F0F925937F1668A /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = F6575BB4E0B2AD0E5B88C62A5EDA6FCB /* group.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 83C9B6E62BE2665CCF9078D50C66331E /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36F3DF43B9422FD5916A6C75F9C68568 /* BatchedCollection.swift */; }; + 842761D17768C84E2B62EECED7A7A656 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C42ABDF3D43E8CFBE45DFA6DF97E084 /* Process+Promise.swift */; }; + 848EFB4F6CDA94AAAD25CCB2283E9EAA /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA46482A8E14BD7641E6F29ED4F0A6B4 /* Integer Conversion.swift */; }; + 848F627E8EC89D8060C4A7DC5C0B8CE2 /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5300C71B6A3AB50A1D7ED70A41FAAD6B /* field_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 84921E76FF03F22869F7FD1C2CC044B0 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E664638E84199C40F931B3593272F8D /* NSObject+Promise.swift */; }; + 84AD91997553D782969A046B9146044A /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C5AAAD0BEA7AB575EE1203992B86F82 /* StreamDecryptor.swift */; }; + 856C7A8C7D4956726A7299BEFBC01C49 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85CA122AC057DBDA1FC65BCB8FC33684 /* ResultProtocol.swift */; }; + 857A105811C550ED97B48E423769E135 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE693F0F5E15CCA4AE9D51B9A369B70 /* Box.swift */; }; + 857F892AC414752BEECA9829E4EA6322 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = B468DE556C27A7C396C7B5ECC7DCF12E /* Operators.swift */; }; + 8593AEFA684E7B84208518E6FC380FB7 /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E6BBA6411A89BD966DF62BE90EE478C /* Int+Extension.swift */; }; + 85FB5B7FC1D897B946EBAE4BEAC9CE4D /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA94DDC1F5525609A6FBA3EB53F09037 /* UInt64+Extension.swift */; }; + 8601AFFE38D08BA40B4AED33D04654E4 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34A205CA261F59DB1AC7C1BE4E2ABE19 /* Strideable.swift */; }; + 862C49A4047D7B32FA8ED4644AAF3DE2 /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C5AAAD0BEA7AB575EE1203992B86F82 /* StreamDecryptor.swift */; }; + 8645C073FDA17B6DF8E4AADCE0808C3C /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAF14DF7DD65D242909C4D06F8C00DEF /* HMAC+Foundation.swift */; }; + 8645FDCFA460D7F9AC3436355339C3B0 /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = B88C2E2D4B6E99B918E6E13EDA4AA4A0 /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 87C8D1C1A44E68BA3761B2915728AA1D /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA93B396CDC9BA5785D41386B95B4AE2 /* ChaCha20+Foundation.swift */; }; + 89AD1BFCA3B307CD78AFB34118AC031D /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03C5B3B2079547713108CA0A75C2D683 /* Addition.swift */; }; + 8B3520FF1C6F9AE9FC4CB782022EBDB8 /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 4624EFF8C97C1CBAF2910297112CF9E8 /* lax_der_parsing.c */; }; + 8B4AC0EBDAD7A87FF683938E057D5338 /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89BECCA6149031B2659A0EECDCC2E4A5 /* Cryptors.swift */; }; + 8BA4D38F41C7AD0545B23BB7671C2114 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C42ABDF3D43E8CFBE45DFA6DF97E084 /* Process+Promise.swift */; }; + 8C7DC341CF6C0D742059C180AF4D3AE6 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AA60D2034DC22F7C907855DDB5ADAD9 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8C8D2A38239F1CDA6CB302EFEA1E18B4 /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6B67028CCAE6818C78DBC12D8329550 /* RLP.swift */; }; + 8CBF1AE067B860433B0A4BE710FFA9BD /* CryptoSwift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6907C77858F6612BF4232E34D8D30C3F /* CryptoSwift-iOS-dummy.m */; }; + 8CFC200142682965D7D13983526BEC97 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDDAEEE4BC31C06BAE2232AFCA5468E /* HMAC.swift */; }; + 8DC20C4A7C1E28D752BFEBF35B5D9759 /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = 05D37539C41BE79893FEDECCB70FC25B /* ecmult_const.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8DCA7529640903D6984416665D803C1D /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9883FCDA0DBDA6DCA8C5923AB1B3F45A /* CBCMAC.swift */; }; + 8E6ADE71160E4C617ABA4C32C87D16F3 /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3077E6B0E7210AC2CB18E0691714F0 /* eckey.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8EAEFFBCB259C139AE42E4967BFCD638 /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBEB708E926639930327B2FC6F3759D /* PBKDF2.swift */; }; + 906F0233096CF30AA2ADD2032085E9EA /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDDAEEE4BC31C06BAE2232AFCA5468E /* HMAC.swift */; }; + 911E85408B3D802D7981B85D7192128F /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36F3DF43B9422FD5916A6C75F9C68568 /* BatchedCollection.swift */; }; + 92A31273837467750DA0525B8243B737 /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = D4C96A2C2C3B9F8977AD08B6FBEDE552 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 930121B3B6F0689685FCAB817B2A2588 /* PMKUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 92641023C5257B4110F73449FAC652E7 /* PMKUIKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 937080F5624E366ADA825757B45DEE90 /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = 20F31FF3FC3A98D10214EF6C7199FCB5 /* race.m */; }; + 93922A572F18D47B58770CE032C624A9 /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = E05424B44F6AFD35E237815F926FEEEB /* eckey_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 93BF74723D8898DC3E8DC67317C1B0EB /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFC58447BAB63CE30E97C059F8345F5 /* SHA1.swift */; }; + 969296ED15F25F2DBDFA4E8DE7A3F15C /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 59463535BD4D6DAD08D36EAF4421D11D /* NSNotificationCenter+AnyPromise.m */; }; + 970EE041FB9D079419CED46228DC3969 /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 449887D7F7932CFAA2B3FAE0BEE1594B /* scratch.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 97A3961670D0D6C11A7E18B5DB3FF739 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A3B7939D27D85A4C92DE2CD6D6C8E4EB /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 987DCF48843E8B83BE9F0B5788175D53 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224F4E958C4909EF47CB0A9F43F48030 /* CBC.swift */; }; + 99365E9205AEA46510A70B0092872710 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42AC215BDD4E22070E88E9837549CD1 /* RandomBytesSequence.swift */; }; + 99FB3C1EC398E469062856C9355D98D7 /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = DAB40084682C161CD573420C8CCBFD4F /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9ACFA841BF6C5686EDDB92A29B36FF7F /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = EA5B0A3B538B56303C1A061E2514BF07 /* hash.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9B45BA7080C2248A03F5AF03837C74C8 /* EthereumAddress-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 76C5F543BD9B25774CA35CF7FA0546B3 /* EthereumAddress-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9BB2691E8EC04617309A1B905F5A652B /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 129427E2D354B71D619F0DAC197039BD /* Rabbit.swift */; }; + 9C1D45EE7F4C75C150166F58C0C5827F /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D5996479C4CB892D1B062406C8C08F6 /* secp256k1.swift */; }; + 9DAE14B88EE655354CACE65717FA211E /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA975F09047F404D3183C92FCA1AD829 /* Hashable.swift */; }; + 9DF5F943F4396F48FA8C2562B7E90323 /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F106BE3FED3F7D139A061124A9FF0251 /* Cimpl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9E042ECCFC8FB435B85BF9193486A67C /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = DAB40084682C161CD573420C8CCBFD4F /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9E9ABC19900EB9A2F58E05DEDE4C9C6A /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BDFDE509786CC72B0B5EBBB87F54C14 /* MD5.swift */; }; + 9EF0841FD75468EF3543A5C6A25A9398 /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A3D345B7D38F0B4BAB39F24505D5E5E /* CTR.swift */; }; + 9F89998FC4A9BDB1EB5C0FBC61596D64 /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = F7ED977AF2E31DEA78D850BDE6C9F601 /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9F8C5B0AB545F419AF2F97CCD7224BB8 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81392F0749049A8C999337DDA716A157 /* Error.swift */; }; + 9F975F5CF4816CD3A6CA2282F5F4E3F2 /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E773D6D25B2A450D593D189B85B7DA /* BlockMode.swift */; }; + 9FA8CF326DCA266C358B26FC42191498 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB31CE10E8BEEBFC7B50C9F8A97E10A8 /* Blowfish+Foundation.swift */; }; + 9FE815CCD081FD51B3853C75F363A89B /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AA60D2034DC22F7C907855DDB5ADAD9 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A153DCFCF463D9DE2D043665961D775B /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EB87A244E5248ADD8D124225B21323F /* PromiseKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A1636315A5B3017312CFC781DF83901E /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05DB571F7562C6E5DAC821BF33DF2ACE /* AEAD.swift */; }; + A1B3C6A88101C2163062485C2B45F1E0 /* EthereumAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = C4AD5698CEACE94C1CAD1C0317E14905 /* EthereumAddress.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A1E8398E1FC2566D94EE4D94B48E909A /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CBF6B2F887499D9631619E0D53008D /* BlockModeOptions.swift */; }; + A22F18E450653F384132E5C621BE7B73 /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = E1999CB16AEF90FFCC762EC5BA3C538B /* scalar_4x64.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A2677F84AB8234C395BD53A67AF18EF3 /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E3F5E519E5ED0A4BAF423C7DBB12042 /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A26E92B79121B74FDE94799BF2A92C91 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FC232D3CEB1791A116CFCB46BCCE606 /* Array+Foundation.swift */; }; + A2A378FB0E28CFD130DD02F25B9420EF /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 857BD06ABAFBE1C5C176886E254BE8E6 /* UInt32+Extension.swift */; }; + A419E91722005FB59C7DC3BEA7AC0733 /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = A31357292CDC03F5F3AEA4C1065BCDBF /* PBKDF1.swift */; }; + A4F8D815D07249B30E393C63694BF3D7 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85342594A31BFFC584D4660A9041CF48 /* Codable.swift */; }; + A65A2E325268ED551F8A5D89FB7E75FD /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FFAEDF6DDF0B48C4B8E16F6F9C59A5F /* HKDF.swift */; }; + A72461C8573DCDB8310FA557C3BA1DDA /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C14CAC03510776AA4E99EA944110DFD9 /* DigestType.swift */; }; + A780CA204C48EC1DEEA8B2C0F59FA6AB /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = B88C2E2D4B6E99B918E6E13EDA4AA4A0 /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A7D96D76C3CF2A958DEDBFD4524D7526 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 247DF1F9FE8902AA1A74867E7854662F /* dispatch_promise.m */; }; + A829DDB57163254C51DF6C9896A1666E /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E6BBA6411A89BD966DF62BE90EE478C /* Int+Extension.swift */; }; + A8995C0B368AF79026265F486D640985 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E446483743D975168011448637ED65 /* Primitive Types.swift */; }; + A91379A538F389B10BAB2CE9D406BDCE /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C619FA5855429D15B556163471403E5 /* CompactMap.swift */; }; + A94EC8DF49968D812DEDDAD218DDAE1E /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF31935E8E71BE039924EA648A315B8D /* NSNotificationCenter+Promise.swift */; }; + A9A3DCED2AEB2118A087FDC125D5D8A8 /* ABIParameterTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EC6627D0179A3BE1D7BB58F2DBF51E7 /* ABIParameterTypes.swift */; }; + AA08FA2EB9DB4E98494BFDDE5D4B4936 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2631D55D12027D3935D7B85C6A624F09 /* Bitwise Ops.swift */; }; + AA4AE37CE61DB029CDA7A78DF0E65A30 /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BDFDE509786CC72B0B5EBBB87F54C14 /* MD5.swift */; }; + AA77E4FCA1931096078FD288C72D7690 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = F269536FCE8F92893C1DF08F94904EBD /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + AB02DBB24DBB4F98005C0C14C342F8FF /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A85805FE098BD65AFD79ABDC5A9DDF7 /* Prime Test.swift */; }; + AB0CBD60909A704D3D9158BC5D661B16 /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C5F41A51FDAEBAF8F849026A9B09E2A /* field_5x52.h */; settings = {ATTRIBUTES = (Project, ); }; }; + AB9E1F4EDDB1BFD7F4359B0E1AEF9C78 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62515D5BE9A59FE5C9041B4EBE9CA58 /* Cipher.swift */; }; + AC932B736284B35ECAD3DB196C2C4533 /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63FD1428729C05C5A88BE98C12254ADA /* BufferStorage.swift */; }; + ACAFB6B368809FFE646FC6CE60BC1165 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D010E670FE8C5A9AAC9A8464ED42B3A /* ecmult_gen.h */; settings = {ATTRIBUTES = (Project, ); }; }; + ACC598D7BAEB964F6A2E8BA38307C4F6 /* ABIDecoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7A2D1D0062F350907B747E2A192E438 /* ABIDecoding.swift */; }; + ADE49554E5BC26D0FC3CB250EC153F83 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16973E34A2E1AB31C96F6ECF88E284D7 /* SecureBytes.swift */; }; + AE317D2940830F9B289A00565CE59FE6 /* ABIParameterTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EC6627D0179A3BE1D7BB58F2DBF51E7 /* ABIParameterTypes.swift */; }; + AEC703672CF0251F4AE1B807443AA2DF /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE7344E86789EA2ACF6B000EE6E0275 /* firstly.swift */; }; + AEE97FC60DDB4995F16A1796F5B56C1B /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = C4D8573A6F8E2A67DD73406C5B3ECBB5 /* join.m */; }; + AEF51F69F68DDFB4BD984ACD87DA0517 /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EE579B1A3A156C9DE84CC0E9CC7F51 /* CMAC.swift */; }; + AFDA9E12CC7195153491C8CD1C0AAD8B /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA46482A8E14BD7641E6F29ED4F0A6B4 /* Integer Conversion.swift */; }; + AFDE5FB41EA9B22F9F7D1845806B8436 /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = 442D6200CC1781151499F7FAF44C0366 /* Cimpl.c */; }; + AFEBE1E855779D74D26F05919F5001AA /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = F60D6D403033B0F37C22533C4A05A1E4 /* UInt128.swift */; }; + AFF838D30AE798EA2B0FE11A1ED0729E /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = A31357292CDC03F5F3AEA4C1065BCDBF /* PBKDF1.swift */; }; + B075220C6A1ACDF3E6ECA9447125C827 /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F2F682F960F536C585085773DF5BBA1 /* Cryptor.swift */; }; + B1CE9BDAFCAEDA7D99F7545490D1D518 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A59FDACCE16F10DF39EA55249CA72D /* String+Extension.swift */; }; + B30C88B383282F3BA5CEFF72ADCD6975 /* ABIExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E4AA08906784FF9AA2B198938456276 /* ABIExtensions.swift */; }; + B3978E88BD6400B77CF85D9788D4F094 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A3B7939D27D85A4C92DE2CD6D6C8E4EB /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B43A930051FDC74CE6667856407BD5CF /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4289C87C5EC42792CDDDCFC5592AADF7 /* Exponentiation.swift */; }; + B4471EDA97A5344990BA50D90F24AF31 /* ABI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21FCC5A27F315ACD9DBDF025F826D31F /* ABI.swift */; }; + B4551C11886444FD0ECFCE0F05367412 /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 48BA6005A2D0AC9C0B7C4A47958A6F80 /* PromiseKit-dummy.m */; }; + B50565BC4DBFAF865B10BA46420F7625 /* scrypt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = DAB3CD9F51BF3B4399B8EFC798B3F215 /* scrypt-macOS-dummy.m */; }; + B52E20B7BAF9DFF4ACF992979FAA904D /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD5252D2AAE2CE2F1FFDA208DD0EFB4C /* UInt8+Extension.swift */; }; + B591BC023D1E6A16FCA94930AABFD4E3 /* scrypt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2533EAF35B54AB44227FBC0A9BA7D19E /* scrypt-iOS-dummy.m */; }; + B640565E1593B250390597C2651078A4 /* BigInt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CF8798C22F31053E2D6EAF35C011146D /* BigInt-macOS-dummy.m */; }; B6699C206D4772B76BEAF1722CB04572 /* Pods-web3swift-macOS_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 522015696E45158812DD4C5CF37CD544 /* Pods-web3swift-macOS_Tests-dummy.m */; }; - B6E2A49CAA2332035A4163610834553C /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = F5AA52D2E5DC0134CBA0CB3219327A53 /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B716300FB849152C5C4C3DC9C14C8E8D /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736C0CC7DF9261F7C240BF88F7D310AD /* Authenticator.swift */; }; - B725B5E58DF7010A5CED552276526B66 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43941A9CA2F209289C333306CBC5961F /* Process+Promise.swift */; }; - B8B0732D6BD64650E99A7C362E617FA8 /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03321ECEB201CDE70DA4F88EE48E2044 /* Salsa.swift */; }; - BA33E96D5FF50CFFA5727208AC91DF2B /* SipHash-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E85EB665265A065E5D96BCE2B87008D /* SipHash-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BAD670F268A8F2AB9BB2BD41BA18BEFA /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23EA6F524218763DB7E76A6E13387EAC /* Padding.swift */; }; - BB71E3B83F7833D6D6D7FDEAEA0BD96B /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D98916544A0C622EDB88411AE57 /* CipherModeWorker.swift */; }; - BB8929C86AEF5AE8E8A10D8061185D47 /* EthereumAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 48BBE301C7AC93BA32B43FDCAB55FF55 /* EthereumAddress.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BBA677442B33921B63BE5CD78F273813 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DE92E2A606B96369F79D742DFACB7C9 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BD0E70C62B7FC0BF874D98D6C855FE1D /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 8787D00BE428B5C383E25BF2ABB38CC4 /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BD755CD92BD7C02AF8A0A289DC9E8446 /* secp256k1_swift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F9D80D5C595654C7E23670359CB76D99 /* secp256k1_swift-iOS-dummy.m */; }; - BF65BC24F142604C88A03D61E2C91A0D /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5540F42E4F8BF99A1C7F95349EA8707D /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C003185B61E62CF4BD4690EDBD0719A3 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F25882CAD0730D8C76F023B8C6FA287C /* Blowfish+Foundation.swift */; }; - C0101FD19738FB97383D1C0CF5EEBF77 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682CE9677672C1F944AA2896D3BD36FF /* String Conversion.swift */; }; - C0951D3A5CDA6E27EDC2A65A700C8D8D /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3391B8242DCA2A16EB9DBB3FF0740ABC /* Cryptors.swift */; }; - C0DD16176212D3F5222CE6886B2A660B /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E75AF68728F33A9AC112BE223CA6718 /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C0F8B164DDA6157937A300C207D56E4E /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DFE72A11A0AF97FFCEBDF19EC395F74 /* Subtraction.swift */; }; - C1276BB9865BF0BA0D8F4229A5202D3A /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = 08390C702E93A122CAC37BDF6A07A98C /* scalar_low.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C35AFE3E2575CF308C100F43FC2B60CB /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = E022DA9B1DCAC9A88B18D90457826545 /* after.swift */; }; - C462144190FE4E9F45F82292FF1A629A /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E8DAE988F4403CE8B047E936F2B4AE1 /* secp256k1.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C462A569CC9699DC1C14CB401D63CF5E /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = D7009940ED0BFC1AA385433559754C27 /* join.m */; }; - C510E3B26A4F4876F89A59D5D2F22006 /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C717226571D60D3C7D8E15B4EDCC2E0F /* Collection+Extension.swift */; }; - C56FB1B1104E7EEA26631D9EA9A9D9DD /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7388674CDE22815644490821F0CB757B /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C6896E99AC63CF7E9506A6E8CA124CD5 /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98A9FC519C49C693637C4BC5D0DD6EB7 /* PKCS5.swift */; }; - C6C9C202FFBD58F21443C1F5CEDFB291 /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = D9A9A6187028CC6AD623334BA2899FDE /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C70A86EC15752B0731CD015CEF45CAAF /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9F882189D9E2CE8D7B7DC60BA0D5AF6 /* PBKDF2.swift */; }; - C804D008E78513D7097A478AE1BDE395 /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 531B65B7CD936ABCBE9D4C182A88CDF0 /* field_10x26.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C83FF7FC178BF33DD5052001F05A83BF /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CC384B5F6C90CB968D0AB32162249B6 /* Updatable.swift */; }; - C880E86722BF8C8B420186E5FCAA564D /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 531B65B7CD936ABCBE9D4C182A88CDF0 /* field_10x26.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C8C18B3FE4D4FD1B2D0467F31FA6D113 /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F02A89B4F4807025E1CB0C26D63CD65 /* SwiftRLP.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C934E91003F09F0E5C50BD3FAA858A6A /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED4A3438C4739D717703BAE1F7020595 /* Deprecations.swift */; }; - C969C4CB640BF795B01F3648075A446D /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86800F1D45016DC59C9BE8B9ABF5B50F /* Bit.swift */; }; - CA0DC69F0F366577F4021A1FB04730B2 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEA9421290E9294FEA25D9F6D3DDD24C /* Error.swift */; }; - CAF3800A1D4B45C61035F3A330991F20 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736C0CC7DF9261F7C240BF88F7D310AD /* Authenticator.swift */; }; - CB57B994F6A2E96E2508F7845D1F97C3 /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = BA200D6941B69ACC080DFB132BEFF422 /* num_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CBAB02308405D4C1CB4271EC4AB971F6 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73043D2C83B1F1E5EC8F0E15C2CFE5A5 /* Words and Bits.swift */; }; - CBD35C9BC44BFC266C2B4E310F1EB6F9 /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25E9E042655265AEB9322FB01DD7A702 /* Resolver.swift */; }; - CC44CC395434DAA9F2F7DA1D8E1C341A /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7340338CDF774E91E0F647AB7EB91924 /* StreamEncryptor.swift */; }; - CD1400BD40761FCBE46B17F6B8AA0AE9 /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF8AF8868130C525C8921A94220CFA6D /* HMAC+Foundation.swift */; }; - CD433301876DFD79558B30167DD81DED /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7739AC49E92EA0677899D077C015CE05 /* NSURLSession+Promise.swift */; }; - CE2BCA099CEA37688059295108D416AD /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9787E8C8BA8DAE16D659DA569EECED22 /* Random.swift */; }; - CF67AD864C4CE27EECF87985CF9B287E /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = B9737D99B060F85A0A42A3A30335B14F /* scalar_4x64.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CFCAF13F717E0088FD8C51EE4460EBBE /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 860EF39282D8941084557A3DCC1D7DF3 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D04010B8C8B3844F185CA1437FFF5118 /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = E65308F679CCAADBBF14F5DB4971CD21 /* Cimpl.c */; }; - D1F0182968E66E044F80A9822BE772F0 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD14A2D2C9467CDF73E9EC39F2B97E62 /* Hashable.swift */; }; - D1F87BF791595C2F5B4A86F445081ED5 /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41FAB135DE09D3F9136D834CBE3A558A /* Scrypt.swift */; }; - D29E48A6FDC719FD2FF024625C37CA22 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFCBEFE9DA6D7F361DBB180EB84492D2 /* BlockCipher.swift */; }; - D2C9540655CD82F8A12305D2B953BD71 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 915D7A030D48CB0FE8360421BAB29B5B /* NoPadding.swift */; }; - D33063EEBD209F32520B754AD30B31A8 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01271B2BB62FE2D72466A630AC9D1BE8 /* Configuration.swift */; }; - D38BBC7C8903B9EB7803ECA68167DE20 /* EthereumAddress-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 23299E01AF2849576AF87D2A3EB8D494 /* EthereumAddress-iOS-dummy.m */; }; - D4043F69152803AF7B450C9062CFC688 /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 9411AC5861B33542BF71A1EED7E49FC4 /* scrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D44A10DC0AFCD862345B9A0F97E95ED2 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = 944A08F05724AD8D1EC4F7FF0D09BFE6 /* scalar.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D4C0E6966E5FED70544A97ACC237CF3A /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ED58E829B835009D9DCD1D8B959FBBD /* Digest.swift */; }; - D4F42FD2DC81233AD6F6C96B6D8C8D38 /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 80353B76ABA10ED9D59C18FDA6A16285 /* basic-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D4FBEF46E2616F942B65FF779B374513 /* BigInt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B2300EAF13A4BCCC04BBD2896E58716D /* BigInt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D575885715CF6B41AEA644EAE2513FE8 /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 635C328C2CAB4B34DEF69D8CFABA3AC1 /* AnyPromise.m */; }; - D57E19C3E86448FD0CA3B9742DB49497 /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7340338CDF774E91E0F647AB7EB91924 /* StreamEncryptor.swift */; }; - D5C95DA680B56760C10228B520F7499D /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E67F7B0700CACBB7DFD27A88EFF75C2 /* PromiseKit.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D655D7A0F64343C818BC21A985DA8C5C /* scrypt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F84F141F7B6CD4974D2BDD888FE19496 /* scrypt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D6B5F7FA348E6697E489142154B85107 /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE63C0E40FA294F6C512967711E56D9 /* AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D6BDAA0C8CA8843CE436AA3573C378F9 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 491E82F8B7D6BC0F752EEA10F629435A /* Square Root.swift */; }; - D6BEC5D8B88A2BF435ADEDDA2505900A /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E90C5426B3E9CBBCF9A8B6731836D354 /* UIView+Promise.swift */; }; - D7875CD7BA041CED180D37E0448C09A8 /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAC966A4293FF7689DD8A3B2877731F3 /* Blowfish.swift */; }; - D78C9EA6787B721D75665039BD726BF9 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 982B03AB9D403479BF865D7C3A5B2D4F /* Thenable.swift */; }; - D79B4B114921134D9311CA5A71062C10 /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E5F93B0E61748A9D9906D3305A41EA8 /* ecmult_const.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D7AA60A9860ED2E7DD7440AC9D799A04 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 915D7A030D48CB0FE8360421BAB29B5B /* NoPadding.swift */; }; - D81D753CE65D4B1E0F26F57606BD0F6C /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1FC3BBD92A37B6D1B9844791FDD7F86 /* Bitwise Ops.swift */; }; - D937FEA1E574089DEF1B2FF475B3F2B7 /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF94FCFAAA2F4216A2F89F43E2CDA4DA /* Catchable.swift */; }; - DA1588018CD8315CFCBB2E0806B753E5 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB4C3483E321FFBD045AB8FDC37CF8FA /* Array+Foundation.swift */; }; - DA1E098DCF3DEE1C5D699424486C1D64 /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BAF829379DA2971A7051C2EFAE15E8 /* SHA3.swift */; }; - DA74E106DB2F609C8C444565678896BB /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E36C3B29C59A6C972DBF40C0EF93D5 /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DAA014164E03E57A7D043C270B6C9B84 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8AF5512E4598482BBFB4AD1BBF8064 /* PKCS7.swift */; }; - DB8210FAA307129469E336205657F092 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = 0554DC016A3872F60738FE5C366CAF31 /* ecmult_gen.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DBB230040D2BE00D2D5726E70957B1BE /* EthereumAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CB204BDB01A5747B116731490529E2B /* EthereumAddress.swift */; }; - DC3FC4BC15FF43709E43B8FAA2B6FD3B /* PromiseKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 52059A76F9DA89149396ABB84A8A5780 /* PromiseKit-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DD7964B2315BCC4C1FEF9A2300164025 /* SwiftRLP-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5447D2654ABD868EB73A2BF12AD74DE8 /* SwiftRLP-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DD79FE3BB4C3C7D3A923E6CC1B66064A /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49FA7F82B54CC7168B96069F53D66A28 /* RLP.swift */; }; - DD7EF0CDE3C0223DD3933632CDB2AB01 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EFDF78EEBE9836CDC5AE2FEEC50C17B /* Utils+Foundation.swift */; }; - DE31538BAB4D0DB5B8063517B853894F /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = E7E7786C2EC1054AF047E2571B12205F /* util.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DE86F4DBFBAE2D9EADB44907B3B7FC1D /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BAF829379DA2971A7051C2EFAE15E8 /* SHA3.swift */; }; - DED6A3731F280B7A5C4BA0088245421D /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA3D1883E9BD064F4B9299B5825061E7 /* String+FoundationExtension.swift */; }; - DF3C881F6AA58663EA27A37DDC93CBD1 /* SipHash-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7692AAEAD8E8FFF8D2E46B60CBA56CDA /* SipHash-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DF4ECF7A425192C1C45C4AB1E9BAE553 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EA0E0A67D5738512E4618E1AEDA5E3E /* CustomStringConvertible.swift */; }; - E15BFF7A7883A5BFB699464499718E52 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC4C922D64767063B8D1A270D793373B /* BlockEncryptor.swift */; }; - E1B91043188FBFD92BA078E1EF2912E0 /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E8DAE988F4403CE8B047E936F2B4AE1 /* secp256k1.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E1BD1671D6E0A0FDAC9298373486DA9F /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 491E82F8B7D6BC0F752EEA10F629435A /* Square Root.swift */; }; - E254A91C69969B33ED1BF9BDE5B19AED /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755E0B91B0984ADEF77E48E32C147276 /* Data Conversion.swift */; }; - E254CF34D5F821DC8EAA61755F39ECF3 /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5595E1873CFBC6061E8C6D86BFF12807 /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E262F38BE8D55B54CB886EAC66214BFD /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = CA97BDA6DF1DE11A96470DBF6FBD7C62 /* lax_der_parsing.c */; }; - E26B96712A33AB8CE72BA17C152736E8 /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D1D500C8CF88FC87FF7FA43DBC53611 /* AnyError.swift */; }; - E2F52C65710FEE56EBABD1C599E031E2 /* scrypt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 51FC3239F6613D1D7AE1AAD0F3204A0F /* scrypt-macOS-dummy.m */; }; - E350B1B350751D65ED5A630756C5DDAF /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98C48C6F1DCE55E9EE6040D50626EF16 /* ECB.swift */; }; - E38ACED69C24647A7A07B2B72C7580BD /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D2BE96DBE00949D2B047DC83A759B4C /* BlockDecryptor.swift */; }; - E4831746A0E266E025EE80BCA4EF3BFD /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1576E0C86B6BE13F5FB685E1357E71C3 /* Result.swift */; }; - E4FB02298751B056940AB39261020DAB /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671394A1108646E9E210CF54FA2C814C /* CTR.swift */; }; - E6950B7C92641175616A7FE09FA2574F /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC86A3FC56A1BAE1CA3490D081E47F3 /* Checksum.swift */; }; - E75EA18FC026B0FE0E943667D597D909 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A69383BF153D7728F4793AB68C3C4 /* hang.swift */; }; - E7A8CA29F94135EBCA9E6187C222A42A /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B152212D05CB08C4E0B61D8CDFF12C9 /* Guarantee.swift */; }; - E85D4BCF4C4214A3340D014F0CB27440 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7695A9A41BFEEAD40C0235B913A07672 /* AnyPromise.swift */; }; - E96D904E355EFA92932B4B71E59472E4 /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0D95EE88A2B8D781795DF20E0568F6 /* BlockMode.swift */; }; - EB0DEA3194A067ADEF216B5AEB36E957 /* Pods-web3swift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F688145BCFE1FB8B76299CC261A05E /* Pods-web3swift-iOS-dummy.m */; }; - EB52C8F7723FCC94649C4768B67E2E3A /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC0DBFB306B96AAE65A02CB825C4F0B /* SHA1.swift */; }; - EB5F9E86F880F7DADBC989EAE79A9162 /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7388674CDE22815644490821F0CB757B /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EB61FACF6827E43E518AF99AFE8ADD09 /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF08003360A2A59E3E059CBC5496E71 /* ecdsa.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EB9345AB32E8C1BCE5C88C239CFAF2B9 /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8354A9A75879DFCE10CDFCD8B4B76EF5 /* AEAD.swift */; }; - EBC1181767AADF30189982641F9B9648 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = F218E50D513522160983106C90B34FBE /* Prime Test.swift */; }; - EBD3735323AB89C906B5E1C536976080 /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D2BE96DBE00949D2B047DC83A759B4C /* BlockDecryptor.swift */; }; - EC9F551C20254A1AEC7679ED83D28713 /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F935D7D51C3BD0EEA31106E0BF9C3D13 /* Cimpl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - ECA8F009F06F08BDB92C351F47995210 /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = EE8A73B5FBE9F82E34238AC840FC7331 /* eckey.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EDEB77EE161E91BE126DB5BECD0D2F88 /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1BDC161E1A001A666E01A22455E14B5 /* AES.Cryptors.swift */; }; - EEB835EB989FDE954E0253B6BED77F43 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 5297103B37D2E5083D67ABE2C60CA382 /* after.m */; }; - EEBBD653ACE1E18F44D391EC926D1EF9 /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = 7DF576FC1DAC9EC11DA44099F4F50AFE /* secp256k1.c */; }; - EF2912DE621D3B57FB6A277CBF39B316 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95F76B715633F358CA7525D8C17738C9 /* GCM.swift */; }; - EF2D6E9667E3DC5852A6F092A4BAC763 /* PromiseKit.root-CorePromise-Foundation-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1C0BFC1A022B5AD3BDFC8920FCFD74 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EF56A1A9A97666C4D03AA9AAF5A37918 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F32BA5AE4C0BE79090A24F00A3F35AFF /* Strideable.swift */; }; - EFDC04F64EB4766D33AC8058E12B4561 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB4E43C9EB1F78AD84B2314039898608 /* GCD.swift */; }; - F1566684B5EC4250C3F2D3F422CFD689 /* EthereumAddress-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A734506E75FE208AFB8DA726262FFEC /* EthereumAddress-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F16E441BDD1CCA79E64DCDA49CA4CC50 /* Result-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 67F6E91C8B57C5F8E945603C7F3DB0F2 /* Result-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F1DD83612B8154D1465CF398FCFA9596 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14176496814CB0D56F198301D279FE65 /* CCM.swift */; }; - F2CEA0F86BECA15D8730D3D53D9EAF69 /* SipHash-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C57F4AE68BD0AD2EE5867A1CA2A12FCC /* SipHash-iOS-dummy.m */; }; - F48FDD8548C612FB765A5F4D3F2AAEB2 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C47CE1FE3AEC19CC322E3E03530D21CD /* PCBC.swift */; }; - F4F971E86909084B5DE98EB247D30EAF /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 86B004B7F6AC62E27D75D02978601A76 /* NSTask+AnyPromise.m */; }; - F59F8D1792721D4062D9597FF2370D53 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840434A830881CF07FBDE172A20CDDDC /* NSObject+Promise.swift */; }; - F6C04F880164DA1647FDF6654CD65CBE /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EA80C3235171417958F658E327CCF8E /* Codable.swift */; }; - F6E2A19F261D93BB5E130674AEF90198 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74111ED4B5372D2EE9A218621A18699C /* afterlife.swift */; }; - F6EEBE907D9BF3B0332ED86D67236441 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AF5980AB239F34C8CB958F30A518A0B /* BigInt.swift */; }; - F7A2DF1C44544C5300298F18DF2CB870 /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 9821B82F2A2D9E9E0A740B6B4B38A6AB /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F854EACBF11549213B26B4748FBB94A0 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DFE72A11A0AF97FFCEBDF19EC395F74 /* Subtraction.swift */; }; - F8DD96EC7610D4FCB6C8045D400E5701 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 17856FB7A41BDDB75285F531B03882F4 /* PMKFoundation.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F9451AAFCEDF04CB35C64C98192AC819 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D6CFCC98052B542B8BD8050E0204993 /* Box.swift */; }; - F95445AB786CF29CEA99E52C88BFE706 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77FB79008E5E4C52EE48B984D12A652E /* AES.swift */; }; - F9A83224C63AF5F18AED311461D71668 /* BigInt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B90CC3B80037E1B917D44513A07D0F6C /* BigInt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F9D3A99DCE33C06801BDC5EBADEDFDA9 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C3F64F8D233B557ADBCBAB5F8D81F1E /* dispatch_promise.m */; }; - FA47C2FD4BE0AEE4BBB8F078CEDED890 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B35D82CEB3E05DB842B7FA66505116 /* Cipher.swift */; }; - FB9507F4BB8DEF640A6E3C3BE2A4E619 /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 678FC45FCDC1237D6344CFADDB22F228 /* eckey_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FD6E4E6D2515323B98F8499CAF7D8486 /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31ABCFEE7AE67562C4CEBB66C7ED4D6 /* ZeroPadding.swift */; }; - FE95B067321486A5998C5DD4DF31862A /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E5F93B0E61748A9D9906D3305A41EA8 /* ecmult_const.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FF83256DE909E2F86AEBBF4E51F42EF0 /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C717226571D60D3C7D8E15B4EDCC2E0F /* Collection+Extension.swift */; }; - FFA521581788213B12468D8AA8D2ADBB /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F02A89B4F4807025E1CB0C26D63CD65 /* SwiftRLP.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FFD1323B3E415476F73D432694CC4D35 /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 906199A857C08F740EA182609488E191 /* Rabbit.swift */; }; + B716300FB849152C5C4C3DC9C14C8E8D /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E53BAD514C4F4E022EEBCEB1ABC3943 /* Authenticator.swift */; }; + B73725553EA7209B295AFAAF5F1641C9 /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 81ECE7FE7C889AF9F1B739830D9A59B0 /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B747E0DC81EB6CFCD9751A67CC0C6D17 /* ABIParsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B3D040637E19F37C0D7EB3C1A6A991 /* ABIParsing.swift */; }; + B8F37FA0A973FDDC27C6425371AEEAD6 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = FA4C0B3D9EC3E926E106CA2DE8CDEAF9 /* ecmult_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B9273317460CC1FE679BEB887B22502C /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = 05D37539C41BE79893FEDECCB70FC25B /* ecmult_const.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B95242B48A9EBE0FD2ED1CBD13BCF4E7 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = B621DCE8D325B673C6F300B7C2CD478B /* Promise.swift */; }; + BA33E96D5FF50CFFA5727208AC91DF2B /* SipHash-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A44AEA30AD48DB0294CA791DF2D0996B /* SipHash-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BAD670F268A8F2AB9BB2BD41BA18BEFA /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3654C41FDB74088592DA713158476E5B /* Padding.swift */; }; + BB71E3B83F7833D6D6D7FDEAEA0BD96B /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1D1692A2F154E2828E569943ED540D4 /* CipherModeWorker.swift */; }; + BC9A423C1774D10E28F894E40D5AE2A3 /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1C65F271D54976AEAF5B1CB4522A471 /* Scrypt.swift */; }; + BCE563F1B7FA756C138FC28179851EC7 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FFFD5E940B31BAEC3CCFD05B093B6F8 /* NSTask+AnyPromise.m */; }; + BE1CE42FE75F14BC5B71AED3DC543BCF /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = D895276EEA2D99E4EBF5B7FE4596872B /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BF3AD846ADBFAF021EE70996A7ED071A /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = AD85FC46DA6BEAA980010B0C5F2BEED3 /* secp256k1.c */; }; + BF3DECFBE86EB35CFAC5BAE1C0268391 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 05CC03039B7AACA3DE3D601125B19CC6 /* UIViewController+AnyPromise.m */; }; + C003185B61E62CF4BD4690EDBD0719A3 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB31CE10E8BEEBFC7B50C9F8A97E10A8 /* Blowfish+Foundation.swift */; }; + C0101FD19738FB97383D1C0CF5EEBF77 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68D5DF1B1384D6392013199F71BACD06 /* String Conversion.swift */; }; + C02A520237A6EEC101F93FD5E741C295 /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = FA4D3EFB3ECDE366218A9D0848F3C58B /* scalar_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C0951D3A5CDA6E27EDC2A65A700C8D8D /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89BECCA6149031B2659A0EECDCC2E4A5 /* Cryptors.swift */; }; + C0F8B164DDA6157937A300C207D56E4E /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B1DC98FA2ABF0645707ED4C6FF5D77 /* Subtraction.swift */; }; + C13DF5C0C3793C734EF3847DE3DFE9A0 /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63FD1428729C05C5A88BE98C12254ADA /* BufferStorage.swift */; }; + C1D9D7ECEE62A04544DFA4A2889BCC7D /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70E24C26EF4EF9C8244E7F94F175FD51 /* Configuration.swift */; }; + C510E3B26A4F4876F89A59D5D2F22006 /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67F74D8CA41DCC5236159301ED92764C /* Collection+Extension.swift */; }; + C540A907CA97EA4FB79818D21D2E7CD0 /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB74063F2F7DC76E97D34EC40D093C52 /* Salsa.swift */; }; + C6896E99AC63CF7E9506A6E8CA124CD5 /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = F964C89C691E6FE6350F48A4A3E1DD52 /* PKCS5.swift */; }; + C70A86EC15752B0731CD015CEF45CAAF /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBEB708E926639930327B2FC6F3759D /* PBKDF2.swift */; }; + C83FF7FC178BF33DD5052001F05A83BF /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27DE68FEECDD098908A9003BDA40307F /* Updatable.swift */; }; + C89964A06EC88B3B556310F199344D68 /* Pods-web3swift-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E91F337EA3979DB5DD84C325A340270 /* Pods-web3swift-macOS-dummy.m */; }; + C969C4CB640BF795B01F3648075A446D /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92C1E2F71DB75395E28DC3213425381D /* Bit.swift */; }; + C9B648C3CD7850DC94E49F5F5329CA81 /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB74063F2F7DC76E97D34EC40D093C52 /* Salsa.swift */; }; + CA9B0594A947364945D728CD48CE2675 /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = B8EBC720E3207E6F08965D7549AAFEC6 /* SwiftRLP.h */; settings = {ATTRIBUTES = (Project, ); }; }; + CAF3800A1D4B45C61035F3A330991F20 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E53BAD514C4F4E022EEBCEB1ABC3943 /* Authenticator.swift */; }; + CBAB02308405D4C1CB4271EC4AB971F6 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D6E2E2ED41464CEB00832B492D67ECB /* Words and Bits.swift */; }; + CC44CC395434DAA9F2F7DA1D8E1C341A /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575A44CBD254AB2012072A25C3D25D19 /* StreamEncryptor.swift */; }; + CD1400BD40761FCBE46B17F6B8AA0AE9 /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAF14DF7DD65D242909C4D06F8C00DEF /* HMAC+Foundation.swift */; }; + CD6EC5B134FE5E926C6F6BC0BCAA6826 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 948894E3D7054F9BEAA31B5D6061F696 /* PMKFoundation.h */; settings = {ATTRIBUTES = (Project, ); }; }; + CE2BCA099CEA37688059295108D416AD /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = C04C575F1277CF14F506F691F9C669FC /* Random.swift */; }; + CE6059517A03418C389CF50D78287474 /* EthereumABI-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2EE2AAFC0C186078B992C06F762E8D /* EthereumABI-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + CF08F59B4689BEF43A5B7F883C330BBB /* ABITypeParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4F1681CFA49EA17D6A73339A9C1A44A /* ABITypeParser.swift */; }; + CFBF7084F0841CB8777A37BC16092662 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FB5F00D821CDC9BDA7F7709F07DD0F3 /* after.m */; }; + D10BCDD795487B1471ADAF3F0D4485CA /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 15BED946B8A96EDBF82439D38353B748 /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D1F0182968E66E044F80A9822BE772F0 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA975F09047F404D3183C92FCA1AD829 /* Hashable.swift */; }; + D29E48A6FDC719FD2FF024625C37CA22 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4992855757033544670BD38D4484C08 /* BlockCipher.swift */; }; + D2C9540655CD82F8A12305D2B953BD71 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8172257020A0ACF61B9FA6264236BB6 /* NoPadding.swift */; }; + D32E984FBE218628DC804D3F92B394BF /* EthereumAddress-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 38C29EC87775E098CCEE6CEB4ABA65AA /* EthereumAddress-iOS-dummy.m */; }; + D3B166774A35F98D4C599A9B4DCBDC82 /* SwiftRLP-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 73A68F048F801AD8527F07F7706E57CE /* SwiftRLP-iOS-dummy.m */; }; + D42A1D2FC1FD4BC6485683430F314F8D /* Pods-web3swift-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E8C19543EF3AA4D9801DBE55E22E211 /* Pods-web3swift-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D486D63B958DFDD8C755799433969946 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79B85C952F225CDFB5B272237402E77E /* hang.swift */; }; + D4C0E6966E5FED70544A97ACC237CF3A /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 721ECA637BED3AE2394AA1573B89D998 /* Digest.swift */; }; + D4FBEF46E2616F942B65FF779B374513 /* BigInt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F0A15233EFEAA840C94D98DFD9C1F14 /* BigInt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D528114C056635E14284458D9163DE3A /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 49F74127A936A7C34D38E84140D1EFAC /* group_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D57E19C3E86448FD0CA3B9742DB49497 /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575A44CBD254AB2012072A25C3D25D19 /* StreamEncryptor.swift */; }; + D5F3CB86000211CEE2280DE68F875D8B /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 1592E519056BA4CA85F67406D0EC2ED4 /* basic-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D6BDAA0C8CA8843CE436AA3573C378F9 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93EB1CF4FDC03241B81C3C3B6F58B9E0 /* Square Root.swift */; }; + D6DCA066BC93D939AC99A4E197574317 /* secp256k1_swift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E3FCE1E29EDFA06494CDD00767685E3 /* secp256k1_swift-iOS-dummy.m */; }; + D7346C912787D714E05528CDDB4A75F8 /* SwiftRLP-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1250F72B02037FC0CC2220F528B17381 /* SwiftRLP-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D7705513171AE49C798D5A002BEC0737 /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 449887D7F7932CFAA2B3FAE0BEE1594B /* scratch.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D7875CD7BA041CED180D37E0448C09A8 /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = F063BD5FB8772F058E36A1292962E899 /* Blowfish.swift */; }; + D7AA60A9860ED2E7DD7440AC9D799A04 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8172257020A0ACF61B9FA6264236BB6 /* NoPadding.swift */; }; + D7EC50261154FE1C386EDF60B128A90F /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF31935E8E71BE039924EA648A315B8D /* NSNotificationCenter+Promise.swift */; }; + D81D753CE65D4B1E0F26F57606BD0F6C /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2631D55D12027D3935D7B85C6A624F09 /* Bitwise Ops.swift */; }; + D9BA126F50DCB7B25D32447C2E8931CC /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FB6255E4560252B9DC0BE760F34C261 /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DA1588018CD8315CFCBB2E0806B753E5 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FC232D3CEB1791A116CFCB46BCCE606 /* Array+Foundation.swift */; }; + DA1E098DCF3DEE1C5D699424486C1D64 /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C1637249D7E9C69FBC55792F4BFF580 /* SHA3.swift */; }; + DAA014164E03E57A7D043C270B6C9B84 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C5181B2E5F94EAFEF5F04D83E0FFD13 /* PKCS7.swift */; }; + DCA7BBA544AC372B023678542AB72A6D /* scrypt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 55609C780EA603377D9F33E7661A79BB /* scrypt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DD67FFA8EE4F3833E14B823CEE55424B /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = B621DCE8D325B673C6F300B7C2CD478B /* Promise.swift */; }; + DD7EF0CDE3C0223DD3933632CDB2AB01 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F98F9737D714C11C13F01403ECACC354 /* Utils+Foundation.swift */; }; + DDAAEE587CECD365E4372D6AEF67D713 /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 60243E0B2E1CDFC9B6DF789487982447 /* lax_der_privatekey_parsing.c */; }; + DE020DA46E23F23DCCFAE08D581C1210 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0EE85F786503354B347C059417EBAD2 /* CustomStringConvertible.swift */; }; + DE0C833855F30BFD02D7F624009AFCE5 /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9A9A0105BAE9E5BEE9ADD4B17A58DD8 /* Deprecations.swift */; }; + DE86F4DBFBAE2D9EADB44907B3B7FC1D /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C1637249D7E9C69FBC55792F4BFF580 /* SHA3.swift */; }; + DE9F01F9CE4B8C74DB084D584C1F4DF7 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81392F0749049A8C999337DDA716A157 /* Error.swift */; }; + DED6A3731F280B7A5C4BA0088245421D /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2742B99A93E16E813DA0B71800AAA56 /* String+FoundationExtension.swift */; }; + DF3C881F6AA58663EA27A37DDC93CBD1 /* SipHash-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 48FCAFD34D22FB4A18FEF12007E2FAB3 /* SipHash-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DFB15CA333EE077FC25900A712E89DB7 /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = 003EF4269A56F0C44E64E737009329A6 /* util.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E15BFF7A7883A5BFB699464499718E52 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F9EE37EACAF96F7344C1F0AEA46F02C /* BlockEncryptor.swift */; }; + E1BD1671D6E0A0FDAC9298373486DA9F /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93EB1CF4FDC03241B81C3C3B6F58B9E0 /* Square Root.swift */; }; + E1DA6C9BC2295C7CF04AD192B8FE26FF /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = FA4D3EFB3ECDE366218A9D0848F3C58B /* scalar_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E211E262D4BD3E0165706646B9DBAD9C /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1C65F271D54976AEAF5B1CB4522A471 /* Scrypt.swift */; }; + E2304F8E1E94478D68A8EC526EDCCBAD /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = E1999CB16AEF90FFCC762EC5BA3C538B /* scalar_4x64.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E254A91C69969B33ED1BF9BDE5B19AED /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B8BA477868467E169FF27E9193A10DA /* Data Conversion.swift */; }; + E316F68C4FD62BB0A294D29DB03DCB5D /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = ABA2CC618DEF4A5E27ADED64FC6F96A5 /* scalar_low.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E350B1B350751D65ED5A630756C5DDAF /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F1D20DF17340D045A1FDC2D1D64449D /* ECB.swift */; }; + E38ACED69C24647A7A07B2B72C7580BD /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38E248D955FFD067941A82DF6B7B3C4F /* BlockDecryptor.swift */; }; + E3D91DEF848307121405F35618B723BA /* ABIElements.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B4899E422658B96ADF84B5239C418D /* ABIElements.swift */; }; + E4FB02298751B056940AB39261020DAB /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A3D345B7D38F0B4BAB39F24505D5E5E /* CTR.swift */; }; + E59A5E45ED8B25E70C9C6A6E89C566D4 /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = ABA2CC618DEF4A5E27ADED64FC6F96A5 /* scalar_low.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E5EFEA69608F27C359D3B7989D25F0B1 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80ACF3AED1948ECBBAF9BEFFC3482423 /* Extensions.swift */; }; + E667D403FE161578DA4BD7A748C01FE0 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E0D3EDB8E94AA59C54E4808C60A2744 /* when.m */; }; + E6950B7C92641175616A7FE09FA2574F /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C25934B3D3377624DF16153BF76578 /* Checksum.swift */; }; + E6E4C025FE5F1391E96A65CF5F594591 /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C4685C831E862AD0F75DC78A3A5B61 /* Catchable.swift */; }; + E70AA4690673CA6F6D246FD4F786AE99 /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 07853D5BF50E26B878B7B1D18CF18F06 /* scrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E7DEA0B8E0F9EAF68841EDC4B8AC3396 /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = ADB4E2DA064200DDCD42C634CBC39977 /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E96D904E355EFA92932B4B71E59472E4 /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E773D6D25B2A450D593D189B85B7DA /* BlockMode.swift */; }; + EB4F4E8A7A76E8F00B6B6B9D5D93C6BE /* EthereumABI-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C742D7E4D064B53F3E8BD2061CEB4650 /* EthereumABI-macOS-dummy.m */; }; + EB52C8F7723FCC94649C4768B67E2E3A /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFC58447BAB63CE30E97C059F8345F5 /* SHA1.swift */; }; + EB9345AB32E8C1BCE5C88C239CFAF2B9 /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05DB571F7562C6E5DAC821BF33DF2ACE /* AEAD.swift */; }; + EBC1181767AADF30189982641F9B9648 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A85805FE098BD65AFD79ABDC5A9DDF7 /* Prime Test.swift */; }; + EBD3735323AB89C906B5E1C536976080 /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38E248D955FFD067941A82DF6B7B3C4F /* BlockDecryptor.swift */; }; + EC0634AA758562515F6A6C370F9C7102 /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 58FEC74B279A9D31ADE339DE27E86FA9 /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EC534D19303041971EDE9C1C79A0F5FF /* ABI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21FCC5A27F315ACD9DBDF025F826D31F /* ABI.swift */; }; + ECAAA1869ED698C502004DE2B539728F /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 1592E519056BA4CA85F67406D0EC2ED4 /* basic-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + ECF940C778D08964A4CC5F1090E5B694 /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A69680CF78C97C6DA250B325FFD04251 /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EDEB77EE161E91BE126DB5BECD0D2F88 /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = B453F34A70203AF07F27C5AE1B2A0518 /* AES.Cryptors.swift */; }; + EE783493F1B7530C3742E03C554493DA /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 982E6E4B839762B67F92588D34990052 /* num_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EEDA1D167622551D8F61394C9E16FDC5 /* Result-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 37A3BB2B9627AD42F4EC73AE040C9A18 /* Result-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EF2912DE621D3B57FB6A277CBF39B316 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B830B448B480E1AE7466CE0AB7565D1 /* GCM.swift */; }; + EF56A1A9A97666C4D03AA9AAF5A37918 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34A205CA261F59DB1AC7C1BE4E2ABE19 /* Strideable.swift */; }; + EFDC04F64EB4766D33AC8058E12B4561 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB02248C062005D2F2620C9F81EC5ED4 /* GCD.swift */; }; + F0444E1F4E7C762ECC68CF056B05412E /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E0D3EDB8E94AA59C54E4808C60A2744 /* when.m */; }; + F1DD83612B8154D1465CF398FCFA9596 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31BA61BBC2E9A900CDFD9106099E71AF /* CCM.swift */; }; + F281004328C1EE7335B9F8B4DF6D8F0B /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = C799FC61BB50110B0EF9812635A7CF8F /* race.swift */; }; + F2976AA313F35FAE9B9112630BAEF66D /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = F7E0FE543A2A814147E52BD4424892FD /* fwd.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F2CEA0F86BECA15D8730D3D53D9EAF69 /* SipHash-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 20C577019086BC2EE2D24C2E5BF910AF /* SipHash-iOS-dummy.m */; }; + F3B4A2958AB11045072673A69A78A808 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE693F0F5E15CCA4AE9D51B9A369B70 /* Box.swift */; }; + F48FDD8548C612FB765A5F4D3F2AAEB2 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0CB4379D0092F51F5C1232B3CD03D3 /* PCBC.swift */; }; + F58374064F4B7EFE824BF746EABBEE37 /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D5996479C4CB892D1B062406C8C08F6 /* secp256k1.swift */; }; + F5AE13A73A33CAF4BA119DDEBCAC5809 /* SwiftRLP-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = ED9E675BBBC75B01E6961483170B6E7F /* SwiftRLP-macOS-dummy.m */; }; + F6B78FA78EDE2C42ECDEE022019AB812 /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 60243E0B2E1CDFC9B6DF789487982447 /* lax_der_privatekey_parsing.c */; }; + F6C04F880164DA1647FDF6654CD65CBE /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85342594A31BFFC584D4660A9041CF48 /* Codable.swift */; }; + F6D7738BDDDF311DBDB1B103A5A1F6E6 /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 86CE3A28090BEEF1B09E865F4962D871 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F6DB885F4AA84A99F9B5778AA1E2D3DA /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A1687163A14D55D2EF896A97CD937491 /* hash_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F6EEBE907D9BF3B0332ED86D67236441 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1782185CE59A4E4F74A5C0258C3B5F61 /* BigInt.swift */; }; + F78A144D256C3A6F8F6CCB64E35E869F /* scrypt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 417BA17C9527B36A6953928718163ACE /* scrypt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F854EACBF11549213B26B4748FBB94A0 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B1DC98FA2ABF0645707ED4C6FF5D77 /* Subtraction.swift */; }; + F8977F910FD88CA3560E0435ACA41270 /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C5F41A51FDAEBAF8F849026A9B09E2A /* field_5x52.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F95445AB786CF29CEA99E52C88BFE706 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32E6FCC003B1158AFE68C8101E9DC9B0 /* AES.swift */; }; + F9A83224C63AF5F18AED311461D71668 /* BigInt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A105001ACFD1F5004F2225CB06D4CCA /* BigInt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FA47C2FD4BE0AEE4BBB8F078CEDED890 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62515D5BE9A59FE5C9041B4EBE9CA58 /* Cipher.swift */; }; + FB3B4D902E0078517C1A8D1A64E0D405 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 948894E3D7054F9BEAA31B5D6061F696 /* PMKFoundation.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FB5385DF7643AC5570E694BBA6406E0B /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = A051E774D4D49F8D0B94D9E529E3A524 /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FB5F656078445F49C1D464089236D551 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 59463535BD4D6DAD08D36EAF4421D11D /* NSNotificationCenter+AnyPromise.m */; }; + FC4AD96F8C8D695E021F598BEAB3A13D /* EthereumAddress-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 59AB171D72BF347C5F7A067C2AAB5384 /* EthereumAddress-macOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FC76FBD9E6420F2FD85F7F5EC55B9A31 /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = D318DFC773B02CFC92B543471C937BA7 /* secp256k1.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FCA65EE46FA16DBEA0AD94E3C1C2FD03 /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EFC88D3858F1B2D4952BAA697C360D3 /* Guarantee.swift */; }; + FD6E4E6D2515323B98F8499CAF7D8486 /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6E02047F0F6A6150C26B56EEF63F55B /* ZeroPadding.swift */; }; + FE52A2BA42E76A122211A8115915233D /* Pods-web3swift-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F688145BCFE1FB8B76299CC261A05E /* Pods-web3swift-iOS-dummy.m */; }; + FEBCBEDE2597673C7D802896774CDCBD /* Result-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A844BDD60081AA12674BC4FC33E5560 /* Result-iOS-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FF7A4D23C449D4BB4A93095BB9F4ECA5 /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E4426237EBEE47CAC169D6291F77423 /* when.swift */; }; + FF83256DE909E2F86AEBBF4E51F42EF0 /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67F74D8CA41DCC5236159301ED92764C /* Collection+Extension.swift */; }; + FFD1323B3E415476F73D432694CC4D35 /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 129427E2D354B71D619F0DAC197039BD /* Rabbit.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 13C00F95FF864E5C7AAC5B0A5CB8498F /* PBXContainerItemProxy */ = { + 06FAFF995DCDF3CCF5C19865E9FCA57F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; - remoteInfo = "CryptoSwift-iOS"; + remoteGlobalIDString = AF9F48E6961507C0E2FD7A3CDBC652DA; + remoteInfo = "BigInt-iOS"; }; - 1D311CE48C7A73E73FD12595C75A78C9 /* PBXContainerItemProxy */ = { + 099BB689D5DBD5D5DEBA336FBD217742 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = C87C2E6C438181FF7B92161BFC2DFBEB; + remoteGlobalIDString = 60BB8021A6290DE4F66E9D4A96906F3C; remoteInfo = "Result-macOS"; }; + 1074B809BD71CC2DC821BC5E173A4740 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = F8C504FC3CE2FB81EF2C3E4175B28B3D; + remoteInfo = "EthereumAddress-iOS"; + }; + 12BDC3CC8385F7A17B4C9A4084570897 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = FFBF3D20256EEEEE218C227988266104; + remoteInfo = "EthereumABI-iOS"; + }; 1E5017C3A1512E67B0318DD1DACDE515 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 82C35D316B5E8115E43ACCFE4E50137C; + remoteGlobalIDString = 023FD8884DE6975FECF83E672E5A51B6; remoteInfo = "Pods-web3swift-macOS"; }; + 20A317B02DEAB0C5E12252BAD3678AC3 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; + remoteInfo = "CryptoSwift-iOS"; + }; + 23B4CA009D06E1EB2F03415680002335 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9646F4C6B5DB5298F5EEE5871120A244; + remoteInfo = "BigInt-macOS"; + }; + 283B81AF6A42B35D635E192D621E2B56 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3B79F6DB09B597AAE9D3EB939DA463D8; + remoteInfo = "SipHash-iOS"; + }; 284C9AFC38A225A506CB24973AEFB321 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; @@ -493,675 +550,731 @@ remoteGlobalIDString = 4FCBE56BC5E931FDC43C642250037C1F; remoteInfo = "SipHash-macOS"; }; - 2A170694DEDAF59456D7141DB9F7FACC /* PBXContainerItemProxy */ = { + 2D8C658A18F2B96B45403A04ECD943E9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 1168313AEC7524AEDFC1224C6D3C6E44; - remoteInfo = "EthereumAddress-iOS"; + remoteGlobalIDString = 1084E340C76D167B42F96381D5AC59FB; + remoteInfo = "EthereumAddress-macOS"; }; 366CCE30759EB3C0FF8E45BE9572B007 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = BAA7945626BCC2CCA0CD2C7A0AC13E79; + remoteGlobalIDString = 56C190CBC3444CE65376067572B13693; remoteInfo = "Pods-web3swift-iOS"; }; - 38BDFC13BA428BD451594A459B74A302 /* PBXContainerItemProxy */ = { + 36A6BC9A8529E6996209859ED7E7041A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 12455571B54E567146873FF705359CFE; - remoteInfo = "Result-iOS"; + remoteGlobalIDString = AF9F48E6961507C0E2FD7A3CDBC652DA; + remoteInfo = "BigInt-iOS"; }; - 78E3F5567AAF195D28B5DA37D51C8623 /* PBXContainerItemProxy */ = { + 381F95DA9E2FDB23DE4AB413195C40C2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 94906F0C68B58FB4B40554812C3BBFD8; - remoteInfo = PromiseKit; + remoteGlobalIDString = 4FCBE56BC5E931FDC43C642250037C1F; + remoteInfo = "SipHash-macOS"; }; - 8022E9AB3C92BAD10B2AEFCE42C6EDA5 /* PBXContainerItemProxy */ = { + 42C05260B28DAAAD5E44B471A57BDE2A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 7BF3C926294C92422AFB78600D576975; - remoteInfo = "scrypt-macOS"; + remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; + remoteInfo = "CryptoSwift-macOS"; }; - 819958A4438F4712BB2395ECD30B2C4D /* PBXContainerItemProxy */ = { + 48C230599D2897ADA99AF94AE1966B79 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 73527F6F8B0A792EA5FD7085DADC6B93; - remoteInfo = "SwiftRLP-macOS"; + remoteGlobalIDString = 064630A81A32C3F755213FAB5B3FAAAB; + remoteInfo = "SwiftRLP-iOS"; }; - 881B896164342E47B02F93B29ADA3355 /* PBXContainerItemProxy */ = { + 4BC1B5C55B9E19379BFD1419C6475244 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 4FCBE56BC5E931FDC43C642250037C1F; - remoteInfo = "SipHash-macOS"; + remoteGlobalIDString = 1084E340C76D167B42F96381D5AC59FB; + remoteInfo = "EthereumAddress-macOS"; }; - 97F0040393FC590BA7564498436EC95D /* PBXContainerItemProxy */ = { + 59F60AFE805CEBB2EDEC5D68F84B1576 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 1F803FF778771424C8085D9971D3840F; - remoteInfo = "SwiftRLP-iOS"; + remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; + remoteInfo = "CryptoSwift-macOS"; }; - 995B8D8F764EF523079B88A06313F11D /* PBXContainerItemProxy */ = { + 5E5A5367425FAE2AC8C07569D7CBE881 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 9646F4C6B5DB5298F5EEE5871120A244; - remoteInfo = "BigInt-macOS"; + remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; + remoteInfo = "CryptoSwift-iOS"; }; - AC378E3E20AF5D424B6D68F67641CFC3 /* PBXContainerItemProxy */ = { + 61558A075BFFFBA7882CAEE8C5732ECE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 3B79F6DB09B597AAE9D3EB939DA463D8; - remoteInfo = "SipHash-iOS"; + remoteGlobalIDString = 75EC00B8FD54D720BB772CA16EEAE742; + remoteInfo = "EthereumABI-macOS"; }; - BB90BB48F65D5795C75190C5B68C55DA /* PBXContainerItemProxy */ = { + 629DA96E2410B6F480F103C731020B15 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 4C59270F810F2B1FEC2F3D5A77188907; + remoteGlobalIDString = F25097D79C7232475816DB85533AC607; remoteInfo = "secp256k1_swift-macOS"; }; - BE0F4DBA374559F8940C0B70384476BD /* PBXContainerItemProxy */ = { + 6AE3006AF993F15800127DD3F057F155 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 558049EB555978BC8947ECF2498E78D9; - remoteInfo = "PromiseKit.root-CorePromise-Foundation"; + remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; + remoteInfo = "CryptoSwift-iOS"; }; - C0F3CE7136EDD63588CA49A936A5759F /* PBXContainerItemProxy */ = { + 70F9AB5B3A118321E51F635B2BEE3CED /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 3B79F6DB09B597AAE9D3EB939DA463D8; - remoteInfo = "SipHash-iOS"; + remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; + remoteInfo = "CryptoSwift-iOS"; }; - CF619704DBA07523055F8D5648DDBAC5 /* PBXContainerItemProxy */ = { + 714B2335333EF3361207DF61B815EABB /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = BB37143ACC20FC450C45EFD6C5660906; - remoteInfo = "scrypt-iOS"; + remoteGlobalIDString = 9646F4C6B5DB5298F5EEE5871120A244; + remoteInfo = "BigInt-macOS"; }; - D3EE8712BA96FE8983FC958E6574EDD5 /* PBXContainerItemProxy */ = { + 9619E33BB76CA82AF5BCFD855D8DE72E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; - remoteInfo = "CryptoSwift-macOS"; + remoteGlobalIDString = EE65EFBDF686C56EA74D41CCE0304FCC; + remoteInfo = "scrypt-macOS"; }; - E2571A8251835112EFDDA05DFB2E5DB7 /* PBXContainerItemProxy */ = { + A782764E5DFF6FDC6717BF4453214525 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = AF9F48E6961507C0E2FD7A3CDBC652DA; - remoteInfo = "BigInt-iOS"; + remoteGlobalIDString = 9646F4C6B5DB5298F5EEE5871120A244; + remoteInfo = "BigInt-macOS"; }; - E34A7F6994A6A82EB46702FB69724C37 /* PBXContainerItemProxy */ = { + AC378E3E20AF5D424B6D68F67641CFC3 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 96225BBE1203595F4D0672A487BB9861; - remoteInfo = "secp256k1_swift-iOS"; + remoteGlobalIDString = 3B79F6DB09B597AAE9D3EB939DA463D8; + remoteInfo = "SipHash-iOS"; }; - E3B6F092EBFA691E0A430BD173868EE2 /* PBXContainerItemProxy */ = { + AD688405EBF3846C3A14C36C7F7467F8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 9646F4C6B5DB5298F5EEE5871120A244; - remoteInfo = "BigInt-macOS"; + remoteGlobalIDString = 8B46DCE922AD4DB52AB389148AB898AB; + remoteInfo = "scrypt-iOS"; }; - E4535F8068DAE0F786E0E402D0C94ABE /* PBXContainerItemProxy */ = { + B26EAE97BDAB5AF01C604365CB5F406C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = AF9F48E6961507C0E2FD7A3CDBC652DA; remoteInfo = "BigInt-iOS"; }; - E8B4498958DB7A8D6B92BD5B3EC5929C /* PBXContainerItemProxy */ = { + BBE7A89B2AC6FEAE944585350A21A6F6 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; - remoteInfo = "CryptoSwift-macOS"; + remoteGlobalIDString = 16689698E943DBC08E5169468314C018; + remoteInfo = "Result-iOS"; }; - ED9EA08A437EDE511FD5DFDA715E57C7 /* PBXContainerItemProxy */ = { + C2A6BB71B66A804F107BDE387EED9DFB /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; - remoteInfo = "CryptoSwift-iOS"; + remoteGlobalIDString = E03BC878947EE75B154F4C52126FA465; + remoteInfo = "SwiftRLP-macOS"; }; - F6D2E7AC0942F82635983E5CBB33D700 /* PBXContainerItemProxy */ = { + D23A20FA7224632C3A5FE8EA34DEF1D4 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = E615C0628D54019CCEE5C0CC80B55529; - remoteInfo = "CryptoSwift-iOS"; + remoteGlobalIDString = EC4FD142A8187DC97F5C77E345493DC4; + remoteInfo = PromiseKit; + }; + DCA19D3862551FBDC00AAF6455703513 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = F8C504FC3CE2FB81EF2C3E4175B28B3D; + remoteInfo = "EthereumAddress-iOS"; }; - FA5D6DF00D850BA03F64F8B7F8E88175 /* PBXContainerItemProxy */ = { + E0E74766A66548F2C349A91FC003EF0A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; remoteInfo = "CryptoSwift-macOS"; }; - FC1CF70CADD772EA1F635C39F8E9A792 /* PBXContainerItemProxy */ = { + E3D60F25AD4AFCD3E199C418A6BEC4CB /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = F5120265F2BDEB78BE6300C2AF965614; - remoteInfo = "EthereumAddress-macOS"; + remoteGlobalIDString = 39C6DF22D4F83A78CB7F52D86381D937; + remoteInfo = "secp256k1_swift-iOS"; + }; + EDCBD08F51F8B9B91035148948A48489 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 78DC154308FD9CFC54ADA13FD1897A6B; + remoteInfo = "CryptoSwift-macOS"; + }; + FE86C0598E860121877FB385FC2747CE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 02DC76A9AFBA2BA6CA9EBA39CCD34BCC; + remoteInfo = "PromiseKit.root-CorePromise-Foundation"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 01271B2BB62FE2D72466A630AC9D1BE8 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Configuration.swift; sourceTree = ""; }; - 02516902C16D7E925BA5D0CD9531308D /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; - 0295AAB9A4AEF4BACC811B917B2F75DE /* Result-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-iOS-prefix.pch"; sourceTree = ""; }; - 03321ECEB201CDE70DA4F88EE48E2044 /* Salsa.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Salsa.swift; path = scrypt/scrypt/Salsa.swift; sourceTree = ""; }; - 03FE099622DA426E4CBDFEB30B374591 /* Primitive Types.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Primitive Types.swift"; path = "SipHash/Primitive Types.swift"; sourceTree = ""; }; + 003EF4269A56F0C44E64E737009329A6 /* util.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = util.h; path = Classes/secp256k1/src/util.h; sourceTree = ""; }; + 00E773D6D25B2A450D593D189B85B7DA /* BlockMode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockMode.swift; path = Sources/CryptoSwift/BlockMode/BlockMode.swift; sourceTree = ""; }; + 01B9E8C5A331C30CF0ACEF7187948418 /* SipHash-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-iOS-prefix.pch"; sourceTree = ""; }; + 03C5B3B2079547713108CA0A75C2D683 /* Addition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Addition.swift; path = sources/Addition.swift; sourceTree = ""; }; 042CC2D185140E7D725D22562A3E307F /* Pods-web3swift-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-iOS.debug.xcconfig"; sourceTree = ""; }; - 049ABCA847872C85F1B4A543A069DB7F /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PromiseKit.modulemap; sourceTree = ""; }; - 0554DC016A3872F60738FE5C366CAF31 /* ecmult_gen.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen.h; path = Classes/secp256k1/src/ecmult_gen.h; sourceTree = ""; }; - 062A95E74B96944BC0E3A674E72AE85E /* ecmult_gen_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen_impl.h; path = Classes/secp256k1/src/ecmult_gen_impl.h; sourceTree = ""; }; - 07CB743A805B99BE84DD49F8D999BF5C /* secp256k1_ecdh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_ecdh.h; path = Classes/secp256k1/include/secp256k1_ecdh.h; sourceTree = ""; }; - 08390C702E93A122CAC37BDF6A07A98C /* scalar_low.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low.h; path = Classes/secp256k1/src/scalar_low.h; sourceTree = ""; }; - 08CA1065DA6D886DAD8978D531C6C531 /* PromiseKit.root-CorePromise-Foundation-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PromiseKit.root-CorePromise-Foundation-dummy.m"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-dummy.m"; sourceTree = ""; }; - 09536C3B22879E31B5C0B3426E2FEBCA /* CryptoSwift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CryptoSwift-iOS-dummy.m"; sourceTree = ""; }; - 09601767E682E0D86F15EF42B2DCAD46 /* CryptoSwift-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-iOS-prefix.pch"; sourceTree = ""; }; - 0A734506E75FE208AFB8DA726262FFEC /* EthereumAddress-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EthereumAddress-macOS-umbrella.h"; path = "../EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h"; sourceTree = ""; }; - 0B152212D05CB08C4E0B61D8CDFF12C9 /* Guarantee.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Guarantee.swift; path = Sources/Guarantee.swift; sourceTree = ""; }; - 0C57A83FBD44C769166BCCC5CD45BD3F /* firstly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = firstly.swift; path = Sources/firstly.swift; sourceTree = ""; }; - 0D0947D47B9CECD59BC73EAC48D4ED27 /* HKDF.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HKDF.swift; path = Sources/CryptoSwift/HKDF.swift; sourceTree = ""; }; - 0D2BE96DBE00949D2B047DC83A759B4C /* BlockDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockDecryptor.swift; path = Sources/CryptoSwift/BlockDecryptor.swift; sourceTree = ""; }; + 04464806E7EED788DFE4F8D62793DD29 /* PromiseKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-umbrella.h"; sourceTree = ""; }; + 04B39BEAD1520A1D6783A85DE2C51340 /* 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 = ""; }; + 052A5D977253AD46619C79759D031E6B /* ecmult_const_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const_impl.h; path = Classes/secp256k1/src/ecmult_const_impl.h; sourceTree = ""; }; + 0536186C77B05CB18765BFD4670AC3D1 /* Result-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "Result-macOS-dummy.m"; path = "../Result-macOS/Result-macOS-dummy.m"; sourceTree = ""; }; + 05CC03039B7AACA3DE3D601125B19CC6 /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.m"; sourceTree = ""; }; + 05D37539C41BE79893FEDECCB70FC25B /* ecmult_const.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const.h; path = Classes/secp256k1/src/ecmult_const.h; sourceTree = ""; }; + 05DB571F7562C6E5DAC821BF33DF2ACE /* AEAD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEAD.swift; path = Sources/CryptoSwift/AEAD/AEAD.swift; sourceTree = ""; }; + 07853D5BF50E26B878B7B1D18CF18F06 /* scrypt.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scrypt.h; path = scrypt/scrypt.h; sourceTree = ""; }; + 0875934C7BD4393C0A91DFA3CF1FBBED /* libResult-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libResult-iOS.a"; path = "libResult-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 08A99F6D5C3E452229D15E3E8C1660F3 /* BigInt-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "BigInt-macOS.xcconfig"; path = "../BigInt-macOS/BigInt-macOS.xcconfig"; sourceTree = ""; }; + 0930D7CD22CBEC2C752C14A123807624 /* Floating Point Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Floating Point Conversion.swift"; path = "sources/Floating Point Conversion.swift"; sourceTree = ""; }; + 0A518C6FBE9C3B3FBF40D4CDCE3BA5A7 /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; + 0A85805FE098BD65AFD79ABDC5A9DDF7 /* Prime Test.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Prime Test.swift"; path = "sources/Prime Test.swift"; sourceTree = ""; }; + 0C79BC89B6EB9504D07FA8AC80365541 /* Result-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-iOS-prefix.pch"; sourceTree = ""; }; 0D88C9D56C3885598E20D9718F3B8F16 /* Pods-web3swift-macOS_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-macOS_Tests.release.xcconfig"; sourceTree = ""; }; - 0DE0997E93980E728205BE4BF37B5FBC /* scrypt-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "scrypt-iOS.xcconfig"; sourceTree = ""; }; - 0E67F7B0700CACBB7DFD27A88EFF75C2 /* PromiseKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; - 0EA0E0A67D5738512E4618E1AEDA5E3E /* CustomStringConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomStringConvertible.swift; path = Sources/CustomStringConvertible.swift; sourceTree = ""; }; - 0EC0DBFB306B96AAE65A02CB825C4F0B /* SHA1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA1.swift; path = Sources/CryptoSwift/SHA1.swift; sourceTree = ""; }; - 0F02A89B4F4807025E1CB0C26D63CD65 /* SwiftRLP.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftRLP.h; path = SwiftRLP/SwiftRLP.h; sourceTree = ""; }; - 10E2FD109C104BBFF96C8BEAE5D93A6E /* libPromiseKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libPromiseKit.a; path = libPromiseKit.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 121546801BC1F73B1E78D3BA38876A8C /* EthereumAddress-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EthereumAddress-macOS-prefix.pch"; path = "../EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch"; sourceTree = ""; }; - 12838912E9C17379AEEDB5CEF54ED779 /* Result-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Result-iOS.modulemap"; sourceTree = ""; }; - 1412597E34EB8268006B0BCFF20BB89A /* secp256k1_swift-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "secp256k1_swift-iOS.xcconfig"; sourceTree = ""; }; - 14176496814CB0D56F198301D279FE65 /* CCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CCM.swift; path = Sources/CryptoSwift/BlockMode/CCM.swift; sourceTree = ""; }; - 1422C640D1B145BC997D3E0A3FF10339 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = EthereumAddress/Classes/Extensions.swift; sourceTree = ""; }; - 145A69383BF153D7728F4793AB68C3C4 /* hang.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = hang.swift; path = Sources/hang.swift; sourceTree = ""; }; - 15206D43EDA63AD479C638B175342338 /* Result-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Result-macOS.xcconfig"; path = "../Result-macOS/Result-macOS.xcconfig"; sourceTree = ""; }; - 1576E0C86B6BE13F5FB685E1357E71C3 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; - 17856FB7A41BDDB75285F531B03882F4 /* PMKFoundation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKFoundation.h; path = Extensions/Foundation/Sources/PMKFoundation.h; sourceTree = ""; }; - 17F353B4B162974207D9F48A62765D99 /* libscrypt-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libscrypt-iOS.a"; path = "libscrypt-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 19725B1F6B394E3B97BB387C7E4E4874 /* NoError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoError.swift; path = Result/NoError.swift; sourceTree = ""; }; - 1A86CAF979F3E970071A5FC47D9D7EAC /* Division.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Division.swift; path = sources/Division.swift; sourceTree = ""; }; - 1BBCD0009252A5C66FFA6A2EDAE25173 /* secp256k1_swift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "secp256k1_swift-macOS-umbrella.h"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h"; sourceTree = ""; }; + 0DA70B96E002212A3A39FC0943499DF6 /* Result-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Result-macOS-prefix.pch"; path = "../Result-macOS/Result-macOS-prefix.pch"; sourceTree = ""; }; + 0DCAB923DFB091E9F4A71F5FD29FEB40 /* field_10x26.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26.h; path = Classes/secp256k1/src/field_10x26.h; sourceTree = ""; }; + 0E7AC8F7B30BB74533D51C9515BE9258 /* SwiftRLP-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SwiftRLP-macOS.modulemap"; path = "../SwiftRLP-macOS/SwiftRLP-macOS.modulemap"; sourceTree = ""; }; + 0FC232D3CEB1791A116CFCB46BCCE606 /* Array+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Array+Foundation.swift"; sourceTree = ""; }; + 0FFAEDF6DDF0B48C4B8E16F6F9C59A5F /* HKDF.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HKDF.swift; path = Sources/CryptoSwift/HKDF.swift; sourceTree = ""; }; + 11C198E371333D0B4E1F4A5B168C23C7 /* libPods-web3swift-macOS_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-macOS_Tests.a"; path = "libPods-web3swift-macOS_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1250F72B02037FC0CC2220F528B17381 /* SwiftRLP-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-iOS-umbrella.h"; sourceTree = ""; }; + 129427E2D354B71D619F0DAC197039BD /* Rabbit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rabbit.swift; path = Sources/CryptoSwift/Rabbit.swift; sourceTree = ""; }; + 12EC94EA370709920BAE52B23A048E1A /* libsecp256k1-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "libsecp256k1-config.h"; path = "Classes/libsecp256k1-config.h"; sourceTree = ""; }; + 1341B693AC58D9D488B5E6F8B568097B /* CryptoSwift-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-iOS-prefix.pch"; sourceTree = ""; }; + 1592E519056BA4CA85F67406D0EC2ED4 /* basic-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "basic-config.h"; path = "Classes/secp256k1/src/basic-config.h"; sourceTree = ""; }; + 15BED946B8A96EDBF82439D38353B748 /* lax_der_privatekey_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_privatekey_parsing.h; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.h; sourceTree = ""; }; + 16973E34A2E1AB31C96F6ECF88E284D7 /* SecureBytes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SecureBytes.swift; path = Sources/CryptoSwift/SecureBytes.swift; sourceTree = ""; }; + 1782185CE59A4E4F74A5C0258C3B5F61 /* BigInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigInt.swift; path = sources/BigInt.swift; sourceTree = ""; }; + 1A0E65E61932B728FD97FB08D42B3EF6 /* libBigInt-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libBigInt-macOS.a"; path = "libBigInt-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1B8BA477868467E169FF27E9193A10DA /* Data Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data Conversion.swift"; path = "sources/Data Conversion.swift"; sourceTree = ""; }; + 1C43D53E5A934E216CB1B7DD01DE877B /* ecdsa_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa_impl.h; path = Classes/secp256k1/src/ecdsa_impl.h; sourceTree = ""; }; 1C8F00AC871FE0EC2FBD9A40F62753CD /* Pods-web3swift-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-macOS.debug.xcconfig"; sourceTree = ""; }; - 1D7B42933B2D81EED52706C7200A9732 /* lax_der_privatekey_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_privatekey_parsing.c; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.c; sourceTree = ""; }; - 1D8151AFF003D8A45F3E0F171019ED33 /* OFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OFB.swift; path = Sources/CryptoSwift/BlockMode/OFB.swift; sourceTree = ""; }; - 1DF1726C7221A0B7805EF3E180CE8007 /* libPods-web3swift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-macOS.a"; path = "libPods-web3swift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1EDD6BBAF4F23E405AA0CA5AA2837BD9 /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/ecdh/main_impl.h; sourceTree = ""; }; - 1F0D95EE88A2B8D781795DF20E0568F6 /* BlockMode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockMode.swift; path = Sources/CryptoSwift/BlockMode/BlockMode.swift; sourceTree = ""; }; - 20BE3E8F811475C9F3E6350A16EF3D56 /* UInt16+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt16+Extension.swift"; path = "Sources/CryptoSwift/UInt16+Extension.swift"; sourceTree = ""; }; - 20D278014F2D90DDD7C703E49B6727B7 /* libsecp256k1_swift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libsecp256k1_swift-iOS.a"; path = "libsecp256k1_swift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 23299E01AF2849576AF87D2A3EB8D494 /* EthereumAddress-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EthereumAddress-iOS-dummy.m"; sourceTree = ""; }; - 234968A9A443A0E2CC4FBFBADB4CC6AB /* 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 = ""; }; - 23EA6F524218763DB7E76A6E13387EAC /* Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Padding.swift; path = Sources/CryptoSwift/Padding.swift; sourceTree = ""; }; + 1E0CB4379D0092F51F5C1232B3CD03D3 /* PCBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PCBC.swift; path = Sources/CryptoSwift/BlockMode/PCBC.swift; sourceTree = ""; }; + 1E4426237EBEE47CAC169D6291F77423 /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; + 1F2F682F960F536C585085773DF5BBA1 /* Cryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptor.swift; path = Sources/CryptoSwift/Cryptor.swift; sourceTree = ""; }; + 20C577019086BC2EE2D24C2E5BF910AF /* SipHash-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SipHash-iOS-dummy.m"; sourceTree = ""; }; + 20F31FF3FC3A98D10214EF6C7199FCB5 /* race.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = race.m; path = Sources/race.m; sourceTree = ""; }; + 21BC35B1C593381A32229DF8C9804F62 /* EthereumAddress-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "EthereumAddress-macOS.modulemap"; path = "../EthereumAddress-macOS/EthereumAddress-macOS.modulemap"; sourceTree = ""; }; + 21FCC5A27F315ACD9DBDF025F826D31F /* ABI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABI.swift; path = EthereumABI/Classes/ABI.swift; sourceTree = ""; }; + 224F4E958C4909EF47CB0A9F43F48030 /* CBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBC.swift; path = Sources/CryptoSwift/BlockMode/CBC.swift; sourceTree = ""; }; + 22C3F518991BE51FC595F8F3EF89345B /* EthereumABI-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EthereumABI-macOS-prefix.pch"; path = "../EthereumABI-macOS/EthereumABI-macOS-prefix.pch"; sourceTree = ""; }; + 247DF1F9FE8902AA1A74867E7854662F /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; 24B5C2F89100EAE084E4AF83DDE6303D /* Pods-web3swift-iOS_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-iOS_Tests.debug.xcconfig"; sourceTree = ""; }; - 255F9BD02565315A20D36910794D0C10 /* libsecp256k1-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "libsecp256k1-config.h"; path = "Classes/libsecp256k1-config.h"; sourceTree = ""; }; - 25E9E042655265AEB9322FB01DD7A702 /* Resolver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Resolver.swift; path = Sources/Resolver.swift; sourceTree = ""; }; + 2533EAF35B54AB44227FBC0A9BA7D19E /* scrypt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "scrypt-iOS-dummy.m"; sourceTree = ""; }; + 258EB69CA13649BFEBC389916A418DAD /* OFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OFB.swift; path = Sources/CryptoSwift/BlockMode/OFB.swift; sourceTree = ""; }; 25F72E78DF48560F5D210E57844ACDED /* Pods-web3swift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-web3swift-macOS-umbrella.h"; sourceTree = ""; }; - 26BEF092AF19B017CCEAC5BD6EDFADBC /* CryptoSwift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CryptoSwift-macOS-umbrella.h"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h"; sourceTree = ""; }; - 282DD884F817856F0FD3D38F8A4447B1 /* field_5x52_asm_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_asm_impl.h; path = Classes/secp256k1/src/field_5x52_asm_impl.h; sourceTree = ""; }; - 28AB30A05C0D17ABF7D0DBC475F93C23 /* Result-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "Result-macOS-dummy.m"; path = "../Result-macOS/Result-macOS-dummy.m"; sourceTree = ""; }; - 28D6357617301A15F1861ECE0B2D728E /* SipHashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHashable.swift; path = SipHash/SipHashable.swift; sourceTree = ""; }; - 28F6D61D90FB438C4CB2856FA258E35B /* EthereumAddress-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumAddress-iOS-prefix.pch"; sourceTree = ""; }; - 2AF08003360A2A59E3E059CBC5496E71 /* ecdsa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa.h; path = Classes/secp256k1/src/ecdsa.h; sourceTree = ""; }; - 2BC7202C545EAC46F224EE9AB6B1F0F7 /* field.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field.h; path = Classes/secp256k1/src/field.h; sourceTree = ""; }; - 2BE63C0E40FA294F6C512967711E56D9 /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; - 2D1D500C8CF88FC87FF7FA43DBC53611 /* AnyError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyError.swift; path = Result/AnyError.swift; sourceTree = ""; }; - 2D4F789F0354155D07BB3A1463344281 /* UIViewPropertyAnimator+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewPropertyAnimator+Promise.swift"; path = "Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift"; sourceTree = ""; }; - 310A618141B833B61214988468629C13 /* ecmult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult.h; path = Classes/secp256k1/src/ecmult.h; sourceTree = ""; }; - 3391B8242DCA2A16EB9DBB3FF0740ABC /* Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptors.swift; path = Sources/CryptoSwift/Cryptors.swift; sourceTree = ""; }; - 3487EA794F9422FD28689C37156DD9FE /* Addition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Addition.swift; path = sources/Addition.swift; sourceTree = ""; }; - 358F7A798EA72C8BFA7C4AA5D7A22723 /* race.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = race.m; path = Sources/race.m; sourceTree = ""; }; - 37B67C2B42A2EC2E689AE41636261351 /* scalar_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_impl.h; path = Classes/secp256k1/src/scalar_impl.h; sourceTree = ""; }; - 39A04A76F1A947E73DA6CC6FE271B82D /* CryptoSwift-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CryptoSwift-macOS-prefix.pch"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; sourceTree = ""; }; - 3ABE33C91D6B128E8B104ED3630B6ABB /* CBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBC.swift; path = Sources/CryptoSwift/BlockMode/CBC.swift; sourceTree = ""; }; - 3C9CD6920241610BE46DBB9D591849AD /* field_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_impl.h; path = Classes/secp256k1/src/field_impl.h; sourceTree = ""; }; - 3D2AD51705C652FD9094CEDC59DFB4FC /* SwiftRLP-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SwiftRLP-macOS.xcconfig"; path = "../SwiftRLP-macOS/SwiftRLP-macOS.xcconfig"; sourceTree = ""; }; - 3D6CFCC98052B542B8BD8050E0204993 /* Box.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Sources/Box.swift; sourceTree = ""; }; - 3E5F93B0E61748A9D9906D3305A41EA8 /* ecmult_const.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const.h; path = Classes/secp256k1/src/ecmult_const.h; sourceTree = ""; }; - 3E75AF68728F33A9AC112BE223CA6718 /* num_gmp_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp_impl.h; path = Classes/secp256k1/src/num_gmp_impl.h; sourceTree = ""; }; - 3E8DAE988F4403CE8B047E936F2B4AE1 /* secp256k1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1.h; path = Classes/secp256k1/include/secp256k1.h; sourceTree = ""; }; - 3E8F4C6770C979220F90AD2CBA4EA3CE /* field_5x52_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_impl.h; path = Classes/secp256k1/src/field_5x52_impl.h; sourceTree = ""; }; + 2631D55D12027D3935D7B85C6A624F09 /* Bitwise Ops.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bitwise Ops.swift"; path = "sources/Bitwise Ops.swift"; sourceTree = ""; }; + 2716312EADA930757B04015685EFD479 /* scalar.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar.h; path = Classes/secp256k1/src/scalar.h; sourceTree = ""; }; + 279857EBC2D837FCAB656991E73C8C39 /* Result-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-iOS-dummy.m"; sourceTree = ""; }; + 27D0F7DCFEE54028674461B7456DB4EB /* libEthereumAddress-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libEthereumAddress-iOS.a"; path = "libEthereumAddress-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 27DE68FEECDD098908A9003BDA40307F /* Updatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Updatable.swift; path = Sources/CryptoSwift/Updatable.swift; sourceTree = ""; }; + 2A23509A1B4B9BA0141EB958C32816D4 /* libPods-web3swift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-iOS.a"; path = "libPods-web3swift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2A57E22BE5970C0F858EB10A32A3019D /* Multiplication.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multiplication.swift; path = sources/Multiplication.swift; sourceTree = ""; }; + 2A844BDD60081AA12674BC4FC33E5560 /* Result-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-iOS-umbrella.h"; sourceTree = ""; }; + 2AD338DD23B43013308A65379BAEC16C /* BigInt-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "BigInt-iOS.xcconfig"; sourceTree = ""; }; + 2C1E2451F697C193D067734C4AF47482 /* EthereumABI-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "EthereumABI-iOS.modulemap"; sourceTree = ""; }; + 2C5F41A51FDAEBAF8F849026A9B09E2A /* field_5x52.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52.h; path = Classes/secp256k1/src/field_5x52.h; sourceTree = ""; }; + 2D6E2E2ED41464CEB00832B492D67ECB /* Words and Bits.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Words and Bits.swift"; path = "sources/Words and Bits.swift"; sourceTree = ""; }; + 2F751DF027B3EC6771E69D0DF744E2F1 /* libSipHash-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSipHash-iOS.a"; path = "libSipHash-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 303781526174E2DFA273950F9C1AEDBC /* CryptoSwift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-iOS-umbrella.h"; sourceTree = ""; }; + 31BA61BBC2E9A900CDFD9106099E71AF /* CCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CCM.swift; path = Sources/CryptoSwift/BlockMode/CCM.swift; sourceTree = ""; }; + 32E6FCC003B1158AFE68C8101E9DC9B0 /* AES.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.swift; path = Sources/CryptoSwift/AES.swift; sourceTree = ""; }; + 330B8D8B0B8ACFFDF2B9292154D71642 /* secp256k1_swift-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "secp256k1_swift-macOS.xcconfig"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS.xcconfig"; sourceTree = ""; }; + 34A205CA261F59DB1AC7C1BE4E2ABE19 /* Strideable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Strideable.swift; path = sources/Strideable.swift; sourceTree = ""; }; + 3649CFBA1E54D6AD5C50879B03ED6866 /* CFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CFB.swift; path = Sources/CryptoSwift/BlockMode/CFB.swift; sourceTree = ""; }; + 3654C41FDB74088592DA713158476E5B /* Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Padding.swift; path = Sources/CryptoSwift/Padding.swift; sourceTree = ""; }; + 36F3DF43B9422FD5916A6C75F9C68568 /* BatchedCollection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BatchedCollection.swift; path = Sources/CryptoSwift/BatchedCollection.swift; sourceTree = ""; }; + 37A3BB2B9627AD42F4EC73AE040C9A18 /* Result-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Result-macOS-umbrella.h"; path = "../Result-macOS/Result-macOS-umbrella.h"; sourceTree = ""; }; + 37A42E23E411D520ADBF58299104A5E4 /* libSwiftRLP-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSwiftRLP-macOS.a"; path = "libSwiftRLP-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 38C29EC87775E098CCEE6CEB4ABA65AA /* EthereumAddress-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EthereumAddress-iOS-dummy.m"; sourceTree = ""; }; + 38E248D955FFD067941A82DF6B7B3C4F /* BlockDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockDecryptor.swift; path = Sources/CryptoSwift/BlockDecryptor.swift; sourceTree = ""; }; + 398E3F38AA4E4F1F69F6BFA75A49E0C1 /* SipHash-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SipHash-iOS.modulemap"; sourceTree = ""; }; + 3B9103BCEE6F57F21DC2CDA536BA8D0F /* CryptoSwift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "CryptoSwift-macOS-dummy.m"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-dummy.m"; sourceTree = ""; }; + 3BA0B14650AEA1E6C77147E96770CB09 /* scrypt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "scrypt-macOS.modulemap"; path = "../scrypt-macOS/scrypt-macOS.modulemap"; sourceTree = ""; }; + 3BDFDE509786CC72B0B5EBBB87F54C14 /* MD5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MD5.swift; path = Sources/CryptoSwift/MD5.swift; sourceTree = ""; }; + 3C93F4B7E331943729BE3CFC4F439C2A /* ecmult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult.h; path = Classes/secp256k1/src/ecmult.h; sourceTree = ""; }; + 3DBE2043CF545B45F21A7018D7A70CBD /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PromiseKit.modulemap; sourceTree = ""; }; + 3E1A2664214C7FF4C93A67058FDACDE9 /* SwiftRLP-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftRLP-macOS-umbrella.h"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h"; sourceTree = ""; }; 3E91F337EA3979DB5DD84C325A340270 /* Pods-web3swift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swift-macOS-dummy.m"; sourceTree = ""; }; - 3ED02D5B7EB6BD54C515B4B06599DA5F /* scratch.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch.h; path = Classes/secp256k1/src/scratch.h; sourceTree = ""; }; - 3ED371C14676A66BA35BCF542FF8B548 /* hash_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash_impl.h; path = Classes/secp256k1/src/hash_impl.h; sourceTree = ""; }; - 40ABB4750B401A88B273D3B180C1FEC9 /* fwd.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = fwd.h; path = Sources/fwd.h; sourceTree = ""; }; - 41B019A1B56440DDAB3267B96FDBD576 /* UInt8+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt8+Extension.swift"; path = "Sources/CryptoSwift/UInt8+Extension.swift"; sourceTree = ""; }; - 41F99637E28F2B9DC1A86CD6B490CE52 /* SwiftRLP-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SwiftRLP-macOS-dummy.m"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-dummy.m"; sourceTree = ""; }; - 41FAB135DE09D3F9136D834CBE3A558A /* Scrypt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scrypt.swift; path = scrypt/scrypt/Scrypt.swift; sourceTree = ""; }; - 423E241FA5BBF42BFDDA5E6C6AD2DEB9 /* scalar_8x32.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32.h; path = Classes/secp256k1/src/scalar_8x32.h; sourceTree = ""; }; - 42F14C976AD41B0817186FB67B3B349B /* Data+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Extension.swift"; path = "Sources/CryptoSwift/Foundation/Data+Extension.swift"; sourceTree = ""; }; - 42F561AD37AE0579CA9921A14A3A0943 /* Result-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Result-macOS-prefix.pch"; path = "../Result-macOS/Result-macOS-prefix.pch"; sourceTree = ""; }; - 435339C16A1550DDCDCD1B4731E89DBD /* Result-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Result-iOS.xcconfig"; sourceTree = ""; }; - 43941A9CA2F209289C333306CBC5961F /* Process+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Process+Promise.swift"; path = "Extensions/Foundation/Sources/Process+Promise.swift"; sourceTree = ""; }; - 441A9CACC96EB9A41D4ABF90FDFFD2C8 /* ChaCha20+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ChaCha20+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift"; sourceTree = ""; }; - 453B783DD499D624880A972C2DC8C94A /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; - 48BBE301C7AC93BA32B43FDCAB55FF55 /* EthereumAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EthereumAddress.h; path = EthereumAddress/EthereumAddress.h; sourceTree = ""; }; - 491E82F8B7D6BC0F752EEA10F629435A /* Square Root.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Square Root.swift"; path = "sources/Square Root.swift"; sourceTree = ""; }; - 49A1004ABA6FF6BBB692884F59131E13 /* Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Utils.swift; path = Sources/CryptoSwift/Utils.swift; sourceTree = ""; }; - 49FA7F82B54CC7168B96069F53D66A28 /* RLP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RLP.swift; path = Classes/RLP.swift; sourceTree = ""; }; - 4A2766B8B12BFE63523151BC3F80CDF4 /* EthereumAddress-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumAddress-iOS-umbrella.h"; sourceTree = ""; }; + 3EB87A244E5248ADD8D124225B21323F /* PromiseKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; + 3EF69CEB8B2C8F6223E5A84FF9855D71 /* Generics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generics.swift; path = Sources/CryptoSwift/Generics.swift; sourceTree = ""; }; + 3F1CF8D01D9020575F785235F3DA02E3 /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; + 3F4EAABE2F37A5C4CBF734D74EA94EBB /* UIView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Extensions/UIKit/Sources/UIView+Promise.swift"; sourceTree = ""; }; + 3F90DB66AA0BD6E09A8253873368008F /* AnyError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyError.swift; path = Result/AnyError.swift; sourceTree = ""; }; + 3F9EE37EACAF96F7344C1F0AEA46F02C /* BlockEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockEncryptor.swift; path = Sources/CryptoSwift/BlockEncryptor.swift; sourceTree = ""; }; + 417BA17C9527B36A6953928718163ACE /* scrypt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-iOS-umbrella.h"; sourceTree = ""; }; + 420A1793DC6527296BC586472865C8C0 /* scrypt-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "scrypt-iOS.xcconfig"; sourceTree = ""; }; + 4249BBDEF2DD259919D48F146E985928 /* libBigInt-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libBigInt-iOS.a"; path = "libBigInt-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4289C87C5EC42792CDDDCFC5592AADF7 /* Exponentiation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Exponentiation.swift; path = sources/Exponentiation.swift; sourceTree = ""; }; + 43C25934B3D3377624DF16153BF76578 /* Checksum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Checksum.swift; path = Sources/CryptoSwift/Checksum.swift; sourceTree = ""; }; + 44157DE064955C1C2DF424094F971C2C /* libPods-web3swift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-macOS.a"; path = "libPods-web3swift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 442D6200CC1781151499F7FAF44C0366 /* Cimpl.c */ = {isa = PBXFileReference; includeInIndex = 1; name = Cimpl.c; path = scrypt/Cimpl.c; sourceTree = ""; }; + 449887D7F7932CFAA2B3FAE0BEE1594B /* scratch.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch.h; path = Classes/secp256k1/src/scratch.h; sourceTree = ""; }; + 452B760316F8326FC21782A105163581 /* PromiseKit.root-CorePromise-Foundation-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PromiseKit.root-CorePromise-Foundation-dummy.m"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-dummy.m"; sourceTree = ""; }; + 45F5F772F0EEFC0C3E42DAF65DB4121F /* PKCS7Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7Padding.swift; path = Sources/CryptoSwift/PKCS/PKCS7Padding.swift; sourceTree = ""; }; + 4624EFF8C97C1CBAF2910297112CF9E8 /* lax_der_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_parsing.c; path = Classes/secp256k1/contrib/lax_der_parsing.c; sourceTree = ""; }; + 4638850DD91EB5F2EFCF18E99D4D87FA /* SipHasher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHasher.swift; path = SipHash/SipHasher.swift; sourceTree = ""; }; + 4813C1A0F259481060973E85D757C6F8 /* libEthereumAddress-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libEthereumAddress-macOS.a"; path = "libEthereumAddress-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 48BA6005A2D0AC9C0B7C4A47958A6F80 /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; + 48DE6A16D72E33E779AE2257CA5D34BC /* EthereumABI-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EthereumABI-iOS-dummy.m"; sourceTree = ""; }; + 48FCAFD34D22FB4A18FEF12007E2FAB3 /* SipHash-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-iOS-umbrella.h"; sourceTree = ""; }; + 49C5823B0C264F4AC2DF38C68F097FEA /* NSURLSession+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Promise.swift"; path = "Extensions/Foundation/Sources/NSURLSession+Promise.swift"; sourceTree = ""; }; + 49F74127A936A7C34D38E84140D1EFAC /* group_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group_impl.h; path = Classes/secp256k1/src/group_impl.h; sourceTree = ""; }; 4A2E0AD738D348DDA03396C623D814CD /* Pods-web3swift-macOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swift-macOS-acknowledgements.plist"; sourceTree = ""; }; - 4BD790D4294FB459BB05017C05CA1F1E /* UInt64+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt64+Extension.swift"; path = "Sources/CryptoSwift/UInt64+Extension.swift"; sourceTree = ""; }; - 4BF61EAD9C9EC96163CECACFBF3504C3 /* EthereumAddress-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EthereumAddress-macOS-dummy.m"; path = "../EthereumAddress-macOS/EthereumAddress-macOS-dummy.m"; sourceTree = ""; }; - 4C332617281C7BEB03040C92EF610543 /* libsecp256k1_swift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libsecp256k1_swift-macOS.a"; path = "libsecp256k1_swift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 4D5B77EB47B2435BCBF83C39D0D576F5 /* libCryptoSwift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libCryptoSwift-macOS.a"; path = "libCryptoSwift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 4E85EB665265A065E5D96BCE2B87008D /* SipHash-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SipHash-macOS-umbrella.h"; path = "../SipHash-macOS/SipHash-macOS-umbrella.h"; sourceTree = ""; }; - 4F8B31678A829B043331C94E279F1FD9 /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = Sources/CryptoSwift/CompactMap.swift; sourceTree = ""; }; - 506B39E37C9D076FA278322A078D548D /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.m"; sourceTree = ""; }; - 5116359962EA1905AC0EB7121E634D9F /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; - 51FC3239F6613D1D7AE1AAD0F3204A0F /* scrypt-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "scrypt-macOS-dummy.m"; path = "../scrypt-macOS/scrypt-macOS-dummy.m"; sourceTree = ""; }; - 52059A76F9DA89149396ABB84A8A5780 /* PromiseKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-umbrella.h"; sourceTree = ""; }; + 4AA4C4E3B71B38DD9AC53FDE78CAE9EA /* PromiseKit.root-CorePromise-Foundation.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "PromiseKit.root-CorePromise-Foundation.xcconfig"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.xcconfig"; sourceTree = ""; }; + 4B737AB9139E0187239D966FFC143FB3 /* secp256k1_swift-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "secp256k1_swift-macOS-prefix.pch"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; sourceTree = ""; }; + 4C1637249D7E9C69FBC55792F4BFF580 /* SHA3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA3.swift; path = Sources/CryptoSwift/SHA3.swift; sourceTree = ""; }; + 4D5996479C4CB892D1B062406C8C08F6 /* secp256k1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = secp256k1.swift; path = Classes/secp256k1.swift; sourceTree = ""; }; + 4FFFD5E940B31BAEC3CCFD05B093B6F8 /* NSTask+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSTask+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.m"; sourceTree = ""; }; + 516F61020B364118837B9099CD918F5F /* secp256k1_ecdh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_ecdh.h; path = Classes/secp256k1/include/secp256k1_ecdh.h; sourceTree = ""; }; 522015696E45158812DD4C5CF37CD544 /* Pods-web3swift-macOS_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swift-macOS_Tests-dummy.m"; sourceTree = ""; }; - 5297103B37D2E5083D67ABE2C60CA382 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; - 52B35D82CEB3E05DB842B7FA66505116 /* Cipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cipher.swift; path = Sources/CryptoSwift/Cipher.swift; sourceTree = ""; }; - 531B65B7CD936ABCBE9D4C182A88CDF0 /* field_10x26.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26.h; path = Classes/secp256k1/src/field_10x26.h; sourceTree = ""; }; - 53C768170DFB632A3ADBD2A703116B8E /* libEthereumAddress-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libEthereumAddress-macOS.a"; path = "libEthereumAddress-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 5447D2654ABD868EB73A2BF12AD74DE8 /* SwiftRLP-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftRLP-macOS-umbrella.h"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h"; sourceTree = ""; }; + 522579B02AF58D183F2AC531E3F33572 /* EthereumABI-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "EthereumABI-iOS.xcconfig"; sourceTree = ""; }; + 5300C71B6A3AB50A1D7ED70A41FAAD6B /* field_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_impl.h; path = Classes/secp256k1/src/field_impl.h; sourceTree = ""; }; + 53A9CE7F7031C40517F85796D6BDEB9C /* Result-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "Result-macOS.modulemap"; path = "../Result-macOS/Result-macOS.modulemap"; sourceTree = ""; }; + 5430F65435F42C41489D6A5D36494E0B /* Array+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Extension.swift"; path = "Sources/CryptoSwift/Array+Extension.swift"; sourceTree = ""; }; 54DEB815C6A515714B4A838D414C3241 /* Pods-web3swift-macOS_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swift-macOS_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 5540F42E4F8BF99A1C7F95349EA8707D /* field_5x52_int128_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_int128_impl.h; path = Classes/secp256k1/src/field_5x52_int128_impl.h; sourceTree = ""; }; - 5595E1873CFBC6061E8C6D86BFF12807 /* scalar_low_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low_impl.h; path = Classes/secp256k1/src/scalar_low_impl.h; sourceTree = ""; }; - 55F115779D04B6641A1DB99D05887E03 /* NSURLSession+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLSession+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.m"; sourceTree = ""; }; - 58D4D38A480BA09A08C8523AF72783C5 /* libSipHash-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSipHash-macOS.a"; path = "libSipHash-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 58F3E29F9DFEE63DA2847094AA590666 /* Multiplication.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multiplication.swift; path = sources/Multiplication.swift; sourceTree = ""; }; - 5C3CED0A47AF7E341A3EBD1849B12F6F /* EthereumAddress-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "EthereumAddress-macOS.modulemap"; path = "../EthereumAddress-macOS/EthereumAddress-macOS.modulemap"; sourceTree = ""; }; - 5CAF8471B488702419FE2C532D4D11EA /* secp256k1_swift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "secp256k1_swift-iOS.modulemap"; sourceTree = ""; }; - 5DFE72A11A0AF97FFCEBDF19EC395F74 /* Subtraction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Subtraction.swift; path = sources/Subtraction.swift; sourceTree = ""; }; - 5ED58E829B835009D9DCD1D8B959FBBD /* Digest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Digest.swift; path = Sources/CryptoSwift/Digest.swift; sourceTree = ""; }; - 5EFE8BF6504756C13783E7D477894264 /* PBKDF1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF1.swift; path = Sources/CryptoSwift/PKCS/PBKDF1.swift; sourceTree = ""; }; - 6007139C44683BCB89A01696BBBD497F /* 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 = ""; }; - 612CB1FE4A4EF26D20DC64543E17C82A /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; - 614D3F652018D0D4BB869BAEEC3BFA5D /* PMKUIKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKUIKit.h; path = Extensions/UIKit/Sources/PMKUIKit.h; sourceTree = ""; }; - 632F66F6756738B3DBCD9FE0F29FD51D /* UIView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.h"; sourceTree = ""; }; - 635C328C2CAB4B34DEF69D8CFABA3AC1 /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; - 639957AA1B177687176168DC8D443490 /* BlockModeOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockModeOptions.swift; path = Sources/CryptoSwift/BlockMode/BlockModeOptions.swift; sourceTree = ""; }; - 63C148A221559836C278AFFB2F0C6D3D /* num_gmp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp.h; path = Classes/secp256k1/src/num_gmp.h; sourceTree = ""; }; - 656AF5A70C93A14D7EF9E1E97A73DA9F /* scrypt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-iOS-prefix.pch"; sourceTree = ""; }; - 6633CE6E0F4DA082E8A3374A723A4844 /* BigUInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigUInt.swift; path = sources/BigUInt.swift; sourceTree = ""; }; - 666BE65938A502C928B35D6EB5CA9FDA /* libResult-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libResult-iOS.a"; path = "libResult-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 671394A1108646E9E210CF54FA2C814C /* CTR.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CTR.swift; path = Sources/CryptoSwift/BlockMode/CTR.swift; sourceTree = ""; }; + 55609C780EA603377D9F33E7661A79BB /* scrypt-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "scrypt-macOS-umbrella.h"; path = "../scrypt-macOS/scrypt-macOS-umbrella.h"; sourceTree = ""; }; + 55D3724AA7B8C2CF221E72306FBDCBB5 /* libSwiftRLP-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSwiftRLP-iOS.a"; path = "libSwiftRLP-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 55D66ED5651595B335B313C540A13D8E /* SwiftRLP-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SwiftRLP-iOS.modulemap"; sourceTree = ""; }; + 575A44CBD254AB2012072A25C3D25D19 /* StreamEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamEncryptor.swift; path = Sources/CryptoSwift/StreamEncryptor.swift; sourceTree = ""; }; + 582D7324492EFDB22783F0B7B2FA6859 /* Thenable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Thenable.swift; path = Sources/Thenable.swift; sourceTree = ""; }; + 58FEC74B279A9D31ADE339DE27E86FA9 /* lax_der_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_parsing.h; path = Classes/secp256k1/contrib/lax_der_parsing.h; sourceTree = ""; }; + 59463535BD4D6DAD08D36EAF4421D11D /* NSNotificationCenter+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSNotificationCenter+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m"; sourceTree = ""; }; + 5992F89681D6639D6E83FBDCE269A688 /* SipHash-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SipHash-macOS.xcconfig"; path = "../SipHash-macOS/SipHash-macOS.xcconfig"; sourceTree = ""; }; + 59AB171D72BF347C5F7A067C2AAB5384 /* EthereumAddress-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EthereumAddress-macOS-umbrella.h"; path = "../EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h"; sourceTree = ""; }; + 5AEA4495CD1CD23847803E6F2009266F /* libResult-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libResult-macOS.a"; path = "libResult-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5B830B448B480E1AE7466CE0AB7565D1 /* GCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCM.swift; path = Sources/CryptoSwift/BlockMode/GCM.swift; sourceTree = ""; }; + 5BBEB708E926639930327B2FC6F3759D /* PBKDF2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF2.swift; path = Sources/CryptoSwift/PKCS/PBKDF2.swift; sourceTree = ""; }; + 5DC3FD3167A8763A6C85B62EFDA429D2 /* secp256k1_swift-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-iOS-prefix.pch"; sourceTree = ""; }; + 5E9C2CC8E90A38FD011723EB814A5A52 /* scratch_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch_impl.h; path = Classes/secp256k1/src/scratch_impl.h; sourceTree = ""; }; + 60243E0B2E1CDFC9B6DF789487982447 /* lax_der_privatekey_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_privatekey_parsing.c; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.c; sourceTree = ""; }; + 61858AD8F2BC3FA5B6CE10752824FA45 /* libEthereumABI-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libEthereumABI-macOS.a"; path = "libEthereumABI-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 6314619E8FCD5D07FBD2BA0BA5C58C15 /* ABIEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIEncoding.swift; path = EthereumABI/Classes/ABIEncoding.swift; sourceTree = ""; }; + 6351DFCD3C033CA154E8C9D3D8D38EFE /* CryptoSwift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "CryptoSwift-iOS.modulemap"; sourceTree = ""; }; + 63FD1428729C05C5A88BE98C12254ADA /* BufferStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BufferStorage.swift; path = scrypt/scrypt/BufferStorage.swift; sourceTree = ""; }; + 640D7C6CD155FDD858979BF3184F5A49 /* libPromiseKit.root-CorePromise-Foundation.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPromiseKit.root-CorePromise-Foundation.a"; path = "libPromiseKit.root-CorePromise-Foundation.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 64748EC305E00E02356EB0F312458ADE /* CryptoSwift-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CryptoSwift-macOS-prefix.pch"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; sourceTree = ""; }; + 64CF8CD6E98A2DF32A9CBCF71E6AEFAB /* libsecp256k1_swift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libsecp256k1_swift-iOS.a"; path = "libsecp256k1_swift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 673FFC4D2B959AB8AEC35D646A85CDCD /* Pods-web3swift-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-iOS.release.xcconfig"; sourceTree = ""; }; - 678FC45FCDC1237D6344CFADDB22F228 /* eckey_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey_impl.h; path = Classes/secp256k1/src/eckey_impl.h; sourceTree = ""; }; - 67F6E91C8B57C5F8E945603C7F3DB0F2 /* Result-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Result-macOS-umbrella.h"; path = "../Result-macOS/Result-macOS-umbrella.h"; sourceTree = ""; }; - 681146D3345FF5156D09E271666D5EA1 /* group_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group_impl.h; path = Classes/secp256k1/src/group_impl.h; sourceTree = ""; }; - 682A1BA8289C74E7B26FAAFA80540F57 /* BatchedCollection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BatchedCollection.swift; path = Sources/CryptoSwift/BatchedCollection.swift; sourceTree = ""; }; - 682CE9677672C1F944AA2896D3BD36FF /* String Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String Conversion.swift"; path = "sources/String Conversion.swift"; sourceTree = ""; }; - 68CD2728F142362B577571D597A953D0 /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; - 6A0F097AEAD44F8F983B8D4F884FDE42 /* libSwiftRLP-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSwiftRLP-macOS.a"; path = "libSwiftRLP-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 67F74D8CA41DCC5236159301ED92764C /* Collection+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Collection+Extension.swift"; path = "Sources/CryptoSwift/Collection+Extension.swift"; sourceTree = ""; }; + 68D5DF1B1384D6392013199F71BACD06 /* String Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String Conversion.swift"; path = "sources/String Conversion.swift"; sourceTree = ""; }; + 6907C77858F6612BF4232E34D8D30C3F /* CryptoSwift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CryptoSwift-iOS-dummy.m"; sourceTree = ""; }; + 6A105001ACFD1F5004F2225CB06D4CCA /* BigInt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-umbrella.h"; sourceTree = ""; }; + 6BB6440618D1B0E87AE5AA65F64B69DD /* Result-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Result-iOS.modulemap"; sourceTree = ""; }; + 6C619FA5855429D15B556163471403E5 /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = Sources/CryptoSwift/CompactMap.swift; sourceTree = ""; }; + 6D010E670FE8C5A9AAC9A8464ED42B3A /* ecmult_gen.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen.h; path = Classes/secp256k1/src/ecmult_gen.h; sourceTree = ""; }; + 6D1B636300E29159DFA920C5BA2E5F7C /* num.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num.h; path = Classes/secp256k1/src/num.h; sourceTree = ""; }; 6D4A716592C208D7429CE19B82094FA8 /* Pods-web3swift-iOS_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swift-iOS_Tests-acknowledgements.plist"; sourceTree = ""; }; - 6E942712A2D0087AAF697A0E031459FE /* CMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CMAC.swift; path = Sources/CryptoSwift/CMAC.swift; sourceTree = ""; }; - 71D09134607D15AB2D81F0CB08D3F055 /* AEADChaCha20Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEADChaCha20Poly1305.swift; path = Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift; sourceTree = ""; }; - 73043D2C83B1F1E5EC8F0E15C2CFE5A5 /* Words and Bits.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Words and Bits.swift"; path = "sources/Words and Bits.swift"; sourceTree = ""; }; - 7340338CDF774E91E0F647AB7EB91924 /* StreamEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamEncryptor.swift; path = Sources/CryptoSwift/StreamEncryptor.swift; sourceTree = ""; }; - 736C0CC7DF9261F7C240BF88F7D310AD /* Authenticator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Authenticator.swift; path = Sources/CryptoSwift/Authenticator.swift; sourceTree = ""; }; - 7388674CDE22815644490821F0CB757B /* scalar_8x32_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32_impl.h; path = Classes/secp256k1/src/scalar_8x32_impl.h; sourceTree = ""; }; - 74111ED4B5372D2EE9A218621A18699C /* afterlife.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Extensions/Foundation/Sources/afterlife.swift; sourceTree = ""; }; - 74F90CB37B5FF688D45EE372C6FE875C /* Result-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-iOS-dummy.m"; sourceTree = ""; }; - 750CBC755AD04183E9D574E073F02223 /* SwiftRLP-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftRLP-macOS-prefix.pch"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-prefix.pch"; sourceTree = ""; }; + 6DE5DD5643C155A18A460273094ACDA1 /* Comparable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Comparable.swift; path = sources/Comparable.swift; sourceTree = ""; }; + 6E13ACAF5A7893C3C300B8B880422662 /* ecdsa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa.h; path = Classes/secp256k1/src/ecdsa.h; sourceTree = ""; }; + 6E3077E6B0E7210AC2CB18E0691714F0 /* eckey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey.h; path = Classes/secp256k1/src/eckey.h; sourceTree = ""; }; + 6E4AA08906784FF9AA2B198938456276 /* ABIExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIExtensions.swift; path = EthereumABI/Classes/ABIExtensions.swift; sourceTree = ""; }; + 6E53BAD514C4F4E022EEBCEB1ABC3943 /* Authenticator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Authenticator.swift; path = Sources/CryptoSwift/Authenticator.swift; sourceTree = ""; }; + 6E6BBA6411A89BD966DF62BE90EE478C /* Int+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Int+Extension.swift"; path = "Sources/CryptoSwift/Int+Extension.swift"; sourceTree = ""; }; + 6EABC2B68783D8B14904AB78123DF869 /* EthereumAddress-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EthereumAddress-macOS-prefix.pch"; path = "../EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch"; sourceTree = ""; }; + 6EC6627D0179A3BE1D7BB58F2DBF51E7 /* ABIParameterTypes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIParameterTypes.swift; path = EthereumABI/Classes/ABIParameterTypes.swift; sourceTree = ""; }; + 6F068DD5C61D68DFAF437EAAC56F1139 /* EthereumABI.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EthereumABI.h; path = EthereumABI/EthereumABI.h; sourceTree = ""; }; + 6F0A15233EFEAA840C94D98DFD9C1F14 /* 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 = ""; }; + 6F1D20DF17340D045A1FDC2D1D64449D /* ECB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ECB.swift; path = Sources/CryptoSwift/BlockMode/ECB.swift; sourceTree = ""; }; + 6F4B350BCCE6D995C937B1D56E4F9022 /* Shifts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Shifts.swift; path = sources/Shifts.swift; sourceTree = ""; }; + 6FE7344E86789EA2ACF6B000EE6E0275 /* firstly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = firstly.swift; path = Sources/firstly.swift; sourceTree = ""; }; + 70E24C26EF4EF9C8244E7F94F175FD51 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Configuration.swift; sourceTree = ""; }; + 71C4ACD478692712EEF2FF8BB7F4A160 /* AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; + 721ECA637BED3AE2394AA1573B89D998 /* Digest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Digest.swift; path = Sources/CryptoSwift/Digest.swift; sourceTree = ""; }; + 73A68F048F801AD8527F07F7706E57CE /* SwiftRLP-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftRLP-iOS-dummy.m"; sourceTree = ""; }; 753E3CD3CF2AA32CDB11305D429F3C96 /* Pods-web3swift-iOS_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swift-iOS_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 755E0B91B0984ADEF77E48E32C147276 /* Data Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data Conversion.swift"; path = "sources/Data Conversion.swift"; sourceTree = ""; }; - 7573EC5C506627456A38A22DC6C134BA /* libPods-web3swift-macOS_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-macOS_Tests.a"; path = "libPods-web3swift-macOS_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 75DE42DDF2D327BA352CD0F8C0DA4B0F /* libResult-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libResult-macOS.a"; path = "libResult-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 7692AAEAD8E8FFF8D2E46B60CBA56CDA /* SipHash-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-iOS-umbrella.h"; sourceTree = ""; }; - 7695A9A41BFEEAD40C0235B913A07672 /* AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; - 7739AC49E92EA0677899D077C015CE05 /* NSURLSession+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Promise.swift"; path = "Extensions/Foundation/Sources/NSURLSession+Promise.swift"; sourceTree = ""; }; - 77FB79008E5E4C52EE48B984D12A652E /* AES.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.swift; path = Sources/CryptoSwift/AES.swift; sourceTree = ""; }; - 78AC661E237EC28BD38872134D7F7E2B /* Integer Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Integer Conversion.swift"; path = "sources/Integer Conversion.swift"; sourceTree = ""; }; - 7953EE95375573E978E0FAC7F88260CF /* Shifts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Shifts.swift; path = sources/Shifts.swift; sourceTree = ""; }; + 7579B6CD74CBC80D0509F34F78A83B1D /* CryptoSwift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "CryptoSwift-macOS.modulemap"; path = "../CryptoSwift-macOS/CryptoSwift-macOS.modulemap"; sourceTree = ""; }; + 75D8491537B933BEB0BB26FA5415C295 /* afterlife.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Extensions/Foundation/Sources/afterlife.swift; sourceTree = ""; }; + 76C5F543BD9B25774CA35CF7FA0546B3 /* EthereumAddress-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumAddress-iOS-umbrella.h"; sourceTree = ""; }; + 76F047FAB60C9A09C857EC109DAC9FC4 /* num_gmp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp.h; path = Classes/secp256k1/src/num_gmp.h; sourceTree = ""; }; + 79B85C952F225CDFB5B272237402E77E /* hang.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = hang.swift; path = Sources/hang.swift; sourceTree = ""; }; 79E925BEAA0533C58B6D9871B886DD8A /* Pods-web3swift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-web3swift-iOS.modulemap"; sourceTree = ""; }; - 7B67DD6B4751EC541A3D153113AFB1B1 /* HMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HMAC.swift; path = Sources/CryptoSwift/HMAC.swift; sourceTree = ""; }; - 7CB204BDB01A5747B116731490529E2B /* EthereumAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumAddress.swift; path = EthereumAddress/Classes/EthereumAddress.swift; sourceTree = ""; }; - 7CC384B5F6C90CB968D0AB32162249B6 /* Updatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Updatable.swift; path = Sources/CryptoSwift/Updatable.swift; sourceTree = ""; }; - 7D903E031FC7FD31DA94E1EC68778019 /* lax_der_privatekey_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_privatekey_parsing.h; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.h; sourceTree = ""; }; - 7DE92E2A606B96369F79D742DFACB7C9 /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h"; sourceTree = ""; }; - 7DF576FC1DAC9EC11DA44099F4F50AFE /* secp256k1.c */ = {isa = PBXFileReference; includeInIndex = 1; name = secp256k1.c; path = Classes/secp256k1/src/secp256k1.c; sourceTree = ""; }; + 7C5AAAD0BEA7AB575EE1203992B86F82 /* StreamDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamDecryptor.swift; path = Sources/CryptoSwift/StreamDecryptor.swift; sourceTree = ""; }; + 7C70A16BA860E5B4A9A806F25EE3F472 /* CryptoSwift-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "CryptoSwift-macOS.xcconfig"; path = "../CryptoSwift-macOS/CryptoSwift-macOS.xcconfig"; sourceTree = ""; }; + 7DCC7CDEAA23666C0D7F819861149F89 /* Rabbit+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Rabbit+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift"; sourceTree = ""; }; + 7E5CE0F5663064C7672E5299F1B3B7DF /* UInt16+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt16+Extension.swift"; path = "Sources/CryptoSwift/UInt16+Extension.swift"; sourceTree = ""; }; + 7E74F31CDCAA43E3665CAB99746882DD /* BigInt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BigInt-iOS-dummy.m"; sourceTree = ""; }; 7E8C19543EF3AA4D9801DBE55E22E211 /* Pods-web3swift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-web3swift-iOS-umbrella.h"; sourceTree = ""; }; - 7EFDF78EEBE9836CDC5AE2FEEC50C17B /* Utils+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Utils+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Utils+Foundation.swift"; sourceTree = ""; }; - 80353B76ABA10ED9D59C18FDA6A16285 /* basic-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "basic-config.h"; path = "Classes/secp256k1/src/basic-config.h"; sourceTree = ""; }; - 809F44457475B204EE242D251FDF9E8E /* Comparable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Comparable.swift; path = sources/Comparable.swift; sourceTree = ""; }; - 80E74674EB94CDFBB8B77B11BACD6046 /* scrypt-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "scrypt-macOS.xcconfig"; path = "../scrypt-macOS/scrypt-macOS.xcconfig"; sourceTree = ""; }; - 81909D98916544A0C622EDB88411AE57 /* CipherModeWorker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CipherModeWorker.swift; path = Sources/CryptoSwift/BlockMode/CipherModeWorker.swift; sourceTree = ""; }; - 82E0889BDE7E61BD4767DCF66AB18FF7 /* CryptoSwift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "CryptoSwift-iOS.modulemap"; sourceTree = ""; }; - 8354A9A75879DFCE10CDFCD8B4B76EF5 /* AEAD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEAD.swift; path = Sources/CryptoSwift/AEAD/AEAD.swift; sourceTree = ""; }; - 83818CBF92E26919EE29AD92612A44AF /* SwiftRLP-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SwiftRLP-macOS.modulemap"; path = "../SwiftRLP-macOS/SwiftRLP-macOS.modulemap"; sourceTree = ""; }; - 840434A830881CF07FBDE172A20CDDDC /* NSObject+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Extensions/Foundation/Sources/NSObject+Promise.swift"; sourceTree = ""; }; - 85BEAAA1888D13FCFC9F1C2AB3A7ABBD /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; - 860EF39282D8941084557A3DCC1D7DF3 /* NSTask+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSTask+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.h"; sourceTree = ""; }; - 86800F1D45016DC59C9BE8B9ABF5B50F /* Bit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bit.swift; path = Sources/CryptoSwift/Bit.swift; sourceTree = ""; }; - 86B004B7F6AC62E27D75D02978601A76 /* NSTask+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSTask+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.m"; sourceTree = ""; }; - 86B372DE536C71560B5E85E340F3F6C9 /* PromiseKit.root-CorePromise-Foundation-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PromiseKit.root-CorePromise-Foundation-prefix.pch"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; sourceTree = ""; }; - 8787D00BE428B5C383E25BF2ABB38CC4 /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.h"; sourceTree = ""; }; - 8823C42C614B0067E2C89A5AE71DA77D /* BigInt-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "BigInt-macOS.xcconfig"; path = "../BigInt-macOS/BigInt-macOS.xcconfig"; sourceTree = ""; }; - 89B539CEC7927EBE7BBF7262580A0E18 /* Exponentiation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Exponentiation.swift; path = sources/Exponentiation.swift; sourceTree = ""; }; - 8AF5980AB239F34C8CB958F30A518A0B /* BigInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigInt.swift; path = sources/BigInt.swift; sourceTree = ""; }; + 7FB5F00D821CDC9BDA7F7709F07DD0F3 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; + 80ACF3AED1948ECBBAF9BEFFC3482423 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = EthereumAddress/Classes/Extensions.swift; sourceTree = ""; }; + 81392F0749049A8C999337DDA716A157 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; + 81ECE7FE7C889AF9F1B739830D9A59B0 /* scalar_8x32_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32_impl.h; path = Classes/secp256k1/src/scalar_8x32_impl.h; sourceTree = ""; }; + 82CF9E45F65C5A3FF604607C66EAC29D /* EthereumAddress-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "EthereumAddress-macOS.xcconfig"; path = "../EthereumAddress-macOS/EthereumAddress-macOS.xcconfig"; sourceTree = ""; }; + 840549A6DE0F91C91EE1712E3C57D6ED /* SHA2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA2.swift; path = Sources/CryptoSwift/SHA2.swift; sourceTree = ""; }; + 85342594A31BFFC584D4660A9041CF48 /* Codable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Codable.swift; path = sources/Codable.swift; sourceTree = ""; }; + 857BD06ABAFBE1C5C176886E254BE8E6 /* UInt32+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt32+Extension.swift"; path = "Sources/CryptoSwift/UInt32+Extension.swift"; sourceTree = ""; }; + 85CA122AC057DBDA1FC65BCB8FC33684 /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; + 8600E5A6A0625E96185A2CB9DE5C8AF8 /* PromiseKit.root-CorePromise-Foundation.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "PromiseKit.root-CorePromise-Foundation.modulemap"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap"; sourceTree = ""; }; + 86A87591096A3CD9071AD2D94874973C /* RandomUInt64.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomUInt64.swift; path = SipHash/RandomUInt64.swift; sourceTree = ""; }; + 86CE3A28090BEEF1B09E865F4962D871 /* scalar_4x64_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64_impl.h; path = Classes/secp256k1/src/scalar_4x64_impl.h; sourceTree = ""; }; + 874DB4C8A2FF4D5197C42063F7939C9A /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; + 89525730C7E22C66FB7ADAB11E2073A0 /* CryptoSwift-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "CryptoSwift-iOS.xcconfig"; sourceTree = ""; }; + 89BECCA6149031B2659A0EECDCC2E4A5 /* Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptors.swift; path = Sources/CryptoSwift/Cryptors.swift; sourceTree = ""; }; + 89EE579B1A3A156C9DE84CC0E9CC7F51 /* CMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CMAC.swift; path = Sources/CryptoSwift/CMAC.swift; sourceTree = ""; }; + 8A3D345B7D38F0B4BAB39F24505D5E5E /* CTR.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CTR.swift; path = Sources/CryptoSwift/BlockMode/CTR.swift; sourceTree = ""; }; + 8AA60D2034DC22F7C907855DDB5ADAD9 /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/ecdh/main_impl.h; sourceTree = ""; }; 8B56F6A20A0CF698ECA0EDF6CF4CDD74 /* Pods-web3swift-iOS_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swift-iOS_Tests-dummy.m"; sourceTree = ""; }; - 8C3F64F8D233B557ADBCBAB5F8D81F1E /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; - 8CC8A14105420D222F37BBB95BFBF1A3 /* secp256k1_swift-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "secp256k1_swift-macOS.xcconfig"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS.xcconfig"; sourceTree = ""; }; - 8EA80C3235171417958F658E327CCF8E /* Codable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Codable.swift; path = sources/Codable.swift; sourceTree = ""; }; - 8ED7C1CFBF67F4C0CD5645DF35F608F7 /* scrypt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "scrypt-iOS.modulemap"; sourceTree = ""; }; - 8F6102F002EDC216C49666462EF952CA /* DigestType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DigestType.swift; path = Sources/CryptoSwift/DigestType.swift; sourceTree = ""; }; - 906199A857C08F740EA182609488E191 /* Rabbit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rabbit.swift; path = Sources/CryptoSwift/Rabbit.swift; sourceTree = ""; }; - 907E15C94AE5E8DC2C60CE2BFA69AB19 /* BigInt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-prefix.pch"; sourceTree = ""; }; + 8C42ABDF3D43E8CFBE45DFA6DF97E084 /* Process+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Process+Promise.swift"; path = "Extensions/Foundation/Sources/Process+Promise.swift"; sourceTree = ""; }; + 8C5181B2E5F94EAFEF5F04D83E0FFD13 /* PKCS7.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7.swift; path = Sources/CryptoSwift/PKCS/PKCS7.swift; sourceTree = ""; }; + 8E0D3EDB8E94AA59C54E4808C60A2744 /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; + 8E3F5E519E5ED0A4BAF423C7DBB12042 /* UIView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.h"; sourceTree = ""; }; + 8E664638E84199C40F931B3593272F8D /* NSObject+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Extensions/Foundation/Sources/NSObject+Promise.swift"; sourceTree = ""; }; 90B410829D6E70A45A22CC62F187A11B /* Pods-web3swift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-web3swift-macOS.modulemap"; sourceTree = ""; }; - 915D7A030D48CB0FE8360421BAB29B5B /* NoPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoPadding.swift; path = Sources/CryptoSwift/NoPadding.swift; sourceTree = ""; }; - 919A091F1E72F11C9C10844CC5454B2F /* SipHash-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SipHash-macOS.modulemap"; path = "../SipHash-macOS/SipHash-macOS.modulemap"; sourceTree = ""; }; - 93264D7DC7DF888A41AF35694C9CBF60 /* BufferStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BufferStorage.swift; path = scrypt/scrypt/BufferStorage.swift; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 93A5B46AC7CC995589CAA3D991DC1B29 /* scratch_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch_impl.h; path = Classes/secp256k1/src/scratch_impl.h; sourceTree = ""; }; - 9411AC5861B33542BF71A1EED7E49FC4 /* scrypt.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scrypt.h; path = scrypt/scrypt.h; sourceTree = ""; }; - 944A08F05724AD8D1EC4F7FF0D09BFE6 /* scalar.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar.h; path = Classes/secp256k1/src/scalar.h; sourceTree = ""; }; + 91BAFA9B3EE9063DDE5057E56DC627DC /* BigInt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "BigInt-iOS.modulemap"; sourceTree = ""; }; + 92641023C5257B4110F73449FAC652E7 /* PMKUIKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKUIKit.h; path = Extensions/UIKit/Sources/PMKUIKit.h; sourceTree = ""; }; + 92C1E2F71DB75395E28DC3213425381D /* Bit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bit.swift; path = Sources/CryptoSwift/Bit.swift; sourceTree = ""; }; + 92CB38F782D33EF495F861851E047FA9 /* SipHash-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SipHash-iOS.xcconfig"; sourceTree = ""; }; + 93EB1CF4FDC03241B81C3C3B6F58B9E0 /* Square Root.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Square Root.swift"; path = "sources/Square Root.swift"; sourceTree = ""; }; + 948894E3D7054F9BEAA31B5D6061F696 /* PMKFoundation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKFoundation.h; path = Extensions/Foundation/Sources/PMKFoundation.h; sourceTree = ""; }; 95C397E16B314F921F7784F00C8F183B /* Pods-web3swift-iOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swift-iOS-acknowledgements.plist"; sourceTree = ""; }; - 95C8DD41F37C777526C9EA621C9213C9 /* Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Poly1305.swift; path = Sources/CryptoSwift/Poly1305.swift; sourceTree = ""; }; - 95F76B715633F358CA7525D8C17738C9 /* GCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCM.swift; path = Sources/CryptoSwift/BlockMode/GCM.swift; sourceTree = ""; }; - 97504B2FA23741AEEDD649E58BF39870 /* libEthereumAddress-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libEthereumAddress-iOS.a"; path = "libEthereumAddress-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 9787E8C8BA8DAE16D659DA569EECED22 /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = sources/Random.swift; sourceTree = ""; }; - 9821B82F2A2D9E9E0A740B6B4B38A6AB /* field_10x26_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26_impl.h; path = Classes/secp256k1/src/field_10x26_impl.h; sourceTree = ""; }; - 982B03AB9D403479BF865D7C3A5B2D4F /* Thenable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Thenable.swift; path = Sources/Thenable.swift; sourceTree = ""; }; - 98A9FC519C49C693637C4BC5D0DD6EB7 /* PKCS5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS5.swift; path = Sources/CryptoSwift/PKCS/PKCS5.swift; sourceTree = ""; }; - 98C48C6F1DCE55E9EE6040D50626EF16 /* ECB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ECB.swift; path = Sources/CryptoSwift/BlockMode/ECB.swift; sourceTree = ""; }; - 9B7B36B7C3689A1ED9FBF4095AF74840 /* RandomBytesSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomBytesSequence.swift; path = Sources/CryptoSwift/RandomBytesSequence.swift; sourceTree = ""; }; - 9BFCCF45D62D69A50F9ED16BCE93C54A /* SHA2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA2.swift; path = Sources/CryptoSwift/SHA2.swift; sourceTree = ""; }; - 9D1AB32F0AE7B734159BB1FBAF7F5078 /* hash.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash.h; path = Classes/secp256k1/src/hash.h; sourceTree = ""; }; - 9D5F98CA61161B592980B259143F48F5 /* Floating Point Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Floating Point Conversion.swift"; path = "sources/Floating Point Conversion.swift"; sourceTree = ""; }; - 9E8B25F37CB474A2BE03252DDC5BA0BE /* CryptoSwift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "CryptoSwift-macOS.modulemap"; path = "../CryptoSwift-macOS/CryptoSwift-macOS.modulemap"; sourceTree = ""; }; - 9F576E04543F9CA8FD11EFA190633C0F /* StreamDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamDecryptor.swift; path = Sources/CryptoSwift/StreamDecryptor.swift; sourceTree = ""; }; - A0347CA8676D7E491A4DA559FB78007F /* SipHash-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SipHash-iOS.xcconfig"; sourceTree = ""; }; - A09088A41F90C0893A27DEF1C26D11AB /* libPromiseKit.root-CorePromise-Foundation.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPromiseKit.root-CorePromise-Foundation.a"; path = "libPromiseKit.root-CorePromise-Foundation.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A0CE29B48517362C21FF1B3F9DCB7619 /* scrypt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "scrypt-macOS.modulemap"; path = "../scrypt-macOS/scrypt-macOS.modulemap"; sourceTree = ""; }; - A2A0CFEEC4EEE7DD9F58B6A45DE63C89 /* BigInt-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "BigInt-iOS.xcconfig"; sourceTree = ""; }; - A516C73CD574B0D6BA84C38BB55FBD2D /* BigInt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BigInt-iOS-dummy.m"; sourceTree = ""; }; + 96C4685C831E862AD0F75DC78A3A5B61 /* Catchable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catchable.swift; path = Sources/Catchable.swift; sourceTree = ""; }; + 972E60F406627ED35849A8F617B3ECBD /* BigInt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-prefix.pch"; sourceTree = ""; }; + 9760F737EE5BDAD80F6E6DDA26EE421C /* secp256k1_swift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "secp256k1_swift-macOS.modulemap"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap"; sourceTree = ""; }; + 98229C7D8E3906BD4C8DCD833704588C /* EthereumABI-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumABI-iOS-umbrella.h"; sourceTree = ""; }; + 982E6E4B839762B67F92588D34990052 /* num_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_impl.h; path = Classes/secp256k1/src/num_impl.h; sourceTree = ""; }; + 9883FCDA0DBDA6DCA8C5923AB1B3F45A /* CBCMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBCMAC.swift; path = Sources/CryptoSwift/CBCMAC.swift; sourceTree = ""; }; + 9B0A389595178AEDBFBB0B44514CEBD3 /* SipHash-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SipHash-macOS.modulemap"; path = "../SipHash-macOS/SipHash-macOS.modulemap"; sourceTree = ""; }; + 9BF71F803FD375964F60D0271834711E /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; + 9C056AE54C5A5C44A47093DCBA233F46 /* EthereumABI-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumABI-iOS-prefix.pch"; sourceTree = ""; }; + 9D6306B3BC57BAEB50815C5FBBFC8CB4 /* SwiftRLP-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SwiftRLP-iOS.xcconfig"; sourceTree = ""; }; + 9E3FCE1E29EDFA06494CDD00767685E3 /* secp256k1_swift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "secp256k1_swift-iOS-dummy.m"; sourceTree = ""; }; + 9E7C36E885EBC6AB812D67E4B28A9CE4 /* libPromiseKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libPromiseKit.a; path = libPromiseKit.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 9EFC88D3858F1B2D4952BAA697C360D3 /* Guarantee.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Guarantee.swift; path = Sources/Guarantee.swift; sourceTree = ""; }; + 9FB6255E4560252B9DC0BE760F34C261 /* field_5x52_int128_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_int128_impl.h; path = Classes/secp256k1/src/field_5x52_int128_impl.h; sourceTree = ""; }; + A051E774D4D49F8D0B94D9E529E3A524 /* scalar_low_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low_impl.h; path = Classes/secp256k1/src/scalar_low_impl.h; sourceTree = ""; }; + A1687163A14D55D2EF896A97CD937491 /* hash_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash_impl.h; path = Classes/secp256k1/src/hash_impl.h; sourceTree = ""; }; + A1C101B8D6CF3BE7D5E588469BA4647B /* libscrypt-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libscrypt-macOS.a"; path = "libscrypt-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + A31357292CDC03F5F3AEA4C1065BCDBF /* PBKDF1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF1.swift; path = Sources/CryptoSwift/PKCS/PBKDF1.swift; sourceTree = ""; }; + A330934D98A54C2602C42AF53B6E728E /* secp256k1_swift-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "secp256k1_swift-iOS.modulemap"; sourceTree = ""; }; + A3B7939D27D85A4C92DE2CD6D6C8E4EB /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/recovery/main_impl.h; sourceTree = ""; }; + A44AEA30AD48DB0294CA791DF2D0996B /* SipHash-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SipHash-macOS-umbrella.h"; path = "../SipHash-macOS/SipHash-macOS-umbrella.h"; sourceTree = ""; }; A5D9B32B104EA0A137D78B89D4D19D40 /* Pods-web3swift-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-macOS.release.xcconfig"; sourceTree = ""; }; - A7C42C91EB3AFB8674EB313560E4D9A8 /* EthereumAddress-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "EthereumAddress-iOS.modulemap"; sourceTree = ""; }; - A8865640371B98CE908E1A9A63C4B984 /* libCryptoSwift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libCryptoSwift-iOS.a"; path = "libCryptoSwift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - AA1E87AB6BC235D2BF0B5287F5ADD105 /* EthereumAddress-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "EthereumAddress-macOS.xcconfig"; path = "../EthereumAddress-macOS/EthereumAddress-macOS.xcconfig"; sourceTree = ""; }; - AB4C3483E321FFBD045AB8FDC37CF8FA /* Array+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Array+Foundation.swift"; sourceTree = ""; }; - AC8ED311289866CD8ED870EF0C3C5CF3 /* libBigInt-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libBigInt-iOS.a"; path = "libBigInt-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - AD76DBA7730870FE66D77B1FC33E49E0 /* EthereumAddress-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "EthereumAddress-iOS.xcconfig"; sourceTree = ""; }; - ADC86A3FC56A1BAE1CA3490D081E47F3 /* Checksum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Checksum.swift; path = Sources/CryptoSwift/Checksum.swift; sourceTree = ""; }; - AEA94352D4A3D0793D359A8C1CB50E4A /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/recovery/main_impl.h; sourceTree = ""; }; - AEB5F00EFE918C35C091FD2FA7EACBF5 /* group.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group.h; path = Classes/secp256k1/src/group.h; sourceTree = ""; }; - AFD1168E711269E444E38FCAE0B8E5D9 /* UInt128.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UInt128.swift; path = Sources/CryptoSwift/UInt128.swift; sourceTree = ""; }; - AFD5882A04E0E27679FE6AAC8D9CA935 /* UIView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.m"; sourceTree = ""; }; - B177F4FEBB7F565C10EB6AABDF0CFB6C /* ecmult_const_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const_impl.h; path = Classes/secp256k1/src/ecmult_const_impl.h; sourceTree = ""; }; - B2300EAF13A4BCCC04BBD2896E58716D /* 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 = ""; }; - B2E36C3B29C59A6C972DBF40C0EF93D5 /* ecdsa_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa_impl.h; path = Classes/secp256k1/src/ecdsa_impl.h; sourceTree = ""; }; - B41DB7D6043E138E3CA32DF5B5194D9B /* Result-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "Result-macOS.modulemap"; path = "../Result-macOS/Result-macOS.modulemap"; sourceTree = ""; }; - B42A16A3F62043A99FFE8BDB6DB55ACB /* BigInt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "BigInt-macOS.modulemap"; path = "../BigInt-macOS/BigInt-macOS.modulemap"; sourceTree = ""; }; - B5874904C32DED94E05CFD33023E2A19 /* SwiftRLP-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SwiftRLP-iOS.modulemap"; sourceTree = ""; }; - B6112FCF75FBFC58E314A40652665F06 /* CryptoSwift-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "CryptoSwift-iOS.xcconfig"; sourceTree = ""; }; + A66575F75BF4F824ED46DE58E80DBCF7 /* PromiseKit.root-CorePromise-Foundation-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PromiseKit.root-CorePromise-Foundation-prefix.pch"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; sourceTree = ""; }; + A69680CF78C97C6DA250B325FFD04251 /* num_gmp_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp_impl.h; path = Classes/secp256k1/src/num_gmp_impl.h; sourceTree = ""; }; + A6F7930650FD31ED4C95EAB12B5DA36F /* libCryptoSwift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libCryptoSwift-iOS.a"; path = "libCryptoSwift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + A7E446483743D975168011448637ED65 /* Primitive Types.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Primitive Types.swift"; path = "SipHash/Primitive Types.swift"; sourceTree = ""; }; + AB81B5AF636ED4D537F9A819FC7EB086 /* libSipHash-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSipHash-macOS.a"; path = "libSipHash-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + AB8B8D38C22598577C2C6551CEC1D7D0 /* EthereumAddress-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumAddress-iOS-prefix.pch"; sourceTree = ""; }; + ABA2CC618DEF4A5E27ADED64FC6F96A5 /* scalar_low.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low.h; path = Classes/secp256k1/src/scalar_low.h; sourceTree = ""; }; + AC8ABBCB10448DB88C79398E3A2D4417 /* libPods-web3swift-iOS_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-iOS_Tests.a"; path = "libPods-web3swift-iOS_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + AD5252D2AAE2CE2F1FFDA208DD0EFB4C /* UInt8+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt8+Extension.swift"; path = "Sources/CryptoSwift/UInt8+Extension.swift"; sourceTree = ""; }; + AD85FC46DA6BEAA980010B0C5F2BEED3 /* secp256k1.c */ = {isa = PBXFileReference; includeInIndex = 1; name = secp256k1.c; path = Classes/secp256k1/src/secp256k1.c; sourceTree = ""; }; + ADB4E2DA064200DDCD42C634CBC39977 /* field_5x52_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_impl.h; path = Classes/secp256k1/src/field_5x52_impl.h; sourceTree = ""; }; + AFAA80681A91BDC50EFC4294353BC5BA /* EthereumAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumAddress.swift; path = EthereumAddress/Classes/EthereumAddress.swift; sourceTree = ""; }; + B2AE7121F5348D2FDCD4FD763A42FB0C /* NSURLSession+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLSession+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.m"; sourceTree = ""; }; + B2B4899E422658B96ADF84B5239C418D /* ABIElements.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIElements.swift; path = EthereumABI/Classes/ABIElements.swift; sourceTree = ""; }; + B36AB396275697EEE1A5B13BA8A38FE3 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + B43B308FB300789356930844D6B81CF8 /* libsecp256k1_swift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libsecp256k1_swift-macOS.a"; path = "libsecp256k1_swift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + B453F34A70203AF07F27C5AE1B2A0518 /* AES.Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.Cryptors.swift; path = Sources/CryptoSwift/AES.Cryptors.swift; sourceTree = ""; }; + B468DE556C27A7C396C7B5ECC7DCF12E /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/CryptoSwift/Operators.swift; sourceTree = ""; }; + B48543DD38BB8E1AB0953C926DBA6C3F /* EthereumABI-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "EthereumABI-macOS.xcconfig"; path = "../EthereumABI-macOS/EthereumABI-macOS.xcconfig"; sourceTree = ""; }; + B4F5205894DF6FD73EF8CFA7609DA7D9 /* EthereumAddress-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EthereumAddress-macOS-dummy.m"; path = "../EthereumAddress-macOS/EthereumAddress-macOS-dummy.m"; sourceTree = ""; }; + B581065FDD5347ECD262D51E19274EB6 /* SipHash-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SipHash-macOS-prefix.pch"; path = "../SipHash-macOS/SipHash-macOS-prefix.pch"; sourceTree = ""; }; + B5A15DC755B12D8CCABB5B073B63856F /* Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Utils.swift; path = Sources/CryptoSwift/Utils.swift; sourceTree = ""; }; + B5CBF6B2F887499D9631619E0D53008D /* BlockModeOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockModeOptions.swift; path = Sources/CryptoSwift/BlockMode/BlockModeOptions.swift; sourceTree = ""; }; + B621DCE8D325B673C6F300B7C2CD478B /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; + B6A0DADFE9809AB925F51CF651528B31 /* secp256k1_swift-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "secp256k1_swift-iOS.xcconfig"; sourceTree = ""; }; B7762E4245191B27674EB7EB82DCFFF1 /* Pods-web3swift-macOS_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-macOS_Tests.debug.xcconfig"; sourceTree = ""; }; - B7D5FD5536C89792D33769E9EDFA2DE8 /* CFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CFB.swift; path = Sources/CryptoSwift/BlockMode/CFB.swift; sourceTree = ""; }; - B90CC3B80037E1B917D44513A07D0F6C /* BigInt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-umbrella.h"; sourceTree = ""; }; - B9737D99B060F85A0A42A3A30335B14F /* scalar_4x64.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64.h; path = Classes/secp256k1/src/scalar_4x64.h; sourceTree = ""; }; - BA200D6941B69ACC080DFB132BEFF422 /* num_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_impl.h; path = Classes/secp256k1/src/num_impl.h; sourceTree = ""; }; - BC0E5DF49745E221D708C75FC2B03DC7 /* AES+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AES+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/AES+Foundation.swift"; sourceTree = ""; }; - BD14A2D2C9467CDF73E9EC39F2B97E62 /* Hashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hashable.swift; path = sources/Hashable.swift; sourceTree = ""; }; - C05A424003F07748E6FAD6C9A57EEC23 /* BigInt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "BigInt-iOS.modulemap"; sourceTree = ""; }; - C06A130503E666429FAF2F0101641EE7 /* secp256k1_swift-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "secp256k1_swift-macOS-prefix.pch"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; sourceTree = ""; }; - C1BDC161E1A001A666E01A22455E14B5 /* AES.Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.Cryptors.swift; path = Sources/CryptoSwift/AES.Cryptors.swift; sourceTree = ""; }; - C21956F497DCFA1D883CAC00AF330784 /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; - C30494B6003825A7F5E0AE152495E590 /* Result-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-iOS-umbrella.h"; sourceTree = ""; }; - C31ABCFEE7AE67562C4CEBB66C7ED4D6 /* ZeroPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZeroPadding.swift; path = Sources/CryptoSwift/ZeroPadding.swift; sourceTree = ""; }; - C47CE1FE3AEC19CC322E3E03530D21CD /* PCBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PCBC.swift; path = Sources/CryptoSwift/BlockMode/PCBC.swift; sourceTree = ""; }; - C4D487F201A77E03F9ADC03703A1A897 /* scrypt-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "scrypt-macOS-prefix.pch"; path = "../scrypt-macOS/scrypt-macOS-prefix.pch"; sourceTree = ""; }; - C57F4AE68BD0AD2EE5867A1CA2A12FCC /* SipHash-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SipHash-iOS-dummy.m"; sourceTree = ""; }; - C66DD520FECE2C1EE69FD6A9E23EA032 /* field_5x52.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52.h; path = Classes/secp256k1/src/field_5x52.h; sourceTree = ""; }; - C6D3FAB581FA1884038308CAAD092260 /* NSURLSession+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLSession+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.h"; sourceTree = ""; }; - C717226571D60D3C7D8E15B4EDCC2E0F /* Collection+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Collection+Extension.swift"; path = "Sources/CryptoSwift/Collection+Extension.swift"; sourceTree = ""; }; - CA8015AE976B6601CC46035D043423E4 /* PromiseKit.root-CorePromise-Foundation.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "PromiseKit.root-CorePromise-Foundation.modulemap"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap"; sourceTree = ""; }; - CA97BDA6DF1DE11A96470DBF6FBD7C62 /* lax_der_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_parsing.c; path = Classes/secp256k1/contrib/lax_der_parsing.c; sourceTree = ""; }; - CAC966A4293FF7689DD8A3B2877731F3 /* Blowfish.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Blowfish.swift; path = Sources/CryptoSwift/Blowfish.swift; sourceTree = ""; }; - CB0B1B247B08E4A2259D6D21ABAB0304 /* MD5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MD5.swift; path = Sources/CryptoSwift/MD5.swift; sourceTree = ""; }; - CB4E43C9EB1F78AD84B2314039898608 /* GCD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCD.swift; path = sources/GCD.swift; sourceTree = ""; }; - CC4C922D64767063B8D1A270D793373B /* BlockEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockEncryptor.swift; path = Sources/CryptoSwift/BlockEncryptor.swift; sourceTree = ""; }; - CD8AF5512E4598482BBFB4AD1BBF8064 /* PKCS7.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7.swift; path = Sources/CryptoSwift/PKCS/PKCS7.swift; sourceTree = ""; }; - CEA9421290E9294FEA25D9F6D3DDD24C /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; - D08241C8DB918E40A54A24828275D1C5 /* secp256k1_swift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-iOS-umbrella.h"; sourceTree = ""; }; - D13D2441410EEFA35EFB1823E238648A /* Cryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptor.swift; path = Sources/CryptoSwift/Cryptor.swift; sourceTree = ""; }; - D1FC3BBD92A37B6D1B9844791FDD7F86 /* Bitwise Ops.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bitwise Ops.swift"; path = "sources/Bitwise Ops.swift"; sourceTree = ""; }; - D275AC61F658F73CFA8823434BCA3406 /* libPods-web3swift-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-iOS.a"; path = "libPods-web3swift-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - D286B6A0694F7E16078B8E7642CAE6FD /* Generics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generics.swift; path = Sources/CryptoSwift/Generics.swift; sourceTree = ""; }; - D292A1945503B3A000AC47BB73889903 /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Extension.swift"; path = "Sources/CryptoSwift/String+Extension.swift"; sourceTree = ""; }; - D3E0EFDBB92A100EDE06E9D563ACF26E /* PKCS7Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7Padding.swift; path = Sources/CryptoSwift/PKCS/PKCS7Padding.swift; sourceTree = ""; }; - D4294CA40AB575970217A19CAA320DC0 /* SwiftRLP-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftRLP-iOS-dummy.m"; sourceTree = ""; }; - D44F8F4C5F0D588B00DF17BC6518E5E0 /* Rabbit+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Rabbit+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift"; sourceTree = ""; }; - D57256C33A9C97F888F53A4FB7226146 /* UInt32+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt32+Extension.swift"; path = "Sources/CryptoSwift/UInt32+Extension.swift"; sourceTree = ""; }; - D6AB002E9D0C7DDC501F8673C4419E81 /* SipHash-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SipHash-macOS-prefix.pch"; path = "../SipHash-macOS/SipHash-macOS-prefix.pch"; sourceTree = ""; }; - D7009940ED0BFC1AA385433559754C27 /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; - D8241FAE07EC659EA8EE9D035AB05377 /* scalar_4x64_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64_impl.h; path = Classes/secp256k1/src/scalar_4x64_impl.h; sourceTree = ""; }; - D8D1F94E4F2A45EC9F2154127E14D416 /* CryptoSwift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "CryptoSwift-macOS-dummy.m"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-dummy.m"; sourceTree = ""; }; + B8172257020A0ACF61B9FA6264236BB6 /* NoPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoPadding.swift; path = Sources/CryptoSwift/NoPadding.swift; sourceTree = ""; }; + B88C2E2D4B6E99B918E6E13EDA4AA4A0 /* secp256k1_recovery.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_recovery.h; path = Classes/secp256k1/include/secp256k1_recovery.h; sourceTree = ""; }; + B8EBC720E3207E6F08965D7549AAFEC6 /* SwiftRLP.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftRLP.h; path = SwiftRLP/SwiftRLP.h; sourceTree = ""; }; + B99B34DE805578131F4C0D5BFE276614 /* SipHashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHashable.swift; path = SipHash/SipHashable.swift; sourceTree = ""; }; + B9A05629BB0205300B694B527AD16E56 /* ecmult_gen_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen_impl.h; path = Classes/secp256k1/src/ecmult_gen_impl.h; sourceTree = ""; }; + B9D41263F9CA47F4367384A4B93B0DDA /* SwiftRLP-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftRLP-macOS-prefix.pch"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-prefix.pch"; sourceTree = ""; }; + BA94DDC1F5525609A6FBA3EB53F09037 /* UInt64+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt64+Extension.swift"; path = "Sources/CryptoSwift/UInt64+Extension.swift"; sourceTree = ""; }; + BBE693F0F5E15CCA4AE9D51B9A369B70 /* Box.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Sources/Box.swift; sourceTree = ""; }; + BC2EE2AAFC0C186078B992C06F762E8D /* EthereumABI-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EthereumABI-macOS-umbrella.h"; path = "../EthereumABI-macOS/EthereumABI-macOS-umbrella.h"; sourceTree = ""; }; + BDD6E2BFD8131F124DFD131BA3C6D90E /* Data+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Extension.swift"; path = "Sources/CryptoSwift/Foundation/Data+Extension.swift"; sourceTree = ""; }; + BF0D275DC3AF207D0A444A28CB773AA5 /* SipHash-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SipHash-macOS-dummy.m"; path = "../SipHash-macOS/SipHash-macOS-dummy.m"; sourceTree = ""; }; + BF7E9A738647C81A92D68BCF6E734C6B /* libscrypt-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libscrypt-iOS.a"; path = "libscrypt-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + C04A3FB24C874F21628C4E7EA8B9693B /* scrypt-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "scrypt-macOS.xcconfig"; path = "../scrypt-macOS/scrypt-macOS.xcconfig"; sourceTree = ""; }; + C04C575F1277CF14F506F691F9C669FC /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = sources/Random.swift; sourceTree = ""; }; + C0A59FDACCE16F10DF39EA55249CA72D /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Extension.swift"; path = "Sources/CryptoSwift/String+Extension.swift"; sourceTree = ""; }; + C0E00E27FCA499ADCF69CE2096BEF87F /* EthereumAddress-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "EthereumAddress-iOS.xcconfig"; sourceTree = ""; }; + C14CAC03510776AA4E99EA944110DFD9 /* DigestType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DigestType.swift; path = Sources/CryptoSwift/DigestType.swift; sourceTree = ""; }; + C174EE4F0CE9A869F2E898CFF8A36484 /* Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Poly1305.swift; path = Sources/CryptoSwift/Poly1305.swift; sourceTree = ""; }; + C279D46376D66FBA43CD88224B12208B /* UIViewPropertyAnimator+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewPropertyAnimator+Promise.swift"; path = "Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift"; sourceTree = ""; }; + C2AB0FA3FFAC3EBB0D9CACE786196AC1 /* BigUInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigUInt.swift; path = sources/BigUInt.swift; sourceTree = ""; }; + C4AD5698CEACE94C1CAD1C0317E14905 /* EthereumAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EthereumAddress.h; path = EthereumAddress/EthereumAddress.h; sourceTree = ""; }; + C4D8573A6F8E2A67DD73406C5B3ECBB5 /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; + C4F1681CFA49EA17D6A73339A9C1A44A /* ABITypeParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABITypeParser.swift; path = EthereumABI/Classes/ABITypeParser.swift; sourceTree = ""; }; + C742D7E4D064B53F3E8BD2061CEB4650 /* EthereumABI-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EthereumABI-macOS-dummy.m"; path = "../EthereumABI-macOS/EthereumABI-macOS-dummy.m"; sourceTree = ""; }; + C799FC61BB50110B0EF9812635A7CF8F /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; + C9A9A0105BAE9E5BEE9ADD4B17A58DD8 /* Deprecations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecations.swift; path = Sources/Deprecations.swift; sourceTree = ""; }; + CC444A933C805567A3F012F3CEE72D08 /* secp256k1_swift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "secp256k1_swift-macOS-dummy.m"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-dummy.m"; sourceTree = ""; }; + CDFC58447BAB63CE30E97C059F8345F5 /* SHA1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA1.swift; path = Sources/CryptoSwift/SHA1.swift; sourceTree = ""; }; + CF31935E8E71BE039924EA648A315B8D /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift"; sourceTree = ""; }; + CF8798C22F31053E2D6EAF35C011146D /* 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 = ""; }; + CFAF7D663AA6B1D79BC3ED1927EEE23C /* EthereumABI-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "EthereumABI-macOS.modulemap"; path = "../EthereumABI-macOS/EthereumABI-macOS.modulemap"; sourceTree = ""; }; + D1EDEFFF233BE2D7F100C45B95D49336 /* secp256k1_swift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "secp256k1_swift-macOS-umbrella.h"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h"; sourceTree = ""; }; + D1FD34D2C5C93A170139E5994B7F5D8D /* Result-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Result-macOS.xcconfig"; path = "../Result-macOS/Result-macOS.xcconfig"; sourceTree = ""; }; + D2742B99A93E16E813DA0B71800AAA56 /* String+FoundationExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FoundationExtension.swift"; path = "Sources/CryptoSwift/Foundation/String+FoundationExtension.swift"; sourceTree = ""; }; + D318DFC773B02CFC92B543471C937BA7 /* secp256k1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1.h; path = Classes/secp256k1/include/secp256k1.h; sourceTree = ""; }; + D357F7F273D21A9292686CC024C470A2 /* EthereumAddress-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "EthereumAddress-iOS.modulemap"; sourceTree = ""; }; + D4C96A2C2C3B9F8977AD08B6FBEDE552 /* field_5x52_asm_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_asm_impl.h; path = Classes/secp256k1/src/field_5x52_asm_impl.h; sourceTree = ""; }; + D62515D5BE9A59FE5C9041B4EBE9CA58 /* Cipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cipher.swift; path = Sources/CryptoSwift/Cipher.swift; sourceTree = ""; }; + D6E02047F0F6A6150C26B56EEF63F55B /* ZeroPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZeroPadding.swift; path = Sources/CryptoSwift/ZeroPadding.swift; sourceTree = ""; }; + D895276EEA2D99E4EBF5B7FE4596872B /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h"; sourceTree = ""; }; + D8EC3860FD1A1DA54C00A1498D1F1D9E /* CryptoSwift-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CryptoSwift-macOS-umbrella.h"; path = "../CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h"; sourceTree = ""; }; D8F688145BCFE1FB8B76299CC261A05E /* Pods-web3swift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swift-iOS-dummy.m"; sourceTree = ""; }; - D9A9A6187028CC6AD623334BA2899FDE /* lax_der_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_parsing.h; path = Classes/secp256k1/contrib/lax_der_parsing.h; sourceTree = ""; }; - D9C39AD388A82A531C338B26EE00DB9C /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift"; sourceTree = ""; }; - D9F882189D9E2CE8D7B7DC60BA0D5AF6 /* PBKDF2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF2.swift; path = Sources/CryptoSwift/PKCS/PBKDF2.swift; sourceTree = ""; }; + D9883A143C0F77B2C2AF7E05BF805F25 /* AES+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AES+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/AES+Foundation.swift"; sourceTree = ""; }; + D9B1DC98FA2ABF0645707ED4C6FF5D77 /* Subtraction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Subtraction.swift; path = sources/Subtraction.swift; sourceTree = ""; }; + D9B3D040637E19F37C0D7EB3C1A6A991 /* ABIParsing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIParsing.swift; path = EthereumABI/Classes/ABIParsing.swift; sourceTree = ""; }; + DA0CDB938B1F875D679C20362C887E17 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PromiseKit.root-CorePromise-Foundation-umbrella.h"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h"; sourceTree = ""; }; DA900039B5D199745C785144030E7BF9 /* Pods-web3swift-macOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swift-macOS-acknowledgements.markdown"; sourceTree = ""; }; - DAC89259204E1C6A18BCD0B7D08C104B /* RandomUInt64.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomUInt64.swift; path = SipHash/RandomUInt64.swift; sourceTree = ""; }; + DAB3CD9F51BF3B4399B8EFC798B3F215 /* scrypt-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "scrypt-macOS-dummy.m"; path = "../scrypt-macOS/scrypt-macOS-dummy.m"; sourceTree = ""; }; + DAB40084682C161CD573420C8CCBFD4F /* NSTask+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSTask+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.h"; sourceTree = ""; }; DCCD9B75F811575B41254E2EACE6F115 /* Pods-web3swift-macOS_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swift-macOS_Tests-acknowledgements.plist"; sourceTree = ""; }; - DF39D90FCE7EA42EF346003BA8EF96AF /* ecmult_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_impl.h; path = Classes/secp256k1/src/ecmult_impl.h; sourceTree = ""; }; - DF4D45B809574B97A749EADBA2EFAB02 /* CBCMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBCMAC.swift; path = Sources/CryptoSwift/CBCMAC.swift; sourceTree = ""; }; - E022DA9B1DCAC9A88B18D90457826545 /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; - E26835835263C5B5310353A54E6AA37E /* secp256k1_swift-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-iOS-prefix.pch"; sourceTree = ""; }; - E34CB7E7EAC6A9C0F75649FD43EC23F2 /* SipHash-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SipHash-macOS-dummy.m"; path = "../SipHash-macOS/SipHash-macOS-dummy.m"; sourceTree = ""; }; - E34EBA5D815562B6AEF202EEF42D4456 /* SwiftRLP-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SwiftRLP-iOS.xcconfig"; sourceTree = ""; }; + DD5583797A4DF2B5636D036CDD472CD0 /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; + DE9BBD4AE4B529B25E9E4FE7C8493181 /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; + DF72EE1FD04A0B49CB495E9980F6B8A9 /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; + E05424B44F6AFD35E237815F926FEEEB /* eckey_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey_impl.h; path = Classes/secp256k1/src/eckey_impl.h; sourceTree = ""; }; + E1999CB16AEF90FFCC762EC5BA3C538B /* scalar_4x64.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64.h; path = Classes/secp256k1/src/scalar_4x64.h; sourceTree = ""; }; + E1D1692A2F154E2828E569943ED540D4 /* CipherModeWorker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CipherModeWorker.swift; path = Sources/CryptoSwift/BlockMode/CipherModeWorker.swift; sourceTree = ""; }; + E301EA386C90D10BDC9671660BE64E94 /* libCryptoSwift-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libCryptoSwift-macOS.a"; path = "libCryptoSwift-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; E3ADB0156604A4FD7CD47B25248088C2 /* Pods-web3swift-iOS_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swift-iOS_Tests.release.xcconfig"; sourceTree = ""; }; - E65308F679CCAADBBF14F5DB4971CD21 /* Cimpl.c */ = {isa = PBXFileReference; includeInIndex = 1; name = Cimpl.c; path = scrypt/Cimpl.c; sourceTree = ""; }; - E79185DFEB64004C5523F725F3DC89B0 /* CryptoSwift-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "CryptoSwift-macOS.xcconfig"; path = "../CryptoSwift-macOS/CryptoSwift-macOS.xcconfig"; sourceTree = ""; }; - E7E7786C2EC1054AF047E2571B12205F /* util.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = util.h; path = Classes/secp256k1/src/util.h; sourceTree = ""; }; - E81CDB6F58099035E4B22900B2E0740D /* Int+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Int+Extension.swift"; path = "Sources/CryptoSwift/Int+Extension.swift"; sourceTree = ""; }; - E8554570D5B7F10CEE0823FEB5B80B8D /* PromiseKit.root-CorePromise-Foundation.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "PromiseKit.root-CorePromise-Foundation.xcconfig"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.xcconfig"; sourceTree = ""; }; - E90C5426B3E9CBBCF9A8B6731836D354 /* UIView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Extensions/UIKit/Sources/UIView+Promise.swift"; sourceTree = ""; }; - EA3D1883E9BD064F4B9299B5825061E7 /* String+FoundationExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FoundationExtension.swift"; path = "Sources/CryptoSwift/Foundation/String+FoundationExtension.swift"; sourceTree = ""; }; - EA5498F48A9D57F5578FB70B8544C14C /* secp256k1_swift-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "secp256k1_swift-macOS.modulemap"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap"; sourceTree = ""; }; - EB0E2A41F4665970E5124BB49E1B4D55 /* SipHash-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-iOS-prefix.pch"; sourceTree = ""; }; - EB3A44C98D1E93465803241C08887CDD /* num.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num.h; path = Classes/secp256k1/src/num.h; sourceTree = ""; }; - EBD8BA7DCEF1E0FF9602E3F7BE941878 /* SipHasher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHasher.swift; path = SipHash/SipHasher.swift; sourceTree = ""; }; - EBF499BFE8AA65F3D4DF5B33BA57DC88 /* SwiftRLP-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-iOS-prefix.pch"; sourceTree = ""; }; - ED4A3438C4739D717703BAE1F7020595 /* Deprecations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecations.swift; path = Sources/Deprecations.swift; sourceTree = ""; }; - EE67CD504E9DAC9DEA10C48C45C9E86B /* SipHash-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SipHash-iOS.modulemap"; sourceTree = ""; }; - EE7F6BB14F19AC57CB96B2D06603E845 /* ChaCha20.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChaCha20.swift; path = Sources/CryptoSwift/ChaCha20.swift; sourceTree = ""; }; - EE8A73B5FBE9F82E34238AC840FC7331 /* eckey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey.h; path = Classes/secp256k1/src/eckey.h; sourceTree = ""; }; - EF13999388904A7883CEA9B745018AAF /* libBigInt-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libBigInt-macOS.a"; path = "libBigInt-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - EFCBEFE9DA6D7F361DBB180EB84492D2 /* BlockCipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockCipher.swift; path = Sources/CryptoSwift/BlockCipher.swift; sourceTree = ""; }; - F03C5346C1BA44E2325916DC9CE7B67B /* SwiftRLP-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-iOS-umbrella.h"; sourceTree = ""; }; - F0866AEDD788E4D8B51A31A2FB8C294F /* scrypt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "scrypt-iOS-dummy.m"; sourceTree = ""; }; - F1899C74540C37F7D84214CF9F8AD010 /* NSNotificationCenter+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSNotificationCenter+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m"; sourceTree = ""; }; - F218E50D513522160983106C90B34FBE /* Prime Test.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Prime Test.swift"; path = "sources/Prime Test.swift"; sourceTree = ""; }; - F25882CAD0730D8C76F023B8C6FA287C /* Blowfish+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Blowfish+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift"; sourceTree = ""; }; - F310D1B89DD81708BBBAED0DDF1B1168 /* CryptoSwift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-iOS-umbrella.h"; sourceTree = ""; }; - F32BA5AE4C0BE79090A24F00A3F35AFF /* Strideable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Strideable.swift; path = sources/Strideable.swift; sourceTree = ""; }; + E4992855757033544670BD38D4484C08 /* BlockCipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockCipher.swift; path = Sources/CryptoSwift/BlockCipher.swift; sourceTree = ""; }; + E4D925299799CBB413016810B41EB65C /* SwiftRLP-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-iOS-prefix.pch"; sourceTree = ""; }; + E692601913F2AB7B6FE40D658E90C7B5 /* libEthereumABI-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libEthereumABI-iOS.a"; path = "libEthereumABI-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + E7A2D1D0062F350907B747E2A192E438 /* ABIDecoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIDecoding.swift; path = EthereumABI/Classes/ABIDecoding.swift; sourceTree = ""; }; + E94EF5B041036E702BC404B7118A8F9E /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.h"; sourceTree = ""; }; + E9FDE304B6122EEAE8A1FC91742A69E6 /* scalar_8x32.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32.h; path = Classes/secp256k1/src/scalar_8x32.h; sourceTree = ""; }; + EA46482A8E14BD7641E6F29ED4F0A6B4 /* Integer Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Integer Conversion.swift"; path = "sources/Integer Conversion.swift"; sourceTree = ""; }; + EA5B0A3B538B56303C1A061E2514BF07 /* hash.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash.h; path = Classes/secp256k1/src/hash.h; sourceTree = ""; }; + EA975F09047F404D3183C92FCA1AD829 /* Hashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hashable.swift; path = sources/Hashable.swift; sourceTree = ""; }; + EABECB99AFE1BF549F3CEE90FBD45E98 /* BigInt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "BigInt-macOS.modulemap"; path = "../BigInt-macOS/BigInt-macOS.modulemap"; sourceTree = ""; }; + EB02248C062005D2F2620C9F81EC5ED4 /* GCD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCD.swift; path = sources/GCD.swift; sourceTree = ""; }; + EB74063F2F7DC76E97D34EC40D093C52 /* Salsa.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Salsa.swift; path = scrypt/scrypt/Salsa.swift; sourceTree = ""; }; + EB9D182FF8C8E692497E5FB1362B72E9 /* scrypt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "scrypt-iOS.modulemap"; sourceTree = ""; }; + ED9E675BBBC75B01E6961483170B6E7F /* SwiftRLP-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SwiftRLP-macOS-dummy.m"; path = "../SwiftRLP-macOS/SwiftRLP-macOS-dummy.m"; sourceTree = ""; }; + EDB10140BE59AEE481C7E08EDC79971D /* Division.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Division.swift; path = sources/Division.swift; sourceTree = ""; }; + EDD86700A4552C712FAC348BB69DACD9 /* secp256k1_swift-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-iOS-umbrella.h"; sourceTree = ""; }; + EE9322C93C8E91E65E7CE9C01CB02F70 /* UIView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.m"; sourceTree = ""; }; + EF8327584F2BDEC27C9163F51CDEFB9E /* SwiftRLP-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SwiftRLP-macOS.xcconfig"; path = "../SwiftRLP-macOS/SwiftRLP-macOS.xcconfig"; sourceTree = ""; }; + F063BD5FB8772F058E36A1292962E899 /* Blowfish.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Blowfish.swift; path = Sources/CryptoSwift/Blowfish.swift; sourceTree = ""; }; + F0EE85F786503354B347C059417EBAD2 /* CustomStringConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomStringConvertible.swift; path = Sources/CustomStringConvertible.swift; sourceTree = ""; }; + F106BE3FED3F7D139A061124A9FF0251 /* Cimpl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Cimpl.h; path = scrypt/Cimpl.h; sourceTree = ""; }; + F1C65F271D54976AEAF5B1CB4522A471 /* Scrypt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scrypt.swift; path = scrypt/scrypt/Scrypt.swift; sourceTree = ""; }; + F20EF6148A6A9322390DD71721B5343D /* NoError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoError.swift; path = Result/NoError.swift; sourceTree = ""; }; + F265D345562C600DE93E2D4EA31ED76D /* Resolver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Resolver.swift; path = Sources/Resolver.swift; sourceTree = ""; }; + F269536FCE8F92893C1DF08F94904EBD /* NSURLSession+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLSession+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.h"; sourceTree = ""; }; + F3BCAAFEDF865BD7F6D1C36246EEE02A /* field.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field.h; path = Classes/secp256k1/src/field.h; sourceTree = ""; }; + F42AC215BDD4E22070E88E9837549CD1 /* RandomBytesSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomBytesSequence.swift; path = Sources/CryptoSwift/RandomBytesSequence.swift; sourceTree = ""; }; F45D1FF9B0F3BEACB34D069C6F3561F8 /* Pods-web3swift-iOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swift-iOS-acknowledgements.markdown"; sourceTree = ""; }; - F4BAF829379DA2971A7051C2EFAE15E8 /* SHA3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA3.swift; path = Sources/CryptoSwift/SHA3.swift; sourceTree = ""; }; - F4F0BCD366AE2D51D6C35C2192996DBD /* libscrypt-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libscrypt-macOS.a"; path = "libscrypt-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - F5AA52D2E5DC0134CBA0CB3219327A53 /* secp256k1_recovery.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_recovery.h; path = Classes/secp256k1/include/secp256k1_recovery.h; sourceTree = ""; }; - F60B61CB7F6EF778CD12A3622F779434 /* scrypt-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "scrypt-macOS-umbrella.h"; path = "../scrypt-macOS/scrypt-macOS-umbrella.h"; sourceTree = ""; }; - F8262D72960A17572931F11EC9520938 /* secp256k1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = secp256k1.swift; path = Classes/secp256k1.swift; sourceTree = ""; }; - F84F141F7B6CD4974D2BDD888FE19496 /* scrypt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-iOS-umbrella.h"; sourceTree = ""; }; - F935D7D51C3BD0EEA31106E0BF9C3D13 /* Cimpl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Cimpl.h; path = scrypt/Cimpl.h; sourceTree = ""; }; - F99CCF5FD903883FB3C524CA2FB43E2C /* libSipHash-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSipHash-iOS.a"; path = "libSipHash-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - F9C126B6106FA68D54B74E0DD65E0F8E /* SipHash-macOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SipHash-macOS.xcconfig"; path = "../SipHash-macOS/SipHash-macOS.xcconfig"; sourceTree = ""; }; - F9D80D5C595654C7E23670359CB76D99 /* secp256k1_swift-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "secp256k1_swift-iOS-dummy.m"; sourceTree = ""; }; - FA1C0BFC1A022B5AD3BDFC8920FCFD74 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PromiseKit.root-CorePromise-Foundation-umbrella.h"; path = "../PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h"; sourceTree = ""; }; - FB290FC3F5ACF0789F4078C376E6ADED /* Array+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Extension.swift"; path = "Sources/CryptoSwift/Array+Extension.swift"; sourceTree = ""; }; - FB320DD9FD83A5F3BAADF33818736C30 /* secp256k1_swift-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "secp256k1_swift-macOS-dummy.m"; path = "../secp256k1_swift-macOS/secp256k1_swift-macOS-dummy.m"; sourceTree = ""; }; - FD3D00DC2D85B010C2EB60CA78D22508 /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; - FDADCB9A8CD9274EA3AC09BE3B7E0F66 /* libSwiftRLP-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libSwiftRLP-iOS.a"; path = "libSwiftRLP-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - FE3D7030BC429403BBE50F40445229DE /* SecureBytes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SecureBytes.swift; path = Sources/CryptoSwift/SecureBytes.swift; sourceTree = ""; }; - FF137216E20AA1BF3FA0B1A647DB89AC /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/CryptoSwift/Operators.swift; sourceTree = ""; }; - FF1BE57EBE989B2B7EDD166127B5FCD9 /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; - FF66C3EFCA475A91734C76A5D546BE1A /* libPods-web3swift-iOS_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-web3swift-iOS_Tests.a"; path = "libPods-web3swift-iOS_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - FF8AF8868130C525C8921A94220CFA6D /* HMAC+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "HMAC+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/HMAC+Foundation.swift"; sourceTree = ""; }; - FF94FCFAAA2F4216A2F89F43E2CDA4DA /* Catchable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catchable.swift; path = Sources/Catchable.swift; sourceTree = ""; }; + F4E5D057A0E9ADAC720AAE1F3B6FD669 /* scrypt-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "scrypt-macOS-prefix.pch"; path = "../scrypt-macOS/scrypt-macOS-prefix.pch"; sourceTree = ""; }; + F60D6D403033B0F37C22533C4A05A1E4 /* UInt128.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UInt128.swift; path = Sources/CryptoSwift/UInt128.swift; sourceTree = ""; }; + F62C08D51F07D8799AD6CB646A710F41 /* ChaCha20.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChaCha20.swift; path = Sources/CryptoSwift/ChaCha20.swift; sourceTree = ""; }; + F6575BB4E0B2AD0E5B88C62A5EDA6FCB /* group.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group.h; path = Classes/secp256k1/src/group.h; sourceTree = ""; }; + F6B67028CCAE6818C78DBC12D8329550 /* RLP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RLP.swift; path = Classes/RLP.swift; sourceTree = ""; }; + F7E0FE543A2A814147E52BD4424892FD /* fwd.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = fwd.h; path = Sources/fwd.h; sourceTree = ""; }; + F7ED977AF2E31DEA78D850BDE6C9F601 /* field_10x26_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26_impl.h; path = Classes/secp256k1/src/field_10x26_impl.h; sourceTree = ""; }; + F7F56C5F9833A0AB26CC47460A928E34 /* Result-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Result-iOS.xcconfig"; sourceTree = ""; }; + F8C27B7CBA5225481973EDA23AF49981 /* AEADChaCha20Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEADChaCha20Poly1305.swift; path = Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift; sourceTree = ""; }; + F964C89C691E6FE6350F48A4A3E1DD52 /* PKCS5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS5.swift; path = Sources/CryptoSwift/PKCS/PKCS5.swift; sourceTree = ""; }; + F98943C5BB435ED0A98F417086E89DFE /* scrypt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-iOS-prefix.pch"; sourceTree = ""; }; + F98F9737D714C11C13F01403ECACC354 /* Utils+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Utils+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Utils+Foundation.swift"; sourceTree = ""; }; + FA4C0B3D9EC3E926E106CA2DE8CDEAF9 /* ecmult_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_impl.h; path = Classes/secp256k1/src/ecmult_impl.h; sourceTree = ""; }; + FA4D3EFB3ECDE366218A9D0848F3C58B /* scalar_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_impl.h; path = Classes/secp256k1/src/scalar_impl.h; sourceTree = ""; }; + FA93B396CDC9BA5785D41386B95B4AE2 /* ChaCha20+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ChaCha20+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift"; sourceTree = ""; }; + FAF14DF7DD65D242909C4D06F8C00DEF /* HMAC+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "HMAC+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/HMAC+Foundation.swift"; sourceTree = ""; }; + FB31CE10E8BEEBFC7B50C9F8A97E10A8 /* Blowfish+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Blowfish+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift"; sourceTree = ""; }; + FEDDAEEE4BC31C06BAE2232AFCA5468E /* HMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HMAC.swift; path = Sources/CryptoSwift/HMAC.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 03011555EFED1D5408D878A307E7F27B /* Frameworks */ = { + 08725796DB76F7D6AE648E2FE6C6F219 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 05577BA791C80220E64423A3DA803314 /* Frameworks */ = { + 0CB8E604AAFC039274BE7F9019820464 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 2714EC0418F441D39321DBFD3CFC5BF3 /* Frameworks */ = { + 1600C6BC8C1AD78A95A84E5114873FBD /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 2E1C020D358710A3E399DC2793603432 /* Frameworks */ = { + 201C2E8B1BBF4EA2C2E855CAD443F07A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 3AAC28C160F50900EE61CA27D4E2EF5D /* Frameworks */ = { + 215FF64BB8F688F84B3231B77569E5C2 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 3AE77EFED90447A6B1DAC12064BA51E9 /* Frameworks */ = { + 224FCBB2C53DEF01AF13F9CFC741739D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 49DDA0C2610D394C727D7031E3440CCF /* Frameworks */ = { + 23806D0BC0F52E8AC5EE2B81034FD7D3 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 5266E30913229719A172673D2CC2CC9B /* Frameworks */ = { + 25FCBA5B2FFAFF4A3E1CB4180AA265B0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 6EC658BB78F973B687A770E4EC1E8853 /* Frameworks */ = { + 30C84D375526C86BF24F081A4EF0CA55 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 6F6453F76274AE713CC0D3CD28EB9C36 /* Frameworks */ = { + 3B7AC4EF9C63E5F22954D8AF93D04330 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 803328A4C9D919A350F04AB5D9FBBC0A /* Frameworks */ = { + 435144EBFB416082687F21AE9FE91D96 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 8A852453AAC819ADB163A9F4FA02ABF9 /* Frameworks */ = { + 49DDA0C2610D394C727D7031E3440CCF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 9D409A2942E61980145880BF513A7F7D /* Frameworks */ = { + 5740D976E52AA2EB97C2A9F753E1C740 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 9FA0F642AE177D3FA07814A41F264B1A /* Frameworks */ = { + 6F6453F76274AE713CC0D3CD28EB9C36 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - B244EFB510B7723225BAE6675E63CE10 /* Frameworks */ = { + 739BFA7B674F25403C43C426637796E0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - CDD5EEE59EED703D7D057105BF3320CA /* Frameworks */ = { + 803328A4C9D919A350F04AB5D9FBBC0A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - D2A4B152651F01134ED378054CE50C8D /* Frameworks */ = { + 872D6A3DAA3AC36B6C52474F6BF4CA6D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - D45B18240A0BA70F5BD174A232F95C45 /* Frameworks */ = { + 8A852453AAC819ADB163A9F4FA02ABF9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - F3D19D58AA787766BBBD7801570222E2 /* Frameworks */ = { + 9FA0F642AE177D3FA07814A41F264B1A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - F8DE994896B53C78B2E78A42E3193FFC /* Frameworks */ = { + AC5A4F42824C1F9DC39C2D962FA6E967 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - FA42B5B3447A1D1A233689BB1B366630 /* Frameworks */ = { + C057B63C1468DF9D9FB55C472186B940 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2A4B152651F01134ED378054CE50C8D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - FC3AA5C1EA87DD47338B9100FB46F5DD /* Frameworks */ = { + F3D19D58AA787766BBBD7801570222E2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FA42B5B3447A1D1A233689BB1B366630 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -1182,19 +1295,15 @@ name = "Targets Support Files"; sourceTree = ""; }; - 05B4DA0C32E1BAA8E12B2E57FB88CCC7 /* scrypt */ = { + 04D344FA994D64D74F3957A5E07D7003 /* SwiftRLP */ = { isa = PBXGroup; children = ( - 93264D7DC7DF888A41AF35694C9CBF60 /* BufferStorage.swift */, - E65308F679CCAADBBF14F5DB4971CD21 /* Cimpl.c */, - F935D7D51C3BD0EEA31106E0BF9C3D13 /* Cimpl.h */, - 03321ECEB201CDE70DA4F88EE48E2044 /* Salsa.swift */, - 9411AC5861B33542BF71A1EED7E49FC4 /* scrypt.h */, - 41FAB135DE09D3F9136D834CBE3A558A /* Scrypt.swift */, - C983EA1AC8F89B7B13410C24C8F9C35D /* Support Files */, + F6B67028CCAE6818C78DBC12D8329550 /* RLP.swift */, + B8EBC720E3207E6F08965D7549AAFEC6 /* SwiftRLP.h */, + 9F0ACAD8B1C23047839392A42456AF61 /* Support Files */, ); - name = scrypt; - path = scrypt; + name = SwiftRLP; + path = SwiftRLP; sourceTree = ""; }; 074B5AF920A574FC168DA49C8D334690 /* Pods-web3swift-macOS_Tests */ = { @@ -1223,22 +1332,22 @@ path = "Target Support Files/Pods-web3swift-iOS_Tests"; sourceTree = ""; }; - 0E22312CDA1302633680E34AA7319FE8 /* Support Files */ = { + 0BFEFDA3C060A520AC31181B2B963F58 /* Support Files */ = { isa = PBXGroup; children = ( - EE67CD504E9DAC9DEA10C48C45C9E86B /* SipHash-iOS.modulemap */, - A0347CA8676D7E491A4DA559FB78007F /* SipHash-iOS.xcconfig */, - C57F4AE68BD0AD2EE5867A1CA2A12FCC /* SipHash-iOS-dummy.m */, - EB0E2A41F4665970E5124BB49E1B4D55 /* SipHash-iOS-prefix.pch */, - 7692AAEAD8E8FFF8D2E46B60CBA56CDA /* SipHash-iOS-umbrella.h */, - 919A091F1E72F11C9C10844CC5454B2F /* SipHash-macOS.modulemap */, - F9C126B6106FA68D54B74E0DD65E0F8E /* SipHash-macOS.xcconfig */, - E34CB7E7EAC6A9C0F75649FD43EC23F2 /* SipHash-macOS-dummy.m */, - D6AB002E9D0C7DDC501F8673C4419E81 /* SipHash-macOS-prefix.pch */, - 4E85EB665265A065E5D96BCE2B87008D /* SipHash-macOS-umbrella.h */, + 6BB6440618D1B0E87AE5AA65F64B69DD /* Result-iOS.modulemap */, + F7F56C5F9833A0AB26CC47460A928E34 /* Result-iOS.xcconfig */, + 279857EBC2D837FCAB656991E73C8C39 /* Result-iOS-dummy.m */, + 0C79BC89B6EB9504D07FA8AC80365541 /* Result-iOS-prefix.pch */, + 2A844BDD60081AA12674BC4FC33E5560 /* Result-iOS-umbrella.h */, + 53A9CE7F7031C40517F85796D6BDEB9C /* Result-macOS.modulemap */, + D1FD34D2C5C93A170139E5994B7F5D8D /* Result-macOS.xcconfig */, + 0536186C77B05CB18765BFD4670AC3D1 /* Result-macOS-dummy.m */, + 0DA70B96E002212A3A39FC0943499DF6 /* Result-macOS-prefix.pch */, + 37A3BB2B9627AD42F4EC73AE040C9A18 /* Result-macOS-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/SipHash-iOS"; + path = "../Target Support Files/Result-iOS"; sourceTree = ""; }; 0F8D2E47FE03D3B91B51069F7C273AF4 /* Frameworks */ = { @@ -1248,201 +1357,172 @@ name = Frameworks; sourceTree = ""; }; - 1AC78478C51907110096C348221D88EC /* Pods */ = { + 34FAF2B4032D60B58F23F807B4871923 /* SipHash */ = { isa = PBXGroup; children = ( - D744BED64DE3B64CE5A12B74A22D228D /* BigInt */, - 56BBFF8639CCDA4A35DED29BDD33D528 /* CryptoSwift */, - 361AF2F3A6AA13AA5E964E778F7E85BD /* EthereumAddress */, - 54B37D075BCFF2BF04A3CC7CB9D1C6F9 /* PromiseKit */, - 541E7AD1499C6B8095A27B0F22098CE0 /* Result */, - 05B4DA0C32E1BAA8E12B2E57FB88CCC7 /* scrypt */, - F60B65C0BEC31AA822288722889BD576 /* secp256k1_swift */, - 652884AA38DA09A2444762C072AAE0FE /* SipHash */, - 2FD28755727C4877D11F1FACC2821028 /* SwiftRLP */, + A7E446483743D975168011448637ED65 /* Primitive Types.swift */, + 86A87591096A3CD9071AD2D94874973C /* RandomUInt64.swift */, + B99B34DE805578131F4C0D5BFE276614 /* SipHashable.swift */, + 4638850DD91EB5F2EFCF18E99D4D87FA /* SipHasher.swift */, + AEAD5D9B473E4A71E8CFAE0F15721DB9 /* Support Files */, ); - name = Pods; + name = SipHash; + path = SipHash; sourceTree = ""; }; - 1C95D05EA1244C1219298719A0647D65 /* Foundation */ = { + 3827F60DF0B6BE43D84C824208816056 /* Support Files */ = { isa = PBXGroup; children = ( - 74111ED4B5372D2EE9A218621A18699C /* afterlife.swift */, - 7DE92E2A606B96369F79D742DFACB7C9 /* NSNotificationCenter+AnyPromise.h */, - F1899C74540C37F7D84214CF9F8AD010 /* NSNotificationCenter+AnyPromise.m */, - D9C39AD388A82A531C338B26EE00DB9C /* NSNotificationCenter+Promise.swift */, - 840434A830881CF07FBDE172A20CDDDC /* NSObject+Promise.swift */, - 860EF39282D8941084557A3DCC1D7DF3 /* NSTask+AnyPromise.h */, - 86B004B7F6AC62E27D75D02978601A76 /* NSTask+AnyPromise.m */, - C6D3FAB581FA1884038308CAAD092260 /* NSURLSession+AnyPromise.h */, - 55F115779D04B6641A1DB99D05887E03 /* NSURLSession+AnyPromise.m */, - 7739AC49E92EA0677899D077C015CE05 /* NSURLSession+Promise.swift */, - 17856FB7A41BDDB75285F531B03882F4 /* PMKFoundation.h */, - 43941A9CA2F209289C333306CBC5961F /* Process+Promise.swift */, + EB9D182FF8C8E692497E5FB1362B72E9 /* scrypt-iOS.modulemap */, + 420A1793DC6527296BC586472865C8C0 /* scrypt-iOS.xcconfig */, + 2533EAF35B54AB44227FBC0A9BA7D19E /* scrypt-iOS-dummy.m */, + F98943C5BB435ED0A98F417086E89DFE /* scrypt-iOS-prefix.pch */, + 417BA17C9527B36A6953928718163ACE /* scrypt-iOS-umbrella.h */, + 3BA0B14650AEA1E6C77147E96770CB09 /* scrypt-macOS.modulemap */, + C04A3FB24C874F21628C4E7EA8B9693B /* scrypt-macOS.xcconfig */, + DAB3CD9F51BF3B4399B8EFC798B3F215 /* scrypt-macOS-dummy.m */, + F4E5D057A0E9ADAC720AAE1F3B6FD669 /* scrypt-macOS-prefix.pch */, + 55609C780EA603377D9F33E7661A79BB /* scrypt-macOS-umbrella.h */, ); - name = Foundation; + name = "Support Files"; + path = "../Target Support Files/scrypt-iOS"; sourceTree = ""; }; - 2FD28755727C4877D11F1FACC2821028 /* SwiftRLP */ = { + 3EC5D1EA5568F6BB631C6A9AD5B40F86 /* Products */ = { isa = PBXGroup; children = ( - 49FA7F82B54CC7168B96069F53D66A28 /* RLP.swift */, - 0F02A89B4F4807025E1CB0C26D63CD65 /* SwiftRLP.h */, - A33DC2AD3BADDA5A006F792ED154E7A5 /* Support Files */, + 4249BBDEF2DD259919D48F146E985928 /* libBigInt-iOS.a */, + 1A0E65E61932B728FD97FB08D42B3EF6 /* libBigInt-macOS.a */, + A6F7930650FD31ED4C95EAB12B5DA36F /* libCryptoSwift-iOS.a */, + E301EA386C90D10BDC9671660BE64E94 /* libCryptoSwift-macOS.a */, + E692601913F2AB7B6FE40D658E90C7B5 /* libEthereumABI-iOS.a */, + 61858AD8F2BC3FA5B6CE10752824FA45 /* libEthereumABI-macOS.a */, + 27D0F7DCFEE54028674461B7456DB4EB /* libEthereumAddress-iOS.a */, + 4813C1A0F259481060973E85D757C6F8 /* libEthereumAddress-macOS.a */, + 2A23509A1B4B9BA0141EB958C32816D4 /* libPods-web3swift-iOS.a */, + AC8ABBCB10448DB88C79398E3A2D4417 /* libPods-web3swift-iOS_Tests.a */, + 44157DE064955C1C2DF424094F971C2C /* libPods-web3swift-macOS.a */, + 11C198E371333D0B4E1F4A5B168C23C7 /* libPods-web3swift-macOS_Tests.a */, + 9E7C36E885EBC6AB812D67E4B28A9CE4 /* libPromiseKit.a */, + 640D7C6CD155FDD858979BF3184F5A49 /* libPromiseKit.root-CorePromise-Foundation.a */, + 0875934C7BD4393C0A91DFA3CF1FBBED /* libResult-iOS.a */, + 5AEA4495CD1CD23847803E6F2009266F /* libResult-macOS.a */, + BF7E9A738647C81A92D68BCF6E734C6B /* libscrypt-iOS.a */, + A1C101B8D6CF3BE7D5E588469BA4647B /* libscrypt-macOS.a */, + 64CF8CD6E98A2DF32A9CBCF71E6AEFAB /* libsecp256k1_swift-iOS.a */, + B43B308FB300789356930844D6B81CF8 /* libsecp256k1_swift-macOS.a */, + 2F751DF027B3EC6771E69D0DF744E2F1 /* libSipHash-iOS.a */, + AB81B5AF636ED4D537F9A819FC7EB086 /* libSipHash-macOS.a */, + 55D3724AA7B8C2CF221E72306FBDCBB5 /* libSwiftRLP-iOS.a */, + 37A42E23E411D520ADBF58299104A5E4 /* libSwiftRLP-macOS.a */, ); - name = SwiftRLP; - path = SwiftRLP; + name = Products; sourceTree = ""; }; - 361AF2F3A6AA13AA5E964E778F7E85BD /* EthereumAddress */ = { + 455CF9C0C54FD8B35634D81F5E38ED46 /* PromiseKit */ = { isa = PBXGroup; children = ( - 48BBE301C7AC93BA32B43FDCAB55FF55 /* EthereumAddress.h */, - 7CB204BDB01A5747B116731490529E2B /* EthereumAddress.swift */, - 1422C640D1B145BC997D3E0A3FF10339 /* Extensions.swift */, - A8CB084B7ACB8AC7C10C0B25D0347442 /* Support Files */, + B028E45757F11470855CBBF5A23509C8 /* CorePromise */, + C584BCF64FE7C44F77E0DC8BBCA5046B /* Foundation */, + 8D7C724EEC47F84DA9BED20E20279645 /* Support Files */, + C9D721D47F8E2604C59F3C672BD6200D /* UIKit */, ); - name = EthereumAddress; - path = EthereumAddress; + name = PromiseKit; + path = PromiseKit; sourceTree = ""; }; - 541E7AD1499C6B8095A27B0F22098CE0 /* Result */ = { + 467AC48A0B5ED526FE4CBC40660B4813 /* Support Files */ = { isa = PBXGroup; children = ( - 2D1D500C8CF88FC87FF7FA43DBC53611 /* AnyError.swift */, - 19725B1F6B394E3B97BB387C7E4E4874 /* NoError.swift */, - 1576E0C86B6BE13F5FB685E1357E71C3 /* Result.swift */, - 5116359962EA1905AC0EB7121E634D9F /* ResultProtocol.swift */, - 6CC6E9D88684D92EB1CEF51FF7B16C04 /* Support Files */, + 2C1E2451F697C193D067734C4AF47482 /* EthereumABI-iOS.modulemap */, + 522579B02AF58D183F2AC531E3F33572 /* EthereumABI-iOS.xcconfig */, + 48DE6A16D72E33E779AE2257CA5D34BC /* EthereumABI-iOS-dummy.m */, + 9C056AE54C5A5C44A47093DCBA233F46 /* EthereumABI-iOS-prefix.pch */, + 98229C7D8E3906BD4C8DCD833704588C /* EthereumABI-iOS-umbrella.h */, + CFAF7D663AA6B1D79BC3ED1927EEE23C /* EthereumABI-macOS.modulemap */, + B48543DD38BB8E1AB0953C926DBA6C3F /* EthereumABI-macOS.xcconfig */, + C742D7E4D064B53F3E8BD2061CEB4650 /* EthereumABI-macOS-dummy.m */, + 22C3F518991BE51FC595F8F3EF89345B /* EthereumABI-macOS-prefix.pch */, + BC2EE2AAFC0C186078B992C06F762E8D /* EthereumABI-macOS-umbrella.h */, ); - name = Result; - path = Result; + name = "Support Files"; + path = "../Target Support Files/EthereumABI-iOS"; sourceTree = ""; }; - 54B37D075BCFF2BF04A3CC7CB9D1C6F9 /* PromiseKit */ = { + 4952837D3F6017272786DEA472A72078 /* scrypt */ = { isa = PBXGroup; children = ( - F026F54B353351B219A0C4BE3E0C2871 /* CorePromise */, - 1C95D05EA1244C1219298719A0647D65 /* Foundation */, - 9B38CA57FC54E4DA492DC4C23904561E /* Support Files */, - D62BC46C0C93C11AECF63AC21156635E /* UIKit */, + 63FD1428729C05C5A88BE98C12254ADA /* BufferStorage.swift */, + 442D6200CC1781151499F7FAF44C0366 /* Cimpl.c */, + F106BE3FED3F7D139A061124A9FF0251 /* Cimpl.h */, + EB74063F2F7DC76E97D34EC40D093C52 /* Salsa.swift */, + 07853D5BF50E26B878B7B1D18CF18F06 /* scrypt.h */, + F1C65F271D54976AEAF5B1CB4522A471 /* Scrypt.swift */, + 3827F60DF0B6BE43D84C824208816056 /* Support Files */, ); - name = PromiseKit; - path = PromiseKit; + name = scrypt; + path = scrypt; sourceTree = ""; }; - 56BBFF8639CCDA4A35DED29BDD33D528 /* CryptoSwift */ = { + 4DECEA9BC9FC9324DD3E2337452CD61B /* EthereumAddress */ = { isa = PBXGroup; children = ( - 8354A9A75879DFCE10CDFCD8B4B76EF5 /* AEAD.swift */, - 71D09134607D15AB2D81F0CB08D3F055 /* AEADChaCha20Poly1305.swift */, - 77FB79008E5E4C52EE48B984D12A652E /* AES.swift */, - BC0E5DF49745E221D708C75FC2B03DC7 /* AES+Foundation.swift */, - C1BDC161E1A001A666E01A22455E14B5 /* AES.Cryptors.swift */, - FB290FC3F5ACF0789F4078C376E6ADED /* Array+Extension.swift */, - AB4C3483E321FFBD045AB8FDC37CF8FA /* Array+Foundation.swift */, - 736C0CC7DF9261F7C240BF88F7D310AD /* Authenticator.swift */, - 682A1BA8289C74E7B26FAAFA80540F57 /* BatchedCollection.swift */, - 86800F1D45016DC59C9BE8B9ABF5B50F /* Bit.swift */, - EFCBEFE9DA6D7F361DBB180EB84492D2 /* BlockCipher.swift */, - 0D2BE96DBE00949D2B047DC83A759B4C /* BlockDecryptor.swift */, - CC4C922D64767063B8D1A270D793373B /* BlockEncryptor.swift */, - 1F0D95EE88A2B8D781795DF20E0568F6 /* BlockMode.swift */, - 639957AA1B177687176168DC8D443490 /* BlockModeOptions.swift */, - CAC966A4293FF7689DD8A3B2877731F3 /* Blowfish.swift */, - F25882CAD0730D8C76F023B8C6FA287C /* Blowfish+Foundation.swift */, - 3ABE33C91D6B128E8B104ED3630B6ABB /* CBC.swift */, - DF4D45B809574B97A749EADBA2EFAB02 /* CBCMAC.swift */, - 14176496814CB0D56F198301D279FE65 /* CCM.swift */, - B7D5FD5536C89792D33769E9EDFA2DE8 /* CFB.swift */, - EE7F6BB14F19AC57CB96B2D06603E845 /* ChaCha20.swift */, - 441A9CACC96EB9A41D4ABF90FDFFD2C8 /* ChaCha20+Foundation.swift */, - ADC86A3FC56A1BAE1CA3490D081E47F3 /* Checksum.swift */, - 52B35D82CEB3E05DB842B7FA66505116 /* Cipher.swift */, - 81909D98916544A0C622EDB88411AE57 /* CipherModeWorker.swift */, - 6E942712A2D0087AAF697A0E031459FE /* CMAC.swift */, - C717226571D60D3C7D8E15B4EDCC2E0F /* Collection+Extension.swift */, - 4F8B31678A829B043331C94E279F1FD9 /* CompactMap.swift */, - D13D2441410EEFA35EFB1823E238648A /* Cryptor.swift */, - 3391B8242DCA2A16EB9DBB3FF0740ABC /* Cryptors.swift */, - 671394A1108646E9E210CF54FA2C814C /* CTR.swift */, - 42F14C976AD41B0817186FB67B3B349B /* Data+Extension.swift */, - 5ED58E829B835009D9DCD1D8B959FBBD /* Digest.swift */, - 8F6102F002EDC216C49666462EF952CA /* DigestType.swift */, - 98C48C6F1DCE55E9EE6040D50626EF16 /* ECB.swift */, - 95F76B715633F358CA7525D8C17738C9 /* GCM.swift */, - D286B6A0694F7E16078B8E7642CAE6FD /* Generics.swift */, - 0D0947D47B9CECD59BC73EAC48D4ED27 /* HKDF.swift */, - 7B67DD6B4751EC541A3D153113AFB1B1 /* HMAC.swift */, - FF8AF8868130C525C8921A94220CFA6D /* HMAC+Foundation.swift */, - E81CDB6F58099035E4B22900B2E0740D /* Int+Extension.swift */, - CB0B1B247B08E4A2259D6D21ABAB0304 /* MD5.swift */, - 915D7A030D48CB0FE8360421BAB29B5B /* NoPadding.swift */, - 1D8151AFF003D8A45F3E0F171019ED33 /* OFB.swift */, - FF137216E20AA1BF3FA0B1A647DB89AC /* Operators.swift */, - 23EA6F524218763DB7E76A6E13387EAC /* Padding.swift */, - 5EFE8BF6504756C13783E7D477894264 /* PBKDF1.swift */, - D9F882189D9E2CE8D7B7DC60BA0D5AF6 /* PBKDF2.swift */, - C47CE1FE3AEC19CC322E3E03530D21CD /* PCBC.swift */, - 98A9FC519C49C693637C4BC5D0DD6EB7 /* PKCS5.swift */, - CD8AF5512E4598482BBFB4AD1BBF8064 /* PKCS7.swift */, - D3E0EFDBB92A100EDE06E9D563ACF26E /* PKCS7Padding.swift */, - 95C8DD41F37C777526C9EA621C9213C9 /* Poly1305.swift */, - 906199A857C08F740EA182609488E191 /* Rabbit.swift */, - D44F8F4C5F0D588B00DF17BC6518E5E0 /* Rabbit+Foundation.swift */, - 9B7B36B7C3689A1ED9FBF4095AF74840 /* RandomBytesSequence.swift */, - FE3D7030BC429403BBE50F40445229DE /* SecureBytes.swift */, - 0EC0DBFB306B96AAE65A02CB825C4F0B /* SHA1.swift */, - 9BFCCF45D62D69A50F9ED16BCE93C54A /* SHA2.swift */, - F4BAF829379DA2971A7051C2EFAE15E8 /* SHA3.swift */, - 9F576E04543F9CA8FD11EFA190633C0F /* StreamDecryptor.swift */, - 7340338CDF774E91E0F647AB7EB91924 /* StreamEncryptor.swift */, - D292A1945503B3A000AC47BB73889903 /* String+Extension.swift */, - EA3D1883E9BD064F4B9299B5825061E7 /* String+FoundationExtension.swift */, - AFD1168E711269E444E38FCAE0B8E5D9 /* UInt128.swift */, - 20BE3E8F811475C9F3E6350A16EF3D56 /* UInt16+Extension.swift */, - D57256C33A9C97F888F53A4FB7226146 /* UInt32+Extension.swift */, - 4BD790D4294FB459BB05017C05CA1F1E /* UInt64+Extension.swift */, - 41B019A1B56440DDAB3267B96FDBD576 /* UInt8+Extension.swift */, - 7CC384B5F6C90CB968D0AB32162249B6 /* Updatable.swift */, - 49A1004ABA6FF6BBB692884F59131E13 /* Utils.swift */, - 7EFDF78EEBE9836CDC5AE2FEEC50C17B /* Utils+Foundation.swift */, - C31ABCFEE7AE67562C4CEBB66C7ED4D6 /* ZeroPadding.swift */, - A5E4D51B8435BEA960C87E86236F1E08 /* Support Files */, + C4AD5698CEACE94C1CAD1C0317E14905 /* EthereumAddress.h */, + AFAA80681A91BDC50EFC4294353BC5BA /* EthereumAddress.swift */, + 80ACF3AED1948ECBBAF9BEFFC3482423 /* Extensions.swift */, + 922AFC21F176C35CEE509B534B859943 /* Support Files */, ); - name = CryptoSwift; - path = CryptoSwift; + name = EthereumAddress; + path = EthereumAddress; sourceTree = ""; }; - 652884AA38DA09A2444762C072AAE0FE /* SipHash */ = { + 563C4EF4DEB4F8DA641EF40144826E4B /* Support Files */ = { isa = PBXGroup; children = ( - 03FE099622DA426E4CBDFEB30B374591 /* Primitive Types.swift */, - DAC89259204E1C6A18BCD0B7D08C104B /* RandomUInt64.swift */, - 28D6357617301A15F1861ECE0B2D728E /* SipHashable.swift */, - EBD8BA7DCEF1E0FF9602E3F7BE941878 /* SipHasher.swift */, - 0E22312CDA1302633680E34AA7319FE8 /* Support Files */, + A330934D98A54C2602C42AF53B6E728E /* secp256k1_swift-iOS.modulemap */, + B6A0DADFE9809AB925F51CF651528B31 /* secp256k1_swift-iOS.xcconfig */, + 9E3FCE1E29EDFA06494CDD00767685E3 /* secp256k1_swift-iOS-dummy.m */, + 5DC3FD3167A8763A6C85B62EFDA429D2 /* secp256k1_swift-iOS-prefix.pch */, + EDD86700A4552C712FAC348BB69DACD9 /* secp256k1_swift-iOS-umbrella.h */, + 9760F737EE5BDAD80F6E6DDA26EE421C /* secp256k1_swift-macOS.modulemap */, + 330B8D8B0B8ACFFDF2B9292154D71642 /* secp256k1_swift-macOS.xcconfig */, + CC444A933C805567A3F012F3CEE72D08 /* secp256k1_swift-macOS-dummy.m */, + 4B737AB9139E0187239D966FFC143FB3 /* secp256k1_swift-macOS-prefix.pch */, + D1EDEFFF233BE2D7F100C45B95D49336 /* secp256k1_swift-macOS-umbrella.h */, ); - name = SipHash; - path = SipHash; + name = "Support Files"; + path = "../Target Support Files/secp256k1_swift-iOS"; sourceTree = ""; }; - 6CC6E9D88684D92EB1CEF51FF7B16C04 /* Support Files */ = { + 667472FEE28006D1990700DD108F738A /* BigInt */ = { isa = PBXGroup; children = ( - 12838912E9C17379AEEDB5CEF54ED779 /* Result-iOS.modulemap */, - 435339C16A1550DDCDCD1B4731E89DBD /* Result-iOS.xcconfig */, - 74F90CB37B5FF688D45EE372C6FE875C /* Result-iOS-dummy.m */, - 0295AAB9A4AEF4BACC811B917B2F75DE /* Result-iOS-prefix.pch */, - C30494B6003825A7F5E0AE152495E590 /* Result-iOS-umbrella.h */, - B41DB7D6043E138E3CA32DF5B5194D9B /* Result-macOS.modulemap */, - 15206D43EDA63AD479C638B175342338 /* Result-macOS.xcconfig */, - 28AB30A05C0D17ABF7D0DBC475F93C23 /* Result-macOS-dummy.m */, - 42F561AD37AE0579CA9921A14A3A0943 /* Result-macOS-prefix.pch */, - 67F6E91C8B57C5F8E945603C7F3DB0F2 /* Result-macOS-umbrella.h */, + 03C5B3B2079547713108CA0A75C2D683 /* Addition.swift */, + 1782185CE59A4E4F74A5C0258C3B5F61 /* BigInt.swift */, + C2AB0FA3FFAC3EBB0D9CACE786196AC1 /* BigUInt.swift */, + 2631D55D12027D3935D7B85C6A624F09 /* Bitwise Ops.swift */, + 85342594A31BFFC584D4660A9041CF48 /* Codable.swift */, + 6DE5DD5643C155A18A460273094ACDA1 /* Comparable.swift */, + 1B8BA477868467E169FF27E9193A10DA /* Data Conversion.swift */, + EDB10140BE59AEE481C7E08EDC79971D /* Division.swift */, + 4289C87C5EC42792CDDDCFC5592AADF7 /* Exponentiation.swift */, + 0930D7CD22CBEC2C752C14A123807624 /* Floating Point Conversion.swift */, + EB02248C062005D2F2620C9F81EC5ED4 /* GCD.swift */, + EA975F09047F404D3183C92FCA1AD829 /* Hashable.swift */, + EA46482A8E14BD7641E6F29ED4F0A6B4 /* Integer Conversion.swift */, + 2A57E22BE5970C0F858EB10A32A3019D /* Multiplication.swift */, + 0A85805FE098BD65AFD79ABDC5A9DDF7 /* Prime Test.swift */, + C04C575F1277CF14F506F691F9C669FC /* Random.swift */, + 6F4B350BCCE6D995C937B1D56E4F9022 /* Shifts.swift */, + 93EB1CF4FDC03241B81C3C3B6F58B9E0 /* Square Root.swift */, + 34A205CA261F59DB1AC7C1BE4E2ABE19 /* Strideable.swift */, + 68D5DF1B1384D6392013199F71BACD06 /* String Conversion.swift */, + D9B1DC98FA2ABF0645707ED4C6FF5D77 /* Subtraction.swift */, + 2D6E2E2ED41464CEB00832B492D67ECB /* Words and Bits.swift */, + E36023E8575313B31CF8B6B497F4FFBA /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/Result-iOS"; + name = BigInt; + path = BigInt; sourceTree = ""; }; 6FE5839A998F9D581E5060F0675BF53C /* Pods-web3swift-macOS */ = { @@ -1460,123 +1540,159 @@ path = "Target Support Files/Pods-web3swift-macOS"; sourceTree = ""; }; - 717DC5E859A757E25C926AA3C8443397 /* Support Files */ = { + 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( - C05A424003F07748E6FAD6C9A57EEC23 /* BigInt-iOS.modulemap */, - A2A0CFEEC4EEE7DD9F58B6A45DE63C89 /* BigInt-iOS.xcconfig */, - A516C73CD574B0D6BA84C38BB55FBD2D /* BigInt-iOS-dummy.m */, - 907E15C94AE5E8DC2C60CE2BFA69AB19 /* BigInt-iOS-prefix.pch */, - B90CC3B80037E1B917D44513A07D0F6C /* BigInt-iOS-umbrella.h */, - B42A16A3F62043A99FFE8BDB6DB55ACB /* BigInt-macOS.modulemap */, - 8823C42C614B0067E2C89A5AE71DA77D /* BigInt-macOS.xcconfig */, - 234968A9A443A0E2CC4FBFBADB4CC6AB /* BigInt-macOS-dummy.m */, - 6007139C44683BCB89A01696BBBD497F /* BigInt-macOS-prefix.pch */, - B2300EAF13A4BCCC04BBD2896E58716D /* BigInt-macOS-umbrella.h */, + B36AB396275697EEE1A5B13BA8A38FE3 /* Podfile */, + 0F8D2E47FE03D3B91B51069F7C273AF4 /* Frameworks */, + B385790646FED40DF16835CC304DB065 /* Pods */, + 3EC5D1EA5568F6BB631C6A9AD5B40F86 /* Products */, + 0016905C45F8F01C6D080425028330F0 /* Targets Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/BigInt-iOS"; sourceTree = ""; }; - 7DB346D0F39D3F0E887471402A8071AB = { + 8278DAD857B26B2BCCF14D6CB39B7481 /* EthereumABI */ = { isa = PBXGroup; children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 0F8D2E47FE03D3B91B51069F7C273AF4 /* Frameworks */, - 1AC78478C51907110096C348221D88EC /* Pods */, - BC988C585F01918CDC758DA84387BAF3 /* Products */, - 0016905C45F8F01C6D080425028330F0 /* Targets Support Files */, - ); + 21FCC5A27F315ACD9DBDF025F826D31F /* ABI.swift */, + E7A2D1D0062F350907B747E2A192E438 /* ABIDecoding.swift */, + B2B4899E422658B96ADF84B5239C418D /* ABIElements.swift */, + 6314619E8FCD5D07FBD2BA0BA5C58C15 /* ABIEncoding.swift */, + 6E4AA08906784FF9AA2B198938456276 /* ABIExtensions.swift */, + 6EC6627D0179A3BE1D7BB58F2DBF51E7 /* ABIParameterTypes.swift */, + D9B3D040637E19F37C0D7EB3C1A6A991 /* ABIParsing.swift */, + C4F1681CFA49EA17D6A73339A9C1A44A /* ABITypeParser.swift */, + 6F068DD5C61D68DFAF437EAAC56F1139 /* EthereumABI.h */, + 467AC48A0B5ED526FE4CBC40660B4813 /* Support Files */, + ); + name = EthereumABI; + path = EthereumABI; sourceTree = ""; }; - 9B38CA57FC54E4DA492DC4C23904561E /* Support Files */ = { + 8B205D5F3CE3499689DA8259838002E7 /* secp256k1_swift */ = { isa = PBXGroup; children = ( - 049ABCA847872C85F1B4A543A069DB7F /* PromiseKit.modulemap */, - 453B783DD499D624880A972C2DC8C94A /* PromiseKit.xcconfig */, - FF1BE57EBE989B2B7EDD166127B5FCD9 /* PromiseKit-dummy.m */, - 02516902C16D7E925BA5D0CD9531308D /* PromiseKit-prefix.pch */, - 52059A76F9DA89149396ABB84A8A5780 /* PromiseKit-umbrella.h */, - CA8015AE976B6601CC46035D043423E4 /* PromiseKit.root-CorePromise-Foundation.modulemap */, - E8554570D5B7F10CEE0823FEB5B80B8D /* PromiseKit.root-CorePromise-Foundation.xcconfig */, - 08CA1065DA6D886DAD8978D531C6C531 /* PromiseKit.root-CorePromise-Foundation-dummy.m */, - 86B372DE536C71560B5E85E340F3F6C9 /* PromiseKit.root-CorePromise-Foundation-prefix.pch */, - FA1C0BFC1A022B5AD3BDFC8920FCFD74 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */, + 1592E519056BA4CA85F67406D0EC2ED4 /* basic-config.h */, + 6E13ACAF5A7893C3C300B8B880422662 /* ecdsa.h */, + 1C43D53E5A934E216CB1B7DD01DE877B /* ecdsa_impl.h */, + 6E3077E6B0E7210AC2CB18E0691714F0 /* eckey.h */, + E05424B44F6AFD35E237815F926FEEEB /* eckey_impl.h */, + 3C93F4B7E331943729BE3CFC4F439C2A /* ecmult.h */, + 05D37539C41BE79893FEDECCB70FC25B /* ecmult_const.h */, + 052A5D977253AD46619C79759D031E6B /* ecmult_const_impl.h */, + 6D010E670FE8C5A9AAC9A8464ED42B3A /* ecmult_gen.h */, + B9A05629BB0205300B694B527AD16E56 /* ecmult_gen_impl.h */, + FA4C0B3D9EC3E926E106CA2DE8CDEAF9 /* ecmult_impl.h */, + F3BCAAFEDF865BD7F6D1C36246EEE02A /* field.h */, + 0DCAB923DFB091E9F4A71F5FD29FEB40 /* field_10x26.h */, + F7ED977AF2E31DEA78D850BDE6C9F601 /* field_10x26_impl.h */, + 2C5F41A51FDAEBAF8F849026A9B09E2A /* field_5x52.h */, + D4C96A2C2C3B9F8977AD08B6FBEDE552 /* field_5x52_asm_impl.h */, + ADB4E2DA064200DDCD42C634CBC39977 /* field_5x52_impl.h */, + 9FB6255E4560252B9DC0BE760F34C261 /* field_5x52_int128_impl.h */, + 5300C71B6A3AB50A1D7ED70A41FAAD6B /* field_impl.h */, + F6575BB4E0B2AD0E5B88C62A5EDA6FCB /* group.h */, + 49F74127A936A7C34D38E84140D1EFAC /* group_impl.h */, + EA5B0A3B538B56303C1A061E2514BF07 /* hash.h */, + A1687163A14D55D2EF896A97CD937491 /* hash_impl.h */, + 4624EFF8C97C1CBAF2910297112CF9E8 /* lax_der_parsing.c */, + 58FEC74B279A9D31ADE339DE27E86FA9 /* lax_der_parsing.h */, + 60243E0B2E1CDFC9B6DF789487982447 /* lax_der_privatekey_parsing.c */, + 15BED946B8A96EDBF82439D38353B748 /* lax_der_privatekey_parsing.h */, + 12EC94EA370709920BAE52B23A048E1A /* libsecp256k1-config.h */, + A3B7939D27D85A4C92DE2CD6D6C8E4EB /* main_impl.h */, + 8AA60D2034DC22F7C907855DDB5ADAD9 /* main_impl.h */, + 6D1B636300E29159DFA920C5BA2E5F7C /* num.h */, + 76F047FAB60C9A09C857EC109DAC9FC4 /* num_gmp.h */, + A69680CF78C97C6DA250B325FFD04251 /* num_gmp_impl.h */, + 982E6E4B839762B67F92588D34990052 /* num_impl.h */, + 2716312EADA930757B04015685EFD479 /* scalar.h */, + E1999CB16AEF90FFCC762EC5BA3C538B /* scalar_4x64.h */, + 86CE3A28090BEEF1B09E865F4962D871 /* scalar_4x64_impl.h */, + E9FDE304B6122EEAE8A1FC91742A69E6 /* scalar_8x32.h */, + 81ECE7FE7C889AF9F1B739830D9A59B0 /* scalar_8x32_impl.h */, + FA4D3EFB3ECDE366218A9D0848F3C58B /* scalar_impl.h */, + ABA2CC618DEF4A5E27ADED64FC6F96A5 /* scalar_low.h */, + A051E774D4D49F8D0B94D9E529E3A524 /* scalar_low_impl.h */, + 449887D7F7932CFAA2B3FAE0BEE1594B /* scratch.h */, + 5E9C2CC8E90A38FD011723EB814A5A52 /* scratch_impl.h */, + AD85FC46DA6BEAA980010B0C5F2BEED3 /* secp256k1.c */, + D318DFC773B02CFC92B543471C937BA7 /* secp256k1.h */, + 4D5996479C4CB892D1B062406C8C08F6 /* secp256k1.swift */, + 516F61020B364118837B9099CD918F5F /* secp256k1_ecdh.h */, + B88C2E2D4B6E99B918E6E13EDA4AA4A0 /* secp256k1_recovery.h */, + 003EF4269A56F0C44E64E737009329A6 /* util.h */, + 563C4EF4DEB4F8DA641EF40144826E4B /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/PromiseKit"; + name = secp256k1_swift; + path = secp256k1_swift; sourceTree = ""; }; - 9F433791C3C200F7BC10E40694405F12 /* Support Files */ = { + 8D7C724EEC47F84DA9BED20E20279645 /* Support Files */ = { isa = PBXGroup; children = ( - 5CAF8471B488702419FE2C532D4D11EA /* secp256k1_swift-iOS.modulemap */, - 1412597E34EB8268006B0BCFF20BB89A /* secp256k1_swift-iOS.xcconfig */, - F9D80D5C595654C7E23670359CB76D99 /* secp256k1_swift-iOS-dummy.m */, - E26835835263C5B5310353A54E6AA37E /* secp256k1_swift-iOS-prefix.pch */, - D08241C8DB918E40A54A24828275D1C5 /* secp256k1_swift-iOS-umbrella.h */, - EA5498F48A9D57F5578FB70B8544C14C /* secp256k1_swift-macOS.modulemap */, - 8CC8A14105420D222F37BBB95BFBF1A3 /* secp256k1_swift-macOS.xcconfig */, - FB320DD9FD83A5F3BAADF33818736C30 /* secp256k1_swift-macOS-dummy.m */, - C06A130503E666429FAF2F0101641EE7 /* secp256k1_swift-macOS-prefix.pch */, - 1BBCD0009252A5C66FFA6A2EDAE25173 /* secp256k1_swift-macOS-umbrella.h */, + 3DBE2043CF545B45F21A7018D7A70CBD /* PromiseKit.modulemap */, + 3F1CF8D01D9020575F785235F3DA02E3 /* PromiseKit.xcconfig */, + 48BA6005A2D0AC9C0B7C4A47958A6F80 /* PromiseKit-dummy.m */, + 0A518C6FBE9C3B3FBF40D4CDCE3BA5A7 /* PromiseKit-prefix.pch */, + 04464806E7EED788DFE4F8D62793DD29 /* PromiseKit-umbrella.h */, + 8600E5A6A0625E96185A2CB9DE5C8AF8 /* PromiseKit.root-CorePromise-Foundation.modulemap */, + 4AA4C4E3B71B38DD9AC53FDE78CAE9EA /* PromiseKit.root-CorePromise-Foundation.xcconfig */, + 452B760316F8326FC21782A105163581 /* PromiseKit.root-CorePromise-Foundation-dummy.m */, + A66575F75BF4F824ED46DE58E80DBCF7 /* PromiseKit.root-CorePromise-Foundation-prefix.pch */, + DA0CDB938B1F875D679C20362C887E17 /* PromiseKit.root-CorePromise-Foundation-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/secp256k1_swift-iOS"; + path = "../Target Support Files/PromiseKit"; sourceTree = ""; }; - A33DC2AD3BADDA5A006F792ED154E7A5 /* Support Files */ = { + 90EB5AB3714019B65122FF61FCF31803 /* Result */ = { isa = PBXGroup; children = ( - B5874904C32DED94E05CFD33023E2A19 /* SwiftRLP-iOS.modulemap */, - E34EBA5D815562B6AEF202EEF42D4456 /* SwiftRLP-iOS.xcconfig */, - D4294CA40AB575970217A19CAA320DC0 /* SwiftRLP-iOS-dummy.m */, - EBF499BFE8AA65F3D4DF5B33BA57DC88 /* SwiftRLP-iOS-prefix.pch */, - F03C5346C1BA44E2325916DC9CE7B67B /* SwiftRLP-iOS-umbrella.h */, - 83818CBF92E26919EE29AD92612A44AF /* SwiftRLP-macOS.modulemap */, - 3D2AD51705C652FD9094CEDC59DFB4FC /* SwiftRLP-macOS.xcconfig */, - 41F99637E28F2B9DC1A86CD6B490CE52 /* SwiftRLP-macOS-dummy.m */, - 750CBC755AD04183E9D574E073F02223 /* SwiftRLP-macOS-prefix.pch */, - 5447D2654ABD868EB73A2BF12AD74DE8 /* SwiftRLP-macOS-umbrella.h */, + 3F90DB66AA0BD6E09A8253873368008F /* AnyError.swift */, + F20EF6148A6A9322390DD71721B5343D /* NoError.swift */, + 874DB4C8A2FF4D5197C42063F7939C9A /* Result.swift */, + 85CA122AC057DBDA1FC65BCB8FC33684 /* ResultProtocol.swift */, + 0BFEFDA3C060A520AC31181B2B963F58 /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/SwiftRLP-iOS"; + name = Result; + path = Result; sourceTree = ""; }; - A5E4D51B8435BEA960C87E86236F1E08 /* Support Files */ = { + 922AFC21F176C35CEE509B534B859943 /* Support Files */ = { isa = PBXGroup; children = ( - 82E0889BDE7E61BD4767DCF66AB18FF7 /* CryptoSwift-iOS.modulemap */, - B6112FCF75FBFC58E314A40652665F06 /* CryptoSwift-iOS.xcconfig */, - 09536C3B22879E31B5C0B3426E2FEBCA /* CryptoSwift-iOS-dummy.m */, - 09601767E682E0D86F15EF42B2DCAD46 /* CryptoSwift-iOS-prefix.pch */, - F310D1B89DD81708BBBAED0DDF1B1168 /* CryptoSwift-iOS-umbrella.h */, - 9E8B25F37CB474A2BE03252DDC5BA0BE /* CryptoSwift-macOS.modulemap */, - E79185DFEB64004C5523F725F3DC89B0 /* CryptoSwift-macOS.xcconfig */, - D8D1F94E4F2A45EC9F2154127E14D416 /* CryptoSwift-macOS-dummy.m */, - 39A04A76F1A947E73DA6CC6FE271B82D /* CryptoSwift-macOS-prefix.pch */, - 26BEF092AF19B017CCEAC5BD6EDFADBC /* CryptoSwift-macOS-umbrella.h */, + D357F7F273D21A9292686CC024C470A2 /* EthereumAddress-iOS.modulemap */, + C0E00E27FCA499ADCF69CE2096BEF87F /* EthereumAddress-iOS.xcconfig */, + 38C29EC87775E098CCEE6CEB4ABA65AA /* EthereumAddress-iOS-dummy.m */, + AB8B8D38C22598577C2C6551CEC1D7D0 /* EthereumAddress-iOS-prefix.pch */, + 76C5F543BD9B25774CA35CF7FA0546B3 /* EthereumAddress-iOS-umbrella.h */, + 21BC35B1C593381A32229DF8C9804F62 /* EthereumAddress-macOS.modulemap */, + 82CF9E45F65C5A3FF604607C66EAC29D /* EthereumAddress-macOS.xcconfig */, + B4F5205894DF6FD73EF8CFA7609DA7D9 /* EthereumAddress-macOS-dummy.m */, + 6EABC2B68783D8B14904AB78123DF869 /* EthereumAddress-macOS-prefix.pch */, + 59AB171D72BF347C5F7A067C2AAB5384 /* EthereumAddress-macOS-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/CryptoSwift-iOS"; + path = "../Target Support Files/EthereumAddress-iOS"; sourceTree = ""; }; - A8CB084B7ACB8AC7C10C0B25D0347442 /* Support Files */ = { + 9F0ACAD8B1C23047839392A42456AF61 /* Support Files */ = { isa = PBXGroup; children = ( - A7C42C91EB3AFB8674EB313560E4D9A8 /* EthereumAddress-iOS.modulemap */, - AD76DBA7730870FE66D77B1FC33E49E0 /* EthereumAddress-iOS.xcconfig */, - 23299E01AF2849576AF87D2A3EB8D494 /* EthereumAddress-iOS-dummy.m */, - 28F6D61D90FB438C4CB2856FA258E35B /* EthereumAddress-iOS-prefix.pch */, - 4A2766B8B12BFE63523151BC3F80CDF4 /* EthereumAddress-iOS-umbrella.h */, - 5C3CED0A47AF7E341A3EBD1849B12F6F /* EthereumAddress-macOS.modulemap */, - AA1E87AB6BC235D2BF0B5287F5ADD105 /* EthereumAddress-macOS.xcconfig */, - 4BF61EAD9C9EC96163CECACFBF3504C3 /* EthereumAddress-macOS-dummy.m */, - 121546801BC1F73B1E78D3BA38876A8C /* EthereumAddress-macOS-prefix.pch */, - 0A734506E75FE208AFB8DA726262FFEC /* EthereumAddress-macOS-umbrella.h */, + 55D66ED5651595B335B313C540A13D8E /* SwiftRLP-iOS.modulemap */, + 9D6306B3BC57BAEB50815C5FBBFC8CB4 /* SwiftRLP-iOS.xcconfig */, + 73A68F048F801AD8527F07F7706E57CE /* SwiftRLP-iOS-dummy.m */, + E4D925299799CBB413016810B41EB65C /* SwiftRLP-iOS-prefix.pch */, + 1250F72B02037FC0CC2220F528B17381 /* SwiftRLP-iOS-umbrella.h */, + 0E7AC8F7B30BB74533D51C9515BE9258 /* SwiftRLP-macOS.modulemap */, + EF8327584F2BDEC27C9163F51CDEFB9E /* SwiftRLP-macOS.xcconfig */, + ED9E675BBBC75B01E6961483170B6E7F /* SwiftRLP-macOS-dummy.m */, + B9D41263F9CA47F4367384A4B93B0DDA /* SwiftRLP-macOS-prefix.pch */, + 3E1A2664214C7FF4C93A67058FDACDE9 /* SwiftRLP-macOS-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/EthereumAddress-iOS"; + path = "../Target Support Files/SwiftRLP-iOS"; sourceTree = ""; }; AAB417525B4AA28CC55EECA7CFDAB251 /* Pods-web3swift-iOS */ = { @@ -1594,240 +1710,267 @@ path = "Target Support Files/Pods-web3swift-iOS"; sourceTree = ""; }; - BC988C585F01918CDC758DA84387BAF3 /* Products */ = { + AEAD5D9B473E4A71E8CFAE0F15721DB9 /* Support Files */ = { isa = PBXGroup; children = ( - AC8ED311289866CD8ED870EF0C3C5CF3 /* libBigInt-iOS.a */, - EF13999388904A7883CEA9B745018AAF /* libBigInt-macOS.a */, - A8865640371B98CE908E1A9A63C4B984 /* libCryptoSwift-iOS.a */, - 4D5B77EB47B2435BCBF83C39D0D576F5 /* libCryptoSwift-macOS.a */, - 97504B2FA23741AEEDD649E58BF39870 /* libEthereumAddress-iOS.a */, - 53C768170DFB632A3ADBD2A703116B8E /* libEthereumAddress-macOS.a */, - D275AC61F658F73CFA8823434BCA3406 /* libPods-web3swift-iOS.a */, - FF66C3EFCA475A91734C76A5D546BE1A /* libPods-web3swift-iOS_Tests.a */, - 1DF1726C7221A0B7805EF3E180CE8007 /* libPods-web3swift-macOS.a */, - 7573EC5C506627456A38A22DC6C134BA /* libPods-web3swift-macOS_Tests.a */, - 10E2FD109C104BBFF96C8BEAE5D93A6E /* libPromiseKit.a */, - A09088A41F90C0893A27DEF1C26D11AB /* libPromiseKit.root-CorePromise-Foundation.a */, - 666BE65938A502C928B35D6EB5CA9FDA /* libResult-iOS.a */, - 75DE42DDF2D327BA352CD0F8C0DA4B0F /* libResult-macOS.a */, - 17F353B4B162974207D9F48A62765D99 /* libscrypt-iOS.a */, - F4F0BCD366AE2D51D6C35C2192996DBD /* libscrypt-macOS.a */, - 20D278014F2D90DDD7C703E49B6727B7 /* libsecp256k1_swift-iOS.a */, - 4C332617281C7BEB03040C92EF610543 /* libsecp256k1_swift-macOS.a */, - F99CCF5FD903883FB3C524CA2FB43E2C /* libSipHash-iOS.a */, - 58D4D38A480BA09A08C8523AF72783C5 /* libSipHash-macOS.a */, - FDADCB9A8CD9274EA3AC09BE3B7E0F66 /* libSwiftRLP-iOS.a */, - 6A0F097AEAD44F8F983B8D4F884FDE42 /* libSwiftRLP-macOS.a */, + 398E3F38AA4E4F1F69F6BFA75A49E0C1 /* SipHash-iOS.modulemap */, + 92CB38F782D33EF495F861851E047FA9 /* SipHash-iOS.xcconfig */, + 20C577019086BC2EE2D24C2E5BF910AF /* SipHash-iOS-dummy.m */, + 01B9E8C5A331C30CF0ACEF7187948418 /* SipHash-iOS-prefix.pch */, + 48FCAFD34D22FB4A18FEF12007E2FAB3 /* SipHash-iOS-umbrella.h */, + 9B0A389595178AEDBFBB0B44514CEBD3 /* SipHash-macOS.modulemap */, + 5992F89681D6639D6E83FBDCE269A688 /* SipHash-macOS.xcconfig */, + BF0D275DC3AF207D0A444A28CB773AA5 /* SipHash-macOS-dummy.m */, + B581065FDD5347ECD262D51E19274EB6 /* SipHash-macOS-prefix.pch */, + A44AEA30AD48DB0294CA791DF2D0996B /* SipHash-macOS-umbrella.h */, ); - name = Products; + name = "Support Files"; + path = "../Target Support Files/SipHash-iOS"; sourceTree = ""; }; - C983EA1AC8F89B7B13410C24C8F9C35D /* Support Files */ = { + B028E45757F11470855CBBF5A23509C8 /* CorePromise */ = { isa = PBXGroup; children = ( - 8ED7C1CFBF67F4C0CD5645DF35F608F7 /* scrypt-iOS.modulemap */, - 0DE0997E93980E728205BE4BF37B5FBC /* scrypt-iOS.xcconfig */, - F0866AEDD788E4D8B51A31A2FB8C294F /* scrypt-iOS-dummy.m */, - 656AF5A70C93A14D7EF9E1E97A73DA9F /* scrypt-iOS-prefix.pch */, - F84F141F7B6CD4974D2BDD888FE19496 /* scrypt-iOS-umbrella.h */, - A0CE29B48517362C21FF1B3F9DCB7619 /* scrypt-macOS.modulemap */, - 80E74674EB94CDFBB8B77B11BACD6046 /* scrypt-macOS.xcconfig */, - 51FC3239F6613D1D7AE1AAD0F3204A0F /* scrypt-macOS-dummy.m */, - C4D487F201A77E03F9ADC03703A1A897 /* scrypt-macOS-prefix.pch */, - F60B61CB7F6EF778CD12A3622F779434 /* scrypt-macOS-umbrella.h */, + 7FB5F00D821CDC9BDA7F7709F07DD0F3 /* after.m */, + DE9BBD4AE4B529B25E9E4FE7C8493181 /* after.swift */, + 9BF71F803FD375964F60D0271834711E /* AnyPromise.h */, + DF72EE1FD04A0B49CB495E9980F6B8A9 /* AnyPromise.m */, + 71C4ACD478692712EEF2FF8BB7F4A160 /* AnyPromise.swift */, + BBE693F0F5E15CCA4AE9D51B9A369B70 /* Box.swift */, + 96C4685C831E862AD0F75DC78A3A5B61 /* Catchable.swift */, + 70E24C26EF4EF9C8244E7F94F175FD51 /* Configuration.swift */, + F0EE85F786503354B347C059417EBAD2 /* CustomStringConvertible.swift */, + C9A9A0105BAE9E5BEE9ADD4B17A58DD8 /* Deprecations.swift */, + 247DF1F9FE8902AA1A74867E7854662F /* dispatch_promise.m */, + 81392F0749049A8C999337DDA716A157 /* Error.swift */, + 6FE7344E86789EA2ACF6B000EE6E0275 /* firstly.swift */, + F7E0FE543A2A814147E52BD4424892FD /* fwd.h */, + 9EFC88D3858F1B2D4952BAA697C360D3 /* Guarantee.swift */, + DD5583797A4DF2B5636D036CDD472CD0 /* hang.m */, + 79B85C952F225CDFB5B272237402E77E /* hang.swift */, + C4D8573A6F8E2A67DD73406C5B3ECBB5 /* join.m */, + B621DCE8D325B673C6F300B7C2CD478B /* Promise.swift */, + 3EB87A244E5248ADD8D124225B21323F /* PromiseKit.h */, + 20F31FF3FC3A98D10214EF6C7199FCB5 /* race.m */, + C799FC61BB50110B0EF9812635A7CF8F /* race.swift */, + F265D345562C600DE93E2D4EA31ED76D /* Resolver.swift */, + 582D7324492EFDB22783F0B7B2FA6859 /* Thenable.swift */, + 8E0D3EDB8E94AA59C54E4808C60A2744 /* when.m */, + 1E4426237EBEE47CAC169D6291F77423 /* when.swift */, ); - name = "Support Files"; - path = "../Target Support Files/scrypt-iOS"; + name = CorePromise; + sourceTree = ""; + }; + B385790646FED40DF16835CC304DB065 /* Pods */ = { + isa = PBXGroup; + children = ( + 667472FEE28006D1990700DD108F738A /* BigInt */, + E615489C131A7CB2245346A21FB09B1A /* CryptoSwift */, + 8278DAD857B26B2BCCF14D6CB39B7481 /* EthereumABI */, + 4DECEA9BC9FC9324DD3E2337452CD61B /* EthereumAddress */, + 455CF9C0C54FD8B35634D81F5E38ED46 /* PromiseKit */, + 90EB5AB3714019B65122FF61FCF31803 /* Result */, + 4952837D3F6017272786DEA472A72078 /* scrypt */, + 8B205D5F3CE3499689DA8259838002E7 /* secp256k1_swift */, + 34FAF2B4032D60B58F23F807B4871923 /* SipHash */, + 04D344FA994D64D74F3957A5E07D7003 /* SwiftRLP */, + ); + name = Pods; + sourceTree = ""; + }; + C584BCF64FE7C44F77E0DC8BBCA5046B /* Foundation */ = { + isa = PBXGroup; + children = ( + 75D8491537B933BEB0BB26FA5415C295 /* afterlife.swift */, + D895276EEA2D99E4EBF5B7FE4596872B /* NSNotificationCenter+AnyPromise.h */, + 59463535BD4D6DAD08D36EAF4421D11D /* NSNotificationCenter+AnyPromise.m */, + CF31935E8E71BE039924EA648A315B8D /* NSNotificationCenter+Promise.swift */, + 8E664638E84199C40F931B3593272F8D /* NSObject+Promise.swift */, + DAB40084682C161CD573420C8CCBFD4F /* NSTask+AnyPromise.h */, + 4FFFD5E940B31BAEC3CCFD05B093B6F8 /* NSTask+AnyPromise.m */, + F269536FCE8F92893C1DF08F94904EBD /* NSURLSession+AnyPromise.h */, + B2AE7121F5348D2FDCD4FD763A42FB0C /* NSURLSession+AnyPromise.m */, + 49C5823B0C264F4AC2DF38C68F097FEA /* NSURLSession+Promise.swift */, + 948894E3D7054F9BEAA31B5D6061F696 /* PMKFoundation.h */, + 8C42ABDF3D43E8CFBE45DFA6DF97E084 /* Process+Promise.swift */, + ); + name = Foundation; sourceTree = ""; }; - D62BC46C0C93C11AECF63AC21156635E /* UIKit */ = { + C9D721D47F8E2604C59F3C672BD6200D /* UIKit */ = { isa = PBXGroup; children = ( - 614D3F652018D0D4BB869BAEEC3BFA5D /* PMKUIKit.h */, - 632F66F6756738B3DBCD9FE0F29FD51D /* UIView+AnyPromise.h */, - AFD5882A04E0E27679FE6AAC8D9CA935 /* UIView+AnyPromise.m */, - E90C5426B3E9CBBCF9A8B6731836D354 /* UIView+Promise.swift */, - 8787D00BE428B5C383E25BF2ABB38CC4 /* UIViewController+AnyPromise.h */, - 506B39E37C9D076FA278322A078D548D /* UIViewController+AnyPromise.m */, - 2D4F789F0354155D07BB3A1463344281 /* UIViewPropertyAnimator+Promise.swift */, + 92641023C5257B4110F73449FAC652E7 /* PMKUIKit.h */, + 8E3F5E519E5ED0A4BAF423C7DBB12042 /* UIView+AnyPromise.h */, + EE9322C93C8E91E65E7CE9C01CB02F70 /* UIView+AnyPromise.m */, + 3F4EAABE2F37A5C4CBF734D74EA94EBB /* UIView+Promise.swift */, + E94EF5B041036E702BC404B7118A8F9E /* UIViewController+AnyPromise.h */, + 05CC03039B7AACA3DE3D601125B19CC6 /* UIViewController+AnyPromise.m */, + C279D46376D66FBA43CD88224B12208B /* UIViewPropertyAnimator+Promise.swift */, ); name = UIKit; sourceTree = ""; }; - D744BED64DE3B64CE5A12B74A22D228D /* BigInt */ = { + D7921E3D8BD461440A67CF8BAEB281B9 /* Support Files */ = { isa = PBXGroup; children = ( - 3487EA794F9422FD28689C37156DD9FE /* Addition.swift */, - 8AF5980AB239F34C8CB958F30A518A0B /* BigInt.swift */, - 6633CE6E0F4DA082E8A3374A723A4844 /* BigUInt.swift */, - D1FC3BBD92A37B6D1B9844791FDD7F86 /* Bitwise Ops.swift */, - 8EA80C3235171417958F658E327CCF8E /* Codable.swift */, - 809F44457475B204EE242D251FDF9E8E /* Comparable.swift */, - 755E0B91B0984ADEF77E48E32C147276 /* Data Conversion.swift */, - 1A86CAF979F3E970071A5FC47D9D7EAC /* Division.swift */, - 89B539CEC7927EBE7BBF7262580A0E18 /* Exponentiation.swift */, - 9D5F98CA61161B592980B259143F48F5 /* Floating Point Conversion.swift */, - CB4E43C9EB1F78AD84B2314039898608 /* GCD.swift */, - BD14A2D2C9467CDF73E9EC39F2B97E62 /* Hashable.swift */, - 78AC661E237EC28BD38872134D7F7E2B /* Integer Conversion.swift */, - 58F3E29F9DFEE63DA2847094AA590666 /* Multiplication.swift */, - F218E50D513522160983106C90B34FBE /* Prime Test.swift */, - 9787E8C8BA8DAE16D659DA569EECED22 /* Random.swift */, - 7953EE95375573E978E0FAC7F88260CF /* Shifts.swift */, - 491E82F8B7D6BC0F752EEA10F629435A /* Square Root.swift */, - F32BA5AE4C0BE79090A24F00A3F35AFF /* Strideable.swift */, - 682CE9677672C1F944AA2896D3BD36FF /* String Conversion.swift */, - 5DFE72A11A0AF97FFCEBDF19EC395F74 /* Subtraction.swift */, - 73043D2C83B1F1E5EC8F0E15C2CFE5A5 /* Words and Bits.swift */, - 717DC5E859A757E25C926AA3C8443397 /* Support Files */, + 6351DFCD3C033CA154E8C9D3D8D38EFE /* CryptoSwift-iOS.modulemap */, + 89525730C7E22C66FB7ADAB11E2073A0 /* CryptoSwift-iOS.xcconfig */, + 6907C77858F6612BF4232E34D8D30C3F /* CryptoSwift-iOS-dummy.m */, + 1341B693AC58D9D488B5E6F8B568097B /* CryptoSwift-iOS-prefix.pch */, + 303781526174E2DFA273950F9C1AEDBC /* CryptoSwift-iOS-umbrella.h */, + 7579B6CD74CBC80D0509F34F78A83B1D /* CryptoSwift-macOS.modulemap */, + 7C70A16BA860E5B4A9A806F25EE3F472 /* CryptoSwift-macOS.xcconfig */, + 3B9103BCEE6F57F21DC2CDA536BA8D0F /* CryptoSwift-macOS-dummy.m */, + 64748EC305E00E02356EB0F312458ADE /* CryptoSwift-macOS-prefix.pch */, + D8EC3860FD1A1DA54C00A1498D1F1D9E /* CryptoSwift-macOS-umbrella.h */, ); - name = BigInt; - path = BigInt; + name = "Support Files"; + path = "../Target Support Files/CryptoSwift-iOS"; sourceTree = ""; }; - F026F54B353351B219A0C4BE3E0C2871 /* CorePromise */ = { + E36023E8575313B31CF8B6B497F4FFBA /* Support Files */ = { isa = PBXGroup; children = ( - 5297103B37D2E5083D67ABE2C60CA382 /* after.m */, - E022DA9B1DCAC9A88B18D90457826545 /* after.swift */, - 2BE63C0E40FA294F6C512967711E56D9 /* AnyPromise.h */, - 635C328C2CAB4B34DEF69D8CFABA3AC1 /* AnyPromise.m */, - 7695A9A41BFEEAD40C0235B913A07672 /* AnyPromise.swift */, - 3D6CFCC98052B542B8BD8050E0204993 /* Box.swift */, - FF94FCFAAA2F4216A2F89F43E2CDA4DA /* Catchable.swift */, - 01271B2BB62FE2D72466A630AC9D1BE8 /* Configuration.swift */, - 0EA0E0A67D5738512E4618E1AEDA5E3E /* CustomStringConvertible.swift */, - ED4A3438C4739D717703BAE1F7020595 /* Deprecations.swift */, - 8C3F64F8D233B557ADBCBAB5F8D81F1E /* dispatch_promise.m */, - CEA9421290E9294FEA25D9F6D3DDD24C /* Error.swift */, - 0C57A83FBD44C769166BCCC5CD45BD3F /* firstly.swift */, - 40ABB4750B401A88B273D3B180C1FEC9 /* fwd.h */, - 0B152212D05CB08C4E0B61D8CDFF12C9 /* Guarantee.swift */, - FD3D00DC2D85B010C2EB60CA78D22508 /* hang.m */, - 145A69383BF153D7728F4793AB68C3C4 /* hang.swift */, - D7009940ED0BFC1AA385433559754C27 /* join.m */, - 68CD2728F142362B577571D597A953D0 /* Promise.swift */, - 0E67F7B0700CACBB7DFD27A88EFF75C2 /* PromiseKit.h */, - 358F7A798EA72C8BFA7C4AA5D7A22723 /* race.m */, - C21956F497DCFA1D883CAC00AF330784 /* race.swift */, - 25E9E042655265AEB9322FB01DD7A702 /* Resolver.swift */, - 982B03AB9D403479BF865D7C3A5B2D4F /* Thenable.swift */, - 612CB1FE4A4EF26D20DC64543E17C82A /* when.m */, - 85BEAAA1888D13FCFC9F1C2AB3A7ABBD /* when.swift */, + 91BAFA9B3EE9063DDE5057E56DC627DC /* BigInt-iOS.modulemap */, + 2AD338DD23B43013308A65379BAEC16C /* BigInt-iOS.xcconfig */, + 7E74F31CDCAA43E3665CAB99746882DD /* BigInt-iOS-dummy.m */, + 972E60F406627ED35849A8F617B3ECBD /* BigInt-iOS-prefix.pch */, + 6A105001ACFD1F5004F2225CB06D4CCA /* BigInt-iOS-umbrella.h */, + EABECB99AFE1BF549F3CEE90FBD45E98 /* BigInt-macOS.modulemap */, + 08A99F6D5C3E452229D15E3E8C1660F3 /* BigInt-macOS.xcconfig */, + CF8798C22F31053E2D6EAF35C011146D /* BigInt-macOS-dummy.m */, + 04B39BEAD1520A1D6783A85DE2C51340 /* BigInt-macOS-prefix.pch */, + 6F0A15233EFEAA840C94D98DFD9C1F14 /* BigInt-macOS-umbrella.h */, ); - name = CorePromise; + name = "Support Files"; + path = "../Target Support Files/BigInt-iOS"; sourceTree = ""; }; - F60B65C0BEC31AA822288722889BD576 /* secp256k1_swift */ = { + E615489C131A7CB2245346A21FB09B1A /* CryptoSwift */ = { isa = PBXGroup; children = ( - 80353B76ABA10ED9D59C18FDA6A16285 /* basic-config.h */, - 2AF08003360A2A59E3E059CBC5496E71 /* ecdsa.h */, - B2E36C3B29C59A6C972DBF40C0EF93D5 /* ecdsa_impl.h */, - EE8A73B5FBE9F82E34238AC840FC7331 /* eckey.h */, - 678FC45FCDC1237D6344CFADDB22F228 /* eckey_impl.h */, - 310A618141B833B61214988468629C13 /* ecmult.h */, - 3E5F93B0E61748A9D9906D3305A41EA8 /* ecmult_const.h */, - B177F4FEBB7F565C10EB6AABDF0CFB6C /* ecmult_const_impl.h */, - 0554DC016A3872F60738FE5C366CAF31 /* ecmult_gen.h */, - 062A95E74B96944BC0E3A674E72AE85E /* ecmult_gen_impl.h */, - DF39D90FCE7EA42EF346003BA8EF96AF /* ecmult_impl.h */, - 2BC7202C545EAC46F224EE9AB6B1F0F7 /* field.h */, - 531B65B7CD936ABCBE9D4C182A88CDF0 /* field_10x26.h */, - 9821B82F2A2D9E9E0A740B6B4B38A6AB /* field_10x26_impl.h */, - C66DD520FECE2C1EE69FD6A9E23EA032 /* field_5x52.h */, - 282DD884F817856F0FD3D38F8A4447B1 /* field_5x52_asm_impl.h */, - 3E8F4C6770C979220F90AD2CBA4EA3CE /* field_5x52_impl.h */, - 5540F42E4F8BF99A1C7F95349EA8707D /* field_5x52_int128_impl.h */, - 3C9CD6920241610BE46DBB9D591849AD /* field_impl.h */, - AEB5F00EFE918C35C091FD2FA7EACBF5 /* group.h */, - 681146D3345FF5156D09E271666D5EA1 /* group_impl.h */, - 9D1AB32F0AE7B734159BB1FBAF7F5078 /* hash.h */, - 3ED371C14676A66BA35BCF542FF8B548 /* hash_impl.h */, - CA97BDA6DF1DE11A96470DBF6FBD7C62 /* lax_der_parsing.c */, - D9A9A6187028CC6AD623334BA2899FDE /* lax_der_parsing.h */, - 1D7B42933B2D81EED52706C7200A9732 /* lax_der_privatekey_parsing.c */, - 7D903E031FC7FD31DA94E1EC68778019 /* lax_der_privatekey_parsing.h */, - 255F9BD02565315A20D36910794D0C10 /* libsecp256k1-config.h */, - AEA94352D4A3D0793D359A8C1CB50E4A /* main_impl.h */, - 1EDD6BBAF4F23E405AA0CA5AA2837BD9 /* main_impl.h */, - EB3A44C98D1E93465803241C08887CDD /* num.h */, - 63C148A221559836C278AFFB2F0C6D3D /* num_gmp.h */, - 3E75AF68728F33A9AC112BE223CA6718 /* num_gmp_impl.h */, - BA200D6941B69ACC080DFB132BEFF422 /* num_impl.h */, - 944A08F05724AD8D1EC4F7FF0D09BFE6 /* scalar.h */, - B9737D99B060F85A0A42A3A30335B14F /* scalar_4x64.h */, - D8241FAE07EC659EA8EE9D035AB05377 /* scalar_4x64_impl.h */, - 423E241FA5BBF42BFDDA5E6C6AD2DEB9 /* scalar_8x32.h */, - 7388674CDE22815644490821F0CB757B /* scalar_8x32_impl.h */, - 37B67C2B42A2EC2E689AE41636261351 /* scalar_impl.h */, - 08390C702E93A122CAC37BDF6A07A98C /* scalar_low.h */, - 5595E1873CFBC6061E8C6D86BFF12807 /* scalar_low_impl.h */, - 3ED02D5B7EB6BD54C515B4B06599DA5F /* scratch.h */, - 93A5B46AC7CC995589CAA3D991DC1B29 /* scratch_impl.h */, - 7DF576FC1DAC9EC11DA44099F4F50AFE /* secp256k1.c */, - 3E8DAE988F4403CE8B047E936F2B4AE1 /* secp256k1.h */, - F8262D72960A17572931F11EC9520938 /* secp256k1.swift */, - 07CB743A805B99BE84DD49F8D999BF5C /* secp256k1_ecdh.h */, - F5AA52D2E5DC0134CBA0CB3219327A53 /* secp256k1_recovery.h */, - E7E7786C2EC1054AF047E2571B12205F /* util.h */, - 9F433791C3C200F7BC10E40694405F12 /* Support Files */, + 05DB571F7562C6E5DAC821BF33DF2ACE /* AEAD.swift */, + F8C27B7CBA5225481973EDA23AF49981 /* AEADChaCha20Poly1305.swift */, + 32E6FCC003B1158AFE68C8101E9DC9B0 /* AES.swift */, + D9883A143C0F77B2C2AF7E05BF805F25 /* AES+Foundation.swift */, + B453F34A70203AF07F27C5AE1B2A0518 /* AES.Cryptors.swift */, + 5430F65435F42C41489D6A5D36494E0B /* Array+Extension.swift */, + 0FC232D3CEB1791A116CFCB46BCCE606 /* Array+Foundation.swift */, + 6E53BAD514C4F4E022EEBCEB1ABC3943 /* Authenticator.swift */, + 36F3DF43B9422FD5916A6C75F9C68568 /* BatchedCollection.swift */, + 92C1E2F71DB75395E28DC3213425381D /* Bit.swift */, + E4992855757033544670BD38D4484C08 /* BlockCipher.swift */, + 38E248D955FFD067941A82DF6B7B3C4F /* BlockDecryptor.swift */, + 3F9EE37EACAF96F7344C1F0AEA46F02C /* BlockEncryptor.swift */, + 00E773D6D25B2A450D593D189B85B7DA /* BlockMode.swift */, + B5CBF6B2F887499D9631619E0D53008D /* BlockModeOptions.swift */, + F063BD5FB8772F058E36A1292962E899 /* Blowfish.swift */, + FB31CE10E8BEEBFC7B50C9F8A97E10A8 /* Blowfish+Foundation.swift */, + 224F4E958C4909EF47CB0A9F43F48030 /* CBC.swift */, + 9883FCDA0DBDA6DCA8C5923AB1B3F45A /* CBCMAC.swift */, + 31BA61BBC2E9A900CDFD9106099E71AF /* CCM.swift */, + 3649CFBA1E54D6AD5C50879B03ED6866 /* CFB.swift */, + F62C08D51F07D8799AD6CB646A710F41 /* ChaCha20.swift */, + FA93B396CDC9BA5785D41386B95B4AE2 /* ChaCha20+Foundation.swift */, + 43C25934B3D3377624DF16153BF76578 /* Checksum.swift */, + D62515D5BE9A59FE5C9041B4EBE9CA58 /* Cipher.swift */, + E1D1692A2F154E2828E569943ED540D4 /* CipherModeWorker.swift */, + 89EE579B1A3A156C9DE84CC0E9CC7F51 /* CMAC.swift */, + 67F74D8CA41DCC5236159301ED92764C /* Collection+Extension.swift */, + 6C619FA5855429D15B556163471403E5 /* CompactMap.swift */, + 1F2F682F960F536C585085773DF5BBA1 /* Cryptor.swift */, + 89BECCA6149031B2659A0EECDCC2E4A5 /* Cryptors.swift */, + 8A3D345B7D38F0B4BAB39F24505D5E5E /* CTR.swift */, + BDD6E2BFD8131F124DFD131BA3C6D90E /* Data+Extension.swift */, + 721ECA637BED3AE2394AA1573B89D998 /* Digest.swift */, + C14CAC03510776AA4E99EA944110DFD9 /* DigestType.swift */, + 6F1D20DF17340D045A1FDC2D1D64449D /* ECB.swift */, + 5B830B448B480E1AE7466CE0AB7565D1 /* GCM.swift */, + 3EF69CEB8B2C8F6223E5A84FF9855D71 /* Generics.swift */, + 0FFAEDF6DDF0B48C4B8E16F6F9C59A5F /* HKDF.swift */, + FEDDAEEE4BC31C06BAE2232AFCA5468E /* HMAC.swift */, + FAF14DF7DD65D242909C4D06F8C00DEF /* HMAC+Foundation.swift */, + 6E6BBA6411A89BD966DF62BE90EE478C /* Int+Extension.swift */, + 3BDFDE509786CC72B0B5EBBB87F54C14 /* MD5.swift */, + B8172257020A0ACF61B9FA6264236BB6 /* NoPadding.swift */, + 258EB69CA13649BFEBC389916A418DAD /* OFB.swift */, + B468DE556C27A7C396C7B5ECC7DCF12E /* Operators.swift */, + 3654C41FDB74088592DA713158476E5B /* Padding.swift */, + A31357292CDC03F5F3AEA4C1065BCDBF /* PBKDF1.swift */, + 5BBEB708E926639930327B2FC6F3759D /* PBKDF2.swift */, + 1E0CB4379D0092F51F5C1232B3CD03D3 /* PCBC.swift */, + F964C89C691E6FE6350F48A4A3E1DD52 /* PKCS5.swift */, + 8C5181B2E5F94EAFEF5F04D83E0FFD13 /* PKCS7.swift */, + 45F5F772F0EEFC0C3E42DAF65DB4121F /* PKCS7Padding.swift */, + C174EE4F0CE9A869F2E898CFF8A36484 /* Poly1305.swift */, + 129427E2D354B71D619F0DAC197039BD /* Rabbit.swift */, + 7DCC7CDEAA23666C0D7F819861149F89 /* Rabbit+Foundation.swift */, + F42AC215BDD4E22070E88E9837549CD1 /* RandomBytesSequence.swift */, + 16973E34A2E1AB31C96F6ECF88E284D7 /* SecureBytes.swift */, + CDFC58447BAB63CE30E97C059F8345F5 /* SHA1.swift */, + 840549A6DE0F91C91EE1712E3C57D6ED /* SHA2.swift */, + 4C1637249D7E9C69FBC55792F4BFF580 /* SHA3.swift */, + 7C5AAAD0BEA7AB575EE1203992B86F82 /* StreamDecryptor.swift */, + 575A44CBD254AB2012072A25C3D25D19 /* StreamEncryptor.swift */, + C0A59FDACCE16F10DF39EA55249CA72D /* String+Extension.swift */, + D2742B99A93E16E813DA0B71800AAA56 /* String+FoundationExtension.swift */, + F60D6D403033B0F37C22533C4A05A1E4 /* UInt128.swift */, + 7E5CE0F5663064C7672E5299F1B3B7DF /* UInt16+Extension.swift */, + 857BD06ABAFBE1C5C176886E254BE8E6 /* UInt32+Extension.swift */, + BA94DDC1F5525609A6FBA3EB53F09037 /* UInt64+Extension.swift */, + AD5252D2AAE2CE2F1FFDA208DD0EFB4C /* UInt8+Extension.swift */, + 27DE68FEECDD098908A9003BDA40307F /* Updatable.swift */, + B5A15DC755B12D8CCABB5B073B63856F /* Utils.swift */, + F98F9737D714C11C13F01403ECACC354 /* Utils+Foundation.swift */, + D6E02047F0F6A6150C26B56EEF63F55B /* ZeroPadding.swift */, + D7921E3D8BD461440A67CF8BAEB281B9 /* Support Files */, ); - name = secp256k1_swift; - path = secp256k1_swift; + name = CryptoSwift; + path = CryptoSwift; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 0A517913ECA631FD90F898E1AC9F73FA /* Headers */ = { + 2F08BE2476997220D34CF9A4B9F6835B /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - F1566684B5EC4250C3F2D3F422CFD689 /* EthereumAddress-macOS-umbrella.h in Headers */, - 13D45CC6E83EFEB9467158ECB394D367 /* EthereumAddress.h in Headers */, + 54CC4EB0BFBA6950C9FF3ACBAF3E871D /* SwiftRLP-macOS-umbrella.h in Headers */, + CA9B0594A947364945D728CD48CE2675 /* SwiftRLP.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 1D082DF5FB317A292B865320EA4330E8 /* Headers */ = { + 2F394AD2ED0A538D456609456DB15F4B /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 582EE7A8797F29AD814C0F877E811808 /* Pods-web3swift-macOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 263A6BE4E6989F362AA0E5FEC75D6EB8 /* Headers */ = { + 341869387793A606802DA2B2E9DC999C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 2177A7B4F26FBB839E1C3F07A82887E4 /* AnyPromise.h in Headers */, - 0EF95CCD3EF4EC40F109D9D364B6504D /* fwd.h in Headers */, - 33FA2A0C3B7394329B6B9B32D5EE53A2 /* NSNotificationCenter+AnyPromise.h in Headers */, - CFCAF13F717E0088FD8C51EE4460EBBE /* NSTask+AnyPromise.h in Headers */, - B0968028804FC340046D3FDD23551189 /* NSURLSession+AnyPromise.h in Headers */, - 59E8068AD7D81375CF6BD6C079A6CD52 /* PMKFoundation.h in Headers */, - A2913E511FD4FA1AAEB9256360C0AE51 /* PMKUIKit.h in Headers */, - DC3FC4BC15FF43709E43B8FAA2B6FD3B /* PromiseKit-umbrella.h in Headers */, - 9F7BA0F07BB50D1DE1036928BF70C2D3 /* PromiseKit.h in Headers */, - 9F386CB50D39A65571DCFD394C23D8E2 /* UIView+AnyPromise.h in Headers */, - BD0E70C62B7FC0BF874D98D6C855FE1D /* UIViewController+AnyPromise.h in Headers */, + 5916092AA6D7F2AABFCF33B48F68672B /* Pods-web3swift-macOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 2F394AD2ED0A538D456609456DB15F4B /* Headers */ = { + 3A62C11C69001C7BF554031AE5C3194C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + F9A83224C63AF5F18AED311461D71668 /* BigInt-iOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 3A62C11C69001C7BF554031AE5C3194C /* Headers */ = { + 3CCEBEDFD58277AE688D11C78A90CD24 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - F9A83224C63AF5F18AED311461D71668 /* BigInt-iOS-umbrella.h in Headers */, + FC4AD96F8C8D695E021F598BEAB3A13D /* EthereumAddress-macOS-umbrella.h in Headers */, + 2C573766EEF17A6CCBC46524208BCA4D /* EthereumAddress.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1839,522 +1982,561 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 54DF3F44A9C01544510F7FA211E2D61A /* Headers */ = { + 41A5FC68414B08862DA3AC70C6F990E1 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 11461F81975B779BC100E7345CE2D793 /* EthereumAddress-iOS-umbrella.h in Headers */, - BB8929C86AEF5AE8E8A10D8061185D47 /* EthereumAddress.h in Headers */, + 06E5B8C23C8BCD1E8F04C48C360B615E /* AnyPromise.h in Headers */, + F2976AA313F35FAE9B9112630BAEF66D /* fwd.h in Headers */, + 734152CA029292005DD1062B744B320A /* NSNotificationCenter+AnyPromise.h in Headers */, + 9E042ECCFC8FB435B85BF9193486A67C /* NSTask+AnyPromise.h in Headers */, + AA77E4FCA1931096078FD288C72D7690 /* NSURLSession+AnyPromise.h in Headers */, + FB3B4D902E0078517C1A8D1A64E0D405 /* PMKFoundation.h in Headers */, + 25B3A19A863EF1BC095B228C6CC55239 /* PromiseKit.h in Headers */, + 28228E86E8A57346F45744E805645CC7 /* PromiseKit.root-CorePromise-Foundation-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7473267694EB25007FA3A05AD22C3D27 /* Headers */ = { + 583E829B095CF5D84CEA55FCC985C749 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 946EE4F3900E73B0823B57F1AE8C47BD /* basic-config.h in Headers */, - EB61FACF6827E43E518AF99AFE8ADD09 /* ecdsa.h in Headers */, - DA74E106DB2F609C8C444565678896BB /* ecdsa_impl.h in Headers */, - 0C031445C897BFE6D124AD54FA1B39E4 /* eckey.h in Headers */, - 526530B8F45F2C42F4B731C1BC05C532 /* eckey_impl.h in Headers */, - 21DE72843C7B514A5D846FB52A8976C0 /* ecmult.h in Headers */, - FE95B067321486A5998C5DD4DF31862A /* ecmult_const.h in Headers */, - 12E1E9691B7286282223CB20A574F364 /* ecmult_const_impl.h in Headers */, - 5D3C0267F1EB78B6038FF2898C20A737 /* ecmult_gen.h in Headers */, - 35E543DC36F19E32B3EC8F6652420EEF /* ecmult_gen_impl.h in Headers */, - 3DEC2D219AA42627099A9C723B66AB97 /* ecmult_impl.h in Headers */, - 068E167EF11A07C17D688B3BBC218D34 /* field.h in Headers */, - C804D008E78513D7097A478AE1BDE395 /* field_10x26.h in Headers */, - 4971308DFA5E58345B78AA42538C65DA /* field_10x26_impl.h in Headers */, - 55368A922AD4C49FF4D8A4042ECBB7F3 /* field_5x52.h in Headers */, - 9970A7335034C125C75BF4CC2B9F3AC5 /* field_5x52_asm_impl.h in Headers */, - 81F2542193E3187EF95CC783A290D239 /* field_5x52_impl.h in Headers */, - 0EDEC46E0BC997FB64753A1C709A4AE7 /* field_5x52_int128_impl.h in Headers */, - B1B07B21B7667DE9A83B36AC03BE6175 /* field_impl.h in Headers */, - 97AF9F3B17A049614F158AFF9AA5C3FA /* group.h in Headers */, - 5D6A8FBA67FCA90E5B02979DDE6FFF43 /* group_impl.h in Headers */, - 66260581693FDC3DB887738136636C8F /* hash.h in Headers */, - 54B975339087EB52B33FD2013118BD0A /* hash_impl.h in Headers */, - 2A1509546A4F640E1538711DAC7F3FFD /* lax_der_parsing.h in Headers */, - A9B8D34EAFEA874B2B3937B7F53B5D9B /* lax_der_privatekey_parsing.h in Headers */, - 479CE094426E3868726526A833D58F21 /* libsecp256k1-config.h in Headers */, - 031B3FFCD45AD7672462A575142008AF /* main_impl.h in Headers */, - 431FDC470CFD299BE8D98F92F1B01B60 /* main_impl.h in Headers */, - 0800D78442F1F493C69F6F6C51A6A7A4 /* num.h in Headers */, - 3607BA990F6961ED7E0401406A565C07 /* num_gmp.h in Headers */, - C0DD16176212D3F5222CE6886B2A660B /* num_gmp_impl.h in Headers */, - CB57B994F6A2E96E2508F7845D1F97C3 /* num_impl.h in Headers */, - 6AD72DAC1AE026743E0DFDE9E6854763 /* scalar.h in Headers */, - CF67AD864C4CE27EECF87985CF9B287E /* scalar_4x64.h in Headers */, - 68CE1BEB5DEB9671E24DE87773BA920C /* scalar_4x64_impl.h in Headers */, - 5085168C5F297AE562EBC81151EAB02B /* scalar_8x32.h in Headers */, - EB5F9E86F880F7DADBC989EAE79A9162 /* scalar_8x32_impl.h in Headers */, - 320D4C619C3083F47C00012810B2EAC4 /* scalar_impl.h in Headers */, - C1276BB9865BF0BA0D8F4229A5202D3A /* scalar_low.h in Headers */, - 1B9FF780BC13D12AA66605DC702CE662 /* scalar_low_impl.h in Headers */, - 480D4F1A6DBDF15BDEE2611663CB3BED /* scratch.h in Headers */, - AC755B14D97E2077CB8911758996D6CC /* scratch_impl.h in Headers */, - C462144190FE4E9F45F82292FF1A629A /* secp256k1.h in Headers */, - 97D8F4B9B56316BD37A2EBCC5A2B7E51 /* secp256k1_ecdh.h in Headers */, - 318CA76F82F67216CF65AABA4466272E /* secp256k1_recovery.h in Headers */, - 8F1107E28340C0612A6D8340F38A267D /* secp256k1_swift-iOS-umbrella.h in Headers */, - 3B3E08848BF8EBA88438CCF84389B07F /* util.h in Headers */, + 13F006A331F4F7D1E7A9C31C925C8434 /* EthereumABI-iOS-umbrella.h in Headers */, + 60D4DE7DC97871E36FBF75DC91E7A248 /* EthereumABI.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7477F92785CFE4A257605FF325BEDCA8 /* Headers */ = { + 5B106CA9B70073DB5FBE37B959133AF3 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - DF3C881F6AA58663EA27A37DDC93CBD1 /* SipHash-iOS-umbrella.h in Headers */, + 9B45BA7080C2248A03F5AF03837C74C8 /* EthereumAddress-iOS-umbrella.h in Headers */, + A1B3C6A88101C2163062485C2B45F1E0 /* EthereumAddress.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7782F816841C0EB71FD1F1F31BE73647 /* Headers */ = { + 672DA6ADECF9F10F1DB3A0E8F143BDB6 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - D6B5F7FA348E6697E489142154B85107 /* AnyPromise.h in Headers */, - A59CBD16B65C3C7ACC4C7D8945875F82 /* fwd.h in Headers */, - BBA677442B33921B63BE5CD78F273813 /* NSNotificationCenter+AnyPromise.h in Headers */, - 226FF2D2465A03E4EDF572BE5AF88E19 /* NSTask+AnyPromise.h in Headers */, - 835E647599AD20789B5A10F1E3BEF888 /* NSURLSession+AnyPromise.h in Headers */, - F8DD96EC7610D4FCB6C8045D400E5701 /* PMKFoundation.h in Headers */, - D5C95DA680B56760C10228B520F7499D /* PromiseKit.h in Headers */, - EF2D6E9667E3DC5852A6F092A4BAC763 /* PromiseKit.root-CorePromise-Foundation-umbrella.h in Headers */, + FEBCBEDE2597673C7D802896774CDCBD /* Result-iOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 96B2181F13A512676DE43FB3511AFDDA /* Headers */ = { + 6A22A95F9A809B370E0AAE627021502C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 56996A02B3DC920077AB801E4E8A0A15 /* Pods-web3swift-iOS-umbrella.h in Headers */, + D7346C912787D714E05528CDDB4A75F8 /* SwiftRLP-iOS-umbrella.h in Headers */, + 0ADC230F620426946507547899D899B6 /* SwiftRLP.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - A84BA0453988997BEFD8DEA9765B62E6 /* Headers */ = { + 735E4C913DD0A46A1F72F4F1C62052E9 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + ECAAA1869ED698C502004DE2B539728F /* basic-config.h in Headers */, + 0EF9D11A3631D7F8BE44552285F4A63F /* ecdsa.h in Headers */, + 0F4BC161113C9EBF41626D66606EB70E /* ecdsa_impl.h in Headers */, + 8E6ADE71160E4C617ABA4C32C87D16F3 /* eckey.h in Headers */, + 4B79D71DD2FC55BCBB35E1F397441057 /* eckey_impl.h in Headers */, + 22D545D72C019120381A23F2008D216E /* ecmult.h in Headers */, + 8DC20C4A7C1E28D752BFEBF35B5D9759 /* ecmult_const.h in Headers */, + 4882343A2039DD16BE3AE92E332AD44C /* ecmult_const_impl.h in Headers */, + 56959B7098D09A061F7F7721E757E1E2 /* ecmult_gen.h in Headers */, + 38261BBD61EB4CE9C0D8D02EFD788CC4 /* ecmult_gen_impl.h in Headers */, + 6A484692AA6F59EEA3EC6137FB6AFFCF /* ecmult_impl.h in Headers */, + 2AB0EAF55461D364004CD6F3DAF5585B /* field.h in Headers */, + 030B22879409F834B4FD21C5F8DFDDCD /* field_10x26.h in Headers */, + 9F89998FC4A9BDB1EB5C0FBC61596D64 /* field_10x26_impl.h in Headers */, + F8977F910FD88CA3560E0435ACA41270 /* field_5x52.h in Headers */, + 92A31273837467750DA0525B8243B737 /* field_5x52_asm_impl.h in Headers */, + E7DEA0B8E0F9EAF68841EDC4B8AC3396 /* field_5x52_impl.h in Headers */, + 0B987FF04FAAC3E2C96DBE0C52BDBD62 /* field_5x52_int128_impl.h in Headers */, + 848F627E8EC89D8060C4A7DC5C0B8CE2 /* field_impl.h in Headers */, + 83270E867F5862F72F0F925937F1668A /* group.h in Headers */, + D528114C056635E14284458D9163DE3A /* group_impl.h in Headers */, + 9ACFA841BF6C5686EDDB92A29B36FF7F /* hash.h in Headers */, + F6DB885F4AA84A99F9B5778AA1E2D3DA /* hash_impl.h in Headers */, + 3873EA28EA1C34A735654F3652FE1237 /* lax_der_parsing.h in Headers */, + 591B707CCE5C69B79289D27F93215603 /* lax_der_privatekey_parsing.h in Headers */, + 1ACFA20B8643D974578D0B37E658A0A9 /* libsecp256k1-config.h in Headers */, + B3978E88BD6400B77CF85D9788D4F094 /* main_impl.h in Headers */, + 9FE815CCD081FD51B3853C75F363A89B /* main_impl.h in Headers */, + 21EB006D3FD9C27B88742E512E7B227D /* num.h in Headers */, + 4D65A0EA2474E1ACE27EB99A8C868A09 /* num_gmp.h in Headers */, + 5A176FB29F73DA5B94E9257DE93AD928 /* num_gmp_impl.h in Headers */, + 553AD1CA02592C774AFF2659115B4DB1 /* num_impl.h in Headers */, + 3C1A5CA548BBD6346EA3C326AF0E1044 /* scalar.h in Headers */, + A22F18E450653F384132E5C621BE7B73 /* scalar_4x64.h in Headers */, + F6D7738BDDDF311DBDB1B103A5A1F6E6 /* scalar_4x64_impl.h in Headers */, + 213DE58F64F93C8508CCDEBE7CBD97D4 /* scalar_8x32.h in Headers */, + 4908E7728A0935FCB6EF210407119794 /* scalar_8x32_impl.h in Headers */, + E1DA6C9BC2295C7CF04AD192B8FE26FF /* scalar_impl.h in Headers */, + E316F68C4FD62BB0A294D29DB03DCB5D /* scalar_low.h in Headers */, + FB5385DF7643AC5570E694BBA6406E0B /* scalar_low_impl.h in Headers */, + 970EE041FB9D079419CED46228DC3969 /* scratch.h in Headers */, + 69527E264B7CB8895C3299409B518A2F /* scratch_impl.h in Headers */, + 47C119777E312AE6602A93BA0027D876 /* secp256k1.h in Headers */, + 31280DB99D63393FE7EBF701C18A7151 /* secp256k1_ecdh.h in Headers */, + A780CA204C48EC1DEEA8B2C0F59FA6AB /* secp256k1_recovery.h in Headers */, + 7866E902E917458E48CDFA6D0513288C /* secp256k1_swift-iOS-umbrella.h in Headers */, + DFB15CA333EE077FC25900A712E89DB7 /* util.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - A8FE7F6CDE2FD821EC0D93ADE70A49E2 /* Headers */ = { + 7477F92785CFE4A257605FF325BEDCA8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - EC9F551C20254A1AEC7679ED83D28713 /* Cimpl.h in Headers */, - D655D7A0F64343C818BC21A985DA8C5C /* scrypt-iOS-umbrella.h in Headers */, - D4043F69152803AF7B450C9062CFC688 /* scrypt.h in Headers */, + DF3C881F6AA58663EA27A37DDC93CBD1 /* SipHash-iOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - CB3C81D7E2AD5293B63D12B9684C0961 /* Headers */ = { + 88D55B53E0998EAFAEDC2982B9331828 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - D4F42FD2DC81233AD6F6C96B6D8C8D38 /* basic-config.h in Headers */, - 52D04CA795889A574DE97357217965BE /* ecdsa.h in Headers */, - B495BF9BD41F0DA630E6BCEF9E48D707 /* ecdsa_impl.h in Headers */, - ECA8F009F06F08BDB92C351F47995210 /* eckey.h in Headers */, - FB9507F4BB8DEF640A6E3C3BE2A4E619 /* eckey_impl.h in Headers */, - AB80E1E9C65B4EA954F01811007ADE6D /* ecmult.h in Headers */, - D79B4B114921134D9311CA5A71062C10 /* ecmult_const.h in Headers */, - 0B442DCD3296A492C9C58C8AE14BA0A8 /* ecmult_const_impl.h in Headers */, - DB8210FAA307129469E336205657F092 /* ecmult_gen.h in Headers */, - 5C07AF157556B42E17E1E32A4AEB573B /* ecmult_gen_impl.h in Headers */, - 79571D2CAB88DA790160FD0CDD3AEFF9 /* ecmult_impl.h in Headers */, - A9F50ED8E406BC5AB5C9E327233D70A5 /* field.h in Headers */, - C880E86722BF8C8B420186E5FCAA564D /* field_10x26.h in Headers */, - F7A2DF1C44544C5300298F18DF2CB870 /* field_10x26_impl.h in Headers */, - 91D6972A579E54069CA6674EF1AFDD62 /* field_5x52.h in Headers */, - 5638014E129B104ED47134518667CC68 /* field_5x52_asm_impl.h in Headers */, - 8756026DE126ACD98A35A20C2F344F1D /* field_5x52_impl.h in Headers */, - BF65BC24F142604C88A03D61E2C91A0D /* field_5x52_int128_impl.h in Headers */, - 324A108EF1509B26512277B3C3BE7D2D /* field_impl.h in Headers */, - 31A75721375ECAB73790FEB75766D87A /* group.h in Headers */, - 0C8C916943E653184B644A98632DDC47 /* group_impl.h in Headers */, - 127EFEFCE576E0CDD1DF3708F20C10BC /* hash.h in Headers */, - 17B2699526C79E4F6A7F890EF0C62A1D /* hash_impl.h in Headers */, - C6C9C202FFBD58F21443C1F5CEDFB291 /* lax_der_parsing.h in Headers */, - 251FC364DD9D317AB3F31F99BA809724 /* lax_der_privatekey_parsing.h in Headers */, - 5A7A8C39583FF9303788AA4DAFD6FB1F /* libsecp256k1-config.h in Headers */, - 8CF0A92E555F6A19FD269B16235D3128 /* main_impl.h in Headers */, - 8283888B261F0702178960767D664712 /* main_impl.h in Headers */, - 618CFC75E3108B18C4DD15C12EC58626 /* num.h in Headers */, - B0EFDD2E40787B3A3359CF16DF3815C3 /* num_gmp.h in Headers */, - 9307E26E1B1DD066C1B71C66EF7B5B99 /* num_gmp_impl.h in Headers */, - 75F745A947766D56938C0215E2A54C9E /* num_impl.h in Headers */, - D44A10DC0AFCD862345B9A0F97E95ED2 /* scalar.h in Headers */, - 9426948AD7CCB3A21DB5169851D17835 /* scalar_4x64.h in Headers */, - 62A5DF1DFBEC0FD06FC3C895F4447790 /* scalar_4x64_impl.h in Headers */, - A1ABA5F58D2757A7C96844AE893C12D1 /* scalar_8x32.h in Headers */, - C56FB1B1104E7EEA26631D9EA9A9D9DD /* scalar_8x32_impl.h in Headers */, - 8FA68F40AE3928B497DDA7C8B828FE74 /* scalar_impl.h in Headers */, - 209C8981858102B13060DA6A94BE0170 /* scalar_low.h in Headers */, - E254CF34D5F821DC8EAA61755F39ECF3 /* scalar_low_impl.h in Headers */, - 3D71156680EC3D94A6E1441546C57E6B /* scratch.h in Headers */, - 3AA32C95FECA68AA3FF571E0F0AF83BC /* scratch_impl.h in Headers */, - E1B91043188FBFD92BA078E1EF2912E0 /* secp256k1.h in Headers */, - 2B3F7B28D29AE55CF915EC13A381D462 /* secp256k1_ecdh.h in Headers */, - B6E2A49CAA2332035A4163610834553C /* secp256k1_recovery.h in Headers */, - 8DCC706DCFDBCC907AAB009F5C505F8F /* secp256k1_swift-macOS-umbrella.h in Headers */, - DE31538BAB4D0DB5B8063517B853894F /* util.h in Headers */, + D42A1D2FC1FD4BC6485683430F314F8D /* Pods-web3swift-iOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - CC4236511CD7C868D12303BE91525247 /* Headers */ = { + 928D76306ECD6416741AC2FC86980F0C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - DD7964B2315BCC4C1FEF9A2300164025 /* SwiftRLP-macOS-umbrella.h in Headers */, - FFA521581788213B12468D8AA8D2ADBB /* SwiftRLP.h in Headers */, + D5F3CB86000211CEE2280DE68F875D8B /* basic-config.h in Headers */, + 24ED5E0F58443FB2E91C07D5B453E591 /* ecdsa.h in Headers */, + 42920ECBDE0A9803B1C7380ADD62A568 /* ecdsa_impl.h in Headers */, + 5B842BF7DAD152B00F2629737F22DF42 /* eckey.h in Headers */, + 93922A572F18D47B58770CE032C624A9 /* eckey_impl.h in Headers */, + 0803200FCF34AD13D541A796839CFD8C /* ecmult.h in Headers */, + B9273317460CC1FE679BEB887B22502C /* ecmult_const.h in Headers */, + 3E5C1C698DFB2439892653C0F04DF498 /* ecmult_const_impl.h in Headers */, + ACAFB6B368809FFE646FC6CE60BC1165 /* ecmult_gen.h in Headers */, + 74931156BC39F4870C2DE0792BE32405 /* ecmult_gen_impl.h in Headers */, + B8F37FA0A973FDDC27C6425371AEEAD6 /* ecmult_impl.h in Headers */, + 32DAD7BC31D1813B10BB3069A4E8A563 /* field.h in Headers */, + 0020B3469BA74AE230A3980EAE138C7A /* field_10x26.h in Headers */, + 0B3D630F66F9E1B3BC7A654E42366967 /* field_10x26_impl.h in Headers */, + AB0CBD60909A704D3D9158BC5D661B16 /* field_5x52.h in Headers */, + 0D05ABBC7CC7C8489D2A4282581CA5E2 /* field_5x52_asm_impl.h in Headers */, + 21B3C21C7A16A522F0F463F9FB046A5E /* field_5x52_impl.h in Headers */, + D9BA126F50DCB7B25D32447C2E8931CC /* field_5x52_int128_impl.h in Headers */, + 726D7B79EE2D9BE951DB54D2130E9BCA /* field_impl.h in Headers */, + 82AF1E6C9907EE09A09AB83C5B1818ED /* group.h in Headers */, + 1D68B343368ADE35129C5CDCCDCCD468 /* group_impl.h in Headers */, + 54EC85190D1C1948AEC85A67298BDBFD /* hash.h in Headers */, + 384CC535308CA645694E4C8ABAAF97F5 /* hash_impl.h in Headers */, + EC0634AA758562515F6A6C370F9C7102 /* lax_der_parsing.h in Headers */, + D10BCDD795487B1471ADAF3F0D4485CA /* lax_der_privatekey_parsing.h in Headers */, + 1A05748E830513D5B126B463DC61CA60 /* libsecp256k1-config.h in Headers */, + 97A3961670D0D6C11A7E18B5DB3FF739 /* main_impl.h in Headers */, + 8C7DC341CF6C0D742059C180AF4D3AE6 /* main_impl.h in Headers */, + 582D36FB6BBE4D4259CBFC9B837E7F79 /* num.h in Headers */, + 4C418DDDF37352D82DC8A316EB35D643 /* num_gmp.h in Headers */, + ECF940C778D08964A4CC5F1090E5B694 /* num_gmp_impl.h in Headers */, + EE783493F1B7530C3742E03C554493DA /* num_impl.h in Headers */, + 5E0D7EA7DC572DB4F63B87D4243AA73E /* scalar.h in Headers */, + E2304F8E1E94478D68A8EC526EDCCBAD /* scalar_4x64.h in Headers */, + 60398D9C8DCDC7FEDC52DC8AF907D1D9 /* scalar_4x64_impl.h in Headers */, + 67EA838CFD7F6CF89A7A056B09B63C06 /* scalar_8x32.h in Headers */, + B73725553EA7209B295AFAAF5F1641C9 /* scalar_8x32_impl.h in Headers */, + C02A520237A6EEC101F93FD5E741C295 /* scalar_impl.h in Headers */, + E59A5E45ED8B25E70C9C6A6E89C566D4 /* scalar_low.h in Headers */, + 1BEB60D584CDD65F08A874EC1961CE4C /* scalar_low_impl.h in Headers */, + D7705513171AE49C798D5A002BEC0737 /* scratch.h in Headers */, + 1F193DAAE1079FC10178E752783B032F /* scratch_impl.h in Headers */, + FC76FBD9E6420F2FD85F7F5EC55B9A31 /* secp256k1.h in Headers */, + 2D6C2BF004933839288FE0AD05169574 /* secp256k1_ecdh.h in Headers */, + 8645FDCFA460D7F9AC3436355339C3B0 /* secp256k1_recovery.h in Headers */, + 4062448019AF90DB11E3860898E8EAEB /* secp256k1_swift-macOS-umbrella.h in Headers */, + 7E19F8D4DDBF7633E4FB267CBD766735 /* util.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - D7B2C3E499A784C0C701CFCC848DD377 /* Headers */ = { + A84BA0453988997BEFD8DEA9765B62E6 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 563C641A5D7264103E44BCDCC6C6C887 /* CryptoSwift-macOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - D91516EF5FCA28AFEFF8D262E5ECD885 /* Headers */ = { + AFEA92F9B8E4F23FDE84709BDC1E70DC /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - B39F6A07D19D7B5044E37E98E6C28320 /* Cimpl.h in Headers */, - 0AB147133F796C59B1000495EDE8F694 /* scrypt-macOS-umbrella.h in Headers */, - 9850A4E789CCD838DE17E0E7A5DCCCCD /* scrypt.h in Headers */, + CE6059517A03418C389CF50D78287474 /* EthereumABI-macOS-umbrella.h in Headers */, + 3D104A9C54922EADF90311DDFF2CB44A /* EthereumABI.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - D9438E55E725BF04D83CC7EC3D4AF915 /* Headers */ = { + B71970618A9DDD30CCF100C64EDA8C8C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 5145AAE99352DBF420419223083C6C25 /* CryptoSwift-iOS-umbrella.h in Headers */, + 1974CBE5CBA7E90AF2951744F9F700DA /* Cimpl.h in Headers */, + DCA7BBA544AC372B023678542AB72A6D /* scrypt-macOS-umbrella.h in Headers */, + 2C47366FB3A3D0F2A380489DC0AB4EC6 /* scrypt.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - DEE5DA4E58FF6A20FDACF29BD5C03C3C /* Headers */ = { + BEB0EDBDBADA7FA289A4B00AA8E7EE0C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 1158B8A68E881A4243A310CB039AA866 /* Result-iOS-umbrella.h in Headers */, + 564FD746E26C5BFC311765163F88EF1E /* AnyPromise.h in Headers */, + 103C1056FCEF16B87FAC9DC37BADA0AF /* fwd.h in Headers */, + BE1CE42FE75F14BC5B71AED3DC543BCF /* NSNotificationCenter+AnyPromise.h in Headers */, + 99FB3C1EC398E469062856C9355D98D7 /* NSTask+AnyPromise.h in Headers */, + 48FD7843C2FD1E7F947576CB4F364A22 /* NSURLSession+AnyPromise.h in Headers */, + CD6EC5B134FE5E926C6F6BC0BCAA6826 /* PMKFoundation.h in Headers */, + 930121B3B6F0689685FCAB817B2A2588 /* PMKUIKit.h in Headers */, + 71567D015EC37FC03AE550A23ED89908 /* PromiseKit-umbrella.h in Headers */, + A153DCFCF463D9DE2D043665961D775B /* PromiseKit.h in Headers */, + A2677F84AB8234C395BD53A67AF18EF3 /* UIView+AnyPromise.h in Headers */, + 0FA9B674BE83227DB456D1E8CDBD426A /* UIViewController+AnyPromise.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - EC1E56131ACB90EB216C276F366EFECD /* Headers */ = { + D09211D764D9C5DC439A185C8E1551D8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - BA33E96D5FF50CFFA5727208AC91DF2B /* SipHash-macOS-umbrella.h in Headers */, + EEDA1D167622551D8F61394C9E16FDC5 /* Result-macOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - EF326D981A695869EEB5F69BCE9A78B8 /* Headers */ = { + D7B2C3E499A784C0C701CFCC848DD377 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - F16E441BDD1CCA79E64DCDA49CA4CC50 /* Result-macOS-umbrella.h in Headers */, + 563C641A5D7264103E44BCDCC6C6C887 /* CryptoSwift-macOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - F314FD63C0A0062B8F1A89675ED05324 /* Headers */ = { + D9438E55E725BF04D83CC7EC3D4AF915 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 4A9382D54AFF6BA0D34C2BE46245192E /* SwiftRLP-iOS-umbrella.h in Headers */, - C8C18B3FE4D4FD1B2D0467F31FA6D113 /* SwiftRLP.h in Headers */, + 5145AAE99352DBF420419223083C6C25 /* CryptoSwift-iOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 1168313AEC7524AEDFC1224C6D3C6E44 /* EthereumAddress-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = EFED2FA879D330888BF8C00E65240ADA /* Build configuration list for PBXNativeTarget "EthereumAddress-iOS" */; - buildPhases = ( - 54DF3F44A9C01544510F7FA211E2D61A /* Headers */, - 4F126988CBC888A0714AF1DA260B78DD /* Sources */, - 03011555EFED1D5408D878A307E7F27B /* Frameworks */, - 18E6AE424D462D0BB6055CFFEA61E572 /* Copy generated compatibility header */, - ); - buildRules = ( - ); + EC1E56131ACB90EB216C276F366EFECD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + BA33E96D5FF50CFFA5727208AC91DF2B /* SipHash-macOS-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F861629ACD553268DF434F0F56959DF5 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 9DF5F943F4396F48FA8C2562B7E90323 /* Cimpl.h in Headers */, + F78A144D256C3A6F8F6CCB64E35E869F /* scrypt-iOS-umbrella.h in Headers */, + E70AA4690673CA6F6D246FD4F786AE99 /* scrypt.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 023FD8884DE6975FECF83E672E5A51B6 /* Pods-web3swift-macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 886328E93BEAC18F43717EDABA0C12BF /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS" */; + buildPhases = ( + 341869387793A606802DA2B2E9DC999C /* Headers */, + D2D23DE9E3DD97F661D39734C713DFCD /* Sources */, + AC5A4F42824C1F9DC39C2D962FA6E967 /* Frameworks */, + ); + buildRules = ( + ); dependencies = ( - 41F78C658B3F9F5219DDE2ECF3E07F6D /* PBXTargetDependency */, + F99596A36A7D743925C51FA2EAC6A926 /* PBXTargetDependency */, + 1E9BAABB9A2D27A10CA18AA0AB29D19A /* PBXTargetDependency */, + C269DDA1242D2E3E298B6F655C4A167D /* PBXTargetDependency */, + 02659AE1B67C7B1511ABF2C7A04E2B4E /* PBXTargetDependency */, + 0D545F5A0BAC11E9ED61D880B15A786E /* PBXTargetDependency */, + 9C5DDB2602B091154A843E950D482712 /* PBXTargetDependency */, + 727A2BB019C3EBC7776A2D069690F4A6 /* PBXTargetDependency */, + 64216B85F5A267A4A8A29E2853348D52 /* PBXTargetDependency */, + 71225E4B8AE60381FB07D307E4B6D4D6 /* PBXTargetDependency */, + 8B85536E7A2A3FC702D31FFB0CE7E18A /* PBXTargetDependency */, ); - name = "EthereumAddress-iOS"; - productName = "EthereumAddress-iOS"; - productReference = 97504B2FA23741AEEDD649E58BF39870 /* libEthereumAddress-iOS.a */; + name = "Pods-web3swift-macOS"; + productName = "Pods-web3swift-macOS"; + productReference = 44157DE064955C1C2DF424094F971C2C /* libPods-web3swift-macOS.a */; productType = "com.apple.product-type.library.static"; }; - 12455571B54E567146873FF705359CFE /* Result-iOS */ = { + 02DC76A9AFBA2BA6CA9EBA39CCD34BCC /* PromiseKit.root-CorePromise-Foundation */ = { isa = PBXNativeTarget; - buildConfigurationList = 284AECDC661FAF7860EC1BEC7692301D /* Build configuration list for PBXNativeTarget "Result-iOS" */; + buildConfigurationList = 985657F07458E31EEED8115F732C90EA /* Build configuration list for PBXNativeTarget "PromiseKit.root-CorePromise-Foundation" */; buildPhases = ( - DEE5DA4E58FF6A20FDACF29BD5C03C3C /* Headers */, - 9C8F84D70CD3951B1660E208CB29441B /* Sources */, - 9D409A2942E61980145880BF513A7F7D /* Frameworks */, - AE8C8A4E08BFF14A2F1693B22AA97C5B /* Copy generated compatibility header */, + 41A5FC68414B08862DA3AC70C6F990E1 /* Headers */, + 6C32DF8E3D984792A311C4A5FD4645C7 /* Sources */, + 23806D0BC0F52E8AC5EE2B81034FD7D3 /* Frameworks */, + 23E99947867445CF8C69CEFFAFFC0227 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( ); - name = "Result-iOS"; - productName = "Result-iOS"; - productReference = 666BE65938A502C928B35D6EB5CA9FDA /* libResult-iOS.a */; + name = "PromiseKit.root-CorePromise-Foundation"; + productName = "PromiseKit.root-CorePromise-Foundation"; + productReference = 640D7C6CD155FDD858979BF3184F5A49 /* libPromiseKit.root-CorePromise-Foundation.a */; productType = "com.apple.product-type.library.static"; }; - 1F803FF778771424C8085D9971D3840F /* SwiftRLP-iOS */ = { + 064630A81A32C3F755213FAB5B3FAAAB /* SwiftRLP-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = E4CD22EC0D9A9A7E229C67906906F7A4 /* Build configuration list for PBXNativeTarget "SwiftRLP-iOS" */; + buildConfigurationList = E5D6FA6799A44BF6B2EA944785695731 /* Build configuration list for PBXNativeTarget "SwiftRLP-iOS" */; buildPhases = ( - F314FD63C0A0062B8F1A89675ED05324 /* Headers */, - 7554990BF3A60368D06DE120F92AFA9D /* Sources */, - 3AAC28C160F50900EE61CA27D4E2EF5D /* Frameworks */, - B1CDA63AFDA7BE620B34E4FDC752C9EB /* Copy generated compatibility header */, + 6A22A95F9A809B370E0AAE627021502C /* Headers */, + 9CB22439A4403B91380A6D0FF75767DD /* Sources */, + 1600C6BC8C1AD78A95A84E5114873FBD /* Frameworks */, + 43735E5C22EB2EABE184E24809108452 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - 02BA5612135F3D656000F3174E527D10 /* PBXTargetDependency */, + 91A8EB95CC5E24DE78FF51AF4F9F9591 /* PBXTargetDependency */, ); name = "SwiftRLP-iOS"; productName = "SwiftRLP-iOS"; - productReference = FDADCB9A8CD9274EA3AC09BE3B7E0F66 /* libSwiftRLP-iOS.a */; + productReference = 55D3724AA7B8C2CF221E72306FBDCBB5 /* libSwiftRLP-iOS.a */; productType = "com.apple.product-type.library.static"; }; - 3B79F6DB09B597AAE9D3EB939DA463D8 /* SipHash-iOS */ = { + 1084E340C76D167B42F96381D5AC59FB /* EthereumAddress-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = F8A195F0CD637B21B4FABEA84B502663 /* Build configuration list for PBXNativeTarget "SipHash-iOS" */; + buildConfigurationList = 0D0EE0E6A1FF9BACF87641ECD817E450 /* Build configuration list for PBXNativeTarget "EthereumAddress-macOS" */; buildPhases = ( - 7477F92785CFE4A257605FF325BEDCA8 /* Headers */, - 6950A9AD0D066BC48BB15390EA10BE78 /* Sources */, - D2A4B152651F01134ED378054CE50C8D /* Frameworks */, - EDC821DB128FBEFA92BC6BC351D2709A /* Copy generated compatibility header */, + 3CCEBEDFD58277AE688D11C78A90CD24 /* Headers */, + D3545085D966F9E71031F5551A836F21 /* Sources */, + 224FCBB2C53DEF01AF13F9CFC741739D /* Frameworks */, + 506F24A206D803133DAA923324224506 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( + C0C1466C80B5B9098C4ADE3D8D0FF848 /* PBXTargetDependency */, ); - name = "SipHash-iOS"; - productName = "SipHash-iOS"; - productReference = F99CCF5FD903883FB3C524CA2FB43E2C /* libSipHash-iOS.a */; + name = "EthereumAddress-macOS"; + productName = "EthereumAddress-macOS"; + productReference = 4813C1A0F259481060973E85D757C6F8 /* libEthereumAddress-macOS.a */; productType = "com.apple.product-type.library.static"; }; - 4C59270F810F2B1FEC2F3D5A77188907 /* secp256k1_swift-macOS */ = { + 16689698E943DBC08E5169468314C018 /* Result-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 65490D7667F9A157CAE31446FC797991 /* Build configuration list for PBXNativeTarget "secp256k1_swift-macOS" */; + buildConfigurationList = 53B1B04B77AC43178C9F3E8EB7B13F0A /* Build configuration list for PBXNativeTarget "Result-iOS" */; buildPhases = ( - CB3C81D7E2AD5293B63D12B9684C0961 /* Headers */, - F4783445DE7F29598185898BF1D1FA23 /* Sources */, - 05577BA791C80220E64423A3DA803314 /* Frameworks */, - 5EA346A1CAF71500DC1ACEDD14097686 /* Copy generated compatibility header */, + 672DA6ADECF9F10F1DB3A0E8F143BDB6 /* Headers */, + F202AF892C75A508DD88D70F474FBA77 /* Sources */, + 08725796DB76F7D6AE648E2FE6C6F219 /* Frameworks */, + 3D42772EFBD89263E293714128E4BB20 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( ); - name = "secp256k1_swift-macOS"; - productName = "secp256k1_swift-macOS"; - productReference = 4C332617281C7BEB03040C92EF610543 /* libsecp256k1_swift-macOS.a */; + name = "Result-iOS"; + productName = "Result-iOS"; + productReference = 0875934C7BD4393C0A91DFA3CF1FBBED /* libResult-iOS.a */; productType = "com.apple.product-type.library.static"; }; - 4FCBE56BC5E931FDC43C642250037C1F /* SipHash-macOS */ = { + 39C6DF22D4F83A78CB7F52D86381D937 /* secp256k1_swift-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 249649C0D306826B8AEC43AC3D978C98 /* Build configuration list for PBXNativeTarget "SipHash-macOS" */; + buildConfigurationList = A17FF6AB1386D63A1421DD6C0C2217F4 /* Build configuration list for PBXNativeTarget "secp256k1_swift-iOS" */; buildPhases = ( - EC1E56131ACB90EB216C276F366EFECD /* Headers */, - 7BA75396367E53FB54211DB664B4547E /* Sources */, - FA42B5B3447A1D1A233689BB1B366630 /* Frameworks */, - 1B2679AE7A95EBF0FDDB427B7725D76B /* Copy generated compatibility header */, + 735E4C913DD0A46A1F72F4F1C62052E9 /* Headers */, + B849DE3B3663A6CBF97D754340337E57 /* Sources */, + 872D6A3DAA3AC36B6C52474F6BF4CA6D /* Frameworks */, + 8B19A86C041EB3572BC6954373DA0F4C /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( ); - name = "SipHash-macOS"; - productName = "SipHash-macOS"; - productReference = 58D4D38A480BA09A08C8523AF72783C5 /* libSipHash-macOS.a */; + name = "secp256k1_swift-iOS"; + productName = "secp256k1_swift-iOS"; + productReference = 64CF8CD6E98A2DF32A9CBCF71E6AEFAB /* libsecp256k1_swift-iOS.a */; productType = "com.apple.product-type.library.static"; }; - 558049EB555978BC8947ECF2498E78D9 /* PromiseKit.root-CorePromise-Foundation */ = { + 3B79F6DB09B597AAE9D3EB939DA463D8 /* SipHash-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 9CB97BD184404FE5F62F017C3CF306D5 /* Build configuration list for PBXNativeTarget "PromiseKit.root-CorePromise-Foundation" */; + buildConfigurationList = F8A195F0CD637B21B4FABEA84B502663 /* Build configuration list for PBXNativeTarget "SipHash-iOS" */; buildPhases = ( - 7782F816841C0EB71FD1F1F31BE73647 /* Headers */, - 5EF30E27818FB63FE5D68283E679752C /* Sources */, - 3AE77EFED90447A6B1DAC12064BA51E9 /* Frameworks */, - 4F32BCC17F8E7CDDD337CE7D1F53727A /* Copy generated compatibility header */, + 7477F92785CFE4A257605FF325BEDCA8 /* Headers */, + 6950A9AD0D066BC48BB15390EA10BE78 /* Sources */, + D2A4B152651F01134ED378054CE50C8D /* Frameworks */, + EDC821DB128FBEFA92BC6BC351D2709A /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( ); - name = "PromiseKit.root-CorePromise-Foundation"; - productName = "PromiseKit.root-CorePromise-Foundation"; - productReference = A09088A41F90C0893A27DEF1C26D11AB /* libPromiseKit.root-CorePromise-Foundation.a */; + name = "SipHash-iOS"; + productName = "SipHash-iOS"; + productReference = 2F751DF027B3EC6771E69D0DF744E2F1 /* libSipHash-iOS.a */; productType = "com.apple.product-type.library.static"; }; - 566C98B9528CB1527582959B19D87238 /* Pods-web3swift-iOS_Tests */ = { + 4FCBE56BC5E931FDC43C642250037C1F /* SipHash-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 62550B15363844675EDB2F185CB619A8 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS_Tests" */; + buildConfigurationList = 249649C0D306826B8AEC43AC3D978C98 /* Build configuration list for PBXNativeTarget "SipHash-macOS" */; buildPhases = ( - A84BA0453988997BEFD8DEA9765B62E6 /* Headers */, - A27CC87411918F0608EA9F4339733D80 /* Sources */, - 9FA0F642AE177D3FA07814A41F264B1A /* Frameworks */, + EC1E56131ACB90EB216C276F366EFECD /* Headers */, + 7BA75396367E53FB54211DB664B4547E /* Sources */, + FA42B5B3447A1D1A233689BB1B366630 /* Frameworks */, + 1B2679AE7A95EBF0FDDB427B7725D76B /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - F3DDE7BB170DA1519FDDE4BA03AB73FA /* PBXTargetDependency */, ); - name = "Pods-web3swift-iOS_Tests"; - productName = "Pods-web3swift-iOS_Tests"; - productReference = FF66C3EFCA475A91734C76A5D546BE1A /* libPods-web3swift-iOS_Tests.a */; + name = "SipHash-macOS"; + productName = "SipHash-macOS"; + productReference = AB81B5AF636ED4D537F9A819FC7EB086 /* libSipHash-macOS.a */; productType = "com.apple.product-type.library.static"; }; - 73527F6F8B0A792EA5FD7085DADC6B93 /* SwiftRLP-macOS */ = { + 566C98B9528CB1527582959B19D87238 /* Pods-web3swift-iOS_Tests */ = { isa = PBXNativeTarget; - buildConfigurationList = D2A09E63159C968138E6CBA9147D559A /* Build configuration list for PBXNativeTarget "SwiftRLP-macOS" */; + buildConfigurationList = 62550B15363844675EDB2F185CB619A8 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS_Tests" */; buildPhases = ( - CC4236511CD7C868D12303BE91525247 /* Headers */, - AC55CD23CEB47B0B14D8B2BE25385074 /* Sources */, - 2E1C020D358710A3E399DC2793603432 /* Frameworks */, - DCFDAE6889A2F2AA8B57D01D168586DA /* Copy generated compatibility header */, + A84BA0453988997BEFD8DEA9765B62E6 /* Headers */, + A27CC87411918F0608EA9F4339733D80 /* Sources */, + 9FA0F642AE177D3FA07814A41F264B1A /* Frameworks */, ); buildRules = ( ); dependencies = ( - CD84CCD9860362B77E623B72E64A8990 /* PBXTargetDependency */, + F3DDE7BB170DA1519FDDE4BA03AB73FA /* PBXTargetDependency */, ); - name = "SwiftRLP-macOS"; - productName = "SwiftRLP-macOS"; - productReference = 6A0F097AEAD44F8F983B8D4F884FDE42 /* libSwiftRLP-macOS.a */; + name = "Pods-web3swift-iOS_Tests"; + productName = "Pods-web3swift-iOS_Tests"; + productReference = AC8ABBCB10448DB88C79398E3A2D4417 /* libPods-web3swift-iOS_Tests.a */; productType = "com.apple.product-type.library.static"; }; - 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */ = { + 56C190CBC3444CE65376067572B13693 /* Pods-web3swift-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = F03040809733F3691A82F4D1E80B6BA3 /* Build configuration list for PBXNativeTarget "CryptoSwift-macOS" */; + buildConfigurationList = 1A702128138D84E5AE38854422DA92F2 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS" */; buildPhases = ( - D7B2C3E499A784C0C701CFCC848DD377 /* Headers */, - A5A45EF12B04C5C92A3AEF6FB3A93BC5 /* Sources */, - 6F6453F76274AE713CC0D3CD28EB9C36 /* Frameworks */, - 06ED1736EBFFBA57E2FEB73C8DE23910 /* Copy generated compatibility header */, + 88D55B53E0998EAFAEDC2982B9331828 /* Headers */, + 192B436BFD5C2D881B0BF7EEB76DBDEA /* Sources */, + 5740D976E52AA2EB97C2A9F753E1C740 /* Frameworks */, ); buildRules = ( ); dependencies = ( + AECE3A83555371FEE0C000441EA7F746 /* PBXTargetDependency */, + A3C977A971A55D81A3EDB024FEF6F3B7 /* PBXTargetDependency */, + 18AE85A800367509ACE31E973FB46584 /* PBXTargetDependency */, + 0967375AB22B66ADBB9D19EA723B7DA1 /* PBXTargetDependency */, + 1E105E4F2A6BEB962894ADC68D751F0D /* PBXTargetDependency */, + E5418EBD52BE4001ACF1E9B736E61DB4 /* PBXTargetDependency */, + BAD76E8361F4D9801FAF4CAEE1E33A93 /* PBXTargetDependency */, + 7D99355E255D3CAB43E880FCAD7810DB /* PBXTargetDependency */, + A26C0CA8CFB4FEF8510603291FA6567D /* PBXTargetDependency */, + 571654461CE17E7F4576D91D3D7A7721 /* PBXTargetDependency */, ); - name = "CryptoSwift-macOS"; - productName = "CryptoSwift-macOS"; - productReference = 4D5B77EB47B2435BCBF83C39D0D576F5 /* libCryptoSwift-macOS.a */; + name = "Pods-web3swift-iOS"; + productName = "Pods-web3swift-iOS"; + productReference = 2A23509A1B4B9BA0141EB958C32816D4 /* libPods-web3swift-iOS.a */; productType = "com.apple.product-type.library.static"; }; - 7BF3C926294C92422AFB78600D576975 /* scrypt-macOS */ = { + 60BB8021A6290DE4F66E9D4A96906F3C /* Result-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = EC990DC713F41C8185113CC18FD8B395 /* Build configuration list for PBXNativeTarget "scrypt-macOS" */; + buildConfigurationList = 0E6082C161AE699CD11AFE38C72A8ECD /* Build configuration list for PBXNativeTarget "Result-macOS" */; buildPhases = ( - D91516EF5FCA28AFEFF8D262E5ECD885 /* Headers */, - F26428FB9A70DF978834F0A0F8B50B0F /* Sources */, - D45B18240A0BA70F5BD174A232F95C45 /* Frameworks */, - A419CDD858739CE2F6F3DD9DA2F2853A /* Copy generated compatibility header */, + D09211D764D9C5DC439A185C8E1551D8 /* Headers */, + 981295A50198CC22BC99FB891D53C23C /* Sources */, + 25FCBA5B2FFAFF4A3E1CB4180AA265B0 /* Frameworks */, + 98E00FEDAA686C9CD8CF43BECA6FE814 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - D25FD61F0F8712699C186B8B64A1A47B /* PBXTargetDependency */, ); - name = "scrypt-macOS"; - productName = "scrypt-macOS"; - productReference = F4F0BCD366AE2D51D6C35C2192996DBD /* libscrypt-macOS.a */; + name = "Result-macOS"; + productName = "Result-macOS"; + productReference = 5AEA4495CD1CD23847803E6F2009266F /* libResult-macOS.a */; productType = "com.apple.product-type.library.static"; }; - 7ED7E08B2BE4D50AC5F7E73B32DD2203 /* Pods-web3swift-macOS_Tests */ = { + 75EC00B8FD54D720BB772CA16EEAE742 /* EthereumABI-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 91E81CC04B48CAA0AA6D1FB891F14331 /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS_Tests" */; + buildConfigurationList = 41A0D4C0C65EE651AE692E52EC485A28 /* Build configuration list for PBXNativeTarget "EthereumABI-macOS" */; buildPhases = ( - 2F394AD2ED0A538D456609456DB15F4B /* Headers */, - 6F5CC9B499993EA733C785A3803C553D /* Sources */, - 803328A4C9D919A350F04AB5D9FBBC0A /* Frameworks */, + AFEA92F9B8E4F23FDE84709BDC1E70DC /* Headers */, + F24FCB33D2CE51D2A03491918BF5B8F7 /* Sources */, + C057B63C1468DF9D9FB55C472186B940 /* Frameworks */, + BBE72A55EB66D7E4A940F279D9F63711 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - DA81B8EC030393B0ADEBDB02050FCFCB /* PBXTargetDependency */, + C5E73C2BC7125A028DD21893CBB2FEBA /* PBXTargetDependency */, + 894ED1800495B1A047AF49B5D576542E /* PBXTargetDependency */, + 71C496B0EA254126C05B904C7F1E90A1 /* PBXTargetDependency */, ); - name = "Pods-web3swift-macOS_Tests"; - productName = "Pods-web3swift-macOS_Tests"; - productReference = 7573EC5C506627456A38A22DC6C134BA /* libPods-web3swift-macOS_Tests.a */; + name = "EthereumABI-macOS"; + productName = "EthereumABI-macOS"; + productReference = 61858AD8F2BC3FA5B6CE10752824FA45 /* libEthereumABI-macOS.a */; productType = "com.apple.product-type.library.static"; }; - 82C35D316B5E8115E43ACCFE4E50137C /* Pods-web3swift-macOS */ = { + 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 0039F2F377814CD2485BC36E354F85D8 /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS" */; + buildConfigurationList = F03040809733F3691A82F4D1E80B6BA3 /* Build configuration list for PBXNativeTarget "CryptoSwift-macOS" */; buildPhases = ( - 1D082DF5FB317A292B865320EA4330E8 /* Headers */, - 74A501CE727E95B4C6687723037D9862 /* Sources */, - 6EC658BB78F973B687A770E4EC1E8853 /* Frameworks */, + D7B2C3E499A784C0C701CFCC848DD377 /* Headers */, + A5A45EF12B04C5C92A3AEF6FB3A93BC5 /* Sources */, + 6F6453F76274AE713CC0D3CD28EB9C36 /* Frameworks */, + 06ED1736EBFFBA57E2FEB73C8DE23910 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - 9E296E6501EBD5FDE5817558B2BF7E2A /* PBXTargetDependency */, - DCCED206D4BBB569EEFCBD6A2C1BAC88 /* PBXTargetDependency */, - 2055448327DB15BA03467F050E753FB0 /* PBXTargetDependency */, - 9F20C8D399DE8D34DCEEE1FDF42CFCAA /* PBXTargetDependency */, - 985A809AF607C0CA13161FCFE50F4C36 /* PBXTargetDependency */, - 82AAC9DD7930B8C6339DED045709C87D /* PBXTargetDependency */, - FE4F7F2A1F792D695B3070E073F67F11 /* PBXTargetDependency */, - C6510E8CFAB977BE7B6241436DAC4841 /* PBXTargetDependency */, - 1E5CC3B070AA071ADEB9D014A865CC6C /* PBXTargetDependency */, ); - name = "Pods-web3swift-macOS"; - productName = "Pods-web3swift-macOS"; - productReference = 1DF1726C7221A0B7805EF3E180CE8007 /* libPods-web3swift-macOS.a */; + name = "CryptoSwift-macOS"; + productName = "CryptoSwift-macOS"; + productReference = E301EA386C90D10BDC9671660BE64E94 /* libCryptoSwift-macOS.a */; productType = "com.apple.product-type.library.static"; }; - 94906F0C68B58FB4B40554812C3BBFD8 /* PromiseKit */ = { + 7ED7E08B2BE4D50AC5F7E73B32DD2203 /* Pods-web3swift-macOS_Tests */ = { isa = PBXNativeTarget; - buildConfigurationList = 303C8E6272AD70A3BDE63EE51C697D17 /* Build configuration list for PBXNativeTarget "PromiseKit" */; + buildConfigurationList = 91E81CC04B48CAA0AA6D1FB891F14331 /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS_Tests" */; buildPhases = ( - 263A6BE4E6989F362AA0E5FEC75D6EB8 /* Headers */, - D0BD425EF1B48E5B0B78F0ED11C0ECB2 /* Sources */, - 2714EC0418F441D39321DBFD3CFC5BF3 /* Frameworks */, - 129DD7E5FF17BAF38DCB561CC264C271 /* Copy generated compatibility header */, + 2F394AD2ED0A538D456609456DB15F4B /* Headers */, + 6F5CC9B499993EA733C785A3803C553D /* Sources */, + 803328A4C9D919A350F04AB5D9FBBC0A /* Frameworks */, ); buildRules = ( ); dependencies = ( + DA81B8EC030393B0ADEBDB02050FCFCB /* PBXTargetDependency */, ); - name = PromiseKit; - productName = PromiseKit; - productReference = 10E2FD109C104BBFF96C8BEAE5D93A6E /* libPromiseKit.a */; + name = "Pods-web3swift-macOS_Tests"; + productName = "Pods-web3swift-macOS_Tests"; + productReference = 11C198E371333D0B4E1F4A5B168C23C7 /* libPods-web3swift-macOS_Tests.a */; productType = "com.apple.product-type.library.static"; }; - 96225BBE1203595F4D0672A487BB9861 /* secp256k1_swift-iOS */ = { + 8B46DCE922AD4DB52AB389148AB898AB /* scrypt-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 09CA449448E7309DBC21A6BD3E319838 /* Build configuration list for PBXNativeTarget "secp256k1_swift-iOS" */; + buildConfigurationList = 6172FF314CF6FDD0EE7BEB014649095A /* Build configuration list for PBXNativeTarget "scrypt-iOS" */; buildPhases = ( - 7473267694EB25007FA3A05AD22C3D27 /* Headers */, - BBEEDB9A5DAE6E4AB8C4F6B6B2EF4BB2 /* Sources */, - FC3AA5C1EA87DD47338B9100FB46F5DD /* Frameworks */, - 0FC126F948C80B2A20574CD7FEE827AC /* Copy generated compatibility header */, + F861629ACD553268DF434F0F56959DF5 /* Headers */, + 1DBC5B75CBA97552EF84D50D6F053E3F /* Sources */, + 30C84D375526C86BF24F081A4EF0CA55 /* Frameworks */, + CEDD87EC0BBAB26DCC718B994238180F /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( + 6B25264F7EED61228F38A533A55ADB9A /* PBXTargetDependency */, ); - name = "secp256k1_swift-iOS"; - productName = "secp256k1_swift-iOS"; - productReference = 20D278014F2D90DDD7C703E49B6727B7 /* libsecp256k1_swift-iOS.a */; + name = "scrypt-iOS"; + productName = "scrypt-iOS"; + productReference = BF7E9A738647C81A92D68BCF6E734C6B /* libscrypt-iOS.a */; productType = "com.apple.product-type.library.static"; }; 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */ = { @@ -2373,7 +2555,7 @@ ); name = "BigInt-macOS"; productName = "BigInt-macOS"; - productReference = EF13999388904A7883CEA9B745018AAF /* libBigInt-macOS.a */; + productReference = 1A0E65E61932B728FD97FB08D42B3EF6 /* libBigInt-macOS.a */; productType = "com.apple.product-type.library.static"; }; AF9F48E6961507C0E2FD7A3CDBC652DA /* BigInt-iOS */ = { @@ -2392,107 +2574,139 @@ ); name = "BigInt-iOS"; productName = "BigInt-iOS"; - productReference = AC8ED311289866CD8ED870EF0C3C5CF3 /* libBigInt-iOS.a */; + productReference = 4249BBDEF2DD259919D48F146E985928 /* libBigInt-iOS.a */; productType = "com.apple.product-type.library.static"; }; - BAA7945626BCC2CCA0CD2C7A0AC13E79 /* Pods-web3swift-iOS */ = { + E03BC878947EE75B154F4C52126FA465 /* SwiftRLP-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 3EF9AD5BB38D4B8D81F2E10D31B8FC16 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS" */; + buildConfigurationList = 34C02A2A41180F1C49A12F3C94BB6D39 /* Build configuration list for PBXNativeTarget "SwiftRLP-macOS" */; buildPhases = ( - 96B2181F13A512676DE43FB3511AFDDA /* Headers */, - A2ACE7E19845A64A7A861D0789B5556A /* Sources */, - 5266E30913229719A172673D2CC2CC9B /* Frameworks */, + 2F08BE2476997220D34CF9A4B9F6835B /* Headers */, + 7C8DB5921448D3C2CD42DF825BA68B7B /* Sources */, + 215FF64BB8F688F84B3231B77569E5C2 /* Frameworks */, + 3EB91FC9852F50FCD55BE7858C4F2E56 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - 38A31696BE8B09855448DB541DAF6CAF /* PBXTargetDependency */, - 2269634CF395C023BD0DE456EDC0E905 /* PBXTargetDependency */, - 695E61EC945DAB26310EFF15776F8416 /* PBXTargetDependency */, - FCBCE9AAE7712F633822A4305BA498B6 /* PBXTargetDependency */, - 755A1B5E06A6BE022C3FC0DD1BEEE56D /* PBXTargetDependency */, - 2C8BE55B42F306995084EBB384828202 /* PBXTargetDependency */, - 3608CB885D6B6B4B853ECBAC44A93F46 /* PBXTargetDependency */, - 4DC8DD86030434C6B1D0B5A99DEFAD48 /* PBXTargetDependency */, - 6380C782AA285DFB888C8E8249285814 /* PBXTargetDependency */, + 887F9C1C650417E1CBE7406FEDC48DFF /* PBXTargetDependency */, ); - name = "Pods-web3swift-iOS"; - productName = "Pods-web3swift-iOS"; - productReference = D275AC61F658F73CFA8823434BCA3406 /* libPods-web3swift-iOS.a */; + name = "SwiftRLP-macOS"; + productName = "SwiftRLP-macOS"; + productReference = 37A42E23E411D520ADBF58299104A5E4 /* libSwiftRLP-macOS.a */; productType = "com.apple.product-type.library.static"; }; - BB37143ACC20FC450C45EFD6C5660906 /* scrypt-iOS */ = { + E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = D9AC1A700A507419692FC870E90C8799 /* Build configuration list for PBXNativeTarget "scrypt-iOS" */; + buildConfigurationList = 19CA2EF2646C88FC1D5F4864827AF9A9 /* Build configuration list for PBXNativeTarget "CryptoSwift-iOS" */; buildPhases = ( - A8FE7F6CDE2FD821EC0D93ADE70A49E2 /* Headers */, - ADC13DDD5F0DDA1F9E13741ADBA5EB90 /* Sources */, - F8DE994896B53C78B2E78A42E3193FFC /* Frameworks */, - 8ACF3921958AA4E38424E2A472946D83 /* Copy generated compatibility header */, + D9438E55E725BF04D83CC7EC3D4AF915 /* Headers */, + 8FA32F9F48C4C6C1BA1B020B1EACED3A /* Sources */, + 49DDA0C2610D394C727D7031E3440CCF /* Frameworks */, + 1F7D245DDE5F17177A665A72104C9D4D /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - 419DB448EDECEAD154DB39A4EFDB540A /* PBXTargetDependency */, ); - name = "scrypt-iOS"; - productName = "scrypt-iOS"; - productReference = 17F353B4B162974207D9F48A62765D99 /* libscrypt-iOS.a */; + name = "CryptoSwift-iOS"; + productName = "CryptoSwift-iOS"; + productReference = A6F7930650FD31ED4C95EAB12B5DA36F /* libCryptoSwift-iOS.a */; productType = "com.apple.product-type.library.static"; }; - C87C2E6C438181FF7B92161BFC2DFBEB /* Result-macOS */ = { + EC4FD142A8187DC97F5C77E345493DC4 /* PromiseKit */ = { isa = PBXNativeTarget; - buildConfigurationList = 8B657CEEE4B76901522B282FFC7FE8DA /* Build configuration list for PBXNativeTarget "Result-macOS" */; + buildConfigurationList = C3E4E8C71E1F2FC6C63CC4862E81AA7A /* Build configuration list for PBXNativeTarget "PromiseKit" */; buildPhases = ( - EF326D981A695869EEB5F69BCE9A78B8 /* Headers */, - 1C3EF99237B7E5AF16765F5F4EBE5BE1 /* Sources */, - B244EFB510B7723225BAE6675E63CE10 /* Frameworks */, - 1C1219009207B65EA3F5EDD5F43FEA59 /* Copy generated compatibility header */, + BEB0EDBDBADA7FA289A4B00AA8E7EE0C /* Headers */, + B2D0D69A20610EAC9B54E4B5D6B33246 /* Sources */, + 201C2E8B1BBF4EA2C2E855CAD443F07A /* Frameworks */, + 1664729AD7926C68CEAB9CA1D7D7E258 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( ); - name = "Result-macOS"; - productName = "Result-macOS"; - productReference = 75DE42DDF2D327BA352CD0F8C0DA4B0F /* libResult-macOS.a */; + name = PromiseKit; + productName = PromiseKit; + productReference = 9E7C36E885EBC6AB812D67E4B28A9CE4 /* libPromiseKit.a */; productType = "com.apple.product-type.library.static"; }; - E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */ = { + EE65EFBDF686C56EA74D41CCE0304FCC /* scrypt-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 19CA2EF2646C88FC1D5F4864827AF9A9 /* Build configuration list for PBXNativeTarget "CryptoSwift-iOS" */; + buildConfigurationList = 214041070FF7013C5D3B1D956DD404CF /* Build configuration list for PBXNativeTarget "scrypt-macOS" */; buildPhases = ( - D9438E55E725BF04D83CC7EC3D4AF915 /* Headers */, - 8FA32F9F48C4C6C1BA1B020B1EACED3A /* Sources */, - 49DDA0C2610D394C727D7031E3440CCF /* Frameworks */, - 1F7D245DDE5F17177A665A72104C9D4D /* Copy generated compatibility header */, + B71970618A9DDD30CCF100C64EDA8C8C /* Headers */, + 57B025A6EC142DE7E77982E7488CF39E /* Sources */, + 435144EBFB416082687F21AE9FE91D96 /* Frameworks */, + 88F5681CA66294272E1F1C3DCE300CAE /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( + 5FA722F52DC7060EC2D68CC1867BA0B8 /* PBXTargetDependency */, ); - name = "CryptoSwift-iOS"; - productName = "CryptoSwift-iOS"; - productReference = A8865640371B98CE908E1A9A63C4B984 /* libCryptoSwift-iOS.a */; + name = "scrypt-macOS"; + productName = "scrypt-macOS"; + productReference = A1C101B8D6CF3BE7D5E588469BA4647B /* libscrypt-macOS.a */; productType = "com.apple.product-type.library.static"; }; - F5120265F2BDEB78BE6300C2AF965614 /* EthereumAddress-macOS */ = { + F25097D79C7232475816DB85533AC607 /* secp256k1_swift-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 88E198CDBBB0CAA2D5B912F48E5A8119 /* Build configuration list for PBXNativeTarget "EthereumAddress-macOS" */; + buildConfigurationList = 7F2C38356A69928AE969993F66D26974 /* Build configuration list for PBXNativeTarget "secp256k1_swift-macOS" */; buildPhases = ( - 0A517913ECA631FD90F898E1AC9F73FA /* Headers */, - 5C6F1730FAE5A8F910B63E28BED3C00B /* Sources */, - CDD5EEE59EED703D7D057105BF3320CA /* Frameworks */, - 64018E648C861544061787069E1652CF /* Copy generated compatibility header */, + 928D76306ECD6416741AC2FC86980F0C /* Headers */, + D4C45FCB33C5CC67AF6C20176655B09B /* Sources */, + 3B7AC4EF9C63E5F22954D8AF93D04330 /* Frameworks */, + D14E31813C666F7A19A593F9E5E8D029 /* Copy generated compatibility header */, ); buildRules = ( ); dependencies = ( - A22F26BA9F6F020F5AA933DCCC6209D2 /* PBXTargetDependency */, ); - name = "EthereumAddress-macOS"; - productName = "EthereumAddress-macOS"; - productReference = 53C768170DFB632A3ADBD2A703116B8E /* libEthereumAddress-macOS.a */; + name = "secp256k1_swift-macOS"; + productName = "secp256k1_swift-macOS"; + productReference = B43B308FB300789356930844D6B81CF8 /* libsecp256k1_swift-macOS.a */; + productType = "com.apple.product-type.library.static"; + }; + F8C504FC3CE2FB81EF2C3E4175B28B3D /* EthereumAddress-iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = F43F6591A165353F2FE927771835E799 /* Build configuration list for PBXNativeTarget "EthereumAddress-iOS" */; + buildPhases = ( + 5B106CA9B70073DB5FBE37B959133AF3 /* Headers */, + B19CBA1C50E1B009CA741061002F3A8F /* Sources */, + 0CB8E604AAFC039274BE7F9019820464 /* Frameworks */, + 84D15A766EDF77627835C50AF2F46647 /* Copy generated compatibility header */, + ); + buildRules = ( + ); + dependencies = ( + 350D0EA4123E54B176975206BE3381A6 /* PBXTargetDependency */, + ); + name = "EthereumAddress-iOS"; + productName = "EthereumAddress-iOS"; + productReference = 27D0F7DCFEE54028674461B7456DB4EB /* libEthereumAddress-iOS.a */; + productType = "com.apple.product-type.library.static"; + }; + FFBF3D20256EEEEE218C227988266104 /* EthereumABI-iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 485FEBD24BA1178535E81D093E91F648 /* Build configuration list for PBXNativeTarget "EthereumABI-iOS" */; + buildPhases = ( + 583E829B095CF5D84CEA55FCC985C749 /* Headers */, + 2090AC1FA361DDB648C75BB9E2DC4AA0 /* Sources */, + 739BFA7B674F25403C43C426637796E0 /* Frameworks */, + 179C24707C85FAF28343D6C5F58120DD /* Copy generated compatibility header */, + ); + buildRules = ( + ); + dependencies = ( + CECF16F2B83D3A302BFE3AD4E630E4AE /* PBXTargetDependency */, + 4A46F1E40806DBFA5F1546A658BFCCF4 /* PBXTargetDependency */, + 9278A7C03F26BA1E138F7AF44272A463 /* PBXTargetDependency */, + ); + name = "EthereumABI-iOS"; + productName = "EthereumABI-iOS"; + productReference = E692601913F2AB7B6FE40D658E90C7B5 /* libEthereumABI-iOS.a */; productType = "com.apple.product-type.library.static"; }; /* End PBXNativeTarget section */ @@ -2512,7 +2726,7 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = BC988C585F01918CDC758DA84387BAF3 /* Products */; + productRefGroup = 3EC5D1EA5568F6BB631C6A9AD5B40F86 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( @@ -2520,24 +2734,26 @@ 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */, E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */, 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */, - 1168313AEC7524AEDFC1224C6D3C6E44 /* EthereumAddress-iOS */, - F5120265F2BDEB78BE6300C2AF965614 /* EthereumAddress-macOS */, - BAA7945626BCC2CCA0CD2C7A0AC13E79 /* Pods-web3swift-iOS */, + FFBF3D20256EEEEE218C227988266104 /* EthereumABI-iOS */, + 75EC00B8FD54D720BB772CA16EEAE742 /* EthereumABI-macOS */, + F8C504FC3CE2FB81EF2C3E4175B28B3D /* EthereumAddress-iOS */, + 1084E340C76D167B42F96381D5AC59FB /* EthereumAddress-macOS */, + 56C190CBC3444CE65376067572B13693 /* Pods-web3swift-iOS */, 566C98B9528CB1527582959B19D87238 /* Pods-web3swift-iOS_Tests */, - 82C35D316B5E8115E43ACCFE4E50137C /* Pods-web3swift-macOS */, + 023FD8884DE6975FECF83E672E5A51B6 /* Pods-web3swift-macOS */, 7ED7E08B2BE4D50AC5F7E73B32DD2203 /* Pods-web3swift-macOS_Tests */, - 94906F0C68B58FB4B40554812C3BBFD8 /* PromiseKit */, - 558049EB555978BC8947ECF2498E78D9 /* PromiseKit.root-CorePromise-Foundation */, - 12455571B54E567146873FF705359CFE /* Result-iOS */, - C87C2E6C438181FF7B92161BFC2DFBEB /* Result-macOS */, - BB37143ACC20FC450C45EFD6C5660906 /* scrypt-iOS */, - 7BF3C926294C92422AFB78600D576975 /* scrypt-macOS */, - 96225BBE1203595F4D0672A487BB9861 /* secp256k1_swift-iOS */, - 4C59270F810F2B1FEC2F3D5A77188907 /* secp256k1_swift-macOS */, + EC4FD142A8187DC97F5C77E345493DC4 /* PromiseKit */, + 02DC76A9AFBA2BA6CA9EBA39CCD34BCC /* PromiseKit.root-CorePromise-Foundation */, + 16689698E943DBC08E5169468314C018 /* Result-iOS */, + 60BB8021A6290DE4F66E9D4A96906F3C /* Result-macOS */, + 8B46DCE922AD4DB52AB389148AB898AB /* scrypt-iOS */, + EE65EFBDF686C56EA74D41CCE0304FCC /* scrypt-macOS */, + 39C6DF22D4F83A78CB7F52D86381D937 /* secp256k1_swift-iOS */, + F25097D79C7232475816DB85533AC607 /* secp256k1_swift-macOS */, 3B79F6DB09B597AAE9D3EB939DA463D8 /* SipHash-iOS */, 4FCBE56BC5E931FDC43C642250037C1F /* SipHash-macOS */, - 1F803FF778771424C8085D9971D3840F /* SwiftRLP-iOS */, - 73527F6F8B0A792EA5FD7085DADC6B93 /* SwiftRLP-macOS */, + 064630A81A32C3F755213FAB5B3FAAAB /* SwiftRLP-iOS */, + E03BC878947EE75B154F4C52126FA465 /* SwiftRLP-macOS */, ); }; /* End PBXProject section */ @@ -2568,7 +2784,7 @@ shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 0FC126F948C80B2A20574CD7FEE827AC /* Copy generated compatibility header */ = { + 1664729AD7926C68CEAB9CA1D7D7E258 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2577,23 +2793,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.modulemap", + "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/secp256k1_swift-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/PromiseKit-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 129DD7E5FF17BAF38DCB561CC264C271 /* Copy generated compatibility header */ = { + 179C24707C85FAF28343D6C5F58120DD /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2602,23 +2818,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.modulemap", - "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit-umbrella.h", + "${PODS_ROOT}/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/PromiseKit-umbrella.h", + "${BUILT_PRODUCTS_DIR}/EthereumABI-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 18E6AE424D462D0BB6055CFFEA61E572 /* Copy generated compatibility header */ = { + 1B2679AE7A95EBF0FDDB427B7725D76B /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2627,23 +2843,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS.modulemap", + "${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/EthereumAddress-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/SipHash-macOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 1B2679AE7A95EBF0FDDB427B7725D76B /* Copy generated compatibility header */ = { + 1F7D245DDE5F17177A665A72104C9D4D /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2652,23 +2868,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS.modulemap", - "${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/SipHash-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/CryptoSwift-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SipHash/SipHash-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 1C1219009207B65EA3F5EDD5F43FEA59 /* Copy generated compatibility header */ = { + 23E99947867445CF8C69CEFFAFFC0227 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2677,23 +2893,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/Result/Result-macOS.modulemap", - "${PODS_ROOT}/Headers/Public/Result/Result-macOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap", + "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/Result-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/PromiseKit.root-CorePromise-Foundation-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 1F7D245DDE5F17177A665A72104C9D4D /* Copy generated compatibility header */ = { + 3D42772EFBD89263E293714128E4BB20 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2702,23 +2918,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/Result/Result-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/Result/Result-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/CryptoSwift-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/Result-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 48CAA26C5BA7CC4886CFBB5FF41C3C8C /* Copy generated compatibility header */ = { + 3EB91FC9852F50FCD55BE7858C4F2E56 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2727,23 +2943,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap", + "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/BigInt-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/SwiftRLP-macOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 4F32BCC17F8E7CDDD337CE7D1F53727A /* Copy generated compatibility header */ = { + 43735E5C22EB2EABE184E24809108452 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2752,23 +2968,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap", - "${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h", + "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/PromiseKit.root-CorePromise-Foundation-umbrella.h", + "${BUILT_PRODUCTS_DIR}/SwiftRLP-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 5EA346A1CAF71500DC1ACEDD14097686 /* Copy generated compatibility header */ = { + 48CAA26C5BA7CC4886CFBB5FF41C3C8C /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2777,23 +2993,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap", - "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/secp256k1_swift-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/BigInt-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 64018E648C861544061787069E1652CF /* Copy generated compatibility header */ = { + 506F24A206D803133DAA923324224506 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2843,7 +3059,7 @@ shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/BigInt/BigInt-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - 8ACF3921958AA4E38424E2A472946D83 /* Copy generated compatibility header */ = { + 84D15A766EDF77627835C50AF2F46647 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2852,23 +3068,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/scrypt-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/EthereumAddress-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - A419CDD858739CE2F6F3DD9DA2F2853A /* Copy generated compatibility header */ = { + 88F5681CA66294272E1F1C3DCE300CAE /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2893,7 +3109,7 @@ shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - AE8C8A4E08BFF14A2F1693B22AA97C5B /* Copy generated compatibility header */ = { + 8B19A86C041EB3572BC6954373DA0F4C /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2902,23 +3118,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/Result/Result-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/Result/Result-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/Result-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/secp256k1_swift-iOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - B1CDA63AFDA7BE620B34E4FDC752C9EB /* Copy generated compatibility header */ = { + 98E00FEDAA686C9CD8CF43BECA6FE814 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2927,23 +3143,23 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap", - "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/Result/Result-macOS.modulemap", + "${PODS_ROOT}/Headers/Public/Result/Result-macOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/SwiftRLP-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/Result-macOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Result/Result-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; - DCFDAE6889A2F2AA8B57D01D168586DA /* Copy generated compatibility header */ = { + BBE72A55EB66D7E4A940F279D9F63711 /* Copy generated compatibility header */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2952,20 +3168,70 @@ ); inputPaths = ( "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", - "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap", - "${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h", + "${PODS_ROOT}/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap", + "${PODS_ROOT}/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h", ); name = "Copy generated compatibility header"; outputFileListPaths = ( ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", - "${BUILT_PRODUCTS_DIR}/SwiftRLP-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/EthereumABI-macOS-umbrella.h", "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + showEnvVarsInLog = 1; + }; + CEDD87EC0BBAB26DCC718B994238180F /* Copy generated compatibility header */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", + "${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS.modulemap", + "${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS-umbrella.h", + ); + name = "Copy generated compatibility header"; + outputFileListPaths = ( + ); + outputPaths = ( + "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", + "${BUILT_PRODUCTS_DIR}/scrypt-iOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/scrypt/scrypt-iOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + showEnvVarsInLog = 1; + }; + D14E31813C666F7A19A593F9E5E8D029 /* Copy generated compatibility header */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", + "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap", + "${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h", + ); + name = "Copy generated compatibility header"; + outputFileListPaths = ( + ); + outputPaths = ( + "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", + "${BUILT_PRODUCTS_DIR}/secp256k1_swift-macOS-umbrella.h", + "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; showEnvVarsInLog = 1; }; EDC821DB128FBEFA92BC6BC351D2709A /* Copy generated compatibility header */ = { @@ -3026,25 +3292,51 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 1C3EF99237B7E5AF16765F5F4EBE5BE1 /* Sources */ = { + 192B436BFD5C2D881B0BF7EEB76DBDEA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FE52A2BA42E76A122211A8115915233D /* Pods-web3swift-iOS-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1DBC5B75CBA97552EF84D50D6F053E3F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 655C7AAC2D964E8A317BD69CA59F54DE /* AnyError.swift in Sources */, - 4C20F5836E09BEAF0175C7F5D2D45F89 /* NoError.swift in Sources */, - 2F6E8156D02A841E2616F0996781F15F /* Result-macOS-dummy.m in Sources */, - 79C2298346A483DD086B4A9AC7223820 /* Result.swift in Sources */, - 9A899EFE19622CA6723D08C0F8FBB187 /* ResultProtocol.swift in Sources */, + C13DF5C0C3793C734EF3847DE3DFE9A0 /* BufferStorage.swift in Sources */, + AFDE5FB41EA9B22F9F7D1845806B8436 /* Cimpl.c in Sources */, + C9B648C3CD7850DC94E49F5F5329CA81 /* Salsa.swift in Sources */, + B591BC023D1E6A16FCA94930AABFD4E3 /* scrypt-iOS-dummy.m in Sources */, + BC9A423C1774D10E28F894E40D5AE2A3 /* Scrypt.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 4F126988CBC888A0714AF1DA260B78DD /* Sources */ = { + 2090AC1FA361DDB648C75BB9E2DC4AA0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - D38BBC7C8903B9EB7803ECA68167DE20 /* EthereumAddress-iOS-dummy.m in Sources */, - 3D6F8B4564F5BAF43F01ADCFBA720658 /* EthereumAddress.swift in Sources */, - 0F4C148C5393004D090DC7218E39BB39 /* Extensions.swift in Sources */, + B4471EDA97A5344990BA50D90F24AF31 /* ABI.swift in Sources */, + 341353A9C8AA2DF577CD96527EE2225D /* ABIDecoding.swift in Sources */, + 4D7F63CA708D40E84A6C8968CDB4D223 /* ABIElements.swift in Sources */, + 0EE3C6323A8EDEAB638639DD05932581 /* ABIEncoding.swift in Sources */, + B30C88B383282F3BA5CEFF72ADCD6975 /* ABIExtensions.swift in Sources */, + A9A3DCED2AEB2118A087FDC125D5D8A8 /* ABIParameterTypes.swift in Sources */, + 387F8491EE0600C1B119837221A22252 /* ABIParsing.swift in Sources */, + 2477779866B98A08454D05619FA403DC /* ABITypeParser.swift in Sources */, + 57BEB3200D2E2AA64E34C9960AC0A503 /* EthereumABI-iOS-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 57B025A6EC142DE7E77982E7488CF39E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AC932B736284B35ECAD3DB196C2C4533 /* BufferStorage.swift in Sources */, + 5342EFAEB9363EEF4AA9D23C58E28589 /* Cimpl.c in Sources */, + C540A907CA97EA4FB79818D21D2E7CD0 /* Salsa.swift in Sources */, + B50565BC4DBFAF865B10BA46420F7625 /* scrypt-macOS-dummy.m in Sources */, + E211E262D4BD3E0165706646B9DBAD9C /* Scrypt.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3078,55 +3370,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 5C6F1730FAE5A8F910B63E28BED3C00B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 08F8D3D166021760B18C796EF207413F /* EthereumAddress-macOS-dummy.m in Sources */, - DBB230040D2BE00D2D5726E70957B1BE /* EthereumAddress.swift in Sources */, - 73ADC70790A1F8DFBCB7B7F2D1A2264E /* Extensions.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EF30E27818FB63FE5D68283E679752C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0FFEBD2D6ACAE3AC711E0208FCEACC40 /* after.m in Sources */, - C35AFE3E2575CF308C100F43FC2B60CB /* after.swift in Sources */, - F6E2A19F261D93BB5E130674AEF90198 /* afterlife.swift in Sources */, - D575885715CF6B41AEA644EAE2513FE8 /* AnyPromise.m in Sources */, - E85D4BCF4C4214A3340D014F0CB27440 /* AnyPromise.swift in Sources */, - 1EE960C5AF0D4947CD23926FF20C2134 /* Box.swift in Sources */, - 44ACCC6BC3804034F682166BCB280D6C /* Catchable.swift in Sources */, - 0E7F3356235A21C8DEE7CFC67A802552 /* Configuration.swift in Sources */, - 01E1753617A93639EEA9E9A55B0315BA /* CustomStringConvertible.swift in Sources */, - C934E91003F09F0E5C50BD3FAA858A6A /* Deprecations.swift in Sources */, - 4CC995FC29A8A8E8C8C0B0B97A8C5486 /* dispatch_promise.m in Sources */, - 27CC89021B6035E3D3077405BF7D0518 /* Error.swift in Sources */, - 088ADDDC247990129868BE86AAFDD65F /* firstly.swift in Sources */, - E7A8CA29F94135EBCA9E6187C222A42A /* Guarantee.swift in Sources */, - 5C34CEC8C567D8A533F9FA1327868C96 /* hang.m in Sources */, - 459BB256132E1224D00C02FA4678450E /* hang.swift in Sources */, - C462A569CC9699DC1C14CB401D63CF5E /* join.m in Sources */, - A9FA53CE467640689F8095D7B4FC85E1 /* NSNotificationCenter+AnyPromise.m in Sources */, - 27DF4C9F60541A50E1E4C29080D83278 /* NSNotificationCenter+Promise.swift in Sources */, - F59F8D1792721D4062D9597FF2370D53 /* NSObject+Promise.swift in Sources */, - 5E1BA68C47D734105DD418DE2C795B71 /* NSTask+AnyPromise.m in Sources */, - 515FA154B65878E6DEB79E513C7F7FE3 /* NSURLSession+AnyPromise.m in Sources */, - 37B89B7042E76DF933791631E40CB4AB /* NSURLSession+Promise.swift in Sources */, - 3C698382149E46B98B05858131950249 /* Process+Promise.swift in Sources */, - 25ADF91F59CF38DA37B5155F3E4D28B8 /* Promise.swift in Sources */, - 70331820D199129F5DD2EF9609699F32 /* PromiseKit.root-CorePromise-Foundation-dummy.m in Sources */, - 97962E30EE5B5298443D563B897E4308 /* race.m in Sources */, - 0D668C0B0CBE5C06AE7AE80EC0F20207 /* race.swift in Sources */, - CBD35C9BC44BFC266C2B4E310F1EB6F9 /* Resolver.swift in Sources */, - D78C9EA6787B721D75665039BD726BF9 /* Thenable.swift in Sources */, - 8206DF8B40704C8CFE78662D412A422E /* when.m in Sources */, - 78DCC64E4BB4C69177C5391DF4BA6119 /* when.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 6950A9AD0D066BC48BB15390EA10BE78 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -3139,28 +3382,50 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 6F5CC9B499993EA733C785A3803C553D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B6699C206D4772B76BEAF1722CB04572 /* Pods-web3swift-macOS_Tests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 74A501CE727E95B4C6687723037D9862 /* Sources */ = { + 6C32DF8E3D984792A311C4A5FD4645C7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 006C73869D28CFC3C08992F0723EE0C6 /* Pods-web3swift-macOS-dummy.m in Sources */, + CFBF7084F0841CB8777A37BC16092662 /* after.m in Sources */, + 6A6F08C9310263A607DD61DF9EC1EA5F /* after.swift in Sources */, + 4ABF0E379FBEF92B4F0B8B68CBE09230 /* afterlife.swift in Sources */, + 0698C088B99DA6A050F31AABA173ED61 /* AnyPromise.m in Sources */, + 52E178194B9296D51D79BF2B7A4F7BA5 /* AnyPromise.swift in Sources */, + 857A105811C550ED97B48E423769E135 /* Box.swift in Sources */, + 3851107FB3FA5A4E70BE628AF438BC19 /* Catchable.swift in Sources */, + 509748BEA3EC752BC3A2AC9B055DE91C /* Configuration.swift in Sources */, + 64B09F51D747BE80ACF3869000E89585 /* CustomStringConvertible.swift in Sources */, + 0BE78CEAD41114017D74519E3B67A0A2 /* Deprecations.swift in Sources */, + 33E0957D577926FA5916FE4D0A9A431A /* dispatch_promise.m in Sources */, + DE9F01F9CE4B8C74DB084D584C1F4DF7 /* Error.swift in Sources */, + 46930C6A0C648E4A7A0830282F53E996 /* firstly.swift in Sources */, + FCA65EE46FA16DBEA0AD94E3C1C2FD03 /* Guarantee.swift in Sources */, + 2688E6C9E4E219F10E1154D94A3353B5 /* hang.m in Sources */, + 82C94A26B21102E331D831274DF3E5F3 /* hang.swift in Sources */, + AEE97FC60DDB4995F16A1796F5B56C1B /* join.m in Sources */, + 969296ED15F25F2DBDFA4E8DE7A3F15C /* NSNotificationCenter+AnyPromise.m in Sources */, + D7EC50261154FE1C386EDF60B128A90F /* NSNotificationCenter+Promise.swift in Sources */, + 84921E76FF03F22869F7FD1C2CC044B0 /* NSObject+Promise.swift in Sources */, + 0E5539016575272AA3BFC2BEC1D7EB53 /* NSTask+AnyPromise.m in Sources */, + 81AEF5216BF27FF1FAF23471914CFB03 /* NSURLSession+AnyPromise.m in Sources */, + 6970C806A3C7873A22DA26802EE63912 /* NSURLSession+Promise.swift in Sources */, + 842761D17768C84E2B62EECED7A7A656 /* Process+Promise.swift in Sources */, + DD67FFA8EE4F3833E14B823CEE55424B /* Promise.swift in Sources */, + 4AFCC9EC62D8433A0A0083506BFA0830 /* PromiseKit.root-CorePromise-Foundation-dummy.m in Sources */, + 937080F5624E366ADA825757B45DEE90 /* race.m in Sources */, + F281004328C1EE7335B9F8B4DF6D8F0B /* race.swift in Sources */, + 1D9EE21994BB9C1FDCBA47554188C89B /* Resolver.swift in Sources */, + 2369A748CC5CAD0D29225D30090B0131 /* Thenable.swift in Sources */, + F0444E1F4E7C762ECC68CF056B05412E /* when.m in Sources */, + FF7A4D23C449D4BB4A93095BB9F4ECA5 /* when.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7554990BF3A60368D06DE120F92AFA9D /* Sources */ = { + 6F5CC9B499993EA733C785A3803C553D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - AB9036DA4C5904627604A28671470C5A /* RLP.swift in Sources */, - 408DA994AB51EFFDD47DA8B29108EB0D /* SwiftRLP-iOS-dummy.m in Sources */, + B6699C206D4772B76BEAF1722CB04572 /* Pods-web3swift-macOS_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3176,6 +3441,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 7C8DB5921448D3C2CD42DF825BA68B7B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6C983FCC57A9424B92E0AD5F05317431 /* RLP.swift in Sources */, + F5AE13A73A33CAF4BA119DDEBCAC5809 /* SwiftRLP-macOS-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8FA32F9F48C4C6C1BA1B020B1EACED3A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -3258,31 +3532,32 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9C8F84D70CD3951B1660E208CB29441B /* Sources */ = { + 981295A50198CC22BC99FB891D53C23C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E26B96712A33AB8CE72BA17C152736E8 /* AnyError.swift in Sources */, - 2AFFA6CFA6FD4C6C4CF3FE7F256F8B04 /* NoError.swift in Sources */, - 3379FA9A4DA05C88936306809AC0EADA /* Result-iOS-dummy.m in Sources */, - E4831746A0E266E025EE80BCA4EF3BFD /* Result.swift in Sources */, - 228339669ABE224EA8C7AE49DC9EE0F8 /* ResultProtocol.swift in Sources */, + 8104031319BC96F60BFD0F501909D797 /* AnyError.swift in Sources */, + 162C34742BB8CDD3E2987A46C854F282 /* NoError.swift in Sources */, + 149D4B201B632E438223FBA71B4394D3 /* Result-macOS-dummy.m in Sources */, + 12E9BA35700BF9E489BC75ABC6088E61 /* Result.swift in Sources */, + 856C7A8C7D4956726A7299BEFBC01C49 /* ResultProtocol.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - A27CC87411918F0608EA9F4339733D80 /* Sources */ = { + 9CB22439A4403B91380A6D0FF75767DD /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 3A611A77C4E834E1E7F375E6362DB0D7 /* Pods-web3swift-iOS_Tests-dummy.m in Sources */, + 8C8D2A38239F1CDA6CB302EFEA1E18B4 /* RLP.swift in Sources */, + D3B166774A35F98D4C599A9B4DCBDC82 /* SwiftRLP-iOS-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - A2ACE7E19845A64A7A861D0789B5556A /* Sources */ = { + A27CC87411918F0608EA9F4339733D80 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - EB0DEA3194A067ADEF216B5AEB36E957 /* Pods-web3swift-iOS-dummy.m in Sources */, + 3A611A77C4E834E1E7F375E6362DB0D7 /* Pods-web3swift-iOS_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3368,132 +3643,167 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - AC55CD23CEB47B0B14D8B2BE25385074 /* Sources */ = { + B19CBA1C50E1B009CA741061002F3A8F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D32E984FBE218628DC804D3F92B394BF /* EthereumAddress-iOS-dummy.m in Sources */, + 4A46B113C4612B07CA848FC63240296D /* EthereumAddress.swift in Sources */, + 2143F6BFBCB27696AC66E1E88312361D /* Extensions.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B2D0D69A20610EAC9B54E4B5D6B33246 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 407A49373ABBE880240E941F98D7F117 /* after.m in Sources */, + 551E69D2CA91185ACDFCBFDE5505A63F /* after.swift in Sources */, + 4B0E14BAB8E59688BEDD2B5C94E261FA /* afterlife.swift in Sources */, + 46374BB7EC19111A4297CFE9832387F6 /* AnyPromise.m in Sources */, + 16DEF17C280AFAD959ECEED27F7FDCD6 /* AnyPromise.swift in Sources */, + F3B4A2958AB11045072673A69A78A808 /* Box.swift in Sources */, + E6E4C025FE5F1391E96A65CF5F594591 /* Catchable.swift in Sources */, + C1D9D7ECEE62A04544DFA4A2889BCC7D /* Configuration.swift in Sources */, + DE020DA46E23F23DCCFAE08D581C1210 /* CustomStringConvertible.swift in Sources */, + DE0C833855F30BFD02D7F624009AFCE5 /* Deprecations.swift in Sources */, + A7D96D76C3CF2A958DEDBFD4524D7526 /* dispatch_promise.m in Sources */, + 9F8C5B0AB545F419AF2F97CCD7224BB8 /* Error.swift in Sources */, + AEC703672CF0251F4AE1B807443AA2DF /* firstly.swift in Sources */, + 44C09B849F87D5EC7B9C8348E301AB1B /* Guarantee.swift in Sources */, + 6B2DC610BB5ACC7953553D5C4FA39033 /* hang.m in Sources */, + D486D63B958DFDD8C755799433969946 /* hang.swift in Sources */, + 2A7E41504F95438DB79E852FB720F8B8 /* join.m in Sources */, + FB5F656078445F49C1D464089236D551 /* NSNotificationCenter+AnyPromise.m in Sources */, + A94EC8DF49968D812DEDDAD218DDAE1E /* NSNotificationCenter+Promise.swift in Sources */, + 06AFCBEE04085CA117D6CEA63CF64C27 /* NSObject+Promise.swift in Sources */, + BCE563F1B7FA756C138FC28179851EC7 /* NSTask+AnyPromise.m in Sources */, + 64B44E304433C6993AB07F47614BBC5E /* NSURLSession+AnyPromise.m in Sources */, + 1C4DEFB88F8A0938532DA2184D2402AC /* NSURLSession+Promise.swift in Sources */, + 8BA4D38F41C7AD0545B23BB7671C2114 /* Process+Promise.swift in Sources */, + B95242B48A9EBE0FD2ED1CBD13BCF4E7 /* Promise.swift in Sources */, + B4551C11886444FD0ECFCE0F05367412 /* PromiseKit-dummy.m in Sources */, + 7BE64ADC0FA2EBA004233D25BA3BA004 /* race.m in Sources */, + 201B3540FF03FB8315A0024F4467C68F /* race.swift in Sources */, + 25851E22505E49BED0DF4DAE6C033724 /* Resolver.swift in Sources */, + 0C67CB16C374D9368E38EB149B7CEEF8 /* Thenable.swift in Sources */, + 11F368D67F8A1E7E97B1DBD198C94069 /* UIView+AnyPromise.m in Sources */, + 25F9AEA143C2B354BBD7BEEEDECF6116 /* UIView+Promise.swift in Sources */, + BF3DECFBE86EB35CFAC5BAE1C0268391 /* UIViewController+AnyPromise.m in Sources */, + 69A4B05BCEDEACD5C3C10D2B2913F919 /* UIViewPropertyAnimator+Promise.swift in Sources */, + E667D403FE161578DA4BD7A748C01FE0 /* when.m in Sources */, + 7AFF4F6002793DD750318A9334D3BB0F /* when.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B849DE3B3663A6CBF97D754340337E57 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DD79FE3BB4C3C7D3A923E6CC1B66064A /* RLP.swift in Sources */, - AA93CBB28A057A39E3A55586997114BD /* SwiftRLP-macOS-dummy.m in Sources */, + 8B3520FF1C6F9AE9FC4CB782022EBDB8 /* lax_der_parsing.c in Sources */, + F6B78FA78EDE2C42ECDEE022019AB812 /* lax_der_privatekey_parsing.c in Sources */, + 73197ACF23C4CCEC651FB50DA6AF71A9 /* secp256k1.c in Sources */, + 9C1D45EE7F4C75C150166F58C0C5827F /* secp256k1.swift in Sources */, + D6DCA066BC93D939AC99A4E197574317 /* secp256k1_swift-iOS-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - ADC13DDD5F0DDA1F9E13741ADBA5EB90 /* Sources */ = { + D2D23DE9E3DD97F661D39734C713DFCD /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 4E0086DE48C75B11B8E2D08041EEA2A5 /* BufferStorage.swift in Sources */, - D04010B8C8B3844F185CA1437FFF5118 /* Cimpl.c in Sources */, - B8B0732D6BD64650E99A7C362E617FA8 /* Salsa.swift in Sources */, - 319DAAEE886E1752C38A946984071408 /* scrypt-iOS-dummy.m in Sources */, - 7C4A904DCA206E41A88861F990CDE0BC /* Scrypt.swift in Sources */, + C89964A06EC88B3B556310F199344D68 /* Pods-web3swift-macOS-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - BBEEDB9A5DAE6E4AB8C4F6B6B2EF4BB2 /* Sources */ = { + D3545085D966F9E71031F5551A836F21 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8972ED44B8E31FAE3C248BBCCB8E7CC4 /* lax_der_parsing.c in Sources */, - 014401F351E5C79C50E62052E8AD671C /* lax_der_privatekey_parsing.c in Sources */, - EEBBD653ACE1E18F44D391EC926D1EF9 /* secp256k1.c in Sources */, - A373AD2926D810C1056D9FECF17DD66D /* secp256k1.swift in Sources */, - BD755CD92BD7C02AF8A0A289DC9E8446 /* secp256k1_swift-iOS-dummy.m in Sources */, + 47CD85DFCA1848F901AAB6D6F6F1DC78 /* EthereumAddress-macOS-dummy.m in Sources */, + 6AAD33E6E1945969931C25BAD27B42BA /* EthereumAddress.swift in Sources */, + E5EFEA69608F27C359D3B7989D25F0B1 /* Extensions.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - D0BD425EF1B48E5B0B78F0ED11C0ECB2 /* Sources */ = { + D4C45FCB33C5CC67AF6C20176655B09B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - EEB835EB989FDE954E0253B6BED77F43 /* after.m in Sources */, - 5E141CAFCF233DCA8F297AA169BA6AE7 /* after.swift in Sources */, - 09F1AC7E0FE7F27B9029F4B3D06DD73E /* afterlife.swift in Sources */, - 1026302AD9FDCB8A55CB7EBB06DA0D7F /* AnyPromise.m in Sources */, - 804014B054A6AF38DF4D8859000D64D4 /* AnyPromise.swift in Sources */, - F9451AAFCEDF04CB35C64C98192AC819 /* Box.swift in Sources */, - D937FEA1E574089DEF1B2FF475B3F2B7 /* Catchable.swift in Sources */, - D33063EEBD209F32520B754AD30B31A8 /* Configuration.swift in Sources */, - DF4ECF7A425192C1C45C4AB1E9BAE553 /* CustomStringConvertible.swift in Sources */, - 87C3D298B9E9216D388BA5B0D015EE50 /* Deprecations.swift in Sources */, - F9D3A99DCE33C06801BDC5EBADEDFDA9 /* dispatch_promise.m in Sources */, - CA0DC69F0F366577F4021A1FB04730B2 /* Error.swift in Sources */, - 00CE1E56028E70F6A410464BB8266F28 /* firstly.swift in Sources */, - 25DB619FFE4DED74D902A70CD2642ED4 /* Guarantee.swift in Sources */, - 21B1C23EA3CD320C60DE1B2C4F849A2C /* hang.m in Sources */, - E75EA18FC026B0FE0E943667D597D909 /* hang.swift in Sources */, - 376C09B5EF8BAEF6D7450FDD24DA2530 /* join.m in Sources */, - 506BDA80E1D1FADE6D2EAE8FE6533C13 /* NSNotificationCenter+AnyPromise.m in Sources */, - 1B2C98EB955D193734DA944CDBAF4CBB /* NSNotificationCenter+Promise.swift in Sources */, - 54275399FAE4959C9EEAC7C7E8EA2031 /* NSObject+Promise.swift in Sources */, - F4F971E86909084B5DE98EB247D30EAF /* NSTask+AnyPromise.m in Sources */, - 5BFB61E4B72C16BDD714663095E1E602 /* NSURLSession+AnyPromise.m in Sources */, - CD433301876DFD79558B30167DD81DED /* NSURLSession+Promise.swift in Sources */, - B725B5E58DF7010A5CED552276526B66 /* Process+Promise.swift in Sources */, - 274467E80B57985D276837BC38F63C9C /* Promise.swift in Sources */, - 48D821F48A258CA9FCC0524545AF23B3 /* PromiseKit-dummy.m in Sources */, - A88812CCF543A4485A540AE2567B4B88 /* race.m in Sources */, - 0676D57F5CE425CA83CAA976ED4030D7 /* race.swift in Sources */, - 11235690EFCBB5F0EBC4A56A7E3AB2DA /* Resolver.swift in Sources */, - 1B7BD089E927617EA26BDF05EAA765A2 /* Thenable.swift in Sources */, - 27068BF23AE89103AC017DCE533A0B84 /* UIView+AnyPromise.m in Sources */, - D6BEC5D8B88A2BF435ADEDDA2505900A /* UIView+Promise.swift in Sources */, - 2AC384703D326D9D63AC130A9FFAF78E /* UIViewController+AnyPromise.m in Sources */, - 6D0468F188D17EFAC5C4655473D99D74 /* UIViewPropertyAnimator+Promise.swift in Sources */, - 0B8DCF4FC4B4CC3F687AC9FB1E97504C /* when.m in Sources */, - 899F8A018D26D3A321EB0481C091847F /* when.swift in Sources */, + 11B9993FADEB6211B59663345DE5E978 /* lax_der_parsing.c in Sources */, + DDAAEE587CECD365E4372D6AEF67D713 /* lax_der_privatekey_parsing.c in Sources */, + BF3AD846ADBFAF021EE70996A7ED071A /* secp256k1.c in Sources */, + F58374064F4B7EFE824BF746EABBEE37 /* secp256k1.swift in Sources */, + 39681148F2D32BE962A511F427CD42ED /* secp256k1_swift-macOS-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - F26428FB9A70DF978834F0A0F8B50B0F /* Sources */ = { + F202AF892C75A508DD88D70F474FBA77 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 4D47DC986746CEF8703D74068A8201C3 /* BufferStorage.swift in Sources */, - 6663694C763AF2F46E6A548540FADB3C /* Cimpl.c in Sources */, - 599CEF91B917F7C8758E1E13C50B2A90 /* Salsa.swift in Sources */, - E2F52C65710FEE56EBABD1C599E031E2 /* scrypt-macOS-dummy.m in Sources */, - D1F87BF791595C2F5B4A86F445081ED5 /* Scrypt.swift in Sources */, + 2469775BF29544EFC833E726E761A6D5 /* AnyError.swift in Sources */, + 0194087258D01A6AAD57DD0DCF7F9971 /* NoError.swift in Sources */, + 153311AB46ACF9C1960DF5E52EF0E7B9 /* Result-iOS-dummy.m in Sources */, + 3415B2D18705344A178286314A9C0038 /* Result.swift in Sources */, + 803429C07CB9F5378967751502E38A45 /* ResultProtocol.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - F4783445DE7F29598185898BF1D1FA23 /* Sources */ = { + F24FCB33D2CE51D2A03491918BF5B8F7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E262F38BE8D55B54CB886EAC66214BFD /* lax_der_parsing.c in Sources */, - 4CDD68A843BFBB60D9186F29785293F9 /* lax_der_privatekey_parsing.c in Sources */, - 9786160112EBD1D91A7AB61E7E585A09 /* secp256k1.c in Sources */, - 5F569BB3EF9E99550253E3309677BFD7 /* secp256k1.swift in Sources */, - 4876BE2384F8243077AD5F55AB07AC4B /* secp256k1_swift-macOS-dummy.m in Sources */, + EC534D19303041971EDE9C1C79A0F5FF /* ABI.swift in Sources */, + ACC598D7BAEB964F6A2E8BA38307C4F6 /* ABIDecoding.swift in Sources */, + E3D91DEF848307121405F35618B723BA /* ABIElements.swift in Sources */, + 5BFC536A9D0ED05F329623FFFE9B9C6C /* ABIEncoding.swift in Sources */, + 31648EA9AB41381E4C683FCFD69B5B97 /* ABIExtensions.swift in Sources */, + AE317D2940830F9B289A00565CE59FE6 /* ABIParameterTypes.swift in Sources */, + B747E0DC81EB6CFCD9751A67CC0C6D17 /* ABIParsing.swift in Sources */, + CF08F59B4689BEF43A5B7F883C330BBB /* ABITypeParser.swift in Sources */, + EB4F4E8A7A76E8F00B6B6B9D5D93C6BE /* EthereumABI-macOS-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 02BA5612135F3D656000F3174E527D10 /* PBXTargetDependency */ = { + 02659AE1B67C7B1511ABF2C7A04E2B4E /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "BigInt-iOS"; - target = AF9F48E6961507C0E2FD7A3CDBC652DA /* BigInt-iOS */; - targetProxy = E4535F8068DAE0F786E0E402D0C94ABE /* PBXContainerItemProxy */; + name = "EthereumAddress-macOS"; + target = 1084E340C76D167B42F96381D5AC59FB /* EthereumAddress-macOS */; + targetProxy = 4BC1B5C55B9E19379BFD1419C6475244 /* PBXContainerItemProxy */; }; - 1E5CC3B070AA071ADEB9D014A865CC6C /* PBXTargetDependency */ = { + 0967375AB22B66ADBB9D19EA723B7DA1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "secp256k1_swift-macOS"; - target = 4C59270F810F2B1FEC2F3D5A77188907 /* secp256k1_swift-macOS */; - targetProxy = BB90BB48F65D5795C75190C5B68C55DA /* PBXContainerItemProxy */; + name = "EthereumAddress-iOS"; + target = F8C504FC3CE2FB81EF2C3E4175B28B3D /* EthereumAddress-iOS */; + targetProxy = 1074B809BD71CC2DC821BC5E173A4740 /* PBXContainerItemProxy */; }; - 2055448327DB15BA03467F050E753FB0 /* PBXTargetDependency */ = { + 0D545F5A0BAC11E9ED61D880B15A786E /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "EthereumAddress-macOS"; - target = F5120265F2BDEB78BE6300C2AF965614 /* EthereumAddress-macOS */; - targetProxy = FC1CF70CADD772EA1F635C39F8E9A792 /* PBXContainerItemProxy */; + name = "PromiseKit.root-CorePromise-Foundation"; + target = 02DC76A9AFBA2BA6CA9EBA39CCD34BCC /* PromiseKit.root-CorePromise-Foundation */; + targetProxy = FE86C0598E860121877FB385FC2747CE /* PBXContainerItemProxy */; }; - 2269634CF395C023BD0DE456EDC0E905 /* PBXTargetDependency */ = { + 18AE85A800367509ACE31E973FB46584 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "CryptoSwift-iOS"; - target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; - targetProxy = 13C00F95FF864E5C7AAC5B0A5CB8498F /* PBXContainerItemProxy */; + name = "EthereumABI-iOS"; + target = FFBF3D20256EEEEE218C227988266104 /* EthereumABI-iOS */; + targetProxy = 12BDC3CC8385F7A17B4C9A4084570897 /* PBXContainerItemProxy */; + }; + 1E105E4F2A6BEB962894ADC68D751F0D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PromiseKit; + target = EC4FD142A8187DC97F5C77E345493DC4 /* PromiseKit */; + targetProxy = D23A20FA7224632C3A5FE8EA34DEF1D4 /* PBXContainerItemProxy */; + }; + 1E9BAABB9A2D27A10CA18AA0AB29D19A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "CryptoSwift-macOS"; + target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; + targetProxy = EDCBD08F51F8B9B91035148948A48489 /* PBXContainerItemProxy */; }; 2A5B940C38D42B8D734A160124EFFE9A /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -3501,95 +3811,143 @@ target = 3B79F6DB09B597AAE9D3EB939DA463D8 /* SipHash-iOS */; targetProxy = AC378E3E20AF5D424B6D68F67641CFC3 /* PBXContainerItemProxy */; }; - 2C8BE55B42F306995084EBB384828202 /* PBXTargetDependency */ = { + 350D0EA4123E54B176975206BE3381A6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "SipHash-iOS"; - target = 3B79F6DB09B597AAE9D3EB939DA463D8 /* SipHash-iOS */; - targetProxy = C0F3CE7136EDD63588CA49A936A5759F /* PBXContainerItemProxy */; + name = "CryptoSwift-iOS"; + target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; + targetProxy = 6AE3006AF993F15800127DD3F057F155 /* PBXContainerItemProxy */; }; - 3608CB885D6B6B4B853ECBAC44A93F46 /* PBXTargetDependency */ = { + 4A46F1E40806DBFA5F1546A658BFCCF4 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "SwiftRLP-iOS"; - target = 1F803FF778771424C8085D9971D3840F /* SwiftRLP-iOS */; - targetProxy = 97F0040393FC590BA7564498436EC95D /* PBXContainerItemProxy */; + name = "CryptoSwift-iOS"; + target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; + targetProxy = 5E5A5367425FAE2AC8C07569D7CBE881 /* PBXContainerItemProxy */; }; - 38A31696BE8B09855448DB541DAF6CAF /* PBXTargetDependency */ = { + 571654461CE17E7F4576D91D3D7A7721 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "BigInt-iOS"; - target = AF9F48E6961507C0E2FD7A3CDBC652DA /* BigInt-iOS */; - targetProxy = E2571A8251835112EFDDA05DFB2E5DB7 /* PBXContainerItemProxy */; + name = "secp256k1_swift-iOS"; + target = 39C6DF22D4F83A78CB7F52D86381D937 /* secp256k1_swift-iOS */; + targetProxy = E3D60F25AD4AFCD3E199C418A6BEC4CB /* PBXContainerItemProxy */; }; - 419DB448EDECEAD154DB39A4EFDB540A /* PBXTargetDependency */ = { + 5FA722F52DC7060EC2D68CC1867BA0B8 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "CryptoSwift-iOS"; - target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; - targetProxy = ED9EA08A437EDE511FD5DFDA715E57C7 /* PBXContainerItemProxy */; + name = "CryptoSwift-macOS"; + target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; + targetProxy = 42C05260B28DAAAD5E44B471A57BDE2A /* PBXContainerItemProxy */; }; - 41F78C658B3F9F5219DDE2ECF3E07F6D /* PBXTargetDependency */ = { + 64216B85F5A267A4A8A29E2853348D52 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "SwiftRLP-macOS"; + target = E03BC878947EE75B154F4C52126FA465 /* SwiftRLP-macOS */; + targetProxy = C2A6BB71B66A804F107BDE387EED9DFB /* PBXContainerItemProxy */; + }; + 6B25264F7EED61228F38A533A55ADB9A /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "CryptoSwift-iOS"; target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; - targetProxy = F6D2E7AC0942F82635983E5CBB33D700 /* PBXContainerItemProxy */; + targetProxy = 20A317B02DEAB0C5E12252BAD3678AC3 /* PBXContainerItemProxy */; }; - 4DC8DD86030434C6B1D0B5A99DEFAD48 /* PBXTargetDependency */ = { + 71225E4B8AE60381FB07D307E4B6D4D6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "scrypt-iOS"; - target = BB37143ACC20FC450C45EFD6C5660906 /* scrypt-iOS */; - targetProxy = CF619704DBA07523055F8D5648DDBAC5 /* PBXContainerItemProxy */; + name = "scrypt-macOS"; + target = EE65EFBDF686C56EA74D41CCE0304FCC /* scrypt-macOS */; + targetProxy = 9619E33BB76CA82AF5BCFD855D8DE72E /* PBXContainerItemProxy */; }; - 6380C782AA285DFB888C8E8249285814 /* PBXTargetDependency */ = { + 71C496B0EA254126C05B904C7F1E90A1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "secp256k1_swift-iOS"; - target = 96225BBE1203595F4D0672A487BB9861 /* secp256k1_swift-iOS */; - targetProxy = E34A7F6994A6A82EB46702FB69724C37 /* PBXContainerItemProxy */; + name = "EthereumAddress-macOS"; + target = 1084E340C76D167B42F96381D5AC59FB /* EthereumAddress-macOS */; + targetProxy = 2D8C658A18F2B96B45403A04ECD943E9 /* PBXContainerItemProxy */; }; - 695E61EC945DAB26310EFF15776F8416 /* PBXTargetDependency */ = { + 727A2BB019C3EBC7776A2D069690F4A6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "EthereumAddress-iOS"; - target = 1168313AEC7524AEDFC1224C6D3C6E44 /* EthereumAddress-iOS */; - targetProxy = 2A170694DEDAF59456D7141DB9F7FACC /* PBXContainerItemProxy */; + name = "SipHash-macOS"; + target = 4FCBE56BC5E931FDC43C642250037C1F /* SipHash-macOS */; + targetProxy = 381F95DA9E2FDB23DE4AB413195C40C2 /* PBXContainerItemProxy */; }; - 755A1B5E06A6BE022C3FC0DD1BEEE56D /* PBXTargetDependency */ = { + 7D99355E255D3CAB43E880FCAD7810DB /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "Result-iOS"; - target = 12455571B54E567146873FF705359CFE /* Result-iOS */; - targetProxy = 38BDFC13BA428BD451594A459B74A302 /* PBXContainerItemProxy */; + name = "SwiftRLP-iOS"; + target = 064630A81A32C3F755213FAB5B3FAAAB /* SwiftRLP-iOS */; + targetProxy = 48C230599D2897ADA99AF94AE1966B79 /* PBXContainerItemProxy */; }; - 82AAC9DD7930B8C6339DED045709C87D /* PBXTargetDependency */ = { + 887F9C1C650417E1CBE7406FEDC48DFF /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "SipHash-macOS"; - target = 4FCBE56BC5E931FDC43C642250037C1F /* SipHash-macOS */; - targetProxy = 881B896164342E47B02F93B29ADA3355 /* PBXContainerItemProxy */; + name = "BigInt-macOS"; + target = 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */; + targetProxy = 714B2335333EF3361207DF61B815EABB /* PBXContainerItemProxy */; + }; + 894ED1800495B1A047AF49B5D576542E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "CryptoSwift-macOS"; + target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; + targetProxy = 59F60AFE805CEBB2EDEC5D68F84B1576 /* PBXContainerItemProxy */; + }; + 8B85536E7A2A3FC702D31FFB0CE7E18A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "secp256k1_swift-macOS"; + target = F25097D79C7232475816DB85533AC607 /* secp256k1_swift-macOS */; + targetProxy = 629DA96E2410B6F480F103C731020B15 /* PBXContainerItemProxy */; + }; + 91A8EB95CC5E24DE78FF51AF4F9F9591 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "BigInt-iOS"; + target = AF9F48E6961507C0E2FD7A3CDBC652DA /* BigInt-iOS */; + targetProxy = 36A6BC9A8529E6996209859ED7E7041A /* PBXContainerItemProxy */; + }; + 9278A7C03F26BA1E138F7AF44272A463 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "EthereumAddress-iOS"; + target = F8C504FC3CE2FB81EF2C3E4175B28B3D /* EthereumAddress-iOS */; + targetProxy = DCA19D3862551FBDC00AAF6455703513 /* PBXContainerItemProxy */; }; - 985A809AF607C0CA13161FCFE50F4C36 /* PBXTargetDependency */ = { + 9C5DDB2602B091154A843E950D482712 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "Result-macOS"; - target = C87C2E6C438181FF7B92161BFC2DFBEB /* Result-macOS */; - targetProxy = 1D311CE48C7A73E73FD12595C75A78C9 /* PBXContainerItemProxy */; + target = 60BB8021A6290DE4F66E9D4A96906F3C /* Result-macOS */; + targetProxy = 099BB689D5DBD5D5DEBA336FBD217742 /* PBXContainerItemProxy */; }; - 9E296E6501EBD5FDE5817558B2BF7E2A /* PBXTargetDependency */ = { + A26C0CA8CFB4FEF8510603291FA6567D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "BigInt-macOS"; - target = 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */; - targetProxy = E3B6F092EBFA691E0A430BD173868EE2 /* PBXContainerItemProxy */; + name = "scrypt-iOS"; + target = 8B46DCE922AD4DB52AB389148AB898AB /* scrypt-iOS */; + targetProxy = AD688405EBF3846C3A14C36C7F7467F8 /* PBXContainerItemProxy */; }; - 9F20C8D399DE8D34DCEEE1FDF42CFCAA /* PBXTargetDependency */ = { + A3C977A971A55D81A3EDB024FEF6F3B7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "PromiseKit.root-CorePromise-Foundation"; - target = 558049EB555978BC8947ECF2498E78D9 /* PromiseKit.root-CorePromise-Foundation */; - targetProxy = BE0F4DBA374559F8940C0B70384476BD /* PBXContainerItemProxy */; + name = "CryptoSwift-iOS"; + target = E615C0628D54019CCEE5C0CC80B55529 /* CryptoSwift-iOS */; + targetProxy = 70F9AB5B3A118321E51F635B2BEE3CED /* PBXContainerItemProxy */; + }; + AECE3A83555371FEE0C000441EA7F746 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "BigInt-iOS"; + target = AF9F48E6961507C0E2FD7A3CDBC652DA /* BigInt-iOS */; + targetProxy = B26EAE97BDAB5AF01C604365CB5F406C /* PBXContainerItemProxy */; }; - A22F26BA9F6F020F5AA933DCCC6209D2 /* PBXTargetDependency */ = { + BAD76E8361F4D9801FAF4CAEE1E33A93 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "SipHash-iOS"; + target = 3B79F6DB09B597AAE9D3EB939DA463D8 /* SipHash-iOS */; + targetProxy = 283B81AF6A42B35D635E192D621E2B56 /* PBXContainerItemProxy */; + }; + C0C1466C80B5B9098C4ADE3D8D0FF848 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "CryptoSwift-macOS"; target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; - targetProxy = D3EE8712BA96FE8983FC958E6574EDD5 /* PBXContainerItemProxy */; + targetProxy = E0E74766A66548F2C349A91FC003EF0A /* PBXContainerItemProxy */; }; - C6510E8CFAB977BE7B6241436DAC4841 /* PBXTargetDependency */ = { + C269DDA1242D2E3E298B6F655C4A167D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "scrypt-macOS"; - target = 7BF3C926294C92422AFB78600D576975 /* scrypt-macOS */; - targetProxy = 8022E9AB3C92BAD10B2AEFCE42C6EDA5 /* PBXContainerItemProxy */; + name = "EthereumABI-macOS"; + target = 75EC00B8FD54D720BB772CA16EEAE742 /* EthereumABI-macOS */; + targetProxy = 61558A075BFFFBA7882CAEE8C5732ECE /* PBXContainerItemProxy */; + }; + C5E73C2BC7125A028DD21893CBB2FEBA /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "BigInt-macOS"; + target = 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */; + targetProxy = 23B4CA009D06E1EB2F03415680002335 /* PBXContainerItemProxy */; }; C6D935F507D2100088E917501A5BB59D /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -3597,82 +3955,145 @@ target = 4FCBE56BC5E931FDC43C642250037C1F /* SipHash-macOS */; targetProxy = 284C9AFC38A225A506CB24973AEFB321 /* PBXContainerItemProxy */; }; - CD84CCD9860362B77E623B72E64A8990 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "BigInt-macOS"; - target = 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */; - targetProxy = 995B8D8F764EF523079B88A06313F11D /* PBXContainerItemProxy */; - }; - D25FD61F0F8712699C186B8B64A1A47B /* PBXTargetDependency */ = { + CECF16F2B83D3A302BFE3AD4E630E4AE /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "CryptoSwift-macOS"; - target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; - targetProxy = FA5D6DF00D850BA03F64F8B7F8E88175 /* PBXContainerItemProxy */; + name = "BigInt-iOS"; + target = AF9F48E6961507C0E2FD7A3CDBC652DA /* BigInt-iOS */; + targetProxy = 06FAFF995DCDF3CCF5C19865E9FCA57F /* PBXContainerItemProxy */; }; DA81B8EC030393B0ADEBDB02050FCFCB /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "Pods-web3swift-macOS"; - target = 82C35D316B5E8115E43ACCFE4E50137C /* Pods-web3swift-macOS */; + target = 023FD8884DE6975FECF83E672E5A51B6 /* Pods-web3swift-macOS */; targetProxy = 1E5017C3A1512E67B0318DD1DACDE515 /* PBXContainerItemProxy */; }; - DCCED206D4BBB569EEFCBD6A2C1BAC88 /* PBXTargetDependency */ = { + E5418EBD52BE4001ACF1E9B736E61DB4 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "CryptoSwift-macOS"; - target = 78DC154308FD9CFC54ADA13FD1897A6B /* CryptoSwift-macOS */; - targetProxy = E8B4498958DB7A8D6B92BD5B3EC5929C /* PBXContainerItemProxy */; + name = "Result-iOS"; + target = 16689698E943DBC08E5169468314C018 /* Result-iOS */; + targetProxy = BBE7A89B2AC6FEAE944585350A21A6F6 /* PBXContainerItemProxy */; }; F3DDE7BB170DA1519FDDE4BA03AB73FA /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "Pods-web3swift-iOS"; - target = BAA7945626BCC2CCA0CD2C7A0AC13E79 /* Pods-web3swift-iOS */; + target = 56C190CBC3444CE65376067572B13693 /* Pods-web3swift-iOS */; targetProxy = 366CCE30759EB3C0FF8E45BE9572B007 /* PBXContainerItemProxy */; }; - FCBCE9AAE7712F633822A4305BA498B6 /* PBXTargetDependency */ = { + F99596A36A7D743925C51FA2EAC6A926 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = PromiseKit; - target = 94906F0C68B58FB4B40554812C3BBFD8 /* PromiseKit */; - targetProxy = 78E3F5567AAF195D28B5DA37D51C8623 /* PBXContainerItemProxy */; - }; - FE4F7F2A1F792D695B3070E073F67F11 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "SwiftRLP-macOS"; - target = 73527F6F8B0A792EA5FD7085DADC6B93 /* SwiftRLP-macOS */; - targetProxy = 819958A4438F4712BB2395ECD30B2C4D /* PBXContainerItemProxy */; + name = "BigInt-macOS"; + target = 9646F4C6B5DB5298F5EEE5871120A244 /* BigInt-macOS */; + targetProxy = A782764E5DFF6FDC6717BF4453214525 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 0642CE789E80E243CAD03C3BC1721169 /* Debug */ = { + 02BEABF91F94549686F3C50DDE0DD7D9 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1412597E34EB8268006B0BCFF20BB89A /* secp256k1_swift-iOS.xcconfig */; + baseConfigurationReference = 4AA4C4E3B71B38DD9AC53FDE78CAE9EA /* PromiseKit.root-CorePromise-Foundation.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap"; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MODULEMAP_FILE = "Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = secp256k1_swift; - PRODUCT_NAME = "secp256k1_swift-iOS"; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = "PromiseKit.root-CorePromise-Foundation"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; + SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; }; - name = Debug; + name = Release; }; - 0D0B0751228CE1672D4155CDC48E48F4 /* Debug */ = { + 08EDA75FE0BDF7058094AE2A97B614C1 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1C8F00AC871FE0EC2FBD9A40F62753CD /* Pods-web3swift-macOS.debug.xcconfig */; + baseConfigurationReference = 420A1793DC6527296BC586472865C8C0 /* scrypt-iOS.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/scrypt-iOS/scrypt-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = "scrypt-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 0A1E7A5A2BC31F6FBEBEDC9CD0EADB10 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 673FFC4D2B959AB8AEC35D646A85CDCD /* Pods-web3swift-iOS.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 0B909F147936EE3B5A2B75910E90133C /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 92CB38F782D33EF495F861851E047FA9 /* SipHash-iOS.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/SipHash-iOS/SipHash-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = SipHash; + PRODUCT_NAME = "SipHash-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 11AFE4FF91D289E194438B54F1861BDC /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 330B8D8B0B8ACFFDF2B9292154D71642 /* secp256k1_swift-macOS.xcconfig */; + buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; @@ -3680,23 +4101,78 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = "secp256k1_swift-macOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; }; name = Debug; }; - 15B89B467BEBF88DB7C0DE281DDCB2FF /* Release */ = { + 190110B1825C1B9F5BF5A2EBD21E974B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 673FFC4D2B959AB8AEC35D646A85CDCD /* Pods-web3swift-iOS.release.xcconfig */; + baseConfigurationReference = 08A99F6D5C3E452229D15E3E8C1660F3 /* BigInt-macOS.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-macOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = "BigInt-macOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + }; + name = Release; + }; + 1B8C9D978FDF5ED4199E530B793239D6 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C04A3FB24C874F21628C4E7EA8B9693B /* scrypt-macOS.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/scrypt-macOS/scrypt-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-macOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = "scrypt-macOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + }; + name = Release; + }; + 1EDD89DD1A111ECC395D5EBC9D07FECD /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 042CC2D185140E7D725D22562A3E307F /* Pods-web3swift-iOS.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -3712,16 +4188,66 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 2969FBBC5C72EEF51DC6F4B9B1A976D0 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B6A0DADFE9809AB925F51CF651528B31 /* secp256k1_swift-iOS.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = "secp256k1_swift-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; - 16D02FC5D8B1360961D0964C786FD01A /* Release */ = { + 32114FB1ED27B364D53BC6C8665A9C2E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B6112FCF75FBFC58E314A40652665F06 /* CryptoSwift-iOS.xcconfig */; + baseConfigurationReference = B48543DD38BB8E1AB0953C926DBA6C3F /* EthereumABI-macOS.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/EthereumABI-macOS/EthereumABI-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Headers/Public/EthereumABI/EthereumABI-macOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = EthereumABI; + PRODUCT_NAME = "EthereumABI-macOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + }; + name = Release; + }; + 32CF9A39F6635F8DA2878D193D645440 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89525730C7E22C66FB7ADAB11E2073A0 /* CryptoSwift-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -3739,17 +4265,14 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; }; - name = Release; + name = Debug; }; - 1C87E448DBFBA3CE908FC5D7F08DE3D2 /* Release */ = { + 41717A996D2F041A161913298508A8E9 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AA1E87AB6BC235D2BF0B5287F5ADD105 /* EthereumAddress-macOS.xcconfig */; + baseConfigurationReference = EF8327584F2BDEC27C9163F51CDEFB9E /* SwiftRLP-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; @@ -3758,55 +4281,74 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-prefix.pch"; MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = EthereumAddress; - PRODUCT_NAME = "EthereumAddress-macOS"; + PRODUCT_MODULE_NAME = SwiftRLP; + PRODUCT_NAME = "SwiftRLP-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.1; }; name = Release; }; - 2890913C8C2255F2C5BC543B4A827893 /* Debug */ = { + 477575EFA4C280367821CBC53C5C8953 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8CC8A14105420D222F37BBB95BFBF1A3 /* secp256k1_swift-macOS.xcconfig */; + baseConfigurationReference = D1FD34D2C5C93A170139E5994B7F5D8D /* Result-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/Result-macOS/Result-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/Result/Result-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = secp256k1_swift; - PRODUCT_NAME = "secp256k1_swift-macOS"; + PRODUCT_MODULE_NAME = Result; + PRODUCT_NAME = "Result-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; }; - name = Debug; + name = Release; + }; + 4CA9B35348640CA3DA1AAB6A01AB2BE4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0D88C9D56C3885598E20D9718F3B8F16 /* Pods-web3swift-macOS_Tests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + EXECUTABLE_PREFIX = lib; + MACH_O_TYPE = staticlib; + MACOSX_DEPLOYMENT_TARGET = 10.11; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = Release; }; - 316F6BD6837503631E1CD02ECF315A0C /* Release */ = { + 4F3205507D03A242BAB6D95A8806CF7D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3D2AD51705C652FD9094CEDC59DFB4FC /* SwiftRLP-macOS.xcconfig */; + baseConfigurationReference = EF8327584F2BDEC27C9163F51CDEFB9E /* SwiftRLP-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; @@ -3827,15 +4369,89 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.1; }; + name = Debug; + }; + 55D3105FA71C4B27F6E2350877CDAF39 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 08A99F6D5C3E452229D15E3E8C1660F3 /* BigInt-macOS.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + EXECUTABLE_PREFIX = lib; + GCC_PREFIX_HEADER = "Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-macOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = "BigInt-macOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + }; + name = Debug; + }; + 722FA21DE6A0ACAC9DD0E405C5BF7D1A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1C8F00AC871FE0EC2FBD9A40F62753CD /* Pods-web3swift-macOS.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + EXECUTABLE_PREFIX = lib; + MACH_O_TYPE = staticlib; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 7611FC9ACC0308E2A87B7CF5FC557084 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9D6306B3BC57BAEB50815C5FBBFC8CB4 /* SwiftRLP-iOS.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = SwiftRLP; + PRODUCT_NAME = "SwiftRLP-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; name = Release; }; - 34FE96C4DC053075469BE4E0C218A785 /* Release */ = { + 78A91A4EF7911BE93CE41768D5EC92BB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 453B783DD499D624880A972C2DC8C94A /* PromiseKit.xcconfig */; + baseConfigurationReference = 3F1CF8D01D9020575F785235F3DA02E3 /* PromiseKit.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -3853,17 +4469,15 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; - 3A052F4E8E3344EF5CE29C1EB82A8C14 /* Debug */ = { + 78E745EDC865041C93C2926A6DCDB505 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 435339C16A1550DDCDCD1B4731E89DBD /* Result-iOS.xcconfig */; + baseConfigurationReference = F7F56C5F9833A0AB26CC47460A928E34 /* Result-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -3881,41 +4495,40 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 3C9131BF8D77FFD3F3302CC9B5C5B5E6 /* Debug */ = { + 7A047BDA07E543F92AF596A54ACB9D17 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A2A0CFEEC4EEE7DD9F58B6A45DE63C89 /* BigInt-iOS.xcconfig */; + baseConfigurationReference = F7F56C5F9833A0AB26CC47460A928E34 /* Result-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/Result-iOS/Result-iOS-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-iOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/Result/Result-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = "BigInt-iOS"; + PRODUCT_MODULE_NAME = Result; + PRODUCT_NAME = "Result-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; }; - name = Debug; + name = Release; }; - 3E84B79C8DEC705D62A979F5FA5D0A9E /* Release */ = { + 82CAFFCF1DF36B5D87B092509FE48D3E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0DE0997E93980E728205BE4BF37B5FBC /* scrypt-iOS.xcconfig */; + baseConfigurationReference = 420A1793DC6527296BC586472865C8C0 /* scrypt-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -3933,45 +4546,14 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 4508C23FF6409DCFED0ED597F8011CA1 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3D2AD51705C652FD9094CEDC59DFB4FC /* SwiftRLP-macOS.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SwiftRLP; - PRODUCT_NAME = "SwiftRLP-macOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.1; }; name = Debug; }; - 47188C6950FED720E501753BF199E23B /* Debug */ = { + 83210CA27027B561A7B5E007B06CA4D7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 042CC2D185140E7D725D22562A3E307F /* Pods-web3swift-iOS.debug.xcconfig */; + baseConfigurationReference = E3ADB0156604A4FD7CD47B25248088C2 /* Pods-web3swift-iOS_Tests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -3980,50 +4562,44 @@ "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; IPHONEOS_DEPLOYMENT_TARGET = 9.0; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; }; - name = Debug; + name = Release; }; - 4CA82ACA864529495D52E03B2D33BC1C /* Debug */ = { + 8518F8D713080EF1D6A105CF2021EC99 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 453B783DD499D624880A972C2DC8C94A /* PromiseKit.xcconfig */; + baseConfigurationReference = B7762E4245191B27674EB7EB82DCFFF1 /* Pods-web3swift-macOS_Tests.debug.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = Headers/Public/PromiseKit/PromiseKit.modulemap; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = PromiseKit; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; + EXECUTABLE_PREFIX = lib; + MACH_O_TYPE = staticlib; + MACOSX_DEPLOYMENT_TARGET = 10.11; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 4CA9B35348640CA3DA1AAB6A01AB2BE4 /* Release */ = { + 8AFA5B5EA500725BE7FF28964AEEDA43 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0D88C9D56C3885598E20D9718F3B8F16 /* Pods-web3swift-macOS_Tests.release.xcconfig */; + baseConfigurationReference = C04A3FB24C874F21628C4E7EA8B9693B /* scrypt-macOS.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; @@ -4031,129 +4607,126 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - MACH_O_TYPE = staticlib; + GCC_PREFIX_HEADER = "Target Support Files/scrypt-macOS/scrypt-macOS-prefix.pch"; MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = "scrypt-macOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; }; - name = Release; + name = Debug; }; - 50921841075F46C5C393DB5B6A2529EB /* Debug */ = { + 901A8ABA1A0F32437C72ADA21170A7CE /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A0347CA8676D7E491A4DA559FB78007F /* SipHash-iOS.xcconfig */; + baseConfigurationReference = 2AD338DD23B43013308A65379BAEC16C /* BigInt-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/SipHash-iOS/SipHash-iOS-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-iOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SipHash; - PRODUCT_NAME = "SipHash-iOS"; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = "BigInt-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; }; - name = Debug; + name = Release; }; - 51D81D04D0379E038D2741ED941215DC /* Release */ = { + 961AECA1170955755D74EAD3E5819CE7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8CC8A14105420D222F37BBB95BFBF1A3 /* secp256k1_swift-macOS.xcconfig */; + baseConfigurationReference = 9D6306B3BC57BAEB50815C5FBBFC8CB4 /* SwiftRLP-iOS.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = secp256k1_swift; - PRODUCT_NAME = "secp256k1_swift-macOS"; + PRODUCT_MODULE_NAME = SwiftRLP; + PRODUCT_NAME = "SwiftRLP-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; + SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; }; - name = Release; + name = Debug; }; - 5603C29AD11DB39738D16FEC45182D72 /* Debug */ = { + 9BF74490EC938556B96E2A3372C604DD /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 80E74674EB94CDFBB8B77B11BACD6046 /* scrypt-macOS.xcconfig */; + baseConfigurationReference = 7C70A16BA860E5B4A9A806F25EE3F472 /* CryptoSwift-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/scrypt-macOS/scrypt-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = "scrypt-macOS"; + PRODUCT_MODULE_NAME = CryptoSwift; + PRODUCT_NAME = "CryptoSwift-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.1; + SWIFT_VERSION = 4.2; }; name = Debug; }; - 57848671E21C73A121EDCE1F4B6205BD /* Release */ = { + 9F0CCACAE41FF43BAD49E0F5993ED010 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1412597E34EB8268006B0BCFF20BB89A /* secp256k1_swift-iOS.xcconfig */; + baseConfigurationReference = C0E00E27FCA499ADCF69CE2096BEF87F /* EthereumAddress-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = secp256k1_swift; - PRODUCT_NAME = "secp256k1_swift-iOS"; + PRODUCT_MODULE_NAME = EthereumAddress; + PRODUCT_NAME = "EthereumAddress-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; - 5FCBD0A9F6FEC43961BDF6211D4F283C /* Debug */ = { + A3625BB68C06D1FB0393AACB165DBA14 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -4185,8 +4758,6 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_ALLOWED = NO; - CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -4214,67 +4785,41 @@ PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; - 60A5DC59ABDBD8D0E90FAADE4366D12E /* Debug */ = { + A46755FFCCE7D40941242CF696F73A1A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B6112FCF75FBFC58E314A40652665F06 /* CryptoSwift-iOS.xcconfig */; + baseConfigurationReference = 522579B02AF58D183F2AC531E3F33572 /* EthereumABI-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/EthereumABI-iOS/EthereumABI-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/EthereumABI/EthereumABI-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = CryptoSwift; - PRODUCT_NAME = "CryptoSwift-iOS"; + PRODUCT_MODULE_NAME = EthereumABI; + PRODUCT_NAME = "EthereumABI-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 7237D3F1652E355B7101C5937B046651 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 15206D43EDA63AD479C638B175342338 /* Result-macOS.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/Result-macOS/Result-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/Result/Result-macOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = "Result-macOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.0; + VALIDATE_PRODUCT = YES; }; name = Release; }; - 75E16E6E94E4CDC1DF735E3C84E87DEC /* Debug */ = { + A895391A378F7146617E9C6F48AEF62C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F9C126B6106FA68D54B74E0DD65E0F8E /* SipHash-macOS.xcconfig */; + baseConfigurationReference = 5992F89681D6639D6E83FBDCE269A688 /* SipHash-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CODE_SIGN_IDENTITY = "-"; @@ -4294,42 +4839,37 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; }; name = Debug; }; - 7A748354D2BAB28D6D9A5ACD8B138D72 /* Release */ = { + B1E495AD8FE6443520AEE1785D76980A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E79185DFEB64004C5523F725F3DC89B0 /* CryptoSwift-macOS.xcconfig */; + baseConfigurationReference = A5D9B32B104EA0A137D78B89D4D19D40 /* Pods-web3swift-macOS.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap"; + MACH_O_TYPE = staticlib; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = CryptoSwift; - PRODUCT_NAME = "CryptoSwift-macOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.2; }; name = Release; }; - 83210CA27027B561A7B5E007B06CA4D7 /* Release */ = { + B3F7C2C3054C9BA9D5FEAF7BBEB5B707 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E3ADB0156604A4FD7CD47B25248088C2 /* Pods-web3swift-iOS_Tests.release.xcconfig */; + baseConfigurationReference = 24B5C2F89100EAE084E4AF83DDE6303D /* Pods-web3swift-iOS_Tests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -4345,90 +4885,62 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; }; - name = Release; + name = Debug; }; - 8407FD653C37937082E32CEB87697C14 /* Debug */ = { + B43995674AACC46CADFF66DA426F6646 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AD76DBA7730870FE66D77B1FC33E49E0 /* EthereumAddress-iOS.xcconfig */; + baseConfigurationReference = B6A0DADFE9809AB925F51CF651528B31 /* secp256k1_swift-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MODULEMAP_FILE = "Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = EthereumAddress; - PRODUCT_NAME = "EthereumAddress-iOS"; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = "secp256k1_swift-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.1; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 8518F8D713080EF1D6A105CF2021EC99 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B7762E4245191B27674EB7EB82DCFFF1 /* Pods-web3swift-macOS_Tests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 9070795000D1F467DF9FAE6D7D640250 /* Release */ = { + C0CAF3F30439464C0667B78715A340EF /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 435339C16A1550DDCDCD1B4731E89DBD /* Result-iOS.xcconfig */; + baseConfigurationReference = 522579B02AF58D183F2AC531E3F33572 /* EthereumABI-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/Result-iOS/Result-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/Result/Result-iOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/EthereumABI-iOS/EthereumABI-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = "Headers/Public/EthereumABI/EthereumABI-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = "Result-iOS"; + PRODUCT_MODULE_NAME = EthereumABI; + PRODUCT_NAME = "EthereumABI-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; }; - name = Release; + name = Debug; }; - 999EC6E913D2F808DD5EECBDADBE2FBF /* Release */ = { + C7DC73FCC3220DE12B4FC1DC930D7C08 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E8554570D5B7F10CEE0823FEB5B80B8D /* PromiseKit.root-CorePromise-Foundation.xcconfig */; + baseConfigurationReference = 4AA4C4E3B71B38DD9AC53FDE78CAE9EA /* PromiseKit.root-CorePromise-Foundation.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; @@ -4449,69 +4961,89 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; }; - name = Release; + name = Debug; }; - 9D532168CC77D42DF0462F9BCBD80F2E /* Debug */ = { + CA44A93B91752AA83EC6CCB22764D527 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E8554570D5B7F10CEE0823FEB5B80B8D /* PromiseKit.root-CorePromise-Foundation.xcconfig */; + baseConfigurationReference = 7C70A16BA860E5B4A9A806F25EE3F472 /* CryptoSwift-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = "Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = "PromiseKit.root-CorePromise-Foundation"; + PRODUCT_MODULE_NAME = CryptoSwift; + PRODUCT_NAME = "CryptoSwift-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + }; + name = Release; + }; + CB2C61730C420D7E1AED74B447061493 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 92CB38F782D33EF495F861851E047FA9 /* SipHash-iOS.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/SipHash-iOS/SipHash-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-iOS.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = SipHash; + PRODUCT_NAME = "SipHash-iOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 9F89BA0BDBDA8C292C7AF81AE6E74193 /* Release */ = { + CE9A0270AAF7D63017F506C720F01128 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F9C126B6106FA68D54B74E0DD65E0F8E /* SipHash-macOS.xcconfig */; + baseConfigurationReference = 330B8D8B0B8ACFFDF2B9292154D71642 /* secp256k1_swift-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/SipHash-macOS/SipHash-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MODULEMAP_FILE = "Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SipHash; - PRODUCT_NAME = "SipHash-macOS"; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = "secp256k1_swift-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_VERSION = 4.0; }; name = Release; }; - 9FC95E93B60448569789C60751C0DD23 /* Release */ = { + D01478928F4FB100D668550875693C34 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -4543,8 +5075,6 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_ALLOWED = NO; - CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; @@ -4567,119 +5097,44 @@ MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - A45B3EF7FBB166F549A4ABEE13B6CE87 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A2A0CFEEC4EEE7DD9F58B6A45DE63C89 /* BigInt-iOS.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-iOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = "BigInt-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - ADB19600F3034CFC88E8930883A97411 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A0347CA8676D7E491A4DA559FB78007F /* SipHash-iOS.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/SipHash-iOS/SipHash-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-iOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SipHash; - PRODUCT_NAME = "SipHash-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; + SWIFT_VERSION = 4.2; + SYMROOT = "${SRCROOT}/../build"; }; name = Release; }; - B3F7C2C3054C9BA9D5FEAF7BBEB5B707 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 24B5C2F89100EAE084E4AF83DDE6303D /* Pods-web3swift-iOS_Tests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACH_O_TYPE = staticlib; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - CCE6ADD3343BBD7115B558970171731E /* Debug */ = { + D084C4436D808C9FF5CF8663846169E0 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E79185DFEB64004C5523F725F3DC89B0 /* CryptoSwift-macOS.xcconfig */; + baseConfigurationReference = 82CF9E45F65C5A3FF604607C66EAC29D /* EthereumAddress-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MODULEMAP_FILE = "Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = CryptoSwift; - PRODUCT_NAME = "CryptoSwift-macOS"; + PRODUCT_MODULE_NAME = EthereumAddress; + PRODUCT_NAME = "EthereumAddress-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 4.1; }; - name = Debug; + name = Release; }; - D24ACCB30483674C8F98FEE6781F8A91 /* Release */ = { + D4388CAD52CCCFCE7D0ED546E16E0F21 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A5D9B32B104EA0A137D78B89D4D19D40 /* Pods-web3swift-macOS.release.xcconfig */; + baseConfigurationReference = 82CF9E45F65C5A3FF604607C66EAC29D /* EthereumAddress-macOS.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; @@ -4687,23 +5142,25 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - MACH_O_TYPE = staticlib; + GCC_PREFIX_HEADER = "Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch"; MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = EthereumAddress; + PRODUCT_NAME = "EthereumAddress-macOS"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; }; - name = Release; + name = Debug; }; - D33969CE1C6C7CFBA07904BEF1C4B035 /* Debug */ = { + DA050F65EA0B807A45D539FACC7F117A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15206D43EDA63AD479C638B175342338 /* Result-macOS.xcconfig */; + baseConfigurationReference = D1FD34D2C5C93A170139E5994B7F5D8D /* Result-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CODE_SIGN_IDENTITY = "-"; @@ -4723,97 +5180,63 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; }; name = Debug; }; - DCCDA1002E48EAEF2C988A5C6EBBF971 /* Release */ = { + DC8874F7FAB58896B3D6BBD17E8F3590 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E34EBA5D815562B6AEF202EEF42D4456 /* SwiftRLP-iOS.xcconfig */; + baseConfigurationReference = 3F1CF8D01D9020575F785235F3DA02E3 /* PromiseKit.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = Headers/Public/PromiseKit/PromiseKit.modulemap; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SwiftRLP; - PRODUCT_NAME = "SwiftRLP-iOS"; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = PromiseKit; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.1; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - E2903A9A477CD5FC7A1AA02D234622F7 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 80E74674EB94CDFBB8B77B11BACD6046 /* scrypt-macOS.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/scrypt-macOS/scrypt-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-macOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = "scrypt-macOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.1; }; - name = Release; + name = Debug; }; - E5411E931BB177D29281DC9404230DD1 /* Debug */ = { + EB39C1FA7B7F12063F7AE8333D2A4C21 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0DE0997E93980E728205BE4BF37B5FBC /* scrypt-iOS.xcconfig */; + baseConfigurationReference = 2AD338DD23B43013308A65379BAEC16C /* BigInt-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/scrypt-iOS/scrypt-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MODULEMAP_FILE = "Headers/Public/scrypt/scrypt-iOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = "scrypt-iOS"; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = "BigInt-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.1; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - EAB93834CF69459E8D9F59D7D266CC6A /* Release */ = { + F5923572A54909C08EF28178F96E68FD /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AD76DBA7730870FE66D77B1FC33E49E0 /* EthereumAddress-iOS.xcconfig */; + baseConfigurationReference = C0E00E27FCA499ADCF69CE2096BEF87F /* EthereumAddress-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -4831,17 +5254,14 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; }; - name = Release; + name = Debug; }; - F0201DAF490AE92696849A72FDE47927 /* Debug */ = { + F97777A80F699CB36568B3AB91C18336 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AA1E87AB6BC235D2BF0B5287F5ADD105 /* EthereumAddress-macOS.xcconfig */; + baseConfigurationReference = B48543DD38BB8E1AB0953C926DBA6C3F /* EthereumABI-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; @@ -4850,26 +5270,25 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/EthereumABI-macOS/EthereumABI-macOS-prefix.pch"; MACOSX_DEPLOYMENT_TARGET = 10.11; - MODULEMAP_FILE = "Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/EthereumABI/EthereumABI-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = EthereumAddress; - PRODUCT_NAME = "EthereumAddress-macOS"; + PRODUCT_MODULE_NAME = EthereumABI; + PRODUCT_NAME = "EthereumABI-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.1; }; name = Debug; }; - F4CD297453714BA949383E8B4EAB4DA3 /* Release */ = { + FA1664274B2659B28BDF9A0DA85ACD2E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8823C42C614B0067E2C89A5AE71DA77D /* BigInt-macOS.xcconfig */; + baseConfigurationReference = 5992F89681D6639D6E83FBDCE269A688 /* SipHash-macOS.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CODE_SIGN_IDENTITY = "-"; @@ -4877,94 +5296,65 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/SipHash-macOS/SipHash-macOS-prefix.pch"; MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-macOS.modulemap"; + MODULEMAP_FILE = "Headers/Public/SipHash/SipHash-macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = "BigInt-macOS"; + PRODUCT_MODULE_NAME = SipHash; + PRODUCT_NAME = "SipHash-macOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; }; name = Release; }; - F6220DAE297B6F9A75ACF0DCDBBE507C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 8823C42C614B0067E2C89A5AE71DA77D /* BigInt-macOS.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = "-"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - EXECUTABLE_PREFIX = lib; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "Headers/Public/BigInt/BigInt-macOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = "BigInt-macOS"; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - FEB6E9194937DDA3A6F6493F676E2004 /* Debug */ = { + FD79E0FA8C9695ACC92727BA59ACBD09 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E34EBA5D815562B6AEF202EEF42D4456 /* SwiftRLP-iOS.xcconfig */; + baseConfigurationReference = 89525730C7E22C66FB7ADAB11E2073A0 /* CryptoSwift-iOS.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MODULEMAP_FILE = "Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap"; + GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MODULEMAP_FILE = "Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = SwiftRLP; - PRODUCT_NAME = "SwiftRLP-iOS"; + PRODUCT_MODULE_NAME = CryptoSwift; + PRODUCT_NAME = "CryptoSwift-iOS"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.1; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; }; - name = Debug; + name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 0039F2F377814CD2485BC36E354F85D8 /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS" */ = { + 0D0EE0E6A1FF9BACF87641ECD817E450 /* Build configuration list for PBXNativeTarget "EthereumAddress-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 0D0B0751228CE1672D4155CDC48E48F4 /* Debug */, - D24ACCB30483674C8F98FEE6781F8A91 /* Release */, + D4388CAD52CCCFCE7D0ED546E16E0F21 /* Debug */, + D084C4436D808C9FF5CF8663846169E0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 09CA449448E7309DBC21A6BD3E319838 /* Build configuration list for PBXNativeTarget "secp256k1_swift-iOS" */ = { + 0E6082C161AE699CD11AFE38C72A8ECD /* Build configuration list for PBXNativeTarget "Result-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 0642CE789E80E243CAD03C3BC1721169 /* Debug */, - 57848671E21C73A121EDCE1F4B6205BD /* Release */, + DA050F65EA0B807A45D539FACC7F117A /* Debug */, + 477575EFA4C280367821CBC53C5C8953 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4972,26 +5362,35 @@ 19CA2EF2646C88FC1D5F4864827AF9A9 /* Build configuration list for PBXNativeTarget "CryptoSwift-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 60A5DC59ABDBD8D0E90FAADE4366D12E /* Debug */, - 16D02FC5D8B1360961D0964C786FD01A /* Release */, + 32CF9A39F6635F8DA2878D193D645440 /* Debug */, + FD79E0FA8C9695ACC92727BA59ACBD09 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 249649C0D306826B8AEC43AC3D978C98 /* Build configuration list for PBXNativeTarget "SipHash-macOS" */ = { + 1A702128138D84E5AE38854422DA92F2 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1EDD89DD1A111ECC395D5EBC9D07FECD /* Debug */, + 0A1E7A5A2BC31F6FBEBEDC9CD0EADB10 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 214041070FF7013C5D3B1D956DD404CF /* Build configuration list for PBXNativeTarget "scrypt-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 75E16E6E94E4CDC1DF735E3C84E87DEC /* Debug */, - 9F89BA0BDBDA8C292C7AF81AE6E74193 /* Release */, + 8AFA5B5EA500725BE7FF28964AEEDA43 /* Debug */, + 1B8C9D978FDF5ED4199E530B793239D6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 284AECDC661FAF7860EC1BEC7692301D /* Build configuration list for PBXNativeTarget "Result-iOS" */ = { + 249649C0D306826B8AEC43AC3D978C98 /* Build configuration list for PBXNativeTarget "SipHash-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 3A052F4E8E3344EF5CE29C1EB82A8C14 /* Debug */, - 9070795000D1F467DF9FAE6D7D640250 /* Release */, + A895391A378F7146617E9C6F48AEF62C /* Debug */, + FA1664274B2659B28BDF9A0DA85ACD2E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4999,26 +5398,26 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 5FCBD0A9F6FEC43961BDF6211D4F283C /* Debug */, - 9FC95E93B60448569789C60751C0DD23 /* Release */, + A3625BB68C06D1FB0393AACB165DBA14 /* Debug */, + D01478928F4FB100D668550875693C34 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 303C8E6272AD70A3BDE63EE51C697D17 /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { + 34C02A2A41180F1C49A12F3C94BB6D39 /* Build configuration list for PBXNativeTarget "SwiftRLP-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4CA82ACA864529495D52E03B2D33BC1C /* Debug */, - 34FE96C4DC053075469BE4E0C218A785 /* Release */, + 4F3205507D03A242BAB6D95A8806CF7D /* Debug */, + 41717A996D2F041A161913298508A8E9 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 3EF9AD5BB38D4B8D81F2E10D31B8FC16 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS" */ = { + 41A0D4C0C65EE651AE692E52EC485A28 /* Build configuration list for PBXNativeTarget "EthereumABI-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 47188C6950FED720E501753BF199E23B /* Debug */, - 15B89B467BEBF88DB7C0DE281DDCB2FF /* Release */, + F97777A80F699CB36568B3AB91C18336 /* Debug */, + 32114FB1ED27B364D53BC6C8665A9C2E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -5026,116 +5425,116 @@ 47C2AA14D9BBB2B7CC5629CE1C553C1B /* Build configuration list for PBXNativeTarget "BigInt-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 3C9131BF8D77FFD3F3302CC9B5C5B5E6 /* Debug */, - A45B3EF7FBB166F549A4ABEE13B6CE87 /* Release */, + EB39C1FA7B7F12063F7AE8333D2A4C21 /* Debug */, + 901A8ABA1A0F32437C72ADA21170A7CE /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 62550B15363844675EDB2F185CB619A8 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS_Tests" */ = { + 485FEBD24BA1178535E81D093E91F648 /* Build configuration list for PBXNativeTarget "EthereumABI-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - B3F7C2C3054C9BA9D5FEAF7BBEB5B707 /* Debug */, - 83210CA27027B561A7B5E007B06CA4D7 /* Release */, + C0CAF3F30439464C0667B78715A340EF /* Debug */, + A46755FFCCE7D40941242CF696F73A1A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 65490D7667F9A157CAE31446FC797991 /* Build configuration list for PBXNativeTarget "secp256k1_swift-macOS" */ = { + 53B1B04B77AC43178C9F3E8EB7B13F0A /* Build configuration list for PBXNativeTarget "Result-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2890913C8C2255F2C5BC543B4A827893 /* Debug */, - 51D81D04D0379E038D2741ED941215DC /* Release */, + 78E745EDC865041C93C2926A6DCDB505 /* Debug */, + 7A047BDA07E543F92AF596A54ACB9D17 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 88E198CDBBB0CAA2D5B912F48E5A8119 /* Build configuration list for PBXNativeTarget "EthereumAddress-macOS" */ = { + 6172FF314CF6FDD0EE7BEB014649095A /* Build configuration list for PBXNativeTarget "scrypt-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - F0201DAF490AE92696849A72FDE47927 /* Debug */, - 1C87E448DBFBA3CE908FC5D7F08DE3D2 /* Release */, + 82CAFFCF1DF36B5D87B092509FE48D3E /* Debug */, + 08EDA75FE0BDF7058094AE2A97B614C1 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 8B657CEEE4B76901522B282FFC7FE8DA /* Build configuration list for PBXNativeTarget "Result-macOS" */ = { + 62550B15363844675EDB2F185CB619A8 /* Build configuration list for PBXNativeTarget "Pods-web3swift-iOS_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - D33969CE1C6C7CFBA07904BEF1C4B035 /* Debug */, - 7237D3F1652E355B7101C5937B046651 /* Release */, + B3F7C2C3054C9BA9D5FEAF7BBEB5B707 /* Debug */, + 83210CA27027B561A7B5E007B06CA4D7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 91E81CC04B48CAA0AA6D1FB891F14331 /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS_Tests" */ = { + 7F2C38356A69928AE969993F66D26974 /* Build configuration list for PBXNativeTarget "secp256k1_swift-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8518F8D713080EF1D6A105CF2021EC99 /* Debug */, - 4CA9B35348640CA3DA1AAB6A01AB2BE4 /* Release */, + 11AFE4FF91D289E194438B54F1861BDC /* Debug */, + CE9A0270AAF7D63017F506C720F01128 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 9CB97BD184404FE5F62F017C3CF306D5 /* Build configuration list for PBXNativeTarget "PromiseKit.root-CorePromise-Foundation" */ = { + 886328E93BEAC18F43717EDABA0C12BF /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 9D532168CC77D42DF0462F9BCBD80F2E /* Debug */, - 999EC6E913D2F808DD5EECBDADBE2FBF /* Release */, + 722FA21DE6A0ACAC9DD0E405C5BF7D1A /* Debug */, + B1E495AD8FE6443520AEE1785D76980A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A1A3D7F09A5AFD2BD4DA3D3CDACBBCFC /* Build configuration list for PBXNativeTarget "BigInt-macOS" */ = { + 91E81CC04B48CAA0AA6D1FB891F14331 /* Build configuration list for PBXNativeTarget "Pods-web3swift-macOS_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - F6220DAE297B6F9A75ACF0DCDBBE507C /* Debug */, - F4CD297453714BA949383E8B4EAB4DA3 /* Release */, + 8518F8D713080EF1D6A105CF2021EC99 /* Debug */, + 4CA9B35348640CA3DA1AAB6A01AB2BE4 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - D2A09E63159C968138E6CBA9147D559A /* Build configuration list for PBXNativeTarget "SwiftRLP-macOS" */ = { + 985657F07458E31EEED8115F732C90EA /* Build configuration list for PBXNativeTarget "PromiseKit.root-CorePromise-Foundation" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4508C23FF6409DCFED0ED597F8011CA1 /* Debug */, - 316F6BD6837503631E1CD02ECF315A0C /* Release */, + C7DC73FCC3220DE12B4FC1DC930D7C08 /* Debug */, + 02BEABF91F94549686F3C50DDE0DD7D9 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - D9AC1A700A507419692FC870E90C8799 /* Build configuration list for PBXNativeTarget "scrypt-iOS" */ = { + A17FF6AB1386D63A1421DD6C0C2217F4 /* Build configuration list for PBXNativeTarget "secp256k1_swift-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - E5411E931BB177D29281DC9404230DD1 /* Debug */, - 3E84B79C8DEC705D62A979F5FA5D0A9E /* Release */, + B43995674AACC46CADFF66DA426F6646 /* Debug */, + 2969FBBC5C72EEF51DC6F4B9B1A976D0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E4CD22EC0D9A9A7E229C67906906F7A4 /* Build configuration list for PBXNativeTarget "SwiftRLP-iOS" */ = { + A1A3D7F09A5AFD2BD4DA3D3CDACBBCFC /* Build configuration list for PBXNativeTarget "BigInt-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - FEB6E9194937DDA3A6F6493F676E2004 /* Debug */, - DCCDA1002E48EAEF2C988A5C6EBBF971 /* Release */, + 55D3105FA71C4B27F6E2350877CDAF39 /* Debug */, + 190110B1825C1B9F5BF5A2EBD21E974B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - EC990DC713F41C8185113CC18FD8B395 /* Build configuration list for PBXNativeTarget "scrypt-macOS" */ = { + C3E4E8C71E1F2FC6C63CC4862E81AA7A /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { isa = XCConfigurationList; buildConfigurations = ( - 5603C29AD11DB39738D16FEC45182D72 /* Debug */, - E2903A9A477CD5FC7A1AA02D234622F7 /* Release */, + DC8874F7FAB58896B3D6BBD17E8F3590 /* Debug */, + 78A91A4EF7911BE93CE41768D5EC92BB /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - EFED2FA879D330888BF8C00E65240ADA /* Build configuration list for PBXNativeTarget "EthereumAddress-iOS" */ = { + E5D6FA6799A44BF6B2EA944785695731 /* Build configuration list for PBXNativeTarget "SwiftRLP-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8407FD653C37937082E32CEB87697C14 /* Debug */, - EAB93834CF69459E8D9F59D7D266CC6A /* Release */, + 961AECA1170955755D74EAD3E5819CE7 /* Debug */, + 7611FC9ACC0308E2A87B7CF5FC557084 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -5143,8 +5542,17 @@ F03040809733F3691A82F4D1E80B6BA3 /* Build configuration list for PBXNativeTarget "CryptoSwift-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - CCE6ADD3343BBD7115B558970171731E /* Debug */, - 7A748354D2BAB28D6D9A5ACD8B138D72 /* Release */, + 9BF74490EC938556B96E2A3372C604DD /* Debug */, + CA44A93B91752AA83EC6CCB22764D527 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F43F6591A165353F2FE927771835E799 /* Build configuration list for PBXNativeTarget "EthereumAddress-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F5923572A54909C08EF28178F96E68FD /* Debug */, + 9F0CCACAE41FF43BAD49E0F5993ED010 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -5152,8 +5560,8 @@ F8A195F0CD637B21B4FABEA84B502663 /* Build configuration list for PBXNativeTarget "SipHash-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 50921841075F46C5C393DB5B6A2529EB /* Debug */, - ADB19600F3034CFC88E8930883A97411 /* Release */, + CB2C61730C420D7E1AED74B447061493 /* Debug */, + 0B909F147936EE3B5A2B75910E90133C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-dummy.m b/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-dummy.m new file mode 100644 index 000000000..416179abd --- /dev/null +++ b/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_EthereumABI_iOS : NSObject +@end +@implementation PodsDummy_EthereumABI_iOS +@end diff --git a/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-prefix.pch b/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-prefix.pch new file mode 100644 index 000000000..beb2a2441 --- /dev/null +++ b/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-prefix.pch @@ -0,0 +1,12 @@ +#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/EthereumABI-iOS/EthereumABI-iOS-umbrella.h b/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-umbrella.h new file mode 100644 index 000000000..d0c9e02c9 --- /dev/null +++ b/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "EthereumABI.h" + +FOUNDATION_EXPORT double EthereumABIVersionNumber; +FOUNDATION_EXPORT const unsigned char EthereumABIVersionString[]; + diff --git a/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.modulemap b/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.modulemap new file mode 100644 index 000000000..aafb8ce82 --- /dev/null +++ b/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.modulemap @@ -0,0 +1,7 @@ +module EthereumABI { + umbrella header "EthereumABI-iOS-umbrella.h" + exclude header "EthereumABI-macOS-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.xcconfig b/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.xcconfig new file mode 100644 index 000000000..56996eb63 --- /dev/null +++ b/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.xcconfig @@ -0,0 +1,13 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS +DEFINES_MODULE = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/EthereumABI" "${PODS_ROOT}/Headers/Public" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/EthereumABI +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" diff --git a/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-dummy.m b/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-dummy.m new file mode 100644 index 000000000..778652094 --- /dev/null +++ b/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_EthereumABI_macOS : NSObject +@end +@implementation PodsDummy_EthereumABI_macOS +@end diff --git a/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-prefix.pch b/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-prefix.pch new file mode 100644 index 000000000..082f8af22 --- /dev/null +++ b/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-prefix.pch @@ -0,0 +1,12 @@ +#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/EthereumABI-macOS/EthereumABI-macOS-umbrella.h b/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-umbrella.h new file mode 100644 index 000000000..c01fbff6a --- /dev/null +++ b/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "EthereumABI.h" + +FOUNDATION_EXPORT double EthereumABIVersionNumber; +FOUNDATION_EXPORT const unsigned char EthereumABIVersionString[]; + diff --git a/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.modulemap b/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.modulemap new file mode 100644 index 000000000..676927a57 --- /dev/null +++ b/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.modulemap @@ -0,0 +1,7 @@ +module EthereumABI { + umbrella header "EthereumABI-macOS-umbrella.h" + exclude header "EthereumABI-iOS-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.xcconfig b/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.xcconfig new file mode 100644 index 000000000..a8186f34e --- /dev/null +++ b/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.xcconfig @@ -0,0 +1,13 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS +DEFINES_MODULE = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/EthereumABI" "${PODS_ROOT}/Headers/Public" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/EthereumABI +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" diff --git a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.markdown b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.markdown index 0f6b0a223..552db3ca0 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.markdown +++ b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.markdown @@ -39,6 +39,23 @@ Permission is granted to anyone to use this software for any purpose,including c - This notice may not be removed or altered from any source or binary distribution. - Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' +## EthereumABI + +Copyright 2018 Alex Vlasov + +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. + + ## EthereumAddress Copyright 2018 Alex Vlasov diff --git a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.plist b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.plist index 7c82be473..22c6b993c 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.plist +++ b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS-acknowledgements.plist @@ -1,5 +1,285 @@ - + + 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 + Copyright (C) 2014-2017 Marcin Krzyżanowski <marcin.krzyzanowski@gmail.com> +This software is provided 'as-is', without any express or implied warranty. + +In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +- This notice may not be removed or altered from any source or binary distribution. +- Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' + License + Attribution + Title + CryptoSwift + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + EthereumABI + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + EthereumAddress + Type + PSGroupSpecifier + + + FooterText + Copyright 2016-present, Max Howell; mxcl@me.com + +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 + PromiseKit + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2014 Rob Rix + +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 + Result + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2016 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 + SipHash + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + SwiftRLP + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + scrypt + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <av@bankexfoundation.org> (bankexfoundation.org) + +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 + Apache License 2.0 + Title + secp256k1_swift + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + diff --git a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.debug.xcconfig b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.debug.xcconfig index fcd73c87e..322fcb5ab 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.debug.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.debug.xcconfig @@ -1,11 +1,11 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-iOS" -l"CryptoSwift-iOS" -l"EthereumAddress-iOS" -l"PromiseKit" -l"Result-iOS" -l"SipHash-iOS" -l"SwiftRLP-iOS" -l"scrypt-iOS" -l"secp256k1_swift-iOS" -framework "Foundation" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumABI" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS/EthereumABI.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-iOS" -l"CryptoSwift-iOS" -l"EthereumABI-iOS" -l"EthereumAddress-iOS" -l"PromiseKit" -l"Result-iOS" -l"SipHash-iOS" -l"SwiftRLP-iOS" -l"scrypt-iOS" -l"secp256k1_swift-iOS" -framework "Foundation" -framework "UIKit" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS/EthereumABI.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" $(PODS_TARGET_SRCROOT)/scrypt +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" $(PODS_TARGET_SRCROOT)/scrypt diff --git a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.release.xcconfig b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.release.xcconfig index fcd73c87e..322fcb5ab 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.release.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-iOS/Pods-web3swift-iOS.release.xcconfig @@ -1,11 +1,11 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-iOS" -l"CryptoSwift-iOS" -l"EthereumAddress-iOS" -l"PromiseKit" -l"Result-iOS" -l"SipHash-iOS" -l"SwiftRLP-iOS" -l"scrypt-iOS" -l"secp256k1_swift-iOS" -framework "Foundation" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumABI" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS/EthereumABI.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-iOS" -l"CryptoSwift-iOS" -l"EthereumABI-iOS" -l"EthereumAddress-iOS" -l"PromiseKit" -l"Result-iOS" -l"SipHash-iOS" -l"SwiftRLP-iOS" -l"scrypt-iOS" -l"secp256k1_swift-iOS" -framework "Foundation" -framework "UIKit" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS/EthereumABI.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" $(PODS_TARGET_SRCROOT)/scrypt +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" $(PODS_TARGET_SRCROOT)/scrypt diff --git a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests-acknowledgements.plist b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests-acknowledgements.plist index 7c82be473..7acbad1ea 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests-acknowledgements.plist +++ b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests-acknowledgements.plist @@ -1,5 +1,29 @@ - + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + diff --git a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.debug.xcconfig b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.debug.xcconfig index b0625230f..a0c1416c9 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.debug.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.debug.xcconfig @@ -1,10 +1,10 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumABI" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS/EthereumABI.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS/EthereumABI.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" diff --git a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.release.xcconfig b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.release.xcconfig index b0625230f..a0c1416c9 100644 --- a/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.release.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-iOS_Tests/Pods-web3swift-iOS_Tests.release.xcconfig @@ -1,10 +1,10 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumABI" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS/EthereumABI.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS/EthereumABI.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-iOS" diff --git a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.markdown b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.markdown index 0f6b0a223..552db3ca0 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.markdown +++ b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.markdown @@ -39,6 +39,23 @@ Permission is granted to anyone to use this software for any purpose,including c - This notice may not be removed or altered from any source or binary distribution. - Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' +## EthereumABI + +Copyright 2018 Alex Vlasov + +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. + + ## EthereumAddress Copyright 2018 Alex Vlasov diff --git a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.plist b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.plist index 7c82be473..22c6b993c 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.plist +++ b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS-acknowledgements.plist @@ -1,5 +1,285 @@ - + + 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 + Copyright (C) 2014-2017 Marcin Krzyżanowski <marcin.krzyzanowski@gmail.com> +This software is provided 'as-is', without any express or implied warranty. + +In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +- This notice may not be removed or altered from any source or binary distribution. +- Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' + License + Attribution + Title + CryptoSwift + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + EthereumABI + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + EthereumAddress + Type + PSGroupSpecifier + + + FooterText + Copyright 2016-present, Max Howell; mxcl@me.com + +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 + PromiseKit + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2014 Rob Rix + +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 + Result + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2016 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 + SipHash + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + SwiftRLP + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + scrypt + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <av@bankexfoundation.org> (bankexfoundation.org) + +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 + Apache License 2.0 + Title + secp256k1_swift + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + diff --git a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig index 22e0383cb..7eb95d9be 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig @@ -1,11 +1,11 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-macOS" -l"CryptoSwift-macOS" -l"EthereumAddress-macOS" -l"PromiseKit.root-CorePromise-Foundation" -l"Result-macOS" -l"SipHash-macOS" -l"SwiftRLP-macOS" -l"scrypt-macOS" -l"secp256k1_swift-macOS" -framework "Foundation" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumABI" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS/EthereumABI.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-macOS" -l"CryptoSwift-macOS" -l"EthereumABI-macOS" -l"EthereumAddress-macOS" -l"PromiseKit.root-CorePromise-Foundation" -l"Result-macOS" -l"SipHash-macOS" -l"SwiftRLP-macOS" -l"scrypt-macOS" -l"secp256k1_swift-macOS" -framework "Foundation" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS/EthereumABI.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" $(PODS_TARGET_SRCROOT)/scrypt +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" $(PODS_TARGET_SRCROOT)/scrypt diff --git a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig index 22e0383cb..7eb95d9be 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig @@ -1,11 +1,11 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-macOS" -l"CryptoSwift-macOS" -l"EthereumAddress-macOS" -l"PromiseKit.root-CorePromise-Foundation" -l"Result-macOS" -l"SipHash-macOS" -l"SwiftRLP-macOS" -l"scrypt-macOS" -l"secp256k1_swift-macOS" -framework "Foundation" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumABI" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS/EthereumABI.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +OTHER_LDFLAGS = $(inherited) -ObjC -l"BigInt-macOS" -l"CryptoSwift-macOS" -l"EthereumABI-macOS" -l"EthereumAddress-macOS" -l"PromiseKit.root-CorePromise-Foundation" -l"Result-macOS" -l"SipHash-macOS" -l"SwiftRLP-macOS" -l"scrypt-macOS" -l"secp256k1_swift-macOS" -framework "Foundation" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS/EthereumABI.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" $(PODS_TARGET_SRCROOT)/scrypt +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" $(PODS_TARGET_SRCROOT)/scrypt diff --git a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests-acknowledgements.plist b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests-acknowledgements.plist index 7c82be473..7acbad1ea 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests-acknowledgements.plist +++ b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests-acknowledgements.plist @@ -1,5 +1,29 @@ - + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + diff --git a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.debug.xcconfig b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.debug.xcconfig index 2063b1f6d..c57d86b33 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.debug.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.debug.xcconfig @@ -1,10 +1,10 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumABI" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS/EthereumABI.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS/EthereumABI.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" diff --git a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.release.xcconfig b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.release.xcconfig index 2063b1f6d..c57d86b33 100644 --- a/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.release.xcconfig +++ b/Pods/Target Support Files/Pods-web3swift-macOS_Tests/Pods-web3swift-macOS_Tests.release.xcconfig @@ -1,10 +1,10 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EthereumAddress" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit" -isystem "${PODS_ROOT}/Headers/Public/SwiftRLP" -isystem "${PODS_ROOT}/Headers/Public/scrypt" -isystem "${PODS_ROOT}/Headers/Public/secp256k1_swift" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EthereumABI" "${PODS_ROOT}/Headers/Public/EthereumAddress" "${PODS_ROOT}/Headers/Public/PromiseKit" "${PODS_ROOT}/Headers/Public/SwiftRLP" "${PODS_ROOT}/Headers/Public/scrypt" "${PODS_ROOT}/Headers/Public/secp256k1_swift" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS/EthereumABI.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS/CryptoSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS/EthereumABI.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS/EthereumAddress.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation/PromiseKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS/Result.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS/SipHash.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS/SwiftRLP.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS/scrypt.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS/secp256k1_swift.modulemap" 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 -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit.root-CorePromise-Foundation" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift-macOS" diff --git a/web3swift.podspec b/web3swift.podspec index 161547783..019f3eb16 100755 --- a/web3swift.podspec +++ b/web3swift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "web3swift" -s.version = "1.5.1" +s.version = "2.0.0" s.summary = "Web3 implementation in vanilla Swift for iOS ans macOS" s.description = <<-DESC @@ -14,7 +14,7 @@ s.source = { :git => 'https://github.com/matterinc/web3swift.git', :ta s.social_media_url = 'https://twitter.com/shamatar' s.swift_version = '4.1' -s.module_name = 'web3swift' +s.module_name = 'Web3swift' s.ios.deployment_target = "9.0" s.osx.deployment_target = "10.11" s.source_files = "web3swift/**/*.{h,swift}", @@ -23,10 +23,11 @@ s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } s.frameworks = 'CoreImage' s.dependency 'BigInt', '~> 3.1' -s.dependency 'Result', '~> 4.0' -s.dependency 'CryptoSwift', '~> 0.11' +s.dependency 'CryptoSwift', '~> 0.13' s.dependency 'PromiseKit', '~> 6.3' s.dependency 'scrypt', '~> 2.0' s.dependency 'secp256k1_swift', '~> 1.0.3' s.dependency 'SwiftRLP', '~> 1.1' +s.dependency 'EthereumAddress', '~> 1.0.1' +s.dependemcy 'EthereumABI', '~> 1.1.1' end diff --git a/web3swift.xcodeproj/project.pbxproj b/web3swift.xcodeproj/project.pbxproj index 0dc328d16..ff7b9ece6 100755 --- a/web3swift.xcodeproj/project.pbxproj +++ b/web3swift.xcodeproj/project.pbxproj @@ -10,7 +10,6 @@ 00E5FE7620EA34370030E0D6 /* web3swift_keystores_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7520EA34370030E0D6 /* web3swift_keystores_Tests.swift */; }; 00E5FE7A20EA355D0030E0D6 /* web3swift_transactions_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7920EA355D0030E0D6 /* web3swift_transactions_Tests.swift */; }; 00E5FE7C20EA37B50030E0D6 /* web3swift_ERC20_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7B20EA37B50030E0D6 /* web3swift_ERC20_Tests.swift */; }; - 00E5FE7E20EA3A3F0030E0D6 /* web3swift_ABI_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7D20EA3A3F0030E0D6 /* web3swift_ABI_Tests.swift */; }; 00E5FE8020EA3CEA0030E0D6 /* web3swift_RLP_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7F20EA3CEA0030E0D6 /* web3swift_RLP_Tests.swift */; }; 00E5FE8220EA3FF40030E0D6 /* web3swift_infura_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE8120EA3FF40030E0D6 /* web3swift_infura_Tests.swift */; }; 13AE5971A972F5B55FA6FB69 /* libPods-web3swift-iOS_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8349531F1984454E50389370 /* libPods-web3swift-iOS_Tests.a */; }; @@ -61,8 +60,6 @@ 8113DE7C1FD8514400CD8DF1 /* NSRegularExpressionExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8113DE7B1FD8514400CD8DF1 /* NSRegularExpressionExtension.swift */; }; 8116666320455E33008D8AD0 /* Web3+Wallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCEF20440C3600D82FAF /* Web3+Wallet.swift */; }; 8116666420455E33008D8AD0 /* Web3+Wallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCEF20440C3600D82FAF /* Web3+Wallet.swift */; }; - 81166665204565AC008D8AD0 /* Web3+BrowserFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCF8204456E600D82FAF /* Web3+BrowserFunctions.swift */; }; - 81166666204565AD008D8AD0 /* Web3+BrowserFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCF8204456E600D82FAF /* Web3+BrowserFunctions.swift */; }; 81195AB020D7FF8500ABC6B1 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81195AAF20D7FF8500ABC6B1 /* Promise+Web3+Contract+GetIndexedEvents.swift */; }; 8123E1C7200CBAC200B6D3AB /* Dictionary+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8123E1C6200CBAC200B6D3AB /* Dictionary+Extension.swift */; }; 8123E1C9200CBAF800B6D3AB /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8123E1C8200CBAF800B6D3AB /* Data+Extension.swift */; }; @@ -74,8 +71,6 @@ 815630002007B48800A0EC2F /* BIP32KeystoreJSONStructure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81562FFF2007B48800A0EC2F /* BIP32KeystoreJSONStructure.swift */; }; 815630022007B53C00A0EC2F /* BIP32Keystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 815630012007B53C00A0EC2F /* BIP32Keystore.swift */; }; 815630042007BC8F00A0EC2F /* BIP39+WordLists.swift in Sources */ = {isa = PBXBuildFile; fileRef = 815630032007BC8F00A0EC2F /* BIP39+WordLists.swift */; }; - 8159C50B21352CB700197B91 /* Web3+ERC20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8159C50A21352CB700197B91 /* Web3+ERC20.swift */; }; - 8159C50C21352CB700197B91 /* Web3+ERC20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8159C50A21352CB700197B91 /* Web3+ERC20.swift */; }; 8159C50E2135901700197B91 /* web3swift_ERC20_Class_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8159C50D2135901700197B91 /* web3swift_ERC20_Class_Tests.swift */; }; 815C74C820ECBF3E00DE2AC4 /* web3swift_User_cases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 815C74C720ECBF3E00DE2AC4 /* web3swift_User_cases.swift */; }; 8160E5CE20B8245A0070070B /* IBAN.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8160E5CD20B8245A0070070B /* IBAN.swift */; }; @@ -91,6 +86,12 @@ 818ABD5D1FE95FC9002657BB /* Web3+Contract.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818ABD5C1FE95FC9002657BB /* Web3+Contract.swift */; }; 818D16CF204D42910084D2A4 /* Web3+EventParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818D16CE204D42910084D2A4 /* Web3+EventParser.swift */; }; 818D16D0204D42940084D2A4 /* Web3+EventParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818D16CE204D42910084D2A4 /* Web3+EventParser.swift */; }; + 81909D1221862D17007D2AE5 /* Web3+ReadingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1121862D17007D2AE5 /* Web3+ReadingTransaction.swift */; }; + 81909D1321862D17007D2AE5 /* Web3+ReadingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1121862D17007D2AE5 /* Web3+ReadingTransaction.swift */; }; + 81909D1521862D37007D2AE5 /* Web3+MutatingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1421862D37007D2AE5 /* Web3+MutatingTransaction.swift */; }; + 81909D1621862D37007D2AE5 /* Web3+MutatingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1421862D37007D2AE5 /* Web3+MutatingTransaction.swift */; }; + 81909D1821862D5A007D2AE5 /* Web3+Eventloop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */; }; + 81909D1921862D5A007D2AE5 /* Web3+Eventloop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */; }; 81A1821520D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821620D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821A20D5A6F70016741F /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */; }; @@ -130,36 +131,18 @@ 81A7B2512143C3A8004CD2C7 /* NameHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2502143C3A8004CD2C7 /* NameHash.swift */; }; 81A7B2522143C3A8004CD2C7 /* NameHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2502143C3A8004CD2C7 /* NameHash.swift */; }; 81A7B2792143C978004CD2C7 /* web3swift_ENS_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2782143C978004CD2C7 /* web3swift_ENS_Tests.swift */; }; - 81A7B2872143DBF6004CD2C7 /* EIP681.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2862143DBF6004CD2C7 /* EIP681.swift */; }; - 81A7B2882143DBF6004CD2C7 /* EIP681.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2862143DBF6004CD2C7 /* EIP681.swift */; }; 81A7B28A2143DF1D004CD2C7 /* web3swift_EIP681_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2892143DF1D004CD2C7 /* web3swift_EIP681_Tests.swift */; }; 81C0FCF220440EB500D82FAF /* Web3+Protocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCF120440EB500D82FAF /* Web3+Protocols.swift */; }; 81C0FCF420440F0900D82FAF /* Web3+Options.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCF320440F0900D82FAF /* Web3+Options.swift */; }; 81C0FCF720441A1D00D82FAF /* TransactionSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCF520440F9900D82FAF /* TransactionSigner.swift */; }; - 81C0FD012044A89300D82FAF /* Web3+TransactionIntermediate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCFC20449D1400D82FAF /* Web3+TransactionIntermediate.swift */; }; - 81C0FD032044A89400D82FAF /* Web3+TransactionIntermediate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCFC20449D1400D82FAF /* Web3+TransactionIntermediate.swift */; }; 81C0FD042044A8A700D82FAF /* Web3+Options.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCF320440F0900D82FAF /* Web3+Options.swift */; }; 81C0FD052044A8AE00D82FAF /* Web3+Protocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCF120440EB500D82FAF /* Web3+Protocols.swift */; }; 81C0FD062044A8D100D82FAF /* TransactionSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCF520440F9900D82FAF /* TransactionSigner.swift */; }; 81C146F71FF274B200AA943E /* Web3+Structures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C146F61FF274B200AA943E /* Web3+Structures.swift */; }; - 81C5DA0E207254D000424CD6 /* ABIv2Elements.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA0D207254D000424CD6 /* ABIv2Elements.swift */; }; - 81C5DA0F207254D000424CD6 /* ABIv2Elements.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA0D207254D000424CD6 /* ABIv2Elements.swift */; }; - 81C5DA11207254F600424CD6 /* ABIv2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA10207254F600424CD6 /* ABIv2.swift */; }; - 81C5DA12207254F600424CD6 /* ABIv2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA10207254F600424CD6 /* ABIv2.swift */; }; - 81C5DA1B2072633300424CD6 /* ABIv2ParameterTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA1A2072633300424CD6 /* ABIv2ParameterTypes.swift */; }; - 81C5DA1C2072633300424CD6 /* ABIv2ParameterTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA1A2072633300424CD6 /* ABIv2ParameterTypes.swift */; }; - 81C5DA1D207263D700424CD6 /* ABIv2Parsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA0A2072548900424CD6 /* ABIv2Parsing.swift */; }; - 81C5DA1E207263D800424CD6 /* ABIv2Parsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA0A2072548900424CD6 /* ABIv2Parsing.swift */; }; - 81C5DA222072DFE600424CD6 /* ABIv2TypeParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA212072DFE600424CD6 /* ABIv2TypeParser.swift */; }; - 81C5DA232072DFE600424CD6 /* ABIv2TypeParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA212072DFE600424CD6 /* ABIv2TypeParser.swift */; }; - 81C5DA252072E14E00424CD6 /* ABIv2Encoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA242072E14E00424CD6 /* ABIv2Encoding.swift */; }; - 81C5DA262072E14E00424CD6 /* ABIv2Encoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA242072E14E00424CD6 /* ABIv2Encoding.swift */; }; 81C5DA282072E18200424CD6 /* NativeTypesEncoding+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA272072E18200424CD6 /* NativeTypesEncoding+Extensions.swift */; }; 81C5DA292072E18200424CD6 /* NativeTypesEncoding+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA272072E18200424CD6 /* NativeTypesEncoding+Extensions.swift */; }; - 81C5DA2B2074CA1400424CD6 /* ABIv2Decoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA2A2074CA1400424CD6 /* ABIv2Decoding.swift */; }; - 81C5DA2C2074CA1400424CD6 /* ABIv2Decoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA2A2074CA1400424CD6 /* ABIv2Decoding.swift */; }; - 81C5DA2E2074EBF500424CD6 /* ContractABIv2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA2D2074EBF500424CD6 /* ContractABIv2.swift */; }; - 81C5DA2F2074EBF500424CD6 /* ContractABIv2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA2D2074EBF500424CD6 /* ContractABIv2.swift */; }; + 81C5DA2E2074EBF500424CD6 /* EthereumContract.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA2D2074EBF500424CD6 /* EthereumContract.swift */; }; + 81C5DA2F2074EBF500424CD6 /* EthereumContract.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA2D2074EBF500424CD6 /* EthereumContract.swift */; }; 81C5DA312074EC1E00424CD6 /* ContractProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA302074EC1E00424CD6 /* ContractProtocol.swift */; }; 81C5DA322074EC1E00424CD6 /* ContractProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5DA302074EC1E00424CD6 /* ContractProtocol.swift */; }; 81D7D97220A31FB700A193EC /* ComparisonExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81D7D97120A31FB700A193EC /* ComparisonExtensions.swift */; }; @@ -179,43 +162,19 @@ 81FB21FF207BB297007F9A83 /* EIP67Code.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FB21F8207BA78B007F9A83 /* EIP67Code.swift */; }; 81FB2201207BC58C007F9A83 /* CoreImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81FB2200207BC58B007F9A83 /* CoreImage.framework */; }; 81FB2203207BC6DB007F9A83 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81FB2202207BC6DB007F9A83 /* ImageIO.framework */; }; - 81FECD45211ADE51006DA367 /* Web3+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD44211ADE51006DA367 /* Web3+ObjC.swift */; }; - 81FECD46211ADE51006DA367 /* Web3+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD44211ADE51006DA367 /* Web3+ObjC.swift */; }; - 81FECD49211ADEB1006DA367 /* Web3+Instance+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD48211ADEB1006DA367 /* Web3+Instance+ObjC.swift */; }; - 81FECD4A211ADEB1006DA367 /* Web3+Instance+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD48211ADEB1006DA367 /* Web3+Instance+ObjC.swift */; }; - 81FECD4C211ADF70006DA367 /* Web3+HttpProvider+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD4B211ADF70006DA367 /* Web3+HttpProvider+ObjC.swift */; }; - 81FECD4D211ADF70006DA367 /* Web3+HttpProvider+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD4B211ADF70006DA367 /* Web3+HttpProvider+ObjC.swift */; }; - 81FECD4F211AE100006DA367 /* KeystoreManager+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD4E211AE100006DA367 /* KeystoreManager+ObjC.swift */; }; - 81FECD50211AE100006DA367 /* KeystoreManager+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD4E211AE100006DA367 /* KeystoreManager+ObjC.swift */; }; - 81FECD52211AE110006DA367 /* PlainKeystore+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD51211AE110006DA367 /* PlainKeystore+ObjC.swift */; }; - 81FECD53211AE110006DA367 /* PlainKeystore+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD51211AE110006DA367 /* PlainKeystore+ObjC.swift */; }; - 81FECD55211AEB49006DA367 /* EthereumAddress+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD54211AEB49006DA367 /* EthereumAddress+ObjC.swift */; }; - 81FECD56211AEB49006DA367 /* EthereumAddress+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD54211AEB49006DA367 /* EthereumAddress+ObjC.swift */; }; - 81FECD58211AEB56006DA367 /* BigUInt+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD57211AEB56006DA367 /* BigUInt+ObjC.swift */; }; - 81FECD59211AEB56006DA367 /* BigUInt+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD57211AEB56006DA367 /* BigUInt+ObjC.swift */; }; - 81FECD5B211AECBD006DA367 /* Web3+Eth+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD5A211AECBD006DA367 /* Web3+Eth+ObjC.swift */; }; - 81FECD5C211AECBD006DA367 /* Web3+Eth+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD5A211AECBD006DA367 /* Web3+Eth+ObjC.swift */; }; 81FECD5E211AEFCE006DA367 /* web3swift_ObjC_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD5D211AEFCE006DA367 /* web3swift_ObjC_Tests.swift */; }; 985BFD4A216CE8B100B28C14 /* Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 985BFD49216CE8B100B28C14 /* Web3+TxPool.swift */; }; 985BFD4E216E2E0A00B28C14 /* Promise+Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 985BFD4D216E2E0A00B28C14 /* Promise+Web3+TxPool.swift */; }; - B219DC172154F3EE0035BF94 /* ENSResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B219DC162154F3EE0035BF94 /* ENSResolver.swift */; }; - B2E668CE214F8A7B00C3CC2D /* ENS.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2E668CD214F8A7B00C3CC2D /* ENS.swift */; }; B350A445E5DB35C60E59AD70 /* libPods-web3swift-macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 57F8C9C48884592DCF561393 /* libPods-web3swift-macOS.a */; }; - E2065FB62181D7D700701068 /* Web3+ERC721.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E94C5F217788E0005F54A0 /* Web3+ERC721.swift */; }; - E2065FB72181D7D700701068 /* JSONRPCrequestDispatcher+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2C590752152835400FF53D3 /* JSONRPCrequestDispatcher+ObjC.swift */; }; E2065FB82181D7D700701068 /* Promise+Web3+Eth+EstimateGas.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1823F20D79FDB0016741F /* Promise+Web3+Eth+EstimateGas.swift */; }; E2065FB92181D7D700701068 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81195AAF20D7FF8500ABC6B1 /* Promise+Web3+Contract+GetIndexedEvents.swift */; }; E2065FBA2181D7D700701068 /* Promise+Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 985BFD4D216E2E0A00B28C14 /* Promise+Web3+TxPool.swift */; }; E2065FBB2181D7D700701068 /* Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 985BFD49216CE8B100B28C14 /* Web3+TxPool.swift */; }; - E2065FBC2181D7D700701068 /* ENS.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2E668CD214F8A7B00C3CC2D /* ENS.swift */; }; - E2065FBD2181D7D700701068 /* ENSResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B219DC162154F3EE0035BF94 /* ENSResolver.swift */; }; E23B5ADB20EA67D800DC7F32 /* web3swift_AdvancedABIv2_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5ADA20EA67D800DC7F32 /* web3swift_AdvancedABIv2_Tests.swift */; }; E23B5ADD20EA685D00DC7F32 /* web3swift_EIP67_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5ADC20EA685D00DC7F32 /* web3swift_EIP67_Tests.swift */; }; E23B5AE120EA695400DC7F32 /* web3swift_rinkeby_personalSignature_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5AE020EA695400DC7F32 /* web3swift_rinkeby_personalSignature_Tests.swift */; }; E23B5AE320EA69B900DC7F32 /* web3swift_numberFormattingUtil_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5AE220EA69B900DC7F32 /* web3swift_numberFormattingUtil_Tests.swift */; }; E23B5AE520EA6A0A00DC7F32 /* web3swift_contractV2_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5AE420EA6A0A00DC7F32 /* web3swift_contractV2_Tests.swift */; }; - E2C590762152835400FF53D3 /* JSONRPCrequestDispatcher+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2C590752152835400FF53D3 /* JSONRPCrequestDispatcher+ObjC.swift */; }; - E2E94C60217788E0005F54A0 /* Web3+ERC721.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E94C5F217788E0005F54A0 /* Web3+ERC721.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -239,7 +198,6 @@ 00E5FE7520EA34370030E0D6 /* web3swift_keystores_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_keystores_Tests.swift; sourceTree = ""; }; 00E5FE7920EA355D0030E0D6 /* web3swift_transactions_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_transactions_Tests.swift; sourceTree = ""; }; 00E5FE7B20EA37B50030E0D6 /* web3swift_ERC20_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_ERC20_Tests.swift; sourceTree = ""; }; - 00E5FE7D20EA3A3F0030E0D6 /* web3swift_ABI_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_ABI_Tests.swift; sourceTree = ""; }; 00E5FE7F20EA3CEA0030E0D6 /* web3swift_RLP_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_RLP_Tests.swift; sourceTree = ""; }; 00E5FE8120EA3FF40030E0D6 /* web3swift_infura_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_infura_Tests.swift; sourceTree = ""; }; 08BD06D432296DA533D07D20 /* Pods_Web3Swift_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Web3Swift_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -301,6 +259,9 @@ 818ABD5A1FE95F8F002657BB /* Web3+Instance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+Instance.swift"; sourceTree = ""; }; 818ABD5C1FE95FC9002657BB /* Web3+Contract.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+Contract.swift"; sourceTree = ""; }; 818D16CE204D42910084D2A4 /* Web3+EventParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+EventParser.swift"; sourceTree = ""; }; + 81909D1121862D17007D2AE5 /* Web3+ReadingTransaction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+ReadingTransaction.swift"; sourceTree = ""; }; + 81909D1421862D37007D2AE5 /* Web3+MutatingTransaction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+MutatingTransaction.swift"; sourceTree = ""; }; + 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+Eventloop.swift"; sourceTree = ""; }; 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetBalance.swift"; sourceTree = ""; }; 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+HttpProvider.swift"; sourceTree = ""; }; 81A1821C20D5C6C10016741F /* web3swift_promises_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_promises_Tests.swift; sourceTree = ""; }; @@ -332,15 +293,8 @@ 81C0FCF8204456E600D82FAF /* Web3+BrowserFunctions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+BrowserFunctions.swift"; sourceTree = ""; }; 81C0FCFC20449D1400D82FAF /* Web3+TransactionIntermediate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+TransactionIntermediate.swift"; sourceTree = ""; }; 81C146F61FF274B200AA943E /* Web3+Structures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Web3+Structures.swift"; sourceTree = ""; }; - 81C5DA0A2072548900424CD6 /* ABIv2Parsing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ABIv2Parsing.swift; sourceTree = ""; }; - 81C5DA0D207254D000424CD6 /* ABIv2Elements.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ABIv2Elements.swift; sourceTree = ""; }; - 81C5DA10207254F600424CD6 /* ABIv2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ABIv2.swift; sourceTree = ""; }; - 81C5DA1A2072633300424CD6 /* ABIv2ParameterTypes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ABIv2ParameterTypes.swift; sourceTree = ""; }; - 81C5DA212072DFE600424CD6 /* ABIv2TypeParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ABIv2TypeParser.swift; sourceTree = ""; }; - 81C5DA242072E14E00424CD6 /* ABIv2Encoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ABIv2Encoding.swift; sourceTree = ""; }; 81C5DA272072E18200424CD6 /* NativeTypesEncoding+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NativeTypesEncoding+Extensions.swift"; sourceTree = ""; }; - 81C5DA2A2074CA1400424CD6 /* ABIv2Decoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ABIv2Decoding.swift; sourceTree = ""; }; - 81C5DA2D2074EBF500424CD6 /* ContractABIv2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContractABIv2.swift; sourceTree = ""; }; + 81C5DA2D2074EBF500424CD6 /* EthereumContract.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EthereumContract.swift; sourceTree = ""; }; 81C5DA302074EC1E00424CD6 /* ContractProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContractProtocol.swift; sourceTree = ""; }; 81D7D97120A31FB700A193EC /* ComparisonExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComparisonExtensions.swift; sourceTree = ""; }; 81D7D97420A3240900A193EC /* EthereumFilterEncodingExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EthereumFilterEncodingExtensions.swift; sourceTree = ""; }; @@ -456,7 +410,6 @@ 8159C50921343EF900197B91 /* PrecompiledContracts */, 81FECD43211ADE20006DA367 /* ObjectiveCbridge */, 81A1821220D5A2430016741F /* Promises */, - 81C5DA082072542300424CD6 /* ABIv2 */, 81C0FCED20440BDF00D82FAF /* HookedFunctions */, 81C0FCEA20440BB400D82FAF /* Web3 */, 818EABD71FDC9A3800E013FC /* Contract */, @@ -483,7 +436,6 @@ 815C74C720ECBF3E00DE2AC4 /* web3swift_User_cases.swift */, 00E5FE8120EA3FF40030E0D6 /* web3swift_infura_Tests.swift */, 00E5FE7F20EA3CEA0030E0D6 /* web3swift_RLP_Tests.swift */, - 00E5FE7D20EA3A3F0030E0D6 /* web3swift_ABI_Tests.swift */, 00E5FE7B20EA37B50030E0D6 /* web3swift_ERC20_Tests.swift */, 00E5FE7920EA355D0030E0D6 /* web3swift_transactions_Tests.swift */, 00E5FE7520EA34370030E0D6 /* web3swift_keystores_Tests.swift */, @@ -620,7 +572,7 @@ 818EABD81FDC9A4800E013FC /* Classes */ = { isa = PBXGroup; children = ( - 81C5DA2D2074EBF500424CD6 /* ContractABIv2.swift */, + 81C5DA2D2074EBF500424CD6 /* EthereumContract.swift */, 81C5DA302074EC1E00424CD6 /* ContractProtocol.swift */, 81D7D97120A31FB700A193EC /* ComparisonExtensions.swift */, 81D7D97420A3240900A193EC /* EthereumFilterEncodingExtensions.swift */, @@ -691,6 +643,9 @@ 818D16CE204D42910084D2A4 /* Web3+EventParser.swift */, 81EB1E4A208173D7003BD47F /* Web3+Personal.swift */, 985BFD49216CE8B100B28C14 /* Web3+TxPool.swift */, + 81909D1121862D17007D2AE5 /* Web3+ReadingTransaction.swift */, + 81909D1421862D37007D2AE5 /* Web3+MutatingTransaction.swift */, + 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */, ); path = Classes; sourceTree = ""; @@ -712,28 +667,6 @@ path = Classes; sourceTree = ""; }; - 81C5DA082072542300424CD6 /* ABIv2 */ = { - isa = PBXGroup; - children = ( - 81C5DA092072542F00424CD6 /* Classes */, - ); - path = ABIv2; - sourceTree = ""; - }; - 81C5DA092072542F00424CD6 /* Classes */ = { - isa = PBXGroup; - children = ( - 81C5DA0A2072548900424CD6 /* ABIv2Parsing.swift */, - 81C5DA0D207254D000424CD6 /* ABIv2Elements.swift */, - 81C5DA10207254F600424CD6 /* ABIv2.swift */, - 81C5DA1A2072633300424CD6 /* ABIv2ParameterTypes.swift */, - 81C5DA212072DFE600424CD6 /* ABIv2TypeParser.swift */, - 81C5DA242072E14E00424CD6 /* ABIv2Encoding.swift */, - 81C5DA2A2074CA1400424CD6 /* ABIv2Decoding.swift */, - ); - path = Classes; - sourceTree = ""; - }; 81FA43F42044097100EE14D5 /* web3swift-macOS_Tests */ = { isa = PBXGroup; children = ( @@ -1074,10 +1007,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 81FECD58211AEB56006DA367 /* BigUInt+ObjC.swift in Sources */, 81C146F71FF274B200AA943E /* Web3+Structures.swift in Sources */, 8104E2281FE82BDC00F952CB /* Web3+Utils.swift in Sources */, - 81FECD45211ADE51006DA367 /* Web3+ObjC.swift in Sources */, 818ABD5D1FE95FC9002657BB /* Web3+Contract.swift in Sources */, 8113D2CA1FD7E1590074282C /* KeystoreManager.swift in Sources */, 817EBB1F2006265400E02EAA /* Base58.swift in Sources */, @@ -1087,66 +1018,49 @@ 810B0F9A1FEC446B00CF0DA2 /* Web3+JSONRPC.swift in Sources */, 81195AB020D7FF8500ABC6B1 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */, 81EB1E4B208173D7003BD47F /* Web3+Personal.swift in Sources */, - E2C590762152835400FF53D3 /* JSONRPCrequestDispatcher+ObjC.swift in Sources */, + 81909D1821862D5A007D2AE5 /* Web3+Eventloop.swift in Sources */, 81A1824B20D7DF1B0016741F /* Promise+Web3+Personal+UnlockAccount.swift in Sources */, 81A1823A20D79AD40016741F /* Promise+Web3+Eth+SendRawTransaction.swift in Sources */, 81D7D97520A3240900A193EC /* EthereumFilterEncodingExtensions.swift in Sources */, 817EBB122004FE2F00E02EAA /* BIP32HDNode.swift in Sources */, 8113D2C41FD7E1590074282C /* CryptoExtensions.swift in Sources */, 81A1822220D678060016741F /* Promise+Web3+Eth+GetBlockNumber.swift in Sources */, - E2E94C60217788E0005F54A0 /* Web3+ERC721.swift in Sources */, - 81C5DA252072E14E00424CD6 /* ABIv2Encoding.swift in Sources */, 81A1824220D7AA750016741F /* Promise+Web3+Eth+SendTransaction.swift in Sources */, 817EBB2920075D2E00E02EAA /* BIP39.swift in Sources */, - 81FECD49211ADEB1006DA367 /* Web3+Instance+ObjC.swift in Sources */, 815630022007B53C00A0EC2F /* BIP32Keystore.swift in Sources */, 818ABD5B1FE95F8F002657BB /* Web3+Instance.swift in Sources */, 81D7D97220A31FB700A193EC /* ComparisonExtensions.swift in Sources */, 817EBB27200673D100E02EAA /* KeystoreV3JSONStructure.swift in Sources */, - 81C5DA11207254F600424CD6 /* ABIv2.swift in Sources */, 81FB21FE207BB297007F9A83 /* EIP67Code.swift in Sources */, 81A1821A20D5A6F70016741F /* Promise+HttpProvider.swift in Sources */, 81A1823720D6E2BB0016741F /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */, - 81C5DA0E207254D000424CD6 /* ABIv2Elements.swift in Sources */, - 81FECD5B211AECBD006DA367 /* Web3+Eth+ObjC.swift in Sources */, 818D16CF204D42910084D2A4 /* Web3+EventParser.swift in Sources */, - 81FECD52211AE110006DA367 /* PlainKeystore+ObjC.swift in Sources */, - 81FECD4F211AE100006DA367 /* KeystoreManager+ObjC.swift in Sources */, 81A1824520D7B91B0016741F /* Promise+Web3+Intermediate+Send.swift in Sources */, - 81FECD55211AEB49006DA367 /* EthereumAddress+ObjC.swift in Sources */, 81C5DA282072E18200424CD6 /* NativeTypesEncoding+Extensions.swift in Sources */, 8123E1C7200CBAC200B6D3AB /* Dictionary+Extension.swift in Sources */, 985BFD4E216E2E0A00B28C14 /* Promise+Web3+TxPool.swift in Sources */, 985BFD4A216CE8B100B28C14 /* Web3+TxPool.swift in Sources */, 81D7D97820A61E3800A193EC /* EventFiltering.swift in Sources */, 8160E5CE20B8245A0070070B /* IBAN.swift in Sources */, - 81A7B2872143DBF6004CD2C7 /* EIP681.swift in Sources */, + 81909D1521862D37007D2AE5 /* Web3+MutatingTransaction.swift in Sources */, 810B0F9C1FEC520500CF0DA2 /* Web3+Methods.swift in Sources */, 81A1822520D678590016741F /* Promise+Web3+Eth+GetGasPrice.swift in Sources */, 8113DE7C1FD8514400CD8DF1 /* NSRegularExpressionExtension.swift in Sources */, - B2E668CE214F8A7B00C3CC2D /* ENS.swift in Sources */, - 81C5DA2E2074EBF500424CD6 /* ContractABIv2.swift in Sources */, + 81C5DA2E2074EBF500424CD6 /* EthereumContract.swift in Sources */, 810B0F9E1FEC5B9C00CF0DA2 /* Web3+Eth.swift in Sources */, - 81166665204565AC008D8AD0 /* Web3+BrowserFunctions.swift in Sources */, 81531AA01FE7C07A002192CC /* EthereumKeystoreV3.swift in Sources */, 81A1824820D7DDA20016741F /* Promise+Web3+Personal+Sign.swift in Sources */, 8123E1C9200CBAF800B6D3AB /* Data+Extension.swift in Sources */, - 81C5DA1B2072633300424CD6 /* ABIv2ParameterTypes.swift in Sources */, 817EBB23200649E000E02EAA /* RIPEMD160+StackOveflow.swift in Sources */, - 81FECD4C211ADF70006DA367 /* Web3+HttpProvider+ObjC.swift in Sources */, 8116666320455E33008D8AD0 /* Web3+Wallet.swift in Sources */, 81DDECCF1FDF004E0063684A /* Web3.swift in Sources */, 81A1823420D6E1FD0016741F /* Promise+Web3+Eth+GetBlockByNumber.swift in Sources */, 81A1822820D678BF0016741F /* Promise+Web3+Eth+GetAccounts.swift in Sources */, 81A7B2512143C3A8004CD2C7 /* NameHash.swift in Sources */, 81C5DA312074EC1E00424CD6 /* ContractProtocol.swift in Sources */, - 8159C50B21352CB700197B91 /* Web3+ERC20.swift in Sources */, - 81C5DA222072DFE600424CD6 /* ABIv2TypeParser.swift in Sources */, 815630002007B48800A0EC2F /* BIP32KeystoreJSONStructure.swift in Sources */, - B219DC172154F3EE0035BF94 /* ENSResolver.swift in Sources */, 8123E1CB200CBB2200B6D3AB /* Array+Extension.swift in Sources */, 813FFF8D1FD82EEB006379A2 /* String+Extension.swift in Sources */, - 81C5DA1D207263D700424CD6 /* ABIv2Parsing.swift in Sources */, 81A1823120D68A110016741F /* Promise+Batching.swift in Sources */, 817EBB162004FE4200E02EAA /* Web3+HttpProvider.swift in Sources */, 8103BBCC2077B84400499769 /* PlainKeystore.swift in Sources */, @@ -1155,13 +1069,12 @@ 81C0FCF420440F0900D82FAF /* Web3+Options.swift in Sources */, 81A1822E20D67BC30016741F /* Promise+Web3+Eth+GetTransactionReceipt.swift in Sources */, 81A1824020D79FDB0016741F /* Promise+Web3+Eth+EstimateGas.swift in Sources */, + 81909D1221862D17007D2AE5 /* Web3+ReadingTransaction.swift in Sources */, 81A1822B20D67A1B0016741F /* Promise+Web3+Eth+GetTransactionDetails.swift in Sources */, 815630042007BC8F00A0EC2F /* BIP39+WordLists.swift in Sources */, - 81C5DA2B2074CA1400424CD6 /* ABIv2Decoding.swift in Sources */, 8113D2CE1FD7E1590074282C /* EthereumTransaction.swift in Sources */, 81A1821F20D676BC0016741F /* Promise+Web3+Eth+GetTransactionCount.swift in Sources */, 81A1821520D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */, - 81C0FD012044A89300D82FAF /* Web3+TransactionIntermediate.swift in Sources */, 81A1823C20D79C270016741F /* Promise+Web3+Eth+Call.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1189,7 +1102,6 @@ 00E5FE8220EA3FF40030E0D6 /* web3swift_infura_Tests.swift in Sources */, 1CD91B321FD769A6007BFB45 /* web3swift_Tests.swift in Sources */, 81A7B2792143C978004CD2C7 /* web3swift_ENS_Tests.swift in Sources */, - 00E5FE7E20EA3A3F0030E0D6 /* web3swift_ABI_Tests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1197,40 +1109,31 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E2065FB62181D7D700701068 /* Web3+ERC721.swift in Sources */, - E2065FB72181D7D700701068 /* JSONRPCrequestDispatcher+ObjC.swift in Sources */, E2065FB82181D7D700701068 /* Promise+Web3+Eth+EstimateGas.swift in Sources */, E2065FB92181D7D700701068 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */, E2065FBA2181D7D700701068 /* Promise+Web3+TxPool.swift in Sources */, E2065FBB2181D7D700701068 /* Web3+TxPool.swift in Sources */, - E2065FBC2181D7D700701068 /* ENS.swift in Sources */, - E2065FBD2181D7D700701068 /* ENSResolver.swift in Sources */, - 8159C50C21352CB700197B91 /* Web3+ERC20.swift in Sources */, 4194811B203630530065A83B /* Web3+HttpProvider.swift in Sources */, 4194811E203630530065A83B /* Web3.swift in Sources */, 4194811F203630530065A83B /* Web3+Instance.swift in Sources */, 41948120203630530065A83B /* Web3+Contract.swift in Sources */, 41948121203630530065A83B /* Web3+Utils.swift in Sources */, + 81909D1921862D5A007D2AE5 /* Web3+Eventloop.swift in Sources */, 8125F06A20499AC300A0F2FE /* BloomFilter.swift in Sources */, 81C0FD062044A8D100D82FAF /* TransactionSigner.swift in Sources */, 41948123203630530065A83B /* Web3+JSONRPC.swift in Sources */, 41948124203630530065A83B /* Web3+Structures.swift in Sources */, 41948125203630530065A83B /* Web3+Methods.swift in Sources */, 81EB1E4C208173D7003BD47F /* Web3+Personal.swift in Sources */, - 81FECD4D211ADF70006DA367 /* Web3+HttpProvider+ObjC.swift in Sources */, 81D7D97620A3240900A193EC /* EthereumFilterEncodingExtensions.swift in Sources */, 41948126203630530065A83B /* Web3+Eth.swift in Sources */, - 81C5DA262072E14E00424CD6 /* ABIv2Encoding.swift in Sources */, 81A1822320D678060016741F /* Promise+Web3+Eth+GetBlockNumber.swift in Sources */, 4194812C203630530065A83B /* KeystoreManager.swift in Sources */, 81DFB400210775320011DC85 /* Web3+Infura.swift in Sources */, 81D7D97320A31FB700A193EC /* ComparisonExtensions.swift in Sources */, - 81FECD56211AEB49006DA367 /* EthereumAddress+ObjC.swift in Sources */, 81A1823E20D79C2C0016741F /* Promise+Web3+Eth+SendRawTransaction.swift in Sources */, 81A1823D20D79C290016741F /* Promise+Web3+Eth+Call.swift in Sources */, - 81C5DA12207254F600424CD6 /* ABIv2.swift in Sources */, 81FB21FF207BB297007F9A83 /* EIP67Code.swift in Sources */, - 81C5DA0F207254D000424CD6 /* ABIv2Elements.swift in Sources */, 81A1821B20D5A6F80016741F /* Promise+HttpProvider.swift in Sources */, 81A1823820D6E2BB0016741F /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */, 818D16D0204D42940084D2A4 /* Web3+EventParser.swift in Sources */, @@ -1244,48 +1147,37 @@ 81A7B2522143C3A8004CD2C7 /* NameHash.swift in Sources */, 81A1824920D7DDA20016741F /* Promise+Web3+Personal+Sign.swift in Sources */, 81A1822620D678590016741F /* Promise+Web3+Eth+GetGasPrice.swift in Sources */, + 81909D1621862D37007D2AE5 /* Web3+MutatingTransaction.swift in Sources */, 41948133203630530065A83B /* BIP39.swift in Sources */, - 81C5DA2F2074EBF500424CD6 /* ContractABIv2.swift in Sources */, + 81C5DA2F2074EBF500424CD6 /* EthereumContract.swift in Sources */, 81A1824320D7AA750016741F /* Promise+Web3+Eth+SendTransaction.swift in Sources */, - 81166666204565AD008D8AD0 /* Web3+BrowserFunctions.swift in Sources */, - 81FECD5C211AECBD006DA367 /* Web3+Eth+ObjC.swift in Sources */, 41948134203630530065A83B /* BIP39+WordLists.swift in Sources */, 41948135203630530065A83B /* EthereumKeystoreV3.swift in Sources */, 41948136203630530065A83B /* KeystoreV3JSONStructure.swift in Sources */, 8116666420455E33008D8AD0 /* Web3+Wallet.swift in Sources */, - 81FECD4A211ADEB1006DA367 /* Web3+Instance+ObjC.swift in Sources */, - 81C5DA1C2072633300424CD6 /* ABIv2ParameterTypes.swift in Sources */, - 81FECD53211AE110006DA367 /* PlainKeystore+ObjC.swift in Sources */, 41948137203630530065A83B /* EthereumTransaction.swift in Sources */, 41948138203630530065A83B /* CryptoExtensions.swift in Sources */, 81C0FD052044A8AE00D82FAF /* Web3+Protocols.swift in Sources */, 81A1823520D6E1FD0016741F /* Promise+Web3+Eth+GetBlockByNumber.swift in Sources */, 81A1822920D678BF0016741F /* Promise+Web3+Eth+GetAccounts.swift in Sources */, 81C5DA322074EC1E00424CD6 /* ContractProtocol.swift in Sources */, - 81C5DA232072DFE600424CD6 /* ABIv2TypeParser.swift in Sources */, - 81A7B2882143DBF6004CD2C7 /* EIP681.swift in Sources */, 81A1824C20D7DF1B0016741F /* Promise+Web3+Personal+UnlockAccount.swift in Sources */, 4194813B203630530065A83B /* NSRegularExpressionExtension.swift in Sources */, - 81FECD46211ADE51006DA367 /* Web3+ObjC.swift in Sources */, 81C0FD042044A8A700D82FAF /* Web3+Options.swift in Sources */, - 81C5DA1E207263D800424CD6 /* ABIv2Parsing.swift in Sources */, 81A1823220D68A110016741F /* Promise+Batching.swift in Sources */, 4194813C203630530065A83B /* Base58.swift in Sources */, - 81C0FD032044A89400D82FAF /* Web3+TransactionIntermediate.swift in Sources */, 8103BBCD2077B84400499769 /* PlainKeystore.swift in Sources */, 4194813D203630530065A83B /* RIPEMD160+StackOveflow.swift in Sources */, 4194813E203630530065A83B /* Data+Extension.swift in Sources */, 81A1822F20D67BC30016741F /* Promise+Web3+Eth+GetTransactionReceipt.swift in Sources */, 81A1824620D7B91B0016741F /* Promise+Web3+Intermediate+Send.swift in Sources */, 81A1822C20D67A1B0016741F /* Promise+Web3+Eth+GetTransactionDetails.swift in Sources */, - 81FECD59211AEB56006DA367 /* BigUInt+ObjC.swift in Sources */, + 81909D1321862D17007D2AE5 /* Web3+ReadingTransaction.swift in Sources */, 4194813F203630530065A83B /* Dictionary+Extension.swift in Sources */, - 81C5DA2C2074CA1400424CD6 /* ABIv2Decoding.swift in Sources */, 41948140203630530065A83B /* Array+Extension.swift in Sources */, 81A1822020D676BC0016741F /* Promise+Web3+Eth+GetTransactionCount.swift in Sources */, 81A1821620D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */, 41948141203630530065A83B /* String+Extension.swift in Sources */, - 81FECD50211AE100006DA367 /* KeystoreManager+ObjC.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/web3swift/ABIv2/Classes/ABIv2.swift b/web3swift/ABIv2/Classes/ABIv2.swift deleted file mode 100755 index 4f07a778f..000000000 --- a/web3swift/ABIv2/Classes/ABIv2.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// ABIv2.swift -// web3swift -// -// Created by Alexander Vlasov on 02.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation - -protocol ABIv2ElementPropertiesProtocol { - var isStatic: Bool {get} - var isArray: Bool {get} - var isTuple: Bool {get} - var arraySize: ABIv2.Element.ArraySize {get} - var subtype: ABIv2.Element.ParameterType? {get} - var memoryUsage: UInt64 {get} - var emptyValue: Any {get} -} - -protocol ABIv2Encoding { - var abiRepresentation: String {get} -} - -protocol ABIv2Validation { - var isValid: Bool {get} -} - -public struct ABIv2 { - -} diff --git a/web3swift/Contract/Classes/ContractProtocol.swift b/web3swift/Contract/Classes/ContractProtocol.swift index 3c5849630..61d776ce2 100755 --- a/web3swift/Contract/Classes/ContractProtocol.swift +++ b/web3swift/Contract/Classes/ContractProtocol.swift @@ -13,17 +13,19 @@ import EthereumAddress public protocol ContractProtocol { var address: EthereumAddress? {get set} var options: Web3Options? {get set} + var transactionOptions: TransactionOptions? {get set} var allMethods: [String] {get} var allEvents: [String] {get} - func deploy(bytecode:Data, parameters: [AnyObject], extraData: Data, options: Web3Options?) -> EthereumTransaction? - func method(_ method:String, parameters: [AnyObject], extraData: Data, options: Web3Options?) -> EthereumTransaction? + func deploy(bytecode:Data, parameters: [AnyObject], extraData: Data) -> EthereumTransaction? + func method(_ method:String, parameters: [AnyObject], extraData: Data) -> EthereumTransaction? +// func deploy(bytecode:Data, parameters: [AnyObject], extraData: Data, options: Web3Options?) -> EthereumTransaction? +// func method(_ method:String, parameters: [AnyObject], extraData: Data, options: Web3Options?) -> EthereumTransaction? init?(_ abiString: String, at: EthereumAddress?) func decodeReturnData(_ method:String, data: Data) -> [String:Any]? func decodeInputData(_ method:String, data: Data) -> [String:Any]? func decodeInputData(_ data: Data) -> [String:Any]? func parseEvent(_ eventLog: EventLog) -> (eventName:String?, eventData:[String:Any]?) func testBloomForEventPrecence(eventName: String, bloom: EthereumBloomFilter) -> Bool? -// func allEvents() -> [String: [String: Any]?] } public protocol EventFilterComparable { diff --git a/web3swift/Contract/Classes/ContractABIv2.swift b/web3swift/Contract/Classes/EthereumContract.swift similarity index 51% rename from web3swift/Contract/Classes/ContractABIv2.swift rename to web3swift/Contract/Classes/EthereumContract.swift index cc4665610..516c01ad7 100755 --- a/web3swift/Contract/Classes/ContractABIv2.swift +++ b/web3swift/Contract/Classes/EthereumContract.swift @@ -1,16 +1,19 @@ // -// ContractABIv2.swift -// web3swift -// -// Created by Alexander Vlasov on 04.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alexander Vlasov. +// Copyright © 2018 Alexander Vlasov. All rights reserved. // import Foundation import BigInt import EthereumAddress +import EthereumABI -public struct ContractV2:ContractProtocol { +public struct EthereumContract:ContractProtocol { + public var options: Web3Options? = Web3Options.defaultOptions() + public var transactionOptions: TransactionOptions? = TransactionOptions.defaultOptions + public var address: EthereumAddress? = nil + + var _abi: [ABI.Element] public var allEvents: [String] { return events.keys.compactMap({ (s) -> String in @@ -29,10 +32,8 @@ public struct ContractV2:ContractProtocol { public var parameterValues: [AnyObject] } - public var address: EthereumAddress? = nil - var _abi: [ABIv2.Element] - public var methods: [String: ABIv2.Element] { - var toReturn = [String: ABIv2.Element]() + public var methods: [String: ABI.Element] { + var toReturn = [String: ABI.Element]() for m in self._abi { switch m { case .function(let function): @@ -45,8 +46,8 @@ public struct ContractV2:ContractProtocol { return toReturn } - public var constructor: ABIv2.Element? { - var toReturn : ABIv2.Element? = nil + public var constructor: ABI.Element? { + var toReturn : ABI.Element? = nil for m in self._abi { if toReturn != nil { break @@ -60,14 +61,14 @@ public struct ContractV2:ContractProtocol { } } if toReturn == nil { - let defaultConstructor = ABIv2.Element.constructor(ABIv2.Element.Constructor.init(inputs: [], constant: false, payable: false)) + let defaultConstructor = ABI.Element.constructor(ABI.Element.Constructor(inputs: [], constant: false, payable: false)) return defaultConstructor } return toReturn } - public var events: [String: ABIv2.Element.Event] { - var toReturn = [String: ABIv2.Element.Event]() + public var events: [String: ABI.Element.Event] { + var toReturn = [String: ABI.Element.Event]() for m in self._abi { switch m { case .event(let event): @@ -80,13 +81,11 @@ public struct ContractV2:ContractProtocol { return toReturn } - public var options: Web3Options? = Web3Options.defaultOptions() - public init?(_ abiString: String, at: EthereumAddress? = nil) { do { let jsonData = abiString.data(using: .utf8) - let abi = try JSONDecoder().decode([ABIv2.Record].self, from: jsonData!) - let abiNative = try abi.map({ (record) -> ABIv2.Element in + let abi = try JSONDecoder().decode([ABI.Record].self, from: jsonData!) + let abiNative = try abi.map({ (record) -> ABI.Element in return try record.parse() }) _abi = abiNative @@ -99,38 +98,52 @@ public struct ContractV2:ContractProtocol { } } - public init(abi: [ABIv2.Element]) { + public init(abi: [ABI.Element]) { _abi = abi } - public init(abi: [ABIv2.Element], at: EthereumAddress) { + public init(abi: [ABI.Element], at: EthereumAddress) { _abi = abi address = at } - public func deploy(bytecode:Data, parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), options: Web3Options?) -> EthereumTransaction? { +// public func deploy(bytecode:Data, parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), options: Web3Options?) -> EthereumTransaction? { +// let to:EthereumAddress = EthereumAddress.contractDeploymentAddress() +// let mergedOptions = Web3Options.merge(self.options, with: options) +// var gasLimit:BigUInt +// if let gasInOptions = mergedOptions?.gasLimit { +// gasLimit = gasInOptions +// } else { +// return nil +// } +// +// var gasPrice:BigUInt +// if let gasPriceInOptions = mergedOptions?.gasPrice { +// gasPrice = gasPriceInOptions +// } else { +// return nil +// } +// +// var value:BigUInt +// if let valueInOptions = mergedOptions?.value { +// value = valueInOptions +// } else { +// value = BigUInt(0) +// } +// guard let constructor = self.constructor else {return nil} +// guard let encodedData = constructor.encodeParameters(parameters) else {return nil} +// var fullData = bytecode +// if encodedData != Data() { +// fullData.append(encodedData) +// } else if extraData != Data() { +// fullData.append(extraData) +// } +// let transaction = EthereumTransaction(gasPrice: gasPrice, gasLimit: gasLimit, to: to, value: value, data: fullData) +// return transaction +// } + + public func deploy(bytecode:Data, parameters: [AnyObject] = [AnyObject](), extraData: Data = Data()) -> EthereumTransaction? { let to:EthereumAddress = EthereumAddress.contractDeploymentAddress() - let mergedOptions = Web3Options.merge(self.options, with: options) - var gasLimit:BigUInt - if let gasInOptions = mergedOptions?.gasLimit { - gasLimit = gasInOptions - } else { - return nil - } - - var gasPrice:BigUInt - if let gasPriceInOptions = mergedOptions?.gasPrice { - gasPrice = gasPriceInOptions - } else { - return nil - } - - var value:BigUInt - if let valueInOptions = mergedOptions?.value { - value = valueInOptions - } else { - value = BigUInt(0) - } guard let constructor = self.constructor else {return nil} guard let encodedData = constructor.encodeParameters(parameters) else {return nil} var fullData = bytecode @@ -139,45 +152,61 @@ public struct ContractV2:ContractProtocol { } else if extraData != Data() { fullData.append(extraData) } - let transaction = EthereumTransaction(gasPrice: gasPrice, gasLimit: gasLimit, to: to, value: value, data: fullData) + let transaction = EthereumTransaction(gasPrice: BigUInt(0), gasLimit: BigUInt(0), to: to, value: BigUInt(0), data: fullData) return transaction } +// public func method(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), options: Web3Options?) -> EthereumTransaction? { +// var to:EthereumAddress +// let mergedOptions = Web3Options.merge(self.options, with: options) +// if (self.address != nil) { +// to = self.address! +// } else if let toFound = mergedOptions?.to, toFound.isValid { +// to = toFound +// } else { +// return nil +// } +// +// var gasLimit:BigUInt +// if let gasInOptions = mergedOptions?.gasLimit { +// gasLimit = gasInOptions +// } else { +// return nil +// } +// +// var gasPrice:BigUInt +// if let gasPriceInOptions = mergedOptions?.gasPrice { +// gasPrice = gasPriceInOptions +// } else { +// return nil +// } +// +// var value:BigUInt +// if let valueInOptions = mergedOptions?.value { +// value = valueInOptions +// } else { +// value = BigUInt(0) +// } +// +// if (method == "fallback") { +// let transaction = EthereumTransaction(gasPrice: gasPrice, gasLimit: gasLimit, to: to, value: value, data: extraData) +// return transaction +// } +// let foundMethod = self.methods.filter { (key, value) -> Bool in +// return key == method +// } +// guard foundMethod.count == 1 else {return nil} +// let abiMethod = foundMethod[method] +// guard let encodedData = abiMethod?.encodeParameters(parameters) else {return nil} +// let transaction = EthereumTransaction(gasPrice: gasPrice, gasLimit: gasLimit, to: to, value: value, data: encodedData) +// return transaction +// } - public func method(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), options: Web3Options?) -> EthereumTransaction? { - var to:EthereumAddress - let mergedOptions = Web3Options.merge(self.options, with: options) - if (self.address != nil) { - to = self.address! - } else if let toFound = mergedOptions?.to, toFound.isValid { - to = toFound - } else { - return nil - } - - var gasLimit:BigUInt - if let gasInOptions = mergedOptions?.gasLimit { - gasLimit = gasInOptions - } else { - return nil - } - - var gasPrice:BigUInt - if let gasPriceInOptions = mergedOptions?.gasPrice { - gasPrice = gasPriceInOptions - } else { - return nil - } - - var value:BigUInt - if let valueInOptions = mergedOptions?.value { - value = valueInOptions - } else { - value = BigUInt(0) - } - + public func method(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data()) -> EthereumTransaction? { + guard let to = self.address else {return nil} + if (method == "fallback") { - let transaction = EthereumTransaction(gasPrice: gasPrice, gasLimit: gasLimit, to: to, value: value, data: extraData) + let transaction = EthereumTransaction(gasPrice: BigUInt(0), gasLimit: BigUInt(0), to: to, value: BigUInt(0), data: extraData) return transaction } let foundMethod = self.methods.filter { (key, value) -> Bool in @@ -186,7 +215,7 @@ public struct ContractV2:ContractProtocol { guard foundMethod.count == 1 else {return nil} let abiMethod = foundMethod[method] guard let encodedData = abiMethod?.encodeParameters(parameters) else {return nil} - let transaction = EthereumTransaction(gasPrice: gasPrice, gasLimit: gasLimit, to: to, value: value, data: encodedData) + let transaction = EthereumTransaction(gasPrice: BigUInt(0), gasLimit: BigUInt(0), to: to, value: BigUInt(0), data: encodedData) return transaction } @@ -197,13 +226,17 @@ public struct ContractV2:ContractProtocol { continue } else { - let parsed = ev.decodeReturnedLogs(eventLog) + let logTopics = eventLog.topics + let logData = eventLog.data + let parsed = ev.decodeReturnedLogs(eventLogTopics: logTopics, eventLogData: logData) if parsed != nil { return (eName, parsed!) } } } else { - let parsed = ev.decodeReturnedLogs(eventLog) + let logTopics = eventLog.topics + let logData = eventLog.data + let parsed = ev.decodeReturnedLogs(eventLogTopics: logTopics, eventLogData: logData) if parsed != nil { return (eName, parsed!) } diff --git a/web3swift/Contract/Classes/EventFiltering.swift b/web3swift/Contract/Classes/EventFiltering.swift index ad20c4726..0a31f66d2 100755 --- a/web3swift/Contract/Classes/EventFiltering.swift +++ b/web3swift/Contract/Classes/EventFiltering.swift @@ -7,7 +7,8 @@ // import Foundation - +import EthereumABI +import EthereumAddress internal func filterLogs(decodedLogs: [EventParserResultProtocol], eventFilter: EventFilter) -> [EventParserResultProtocol] { let filteredLogs = decodedLogs.filter { (result) -> Bool in @@ -59,9 +60,9 @@ internal func filterLogs(decodedLogs: [EventParserResultProtocol], eventFilter: return filteredLogs } -internal func encodeTopicToGetLogs(contract: ContractV2, eventName: String?, filter: EventFilter) -> EventFilterParameters? { +internal func encodeTopicToGetLogs(contract: EthereumContract, eventName: String?, filter: EventFilter) -> EventFilterParameters? { var eventTopic: Data? = nil - var event: ABIv2.Element.Event? = nil + var event: ABI.Element.Event? = nil if eventName != nil { guard let ev = contract.events[eventName!] else {return nil} event = ev diff --git a/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift b/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift index 008c2e8bb..c8ace71a2 100755 --- a/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift +++ b/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift @@ -14,12 +14,11 @@ import EthereumAddress extension web3.BrowserFunctions { public func getAccounts() -> [String]? { - let result = self.web3.eth.getAccounts() - switch result { - case .failure(_): - return nil - case .success(let accounts): + do { + let accounts = try self.web3.eth.getAccounts() return accounts.compactMap({$0.address}) + } catch { + return [String]() } } diff --git a/web3swift/KeystoreManager/Classes/AbstractKeystore.swift b/web3swift/KeystoreManager/Classes/AbstractKeystore.swift index 9912f4f48..11a5c0bda 100755 --- a/web3swift/KeystoreManager/Classes/AbstractKeystore.swift +++ b/web3swift/KeystoreManager/Classes/AbstractKeystore.swift @@ -9,9 +9,6 @@ import Foundation import EthereumAddress -public typealias TransactionIntermediate = web3.web3contract.TransactionIntermediate - - public protocol AbstractKeystore { var addresses: [EthereumAddress]? {get} var isHDKeystore: Bool {get} diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift index b6cb71af0..c6fbf3cde 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift @@ -11,10 +11,10 @@ import PromiseKit extension web3.Eth { - func callPromise(_ transaction: EthereumTransaction, options: Web3Options, onBlock: String = "latest") -> Promise{ + func callPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?) -> Promise{ let queue = web3.requestDispatcher.queue do { - guard let request = EthereumTransaction.createRequest(method: .call, transaction: transaction, onBlock: onBlock, options: options) else { + guard let request = EthereumTransaction.createRequest(method: .call, transaction: transaction, transactionOptions: transactionOptions) else { throw Web3Error.processingError(desc: "Transaction is invalid") } let rp = web3.dispatch(request) diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift index db001f96d..92f9fe150 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift @@ -12,10 +12,10 @@ import PromiseKit extension web3.Eth { - func estimateGasPromise(_ transaction: EthereumTransaction, options: Web3Options? = nil, onBlock: String = "latest") -> Promise{ + func estimateGasPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?) -> Promise{ let queue = web3.requestDispatcher.queue do { - guard let request = EthereumTransaction.createRequest(method: .estimateGas, transaction: transaction, onBlock: onBlock, options: options) else { + guard let request = EthereumTransaction.createRequest(method: .estimateGas, transaction: transaction, transactionOptions: transactionOptions) else { throw Web3Error.processingError(desc: "Transaction is invalid") } let rp = web3.dispatch(request) diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift index 376312ca0..269e4e784 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift @@ -12,13 +12,36 @@ import PromiseKit extension web3.Eth { - func sendTransactionPromise(_ transaction: EthereumTransaction, options: Web3Options, password:String = "web3swift") -> Promise { + func sendTransactionPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?, password:String = "web3swift") -> Promise { // print(transaction) - var assembledTransaction : EthereumTransaction = transaction.mergedWithOptions(options) + var assembledTransaction : EthereumTransaction = transaction // .mergedWithOptions(transactionOptions) let queue = web3.requestDispatcher.queue do { + var mergedOptions = self.web3.transactionOptions.merge(transactionOptions) + + var forAssemblyPipeline : (EthereumTransaction, TransactionOptions) = (assembledTransaction, mergedOptions) + + for hook in self.web3.preSubmissionHooks { + let prom : Promise = Promise {seal in + hook.queue.async { + let hookResult = hook.function(forAssemblyPipeline) + if hookResult.2 { + forAssemblyPipeline = (hookResult.0, hookResult.1) + } + seal.fulfill(hookResult.2) + } + } + let shouldContinue = try prom.wait() + if shouldContinue { + throw Web3Error.processingError(desc: "Transaction is canceled by middleware") + } + } + + assembledTransaction = forAssemblyPipeline.0 + mergedOptions = forAssemblyPipeline.1 + if self.web3.provider.attachedKeystoreManager == nil { - guard let request = EthereumTransaction.createRequest(method: JSONRPCmethod.sendTransaction, transaction: assembledTransaction, onBlock: nil, options: options) else + guard let request = EthereumTransaction.createRequest(method: .sendTransaction, transaction: assembledTransaction, transactionOptions: mergedOptions) else { throw Web3Error.processingError(desc: "Failed to create a request to send transaction") } @@ -33,7 +56,7 @@ extension web3.Eth { return result } } - guard let from = options.from else { + guard let from = mergedOptions.from else { throw Web3Error.inputError(desc: "No 'from' field provided") } do { diff --git a/web3swift/Promises/Classes/Promise+Web3+TxPool.swift b/web3swift/Promises/Classes/Promise+Web3+TxPool.swift index 79bd30de5..a183a8701 100644 --- a/web3swift/Promises/Classes/Promise+Web3+TxPool.swift +++ b/web3swift/Promises/Classes/Promise+Web3+TxPool.swift @@ -10,7 +10,6 @@ import Foundation import BigInt import PromiseKit - extension web3.TxPool { public func getInspectPromise() -> Promise<[String:[String:[String:String]]]> { let request = JSONRPCRequestFabric.prepareRequest(.getTxPoolInspect, parameters: []) diff --git a/web3swift/Transaction/Classes/EthereumTransaction.swift b/web3swift/Transaction/Classes/EthereumTransaction.swift index 5d55d99e2..bace4fa47 100755 --- a/web3swift/Transaction/Classes/EthereumTransaction.swift +++ b/web3swift/Transaction/Classes/EthereumTransaction.swift @@ -321,12 +321,14 @@ public struct EthereumTransaction: CustomStringConvertible { } } - static func createRequest(method: JSONRPCmethod, transaction: EthereumTransaction, onBlock: String? = nil, options: Web3Options?) -> JSONRPCrequest? { + static func createRequest(method: JSONRPCmethod, transaction: EthereumTransaction, transactionOptions: TransactionOptions?) -> JSONRPCrequest? { + let onBlock = transactionOptions?.callOnBlock?.stringValue var request = JSONRPCrequest() request.method = method + let from = transactionOptions?.from // guard let from = options?.from else {return nil} - guard var txParams = transaction.encodeAsDictionary(from: options?.from) else {return nil} - if method == .estimateGas || options?.gasLimit == nil { + guard var txParams = transaction.encodeAsDictionary(from: from) else {return nil} + if method == .estimateGas || transactionOptions?.gasLimit == nil { txParams.gas = nil } var params = [txParams] as Array diff --git a/web3swift/Transaction/Classes/TransactionSigner.swift b/web3swift/Transaction/Classes/TransactionSigner.swift index 8a4878ce4..7cfa8e749 100755 --- a/web3swift/Transaction/Classes/TransactionSigner.swift +++ b/web3swift/Transaction/Classes/TransactionSigner.swift @@ -26,11 +26,11 @@ public struct Web3Signer { try FallbackSigner.sign(transaction: &transaction, privateKey: privateKey, useExtraEntropy: useExtraEntropy) } } - public static func signIntermediate(intermediate:inout TransactionIntermediate, keystore: AbstractKeystore, account: EthereumAddress, password: String, useExtraEntropy: Bool = false) throws { - var tx = intermediate.transaction - try Web3Signer.signTX(transaction: &tx, keystore: keystore, account: account, password: password, useExtraEntropy: useExtraEntropy) - intermediate.transaction = tx - } +// public static func signIntermediate(intermediate:inout TransactionIntermediate, keystore: AbstractKeystore, account: EthereumAddress, password: String, useExtraEntropy: Bool = false) throws { +// var tx = intermediate.transaction +// try Web3Signer.signTX(transaction: &tx, keystore: keystore, account: account, password: password, useExtraEntropy: useExtraEntropy) +// intermediate.transaction = tx +// } public static func signPersonalMessage(_ personalMessage: Data, keystore: AbstractKeystore, account: EthereumAddress, password: String, useExtraEntropy: Bool = false) throws -> Data? { var privateKey = try keystore.UNSAFE_getPrivateKeyData(password: password, account: account) defer {Data.zero(&privateKey)} diff --git a/web3swift/Utils/Classes/EIP67Code.swift b/web3swift/Utils/Classes/EIP67Code.swift index 63320ad91..702f646a0 100755 --- a/web3swift/Utils/Classes/EIP67Code.swift +++ b/web3swift/Utils/Classes/EIP67Code.swift @@ -10,6 +10,7 @@ import Foundation import CoreImage import BigInt import EthereumAddress +import EthereumABI extension Web3 { @@ -25,7 +26,7 @@ extension Web3 { } public struct Function { public var method: String - public var parameters: [(ABIv2.Element.ParameterType, AnyObject)] + public var parameters: [(ABI.Element.ParameterType, AnyObject)] public func toString() -> String? { let encoding = method + "(" + parameters.map({ (el) -> String in diff --git a/web3swift/Utils/Classes/EIP681.swift b/web3swift/Utils/Classes/EIP681.swift index e60ce5055..c955f521a 100644 --- a/web3swift/Utils/Classes/EIP681.swift +++ b/web3swift/Utils/Classes/EIP681.swift @@ -9,6 +9,7 @@ import Foundation import BigInt import EthereumAddress +import EthereumABI extension Web3 { @@ -25,7 +26,7 @@ extension Web3 { public struct EIP681Code { public struct EIP681Parameter { - public var type: ABIv2.Element.ParameterType + public var type: ABI.Element.ParameterType public var value: AnyObject } public var isPayRequest: Bool @@ -36,7 +37,7 @@ extension Web3 { public var gasLimit: BigUInt? public var gasPrice: BigUInt? public var amount: BigUInt? - public var function: ABIv2.Element.Function? + public var function: ABI.Element.Function? public enum TargetAddress { case ethereumAddress(EthereumAddress) @@ -54,27 +55,6 @@ extension Web3 { self.isPayRequest = isPayRequest self.targetAddress = targetAddress } - -// public struct Function { -// public var method: String -// public var parameters: [(ABIv2.Element.ParameterType, AnyObject)] -// -// public func toString() -> String? { -// let encoding = method + "(" + parameters.map({ (el) -> String in -// if let string = el.1 as? String { -// return el.0.abiRepresentation + " " + string -// } else if let number = el.1 as? BigUInt { -// return el.0.abiRepresentation + " " + String(number, radix: 10) -// } else if let number = el.1 as? BigInt { -// return el.0.abiRepresentation + " " + String(number, radix: 10) -// } else if let data = el.1 as? Data { -// return el.0.abiRepresentation + " " + data.toHexString().addHexPrefix() -// } -// return "" -// }).joined(separator: ", ") + ")" -// return encoding -// } -// } } public struct EIP681CodeParser { @@ -131,9 +111,9 @@ extension Web3 { } guard let queryItems = components.queryItems else {return code} var inputNumber: Int = 0 - var inputs = [ABIv2.Element.InOut]() + var inputs = [ABI.Element.InOut]() for comp in queryItems { - if let inputType = try? ABIv2TypeParser.parseTypeString(comp.name) { + if let inputType = try? ABITypeParser.parseTypeString(comp.name) { guard let value = comp.value else {continue} var nativeValue: AnyObject? = nil switch inputType { @@ -144,7 +124,7 @@ extension Web3 { nativeValue = ethereumAddress as AnyObject case .ensAddress(let ens): let web = web3(provider: InfuraProvider(Networks.fromInt(Int(code.chainID ?? 1)) ?? Networks.Mainnet)!) - var ensModel = ENS(web3: web) + let ensModel = ENS(web3: web) let resolver = ensModel.resolver(forDomain: ens) switch resolver { case .failure(_): @@ -199,7 +179,7 @@ extension Web3 { continue } if nativeValue != nil { - inputs.append(ABIv2.Element.InOut(name: String(inputNumber), type: inputType)) + inputs.append(ABI.Element.InOut(name: String(inputNumber), type: inputType)) code.parameters.append(EIP681Code.EIP681Parameter(type: inputType, value: nativeValue!)) inputNumber = inputNumber + 1 } else { @@ -248,7 +228,7 @@ extension Web3 { } if code.functionName != nil { - let functionEncoding = ABIv2.Element.Function(name: code.functionName!, inputs: inputs, outputs: [ABIv2.Element.InOut](), constant: false, payable: code.amount != nil) + let functionEncoding = ABI.Element.Function(name: code.functionName!, inputs: inputs, outputs: [ABI.Element.InOut](), constant: false, payable: code.amount != nil) code.function = functionEncoding } diff --git a/web3swift/Web3/Classes/Web3+Contract.swift b/web3swift/Web3/Classes/Web3+Contract.swift index aefe0d6cd..1dcf3fc73 100755 --- a/web3swift/Web3/Classes/Web3+Contract.swift +++ b/web3swift/Web3/Classes/Web3+Contract.swift @@ -1,9 +1,7 @@ - -// Web3+Contract.swift // web3swift // -// Created by Alexander Vlasov on 19.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -14,53 +12,47 @@ extension web3 { /// The contract instance. Initialized in runtime from ABI string (that is a JSON array). In addition an existing contract address can be supplied to provide the default "to" address in all the following requests. ABI version is 2 by default and should not be changed. public func contract(_ abiString: String, at: EthereumAddress? = nil, abiVersion: Int = 2) -> web3contract? { - return web3contract(web3: self, abiString: abiString, at: at, options: self.options, abiVersion: abiVersion) + return web3contract(web3: self, abiString: abiString, at: at, transactionOptions: self.transactionOptions, abiVersion: abiVersion) } /// Web3 instance bound contract instance. public class web3contract { - var contract: ContractProtocol + var contract: EthereumContract var web3 : web3 - public var options: Web3Options? = nil + public var transactionOptions: TransactionOptions? = nil /// Initialize the bound contract instance by supplying the Web3 provider bound object, ABI, Ethereum address and some default /// options for further function calls. By default the contract inherits options from the web3 object. Additionally supplied "options" /// do override inherited ones. - public init?(web3 web3Instance:web3, abiString: String, at: EthereumAddress? = nil, options: Web3Options? = nil, abiVersion: Int = 2) { + public init?(web3 web3Instance:web3, abiString: String, at: EthereumAddress? = nil, transactionOptions: TransactionOptions? = nil, abiVersion: Int = 2) { self.web3 = web3Instance - self.options = web3.options + self.transactionOptions = web3.transactionOptions switch abiVersion { - case 1: - print("ABIv1 bound contract is now deprecated") - return nil - case 2: - guard let c = ContractV2(abiString, at: at) else {return nil} - contract = c default: - return nil + guard let c = EthereumContract(abiString, at: at) else {return nil} + contract = c } - var mergedOptions = Web3Options.merge(self.options, with: options) + var mergedOptions = self.transactionOptions?.merge(transactionOptions) if at != nil { contract.address = at mergedOptions?.to = at } else if let addr = mergedOptions?.to { contract.address = addr } - self.options = mergedOptions + self.transactionOptions = mergedOptions } /// Deploys a constact instance using the previously provided (at initialization) ABI, some bytecode, constructor parameters and options. /// If extraData is supplied it is appended to encoded bytecode and constructor parameters. /// /// Returns a "Transaction intermediate" object. - public func deploy(bytecode: Data, parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), options: Web3Options?) -> TransactionIntermediate? { - - let mergedOptions = Web3Options.merge(self.options, with: options) - guard var tx = self.contract.deploy(bytecode: bytecode, parameters: parameters, extraData: extraData, options: mergedOptions) else {return nil} + public func deploy(bytecode: Data, parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { + let mergedOptions = self.transactionOptions?.merge(transactionOptions) + guard var tx = self.contract.deploy(bytecode: bytecode, parameters: parameters, extraData: extraData) else {return nil} tx.chainID = self.web3.provider.network?.chainID - let intermediate = TransactionIntermediate(transaction: tx, web3: self.web3, contract: self.contract, method: "fallback", options: mergedOptions) - return intermediate + let writeTX = WriteTransaction.init(transaction: tx, web3: self.web3, contract: self.contract, method: "fallback", transactionOptions: mergedOptions) + return writeTX } /// Creates and object responsible for calling a particular function of the contract. If method name is not found in ABI - returns nil. @@ -69,12 +61,12 @@ extension web3 { /// Elements of "parameters" can be other arrays or instances of String, Data, BigInt, BigUInt, Int or EthereumAddress. /// /// Returns a "Transaction intermediate" object. - public func method(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), options: Web3Options?) -> TransactionIntermediate? { - let mergedOptions = Web3Options.merge(self.options, with: options) - guard var tx = self.contract.method(method, parameters: parameters, extraData: extraData, options: mergedOptions) else {return nil} + public func method(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), transactionOptions: TransactionOptions?) -> WriteTransaction? { + let mergedOptions = self.transactionOptions?.merge(transactionOptions) + guard var tx = self.contract.method(method, parameters: parameters, extraData: extraData) else {return nil} tx.chainID = self.web3.provider.network?.chainID - let intermediate = TransactionIntermediate(transaction: tx, web3: self.web3, contract: self.contract, method: method, options: mergedOptions) - return intermediate + let writeTX = WriteTransaction.init(transaction: tx, web3: self.web3, contract: self.contract, method: method, transactionOptions: mergedOptions) + return writeTX } /// Parses an EventLog object by using a description from the contract's ABI. diff --git a/web3swift/Web3/Classes/Web3+Eth.swift b/web3swift/Web3/Classes/Web3+Eth.swift index 8e6e85f5d..68e240293 100755 --- a/web3swift/Web3/Classes/Web3+Eth.swift +++ b/web3swift/Web3/Classes/Web3+Eth.swift @@ -1,14 +1,11 @@ -// -// Web3+Eth.swift // web3swift // -// Created by Alexander Vlasov on 22.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt -import Result import EthereumAddress extension web3.Eth { @@ -22,16 +19,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func sendTransaction(_ transaction: EthereumTransaction, options: Web3Options, password:String = "web3swift") -> Result { - do { - let result = try self.sendTransactionPromise(transaction, options: options, password: password).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func sendTransaction(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions, password:String = "web3swift") throws -> TransactionSendingResult { + let result = try self.sendTransactionPromise(transaction, transactionOptions: transactionOptions, password: password).wait() + return result } /// Performs a non-mutating "call" to some smart-contract. EthereumTransaction bears all function parameters required for the call. @@ -45,16 +35,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - func call(_ transaction: EthereumTransaction, options: Web3Options, onBlock:String = "latest") -> Result { - do { - let result = try self.callPromise(transaction, options: options, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + func call(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions) throws -> Data { + let result = try self.callPromise(transaction, transactionOptions: transactionOptions).wait() + return result } /// Send raw Ethereum transaction data to the network. @@ -62,16 +45,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func sendRawTransaction(_ transaction: Data) -> Result { - do { - let result = try self.sendRawTransactionPromise(transaction).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func sendRawTransaction(_ transaction: Data) throws -> TransactionSendingResult { + let result = try self.sendRawTransactionPromise(transaction).wait() + return result } /// Send raw Ethereum transaction data to the network by first serializing the EthereumTransaction object. @@ -79,16 +55,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func sendRawTransaction(_ transaction: EthereumTransaction) -> Result { - do { - let result = try self.sendRawTransactionPromise(transaction).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func sendRawTransaction(_ transaction: EthereumTransaction) throws -> TransactionSendingResult { + let result = try self.sendRawTransactionPromise(transaction).wait() + return result } /// Returns a total number of transactions sent by the particular Ethereum address. @@ -99,16 +68,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getTransactionCount(address: EthereumAddress, onBlock: String = "latest") -> Result { - do { - let result = try self.getTransactionCountPromise(address: address, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getTransactionCount(address: EthereumAddress, onBlock: String = "latest") throws -> BigUInt { + let result = try self.getTransactionCountPromise(address: address, onBlock: onBlock).wait() + return result } /// Returns a balance of particular Ethereum address in Wei units (1 ETH = 10^18 Wei). @@ -119,16 +81,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getBalance(address: EthereumAddress, onBlock: String = "latest") -> Result { - do { - let result = try self.getBalancePromise(address: address, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBalance(address: EthereumAddress, onBlock: String = "latest") throws -> BigUInt { + let result = try self.getBalancePromise(address: address, onBlock: onBlock).wait() + return result } /// Returns a block number of the last mined block that Ethereum node knows about. @@ -136,16 +91,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getBlockNumber() -> Result { - do { - let result = try self.getBlockNumberPromise().wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBlockNumber() throws -> BigUInt { + let result = try self.getBlockNumberPromise().wait() + return result } /// Returns a current gas price in the units of Wei. The node has internal algorithms for averaging over the last few blocks. @@ -153,16 +101,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getGasPrice() -> Result { - do { - let result = try self.getGasPricePromise().wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getGasPrice() throws -> BigUInt { + let result = try self.getGasPricePromise().wait() + return result } /// Returns transaction details for particular transaction hash. Details indicate position of the transaction in a particular block, @@ -171,16 +112,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getTransactionDetails(_ txhash: Data) -> Result { - do { - let result = try self.getTransactionDetailsPromise(txhash).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getTransactionDetails(_ txhash: Data) throws -> TransactionDetails { + let result = try self.getTransactionDetailsPromise(txhash).wait() + return result } /// Returns transaction details for particular transaction hash. Details indicate position of the transaction in a particular block, @@ -189,16 +123,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getTransactionDetails(_ txhash: String) -> Result { - do { - let result = try self.getTransactionDetailsPromise(txhash).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getTransactionDetails(_ txhash: String) throws -> TransactionDetails { + let result = try self.getTransactionDetailsPromise(txhash).wait() + return result } /// Returns transaction receipt for particular transaction hash. Receipt indicate what has happened when the transaction @@ -207,16 +134,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getTransactionReceipt(_ txhash: Data) -> Result { - do { - let result = try self.getTransactionReceiptPromise(txhash).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getTransactionReceipt(_ txhash: Data) throws -> TransactionReceipt { + let result = try self.getTransactionReceiptPromise(txhash).wait() + return result } /// Returns transaction receipt for particular transaction hash. Receipt indicate what has happened when the transaction @@ -225,16 +145,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getTransactionReceipt(_ txhash: String) -> Result { - do { - let result = try self.getTransactionReceiptPromise(txhash).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getTransactionReceipt(_ txhash: String) throws -> TransactionReceipt { + let result = try self.getTransactionReceiptPromise(txhash).wait() + return result } /// Estimates a minimal amount of gas required to run a transaction. To do it the Ethereum node tries to run it and counts @@ -249,16 +162,9 @@ extension web3.Eth { /// Returns the Result object that indicates either success of failure. /// Error can also indicate that transaction is invalid in the current state, so formally it's gas limit is infinite. /// An example of such transaction can be sending an amount of ETH that is larger than the current account balance. - public func estimateGas(_ transaction: EthereumTransaction, options: Web3Options?, onBlock: String = "latest") -> Result { - do { - let result = try self.estimateGasPromise(transaction, options: options, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func estimateGas(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?) throws -> BigUInt { + let result = try self.estimateGasPromise(transaction, transactionOptions: transactionOptions).wait() + return result } /// Get a list of Ethereum accounts that a node knows about. @@ -267,16 +173,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getAccounts() -> Result<[EthereumAddress],Web3Error> { - do { - let result = try self.getAccountsPromise().wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getAccounts() throws -> [EthereumAddress] { + let result = try self.getAccountsPromise().wait() + return result } @@ -287,16 +186,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getBlockByHash(_ hash: String, fullTransactions: Bool = false) -> Result { - do { - let result = try self.getBlockByHashPromise(hash, fullTransactions: fullTransactions).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBlockByHash(_ hash: String, fullTransactions: Bool = false) throws -> Block { + let result = try self.getBlockByHashPromise(hash, fullTransactions: fullTransactions).wait() + return result } /// Get information about the particular block in Ethereum network. If "fullTransactions" parameter is set to "true" @@ -306,16 +198,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getBlockByHash(_ hash: Data, fullTransactions: Bool = false) -> Result { - do { - let result = try self.getBlockByHashPromise(hash, fullTransactions: fullTransactions).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBlockByHash(_ hash: Data, fullTransactions: Bool = false) throws -> Block { + let result = try self.getBlockByHashPromise(hash, fullTransactions: fullTransactions).wait() + return result } /// Get information about the particular block in Ethereum network. If "fullTransactions" parameter is set to "true" @@ -325,16 +210,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getBlockByNumber(_ number: UInt64, fullTransactions: Bool = false) -> Result { - do { - let result = try self.getBlockByNumberPromise(number, fullTransactions: fullTransactions).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBlockByNumber(_ number: UInt64, fullTransactions: Bool = false) throws -> Block { + let result = try self.getBlockByNumberPromise(number, fullTransactions: fullTransactions).wait() + return result } /// Get information about the particular block in Ethereum network. If "fullTransactions" parameter is set to "true" @@ -344,16 +222,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getBlockByNumber(_ number: BigUInt, fullTransactions: Bool = false) -> Result { - do { - let result = try self.getBlockByNumberPromise(number, fullTransactions: fullTransactions).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBlockByNumber(_ number: BigUInt, fullTransactions: Bool = false) throws -> Block { + let result = try self.getBlockByNumberPromise(number, fullTransactions: fullTransactions).wait() + return result } /// Get information about the particular block in Ethereum network. If "fullTransactions" parameter is set to "true" @@ -363,139 +234,126 @@ extension web3.Eth { /// This function is synchronous! /// /// - public func getBlockByNumber(_ block:String, fullTransactions: Bool = false) -> Result { - do { - let result = try self.getBlockByNumberPromise(block, fullTransactions: fullTransactions).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } - } - - - /** - Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data. - - Parameters: - - to: EthereumAddress to send funds to - - amount: BigUInt indicating the amount in wei - - extraData: Additional data to attach to the transaction - - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead - - - returns: - - TransactionIntermediate object - - */ - public func sendETH(to: EthereumAddress, amount: BigUInt, extraData: Data = Data(), options: Web3Options? = nil) -> TransactionIntermediate? { - let contract = self.web3.contract(Web3.Utils.coldWalletABI, at: to, abiVersion: 2) - guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} - mergedOptions.value = amount - let intermediate = contract?.method("fallback", extraData: extraData, options: mergedOptions) - return intermediate - } - - /** - *Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data.* - - - parameters: - - to: EthereumAddress to send funds to - - amount: String in "units" demonimation. It can contain either "," or "." decimal separator. - - units: Ethereum units indicating the denomination of amout about - - extraData: Additional data to attach to the transaction - - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead - - - returns: - - TransactionIntermediate object - - * String "1.01" and units: .eth will result in sending 1.01 ETH to another address* - */ - public func sendETH(to: EthereumAddress, amount: String, units: Web3.Utils.Units = .eth, extraData: Data = Data(), options: Web3Options? = nil) -> TransactionIntermediate? { - guard let value = Web3.Utils.parseToBigUInt(amount, units: .eth) else {return nil} - return sendETH(to: to, amount: value, extraData: extraData, options: options) - } - - /** - *Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data.* - - - parameters: - - from: EthereumAddress to send funds from - - to: EthereumAddress to send funds to - - amount: String in "units" demonimation. It can contain either "," or "." decimal separator. - - units: Ethereum units indicating the denomination of amout about - - extraData: Additional data to attach to the transaction - - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. - - - returns: - - TransactionIntermediate object - - * String "1.01" and units: .eth will result in sending 1.01 ETH to another address* - */ - public func sendETH(from: EthereumAddress, to: EthereumAddress, amount: String, units: Web3.Utils.Units = .eth, extraData: Data = Data(), options: Web3Options? = nil) -> TransactionIntermediate? { - guard let value = Web3.Utils.parseToBigUInt(amount, units: .eth) else {return nil} - guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} - mergedOptions.from = from - return sendETH(to: to, amount: value, extraData: extraData, options: mergedOptions) - } - - /** - *Convenience wrapper to send ERC20 tokens to another address. Internally it creates a virtual contract and encodes all the options and data. Assumes that the sender knows the decimal units of the underlying token.* - - - parameters: - - tokenAddress: EthereumAddress of the token contract - - from: EthereumAddress to send tokens from - - to: EthereumAddress to send tokens to - - amount: BigUInt indicating the number of tokens in the the smallest indivisible units (mind that sender knows the number of decimals) - - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. - - - returns: - - TransactionIntermediate object - - */ - public func sendERC20tokensWithKnownDecimals(tokenAddress: EthereumAddress, from: EthereumAddress, to: EthereumAddress, amount: BigUInt, options: Web3Options? = nil) -> TransactionIntermediate? { - let contract = self.web3.contract(Web3.Utils.erc20ABI, at: tokenAddress, abiVersion: 2) - guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} - mergedOptions.from = from - guard let intermediate = contract?.method("transfer", parameters: [to, amount] as [AnyObject], options: mergedOptions) else {return nil} - return intermediate + public func getBlockByNumber(_ block:String, fullTransactions: Bool = false) throws -> Block { + let result = try self.getBlockByNumberPromise(block, fullTransactions: fullTransactions).wait() + return result } - /** - *Convenience wrapper to send ERC20 tokens to another address. Internally it creates a virtual contract and encodes all the options and data. Pulls the number of decimals of the token under the hood.* - - - parameters: - - tokenAddress: EthereumAddress of the token contract - - from: EthereumAddress to send tokens from - - to: EthereumAddress to send tokens to - - amount: String in "natura" demonimation. It can contain either "," or "." decimal separator. - - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. - - - returns: - - TransactionIntermediate object - - - important: This call is synchronous - - * If the amount is "1.01" and token has 9 decimals it will result in sending 1010000000 of the smallest invidisible token units.* - */ - public func sendERC20tokensWithNaturalUnits(tokenAddress: EthereumAddress, from: EthereumAddress, to: EthereumAddress, amount: String, options: Web3Options? = nil) -> TransactionIntermediate? { - let contract = self.web3.contract(Web3.Utils.erc20ABI, at: tokenAddress, abiVersion: 2) - guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} - mergedOptions.from = from - guard let intermediate = contract?.method("decimals", options: mergedOptions) else {return nil} - let callResult = intermediate.call(options: mergedOptions, onBlock: "latest") - var decimals = BigUInt(0) - switch callResult { - case .success(let response): - guard let dec = response["0"], let decTyped = dec as? BigUInt else {return nil} - decimals = decTyped - break - case .failure(_): - break - } - let intDecimals = Int(decimals) - guard let value = Web3.Utils.parseToBigUInt(amount, decimals: intDecimals) else {return nil} - return sendERC20tokensWithKnownDecimals(tokenAddress: tokenAddress, from: from, to: to, amount: value, options: options) - } +// /** +// Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data. +// - Parameters: +// - to: EthereumAddress to send funds to +// - amount: BigUInt indicating the amount in wei +// - extraData: Additional data to attach to the transaction +// - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead +// +// - returns: +// - TransactionIntermediate object +// +// */ +// public func sendETH(to: EthereumAddress, amount: BigUInt, extraData: Data = Data(), options: Web3Options? = nil) -> TransactionIntermediate? { +// let contract = self.web3.contract(Web3.Utils.coldWalletABI, at: to, abiVersion: 2) +// guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} +// mergedOptions.value = amount +// let intermediate = contract?.method("fallback", extraData: extraData, options: mergedOptions) +// return intermediate +// } +// +// /** +// *Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data.* +// +// - parameters: +// - to: EthereumAddress to send funds to +// - amount: String in "units" demonimation. It can contain either "," or "." decimal separator. +// - units: Ethereum units indicating the denomination of amout about +// - extraData: Additional data to attach to the transaction +// - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead +// +// - returns: +// - TransactionIntermediate object +// +// * String "1.01" and units: .eth will result in sending 1.01 ETH to another address* +// */ +// public func sendETH(to: EthereumAddress, amount: String, units: Web3.Utils.Units = .eth, extraData: Data = Data(), options: Web3Options? = nil) -> TransactionIntermediate? { +// guard let value = Web3.Utils.parseToBigUInt(amount, units: .eth) else {return nil} +// return sendETH(to: to, amount: value, extraData: extraData, options: options) +// } +// +// /** +// *Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data.* +// +// - parameters: +// - from: EthereumAddress to send funds from +// - to: EthereumAddress to send funds to +// - amount: String in "units" demonimation. It can contain either "," or "." decimal separator. +// - units: Ethereum units indicating the denomination of amout about +// - extraData: Additional data to attach to the transaction +// - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. +// +// - returns: +// - TransactionIntermediate object +// +// * String "1.01" and units: .eth will result in sending 1.01 ETH to another address* +// */ +// public func sendETH(from: EthereumAddress, to: EthereumAddress, amount: String, units: Web3.Utils.Units = .eth, extraData: Data = Data(), options: Web3Options? = nil) -> TransactionIntermediate? { +// guard let value = Web3.Utils.parseToBigUInt(amount, units: .eth) else {return nil} +// guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} +// mergedOptions.from = from +// return sendETH(to: to, amount: value, extraData: extraData, options: mergedOptions) +// } +// +// /** +// *Convenience wrapper to send ERC20 tokens to another address. Internally it creates a virtual contract and encodes all the options and data. Assumes that the sender knows the decimal units of the underlying token.* +// +// - parameters: +// - tokenAddress: EthereumAddress of the token contract +// - from: EthereumAddress to send tokens from +// - to: EthereumAddress to send tokens to +// - amount: BigUInt indicating the number of tokens in the the smallest indivisible units (mind that sender knows the number of decimals) +// - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. +// +// - returns: +// - TransactionIntermediate object +// +// */ +// public func sendERC20tokensWithKnownDecimals(tokenAddress: EthereumAddress, from: EthereumAddress, to: EthereumAddress, amount: BigUInt, options: Web3Options? = nil) -> TransactionIntermediate? { +// let contract = self.web3.contract(Web3.Utils.erc20ABI, at: tokenAddress, abiVersion: 2) +// guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} +// mergedOptions.from = from +// guard let intermediate = contract?.method("transfer", parameters: [to, amount] as [AnyObject], options: mergedOptions) else {return nil} +// return intermediate +// } +// +// /** +// *Convenience wrapper to send ERC20 tokens to another address. Internally it creates a virtual contract and encodes all the options and data. Pulls the number of decimals of the token under the hood.* +// +// - parameters: +// - tokenAddress: EthereumAddress of the token contract +// - from: EthereumAddress to send tokens from +// - to: EthereumAddress to send tokens to +// - amount: String in "natura" demonimation. It can contain either "," or "." decimal separator. +// - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. +// +// - returns: +// - TransactionIntermediate object +// +// - important: This call is synchronous +// +// * If the amount is "1.01" and token has 9 decimals it will result in sending 1010000000 of the smallest invidisible token units.* +// */ +// public func sendERC20tokensWithNaturalUnits(tokenAddress: EthereumAddress, from: EthereumAddress, to: EthereumAddress, amount: String, options: Web3Options? = nil) throws -> TransactionIntermediate? { +// let contract = self.web3.contract(Web3.Utils.erc20ABI, at: tokenAddress, abiVersion: 2) +// guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} +// mergedOptions.from = from +// guard let intermediate = contract?.method("decimals", options: mergedOptions) else {return nil} +// let response = try intermediate.call(options: mergedOptions, onBlock: "latest") +// var decimals = BigUInt(0) +// guard let dec = response["0"], let decTyped = dec as? BigUInt else {return nil} +// decimals = decTyped +// let intDecimals = Int(decimals) +// guard let value = Web3.Utils.parseToBigUInt(amount, decimals: intDecimals) else {return nil} +// return sendERC20tokensWithKnownDecimals(tokenAddress: tokenAddress, from: from, to: to, amount: value, options: options) +// } +// } diff --git a/web3swift/Web3/Classes/Web3+EventParser.swift b/web3swift/Web3/Classes/Web3+EventParser.swift index 08b5fe827..4bf2bc5e6 100755 --- a/web3swift/Web3/Classes/Web3+EventParser.swift +++ b/web3swift/Web3/Classes/Web3+EventParser.swift @@ -1,9 +1,7 @@ +// web3swift // -// Web3+TransactionIntermediate.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 26.02.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -278,18 +276,17 @@ extension web3.web3contract { public func getIndexedEventsPromise(eventName: String?, filter: EventFilter, joinWithReceipts: Bool = false) -> Promise<[EventParserResultProtocol]> { let queue = self.web3.requestDispatcher.queue do { - guard let rawContract = self.contract as? ContractV2 else { + guard let rawContract = self.contract as? EthereumContract else { throw Web3Error.nodeError(desc: "ABIv1 is not supported for this method") } guard let preEncoding = encodeTopicToGetLogs(contract: rawContract, eventName: eventName, filter: filter) else { throw Web3Error.processingError(desc: "Failed to encode topic for request") } - // var event: ABIv2.Element.Event? = nil + if eventName != nil { guard let _ = rawContract.events[eventName!] else { throw Web3Error.processingError(desc: "No such event in a contract") } - // event = ev } let request = JSONRPCRequestFabric.prepareRequest(.getLogs, parameters: [preEncoding]) let fetchLogsPromise = self.web3.dispatch(request).map(on: queue) {response throws -> [EventParserResult] in diff --git a/web3swift/Web3/Classes/Web3+Eventloop.swift b/web3swift/Web3/Classes/Web3+Eventloop.swift new file mode 100644 index 000000000..c909fadc6 --- /dev/null +++ b/web3swift/Web3/Classes/Web3+Eventloop.swift @@ -0,0 +1,11 @@ +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation + +extension web3.Eventloop { + +} diff --git a/web3swift/Web3/Classes/Web3+HttpProvider.swift b/web3swift/Web3/Classes/Web3+HttpProvider.swift index e32abcfb9..683f7d36e 100755 --- a/web3swift/Web3/Classes/Web3+HttpProvider.swift +++ b/web3swift/Web3/Classes/Web3+HttpProvider.swift @@ -1,9 +1,7 @@ -// -// Web3+Provider.swift // web3swift // -// Created by Alexander Vlasov on 19.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Web3/Classes/Web3+Infura.swift b/web3swift/Web3/Classes/Web3+Infura.swift index e6a92b049..57b325b85 100755 --- a/web3swift/Web3/Classes/Web3+Infura.swift +++ b/web3swift/Web3/Classes/Web3+Infura.swift @@ -1,9 +1,7 @@ -// -// Web3+Provider.swift // web3swift // -// Created by Alexander Vlasov on 19.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Web3/Classes/Web3+Instance.swift b/web3swift/Web3/Classes/Web3+Instance.swift index 89eb1d661..42033f400 100755 --- a/web3swift/Web3/Classes/Web3+Instance.swift +++ b/web3swift/Web3/Classes/Web3+Instance.swift @@ -1,9 +1,7 @@ -// -// Web3+Instance.swift // web3swift // -// Created by Alexander Vlasov on 19.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -14,6 +12,7 @@ import PromiseKit public class web3: Web3OptionsInheritable { public var provider : Web3Provider public var options : Web3Options = Web3Options.defaultOptions() + public var transactionOptions: TransactionOptions = TransactionOptions.defaultOptions public var defaultBlock = "latest" public var requestDispatcher: JSONRPCrequestDispatcher @@ -155,21 +154,30 @@ public class web3: Web3OptionsInheritable { } } - var erc721Instance: web3.ERC721? + var eventLoopInstance: web3.Eventloop? /// Public web3.browserFunctions.* namespace. - public var erc721: web3.ERC721 { - if (self.erc721Instance != nil) { - return self.erc721Instance! + public var eventLoop: web3.Eventloop { + if (self.eventLoopInstance != nil) { + return self.eventLoopInstance! } - self.erc721Instance = web3.ERC721(provider : self.provider, web3: self) - return self.erc721Instance! + self.eventLoopInstance = web3.Eventloop(provider : self.provider, web3: self) + return self.eventLoopInstance! } - public class ERC721: Web3OptionsInheritable { + public class Eventloop: Web3OptionsInheritable { + public typealias FunctionCall = (web3) -> Result + + public struct MonitoredProperty { + public var name: String + public var calledFunction: FunctionCall + } + var provider:Web3Provider // weak var web3: web3? var web3: web3 + var timer: Promise? + var monitoredProperties: [AnyObject] = [AnyObject]() public var options: Web3Options { return self.web3.options } @@ -178,4 +186,25 @@ public class web3: Web3OptionsInheritable { web3 = web3instance } } + + public typealias AssemblyHookFunction = ((EthereumTransaction, EthereumContract, TransactionOptions)) -> (EthereumTransaction, EthereumContract, TransactionOptions, Bool) + + public typealias SubmissionHookFunction = ((EthereumTransaction, TransactionOptions)) -> (EthereumTransaction, TransactionOptions, Bool) + + public struct AssemblyHook { + public var queue: DispatchQueue + public var function: AssemblyHookFunction + } + + public struct SubmissionHook { + public var queue: DispatchQueue + public var function: SubmissionHookFunction + } + + public var preAssemblyHooks: [AssemblyHook] = [AssemblyHook]() + public var postAssemblyHooks: [AssemblyHook] = [AssemblyHook]() + + public var preSubmissionHooks: [SubmissionHook] = [SubmissionHook]() +// public var postSubmissionHooks: [SubmissionHook] = [SubmissionHook]() + } diff --git a/web3swift/Web3/Classes/Web3+JSONRPC.swift b/web3swift/Web3/Classes/Web3+JSONRPC.swift index 7af3121be..37d6d9a86 100755 --- a/web3swift/Web3/Classes/Web3+JSONRPC.swift +++ b/web3swift/Web3/Classes/Web3+JSONRPC.swift @@ -1,9 +1,7 @@ -// -// Web3+JSONRPC.swift // web3swift // -// Created by Alexander Vlasov on 21.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Web3/Classes/Web3+Methods.swift b/web3swift/Web3/Classes/Web3+Methods.swift index d1fbfd9da..7a1b3018e 100755 --- a/web3swift/Web3/Classes/Web3+Methods.swift +++ b/web3swift/Web3/Classes/Web3+Methods.swift @@ -1,9 +1,7 @@ -// -// Web3+Methods.swift // web3swift // -// Created by Alexander Vlasov on 21.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Web3/Classes/Web3+MutatingTransaction.swift b/web3swift/Web3/Classes/Web3+MutatingTransaction.swift new file mode 100644 index 000000000..1943d6072 --- /dev/null +++ b/web3swift/Web3/Classes/Web3+MutatingTransaction.swift @@ -0,0 +1,142 @@ +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt +import PromiseKit +fileprivate typealias PromiseResult = PromiseKit.Result +import EthereumAddress + +public class WriteTransaction: ReadTransaction { + + public func assemblePromise(transactionOptions: TransactionOptions?) -> Promise { + var assembledTransaction : EthereumTransaction = self.transaction + let queue = self.web3.requestDispatcher.queue + let returnPromise = Promise { seal in + var mergedOptions = self.transactionOptions.merge(transactionOptions) + + var forAssemblyPipeline : (EthereumTransaction, EthereumContract, TransactionOptions) = (assembledTransaction, self.contract, mergedOptions) + + for hook in self.web3.preAssemblyHooks { + let prom : Promise = Promise {seal in + hook.queue.async { + let hookResult = hook.function(forAssemblyPipeline) + if hookResult.3 { + forAssemblyPipeline = (hookResult.0, hookResult.1, hookResult.2) + } + seal.fulfill(hookResult.3) + } + } + let shouldContinue = try prom.wait() + if shouldContinue { + seal.reject(Web3Error.processingError(desc: "Transaction is canceled by middleware")) + return + } + } + + assembledTransaction = forAssemblyPipeline.0 + mergedOptions = forAssemblyPipeline.2 + + guard let from = mergedOptions.from else { + seal.reject(Web3Error.inputError(desc: "No 'from' field provided")) + return + } + + // assemble promise for gas estimation + var optionsForGasEstimation = TransactionOptions() + optionsForGasEstimation.from = mergedOptions.from + optionsForGasEstimation.to = mergedOptions.to + optionsForGasEstimation.value = mergedOptions.value + optionsForGasEstimation.callOnBlock = mergedOptions.callOnBlock + let gasEstimatePromise : Promise = self.web3.eth.estimateGasPromise(assembledTransaction, transactionOptions: optionsForGasEstimation) + + // assemble promise for nonce + var getNoncePromise: Promise? + guard let noncePolicy = mergedOptions.nonce else { + seal.reject(Web3Error.inputError(desc: "No nonce policy provided")) + return + } + switch noncePolicy { + case .latest: + getNoncePromise = self.web3.eth.getTransactionCountPromise(address: from, onBlock: "latest") + case .pending: + getNoncePromise = self.web3.eth.getTransactionCountPromise(address: from, onBlock: "pending") + case .manual(let nonce): + getNoncePromise = Promise.value(nonce) + } + + let gasPricePromise : Promise = self.web3.eth.getGasPricePromise() + var promisesToFulfill: [Promise] = [getNoncePromise!, gasPricePromise, gasPricePromise] + when(resolved: getNoncePromise!, gasEstimatePromise, gasPricePromise).map(on: queue, { (results:[PromiseResult]) throws -> EthereumTransaction in + + promisesToFulfill.removeAll() + guard case .fulfilled(let nonce) = results[0] else { + throw Web3Error.processingError(desc: "Failed to fetch nonce") + } + guard case .fulfilled(let gasEstimate) = results[1] else { + throw Web3Error.processingError(desc: "Failed to fetch gas estimate") + } + guard case .fulfilled(let gasPrice) = results[2] else { + throw Web3Error.processingError(desc: "Failed to fetch gas price") + } + + guard let estimate = mergedOptions.resolveGasLimit(gasEstimate) else { + throw Web3Error.processingError(desc: "Failed to calculate gas estimate that satisfied options") + } + + guard let finalGasPrice = mergedOptions.resolveGasPrice(gasPrice) else { + throw Web3Error.processingError(desc: "Missing parameter of gas price for transaction") + } + + + assembledTransaction.nonce = nonce + assembledTransaction.gasLimit = estimate + assembledTransaction.gasPrice = finalGasPrice + + forAssemblyPipeline = (assembledTransaction, self.contract, mergedOptions) + + for hook in self.web3.postAssemblyHooks { + let prom : Promise = Promise {seal in + hook.queue.async { + let hookResult = hook.function(forAssemblyPipeline) + if hookResult.3 { + forAssemblyPipeline = (hookResult.0, hookResult.1, hookResult.2) + } + seal.fulfill(hookResult.3) + } + } + let shouldContinue = try prom.wait() + if shouldContinue { + throw Web3Error.processingError(desc: "Transaction is canceled by middleware") + } + } + + assembledTransaction = forAssemblyPipeline.0 + mergedOptions = forAssemblyPipeline.2 + + return assembledTransaction + }).done(on: queue) {tx in + seal.fulfill(tx) + }.catch(on: queue) {err in + seal.reject(err) + } + } + return returnPromise + } + + public func sendPromise(password:String = "web3swift", transactionOptions: TransactionOptions?) -> Promise{ + let queue = self.web3.requestDispatcher.queue + return self.assemblePromise(transactionOptions: transactionOptions).then(on: queue) { transaction throws -> Promise in + let mergedOptions = self.transactionOptions.merge(transactionOptions) + var cleanedOptions = TransactionOptions() + cleanedOptions.from = mergedOptions.from + cleanedOptions.to = mergedOptions.to + return self.web3.eth.sendTransactionPromise(transaction, transactionOptions: cleanedOptions, password: password) + } + } + + +} diff --git a/web3swift/Web3/Classes/Web3+Options.swift b/web3swift/Web3/Classes/Web3+Options.swift index 88b8028a9..a2f686ff6 100755 --- a/web3swift/Web3/Classes/Web3+Options.swift +++ b/web3swift/Web3/Classes/Web3+Options.swift @@ -1,9 +1,7 @@ +// web3swift // -// Web3+Options.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 26.02.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -145,3 +143,194 @@ public struct Web3Options { } } } + +/// Options for sending or calling a particular Ethereum transaction +public struct TransactionOptions { + /// Sets the transaction destination. It can either be a contract address or a private key controlled wallet address. + /// + /// Usually should never be nil. + public var to: EthereumAddress? = nil + /// Sets from what account a transaction should be sent. Used only internally as the sender of Ethereum transaction + /// is determined purely from the transaction signature. Indicates to the Ethereum node or to the local keystore what private key + /// should be used to sign a transaction. + /// + /// Can be nil if one reads the information from the blockchain. + public var from: EthereumAddress? = nil + + public enum GasLimitPolicy { + case automatic + case manual(BigUInt) + case limited(BigUInt) + case withMargin(Double) + } + public var gasLimit: GasLimitPolicy? + + public enum GasPricePolicy { + case automatic + case manual(BigUInt) + case withMargin(Double) + } + public var gasPrice: GasPricePolicy? + + public var value: BigUInt? = nil + + public enum NoncePolicy { + case pending + case latest + case manual(BigUInt) + } + public var nonce: NoncePolicy? + + public enum CallingBlockPolicy { + case pending + case latest + case exactBlockNumber(BigUInt) + + var stringValue: String { + switch self { + case .pending: + return "pending" + case .latest: + return "latest" + case .exactBlockNumber(let number): + return String(number, radix: 16).addHexPrefix() + } + } + } + public var callOnBlock: CallingBlockPolicy? + + public init() { + } + + public static var defaultOptions: TransactionOptions { + var opts = TransactionOptions() + opts.callOnBlock = .pending + opts.nonce = .pending + opts.gasLimit = .automatic + opts.gasPrice = .automatic + return opts + } + + public func resolveGasPrice(_ suggestedByNode: BigUInt) -> BigUInt? { + return suggestedByNode + } + + public func resolveGasLimit(_ suggestedByNode: BigUInt) -> BigUInt? { + return suggestedByNode + } + + public func merge(_ otherOptions: TransactionOptions?) -> TransactionOptions { + guard let other = otherOptions else {return self} + var opts = TransactionOptions() + opts.from = mergeIfNotNil(first: self.from, second: other.from) + opts.to = mergeIfNotNil(first: self.to, second: other.to) + opts.gasLimit = mergeIfNotNil(first: self.gasLimit, second: other.gasLimit) + opts.gasPrice = mergeIfNotNil(first: self.gasPrice, second: other.gasPrice) + opts.value = mergeIfNotNil(first: self.value, second: other.value) + opts.nonce = mergeIfNotNil(first: self.nonce, second: other.nonce) + opts.callOnBlock = mergeIfNotNil(first: self.callOnBlock, second: other.callOnBlock) + return opts + } + +// public static func fromJSON(_ json: [String: Any]) -> Web3Options? { +// var options = Web3Options() +// if let gas = json["gas"] as? String, let gasBiguint = BigUInt(gas.stripHexPrefix().lowercased(), radix: 16) { +// options.gasLimit = gasBiguint +// } +// if let gasPrice = json["gasPrice"] as? String, let gasPriceBiguint = BigUInt(gasPrice.stripHexPrefix().lowercased(), radix: 16) { +// options.gasPrice = gasPriceBiguint +// } +// if let value = json["value"] as? String, let valueBiguint = BigUInt(value.stripHexPrefix().lowercased(), radix: 16) { +// options.value = valueBiguint +// } +// if let fromString = json["from"] as? String { +// guard let addressFrom = EthereumAddress(fromString) else {return nil} +// options.from = addressFrom +// } +// return options +// } +// +// /// Merges two sets of topions by overriding the parameters from the first set by parameters from the second +// /// set if those are not nil. +// /// +// /// Returns default options if both parameters are nil. +// public static func merge(_ options:Web3Options?, with other:Web3Options?) -> Web3Options? { +// if (other == nil && options == nil) { +// return Web3Options.defaultOptions() +// } +// var newOptions = Web3Options.defaultOptions() +// if (other?.to != nil) { +// newOptions.to = other?.to +// } else { +// newOptions.to = options?.to +// } +// if (other?.from != nil) { +// newOptions.from = other?.from +// } else { +// newOptions.from = options?.from +// } +// if (other?.gasLimit != nil) { +// newOptions.gasLimit = other?.gasLimit +// } else { +// newOptions.gasLimit = options?.gasLimit +// } +// if (other?.gasPrice != nil) { +// newOptions.gasPrice = other?.gasPrice +// } else { +// newOptions.gasPrice = options?.gasPrice +// } +// if (other?.value != nil) { +// newOptions.value = other?.value +// } else { +// newOptions.value = options?.value +// } +// return newOptions +// } +// +// /// merges two sets of options along with a gas estimate to try to guess the final gas limit value required by user. +// /// +// /// Please refer to the source code for a logic. +// public static func smartMergeGasLimit(originalOptions: Web3Options?, extraOptions: Web3Options?, gasEstimate: BigUInt) -> BigUInt? { +// guard let mergedOptions = Web3Options.merge(originalOptions, with: extraOptions) else {return nil} //just require any non-nils +// if mergedOptions.gasLimit == nil { +// return gasEstimate // for user's convenience we just use an estimate +// // return nil // there is no opinion from user, so we can not proceed +// } else { +// if originalOptions != nil, originalOptions!.gasLimit != nil, originalOptions!.gasLimit! < gasEstimate { // original gas estimate was less than what's required, so we check extra options +// if extraOptions != nil, extraOptions!.gasLimit != nil, extraOptions!.gasLimit! >= gasEstimate { +// return extraOptions!.gasLimit! +// } else { +// return gasEstimate // for user's convenience we just use an estimate +// // return nil // estimate is lower than allowed +// } +// } else { +// if extraOptions != nil, extraOptions!.gasLimit != nil, extraOptions!.gasLimit! >= gasEstimate { +// return extraOptions!.gasLimit! +// } else { +// return gasEstimate // for user's convenience we just use an estimate +// // return nil // estimate is lower than allowed +// } +// } +// } +// } +// +// public static func smartMergeGasPrice(originalOptions: Web3Options?, extraOptions: Web3Options?, priceEstimate: BigUInt) -> BigUInt? { +// guard let mergedOptions = Web3Options.merge(originalOptions, with: extraOptions) else {return nil} //just require any non-nils +// if mergedOptions.gasPrice == nil { +// return priceEstimate +// } else if mergedOptions.gasPrice == 0 { +// return priceEstimate +// } else { +// return mergedOptions.gasPrice! +// } +// } +} + +fileprivate func mergeIfNotNil(first: T?, second: T?) -> T? { + if second != nil { + return second + } else if first != nil { + return first + } + return nil +} diff --git a/web3swift/Web3/Classes/Web3+Personal.swift b/web3swift/Web3/Classes/Web3+Personal.swift index af3b7f1be..2b9060899 100755 --- a/web3swift/Web3/Classes/Web3+Personal.swift +++ b/web3swift/Web3/Classes/Web3+Personal.swift @@ -1,9 +1,7 @@ -// -// Web3+Personal.swift // web3swift // -// Created by Alexander Vlasov on 14.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Web3/Classes/Web3+Protocols.swift b/web3swift/Web3/Classes/Web3+Protocols.swift index 18cb29645..ac4a4d0e9 100755 --- a/web3swift/Web3/Classes/Web3+Protocols.swift +++ b/web3swift/Web3/Classes/Web3+Protocols.swift @@ -1,9 +1,7 @@ +// web3swift // -// Web3+Protocols.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 26.02.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Web3/Classes/Web3+ReadingTransaction.swift b/web3swift/Web3/Classes/Web3+ReadingTransaction.swift new file mode 100644 index 000000000..e84e104b2 --- /dev/null +++ b/web3swift/Web3/Classes/Web3+ReadingTransaction.swift @@ -0,0 +1,84 @@ +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt +import PromiseKit +fileprivate typealias PromiseResult = PromiseKit.Result +import EthereumAddress + +public class ReadTransaction { + public var transaction:EthereumTransaction + public var contract: EthereumContract + public var method: String + public var transactionOptions: TransactionOptions = TransactionOptions.defaultOptions + + var web3: web3 + + public init (transaction: EthereumTransaction, web3 web3Instance: web3, contract: EthereumContract, method: String, transactionOptions: TransactionOptions?) { + self.transaction = transaction + self.web3 = web3Instance + self.contract = contract + self.method = method + self.transactionOptions = self.transactionOptions.merge(transactionOptions) + if self.web3.provider.network != nil { + self.transaction.chainID = self.web3.provider.network?.chainID + } + } + + public func callPromise(transactionOptions: TransactionOptions? = nil) -> Promise<[String: Any]> { + let assembledTransaction : EthereumTransaction = self.transaction + let queue = self.web3.requestDispatcher.queue + let returnPromise = Promise<[String:Any]> { seal in + let mergedOptions = self.transactionOptions.merge(transactionOptions) + var optionsForCall = TransactionOptions() + optionsForCall.from = mergedOptions.from + optionsForCall.to = mergedOptions.to + optionsForCall.value = mergedOptions.value + optionsForCall.callOnBlock = mergedOptions.callOnBlock + let callPromise : Promise = self.web3.eth.callPromise(assembledTransaction, transactionOptions: optionsForCall) + callPromise.done(on: queue) {(data:Data) throws in + do { + if (self.method == "fallback") { + let resultHex = data.toHexString().addHexPrefix() + seal.fulfill(["result": resultHex as Any]) + return + } + guard let decodedData = self.contract.decodeReturnData(self.method, data: data) else + { + throw Web3Error.processingError(desc: "Can not decode returned parameters") + } + seal.fulfill(decodedData) + } catch{ + seal.reject(error) + } + }.catch(on: queue) {err in + seal.reject(err) + } + } + return returnPromise + } + + public func estimateGasPromise(transactionOptions: TransactionOptions) -> Promise{ + let assembledTransaction : EthereumTransaction = self.transaction + let queue = self.web3.requestDispatcher.queue + let returnPromise = Promise { seal in + let mergedOptions = self.transactionOptions.merge(transactionOptions) + var optionsForGasEstimation = TransactionOptions() + optionsForGasEstimation.from = mergedOptions.from + optionsForGasEstimation.to = mergedOptions.to + optionsForGasEstimation.value = mergedOptions.value + optionsForGasEstimation.callOnBlock = mergedOptions.callOnBlock + let promise = self.web3.eth.estimateGasPromise(assembledTransaction, transactionOptions: optionsForGasEstimation) + promise.done(on: queue) {(estimate: BigUInt) in + seal.fulfill(estimate) + }.catch(on: queue) {err in + seal.reject(err) + } + } + return returnPromise + } +} diff --git a/web3swift/Web3/Classes/Web3+Structures.swift b/web3swift/Web3/Classes/Web3+Structures.swift index 09e4f561b..4aca8d629 100755 --- a/web3swift/Web3/Classes/Web3+Structures.swift +++ b/web3swift/Web3/Classes/Web3+Structures.swift @@ -1,8 +1,7 @@ +// web3swift // -// Web3+Structures.swift -// -// Created by Alexander Vlasov on 26.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Web3/Classes/Web3+TransactionIntermediate.swift b/web3swift/Web3/Classes/Web3+TransactionIntermediate.swift index f8f9c88ba..3b0885a26 100755 --- a/web3swift/Web3/Classes/Web3+TransactionIntermediate.swift +++ b/web3swift/Web3/Classes/Web3+TransactionIntermediate.swift @@ -1,9 +1,7 @@ +// web3swift // -// Web3+TransactionIntermediate.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 26.02.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -49,16 +47,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func send(password: String = "web3swift", options: Web3Options? = nil, onBlock: String = "pending") -> Result { - do { - let result = try self.sendPromise(password: password, options: options, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func send(password: String = "web3swift", options: Web3Options? = nil, onBlock: String = "pending") throws -> TransactionSendingResult { + let result = try self.sendPromise(password: password, options: options, onBlock: onBlock).wait() + return result } /** @@ -74,16 +65,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func call(options: Web3Options?, onBlock: String = "latest") -> Result<[String:Any], Web3Error> { - do { - let result = try self.callPromise(options: options, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func call(options: Web3Options?, onBlock: String = "latest") throws -> [String:Any] { + let result = try self.callPromise(options: options, onBlock: onBlock).wait() + return result } /** @@ -99,16 +83,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func estimateGas(options: Web3Options?, onBlock: String = "latest") -> Result { - do { - let result = try self.estimateGasPromise(options: options, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func estimateGas(options: Web3Options?, onBlock: String = "latest") throws -> BigUInt { + let result = try self.estimateGasPromise(options: options, onBlock: onBlock).wait() + return result } /** @@ -124,16 +101,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func assemble(options: Web3Options? = nil, onBlock: String = "pending") -> Result { - do { - let result = try self.assemblePromise(options: options, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func assemble(options: Web3Options? = nil, onBlock: String = "pending") throws -> EthereumTransaction { + let result = try self.assemblePromise(options: options, onBlock: onBlock).wait() + return result } } diff --git a/web3swift/Web3/Classes/Web3+TxPool.swift b/web3swift/Web3/Classes/Web3+TxPool.swift index 465fc255e..25ff46003 100644 --- a/web3swift/Web3/Classes/Web3+TxPool.swift +++ b/web3swift/Web3/Classes/Web3+TxPool.swift @@ -1,16 +1,13 @@ +// web3swift // -// Web3+TxPool.swift -// web3swift-iOS -// -// Created by Jun Park on 09/10/2018. -// Copyright © 2018 The Matter Inc. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import Result import BigInt - extension web3.TxPool { public func getInspect() -> Result<[String:[String:[String:String]]], Web3Error> { do { diff --git a/web3swift/Web3/Classes/Web3+Utils.swift b/web3swift/Web3/Classes/Web3+Utils.swift index c94185dcd..2d8cd1dff 100755 --- a/web3swift/Web3/Classes/Web3+Utils.swift +++ b/web3swift/Web3/Classes/Web3+Utils.swift @@ -1,9 +1,7 @@ -// -// web3utils.swift // web3swift // -// Created by Alexander Vlasov on 18.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Web3/Classes/Web3.swift b/web3swift/Web3/Classes/Web3.swift index 59d548401..33ca06458 100755 --- a/web3swift/Web3/Classes/Web3.swift +++ b/web3swift/Web3/Classes/Web3.swift @@ -1,9 +1,7 @@ -// -// Web3.swift // web3swift // -// Created by Alexander Vlasov on 11.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swiftTests/web3swift_ABI_Tests.swift b/web3swiftTests/web3swift_ABI_Tests.swift deleted file mode 100755 index 2f6158ac2..000000000 --- a/web3swiftTests/web3swift_ABI_Tests.swift +++ /dev/null @@ -1,368 +0,0 @@ -// -// web3swiftABITests.swift -// web3swift-iOS_Tests -// -// Created by Георгий Фесенко on 02/07/2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import XCTest -import BigInt - -@testable import web3swift_iOS - -class web3swift_ABI_Tests: XCTestCase { - - - func testRealABIv2() { - let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"getUsers\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"handle\",\"type\":\"string\"},{\"name\":\"city\",\"type\":\"bytes32\"},{\"name\":\"state\",\"type\":\"bytes32\"},{\"name\":\"country\",\"type\":\"bytes32\"}],\"name\":\"registerNewUser\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"SHA256notaryHash\",\"type\":\"bytes32\"}],\"name\":\"getImage\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"userAddress\",\"type\":\"address\"}],\"name\":\"getUser\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"},{\"name\":\"\",\"type\":\"bytes32\"},{\"name\":\"\",\"type\":\"bytes32\"},{\"name\":\"\",\"type\":\"bytes32\"},{\"name\":\"\",\"type\":\"bytes32[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getAllImages\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"imageURL\",\"type\":\"string\"},{\"name\":\"SHA256notaryHash\",\"type\":\"bytes32\"}],\"name\":\"addImageToUser\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"userAddress\",\"type\":\"address\"}],\"name\":\"getUserImages\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" - do { - let jsonData = jsonString.data(using: .utf8) - let abi = try JSONDecoder().decode([ABIv2.Record].self, from: jsonData!) - let abiNative = try abi.map({ (record) -> ABIv2.Element in - return try record.parse() - }) - print(abiNative) - XCTAssert(abiNative.count > 0, "Can't parse some real-world ABI") - } catch { - XCTFail() - print(error) - } - } - - func testABIv2Parsing () { - let jsonString = "[{\"name\":\"f\",\"type\":\"function\",\"inputs\":[{\"name\":\"s\",\"type\":\"tuple\",\"components\":[{\"name\":\"a\",\"type\":\"uint256\"},{\"name\":\"b\",\"type\":\"uint256[]\"},{\"name\":\"c\",\"type\":\"tuple[]\",\"components\":[{\"name\":\"x\",\"type\":\"uint256\"},{\"name\":\"y\",\"type\":\"uint256\"}]}]},{\"name\":\"t\",\"type\":\"tuple\",\"components\":[{\"name\":\"x\",\"type\":\"uint256\"},{\"name\":\"y\",\"type\":\"uint256\"}]},{\"name\":\"a\",\"type\":\"uint256\"},{\"name\":\"z\",\"type\":\"uint256[3]\"}],\"outputs\":[]}]" - do { - let jsonData = jsonString.data(using: .utf8) - let abi = try JSONDecoder().decode([ABIv2.Record].self, from: jsonData!) - let abiNative = try abi.map({ (record) -> ABIv2.Element in - return try record.parse() - }) - print(abiNative) - XCTAssert(abiNative.count > 0, "Can't parse some real-world ABI") - } catch { - XCTFail() - print(error) - } - } - - func testABIdecoding2() { - let jsonString = "[{\"type\":\"function\",\"name\":\"balance\",\"constant\":true},{\"type\":\"function\",\"name\":\"send\",\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}]},{\"type\":\"function\",\"name\":\"test\",\"constant\":false,\"inputs\":[{\"name\":\"number\",\"type\":\"uint32\"}]},{\"type\":\"function\",\"name\":\"string\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"string\"}]},{\"type\":\"function\",\"name\":\"bool\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"bool\"}]},{\"type\":\"function\",\"name\":\"address\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"address\"}]},{\"type\":\"function\",\"name\":\"uint64[2]\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"uint64[2]\"}]},{\"type\":\"function\",\"name\":\"uint64[]\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"uint64[]\"}]},{\"type\":\"function\",\"name\":\"foo\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"uint32\"}]},{\"type\":\"function\",\"name\":\"bar\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"uint32\"},{\"name\":\"string\",\"type\":\"uint16\"}]},{\"type\":\"function\",\"name\":\"slice\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"uint32[2]\"}]},{\"type\":\"function\",\"name\":\"slice256\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"uint256[2]\"}]},{\"type\":\"function\",\"name\":\"sliceAddress\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"address[]\"}]},{\"type\":\"function\",\"name\":\"sliceMultiAddress\",\"constant\":false,\"inputs\":[{\"name\":\"a\",\"type\":\"address[]\"},{\"name\":\"b\",\"type\":\"address[]\"}]}]" - do { - let jsonData = jsonString.data(using: .utf8) - let abi = try JSONDecoder().decode([ABIv2.Record].self, from: jsonData!) - let abiNative = try abi.map({ (record) -> ABIv2.Element in - return try record.parse() - }) - print(abiNative) - XCTAssert(true, "Failed to parse ABI") - } catch { - print(error) - XCTFail() - } - } - - func testABIv2decoding() { - let jsonString = "[{\"type\":\"constructor\",\"payable\":false,\"stateMutability\":\"nonpayable\",\"inputs\":[{\"name\":\"testInt\",\"type\":\"uint256\"}]},{\"type\":\"function\",\"name\":\"foo\",\"constant\":false,\"payable\":false,\"stateMutability\":\"nonpayable\",\"inputs\":[{\"name\":\"b\",\"type\":\"uint256\"},{\"name\":\"c\",\"type\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\"}]},{\"type\":\"event\",\"name\":\"Event\",\"inputs\":[{\"indexed\":true,\"name\":\"b\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"c\",\"type\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Event2\",\"inputs\":[{\"indexed\":true,\"name\":\"b\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"c\",\"type\":\"bytes32\"}],\"anonymous\":false}]" - do { - let jsonData = jsonString.data(using: .utf8) - let abi = try JSONDecoder().decode([ABIv2.Record].self, from: jsonData!) - let abiNative = try abi.map({ (record) -> ABIv2.Element in - return try record.parse() - }) - print(abiNative) - XCTAssert(true, "Failed to parse ABI") - } catch { - print(error) - XCTFail() - } - } - - func testABIv2decoding2() { - let jsonString = "[{\"type\":\"function\",\"name\":\"balance\",\"constant\":true},{\"type\":\"function\",\"name\":\"send\",\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}]},{\"type\":\"function\",\"name\":\"test\",\"constant\":false,\"inputs\":[{\"name\":\"number\",\"type\":\"uint32\"}]},{\"type\":\"function\",\"name\":\"string\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"string\"}]},{\"type\":\"function\",\"name\":\"bool\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"bool\"}]},{\"type\":\"function\",\"name\":\"address\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"address\"}]},{\"type\":\"function\",\"name\":\"uint64[2]\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"uint64[2]\"}]},{\"type\":\"function\",\"name\":\"uint64[]\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"uint64[]\"}]},{\"type\":\"function\",\"name\":\"foo\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"uint32\"}]},{\"type\":\"function\",\"name\":\"bar\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"uint32\"},{\"name\":\"string\",\"type\":\"uint16\"}]},{\"type\":\"function\",\"name\":\"slice\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"uint32[2]\"}]},{\"type\":\"function\",\"name\":\"slice256\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"uint256[2]\"}]},{\"type\":\"function\",\"name\":\"sliceAddress\",\"constant\":false,\"inputs\":[{\"name\":\"inputs\",\"type\":\"address[]\"}]},{\"type\":\"function\",\"name\":\"sliceMultiAddress\",\"constant\":false,\"inputs\":[{\"name\":\"a\",\"type\":\"address[]\"},{\"name\":\"b\",\"type\":\"address[]\"}]}]" - do { - let jsonData = jsonString.data(using: .utf8) - let abi = try JSONDecoder().decode([ABIv2.Record].self, from: jsonData!) - let abiNative = try abi.map({ (record) -> ABIv2.Element in - return try record.parse() - }) - print(abiNative) - XCTAssert(true, "Failed to parse ABI") - } catch { - print(error) - XCTFail() - } - } - - func testABIv2encoding1() - { - // var a = abi.methodID('baz', [ 'uint32', 'bool' ]).toString('hex') + abi.rawEncode([ 'uint32', 'bool' ], [ 69, 1 ]).toString('hex') - // var b = 'cdcd77c000000000000000000000000000000000000000000000000000000000000000450000000000000000000000000000000000000000000000000000000000000001' - // - let types = [ - ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.uint(bits: 32)), - ABIv2.Element.InOut(name: "2", type: ABIv2.Element.ParameterType.bool) - ] - let data = ABIv2Encoder.encode(types: types, values: [BigUInt(69), true] as [AnyObject]) - XCTAssert(data != nil, "failed to encode") - let expected = "0x00000000000000000000000000000000000000000000000000000000000000450000000000000000000000000000000000000000000000000000000000000001" - print(data!.toHexString().lowercased()) - XCTAssert(data?.toHexString().lowercased().addHexPrefix() == expected, "failed to encode") - } - - func testABIv2encoding2() - { - let types = [ - ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.string) - ] - let data = ABIv2Encoder.encode(types: types, values: ["dave"] as [AnyObject]) - XCTAssert(data != nil, "failed to encode") - let expected = "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000046461766500000000000000000000000000000000000000000000000000000000" - print(data!.toHexString().lowercased()) - XCTAssert(data?.toHexString().lowercased().addHexPrefix() == expected, "failed to encode") - } - - func testABIv2encoding3() - { - // var a = abi.methodID('sam', [ 'bytes', 'bool', 'uint256[]' ]).toString('hex') + abi.rawEncode([ 'bytes', 'bool', 'uint256[]' ], [ 'dave', true, [ 1, 2, 3 ] ]).toString('hex') - // var b = 'a5643bf20000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000464617665000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003' - let types = [ - ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.dynamicBytes), - ABIv2.Element.InOut(name: "2", type: ABIv2.Element.ParameterType.bool), - ABIv2.Element.InOut(name: "3", type: ABIv2.Element.ParameterType.array(type: .uint(bits: 256), length: 0)) - ] - - let data = ABIv2Encoder.encode(types: types, values: ["dave".data(using: .utf8)!, true, [BigUInt(1), BigUInt(2), BigUInt(3)] ] as [AnyObject]) - XCTAssert(data != nil, "failed to encode") - let expected = "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000464617665000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003" - print(data!.toHexString().lowercased()) - XCTAssert(data?.toHexString().lowercased().addHexPrefix() == expected, "failed to encode") - } - - func testABIv2encoding4() - { - // var a = abi.rawEncode([ 'int256' ], [ new BN('-19999999999999999999999999999999999999999999999999999999999999', 10) ]).toString('hex') - // var b = 'fffffffffffff38dd0f10627f5529bdb2c52d4846810af0ac000000000000001' - - let types = [ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.int(bits: 256))] - let number = BigInt("-19999999999999999999999999999999999999999999999999999999999999", radix: 10) - let data = ABIv2Encoder.encode(types: types, - values: [number!] as [AnyObject]) - XCTAssert(data != nil, "failed to encode") - let expected = "0xfffffffffffff38dd0f10627f5529bdb2c52d4846810af0ac000000000000001" - let result = data?.toHexString().lowercased().addHexPrefix() - print(result) - XCTAssert(result == expected, "failed to encode") - } - - func testABIv2encoding5() - { - // var a = abi.rawEncode([ 'string' ], [ ' hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world' ]).toString('hex') - // var b = '000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c22068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c64202068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c64202068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c64000000000000000000000000000000000000000000000000000000000000' - - let string = " hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world" - let types = [ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.string)] - let data = ABIv2Encoder.encode(types: types, - values: [string] as [AnyObject]) - XCTAssert(data != nil, "failed to encode") - let expected = "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c22068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c64202068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c64202068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c642068656c6c6f20776f726c64000000000000000000000000000000000000000000000000000000000000" - print(data?.toHexString().lowercased().addHexPrefix()) - XCTAssert(data?.toHexString().lowercased().addHexPrefix() == expected, "failed to encode") - } - - func testABIv2encoding6() - { - // var a = abi.methodID('f', [ 'uint', 'uint32[]', 'bytes10', 'bytes' ]).toString('hex') + abi.rawEncode([ 'uint', 'uint32[]', 'bytes10', 'bytes' ], [ 0x123, [ 0x456, 0x789 ], '1234567890', 'Hello, world!' ]).toString('hex') - // var b = '8be6524600000000000000000000000000000000000000000000000000000000000001230000000000000000000000000000000000000000000000000000000000000080313233343536373839300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004560000000000000000000000000000000000000000000000000000000000000789000000000000000000000000000000000000000000000000000000000000000d48656c6c6f2c20776f726c642100000000000000000000000000000000000000' - let types = [ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.uint(bits: 256)), - ABIv2.Element.InOut(name: "2", type: ABIv2.Element.ParameterType.array(type: .uint(bits: 32), length: 0)), - ABIv2.Element.InOut(name: "3", type: ABIv2.Element.ParameterType.bytes(length: 10)), - ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.dynamicBytes) - ] - let data = ABIv2Encoder.encode(types: types, - values: [BigUInt("123", radix: 16)!, - [BigUInt("456", radix: 16)!, BigUInt("789", radix: 16)!] as [AnyObject], - "1234567890", - "Hello, world!"] as [AnyObject]) - XCTAssert(data != nil, "failed to encode") - let expected = "0x00000000000000000000000000000000000000000000000000000000000001230000000000000000000000000000000000000000000000000000000000000080313233343536373839300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004560000000000000000000000000000000000000000000000000000000000000789000000000000000000000000000000000000000000000000000000000000000d48656c6c6f2c20776f726c642100000000000000000000000000000000000000" - print(data!.toHexString().lowercased()) - XCTAssert(data?.toHexString().lowercased().addHexPrefix() == expected, "failed to encode") - } - - func testABIv2encoding7() - { - let types = [ - ABIv2.Element.InOut(name: "2", type: ABIv2.Element.ParameterType.array(type: .string, length: 0)) - ] - let data = ABIv2Encoder.encode(types: types, - values: [["Hello", "World"]] as [AnyObject]) - XCTAssert(data != nil, "failed to encode") - let expected = "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000548656c6c6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005576f726c64000000000000000000000000000000000000000000000000000000" - print(data!.toHexString().lowercased()) - XCTAssert(data?.toHexString().lowercased() == expected, "failed to encode") - } - - func testABIv2encoding8() - { - let types = [ - ABIv2.Element.InOut(name: "2", type: ABIv2.Element.ParameterType.array(type: .string, length: 2)) - ] - let data = ABIv2Encoder.encode(types: types, - values: [["Hello", "World"]] as [AnyObject]) - XCTAssert(data != nil, "failed to encode") - let expected = "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000548656c6c6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005576f726c64000000000000000000000000000000000000000000000000000000" - print(data!.toHexString().lowercased()) - XCTAssert(data?.toHexString().lowercased() == expected, "failed to encode") - } - - - - func testABIv2Decoding1() { - let data = "0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000003" - let types = [ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.array(type: .uint(bits: 256), length: 2)), - ABIv2.Element.InOut(name: "2", type: ABIv2.Element.ParameterType.uint(bits: 256))] - let res = ABIv2Decoder.decode(types: types, data: Data.fromHex(data)!) - guard let result = res else {return XCTFail()} - XCTAssert(result.count == 2) - guard let firstElement = result[0] as? [BigUInt] else {return XCTFail()} - XCTAssert(firstElement.count == 2) - guard let secondElement = result[1] as? BigUInt else {return XCTFail()} - XCTAssert(firstElement[0] == BigUInt(1)) - XCTAssert(firstElement[1] == BigUInt(92)) - XCTAssert(secondElement == BigUInt(3)) - } - - func testABIv2Decoding2() { - let data = "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003" - let types = [ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.array(type: .uint(bits: 256), length: 0))] - let res = ABIv2Decoder.decode(types: types, data: Data.fromHex(data)!) - guard let result = res else {return XCTFail()} - XCTAssert(result.count == 1) - guard let firstElement = result[0] as? [BigUInt] else {return XCTFail()} - XCTAssert(firstElement.count == 3) - XCTAssert(firstElement[0] == BigUInt(1)) - XCTAssert(firstElement[1] == BigUInt(2)) - XCTAssert(firstElement[2] == BigUInt(3)) - } - - func testABIv2Decoding3() { - let data = "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b68656c6c6f20776f726c64000000000000000000000000000000000000000000" - let types = [ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.dynamicBytes)] - let res = ABIv2Decoder.decode(types: types, data: Data.fromHex(data)!) - guard let result = res else {return XCTFail()} - XCTAssert(result.count == 1) - guard let firstElement = result[0] as? Data else {return XCTFail()} - XCTAssert(firstElement.count == 11) - } - - func testABIv2Decoding4() { - let data = "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b68656c6c6f20776f726c64000000000000000000000000000000000000000000" - let types = [ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.string)] - let res = ABIv2Decoder.decode(types: types, data: Data.fromHex(data)!) - guard let result = res else {return XCTFail()} - XCTAssert(result.count == 1) - guard let firstElement = result[0] as? String else {return XCTFail()} - XCTAssert(firstElement == "hello world") - } - - func testABIv2Decoding5() { - let data = "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" - let types = [ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.int(bits: 32))] - let res = ABIv2Decoder.decode(types: types, data: Data.fromHex(data)!) - guard let result = res else {return XCTFail()} - XCTAssert(result.count == 1) - guard let firstElement = result[0] as? BigInt else {return XCTFail()} - XCTAssert(firstElement == BigInt(-2)) - } - - func testABIv2Decoding6() { - let data = "ffffffffffffffffffffffffffffffffffffffffffffffffffffb29c26f344fe" - let types = [ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.int(bits: 64))] - let res = ABIv2Decoder.decode(types: types, data: Data.fromHex(data)!) - guard let result = res else {return XCTFail()} - XCTAssert(result.count == 1) - guard let firstElement = result[0] as? BigInt else {return XCTFail()} - XCTAssert(firstElement == BigInt("-85091238591234")!) - } - - func testABIv2Decoding7() { - let data = "0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002a" - let types = [ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.bool), - ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.uint(bits: 32))] - let res = ABIv2Decoder.decode(types: types, data: Data.fromHex(data)!) - guard let result = res else {return XCTFail()} - XCTAssert(result.count == types.count) - guard let firstElement = result[0] as? Bool else {return XCTFail()} - XCTAssert(firstElement == true) - guard let secondElement = result[1] as? BigUInt else {return XCTFail()} - XCTAssert(secondElement == 42) - } - - func testABIv2Decoding8() { - let data = "000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002a" - let types = [ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.bool), - ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.array(type: .uint(bits: 256), length: 0))] - let res = ABIv2Decoder.decode(types: types, data: Data.fromHex(data)!) - guard let result = res else {return XCTFail()} - XCTAssert(result.count == types.count) - guard let firstElement = result[0] as? Bool else {return XCTFail()} - XCTAssert(firstElement == true) - guard let secondElement = result[1] as? [BigUInt] else {return XCTFail()} - XCTAssert(secondElement.count == 1) - XCTAssert(secondElement[0] == 42) - } - - func testABIv2Decoding9() { - let data = "0000000000000000000000000000000000000000000000000000000000000020" + - "0000000000000000000000000000000000000000000000000000000000000002" + - "000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1" + - "000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3" - let types = [ABIv2.Element.InOut(name: "1", type: ABIv2.Element.ParameterType.array(type: .address, length: 0))] - let res = ABIv2Decoder.decode(types: types, data: Data.fromHex(data)!) - guard let result = res else {return XCTFail()} - XCTAssert(result.count == types.count) - guard let firstElement = result[0] as? [EthereumAddress] else {return XCTFail()} - XCTAssert(firstElement.count == 2) - XCTAssert(firstElement[0].address.lowercased().stripHexPrefix() == "407d73d8a49eeb85d32cf465507dd71d507100c1") - XCTAssert(firstElement[1].address.lowercased().stripHexPrefix() == "407d73d8a49eeb85d32cf465507dd71d507100c3") - } - - - -// func testABIparsing1() -// { -// let typeString = "uint256[2][3]" -// let type = try! ABITypeParser.parseTypeString(typeString) -// switch type { -// case .staticABIType(let unwrappedType): -// switch unwrappedType{ -// case .array(_, length: let length): -// XCTAssert(length == 3, "Failed to parse") -// default: -// XCTFail() -// } -// case .dynamicABIType(_): -// XCTFail() -// -// } -// } -// -// func testABIparsing2() -// { -// let typeString = "uint256[2][]" -// let type = try! ABITypeParser.parseTypeString(typeString) -// switch type { -// case .staticABIType(_): -// XCTFail() -// case .dynamicABIType(let unwrappedType): -// switch unwrappedType{ -// case .dynamicArray(_): -// XCTAssert(true) -// default: -// XCTFail() -// } -// } -// } - -} From fa38a7a53fd0d76f1b862cf0a760c5743c0dc46a Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Mon, 29 Oct 2018 21:07:30 +0300 Subject: [PATCH 07/23] - Add extra check to not transact to the non-mutating function --- .../Classes/Web3+MutatingTransaction.swift | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/web3swift/Web3/Classes/Web3+MutatingTransaction.swift b/web3swift/Web3/Classes/Web3+MutatingTransaction.swift index 1943d6072..a1fe0d4ff 100644 --- a/web3swift/Web3/Classes/Web3+MutatingTransaction.swift +++ b/web3swift/Web3/Classes/Web3+MutatingTransaction.swift @@ -16,6 +16,26 @@ public class WriteTransaction: ReadTransaction { var assembledTransaction : EthereumTransaction = self.transaction let queue = self.web3.requestDispatcher.queue let returnPromise = Promise { seal in + if self.method != "fallback" { + let m = self.contract.methods[self.method] + if m == nil { + seal.reject(Web3Error.inputError(desc: "Contract's ABI does not have such method")) + return + } + switch m! { + case .function(let function): + if function.constant { + seal.reject(Web3Error.inputError(desc: "Trying to transact to the constant function")) + return + } + case .constructor(_): + break + default: + seal.reject(Web3Error.inputError(desc: "Contract's ABI does not have such method")) + return + } + } + var mergedOptions = self.transactionOptions.merge(transactionOptions) var forAssemblyPipeline : (EthereumTransaction, EthereumContract, TransactionOptions) = (assembledTransaction, self.contract, mergedOptions) From 23d47bbdd1a7c6b541a4c1b1e0d1766d9dbbd006 Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Tue, 30 Oct 2018 01:02:10 +0300 Subject: [PATCH 08/23] - Start fixing tests one by one --- web3swift.xcodeproj/project.pbxproj | 38 +-- .../Classes/ComparisonExtensions.swift | 6 +- .../EthereumFilterEncodingExtensions.swift | 6 +- .../Contract/Classes/EventFiltering.swift | 6 +- .../Convenience/Classes/Array+Extension.swift | 6 +- web3swift/Convenience/Classes/Base58.swift | 6 +- .../Classes/CryptoExtensions.swift | 9 +- .../Convenience/Classes/Data+Extension.swift | 7 +- .../Classes/Dictionary+Extension.swift | 6 +- .../NSRegularExpressionExtension.swift | 6 +- .../NativeTypesEncoding+Extensions.swift | 6 +- .../Classes/String+Extension.swift | 8 +- .../Classes/Web3+BrowserFunctions.swift | 8 +- .../HookedFunctions/Classes/Web3+Wallet.swift | 7 +- .../Classes/AbstractKeystore.swift | 6 +- .../KeystoreManager/Classes/BIP32HDNode.swift | 6 +- .../Classes/BIP32Keystore.swift | 7 +- .../Classes/BIP32KeystoreJSONStructure.swift | 6 +- .../Classes/BIP39+WordLists.swift | 6 +- web3swift/KeystoreManager/Classes/BIP39.swift | 6 +- .../Classes/EthereumKeystoreV3.swift | 6 +- web3swift/KeystoreManager/Classes/IBAN.swift | 6 +- .../Classes/KeystoreManager.swift | 6 +- .../Classes/KeystoreV3JSONStructure.swift | 6 +- .../Classes/PlainKeystore.swift | 6 +- .../Classes/BigUInt+ObjC.swift | 6 +- .../Classes/EthereumAddress+ObjC.swift | 6 +- .../JSONRPCrequestDispatcher+ObjC.swift | 8 +- .../Classes/KeystoreManager+ObjC.swift | 6 +- .../Classes/PlainKeystore+ObjC.swift | 6 +- .../Classes/Web3+Eth+ObjC.swift | 6 +- .../Classes/Web3+HttpProvider+ObjC.swift | 6 +- .../Classes/Web3+Instance+ObjC.swift | 6 +- .../ObjectiveCbridge/Classes/Web3+ObjC.swift | 6 +- .../ERC20/Web3+ERC20.swift | 4 +- .../ERC721/Web3+ERC721.swift | 8 +- .../Transaction/Classes/BloomFilter.swift | 29 +-- .../Classes/EthereumTransaction.swift | 6 +- .../Classes/TransactionSigner.swift | 8 +- web3swift/Utils/Classes/EIP67Code.swift | 6 +- web3swift/Utils/Classes/EIP681.swift | 6 +- web3swift/Utils/Classes/ENS.swift | 5 +- web3swift/Utils/Classes/ENSResolver.swift | 8 +- web3swift/Utils/Classes/NameHash.swift | 6 +- web3swift/Web3/Classes/Web3+Contract.swift | 30 ++- web3swift/Web3/Classes/Web3+Eth.swift | 231 +++++++++--------- .../Classes/Web3+MutatingTransaction.swift | 4 +- web3swift/Web3/Classes/Web3+Options.swift | 25 +- .../Classes/Web3+ReadingTransaction.swift | 2 +- web3swiftTests/web3swift_User_cases.swift | 98 +++----- web3swiftTests/web3swift_infura_Tests.swift | 87 +++---- 51 files changed, 336 insertions(+), 475 deletions(-) diff --git a/web3swift.xcodeproj/project.pbxproj b/web3swift.xcodeproj/project.pbxproj index ff7b9ece6..b97684f5c 100755 --- a/web3swift.xcodeproj/project.pbxproj +++ b/web3swift.xcodeproj/project.pbxproj @@ -7,15 +7,10 @@ objects = { /* Begin PBXBuildFile section */ - 00E5FE7620EA34370030E0D6 /* web3swift_keystores_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7520EA34370030E0D6 /* web3swift_keystores_Tests.swift */; }; - 00E5FE7A20EA355D0030E0D6 /* web3swift_transactions_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7920EA355D0030E0D6 /* web3swift_transactions_Tests.swift */; }; - 00E5FE7C20EA37B50030E0D6 /* web3swift_ERC20_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7B20EA37B50030E0D6 /* web3swift_ERC20_Tests.swift */; }; - 00E5FE8020EA3CEA0030E0D6 /* web3swift_RLP_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7F20EA3CEA0030E0D6 /* web3swift_RLP_Tests.swift */; }; 00E5FE8220EA3FF40030E0D6 /* web3swift_infura_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE8120EA3FF40030E0D6 /* web3swift_infura_Tests.swift */; }; 13AE5971A972F5B55FA6FB69 /* libPods-web3swift-iOS_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8349531F1984454E50389370 /* libPods-web3swift-iOS_Tests.a */; }; 1CB818902160868000726CF8 /* key.json in Resources */ = {isa = PBXBuildFile; fileRef = 1CB8188F2160867700726CF8 /* key.json */; }; 1CB818912160871000726CF8 /* key.json in Resources */ = {isa = PBXBuildFile; fileRef = 1CB8188F2160867700726CF8 /* key.json */; }; - 1CD91B321FD769A6007BFB45 /* web3swift_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CD91B311FD769A6007BFB45 /* web3swift_Tests.swift */; }; 1CD91B341FD769A6007BFB45 /* web3swift_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CD91AFC1FD76910007BFB45 /* web3swift_iOS.framework */; }; 4194811B203630530065A83B /* Web3+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 817EBB142004FE4200E02EAA /* Web3+HttpProvider.swift */; }; 4194811E203630530065A83B /* Web3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81DDECCE1FDF004E0063684A /* Web3.swift */; }; @@ -45,8 +40,6 @@ 41948140203630530065A83B /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8123E1CA200CBB2200B6D3AB /* Array+Extension.swift */; }; 41948141203630530065A83B /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8113D2FF1FD7F30F0074282C /* String+Extension.swift */; }; 4B900282EFA99F16100CC958 /* libPods-web3swift-macOS_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8675751D91DB2DBC9E7A3469 /* libPods-web3swift-macOS_Tests.a */; }; - 4EFFCB6E208552F2008165FE /* web3swift_local_node_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EFFCB6D208552F2008165FE /* web3swift_local_node_Tests.swift */; }; - 4EFFCB70208554EB008165FE /* web3swift_remoteParsing_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EFFCB6F208554EB008165FE /* web3swift_remoteParsing_Tests.swift */; }; 64CF114189285D8E240C4985 /* libPods-web3swift-iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A5E8AF69880F5141B4AC9DF0 /* libPods-web3swift-iOS.a */; }; 8103BBCC2077B84400499769 /* PlainKeystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8103BBCB2077B84400499769 /* PlainKeystore.swift */; }; 8103BBCD2077B84400499769 /* PlainKeystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8103BBCB2077B84400499769 /* PlainKeystore.swift */; }; @@ -71,8 +64,6 @@ 815630002007B48800A0EC2F /* BIP32KeystoreJSONStructure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81562FFF2007B48800A0EC2F /* BIP32KeystoreJSONStructure.swift */; }; 815630022007B53C00A0EC2F /* BIP32Keystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 815630012007B53C00A0EC2F /* BIP32Keystore.swift */; }; 815630042007BC8F00A0EC2F /* BIP39+WordLists.swift in Sources */ = {isa = PBXBuildFile; fileRef = 815630032007BC8F00A0EC2F /* BIP39+WordLists.swift */; }; - 8159C50E2135901700197B91 /* web3swift_ERC20_Class_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8159C50D2135901700197B91 /* web3swift_ERC20_Class_Tests.swift */; }; - 815C74C820ECBF3E00DE2AC4 /* web3swift_User_cases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 815C74C720ECBF3E00DE2AC4 /* web3swift_User_cases.swift */; }; 8160E5CE20B8245A0070070B /* IBAN.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8160E5CD20B8245A0070070B /* IBAN.swift */; }; 8160E5CF20B8245A0070070B /* IBAN.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8160E5CD20B8245A0070070B /* IBAN.swift */; }; 817EBB122004FE2F00E02EAA /* BIP32HDNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 817EBB112004FE2F00E02EAA /* BIP32HDNode.swift */; }; @@ -92,11 +83,11 @@ 81909D1621862D37007D2AE5 /* Web3+MutatingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1421862D37007D2AE5 /* Web3+MutatingTransaction.swift */; }; 81909D1821862D5A007D2AE5 /* Web3+Eventloop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */; }; 81909D1921862D5A007D2AE5 /* Web3+Eventloop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */; }; + 81909D1B2187B1FA007D2AE5 /* web3swift_User_cases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 815C74C720ECBF3E00DE2AC4 /* web3swift_User_cases.swift */; }; 81A1821520D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821620D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821A20D5A6F70016741F /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */; }; 81A1821B20D5A6F80016741F /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */; }; - 81A1821D20D5C6C10016741F /* web3swift_promises_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821C20D5C6C10016741F /* web3swift_promises_Tests.swift */; }; 81A1821F20D676BC0016741F /* Promise+Web3+Eth+GetTransactionCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821E20D676BC0016741F /* Promise+Web3+Eth+GetTransactionCount.swift */; }; 81A1822020D676BC0016741F /* Promise+Web3+Eth+GetTransactionCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821E20D676BC0016741F /* Promise+Web3+Eth+GetTransactionCount.swift */; }; 81A1822220D678060016741F /* Promise+Web3+Eth+GetBlockNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1822120D678060016741F /* Promise+Web3+Eth+GetBlockNumber.swift */; }; @@ -130,8 +121,6 @@ 81A1824C20D7DF1B0016741F /* Promise+Web3+Personal+UnlockAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1824A20D7DF1B0016741F /* Promise+Web3+Personal+UnlockAccount.swift */; }; 81A7B2512143C3A8004CD2C7 /* NameHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2502143C3A8004CD2C7 /* NameHash.swift */; }; 81A7B2522143C3A8004CD2C7 /* NameHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2502143C3A8004CD2C7 /* NameHash.swift */; }; - 81A7B2792143C978004CD2C7 /* web3swift_ENS_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2782143C978004CD2C7 /* web3swift_ENS_Tests.swift */; }; - 81A7B28A2143DF1D004CD2C7 /* web3swift_EIP681_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2892143DF1D004CD2C7 /* web3swift_EIP681_Tests.swift */; }; 81C0FCF220440EB500D82FAF /* Web3+Protocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCF120440EB500D82FAF /* Web3+Protocols.swift */; }; 81C0FCF420440F0900D82FAF /* Web3+Options.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCF320440F0900D82FAF /* Web3+Options.swift */; }; 81C0FCF720441A1D00D82FAF /* TransactionSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C0FCF520440F9900D82FAF /* TransactionSigner.swift */; }; @@ -162,7 +151,6 @@ 81FB21FF207BB297007F9A83 /* EIP67Code.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FB21F8207BA78B007F9A83 /* EIP67Code.swift */; }; 81FB2201207BC58C007F9A83 /* CoreImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81FB2200207BC58B007F9A83 /* CoreImage.framework */; }; 81FB2203207BC6DB007F9A83 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81FB2202207BC6DB007F9A83 /* ImageIO.framework */; }; - 81FECD5E211AEFCE006DA367 /* web3swift_ObjC_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FECD5D211AEFCE006DA367 /* web3swift_ObjC_Tests.swift */; }; 985BFD4A216CE8B100B28C14 /* Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 985BFD49216CE8B100B28C14 /* Web3+TxPool.swift */; }; 985BFD4E216E2E0A00B28C14 /* Promise+Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 985BFD4D216E2E0A00B28C14 /* Promise+Web3+TxPool.swift */; }; B350A445E5DB35C60E59AD70 /* libPods-web3swift-macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 57F8C9C48884592DCF561393 /* libPods-web3swift-macOS.a */; }; @@ -170,11 +158,6 @@ E2065FB92181D7D700701068 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81195AAF20D7FF8500ABC6B1 /* Promise+Web3+Contract+GetIndexedEvents.swift */; }; E2065FBA2181D7D700701068 /* Promise+Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 985BFD4D216E2E0A00B28C14 /* Promise+Web3+TxPool.swift */; }; E2065FBB2181D7D700701068 /* Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 985BFD49216CE8B100B28C14 /* Web3+TxPool.swift */; }; - E23B5ADB20EA67D800DC7F32 /* web3swift_AdvancedABIv2_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5ADA20EA67D800DC7F32 /* web3swift_AdvancedABIv2_Tests.swift */; }; - E23B5ADD20EA685D00DC7F32 /* web3swift_EIP67_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5ADC20EA685D00DC7F32 /* web3swift_EIP67_Tests.swift */; }; - E23B5AE120EA695400DC7F32 /* web3swift_rinkeby_personalSignature_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5AE020EA695400DC7F32 /* web3swift_rinkeby_personalSignature_Tests.swift */; }; - E23B5AE320EA69B900DC7F32 /* web3swift_numberFormattingUtil_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5AE220EA69B900DC7F32 /* web3swift_numberFormattingUtil_Tests.swift */; }; - E23B5AE520EA6A0A00DC7F32 /* web3swift_contractV2_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5AE420EA6A0A00DC7F32 /* web3swift_contractV2_Tests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -1083,25 +1066,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 815C74C820ECBF3E00DE2AC4 /* web3swift_User_cases.swift in Sources */, - 8159C50E2135901700197B91 /* web3swift_ERC20_Class_Tests.swift in Sources */, - E23B5AE520EA6A0A00DC7F32 /* web3swift_contractV2_Tests.swift in Sources */, - E23B5AE120EA695400DC7F32 /* web3swift_rinkeby_personalSignature_Tests.swift in Sources */, - E23B5ADB20EA67D800DC7F32 /* web3swift_AdvancedABIv2_Tests.swift in Sources */, - 81A7B28A2143DF1D004CD2C7 /* web3swift_EIP681_Tests.swift in Sources */, - 4EFFCB70208554EB008165FE /* web3swift_remoteParsing_Tests.swift in Sources */, - 00E5FE7C20EA37B50030E0D6 /* web3swift_ERC20_Tests.swift in Sources */, - E23B5AE320EA69B900DC7F32 /* web3swift_numberFormattingUtil_Tests.swift in Sources */, - 00E5FE7A20EA355D0030E0D6 /* web3swift_transactions_Tests.swift in Sources */, - 00E5FE7620EA34370030E0D6 /* web3swift_keystores_Tests.swift in Sources */, - 00E5FE8020EA3CEA0030E0D6 /* web3swift_RLP_Tests.swift in Sources */, - 4EFFCB6E208552F2008165FE /* web3swift_local_node_Tests.swift in Sources */, - 81A1821D20D5C6C10016741F /* web3swift_promises_Tests.swift in Sources */, - 81FECD5E211AEFCE006DA367 /* web3swift_ObjC_Tests.swift in Sources */, - E23B5ADD20EA685D00DC7F32 /* web3swift_EIP67_Tests.swift in Sources */, 00E5FE8220EA3FF40030E0D6 /* web3swift_infura_Tests.swift in Sources */, - 1CD91B321FD769A6007BFB45 /* web3swift_Tests.swift in Sources */, - 81A7B2792143C978004CD2C7 /* web3swift_ENS_Tests.swift in Sources */, + 81909D1B2187B1FA007D2AE5 /* web3swift_User_cases.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/web3swift/Contract/Classes/ComparisonExtensions.swift b/web3swift/Contract/Classes/ComparisonExtensions.swift index a0a72f018..d11da016b 100755 --- a/web3swift/Contract/Classes/ComparisonExtensions.swift +++ b/web3swift/Contract/Classes/ComparisonExtensions.swift @@ -1,9 +1,7 @@ -// -// ComparisonExtensions.swift // web3swift // -// Created by Alexander Vlasov on 09.05.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift b/web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift index 8abf520b1..e818b94fd 100755 --- a/web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift +++ b/web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift @@ -1,9 +1,7 @@ -// -// EthereumStringEncodingExtensions.swift // web3swift // -// Created by Alexander Vlasov on 09.05.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Contract/Classes/EventFiltering.swift b/web3swift/Contract/Classes/EventFiltering.swift index 0a31f66d2..d45d0e1c6 100755 --- a/web3swift/Contract/Classes/EventFiltering.swift +++ b/web3swift/Contract/Classes/EventFiltering.swift @@ -1,9 +1,7 @@ -// -// EventFiltering.swift // web3swift // -// Created by Alexander Vlasov on 11.05.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Convenience/Classes/Array+Extension.swift b/web3swift/Convenience/Classes/Array+Extension.swift index 1f61aa666..3fc7e80f2 100755 --- a/web3swift/Convenience/Classes/Array+Extension.swift +++ b/web3swift/Convenience/Classes/Array+Extension.swift @@ -1,9 +1,7 @@ -// -// Array+Extension.swift // web3swift // -// Created by Alexander Vlasov on 15.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Convenience/Classes/Base58.swift b/web3swift/Convenience/Classes/Base58.swift index 69774d14e..6e0accdc3 100755 --- a/web3swift/Convenience/Classes/Base58.swift +++ b/web3swift/Convenience/Classes/Base58.swift @@ -1,9 +1,7 @@ -// -// Base58.swift // web3swift // -// Created by Alexander Vlasov on 10.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Convenience/Classes/CryptoExtensions.swift b/web3swift/Convenience/Classes/CryptoExtensions.swift index a1bcf0e9d..ae389d0df 100755 --- a/web3swift/Convenience/Classes/CryptoExtensions.swift +++ b/web3swift/Convenience/Classes/CryptoExtensions.swift @@ -1,13 +1,10 @@ -// -// CryptoExtensions.swift // web3swift // -// Created by Alexander Vlasov on 04.12.2017. -// Copyright © 2017 Alexander Vlasov. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -//import libsodium import scrypt func toByteArray(_ value: T) -> [UInt8] { @@ -15,7 +12,7 @@ func toByteArray(_ value: T) -> [UInt8] { return withUnsafeBytes(of: &value) { Array($0) } } -public func scrypt (password: String, salt: Data, length: Int, N: Int, R: Int, P: Int) -> Data? { +func scrypt (password: String, salt: Data, length: Int, N: Int, R: Int, P: Int) -> Data? { guard let passwordData = password.data(using: .utf8) else {return nil} guard let deriver = try? Scrypt(password: passwordData.bytes, salt: salt.bytes, dkLen: length, N: N, r: R, p: P) else {return nil} guard let result = try? deriver.calculate() else {return nil} diff --git a/web3swift/Convenience/Classes/Data+Extension.swift b/web3swift/Convenience/Classes/Data+Extension.swift index e23cd4dc6..c68fc04e7 100755 --- a/web3swift/Convenience/Classes/Data+Extension.swift +++ b/web3swift/Convenience/Classes/Data+Extension.swift @@ -1,13 +1,10 @@ -// -// Data+Extension.swift // web3swift // -// Created by Alexander Vlasov on 15.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -//import libsodium public extension Data { diff --git a/web3swift/Convenience/Classes/Dictionary+Extension.swift b/web3swift/Convenience/Classes/Dictionary+Extension.swift index 3253247c7..ee1a68133 100755 --- a/web3swift/Convenience/Classes/Dictionary+Extension.swift +++ b/web3swift/Convenience/Classes/Dictionary+Extension.swift @@ -1,9 +1,7 @@ -// -// Dictionary+Extension.swift // web3swift // -// Created by Alexander Vlasov on 15.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Convenience/Classes/NSRegularExpressionExtension.swift b/web3swift/Convenience/Classes/NSRegularExpressionExtension.swift index 31cb7ed06..1b511a627 100755 --- a/web3swift/Convenience/Classes/NSRegularExpressionExtension.swift +++ b/web3swift/Convenience/Classes/NSRegularExpressionExtension.swift @@ -1,9 +1,7 @@ -// -// NSRegularExpressionExtension.swift // web3swift // -// Created by Alexander Vlasov on 06.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // diff --git a/web3swift/Convenience/Classes/NativeTypesEncoding+Extensions.swift b/web3swift/Convenience/Classes/NativeTypesEncoding+Extensions.swift index 7f4841d2a..725c0ba0c 100755 --- a/web3swift/Convenience/Classes/NativeTypesEncoding+Extensions.swift +++ b/web3swift/Convenience/Classes/NativeTypesEncoding+Extensions.swift @@ -1,9 +1,7 @@ -// -// NativeTypesEncoding+Extensions.swift // web3swift // -// Created by Alexander Vlasov on 03.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Convenience/Classes/String+Extension.swift b/web3swift/Convenience/Classes/String+Extension.swift index 7694838c9..a40cc173e 100755 --- a/web3swift/Convenience/Classes/String+Extension.swift +++ b/web3swift/Convenience/Classes/String+Extension.swift @@ -1,9 +1,7 @@ +// web3swift // -// String+Extension.swift -// web3swift-iOS -// -// Created by Alexander Vlasov. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift b/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift index c8ace71a2..28ad05158 100755 --- a/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift +++ b/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift @@ -1,9 +1,7 @@ +// web3swift // -// Web3+BrowserFunctions.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 26.02.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/HookedFunctions/Classes/Web3+Wallet.swift b/web3swift/HookedFunctions/Classes/Web3+Wallet.swift index bee0783c2..887b361f8 100755 --- a/web3swift/HookedFunctions/Classes/Web3+Wallet.swift +++ b/web3swift/HookedFunctions/Classes/Web3+Wallet.swift @@ -1,10 +1,9 @@ -// -// Web3+HookedWallet.swift // web3swift // -// Created by Alexander Vlasov on 07.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // + import Foundation import BigInt import Result diff --git a/web3swift/KeystoreManager/Classes/AbstractKeystore.swift b/web3swift/KeystoreManager/Classes/AbstractKeystore.swift index 11a5c0bda..72f72a15d 100755 --- a/web3swift/KeystoreManager/Classes/AbstractKeystore.swift +++ b/web3swift/KeystoreManager/Classes/AbstractKeystore.swift @@ -1,9 +1,7 @@ -// -// AbstractKeystore.swift // web3swift // -// Created by Alexander Vlasov on 10.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/KeystoreManager/Classes/BIP32HDNode.swift b/web3swift/KeystoreManager/Classes/BIP32HDNode.swift index cc62cf6c4..9a9c89bd0 100755 --- a/web3swift/KeystoreManager/Classes/BIP32HDNode.swift +++ b/web3swift/KeystoreManager/Classes/BIP32HDNode.swift @@ -1,9 +1,7 @@ -// -// BIP32HDwallet.swift // web3swift // -// Created by Alexander Vlasov on 09.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/KeystoreManager/Classes/BIP32Keystore.swift b/web3swift/KeystoreManager/Classes/BIP32Keystore.swift index a88460346..a2ca855e1 100755 --- a/web3swift/KeystoreManager/Classes/BIP32Keystore.swift +++ b/web3swift/KeystoreManager/Classes/BIP32Keystore.swift @@ -1,9 +1,7 @@ -// -// BIP32Keystore.swift // web3swift // -// Created by Alexander Vlasov on 11.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -46,7 +44,6 @@ public class BIP32Keystore: AbstractKeystore { // -------------- public var keystoreParams: KeystoreParamsBIP32? -// public var mnemonics: String? public var paths: [String:EthereumAddress] = [String:EthereumAddress]() public var rootPrefix: String public convenience init?(_ jsonString: String) { diff --git a/web3swift/KeystoreManager/Classes/BIP32KeystoreJSONStructure.swift b/web3swift/KeystoreManager/Classes/BIP32KeystoreJSONStructure.swift index bb38ebc41..97a253345 100755 --- a/web3swift/KeystoreManager/Classes/BIP32KeystoreJSONStructure.swift +++ b/web3swift/KeystoreManager/Classes/BIP32KeystoreJSONStructure.swift @@ -1,9 +1,7 @@ -// -// BIP32KeystoreJSONStructure.swift // web3swift // -// Created by Alexander Vlasov on 11.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/KeystoreManager/Classes/BIP39+WordLists.swift b/web3swift/KeystoreManager/Classes/BIP39+WordLists.swift index d7a0193f4..d8ac312bf 100755 --- a/web3swift/KeystoreManager/Classes/BIP39+WordLists.swift +++ b/web3swift/KeystoreManager/Classes/BIP39+WordLists.swift @@ -1,9 +1,7 @@ -// -// BIP39+WordLists.swift // web3swift // -// Created by Alexander Vlasov on 11.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/KeystoreManager/Classes/BIP39.swift b/web3swift/KeystoreManager/Classes/BIP39.swift index a395dc405..58067ca81 100755 --- a/web3swift/KeystoreManager/Classes/BIP39.swift +++ b/web3swift/KeystoreManager/Classes/BIP39.swift @@ -1,9 +1,7 @@ -// -// BIP39.swift // web3swift // -// Created by Alexander Vlasov on 11.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift b/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift index dcbf23d14..569420224 100755 --- a/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift +++ b/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift @@ -1,9 +1,7 @@ -// -// EthereumKeystoreV3.swift // web3swift // -// Created by Alexander Vlasov on 18.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/KeystoreManager/Classes/IBAN.swift b/web3swift/KeystoreManager/Classes/IBAN.swift index de39ef368..5f4e22f49 100755 --- a/web3swift/KeystoreManager/Classes/IBAN.swift +++ b/web3swift/KeystoreManager/Classes/IBAN.swift @@ -1,9 +1,7 @@ -// -// IBAN.swift // web3swift // -// Created by Alexander Vlasov on 25.05.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/KeystoreManager/Classes/KeystoreManager.swift b/web3swift/KeystoreManager/Classes/KeystoreManager.swift index d722e33fc..e9a6193c8 100755 --- a/web3swift/KeystoreManager/Classes/KeystoreManager.swift +++ b/web3swift/KeystoreManager/Classes/KeystoreManager.swift @@ -1,9 +1,7 @@ -// -// KeystoreManager.swift // web3swift // -// Created by Alexander Vlasov on 04.12.2017. -// Copyright © 2017 Alexander Vlasov. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/KeystoreManager/Classes/KeystoreV3JSONStructure.swift b/web3swift/KeystoreManager/Classes/KeystoreV3JSONStructure.swift index 887f79660..8ab80e570 100755 --- a/web3swift/KeystoreManager/Classes/KeystoreV3JSONStructure.swift +++ b/web3swift/KeystoreManager/Classes/KeystoreV3JSONStructure.swift @@ -1,9 +1,7 @@ -// -// KeystoreJSONStructure.swift // web3swift // -// Created by Alexander Vlasov on 10.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/KeystoreManager/Classes/PlainKeystore.swift b/web3swift/KeystoreManager/Classes/PlainKeystore.swift index 3cd2937fc..7a03158af 100755 --- a/web3swift/KeystoreManager/Classes/PlainKeystore.swift +++ b/web3swift/KeystoreManager/Classes/PlainKeystore.swift @@ -1,9 +1,7 @@ -// -// PlainKeystore.swift // web3swift // -// Created by Alexander Vlasov on 06.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/ObjectiveCbridge/Classes/BigUInt+ObjC.swift b/web3swift/ObjectiveCbridge/Classes/BigUInt+ObjC.swift index 220a4735e..4ad761304 100755 --- a/web3swift/ObjectiveCbridge/Classes/BigUInt+ObjC.swift +++ b/web3swift/ObjectiveCbridge/Classes/BigUInt+ObjC.swift @@ -1,9 +1,7 @@ -// -// BigUInt+ObjC.swift // web3swift // -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift b/web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift index 9ae1dd23d..7466cac63 100755 --- a/web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift +++ b/web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift @@ -1,9 +1,7 @@ -// -// EthereumAddress+ObjC.swift // web3swift // -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/ObjectiveCbridge/Classes/JSONRPCrequestDispatcher+ObjC.swift b/web3swift/ObjectiveCbridge/Classes/JSONRPCrequestDispatcher+ObjC.swift index 5b57e2335..4ad2d7157 100644 --- a/web3swift/ObjectiveCbridge/Classes/JSONRPCrequestDispatcher+ObjC.swift +++ b/web3swift/ObjectiveCbridge/Classes/JSONRPCrequestDispatcher+ObjC.swift @@ -1,9 +1,7 @@ +// web3swift // -// JSONRPCrequestDispatcher.swift -// web3swift-iOS -// -// Created by Anton Grigorev on 19.09.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/ObjectiveCbridge/Classes/KeystoreManager+ObjC.swift b/web3swift/ObjectiveCbridge/Classes/KeystoreManager+ObjC.swift index 0a3891933..5a8a73ba6 100755 --- a/web3swift/ObjectiveCbridge/Classes/KeystoreManager+ObjC.swift +++ b/web3swift/ObjectiveCbridge/Classes/KeystoreManager+ObjC.swift @@ -1,9 +1,7 @@ -// -// KeystoreManager+ObjC.swift // web3swift // -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/ObjectiveCbridge/Classes/PlainKeystore+ObjC.swift b/web3swift/ObjectiveCbridge/Classes/PlainKeystore+ObjC.swift index d698fcb96..0546bc5bf 100755 --- a/web3swift/ObjectiveCbridge/Classes/PlainKeystore+ObjC.swift +++ b/web3swift/ObjectiveCbridge/Classes/PlainKeystore+ObjC.swift @@ -1,9 +1,7 @@ -// -// PlainKeystore+ObjC.swift // web3swift // -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift b/web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift index 87d759340..e2c62d383 100755 --- a/web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift +++ b/web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift @@ -1,9 +1,7 @@ -// -// Web3+Eth+ObjC.swift // web3swift // -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/ObjectiveCbridge/Classes/Web3+HttpProvider+ObjC.swift b/web3swift/ObjectiveCbridge/Classes/Web3+HttpProvider+ObjC.swift index f626ba792..4e9fc1916 100755 --- a/web3swift/ObjectiveCbridge/Classes/Web3+HttpProvider+ObjC.swift +++ b/web3swift/ObjectiveCbridge/Classes/Web3+HttpProvider+ObjC.swift @@ -1,9 +1,7 @@ -// -// Web3+Provider+ObjC.swift // web3swift // -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/ObjectiveCbridge/Classes/Web3+Instance+ObjC.swift b/web3swift/ObjectiveCbridge/Classes/Web3+Instance+ObjC.swift index d6390aa0b..d6ced3ee0 100755 --- a/web3swift/ObjectiveCbridge/Classes/Web3+Instance+ObjC.swift +++ b/web3swift/ObjectiveCbridge/Classes/Web3+Instance+ObjC.swift @@ -1,9 +1,7 @@ -// -// Web3Instnace+ObjectiveC.swift // web3swift // -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/ObjectiveCbridge/Classes/Web3+ObjC.swift b/web3swift/ObjectiveCbridge/Classes/Web3+ObjC.swift index facae1516..e4a539399 100755 --- a/web3swift/ObjectiveCbridge/Classes/Web3+ObjC.swift +++ b/web3swift/ObjectiveCbridge/Classes/Web3+ObjC.swift @@ -1,9 +1,7 @@ -// -// Web3+ObjectiveC.swift // web3swift // -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift b/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift index 4e07319da..c73ec9f73 100644 --- a/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift +++ b/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift @@ -1,8 +1,6 @@ -// -// Web3+ERC721.swift // web3swift // -// Created by Alex Vlasov on 28.08.2018. +// Created by Alex Vlasov. // Copyright © 2018 Alex Vlasov. All rights reserved. // diff --git a/web3swift/PrecompiledContracts/ERC721/Web3+ERC721.swift b/web3swift/PrecompiledContracts/ERC721/Web3+ERC721.swift index 03662a9e5..909fa096f 100644 --- a/web3swift/PrecompiledContracts/ERC721/Web3+ERC721.swift +++ b/web3swift/PrecompiledContracts/ERC721/Web3+ERC721.swift @@ -1,9 +1,7 @@ +// web3swift // -// Web3+ERC721.swift -// web3swift-iOS -// -// Created by Anton Grigorev on 17.10.2018. -// Copyright © 2018 The Matter Inc. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Transaction/Classes/BloomFilter.swift b/web3swift/Transaction/Classes/BloomFilter.swift index cb0938e3b..9a83b0595 100755 --- a/web3swift/Transaction/Classes/BloomFilter.swift +++ b/web3swift/Transaction/Classes/BloomFilter.swift @@ -1,9 +1,7 @@ -// -// BloomFilter.swift // web3swift // -// Created by Alexander Vlasov on 02.03.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -27,29 +25,6 @@ public struct EthereumBloomFilter{ } } - -// -//func (b Bloom) Test(test *big.Int) bool { -// return BloomLookup(b, test) -//} -// -//func (b Bloom) TestBytes(test []byte) bool { -// return b.Test(new(big.Int).SetBytes(test)) -// -//} -// -//// MarshalText encodes b as a hex string with 0x prefix. -//func (b Bloom) MarshalText() ([]byte, error) { -// return hexutil.Bytes(b[:]).MarshalText() -//} -// -//// UnmarshalText b as a hex string with 0x prefix. -//func (b *Bloom) UnmarshalText(input []byte) error { -// return hexutil.UnmarshalFixedText("Bloom", input, b[:]) -//} - - - extension EthereumBloomFilter { static func bloom9(_ biguint: BigUInt) -> BigUInt { diff --git a/web3swift/Transaction/Classes/EthereumTransaction.swift b/web3swift/Transaction/Classes/EthereumTransaction.swift index bace4fa47..09af7a233 100755 --- a/web3swift/Transaction/Classes/EthereumTransaction.swift +++ b/web3swift/Transaction/Classes/EthereumTransaction.swift @@ -1,9 +1,7 @@ -// -// EthereumTransaction.swift // web3swift // -// Created by Alexander Vlasov on 05.12.2017. -// Copyright © 2017 Alexander Vlasov. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Transaction/Classes/TransactionSigner.swift b/web3swift/Transaction/Classes/TransactionSigner.swift index 7cfa8e749..aa962bcf0 100755 --- a/web3swift/Transaction/Classes/TransactionSigner.swift +++ b/web3swift/Transaction/Classes/TransactionSigner.swift @@ -1,9 +1,7 @@ +// web3swift // -// TransactionSigner.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 26.02.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Utils/Classes/EIP67Code.swift b/web3swift/Utils/Classes/EIP67Code.swift index 702f646a0..e2951a93b 100755 --- a/web3swift/Utils/Classes/EIP67Code.swift +++ b/web3swift/Utils/Classes/EIP67Code.swift @@ -1,9 +1,7 @@ -// -// EIP67CodeGenerator.swift // web3swift // -// Created by Alexander Vlasov on 09.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Utils/Classes/EIP681.swift b/web3swift/Utils/Classes/EIP681.swift index c955f521a..61b1e0e40 100644 --- a/web3swift/Utils/Classes/EIP681.swift +++ b/web3swift/Utils/Classes/EIP681.swift @@ -1,9 +1,7 @@ -// -// EIP681.swift // web3swift // -// Created by Alex Vlasov on 08.09.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Utils/Classes/ENS.swift b/web3swift/Utils/Classes/ENS.swift index 07047edd7..567fe7d20 100644 --- a/web3swift/Utils/Classes/ENS.swift +++ b/web3swift/Utils/Classes/ENS.swift @@ -1,6 +1,7 @@ +// web3swift // -// ENS.swift -// web3swift-iOS +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Utils/Classes/ENSResolver.swift b/web3swift/Utils/Classes/ENSResolver.swift index 37ca5066b..ac9689c7d 100644 --- a/web3swift/Utils/Classes/ENSResolver.swift +++ b/web3swift/Utils/Classes/ENSResolver.swift @@ -1,9 +1,7 @@ +// web3swift // -// ENSResolver.swift -// web3swift-iOS -// -// Created by NewUser on 21/09/2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Utils/Classes/NameHash.swift b/web3swift/Utils/Classes/NameHash.swift index cf4a889ce..2a96a9ca4 100644 --- a/web3swift/Utils/Classes/NameHash.swift +++ b/web3swift/Utils/Classes/NameHash.swift @@ -1,9 +1,7 @@ -// -// NameHash.swift // web3swift // -// Created by Alex Vlasov on 08.09.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Web3/Classes/Web3+Contract.swift b/web3swift/Web3/Classes/Web3+Contract.swift index 1dcf3fc73..13b22971f 100755 --- a/web3swift/Web3/Classes/Web3+Contract.swift +++ b/web3swift/Web3/Classes/Web3+Contract.swift @@ -61,7 +61,35 @@ extension web3 { /// Elements of "parameters" can be other arrays or instances of String, Data, BigInt, BigUInt, Int or EthereumAddress. /// /// Returns a "Transaction intermediate" object. - public func method(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), transactionOptions: TransactionOptions?) -> WriteTransaction? { + public func method(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { + let mergedOptions = self.transactionOptions?.merge(transactionOptions) + guard var tx = self.contract.method(method, parameters: parameters, extraData: extraData) else {return nil} + tx.chainID = self.web3.provider.network?.chainID + let writeTX = WriteTransaction.init(transaction: tx, web3: self.web3, contract: self.contract, method: method, transactionOptions: mergedOptions) + return writeTX + } + + /// Creates and object responsible for calling a particular function of the contract. If method name is not found in ABI - returns nil. + /// If extraData is supplied it is appended to encoded function parameters. Can be usefull if one wants to call + /// the function not listed in ABI. "Parameters" should be an array corresponding to the list of parameters of the function. + /// Elements of "parameters" can be other arrays or instances of String, Data, BigInt, BigUInt, Int or EthereumAddress. + /// + /// Returns a "Transaction intermediate" object. + public func read(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> ReadTransaction? { + let mergedOptions = self.transactionOptions?.merge(transactionOptions) + guard var tx = self.contract.method(method, parameters: parameters, extraData: extraData) else {return nil} + tx.chainID = self.web3.provider.network?.chainID + let writeTX = ReadTransaction.init(transaction: tx, web3: self.web3, contract: self.contract, method: method, transactionOptions: mergedOptions) + return writeTX + } + + /// Creates and object responsible for calling a particular function of the contract. If method name is not found in ABI - returns nil. + /// If extraData is supplied it is appended to encoded function parameters. Can be usefull if one wants to call + /// the function not listed in ABI. "Parameters" should be an array corresponding to the list of parameters of the function. + /// Elements of "parameters" can be other arrays or instances of String, Data, BigInt, BigUInt, Int or EthereumAddress. + /// + /// Returns a "Transaction intermediate" object. + public func write(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { let mergedOptions = self.transactionOptions?.merge(transactionOptions) guard var tx = self.contract.method(method, parameters: parameters, extraData: extraData) else {return nil} tx.chainID = self.web3.provider.network?.chainID diff --git a/web3swift/Web3/Classes/Web3+Eth.swift b/web3swift/Web3/Classes/Web3+Eth.swift index 68e240293..25a9deeff 100755 --- a/web3swift/Web3/Classes/Web3+Eth.swift +++ b/web3swift/Web3/Classes/Web3+Eth.swift @@ -240,120 +240,119 @@ extension web3.Eth { } -// /** -// Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data. -// - Parameters: -// - to: EthereumAddress to send funds to -// - amount: BigUInt indicating the amount in wei -// - extraData: Additional data to attach to the transaction -// - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead -// -// - returns: -// - TransactionIntermediate object -// -// */ -// public func sendETH(to: EthereumAddress, amount: BigUInt, extraData: Data = Data(), options: Web3Options? = nil) -> TransactionIntermediate? { -// let contract = self.web3.contract(Web3.Utils.coldWalletABI, at: to, abiVersion: 2) -// guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} -// mergedOptions.value = amount -// let intermediate = contract?.method("fallback", extraData: extraData, options: mergedOptions) -// return intermediate -// } -// -// /** -// *Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data.* -// -// - parameters: -// - to: EthereumAddress to send funds to -// - amount: String in "units" demonimation. It can contain either "," or "." decimal separator. -// - units: Ethereum units indicating the denomination of amout about -// - extraData: Additional data to attach to the transaction -// - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead -// -// - returns: -// - TransactionIntermediate object -// -// * String "1.01" and units: .eth will result in sending 1.01 ETH to another address* -// */ -// public func sendETH(to: EthereumAddress, amount: String, units: Web3.Utils.Units = .eth, extraData: Data = Data(), options: Web3Options? = nil) -> TransactionIntermediate? { -// guard let value = Web3.Utils.parseToBigUInt(amount, units: .eth) else {return nil} -// return sendETH(to: to, amount: value, extraData: extraData, options: options) -// } -// -// /** -// *Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data.* -// -// - parameters: -// - from: EthereumAddress to send funds from -// - to: EthereumAddress to send funds to -// - amount: String in "units" demonimation. It can contain either "," or "." decimal separator. -// - units: Ethereum units indicating the denomination of amout about -// - extraData: Additional data to attach to the transaction -// - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. -// -// - returns: -// - TransactionIntermediate object -// -// * String "1.01" and units: .eth will result in sending 1.01 ETH to another address* -// */ -// public func sendETH(from: EthereumAddress, to: EthereumAddress, amount: String, units: Web3.Utils.Units = .eth, extraData: Data = Data(), options: Web3Options? = nil) -> TransactionIntermediate? { -// guard let value = Web3.Utils.parseToBigUInt(amount, units: .eth) else {return nil} -// guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} -// mergedOptions.from = from -// return sendETH(to: to, amount: value, extraData: extraData, options: mergedOptions) -// } -// -// /** -// *Convenience wrapper to send ERC20 tokens to another address. Internally it creates a virtual contract and encodes all the options and data. Assumes that the sender knows the decimal units of the underlying token.* -// -// - parameters: -// - tokenAddress: EthereumAddress of the token contract -// - from: EthereumAddress to send tokens from -// - to: EthereumAddress to send tokens to -// - amount: BigUInt indicating the number of tokens in the the smallest indivisible units (mind that sender knows the number of decimals) -// - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. -// -// - returns: -// - TransactionIntermediate object -// -// */ -// public func sendERC20tokensWithKnownDecimals(tokenAddress: EthereumAddress, from: EthereumAddress, to: EthereumAddress, amount: BigUInt, options: Web3Options? = nil) -> TransactionIntermediate? { -// let contract = self.web3.contract(Web3.Utils.erc20ABI, at: tokenAddress, abiVersion: 2) -// guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} -// mergedOptions.from = from -// guard let intermediate = contract?.method("transfer", parameters: [to, amount] as [AnyObject], options: mergedOptions) else {return nil} -// return intermediate -// } -// -// /** -// *Convenience wrapper to send ERC20 tokens to another address. Internally it creates a virtual contract and encodes all the options and data. Pulls the number of decimals of the token under the hood.* -// -// - parameters: -// - tokenAddress: EthereumAddress of the token contract -// - from: EthereumAddress to send tokens from -// - to: EthereumAddress to send tokens to -// - amount: String in "natura" demonimation. It can contain either "," or "." decimal separator. -// - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. -// -// - returns: -// - TransactionIntermediate object -// -// - important: This call is synchronous -// -// * If the amount is "1.01" and token has 9 decimals it will result in sending 1010000000 of the smallest invidisible token units.* -// */ -// public func sendERC20tokensWithNaturalUnits(tokenAddress: EthereumAddress, from: EthereumAddress, to: EthereumAddress, amount: String, options: Web3Options? = nil) throws -> TransactionIntermediate? { -// let contract = self.web3.contract(Web3.Utils.erc20ABI, at: tokenAddress, abiVersion: 2) -// guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} -// mergedOptions.from = from -// guard let intermediate = contract?.method("decimals", options: mergedOptions) else {return nil} -// let response = try intermediate.call(options: mergedOptions, onBlock: "latest") -// var decimals = BigUInt(0) -// guard let dec = response["0"], let decTyped = dec as? BigUInt else {return nil} -// decimals = decTyped -// let intDecimals = Int(decimals) -// guard let value = Web3.Utils.parseToBigUInt(amount, decimals: intDecimals) else {return nil} -// return sendERC20tokensWithKnownDecimals(tokenAddress: tokenAddress, from: from, to: to, amount: value, options: options) -// } -// + /** + Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data. + - Parameters: + - to: EthereumAddress to send funds to + - amount: BigUInt indicating the amount in wei + - extraData: Additional data to attach to the transaction + - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead + + - returns: + - TransactionIntermediate object + + */ + public func sendETH(to: EthereumAddress, amount: BigUInt, extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { + let contract = self.web3.contract(Web3.Utils.coldWalletABI, at: to, abiVersion: 2) + var mergedOptions = self.web3.transactionOptions.merge(transactionOptions) + mergedOptions.value = amount + let writeTX = contract?.write("fallback", extraData: extraData, transactionOptions: mergedOptions) + return writeTX + } + + /** + *Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data.* + + - parameters: + - to: EthereumAddress to send funds to + - amount: String in "units" demonimation. It can contain either "," or "." decimal separator. + - units: Ethereum units indicating the denomination of amout about + - extraData: Additional data to attach to the transaction + - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead + + - returns: + - TransactionIntermediate object + + * String "1.01" and units: .eth will result in sending 1.01 ETH to another address* + */ + public func sendETH(to: EthereumAddress, amount: String, units: Web3.Utils.Units = .eth, extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { + guard let value = Web3.Utils.parseToBigUInt(amount, units: .eth) else {return nil} + return sendETH(to: to, amount: value, extraData: extraData, transactionOptions: transactionOptions) + } + + /** + *Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data.* + + - parameters: + - from: EthereumAddress to send funds from + - to: EthereumAddress to send funds to + - amount: String in "units" demonimation. It can contain either "," or "." decimal separator. + - units: Ethereum units indicating the denomination of amout about + - extraData: Additional data to attach to the transaction + - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. + + - returns: + - TransactionIntermediate object + + * String "1.01" and units: .eth will result in sending 1.01 ETH to another address* + */ + public func sendETH(from: EthereumAddress, to: EthereumAddress, amount: String, units: Web3.Utils.Units = .eth, extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { + guard let value = Web3.Utils.parseToBigUInt(amount, units: .eth) else {return nil} + var mergedOptions = self.web3.transactionOptions.merge(transactionOptions) + mergedOptions.from = from + return sendETH(to: to, amount: value, extraData: extraData, transactionOptions: mergedOptions) + } + + /** + *Convenience wrapper to send ERC20 tokens to another address. Internally it creates a virtual contract and encodes all the options and data. Assumes that the sender knows the decimal units of the underlying token.* + + - parameters: + - tokenAddress: EthereumAddress of the token contract + - from: EthereumAddress to send tokens from + - to: EthereumAddress to send tokens to + - amount: BigUInt indicating the number of tokens in the the smallest indivisible units (mind that sender knows the number of decimals) + - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. + + - returns: + - TransactionIntermediate object + + */ + public func sendERC20tokensWithKnownDecimals(tokenAddress: EthereumAddress, from: EthereumAddress, to: EthereumAddress, amount: BigUInt, transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { + let contract = self.web3.contract(Web3.Utils.erc20ABI, at: tokenAddress, abiVersion: 2) + var mergedOptions = self.web3.transactionOptions.merge(transactionOptions) + mergedOptions.from = from + guard let writeTX = contract?.write("transfer", parameters: [to, amount] as [AnyObject], transactionOptions: mergedOptions) else {return nil} + return writeTX + } + + /** + *Convenience wrapper to send ERC20 tokens to another address. Internally it creates a virtual contract and encodes all the options and data. Pulls the number of decimals of the token under the hood.* + + - parameters: + - tokenAddress: EthereumAddress of the token contract + - from: EthereumAddress to send tokens from + - to: EthereumAddress to send tokens to + - amount: String in "natura" demonimation. It can contain either "," or "." decimal separator. + - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. + + - returns: + - TransactionIntermediate object + + - important: This call is synchronous + + * If the amount is "1.01" and token has 9 decimals it will result in sending 1010000000 of the smallest invidisible token units.* + */ + public func sendERC20tokensWithNaturalUnits(tokenAddress: EthereumAddress, from: EthereumAddress, to: EthereumAddress, amount: String, transactionOptions: TransactionOptions? = nil) throws -> WriteTransaction? { + let contract = self.web3.contract(Web3.Utils.erc20ABI, at: tokenAddress, abiVersion: 2) + var mergedOptions = self.web3.transactionOptions.merge(transactionOptions) + mergedOptions.from = from + let resp = try contract?.read("decimals", transactionOptions: mergedOptions)?.callPromise().wait() + var decimals = BigUInt(0) + guard let response = resp, let dec = response["0"], let decTyped = dec as? BigUInt else {return nil} + decimals = decTyped + let intDecimals = Int(decimals) + guard let value = Web3.Utils.parseToBigUInt(amount, decimals: intDecimals) else {return nil} + return sendERC20tokensWithKnownDecimals(tokenAddress: tokenAddress, from: from, to: to, amount: value, transactionOptions: mergedOptions) + } + } diff --git a/web3swift/Web3/Classes/Web3+MutatingTransaction.swift b/web3swift/Web3/Classes/Web3+MutatingTransaction.swift index a1fe0d4ff..2b6de16fd 100644 --- a/web3swift/Web3/Classes/Web3+MutatingTransaction.swift +++ b/web3swift/Web3/Classes/Web3+MutatingTransaction.swift @@ -12,7 +12,7 @@ import EthereumAddress public class WriteTransaction: ReadTransaction { - public func assemblePromise(transactionOptions: TransactionOptions?) -> Promise { + public func assemblePromise(transactionOptions: TransactionOptions? = nil) -> Promise { var assembledTransaction : EthereumTransaction = self.transaction let queue = self.web3.requestDispatcher.queue let returnPromise = Promise { seal in @@ -147,7 +147,7 @@ public class WriteTransaction: ReadTransaction { return returnPromise } - public func sendPromise(password:String = "web3swift", transactionOptions: TransactionOptions?) -> Promise{ + public func sendPromise(password:String = "web3swift", transactionOptions: TransactionOptions? = nil) -> Promise{ let queue = self.web3.requestDispatcher.queue return self.assemblePromise(transactionOptions: transactionOptions).then(on: queue) { transaction throws -> Promise in let mergedOptions = self.transactionOptions.merge(transactionOptions) diff --git a/web3swift/Web3/Classes/Web3+Options.swift b/web3swift/Web3/Classes/Web3+Options.swift index a2f686ff6..78291448e 100755 --- a/web3swift/Web3/Classes/Web3+Options.swift +++ b/web3swift/Web3/Classes/Web3+Options.swift @@ -212,11 +212,32 @@ public struct TransactionOptions { } public func resolveGasPrice(_ suggestedByNode: BigUInt) -> BigUInt? { - return suggestedByNode + guard let gasPricePolicy = self.gasPrice else {return nil} + switch gasPricePolicy { + case .automatic: + return suggestedByNode + case .manual(let value): + return value + case .withMargin(_): + return suggestedByNode + } } public func resolveGasLimit(_ suggestedByNode: BigUInt) -> BigUInt? { - return suggestedByNode + guard let gasLimitPolicy = self.gasLimit else {return nil} + switch gasLimitPolicy { + case .automatic: + return suggestedByNode + case .manual(let value): + return value + case .withMargin(_): + return suggestedByNode + case .limited(let limit): + if limit <= suggestedByNode { + return suggestedByNode + } + return nil + } } public func merge(_ otherOptions: TransactionOptions?) -> TransactionOptions { diff --git a/web3swift/Web3/Classes/Web3+ReadingTransaction.swift b/web3swift/Web3/Classes/Web3+ReadingTransaction.swift index e84e104b2..0a54a4ab1 100644 --- a/web3swift/Web3/Classes/Web3+ReadingTransaction.swift +++ b/web3swift/Web3/Classes/Web3+ReadingTransaction.swift @@ -62,7 +62,7 @@ public class ReadTransaction { return returnPromise } - public func estimateGasPromise(transactionOptions: TransactionOptions) -> Promise{ + public func estimateGasPromise(transactionOptions: TransactionOptions? = nil) -> Promise{ let assembledTransaction : EthereumTransaction = self.transaction let queue = self.web3.requestDispatcher.queue let returnPromise = Promise { seal in diff --git a/web3swiftTests/web3swift_User_cases.swift b/web3swiftTests/web3swift_User_cases.swift index cbfc70ad9..3945fc830 100755 --- a/web3swiftTests/web3swift_User_cases.swift +++ b/web3swiftTests/web3swift_User_cases.swift @@ -8,6 +8,7 @@ import XCTest import BigInt +import EthereumAddress @testable import web3swift_iOS @@ -20,25 +21,18 @@ class web3swift_User_cases: XCTestCase { return data as Data } - func testUserCase1() { + func testUserCase1() throws { let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"mintingFinished\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sha\",\"type\":\"bytes32\"}],\"name\":\"cancelApprove\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"isPrivilegeAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"isBiometricLockedOnlyOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"isAllowedHICAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"addPrivilegeAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"addAllowedHICAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"removePresaleHolder\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_BOPS\",\"type\":\"address\"}],\"name\":\"setBOPSAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"isUtilityHolder\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"addPresaleHolder\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"bioLock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"finishMinting\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"removeAllowedHICAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sha\",\"type\":\"bytes32\"}],\"name\":\"cancelTransfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"isPresaleHolder\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sha\",\"type\":\"bytes32\"},{\"name\":\"v\",\"type\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"releaseTransfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"addUtilityHolder\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isSenderBiometricLocked\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"removePrivilegeAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"removeUtilityHolder\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"sha\",\"type\":\"bytes32\"}],\"name\":\"isBiometricCompleted\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sha\",\"type\":\"bytes32\"},{\"name\":\"v\",\"type\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"releaseApprove\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sha\",\"type\":\"bytes32\"},{\"name\":\"v\",\"type\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"bioUnlock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Pause\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpause\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"sha\",\"type\":\"bytes32\"}],\"name\":\"BiometricTransferRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"sha\",\"type\":\"bytes32\"}],\"name\":\"BiometricApprovalRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"beneficiary\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"sha\",\"type\":\"bytes32\"}],\"name\":\"BiometricLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"beneficiary\",\"type\":\"address\"}],\"name\":\"BiometricUnlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"MintFinished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" let web3 = Web3.InfuraMainnetWeb3() let contractAddress = EthereumAddress("0x0f90969738c7a3088907c052cb96bd4d184a9fcf") let contract = web3.contract(jsonString, at: contractAddress) XCTAssert(contract != nil, "Failed to create ERC20 contract from ABI") - var options = Web3Options.defaultOptions() - options.from = EthereumAddress("0xE6877A4d8806e9A9F12eB2e8561EA6c1db19978d") let account = EthereumAddress("0xb870065718919ac4f9572ffc4bde0b2516f4e723")! - let transactionIntermediate = contract?.method("balanceOf", parameters:[account] as [AnyObject], options: options) - let result = transactionIntermediate!.call(options: options) - switch result { - case .failure(let error): - print(error) - XCTFail() - case .success(let response): - let balance = response["0"] as? BigUInt - print(balance) - } + let readTransaction = contract!.read("balanceOf", parameters:[account] as [AnyObject])! + readTransaction.transactionOptions.from = EthereumAddress("0xE6877A4d8806e9A9F12eB2e8561EA6c1db19978d") + let response = try readTransaction.callPromise().wait() + let balance = response["0"] as? BigUInt + print(balance) } func testUserCase2() { @@ -47,77 +41,57 @@ class web3swift_User_cases: XCTestCase { XCTAssert(web3 != nil, "Failed to create web3 for custom provider") } - func testProperGasLimit() { + func testProperGasLimit() throws { guard let keystoreData = getKeystoreData() else {return XCTFail()} guard let keystoreV3 = EthereumKeystoreV3.init(keystoreData) else {return XCTFail()} let web3Rinkeby = Web3.InfuraRinkebyWeb3() let keystoreManager = KeystoreManager.init([keystoreV3]) web3Rinkeby.addKeystoreManager(keystoreManager) - guard case .success(let gasPriceRinkeby) = web3Rinkeby.eth.getGasPrice() else {return XCTFail()} + let gasPriceRinkeby = try web3Rinkeby.eth.getGasPrice() let sendToAddress = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! - guard let intermediate = web3Rinkeby.eth.sendETH(to: sendToAddress, amount: "0.001") else {return XCTFail()} - var options = Web3Options.defaultOptions() - options.from = keystoreV3.addresses?.first - options.gasPrice = gasPriceRinkeby - guard case .success(let gasEstimate) = intermediate.estimateGas(options: options) else {return XCTFail()} - options.gasLimit = gasEstimate + 1234 - guard case .success(let assembled) = intermediate.assemble(options: options) else {return XCTFail()} - XCTAssert(assembled.gasLimit == options.gasLimit) + guard let writeTX = web3Rinkeby.eth.sendETH(to: sendToAddress, amount: "0.001") else {return XCTFail()} + writeTX.transactionOptions.from = keystoreV3.addresses?.first + writeTX.transactionOptions.gasPrice = .manual(gasPriceRinkeby) + let gasEstimate = try writeTX.estimateGasPromise().wait() + writeTX.transactionOptions.gasLimit = .manual(gasEstimate + 1234) + let assembled = try writeTX.assemblePromise().wait() + XCTAssert(assembled.gasLimit == gasEstimate + 1234) } - func testProperGasPrice() { + func testProperGasPrice() throws { guard let keystoreData = getKeystoreData() else {return XCTFail()} guard let keystoreV3 = EthereumKeystoreV3.init(keystoreData) else {return XCTFail()} let web3Rinkeby = Web3.InfuraRinkebyWeb3() let keystoreManager = KeystoreManager.init([keystoreV3]) web3Rinkeby.addKeystoreManager(keystoreManager) - guard case .success(let gasPriceRinkeby) = web3Rinkeby.eth.getGasPrice() else {return XCTFail()} + let gasPriceRinkeby = try web3Rinkeby.eth.getGasPrice() let sendToAddress = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! - guard let intermediate = web3Rinkeby.eth.sendETH(to: sendToAddress, amount: "0.001") else {return XCTFail()} - var options = Web3Options.defaultOptions() - options.from = keystoreV3.addresses?.first - options.gasPrice = gasPriceRinkeby * 2 - guard case .success(let gasEstimate) = intermediate.estimateGas(options: options) else {return XCTFail()} - options.gasLimit = gasEstimate + 1234 - guard case .success(let assembled) = intermediate.assemble(options: options) else {return XCTFail()} - XCTAssert(assembled.gasLimit == options.gasLimit) - XCTAssert(assembled.gasPrice == options.gasPrice) + guard let writeTX = web3Rinkeby.eth.sendETH(to: sendToAddress, amount: "0.001") else {return XCTFail()} + writeTX.transactionOptions.from = keystoreV3.addresses?.first + writeTX.transactionOptions.gasPrice = .manual(gasPriceRinkeby * 2) + let gasEstimate = try writeTX.estimateGasPromise().wait() + writeTX.transactionOptions.gasLimit = .manual(gasEstimate + 1234) + let assembled = try writeTX.assemblePromise().wait() + XCTAssert(assembled.gasLimit == gasEstimate + 1234) + XCTAssert(assembled.gasPrice == gasPriceRinkeby * 2) } - func testParseTransactionDetailsForContractCreation() { + func testParseTransactionDetailsForContractCreation() throws { let web3 = Web3.InfuraMainnetWeb3() - let details = web3.eth.getTransactionDetails("0x1c85b9b7f7c2cbdb3fa264f6b78b226360aa2084c48cf7869b756e0762bd851b") - switch details { - case .success(let details): - print(details) - XCTAssert(details.transaction.to == .contractDeploymentAddress()) - case .failure(let error): - print(error) - XCTFail() - } - let receipt = web3.eth.getTransactionReceipt("0x1c85b9b7f7c2cbdb3fa264f6b78b226360aa2084c48cf7869b756e0762bd851b") - switch receipt { - case .success(let receipt): - print(receipt) - XCTAssert(receipt.contractAddress != nil) - case .failure(let error): - print(error) - XCTFail() - } + let details = try web3.eth.getTransactionDetails("0x1c85b9b7f7c2cbdb3fa264f6b78b226360aa2084c48cf7869b756e0762bd851b") + print(details) + XCTAssert(details.transaction.to == .contractDeploymentAddress()) + let receipt = try web3.eth.getTransactionReceipt("0x1c85b9b7f7c2cbdb3fa264f6b78b226360aa2084c48cf7869b756e0762bd851b") + print(receipt) + XCTAssert(receipt.contractAddress != nil) } - func testNonBatchedRequest() { + func testNonBatchedRequest() throws { let web3 = Web3.InfuraMainnetWeb3() let address = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! web3.requestDispatcher.policy = .NoBatching - let balanceResult = web3.eth.getBalance(address: address) - switch balanceResult { - case .success(let bal): - print(bal) - case .failure(let error): - print(error) - XCTFail() - } + let balanceResult = try web3.eth.getBalance(address: address) + print(balanceResult) } } diff --git a/web3swiftTests/web3swift_infura_Tests.swift b/web3swiftTests/web3swift_infura_Tests.swift index 7b9dcf70a..292a8a569 100755 --- a/web3swiftTests/web3swift_infura_Tests.swift +++ b/web3swiftTests/web3swift_infura_Tests.swift @@ -7,87 +7,68 @@ // import XCTest +import EthereumAddress @testable import web3swift_iOS class web3swift_infura_Tests: XCTestCase { func testGetBalance() { - let web3 = Web3.InfuraMainnetWeb3() - let address = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! - let response = web3.eth.getBalance(address: address) - switch response { - case .failure(_): - XCTFail() - case .success(let result): - let balance = result + do { + let web3 = Web3.InfuraMainnetWeb3() + let address = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! + let balance = try web3.eth.getBalance(address: address) let balString = Web3.Utils.formatToEthereumUnits(balance, toUnits: .eth, decimals: 3) - print(balString) + print(balString!) + } catch { + XCTFail() } } func testGetBlockByHash() { - let web3 = Web3.InfuraMainnetWeb3() - let response = web3.eth.getBlockByHash("0x6d05ba24da6b7a1af22dc6cc2a1fe42f58b2a5ea4c406b19c8cf672ed8ec0695", fullTransactions: true) - switch response { - case .failure(_): - XCTFail() - case .success(let result): + do { + let web3 = Web3.InfuraMainnetWeb3() + let result = try web3.eth.getBlockByHash("0x6d05ba24da6b7a1af22dc6cc2a1fe42f58b2a5ea4c406b19c8cf672ed8ec0695", fullTransactions: true) print(result) + } catch { + XCTFail() } } - func testGetBlockByNumber1() { + func testGetBlockByNumber1() throws { let web3 = Web3.InfuraMainnetWeb3() - let response = web3.eth.getBlockByNumber("latest", fullTransactions: true) - switch response { - case .failure(_): - XCTFail() - case .success(let result): - print(result) - } + let result = try web3.eth.getBlockByNumber("latest", fullTransactions: true) + print(result) } - func testGetBlockByNumber2() { + func testGetBlockByNumber2() throws { let web3 = Web3.InfuraMainnetWeb3() - let response = web3.eth.getBlockByNumber(UInt64(5184323), fullTransactions: true) - switch response { - case .failure(_): - XCTFail() - case .success(let result): - print(result) - let transactions = result.transactions - for transaction in transactions { - switch transaction { - case .transaction(let tx): - print(String(describing: tx)) - default: - break - } + let result = try web3.eth.getBlockByNumber(UInt64(5184323), fullTransactions: true) + print(result) + let transactions = result.transactions + for transaction in transactions { + switch transaction { + case .transaction(let tx): + print(String(describing: tx)) + default: + break } } } func testGetBlockByNumber3() { - let web3 = Web3.InfuraMainnetWeb3() - let response = web3.eth.getBlockByNumber(UInt64(1000000000), fullTransactions: true) - switch response { - case .failure(_): - break - case .success(_): + do { + let web3 = Web3.InfuraMainnetWeb3() + let _ = try web3.eth.getBlockByNumber(UInt64(1000000000), fullTransactions: true) XCTFail() + } catch { + } } - func testGasPrice() { + func testGasPrice() throws { let web3 = Web3.InfuraMainnetWeb3() - let result = web3.eth.getGasPrice() - switch result { - case .failure(let error): - print(error) - XCTFail() - case .success(let response): - print(response) - } + let response = try web3.eth.getGasPrice() + print(response) } From df91e11867b3ed65fc635650257a3ffa083cf155 Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Tue, 30 Oct 2018 01:24:20 +0300 Subject: [PATCH 09/23] more tests passing --- web3swift.xcodeproj/project.pbxproj | 12 +- web3swift/Web3/Classes/Web3+Utils.swift | 6 +- web3swiftTests/scrypt_Tests.swift | 68 -------- .../web3swift_AdvancedABIv2_Tests.swift | 9 +- web3swiftTests/web3swift_EIP67_Tests.swift | 9 +- web3swiftTests/web3swift_EIP681_Tests.swift | 8 +- web3swiftTests/web3swift_ENS_Tests.swift | 10 +- .../web3swift_ERC20_Class_Tests.swift | 9 +- web3swiftTests/web3swift_ERC20_Tests.swift | 145 ++---------------- web3swiftTests/web3swift_ObjC_Tests.swift | 9 +- web3swiftTests/web3swift_RLP_Tests.swift | 9 +- web3swiftTests/web3swift_Tests.swift | 8 +- web3swiftTests/web3swift_User_cases.swift | 8 +- .../web3swift_contractV2_Tests.swift | 32 ---- web3swiftTests/web3swift_infura_Tests.swift | 9 +- .../web3swift_keystores_Tests.swift | 8 +- .../web3swift_local_node_Tests.swift | 13 +- ...web3swift_numberFormattingUtil_Tests.swift | 9 +- web3swiftTests/web3swift_promises_Tests.swift | 8 +- .../web3swift_remoteParsing_Tests.swift | 11 +- ...wift_rinkeby_personalSignature_Tests.swift | 9 +- .../web3swift_transactions_Tests.swift | 142 ++++------------- 22 files changed, 110 insertions(+), 441 deletions(-) delete mode 100755 web3swiftTests/scrypt_Tests.swift delete mode 100755 web3swiftTests/web3swift_contractV2_Tests.swift diff --git a/web3swift.xcodeproj/project.pbxproj b/web3swift.xcodeproj/project.pbxproj index b97684f5c..3c5a512ee 100755 --- a/web3swift.xcodeproj/project.pbxproj +++ b/web3swift.xcodeproj/project.pbxproj @@ -84,6 +84,10 @@ 81909D1821862D5A007D2AE5 /* Web3+Eventloop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */; }; 81909D1921862D5A007D2AE5 /* Web3+Eventloop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */; }; 81909D1B2187B1FA007D2AE5 /* web3swift_User_cases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 815C74C720ECBF3E00DE2AC4 /* web3swift_User_cases.swift */; }; + 81909D1C2187BB67007D2AE5 /* web3swift_RLP_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7F20EA3CEA0030E0D6 /* web3swift_RLP_Tests.swift */; }; + 81909D1D2187BBAE007D2AE5 /* web3swift_ERC20_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7B20EA37B50030E0D6 /* web3swift_ERC20_Tests.swift */; }; + 81909D1E2187BC8B007D2AE5 /* web3swift_transactions_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7920EA355D0030E0D6 /* web3swift_transactions_Tests.swift */; }; + 81909D1F2187BD20007D2AE5 /* web3swift_numberFormattingUtil_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5AE220EA69B900DC7F32 /* web3swift_numberFormattingUtil_Tests.swift */; }; 81A1821520D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821620D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821A20D5A6F70016741F /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */; }; @@ -207,7 +211,6 @@ 5B83FA95B72D7DA53870479B /* Pods-web3swift-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-web3swift-macOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig"; sourceTree = ""; }; 68360683136B1FE2C57D65D9 /* Pods_Web3Swift_ios_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Web3Swift_ios_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 740EB523E2A6AEE0C6916C71 /* Pods_Web3Swift_osx_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Web3Swift_osx_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8102F5C2211E00820032DF60 /* scrypt_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = scrypt_Tests.swift; sourceTree = ""; }; 8103BBCB2077B84400499769 /* PlainKeystore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlainKeystore.swift; sourceTree = ""; }; 8104E2271FE82BDC00F952CB /* Web3+Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+Utils.swift"; sourceTree = ""; }; 810B0F991FEC446B00CF0DA2 /* Web3+JSONRPC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+JSONRPC.swift"; sourceTree = ""; }; @@ -317,7 +320,6 @@ E23B5ADC20EA685D00DC7F32 /* web3swift_EIP67_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_EIP67_Tests.swift; sourceTree = ""; }; E23B5AE020EA695400DC7F32 /* web3swift_rinkeby_personalSignature_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_rinkeby_personalSignature_Tests.swift; sourceTree = ""; }; E23B5AE220EA69B900DC7F32 /* web3swift_numberFormattingUtil_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_numberFormattingUtil_Tests.swift; sourceTree = ""; }; - E23B5AE420EA6A0A00DC7F32 /* web3swift_contractV2_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_contractV2_Tests.swift; sourceTree = ""; }; E2C590752152835400FF53D3 /* JSONRPCrequestDispatcher+ObjC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "JSONRPCrequestDispatcher+ObjC.swift"; sourceTree = ""; }; E2E94C5F217788E0005F54A0 /* Web3+ERC721.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+ERC721.swift"; sourceTree = ""; }; FB43EC035C593F9E5A3644B6 /* Pods-web3swift-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-web3swift-macOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig"; sourceTree = ""; }; @@ -414,7 +416,6 @@ 81A7B2892143DF1D004CD2C7 /* web3swift_EIP681_Tests.swift */, 81A7B2782143C978004CD2C7 /* web3swift_ENS_Tests.swift */, 8159C50D2135901700197B91 /* web3swift_ERC20_Class_Tests.swift */, - 8102F5C2211E00820032DF60 /* scrypt_Tests.swift */, 81FECD5D211AEFCE006DA367 /* web3swift_ObjC_Tests.swift */, 815C74C720ECBF3E00DE2AC4 /* web3swift_User_cases.swift */, 00E5FE8120EA3FF40030E0D6 /* web3swift_infura_Tests.swift */, @@ -431,7 +432,6 @@ E23B5ADC20EA685D00DC7F32 /* web3swift_EIP67_Tests.swift */, E23B5AE020EA695400DC7F32 /* web3swift_rinkeby_personalSignature_Tests.swift */, E23B5AE220EA69B900DC7F32 /* web3swift_numberFormattingUtil_Tests.swift */, - E23B5AE420EA6A0A00DC7F32 /* web3swift_contractV2_Tests.swift */, ); path = web3swiftTests; sourceTree = ""; @@ -1067,7 +1067,11 @@ buildActionMask = 2147483647; files = ( 00E5FE8220EA3FF40030E0D6 /* web3swift_infura_Tests.swift in Sources */, + 81909D1D2187BBAE007D2AE5 /* web3swift_ERC20_Tests.swift in Sources */, + 81909D1C2187BB67007D2AE5 /* web3swift_RLP_Tests.swift in Sources */, 81909D1B2187B1FA007D2AE5 /* web3swift_User_cases.swift in Sources */, + 81909D1F2187BD20007D2AE5 /* web3swift_numberFormattingUtil_Tests.swift in Sources */, + 81909D1E2187BC8B007D2AE5 /* web3swift_transactions_Tests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/web3swift/Web3/Classes/Web3+Utils.swift b/web3swift/Web3/Classes/Web3+Utils.swift index 2d8cd1dff..bfa1cf8d6 100755 --- a/web3swift/Web3/Classes/Web3+Utils.swift +++ b/web3swift/Web3/Classes/Web3+Utils.swift @@ -713,7 +713,11 @@ extension Web3.Utils { } else { remainingDigits = String(fullPaddedRemainder[firstDigit+1 ..< fullPaddedRemainder.count]) } - fullRemainder = firstDecimalUnit + decimalSeparator + remainingDigits + if remainingDigits != "" { + fullRemainder = firstDecimalUnit + decimalSeparator + remainingDigits + } else { + fullRemainder = firstDecimalUnit + } firstDigit = firstDigit + 1; break } diff --git a/web3swiftTests/scrypt_Tests.swift b/web3swiftTests/scrypt_Tests.swift deleted file mode 100755 index 21f6531e9..000000000 --- a/web3swiftTests/scrypt_Tests.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// scrypt_Tests.swift -// web3swift-iOS_Tests -// -// Created by Alexander Vlasov on 10.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation -import XCTest -import CryptoSwift - -@testable import web3swift_iOS - -class scrypt_Tests: XCTestCase { - - func testScrypt() { - let password = Array("password".data(using: .ascii)!) - let salt = Array("NaCl".data(using: .ascii)!) - let deriver = try! Scrypt.init(password: password, salt: salt, dkLen: 64, N: 1024, r: 8, p: 16) - let derived = try! deriver.calculate() - let expected: [UInt8] = Array.init(hex: """ - fd ba be 1c 9d 34 72 00 78 56 e7 19 0d 01 e9 fe - 7c 6a d7 cb c8 23 78 30 e7 73 76 63 4b 37 31 62 - 2e af 30 d9 2e 22 a3 88 6f f1 09 27 9d 98 30 da - c7 27 af b9 4a 83 ee 6d 83 60 cb df a2 cc 06 40 -""".replacingOccurrences(of: " ", with: "").replacingOccurrences(of: "\n", with: "").replacingOccurrences(of: "\t", with: "")) - XCTAssertEqual(derived, expected) - } - - func testProfilerRun() { - // N: Int = 4096, R: Int = 6, P: Int = 1 - let password = Array("web3swift".data(using: .ascii)!) - let salt = Array(Data.randomBytes(length: 32)!) - let deriver = try! Scrypt(password: password, salt: salt, dkLen: 32, N: 4096, r: 6, p: 1) - let _ = try! deriver.calculate() - } - - func testReplacement() { - for _ in 0 ..< 5 { - // N: Int = 4096, R: Int = 6, P: Int = 1 - let password = "web3swift" - let salt = Data.randomBytes(length: 32)! - let derivedFromLibsodium = scrypt(password: password, salt: salt, length: 32, N: 4096, R: 6, P: 1)!.bytes - let deriver = try! Scrypt(password: Array(password.data(using: .ascii)!), salt: Array(salt), dkLen: 32, N: 4096, r: 6, p: 1) - let derived = try! deriver.calculate() - XCTAssertEqual(Array(derivedFromLibsodium), derived) - } - } - - func testLibsodiumPerformance() { - let password = "web3swift" - let salt = Data.randomBytes(length: 32)! - self.measure { - let _ = scrypt(password: password, salt: salt, length: 32, N: 4096, R: 6, P: 1)!.bytes - } - } - - func testNativePerformance() { - let password = "web3swift" - let salt = Data.randomBytes(length: 32)! - let deriver = try! Scrypt(password: password.data(using: .ascii)!.bytes, salt: salt.bytes, dkLen: 32, N: 4096, r: 6, p: 1) - self.measure { - let _ = try! deriver.calculate() - } - } - -} diff --git a/web3swiftTests/web3swift_AdvancedABIv2_Tests.swift b/web3swiftTests/web3swift_AdvancedABIv2_Tests.swift index 6234bfd3e..93a15adfc 100755 --- a/web3swiftTests/web3swift_AdvancedABIv2_Tests.swift +++ b/web3swiftTests/web3swift_AdvancedABIv2_Tests.swift @@ -1,15 +1,12 @@ +// web3swift // -// web3swift_AdvancedABIv2_Tests.swift -// web3swift-iOS_Tests -// -// Created by Anton Grigoriev on 02.07.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest import CryptoSwift import BigInt -import Result @testable import web3swift_iOS diff --git a/web3swiftTests/web3swift_EIP67_Tests.swift b/web3swiftTests/web3swift_EIP67_Tests.swift index 69471c890..90b10f2a5 100755 --- a/web3swiftTests/web3swift_EIP67_Tests.swift +++ b/web3swiftTests/web3swift_EIP67_Tests.swift @@ -1,15 +1,12 @@ +// web3swift // -// web3swift_EIP67_Tests.swift -// web3swift-iOS_Tests -// -// Created by Anton Grigoriev on 02.07.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest import CryptoSwift import BigInt -import Result @testable import web3swift_iOS diff --git a/web3swiftTests/web3swift_EIP681_Tests.swift b/web3swiftTests/web3swift_EIP681_Tests.swift index db2e3a1dd..6a79533b9 100644 --- a/web3swiftTests/web3swift_EIP681_Tests.swift +++ b/web3swiftTests/web3swift_EIP681_Tests.swift @@ -1,9 +1,7 @@ +// web3swift // -// web3swift_EIP681_Tests.swift -// web3swift-iOS_Tests -// -// Created by Alex Vlasov on 08.09.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest diff --git a/web3swiftTests/web3swift_ENS_Tests.swift b/web3swiftTests/web3swift_ENS_Tests.swift index 685f82a4a..1ec86aa36 100644 --- a/web3swiftTests/web3swift_ENS_Tests.swift +++ b/web3swiftTests/web3swift_ENS_Tests.swift @@ -1,13 +1,13 @@ +// web3swift // -// web3swift_ENS_Tests.swift -// web3swift-iOS_Tests -// -// Created by Alex Vlasov on 08.09.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest + @testable import web3swift_iOS + class web3swift_ENS_Tests: XCTestCase { func testDomainNormalization() { diff --git a/web3swiftTests/web3swift_ERC20_Class_Tests.swift b/web3swiftTests/web3swift_ERC20_Class_Tests.swift index ea66260a6..ca1e3c009 100644 --- a/web3swiftTests/web3swift_ERC20_Class_Tests.swift +++ b/web3swiftTests/web3swift_ERC20_Class_Tests.swift @@ -1,14 +1,11 @@ +// web3swift // -// web3swift_ERC20_Class_Tests.swift -// web3swift-iOS_Tests -// -// Created by Alex Vlasov on 28.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest import BigInt -import Result @testable import web3swift_iOS diff --git a/web3swiftTests/web3swift_ERC20_Tests.swift b/web3swiftTests/web3swift_ERC20_Tests.swift index f2eb67dd1..58b4d0b01 100755 --- a/web3swiftTests/web3swift_ERC20_Tests.swift +++ b/web3swiftTests/web3swift_ERC20_Tests.swift @@ -1,154 +1,39 @@ +// web3swift // -// web3swiftERC20Tests.swift -// web3swift-iOS_Tests -// -// Created by Георгий Фесенко on 02/07/2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest import BigInt +import EthereumAddress @testable import web3swift_iOS class web3swift_ERC20_Tests: XCTestCase { - func testERC20EncodeUsingABIv2() { - let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"name\":\"_tokenName\",\"type\":\"string\"},{\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},]" - do { - let jsonData = jsonString.data(using: .utf8) - let abi = try JSONDecoder().decode([ABIv2.Record].self, from: jsonData!) - let abiNative = try abi.map({ (record) -> ABIv2.Element in - return try record.parse() - }) - let method = abiNative.filter({ (element) -> Bool in - switch element { - case .function(let function): - return function.name == "transfer" - default: - return false - } - }) - let address = "0xE6877A4d8806e9A9F12eB2e8561EA6c1db19978d" - let amount = BigUInt(10).power(18) - let parameters = [address, amount] as [AnyObject] - let result = method[0].encodeParameters(parameters) - print(abiNative) - let hex = result!.toHexString() - print(hex) - XCTAssert(hex == "a9059cbb000000000000000000000000e6877a4d8806e9a9f12eb2e8561ea6c1db19978d0000000000000000000000000000000000000000000000000de0b6b3a7640000", "Failed to encode ERC20") - let dummyTrue = BigUInt(1).abiEncode(bits: 256) - let data = dummyTrue! - let decoded = method[0].decodeReturnData(data) - let ret1 = decoded!["0"] as? Bool - let ret2 = decoded!["success"] as? Bool - XCTAssert(ret1 == true, "Failed to encode ERC20") - XCTAssert(ret2 == true, "Failed to encode ERC20") - } catch { - print(error) - XCTFail() - } - } - - func testERC20balanceUsingABIv2() { - let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"name\":\"_tokenName\",\"type\":\"string\"},{\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},]" - do { - let jsonData = jsonString.data(using: .utf8) - let abi = try JSONDecoder().decode([ABIv2.Record].self, from: jsonData!) - let abiNative = try abi.map({ (record) -> ABIv2.Element in - return try record.parse() - }) - let constractAddress = EthereumAddress("0x86fa049857e0209aa7d9e616f7eb3b3b78ecfdb0")! - let contract = ContractV2(abi: abiNative, at: constractAddress) - let options = Web3Options.defaultOptions() - let address = "0xd0a6e6c54dbc68db5db3a091b171a77407ff7ccf" - let parameters = [address] as [AnyObject] - let transaction = contract.method("balanceOf", parameters:parameters, options: options) - XCTAssert(transaction != nil, "Failed plasma funding transaction") - let requestDictionary = transaction!.encodeAsDictionary(from: EthereumAddress("0xE6877A4d8806e9A9F12eB2e8561EA6c1db19978d")!) - XCTAssert(requestDictionary != nil, "Can't read ERC20 balance") - } catch { - print(error) - } - } - - func testERC20nameUsingABIv2() { - let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"name\":\"_tokenName\",\"type\":\"string\"},{\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},]" - do { - let jsonData = jsonString.data(using: .utf8) - let abi = try JSONDecoder().decode([ABIv2.Record].self, from: jsonData!) - let abiNative = try abi.map({ (record) -> ABIv2.Element in - return try record.parse() - }) - let method = abiNative.filter({ (element) -> Bool in - switch element { - case .function(let function): - return function.name == "name" - default: - return false - } - }) - let resultData = Data.fromHex("0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a534f4e4d20546f6b656e00000000000000000000000000000000000000000000") - let result = method[0].decodeReturnData(resultData!) - let res = result!["0"] as! String - XCTAssert(res == "SONM Token", "Failed to create ERC20 name transaction") - } catch { - XCTFail() - print(error) - } - } - - func testInfuraERC20name() { + func testInfuraERC20name() throws { let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"name\":\"_tokenName\",\"type\":\"string\"},{\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},]" let web3 = Web3.InfuraMainnetWeb3() let contractAddress = EthereumAddress("0x8932404A197D84Ec3Ea55971AADE11cdA1dddff1") let contract = web3.contract(jsonString, at: contractAddress) XCTAssert(contract != nil, "Failed to create ERC20 contract from ABI") - var options = Web3Options.defaultOptions() - options.from = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901") - let parameters = [] as [AnyObject] - let transactionIntermediate = contract?.method("name", parameters:parameters, options: options) - let result = transactionIntermediate!.call(options: options) - switch result { - case .failure(let error): - print(error) - XCTFail() - case .success(let response): - let name = response["0"] as? String - XCTAssert(name == "web3swift", "Failed to create ERC20 name transaction") - } - } - - func testInfuraERC20nameUsingABIv2() { - let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"name\":\"_tokenName\",\"type\":\"string\"},{\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},]" - let web3 = Web3.InfuraMainnetWeb3() - let contractAddress = EthereumAddress("0x8932404A197D84Ec3Ea55971AADE11cdA1dddff1") - let contract = web3.contract(jsonString, at: contractAddress,abiVersion: 2) - XCTAssert(contract != nil, "Failed to create ERC20 contract from ABI") - var options = Web3Options.defaultOptions() - options.from = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901") let parameters = [] as [AnyObject] - let transactionIntermediate = contract?.method("name", parameters:parameters, options: options) - let result = transactionIntermediate!.call(options: options) - switch result { - case .failure(let error): - print(error) - XCTFail() - case .success(let response): - let name = response["0"] as? String - XCTAssert(name == "web3swift", "Failed to create ERC20 name transaction") - print("Token name = " + name!) - } + let readTX = contract!.read("name", parameters:parameters)! + readTX.transactionOptions.from = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901") + let response = try readTX.callPromise().wait() + let name = response["0"] as? String + XCTAssert(name == "web3swift", "Failed to create ERC20 name transaction") } - func testERC20tokenBalance() { + func testERC20tokenBalance() throws { let web3 = Web3.InfuraMainnetWeb3() let contract = web3.contract(Web3.Utils.erc20ABI, at: EthereumAddress("0x8932404A197D84Ec3Ea55971AADE11cdA1dddff1")!, abiVersion: 2) - var options = Web3Options(); - options.from = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! let addressOfUser = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! - guard let tokenBalanceResult = contract?.method("balanceOf", parameters: [addressOfUser] as [AnyObject], options: options)?.call(options: nil) else {return XCTFail()} - guard case .success(let tokenBalance) = tokenBalanceResult, let bal = tokenBalance["0"] as? BigUInt else {return XCTFail()} + guard let readTX = contract?.read("balanceOf", parameters: [addressOfUser] as [AnyObject]) else {return XCTFail()} + readTX.transactionOptions.from = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! + let tokenBalance = try readTX.callPromise().wait() + guard let bal = tokenBalance["0"] as? BigUInt else {return XCTFail()} print(String(bal)) } diff --git a/web3swiftTests/web3swift_ObjC_Tests.swift b/web3swiftTests/web3swift_ObjC_Tests.swift index 7f123a7ba..5a1866b10 100755 --- a/web3swiftTests/web3swift_ObjC_Tests.swift +++ b/web3swiftTests/web3swift_ObjC_Tests.swift @@ -1,12 +1,11 @@ +// web3swift // -// web3swift_ObjC_Tests.swift -// web3swift-iOS_Tests -// -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest + @testable import web3swift_iOS class web3swift_ObjC_Tests: XCTestCase { diff --git a/web3swiftTests/web3swift_RLP_Tests.swift b/web3swiftTests/web3swift_RLP_Tests.swift index 19280ec40..b72eff7cc 100755 --- a/web3swiftTests/web3swift_RLP_Tests.swift +++ b/web3swiftTests/web3swift_RLP_Tests.swift @@ -1,15 +1,14 @@ +// web3swift // -// web3swiftRLPTests.swift -// web3swift-iOS_Tests -// -// Created by Георгий Фесенко on 02/07/2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest import BigInt @testable import web3swift_iOS + class web3swift_RLP_Tests: XCTestCase { func testRLPdecodeTransaction() { diff --git a/web3swiftTests/web3swift_Tests.swift b/web3swiftTests/web3swift_Tests.swift index e6fbfedb8..9f1f4c9f3 100755 --- a/web3swiftTests/web3swift_Tests.swift +++ b/web3swiftTests/web3swift_Tests.swift @@ -1,9 +1,7 @@ +// web3swift // -// web3swiftTests.swift -// web3swiftTests -// -// Created by Alexander Vlasov on 04.12.2017. -// Copyright © 2017 Alexander Vlasov. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // diff --git a/web3swiftTests/web3swift_User_cases.swift b/web3swiftTests/web3swift_User_cases.swift index 3945fc830..cd3f34f3e 100755 --- a/web3swiftTests/web3swift_User_cases.swift +++ b/web3swiftTests/web3swift_User_cases.swift @@ -1,9 +1,7 @@ +// web3swift // -// web3swift_User_cases.swift -// web3swift-iOS_Tests -// -// Created by Alexander Vlasov on 04.07.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest diff --git a/web3swiftTests/web3swift_contractV2_Tests.swift b/web3swiftTests/web3swift_contractV2_Tests.swift deleted file mode 100755 index 495aa1c3c..000000000 --- a/web3swiftTests/web3swift_contractV2_Tests.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// web3swift_contractV2_Tests.swift -// web3swift-iOS_Tests -// -// Created by Антон Григорьев on 02.07.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import XCTest -import CryptoSwift -import BigInt -import Result - -@testable import web3swift_iOS - -class web3swift_contractV2_Tests: XCTestCase { - - func testDecodeInputData() { - let contract = ContractV2.init(Web3.Utils.erc20ABI)! - let dataToDecode = Data.fromHex("0xa9059cbb000000000000000000000000cdd45864e794fe5e3e1b0045b77e62f4c43b8bd9000000000000000000000000000000000000000000000224b5f018c3e30142d5")! - let decoded = contract.decodeInputData("transfer", data: dataToDecode) - XCTAssert(decoded!["_to"] as? EthereumAddress == EthereumAddress("0xcdd45864e794fe5e3e1b0045b77e62f4c43b8bd9")!) - } - - func testDecodeInputDataWithoutMethodName() { - let contract = ContractV2.init(Web3.Utils.erc20ABI)! - let dataToDecode = Data.fromHex("0xa9059cbb000000000000000000000000cdd45864e794fe5e3e1b0045b77e62f4c43b8bd9000000000000000000000000000000000000000000000224b5f018c3e30142d5")! - let decoded = contract.decodeInputData(dataToDecode) - XCTAssert(decoded!["_to"] as? EthereumAddress == EthereumAddress("0xcdd45864e794fe5e3e1b0045b77e62f4c43b8bd9")!) - } - -} diff --git a/web3swiftTests/web3swift_infura_Tests.swift b/web3swiftTests/web3swift_infura_Tests.swift index 292a8a569..468780684 100755 --- a/web3swiftTests/web3swift_infura_Tests.swift +++ b/web3swiftTests/web3swift_infura_Tests.swift @@ -1,15 +1,14 @@ +// web3swift // -// web3swiftInfuraTests.swift -// web3swift-iOS_Tests -// -// Created by Георгий Фесенко on 02/07/2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest import EthereumAddress @testable import web3swift_iOS + class web3swift_infura_Tests: XCTestCase { func testGetBalance() { diff --git a/web3swiftTests/web3swift_keystores_Tests.swift b/web3swiftTests/web3swift_keystores_Tests.swift index 866990ffc..b1abc3c3a 100755 --- a/web3swiftTests/web3swift_keystores_Tests.swift +++ b/web3swiftTests/web3swift_keystores_Tests.swift @@ -1,9 +1,7 @@ +// web3swift // -// web3swiftKyestoresTests.swift -// web3swift-iOS_Tests -// -// Created by Георгий Фесенко on 02/07/2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest diff --git a/web3swiftTests/web3swift_local_node_Tests.swift b/web3swiftTests/web3swift_local_node_Tests.swift index ce3cf74bb..0b30a553b 100755 --- a/web3swiftTests/web3swift_local_node_Tests.swift +++ b/web3swiftTests/web3swift_local_node_Tests.swift @@ -1,16 +1,13 @@ -//// -//// web3swift_local_node_Tests.swift -//// web3swift-iOS_Tests -//// -//// Created by Petr Korolev on 16/04/2018. -//// Copyright © 2018 Bankex Foundation. All rights reserved. -//// +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// import XCTest import CryptoSwift import BigInt -import Result @testable import web3swift_iOS diff --git a/web3swiftTests/web3swift_numberFormattingUtil_Tests.swift b/web3swiftTests/web3swift_numberFormattingUtil_Tests.swift index 5e981e17d..a912576fe 100755 --- a/web3swiftTests/web3swift_numberFormattingUtil_Tests.swift +++ b/web3swiftTests/web3swift_numberFormattingUtil_Tests.swift @@ -1,15 +1,12 @@ +// web3swift // -// web3swift_numberFormattingUtil_Tests.swift -// web3swift-iOS_Tests -// -// Created by Антон Григорьев on 02.07.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest import CryptoSwift import BigInt -import Result @testable import web3swift_iOS diff --git a/web3swiftTests/web3swift_promises_Tests.swift b/web3swiftTests/web3swift_promises_Tests.swift index 478ab302a..c10b8f150 100755 --- a/web3swiftTests/web3swift_promises_Tests.swift +++ b/web3swiftTests/web3swift_promises_Tests.swift @@ -1,9 +1,7 @@ +// web3swift // -// web3swift_promises_Tests.swift -// web3swift-iOS_Tests -// -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest diff --git a/web3swiftTests/web3swift_remoteParsing_Tests.swift b/web3swiftTests/web3swift_remoteParsing_Tests.swift index 8c7cfe92c..603a25233 100755 --- a/web3swiftTests/web3swift_remoteParsing_Tests.swift +++ b/web3swiftTests/web3swift_remoteParsing_Tests.swift @@ -1,17 +1,12 @@ +// web3swift // -// web3swift_remote_Tests.swift -// web3swift-iOS_Tests +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // -// Created by Petr Korolev on 17/04/2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - - import XCTest import CryptoSwift import BigInt -import Result @testable import web3swift_iOS diff --git a/web3swiftTests/web3swift_rinkeby_personalSignature_Tests.swift b/web3swiftTests/web3swift_rinkeby_personalSignature_Tests.swift index d0a659c22..55cf179a6 100755 --- a/web3swiftTests/web3swift_rinkeby_personalSignature_Tests.swift +++ b/web3swiftTests/web3swift_rinkeby_personalSignature_Tests.swift @@ -1,15 +1,12 @@ +// web3swift // -// web3swift_personal_signature_Tests.swift -// web3swift-iOS_Tests -// -// Created by Anton Grigoriev on 02.07.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest import CryptoSwift import BigInt -import Result import secp256k1_swift @testable import web3swift_iOS diff --git a/web3swiftTests/web3swift_transactions_Tests.swift b/web3swiftTests/web3swift_transactions_Tests.swift index 6a0ef9847..1109764ef 100755 --- a/web3swiftTests/web3swift_transactions_Tests.swift +++ b/web3swiftTests/web3swift_transactions_Tests.swift @@ -1,15 +1,13 @@ +// web3swift // -// web3swiftTransactionsTests.swift -// web3swift-iOS_Tests -// -// Created by Георгий Фесенко on 02/07/2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import XCTest import CryptoSwift import BigInt -import Result +import EthereumAddress @testable import web3swift_iOS @@ -46,51 +44,37 @@ class web3swift_transactions_Tests: XCTestCase { } func testEthSendExample() { - let web3 = Web3.InfuraMainnetWeb3() - let sendToAddress = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! - let tempKeystore = try! EthereumKeystoreV3(password: "") - let keystoreManager = KeystoreManager([tempKeystore!]) - web3.addKeystoreManager(keystoreManager) - let contract = web3.contract(Web3.Utils.coldWalletABI, at: sendToAddress, abiVersion: 2) - var options = Web3Options.defaultOptions() - options.value = Web3.Utils.parseToBigUInt("1.0", units: .eth) - options.from = keystoreManager.addresses?.first - let intermediate = contract?.method("fallback", options: options) - guard let result = intermediate?.send(password: "") else {return XCTFail()} - switch result { - case .success(_): - return XCTFail() - case .failure(let error): - print(error) - guard case .nodeError(let descr) = error else {return XCTFail()} + do { + let web3 = Web3.InfuraMainnetWeb3() + let sendToAddress = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! + let tempKeystore = try! EthereumKeystoreV3(password: "") + let keystoreManager = KeystoreManager([tempKeystore!]) + web3.addKeystoreManager(keystoreManager) + let contract = web3.contract(Web3.Utils.coldWalletABI, at: sendToAddress, abiVersion: 2) + let value = Web3.Utils.parseToBigUInt("1.0", units: .eth) + let from = keystoreManager.addresses?.first + let writeTX = contract!.write("fallback")! + writeTX.transactionOptions.from = from + writeTX.transactionOptions.value = value + let _ = try writeTX.sendPromise(password: "").wait() + } catch Web3Error.nodeError(let descr) { guard descr == "insufficient funds for gas * price + value" else {return XCTFail()} + } catch { + print(error) + XCTFail() } } - func testTransactionReceipt() { + func testTransactionReceipt() throws { let web3 = Web3.InfuraMainnetWeb3() - let result = web3.eth.getTransactionReceipt("0x83b2433606779fd756417a863f26707cf6d7b2b55f5d744a39ecddb8ca01056e") - switch result { - case .failure(let error): - print(error) - XCTFail() - case .success(let response): - print(response) - XCTAssert(response.status == .ok) - } + let response = try web3.eth.getTransactionReceipt("0x83b2433606779fd756417a863f26707cf6d7b2b55f5d744a39ecddb8ca01056e") + XCTAssert(response.status == .ok) } - func testTransactionDetails() { + func testTransactionDetails() throws { let web3 = Web3.InfuraMainnetWeb3() - let result = web3.eth.getTransactionDetails("0x127519412cefd773b952a5413a4467e9119654f59a34eca309c187bd9f3a195a") - switch result { - case .failure(let error): - print(error) - XCTFail() - case .success(let response): - print(response) - XCTAssert(response.transaction.gasLimit == BigUInt(78423)) - } + let response = try web3.eth.getTransactionDetails("0x127519412cefd773b952a5413a4467e9119654f59a34eca309c187bd9f3a195a") + XCTAssert(response.transaction.gasLimit == BigUInt(78423)) } @@ -100,76 +84,4 @@ class web3swift_transactions_Tests: XCTestCase { guard let data = NSData(contentsOfFile: path) else {return nil} return data as Data } - - func testSendETH() { - guard let keystoreData = getKeystoreData() else {return} - guard let keystoreV3 = EthereumKeystoreV3.init(keystoreData) else {return XCTFail()} - let web3Rinkeby = Web3.InfuraRinkebyWeb3() - let keystoreManager = KeystoreManager.init([keystoreV3]) - web3Rinkeby.addKeystoreManager(keystoreManager) - guard case .success(let gasPriceRinkeby) = web3Rinkeby.eth.getGasPrice() else {return} - let sendToAddress = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! - guard let intermediate = web3Rinkeby.eth.sendETH(to: sendToAddress, amount: "0.001") else {return XCTFail()} - var options = Web3Options.defaultOptions() - options.from = keystoreV3.addresses?.first - options.gasPrice = gasPriceRinkeby - let result = intermediate.send(password: "BANKEXFOUNDATION", options: options) - switch result { - case .success(let res): - print(res) - case .failure(let error): - print(error) - XCTFail() - } - } - - func testTokenBalanceTransferOnMainNet() { - // BKX TOKEN - let web3 = Web3.InfuraMainnetWeb3() - let coldWalletAddress = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! - let contractAddress = EthereumAddress("0x8932404A197D84Ec3Ea55971AADE11cdA1dddff1")! - var options = Web3Options() - options.from = coldWalletAddress - let tempKeystore = try! EthereumKeystoreV3(password: "") - let keystoreManager = KeystoreManager([tempKeystore!]) - web3.addKeystoreManager(keystoreManager) - let contract = web3.contract(Web3.Utils.erc20ABI, at: contractAddress, abiVersion: 2)! - let bkxBalanceSend = contract.method("transfer", parameters: [coldWalletAddress, BigUInt(1)] as [AnyObject], options: options)!.call(options: nil) - switch bkxBalanceSend { - case .success(let result): - print(result) - case .failure(let error): - print(error) - XCTFail() - } - } - - func testTokenBalanceTransferOnMainNetUsingConvenience() { - // BKX TOKEN - let web3 = Web3.InfuraMainnetWeb3() - let coldWalletAddress = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! - let contractAddress = EthereumAddress("0x8932404A197D84Ec3Ea55971AADE11cdA1dddff1")! - let tempKeystore = try! EthereumKeystoreV3(password: "") - let keystoreManager = KeystoreManager([tempKeystore!]) - web3.addKeystoreManager(keystoreManager) - let intermediate = web3.eth.sendERC20tokensWithNaturalUnits(tokenAddress:contractAddress, from: coldWalletAddress, to: coldWalletAddress, amount: "1.0") - let gasEstimate = intermediate!.estimateGas(options: nil) - switch gasEstimate { - case .success(let result): - print(result) - case .failure(let error): - print(error) - XCTFail() - } - var options = Web3Options(); - options.gasLimit = gasEstimate.value! - let bkxBalanceSend = intermediate!.call(options: options) - switch bkxBalanceSend { - case .success(let result): - print(result) - case .failure(let error): - print(error) - XCTFail() - } - } } From 56e5b508e4e4599a4827dba2b0c5bc8c66116007 Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Tue, 30 Oct 2018 13:06:27 +0300 Subject: [PATCH 10/23] - cleanup - everything is fixed except of ENS and objective C --- web3swift.podspec | 1 + web3swift.xcodeproj/project.pbxproj | 36 ++- .../Classes/BigUInt+Extensions.swift | 16 ++ .../HookedFunctions/Classes/Web3+Wallet.swift | 53 ++-- .../Classes/Web3+Eth+ObjC.swift | 6 +- .../ERC20/Web3+ERC20.swift | 169 ++++++------ .../ERC721/Web3+ERC721.swift | 160 +++++------- .../Promises/Classes/Promise+Batching.swift | 6 +- .../Classes/Promise+HttpProvider.swift | 6 +- ...omise+Web3+Contract+GetIndexedEvents.swift | 8 +- .../Classes/Promise+Web3+Eth+Call.swift | 8 +- .../Promise+Web3+Eth+EstimateGas.swift | 8 +- .../Promise+Web3+Eth+GetAccounts.swift | 13 +- .../Classes/Promise+Web3+Eth+GetBalance.swift | 6 +- .../Promise+Web3+Eth+GetBlockByHash.swift | 6 +- .../Promise+Web3+Eth+GetBlockByNumber.swift | 6 +- .../Promise+Web3+Eth+GetBlockNumber.swift | 6 +- .../Promise+Web3+Eth+GetGasPrice.swift | 6 +- ...Promise+Web3+Eth+GetTransactionCount.swift | 6 +- ...omise+Web3+Eth+GetTransactionDetails.swift | 6 +- ...omise+Web3+Eth+GetTransactionReceipt.swift | 6 +- .../Promise+Web3+Eth+SendRawTransaction.swift | 8 +- .../Promise+Web3+Eth+SendTransaction.swift | 6 +- .../Promise+Web3+Intermediate+Send.swift | 9 - .../Classes/Promise+Web3+Personal+Sign.swift | 6 +- .../Promise+Web3+Personal+UnlockAccount.swift | 6 +- .../Classes/Promise+Web3+TxPool.swift | 8 +- web3swift/Web3/Classes/Web3+EventParser.swift | 70 ++--- web3swift/Web3/Classes/Web3+Protocols.swift | 9 +- .../Classes/Web3+ReadingTransaction.swift | 8 + .../Web3+TransactionIntermediate.swift | 241 ------------------ .../web3swift_AdvancedABIv2_Tests.swift | 138 ++-------- .../web3swift_ERC20_Class_Tests.swift | 7 +- web3swiftTests/web3swift_Tests.swift | 14 +- web3swiftTests/web3swift_promises_Tests.swift | 64 +++-- .../web3swift_remoteParsing_Tests.swift | 53 ++-- ...wift_rinkeby_personalSignature_Tests.swift | 36 +-- 37 files changed, 395 insertions(+), 826 deletions(-) create mode 100644 web3swift/Convenience/Classes/BigUInt+Extensions.swift delete mode 100755 web3swift/Promises/Classes/Promise+Web3+Intermediate+Send.swift delete mode 100755 web3swift/Web3/Classes/Web3+TransactionIntermediate.swift diff --git a/web3swift.podspec b/web3swift.podspec index 019f3eb16..54f5fcc76 100755 --- a/web3swift.podspec +++ b/web3swift.podspec @@ -18,6 +18,7 @@ s.module_name = 'Web3swift' s.ios.deployment_target = "9.0" s.osx.deployment_target = "10.11" s.source_files = "web3swift/**/*.{h,swift}", +s.exclude_files = "web3swift/ObjectiveCbridge/Classes/*.{swift}", "web3swift/Utils/Classes/EIP681.swift", "web3swift/Utils/Classes/ENS.swift", "web3swift/Utils/Classes/ENSResolver.swift" s.public_header_files = "web3swift/**/*.{h}" s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } diff --git a/web3swift.xcodeproj/project.pbxproj b/web3swift.xcodeproj/project.pbxproj index 3c5a512ee..071b82d95 100755 --- a/web3swift.xcodeproj/project.pbxproj +++ b/web3swift.xcodeproj/project.pbxproj @@ -88,6 +88,19 @@ 81909D1D2187BBAE007D2AE5 /* web3swift_ERC20_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7B20EA37B50030E0D6 /* web3swift_ERC20_Tests.swift */; }; 81909D1E2187BC8B007D2AE5 /* web3swift_transactions_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7920EA355D0030E0D6 /* web3swift_transactions_Tests.swift */; }; 81909D1F2187BD20007D2AE5 /* web3swift_numberFormattingUtil_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5AE220EA69B900DC7F32 /* web3swift_numberFormattingUtil_Tests.swift */; }; + 81909D2121884893007D2AE5 /* BigUInt+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D2021884893007D2AE5 /* BigUInt+Extensions.swift */; }; + 81909D2221884893007D2AE5 /* BigUInt+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D2021884893007D2AE5 /* BigUInt+Extensions.swift */; }; + 81909D252188494C007D2AE5 /* web3swift_keystores_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7520EA34370030E0D6 /* web3swift_keystores_Tests.swift */; }; + 81909D2621884968007D2AE5 /* web3swift_promises_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821C20D5C6C10016741F /* web3swift_promises_Tests.swift */; }; + 81909D2721884FA4007D2AE5 /* web3swift_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CD91B311FD769A6007BFB45 /* web3swift_Tests.swift */; }; + 81909D2821884FF8007D2AE5 /* web3swift_remoteParsing_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EFFCB6F208554EB008165FE /* web3swift_remoteParsing_Tests.swift */; }; + 81909D292188504D007D2AE5 /* web3swift_AdvancedABIv2_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5ADA20EA67D800DC7F32 /* web3swift_AdvancedABIv2_Tests.swift */; }; + 81909D2A21885067007D2AE5 /* web3swift_rinkeby_personalSignature_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5AE020EA695400DC7F32 /* web3swift_rinkeby_personalSignature_Tests.swift */; }; + 81909D2B218852E2007D2AE5 /* Web3+ERC20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8159C50A21352CB700197B91 /* Web3+ERC20.swift */; }; + 81909D2C218852E2007D2AE5 /* Web3+ERC20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8159C50A21352CB700197B91 /* Web3+ERC20.swift */; }; + 81909D2D218858EA007D2AE5 /* web3swift_ERC20_Class_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8159C50D2135901700197B91 /* web3swift_ERC20_Class_Tests.swift */; }; + 81909D2E21885B2C007D2AE5 /* Web3+ERC721.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E94C5F217788E0005F54A0 /* Web3+ERC721.swift */; }; + 81909D2F21885B2C007D2AE5 /* Web3+ERC721.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E94C5F217788E0005F54A0 /* Web3+ERC721.swift */; }; 81A1821520D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821620D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821A20D5A6F70016741F /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */; }; @@ -117,8 +130,6 @@ 81A1824020D79FDB0016741F /* Promise+Web3+Eth+EstimateGas.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1823F20D79FDB0016741F /* Promise+Web3+Eth+EstimateGas.swift */; }; 81A1824220D7AA750016741F /* Promise+Web3+Eth+SendTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1824120D7AA750016741F /* Promise+Web3+Eth+SendTransaction.swift */; }; 81A1824320D7AA750016741F /* Promise+Web3+Eth+SendTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1824120D7AA750016741F /* Promise+Web3+Eth+SendTransaction.swift */; }; - 81A1824520D7B91B0016741F /* Promise+Web3+Intermediate+Send.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1824420D7B91B0016741F /* Promise+Web3+Intermediate+Send.swift */; }; - 81A1824620D7B91B0016741F /* Promise+Web3+Intermediate+Send.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1824420D7B91B0016741F /* Promise+Web3+Intermediate+Send.swift */; }; 81A1824820D7DDA20016741F /* Promise+Web3+Personal+Sign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1824720D7DDA20016741F /* Promise+Web3+Personal+Sign.swift */; }; 81A1824920D7DDA20016741F /* Promise+Web3+Personal+Sign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1824720D7DDA20016741F /* Promise+Web3+Personal+Sign.swift */; }; 81A1824B20D7DF1B0016741F /* Promise+Web3+Personal+UnlockAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1824A20D7DF1B0016741F /* Promise+Web3+Personal+UnlockAccount.swift */; }; @@ -248,6 +259,7 @@ 81909D1121862D17007D2AE5 /* Web3+ReadingTransaction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+ReadingTransaction.swift"; sourceTree = ""; }; 81909D1421862D37007D2AE5 /* Web3+MutatingTransaction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+MutatingTransaction.swift"; sourceTree = ""; }; 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+Eventloop.swift"; sourceTree = ""; }; + 81909D2021884893007D2AE5 /* BigUInt+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BigUInt+Extensions.swift"; sourceTree = ""; }; 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetBalance.swift"; sourceTree = ""; }; 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+HttpProvider.swift"; sourceTree = ""; }; 81A1821C20D5C6C10016741F /* web3swift_promises_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_promises_Tests.swift; sourceTree = ""; }; @@ -264,7 +276,6 @@ 81A1823B20D79C270016741F /* Promise+Web3+Eth+Call.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+Call.swift"; sourceTree = ""; }; 81A1823F20D79FDB0016741F /* Promise+Web3+Eth+EstimateGas.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+EstimateGas.swift"; sourceTree = ""; }; 81A1824120D7AA750016741F /* Promise+Web3+Eth+SendTransaction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+SendTransaction.swift"; sourceTree = ""; }; - 81A1824420D7B91B0016741F /* Promise+Web3+Intermediate+Send.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Intermediate+Send.swift"; sourceTree = ""; }; 81A1824720D7DDA20016741F /* Promise+Web3+Personal+Sign.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Personal+Sign.swift"; sourceTree = ""; }; 81A1824A20D7DF1B0016741F /* Promise+Web3+Personal+UnlockAccount.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Personal+UnlockAccount.swift"; sourceTree = ""; }; 81A7B2502143C3A8004CD2C7 /* NameHash.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NameHash.swift; sourceTree = ""; }; @@ -277,7 +288,6 @@ 81C0FCF320440F0900D82FAF /* Web3+Options.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+Options.swift"; sourceTree = ""; }; 81C0FCF520440F9900D82FAF /* TransactionSigner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionSigner.swift; sourceTree = ""; }; 81C0FCF8204456E600D82FAF /* Web3+BrowserFunctions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+BrowserFunctions.swift"; sourceTree = ""; }; - 81C0FCFC20449D1400D82FAF /* Web3+TransactionIntermediate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+TransactionIntermediate.swift"; sourceTree = ""; }; 81C146F61FF274B200AA943E /* Web3+Structures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Web3+Structures.swift"; sourceTree = ""; }; 81C5DA272072E18200424CD6 /* NativeTypesEncoding+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NativeTypesEncoding+Extensions.swift"; sourceTree = ""; }; 81C5DA2D2074EBF500424CD6 /* EthereumContract.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EthereumContract.swift; sourceTree = ""; }; @@ -590,7 +600,6 @@ 81A1823B20D79C270016741F /* Promise+Web3+Eth+Call.swift */, 81A1823F20D79FDB0016741F /* Promise+Web3+Eth+EstimateGas.swift */, 81A1824120D7AA750016741F /* Promise+Web3+Eth+SendTransaction.swift */, - 81A1824420D7B91B0016741F /* Promise+Web3+Intermediate+Send.swift */, 81A1824720D7DDA20016741F /* Promise+Web3+Personal+Sign.swift */, 81A1824A20D7DF1B0016741F /* Promise+Web3+Personal+UnlockAccount.swift */, 81195AAF20D7FF8500ABC6B1 /* Promise+Web3+Contract+GetIndexedEvents.swift */, @@ -622,7 +631,6 @@ 810B0F9D1FEC5B9C00CF0DA2 /* Web3+Eth.swift */, 81C0FCF120440EB500D82FAF /* Web3+Protocols.swift */, 81C0FCF320440F0900D82FAF /* Web3+Options.swift */, - 81C0FCFC20449D1400D82FAF /* Web3+TransactionIntermediate.swift */, 818D16CE204D42910084D2A4 /* Web3+EventParser.swift */, 81EB1E4A208173D7003BD47F /* Web3+Personal.swift */, 985BFD49216CE8B100B28C14 /* Web3+TxPool.swift */, @@ -679,6 +687,7 @@ 8123E1C6200CBAC200B6D3AB /* Dictionary+Extension.swift */, 8123E1CA200CBB2200B6D3AB /* Array+Extension.swift */, 8113D2FF1FD7F30F0074282C /* String+Extension.swift */, + 81909D2021884893007D2AE5 /* BigUInt+Extensions.swift */, ); path = Classes; sourceTree = ""; @@ -992,6 +1001,7 @@ files = ( 81C146F71FF274B200AA943E /* Web3+Structures.swift in Sources */, 8104E2281FE82BDC00F952CB /* Web3+Utils.swift in Sources */, + 81909D2B218852E2007D2AE5 /* Web3+ERC20.swift in Sources */, 818ABD5D1FE95FC9002657BB /* Web3+Contract.swift in Sources */, 8113D2CA1FD7E1590074282C /* KeystoreManager.swift in Sources */, 817EBB1F2006265400E02EAA /* Base58.swift in Sources */, @@ -1009,6 +1019,7 @@ 8113D2C41FD7E1590074282C /* CryptoExtensions.swift in Sources */, 81A1822220D678060016741F /* Promise+Web3+Eth+GetBlockNumber.swift in Sources */, 81A1824220D7AA750016741F /* Promise+Web3+Eth+SendTransaction.swift in Sources */, + 81909D2E21885B2C007D2AE5 /* Web3+ERC721.swift in Sources */, 817EBB2920075D2E00E02EAA /* BIP39.swift in Sources */, 815630022007B53C00A0EC2F /* BIP32Keystore.swift in Sources */, 818ABD5B1FE95F8F002657BB /* Web3+Instance.swift in Sources */, @@ -1018,7 +1029,6 @@ 81A1821A20D5A6F70016741F /* Promise+HttpProvider.swift in Sources */, 81A1823720D6E2BB0016741F /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */, 818D16CF204D42910084D2A4 /* Web3+EventParser.swift in Sources */, - 81A1824520D7B91B0016741F /* Promise+Web3+Intermediate+Send.swift in Sources */, 81C5DA282072E18200424CD6 /* NativeTypesEncoding+Extensions.swift in Sources */, 8123E1C7200CBAC200B6D3AB /* Dictionary+Extension.swift in Sources */, 985BFD4E216E2E0A00B28C14 /* Promise+Web3+TxPool.swift in Sources */, @@ -1036,6 +1046,7 @@ 8123E1C9200CBAF800B6D3AB /* Data+Extension.swift in Sources */, 817EBB23200649E000E02EAA /* RIPEMD160+StackOveflow.swift in Sources */, 8116666320455E33008D8AD0 /* Web3+Wallet.swift in Sources */, + 81909D2121884893007D2AE5 /* BigUInt+Extensions.swift in Sources */, 81DDECCF1FDF004E0063684A /* Web3.swift in Sources */, 81A1823420D6E1FD0016741F /* Promise+Web3+Eth+GetBlockByNumber.swift in Sources */, 81A1822820D678BF0016741F /* Promise+Web3+Eth+GetAccounts.swift in Sources */, @@ -1066,12 +1077,19 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 81909D292188504D007D2AE5 /* web3swift_AdvancedABIv2_Tests.swift in Sources */, 00E5FE8220EA3FF40030E0D6 /* web3swift_infura_Tests.swift in Sources */, + 81909D2A21885067007D2AE5 /* web3swift_rinkeby_personalSignature_Tests.swift in Sources */, + 81909D2821884FF8007D2AE5 /* web3swift_remoteParsing_Tests.swift in Sources */, + 81909D2721884FA4007D2AE5 /* web3swift_Tests.swift in Sources */, + 81909D252188494C007D2AE5 /* web3swift_keystores_Tests.swift in Sources */, + 81909D2621884968007D2AE5 /* web3swift_promises_Tests.swift in Sources */, 81909D1D2187BBAE007D2AE5 /* web3swift_ERC20_Tests.swift in Sources */, 81909D1C2187BB67007D2AE5 /* web3swift_RLP_Tests.swift in Sources */, 81909D1B2187B1FA007D2AE5 /* web3swift_User_cases.swift in Sources */, 81909D1F2187BD20007D2AE5 /* web3swift_numberFormattingUtil_Tests.swift in Sources */, 81909D1E2187BC8B007D2AE5 /* web3swift_transactions_Tests.swift in Sources */, + 81909D2D218858EA007D2AE5 /* web3swift_ERC20_Class_Tests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1081,6 +1099,7 @@ files = ( E2065FB82181D7D700701068 /* Promise+Web3+Eth+EstimateGas.swift in Sources */, E2065FB92181D7D700701068 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */, + 81909D2C218852E2007D2AE5 /* Web3+ERC20.swift in Sources */, E2065FBA2181D7D700701068 /* Promise+Web3+TxPool.swift in Sources */, E2065FBB2181D7D700701068 /* Web3+TxPool.swift in Sources */, 4194811B203630530065A83B /* Web3+HttpProvider.swift in Sources */, @@ -1098,6 +1117,7 @@ 81D7D97620A3240900A193EC /* EthereumFilterEncodingExtensions.swift in Sources */, 41948126203630530065A83B /* Web3+Eth.swift in Sources */, 81A1822320D678060016741F /* Promise+Web3+Eth+GetBlockNumber.swift in Sources */, + 81909D2F21885B2C007D2AE5 /* Web3+ERC721.swift in Sources */, 4194812C203630530065A83B /* KeystoreManager.swift in Sources */, 81DFB400210775320011DC85 /* Web3+Infura.swift in Sources */, 81D7D97320A31FB700A193EC /* ComparisonExtensions.swift in Sources */, @@ -1125,6 +1145,7 @@ 41948135203630530065A83B /* EthereumKeystoreV3.swift in Sources */, 41948136203630530065A83B /* KeystoreV3JSONStructure.swift in Sources */, 8116666420455E33008D8AD0 /* Web3+Wallet.swift in Sources */, + 81909D2221884893007D2AE5 /* BigUInt+Extensions.swift in Sources */, 41948137203630530065A83B /* EthereumTransaction.swift in Sources */, 41948138203630530065A83B /* CryptoExtensions.swift in Sources */, 81C0FD052044A8AE00D82FAF /* Web3+Protocols.swift in Sources */, @@ -1140,7 +1161,6 @@ 4194813D203630530065A83B /* RIPEMD160+StackOveflow.swift in Sources */, 4194813E203630530065A83B /* Data+Extension.swift in Sources */, 81A1822F20D67BC30016741F /* Promise+Web3+Eth+GetTransactionReceipt.swift in Sources */, - 81A1824620D7B91B0016741F /* Promise+Web3+Intermediate+Send.swift in Sources */, 81A1822C20D67A1B0016741F /* Promise+Web3+Eth+GetTransactionDetails.swift in Sources */, 81909D1321862D17007D2AE5 /* Web3+ReadingTransaction.swift in Sources */, 4194813F203630530065A83B /* Dictionary+Extension.swift in Sources */, diff --git a/web3swift/Convenience/Classes/BigUInt+Extensions.swift b/web3swift/Convenience/Classes/BigUInt+Extensions.swift new file mode 100644 index 000000000..d23acfbbc --- /dev/null +++ b/web3swift/Convenience/Classes/BigUInt+Extensions.swift @@ -0,0 +1,16 @@ +// +// RIPEMD160_SO.swift +// web3swift +// +// Created by Alexander Vlasov on 10.01.2018. +// + +import Foundation +import struct BigInt.BigUInt + +public extension BigUInt { + public init?(_ naturalUnits: String, _ ethereumUnits: Web3.Utils.Units) { + guard let value = Web3.Utils.parseToBigUInt(naturalUnits, units: ethereumUnits) else {return nil} + self = value + } +} diff --git a/web3swift/HookedFunctions/Classes/Web3+Wallet.swift b/web3swift/HookedFunctions/Classes/Web3+Wallet.swift index 887b361f8..30adb5086 100755 --- a/web3swift/HookedFunctions/Classes/Web3+Wallet.swift +++ b/web3swift/HookedFunctions/Classes/Web3+Wallet.swift @@ -6,74 +6,67 @@ import Foundation import BigInt -import Result import EthereumAddress extension web3.Web3Wallet { - public func getAccounts() -> Result<[EthereumAddress], Web3Error> { + public func getAccounts() throws -> [EthereumAddress] { guard let keystoreManager = self.web3.provider.attachedKeystoreManager else { - return Result.failure(Web3Error.walletError) + throw Web3Error.walletError } guard let ethAddresses = keystoreManager.addresses else { - return Result.failure(Web3Error.walletError) + throw Web3Error.walletError } - return Result(ethAddresses) + return ethAddresses } - public func getCoinbase() -> Result { - let result = self.getAccounts() - switch result { - case .failure(let error): - return Result.failure(error) - case .success(let addresses): - guard addresses.count > 0 else { - return Result.failure(Web3Error.walletError) - } - return Result(addresses[0]) + public func getCoinbase() throws -> EthereumAddress { + let addresses = try self.getAccounts() + guard addresses.count > 0 else { + throw Web3Error.walletError } + return addresses[0] } - public func signTX(transaction:inout EthereumTransaction, account: EthereumAddress, password: String = "web3swift") -> Result { + public func signTX(transaction:inout EthereumTransaction, account: EthereumAddress, password: String = "web3swift") throws -> Bool { do { guard let keystoreManager = self.web3.provider.attachedKeystoreManager else { - return Result.failure(Web3Error.walletError) + throw Web3Error.walletError } try Web3Signer.signTX(transaction: &transaction, keystore: keystoreManager, account: account, password: password) -// print(transaction) - return Result(true) + return true } catch { if error is AbstractKeystoreError { - return Result.failure(Web3Error.keystoreError(err: error as! AbstractKeystoreError)) + throw Web3Error.keystoreError(err: error as! AbstractKeystoreError) } - return Result.failure(Web3Error.generalError(err: error)) + throw Web3Error.generalError(err: error) } } - public func signPersonalMessage(_ personalMessage: String, account: EthereumAddress, password: String = "web3swift") -> Result { + public func signPersonalMessage(_ personalMessage: String, account: EthereumAddress, password: String = "web3swift") throws -> Data { guard let data = Data.fromHex(personalMessage) else { - return Result.failure(Web3Error.dataError) + throw Web3Error.dataError } - return self.signPersonalMessage(data, account: account, password: password) + return try self.signPersonalMessage(data, account: account, password: password) } - public func signPersonalMessage(_ personalMessage: Data, account: EthereumAddress, password: String = "web3swift") -> Result { + public func signPersonalMessage(_ personalMessage: Data, account: EthereumAddress, password: String = "web3swift") throws -> Data { do { guard let keystoreManager = self.web3.provider.attachedKeystoreManager else { - return Result.failure(Web3Error.walletError) + throw Web3Error.walletError } guard let data = try Web3Signer.signPersonalMessage(personalMessage, keystore: keystoreManager, account: account, password: password) else { - return Result.failure(Web3Error.walletError) + throw Web3Error.walletError } - return Result(data) + return data } catch{ if error is AbstractKeystoreError { - return Result.failure(Web3Error.keystoreError(err: error as! AbstractKeystoreError)) + throw Web3Error.keystoreError(err: error as! AbstractKeystoreError) } - return Result.failure(Web3Error.generalError(err: error)) + throw Web3Error.generalError(err: error) } } diff --git a/web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift b/web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift index e2c62d383..6995ec4a5 100755 --- a/web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift +++ b/web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift @@ -15,11 +15,12 @@ public final class _ObjCweb3Eth: NSObject { } public func getBalance(address: _ObjCEthereumAddress, onBlock: NSString = "latest", error: NSErrorPointer) -> _ObjCBigUInt? { + do { guard let addr = address.address else { error?.pointee = Web3Error.inputError(desc: "Address is empty") as NSError return nil } - guard let result = self.web3?.eth.getBalance(address: addr, onBlock: onBlock as String) else { + guard let balance = try self.web3?.eth.getBalance(address: addr) else { error?.pointee = Web3Error.processingError(desc: "Web3 object was not properly initialized") as NSError return nil } @@ -31,6 +32,9 @@ public final class _ObjCweb3Eth: NSObject { error?.pointee = web3error as NSError return nil } + } catch { + error?.pointee = error as NSError + } } public func getBlockNumber(error: NSErrorPointer) -> _ObjCBigUInt? { diff --git a/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift b/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift index c73ec9f73..b85fa7508 100644 --- a/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift +++ b/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift @@ -6,8 +6,8 @@ import Foundation import BigInt -import Result import EthereumAddress +import PromiseKit // This namespace contains functions to work with ERC20 tokens. // variables are lazyly evaluated or global token information (name, ticker, total supply) @@ -18,7 +18,7 @@ public class ERC20 { private var _decimals: UInt8? = nil private var _hasReadProperties: Bool = false - public var options: Web3Options + public var transactionOptions: TransactionOptions public var web3: web3 public var provider: Web3Provider public var address: EthereumAddress @@ -33,9 +33,9 @@ public class ERC20 { self.web3 = web3 self.provider = provider self.address = address - var mergedOptions = web3.options + var mergedOptions = web3.transactionOptions mergedOptions.to = address - self.options = mergedOptions + self.transactionOptions = mergedOptions } public var name: String { @@ -66,140 +66,119 @@ public class ERC20 { if self._hasReadProperties { return } - defer { self._hasReadProperties = true } let contract = self.contract guard contract.contract.address != nil else {return} - guard let nameResult = contract.method("name", parameters: [] as [AnyObject], extraData: Data(), options: self.options)?.call(options: nil, onBlock: "latest") else {return} - switch nameResult { - case .success(let returned): - guard let res = returned["0"] as? String else {break} - self._name = res - default: - self._name = "" - } + var transactionOptions = TransactionOptions.defaultOptions + transactionOptions.callOnBlock = .latest + guard let namePromise = contract.read("name", parameters: [] as [AnyObject], extraData: Data(), transactionOptions: transactionOptions)?.callPromise() else {return} - guard let symbol = contract.method("symbol", parameters: [] as [AnyObject], extraData: Data(), options: self.options)?.call(options: nil, onBlock: "latest") else {return} - switch symbol { - case .success(let returned): - guard let res = returned["0"] as? String else {break} - self._symbol = res - default: - self._symbol = "" - } + guard let symbolPromise = contract.read("symbol", parameters: [] as [AnyObject], extraData: Data(), transactionOptions: transactionOptions)?.callPromise() else {return} - guard let decimalsResult = contract.method("decimals", parameters: [] as [AnyObject], extraData: Data(), options: self.options)?.call(options: nil, onBlock: "latest") else {return} - switch decimalsResult { - case .success(let returned): - guard let res = returned["0"] as? BigUInt else {return} - self._decimals = UInt8(res) - default: - self._decimals = 255 - } + guard let decimalPromise = contract.read("decimals", parameters: [] as [AnyObject], extraData: Data(), transactionOptions: transactionOptions)?.callPromise() else {return} + + let allPromises = [namePromise, symbolPromise, decimalPromise] + let queue = self.web3.requestDispatcher.queue + when(resolved: allPromises).map(on: queue) { (resolvedPromises) -> Void in + guard case .fulfilled(let nameResult) = resolvedPromises[0] else {return} + guard let name = nameResult["0"] as? String else {return} + self._name = name + + guard case .fulfilled(let symbolResult) = resolvedPromises[1] else {return} + guard let symbol = symbolResult["0"] as? String else {return} + self._symbol = symbol + + guard case .fulfilled(let decimalsResult) = resolvedPromises[2] else {return} + guard let decimals = decimalsResult["0"] as? BigUInt else {return} + self._decimals = UInt8(decimals) + + self._hasReadProperties = true + }.wait() } - func getBalance(account: EthereumAddress) -> Result { + func getBalance(account: EthereumAddress) throws -> BigUInt{ let contract = self.contract - let result = contract.method("balanceOf", parameters: [account] as [AnyObject], extraData: Data(), options: self.options)!.call(options: nil, onBlock: "latest") - switch result { - case .success(let returned): - guard let res = returned["0"] as? BigUInt else {return Result.failure(Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node"))} - return Result(res) - case .failure(let error): - return Result.failure(error) - } + var transactionOptions = TransactionOptions() + transactionOptions.callOnBlock = .latest + let result = try contract.read("balanceOf", parameters: [account] as [AnyObject], extraData: Data(), transactionOptions: self.transactionOptions)!.call(transactionOptions: transactionOptions) + guard let res = result["0"] as? BigUInt else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")} + return res } - public func getAllowance(originalOwner: EthereumAddress, delegate: EthereumAddress) -> Result { + public func getAllowance(originalOwner: EthereumAddress, delegate: EthereumAddress) throws -> BigUInt { let contract = self.contract - let result = contract.method("allowance", parameters: [originalOwner, delegate] as [AnyObject], extraData: Data(), options: self.options)!.call(options: nil, onBlock: "latest") - switch result { - case .success(let returned): - guard let res = returned["0"] as? BigUInt else {return Result.failure(Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node"))} - return Result(res) - case .failure(let error): - return Result.failure(error) - } + var transactionOptions = TransactionOptions() + transactionOptions.callOnBlock = .latest + let result = try contract.read("allowance", parameters: [originalOwner, delegate] as [AnyObject], extraData: Data(), transactionOptions: self.transactionOptions)!.call(transactionOptions: transactionOptions) + guard let res = result["0"] as? BigUInt else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")} + return res } - public func transfer(from: EthereumAddress, to: EthereumAddress, amount: String) -> Result { + public func transfer(from: EthereumAddress, to: EthereumAddress, amount: String) throws -> WriteTransaction { let contract = self.contract - var basicOptions = Web3Options() + var basicOptions = TransactionOptions() basicOptions.from = from basicOptions.to = self.address + basicOptions.callOnBlock = .latest // get the decimals manually - let intermediate = contract.method("decimals", options: basicOptions)! - let callResult = intermediate.call(options: basicOptions, onBlock: "latest") + let callResult = try contract.read("decimals", transactionOptions: basicOptions)!.call() var decimals = BigUInt(0) - switch callResult { - case .success(let response): - guard let dec = response["0"], let decTyped = dec as? BigUInt else { - return Result.failure(Web3Error.inputError(desc: "Contract may be not ERC20 compatible, can not get decimals"))} - decimals = decTyped - break - case .failure(let error): - return Result.failure(error) - } + guard let dec = callResult["0"], let decTyped = dec as? BigUInt else { + throw Web3Error.inputError(desc: "Contract may be not ERC20 compatible, can not get decimals")} + decimals = decTyped + let intDecimals = Int(decimals) guard let value = Web3.Utils.parseToBigUInt(amount, decimals: intDecimals) else { - return Result.failure(Web3Error.inputError(desc: "Can not parse inputted amount")) + throw Web3Error.inputError(desc: "Can not parse inputted amount") } - let intermediateToSend = contract.method("transfer", parameters: [to, value] as [AnyObject], options: basicOptions)! - return Result(intermediateToSend) + let tx = contract.write("transfer", parameters: [to, value] as [AnyObject], transactionOptions: basicOptions)! + return tx } - public func transferFrom(from: EthereumAddress, to: EthereumAddress, originalOwner: EthereumAddress, amount: String) -> Result { + public func transferFrom(from: EthereumAddress, to: EthereumAddress, originalOwner: EthereumAddress, amount: String) throws -> WriteTransaction { let contract = self.contract - var basicOptions = Web3Options() + var basicOptions = TransactionOptions() basicOptions.from = from basicOptions.to = self.address + basicOptions.callOnBlock = .latest // get the decimals manually - let intermediate = contract.method("decimals", options: basicOptions)! - let callResult = intermediate.call(options: basicOptions, onBlock: "latest") + let callResult = try contract.read("decimals", transactionOptions: basicOptions)!.call() var decimals = BigUInt(0) - switch callResult { - case .success(let response): - guard let dec = response["0"], let decTyped = dec as? BigUInt else { - return Result.failure(Web3Error.inputError(desc: "Contract may be not ERC20 compatible, can not get decimals"))} - decimals = decTyped - break - case .failure(let error): - return Result.failure(error) - } + guard let dec = callResult["0"], let decTyped = dec as? BigUInt else { + throw Web3Error.inputError(desc: "Contract may be not ERC20 compatible, can not get decimals")} + decimals = decTyped + let intDecimals = Int(decimals) guard let value = Web3.Utils.parseToBigUInt(amount, decimals: intDecimals) else { - return Result.failure(Web3Error.inputError(desc: "Can not parse inputted amount")) + throw Web3Error.inputError(desc: "Can not parse inputted amount") } - let intermediateToSend = contract.method("transferFrom", parameters: [originalOwner, to, value] as [AnyObject], options: basicOptions)! - return Result(intermediateToSend) + + let tx = contract.write("transferFrom", parameters: [originalOwner, to, value] as [AnyObject], transactionOptions: basicOptions)! + return tx } - public func setAllowance(from: EthereumAddress, to: EthereumAddress, newAmount: String) -> Result { + public func setAllowance(from: EthereumAddress, to: EthereumAddress, newAmount: String) throws -> WriteTransaction { let contract = self.contract - var basicOptions = Web3Options() + var basicOptions = TransactionOptions() basicOptions.from = from basicOptions.to = self.address + basicOptions.callOnBlock = .latest // get the decimals manually - let intermediate = contract.method("setAllowance", options: basicOptions)! - let callResult = intermediate.call(options: basicOptions, onBlock: "latest") + let callResult = try contract.read("decimals", transactionOptions: basicOptions)!.call() var decimals = BigUInt(0) - switch callResult { - case .success(let response): - guard let dec = response["0"], let decTyped = dec as? BigUInt else { - return Result.failure(Web3Error.inputError(desc: "Contract may be not ERC20 compatible, can not get decimals"))} - decimals = decTyped - break - case .failure(let error): - return Result.failure(error) - } + guard let dec = callResult["0"], let decTyped = dec as? BigUInt else { + throw Web3Error.inputError(desc: "Contract may be not ERC20 compatible, can not get decimals")} + decimals = decTyped + let intDecimals = Int(decimals) guard let value = Web3.Utils.parseToBigUInt(newAmount, decimals: intDecimals) else { - return Result.failure(Web3Error.inputError(desc: "Can not parse inputted amount")) + throw Web3Error.inputError(desc: "Can not parse inputted amount") } - let intermediateToSend = contract.method("setAllowance", parameters: [to, value] as [AnyObject], options: basicOptions)! - return Result(intermediateToSend) + + let tx = contract.write("setAllowance", parameters: [to, value] as [AnyObject], transactionOptions: basicOptions)! + return tx } diff --git a/web3swift/PrecompiledContracts/ERC721/Web3+ERC721.swift b/web3swift/PrecompiledContracts/ERC721/Web3+ERC721.swift index 909fa096f..15fc07687 100644 --- a/web3swift/PrecompiledContracts/ERC721/Web3+ERC721.swift +++ b/web3swift/PrecompiledContracts/ERC721/Web3+ERC721.swift @@ -6,7 +6,7 @@ import Foundation import BigInt -import Result +import PromiseKit import EthereumAddress // This namespace contains functions to work with ERC721 tokens. @@ -18,7 +18,7 @@ public class ERC721 { private var _tokenURI: String? = nil private var _hasReadProperties: Bool = false - public var options: Web3Options + public var transactionOptions: TransactionOptions public var web3: web3 public var provider: Web3Provider public var address: EthereumAddress @@ -33,9 +33,9 @@ public class ERC721 { self.web3 = web3 self.provider = provider self.address = address - var mergedOptions = web3.options + var mergedOptions = web3.transactionOptions mergedOptions.to = address - self.options = mergedOptions + self.transactionOptions = mergedOptions } public var name: String { @@ -74,124 +74,104 @@ public class ERC721 { if self._hasReadProperties { return } - defer { self._hasReadProperties = true } let contract = self.contract guard contract.contract.address != nil else {return} - guard let nameResult = contract.method("name", parameters: [] as [AnyObject], extraData: Data(), options: self.options)?.call(options: nil, onBlock: "latest") else {return} - switch nameResult { - case .success(let returned): - guard let res = returned["0"] as? String else {break} - self._name = res - default: - self._name = "" - } + var transactionOptions = TransactionOptions.defaultOptions + transactionOptions.callOnBlock = .latest + guard let namePromise = contract.read("name", parameters: [] as [AnyObject], extraData: Data(), transactionOptions: transactionOptions)?.callPromise() else {return} - guard let symbol = contract.method("symbol", parameters: [] as [AnyObject], extraData: Data(), options: self.options)?.call(options: nil, onBlock: "latest") else {return} - switch symbol { - case .success(let returned): - guard let res = returned["0"] as? String else {break} - self._symbol = res - default: - self._symbol = "" - } + guard let symbolPromise = contract.read("symbol", parameters: [] as [AnyObject], extraData: Data(), transactionOptions: transactionOptions)?.callPromise() else {return} - guard let tokenId = contract.method("tokenId", parameters: [] as [AnyObject], extraData: Data(), options: self.options)?.call(options: nil, onBlock: "latest") else {return} - switch tokenId { - case .success(let returned): - guard let res = returned["0"] as? BigUInt else {break} - self._tokenId = res - default: - self._tokenId = 0 - } + guard let tokenIdPromise = contract.read("tokenId", parameters: [] as [AnyObject], extraData: Data(), transactionOptions: transactionOptions)?.callPromise() else {return} - guard let tokenURI = contract.method("tokenURI", parameters: [_tokenId] as [AnyObject], extraData: Data(), options: self.options)?.call(options: nil, onBlock: "latest") else {return} - switch tokenURI { - case .success(let returned): - guard let res = returned["0"] as? String else {return} - self._tokenURI = res - default: - self._tokenURI = "" - } + guard let tokenURIpromise = contract.read("tokenURI", parameters: [] as [AnyObject], extraData: Data(), transactionOptions: transactionOptions)?.callPromise() else {return} + + let allPromises = [namePromise, symbolPromise, tokenIdPromise, tokenURIpromise] + let queue = self.web3.requestDispatcher.queue + when(resolved: allPromises).map(on: queue) { (resolvedPromises) -> Void in + guard case .fulfilled(let nameResult) = resolvedPromises[0] else {return} + guard let name = nameResult["0"] as? String else {return} + self._name = name + + guard case .fulfilled(let symbolResult) = resolvedPromises[1] else {return} + guard let symbol = symbolResult["0"] as? String else {return} + self._symbol = symbol + + guard case .fulfilled(let tokenIdResult) = resolvedPromises[2] else {return} + guard let tokenId = tokenIdResult["0"] as? BigUInt else {return} + self._tokenId = tokenId + + guard case .fulfilled(let tokenURIresult) = resolvedPromises[3] else {return} + guard let uri = tokenURIresult["0"] as? String else {return} + self._tokenURI = uri + + self._hasReadProperties = true + }.wait() } - public func getBalance(account: EthereumAddress) -> Result { + public func getBalance(account: EthereumAddress) throws -> BigUInt { let contract = self.contract - let result = contract.method("balanceOf", parameters: [account] as [AnyObject], extraData: Data(), options: self.options)!.call(options: nil, onBlock: "latest") - switch result { - case .success(let returned): - guard let res = returned["0"] as? BigUInt else {return Result.failure(Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node"))} - return Result(res) - case .failure(let error): - return Result.failure(error) - } + var transactionOptions = TransactionOptions() + transactionOptions.callOnBlock = .latest + let result = try contract.read("balanceOf", parameters: [account] as [AnyObject], extraData: Data(), transactionOptions: self.transactionOptions)!.call(transactionOptions: transactionOptions) + guard let res = result["0"] as? BigUInt else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")} + return res } - public func getOwner(tokenId: BigUInt) -> Result { + public func getOwner(tokenId: BigUInt) throws -> EthereumAddress{ let contract = self.contract - let result = contract.method("ownerOf", parameters: [tokenId] as [AnyObject], extraData: Data(), options: self.options)!.call(options: nil, onBlock: "latest") - switch result { - case .success(let returned): - guard let res = returned["0"] as? EthereumAddress else {return Result.failure(Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node"))} - return Result(res) - case .failure(let error): - return Result.failure(error) - } + var transactionOptions = TransactionOptions() + transactionOptions.callOnBlock = .latest + let result = try contract.read("ownerOf", parameters: [tokenId] as [AnyObject], extraData: Data(), transactionOptions: self.transactionOptions)!.call(transactionOptions: transactionOptions) + guard let res = result["0"] as? EthereumAddress else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")} + return res } - public func getApproved(tokenId: BigUInt) -> Result { + public func getApproved(tokenId: BigUInt) throws -> EthereumAddress { let contract = self.contract - let result = contract.method("getApproved", parameters: [tokenId] as [AnyObject], extraData: Data(), options: self.options)!.call(options: nil, onBlock: "latest") - switch result { - case .success(let returned): - guard let res = returned["0"] as? EthereumAddress else {return Result.failure(Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node"))} - return Result(res) - case .failure(let error): - return Result.failure(error) - } + var transactionOptions = TransactionOptions() + transactionOptions.callOnBlock = .latest + let result = try contract.read("getApproved", parameters: [tokenId] as [AnyObject], extraData: Data(), transactionOptions: self.transactionOptions)!.call(transactionOptions: transactionOptions) + guard let res = result["0"] as? EthereumAddress else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")} + return res } - public func tokenByIndex(index: BigUInt) -> Result { + public func tokenByIndex(index: BigUInt) throws -> BigUInt { let contract = self.contract - let result = contract.method("tokenByIndex", parameters: [index] as [AnyObject], extraData: Data(), options: self.options)!.call(options: nil, onBlock: "latest") - switch result { - case .success(let returned): - guard let res = returned["0"] as? BigUInt else {return Result.failure(Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node"))} - return Result(res) - case .failure(let error): - return Result.failure(error) - } + var transactionOptions = TransactionOptions() + transactionOptions.callOnBlock = .latest + let result = try contract.read("tokenByIndex", parameters: [index] as [AnyObject], extraData: Data(), transactionOptions: self.transactionOptions)!.call(transactionOptions: transactionOptions) + guard let res = result["0"] as? BigUInt else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")} + return res } - public func tokenOfOwnerByIndex(owner: EthereumAddress, index: BigUInt) -> Result { + public func tokenOfOwnerByIndex(owner: EthereumAddress, index: BigUInt) throws -> BigUInt { let contract = self.contract - let result = contract.method("tokenOfOwnerByIndex", parameters: [owner, index] as [AnyObject], extraData: Data(), options: self.options)!.call(options: nil, onBlock: "latest") - switch result { - case .success(let returned): - guard let res = returned["0"] as? BigUInt else {return Result.failure(Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node"))} - return Result(res) - case .failure(let error): - return Result.failure(error) - } + var transactionOptions = TransactionOptions() + transactionOptions.callOnBlock = .latest + let result = try contract.read("tokenOfOwnerByIndex", parameters: [owner, index] as [AnyObject], extraData: Data(), transactionOptions: self.transactionOptions)!.call(transactionOptions: transactionOptions) + guard let res = result["0"] as? BigUInt else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")} + return res } - public func transfer(from: EthereumAddress, to: EthereumAddress, tokenId: BigUInt) -> Result { + public func transfer(from: EthereumAddress, to: EthereumAddress, tokenId: BigUInt) throws -> WriteTransaction { let contract = self.contract - var basicOptions = Web3Options() + var basicOptions = TransactionOptions() basicOptions.from = from basicOptions.to = self.address - let intermediateToSend = contract.method("transfer", parameters: [to, tokenId] as [AnyObject], options: basicOptions)! - return Result(intermediateToSend) + let tx = contract.write("transfer", parameters: [to, tokenId] as [AnyObject], transactionOptions: basicOptions)! + return tx } - public func transferFrom(from: EthereumAddress, to: EthereumAddress, originalOwner: EthereumAddress, tokenId: BigUInt) -> Result { + public func transferFrom(from: EthereumAddress, to: EthereumAddress, originalOwner: EthereumAddress, tokenId: BigUInt) throws -> WriteTransaction { let contract = self.contract - var basicOptions = Web3Options() + var basicOptions = TransactionOptions() basicOptions.from = from basicOptions.to = self.address - let intermediateToSend = contract.method("transferFrom", parameters: [originalOwner, to, tokenId] as [AnyObject], options: basicOptions)! - return Result(intermediateToSend) + let tx = contract.write("transferFrom", parameters: [originalOwner, to, tokenId] as [AnyObject], transactionOptions: basicOptions)! + return tx } } diff --git a/web3swift/Promises/Classes/Promise+Batching.swift b/web3swift/Promises/Classes/Promise+Batching.swift index a8362d902..982efa0e9 100755 --- a/web3swift/Promises/Classes/Promise+Batching.swift +++ b/web3swift/Promises/Classes/Promise+Batching.swift @@ -1,9 +1,7 @@ -// -// Promise+Batching.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+HttpProvider.swift b/web3swift/Promises/Classes/Promise+HttpProvider.swift index bb6cd2c35..94b1b5a50 100755 --- a/web3swift/Promises/Classes/Promise+HttpProvider.swift +++ b/web3swift/Promises/Classes/Promise+HttpProvider.swift @@ -1,9 +1,7 @@ -// -// Promise+HttpProvider.swift // web3swift // -// Created by Alexander Vlasov on 16.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Contract+GetIndexedEvents.swift b/web3swift/Promises/Classes/Promise+Web3+Contract+GetIndexedEvents.swift index a4753f70e..66391e1fe 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Contract+GetIndexedEvents.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Contract+GetIndexedEvents.swift @@ -1,9 +1,7 @@ +// web3swift // -// Promise+Web3+Contract+GetIndexedEvents.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift index c6fbf3cde..2ea622788 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift @@ -1,9 +1,7 @@ +// web3swift // -// Promise+Web3+Eth+Call.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift index 92f9fe150..8d95f6d45 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift @@ -1,9 +1,7 @@ +// web3swift // -// Promise+Web3+Eth+EstimateGas.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift index 7a067e285..9e01bf580 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetAccounts.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -17,11 +15,10 @@ extension web3.Eth { if (self.web3.provider.attachedKeystoreManager != nil) { let promise = Promise<[EthereumAddress]>.pending() queue.async { - let result = self.web3.wallet.getAccounts() - switch result { - case .success(let allAccounts): + do { + let allAccounts = try self.web3.wallet.getAccounts() promise.resolver.fulfill(allAccounts) - case .failure(let error): + } catch { promise.resolver.reject(error) } } diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift index 12bccd559..92c69512d 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift @@ -1,9 +1,7 @@ -// -// DataConversion.swift // web3swift // -// Created by Alexander Vlasov on 16.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByHash.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByHash.swift index 7fbd0e2c2..90710d4fb 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByHash.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByHash.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetBlockByHash.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByNumber.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByNumber.swift index dc7ae46ce..ac92584e5 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByNumber.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByNumber.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetBlockByNumber.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockNumber.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockNumber.swift index 45807b125..e8bc2676d 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockNumber.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockNumber.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetBlockNumber.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+GetGasPrice.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+GetGasPrice.swift index 4a4611697..fbda2ace7 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+GetGasPrice.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+GetGasPrice.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetGasPrice.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift index 60cdfbb57..593280f03 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetTransactionCount.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionDetails.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionDetails.swift index bc9444135..522f04307 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionDetails.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionDetails.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetTransactionDetails.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionReceipt.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionReceipt.swift index 6b61a1009..517a007ee 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionReceipt.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionReceipt.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetTransactionReceipt.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift index efbfca932..c84cc4dfc 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift @@ -1,9 +1,7 @@ +// web3swift // -// Promise+Web3+Eth+SendRawTransaction.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift index 269e4e784..a42446ef2 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+SendTransaction.swift // web3swift // -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Intermediate+Send.swift b/web3swift/Promises/Classes/Promise+Web3+Intermediate+Send.swift deleted file mode 100755 index 9c419e686..000000000 --- a/web3swift/Promises/Classes/Promise+Web3+Intermediate+Send.swift +++ /dev/null @@ -1,9 +0,0 @@ -// -// Promise+Web3+Intermediate+Send.swift -// web3swift -// -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -// Placeholder until bug in Swift is resolved diff --git a/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift b/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift index 163dbfdac..a935b3e47 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Personal+Sign.swift // web3swift // -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift b/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift index c1b6cd470..40c0067c4 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Personal+UnlockAccount.swift // web3swift // -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Promises/Classes/Promise+Web3+TxPool.swift b/web3swift/Promises/Classes/Promise+Web3+TxPool.swift index a183a8701..996fae706 100644 --- a/web3swift/Promises/Classes/Promise+Web3+TxPool.swift +++ b/web3swift/Promises/Classes/Promise+Web3+TxPool.swift @@ -1,9 +1,7 @@ +// web3swift // -// Promise+Web3+TxPool.swift -// web3swift-iOS -// -// Created by Jun Park on 10/10/2018. -// Copyright © 2018 The Matter Inc. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/web3swift/Web3/Classes/Web3+EventParser.swift b/web3swift/Web3/Classes/Web3+EventParser.swift index 4bf2bc5e6..26fdd1f88 100755 --- a/web3swift/Web3/Classes/Web3+EventParser.swift +++ b/web3swift/Web3/Classes/Web3+EventParser.swift @@ -5,7 +5,6 @@ // import Foundation -import enum Result.Result import BigInt import PromiseKit fileprivate typealias PromiseResult = PromiseKit.Result @@ -38,16 +37,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func parseBlockByNumber(_ blockNumber: UInt64) -> Result<[EventParserResultProtocol], Web3Error> { - do { - let result = try self.parseBlockByNumberPromise(blockNumber).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func parseBlockByNumber(_ blockNumber: UInt64) throws -> [EventParserResultProtocol] { + let result = try self.parseBlockByNumberPromise(blockNumber).wait() + return result } /** @@ -62,16 +54,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func parseBlock(_ block: Block) -> Result<[EventParserResultProtocol], Web3Error> { - do { - let result = try self.parseBlockPromise(block).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func parseBlock(_ block: Block) throws -> [EventParserResultProtocol] { + let result = try self.parseBlockPromise(block).wait() + return result } /** @@ -86,16 +71,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func parseTransactionByHash(_ hash: Data) -> Result<[EventParserResultProtocol], Web3Error> { - do { - let result = try self.parseTransactionByHashPromise(hash).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func parseTransactionByHash(_ hash: Data) throws -> [EventParserResultProtocol] { + let result = try self.parseTransactionByHashPromise(hash).wait() + return result } /** @@ -110,16 +88,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func parseTransaction(_ transaction: EthereumTransaction) -> Result<[EventParserResultProtocol], Web3Error> { - do { - let result = try self.parseTransactionPromise(transaction).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func parseTransaction(_ transaction: EthereumTransaction) throws -> [EventParserResultProtocol] { + let result = try self.parseTransactionPromise(transaction).wait() + return result } } } @@ -259,16 +230,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func getIndexedEvents(eventName: String?, filter: EventFilter, joinWithReceipts: Bool = false) -> Result<[EventParserResultProtocol], Web3Error> { - do { - let result = try self.getIndexedEventsPromise(eventName: eventName, filter: filter, joinWithReceipts: joinWithReceipts).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getIndexedEvents(eventName: String?, filter: EventFilter, joinWithReceipts: Bool = false) throws -> [EventParserResultProtocol] { + let result = try self.getIndexedEventsPromise(eventName: eventName, filter: filter, joinWithReceipts: joinWithReceipts).wait() + return result } } @@ -276,9 +240,7 @@ extension web3.web3contract { public func getIndexedEventsPromise(eventName: String?, filter: EventFilter, joinWithReceipts: Bool = false) -> Promise<[EventParserResultProtocol]> { let queue = self.web3.requestDispatcher.queue do { - guard let rawContract = self.contract as? EthereumContract else { - throw Web3Error.nodeError(desc: "ABIv1 is not supported for this method") - } + let rawContract = self.contract guard let preEncoding = encodeTopicToGetLogs(contract: rawContract, eventName: eventName, filter: filter) else { throw Web3Error.processingError(desc: "Failed to encode topic for request") } diff --git a/web3swift/Web3/Classes/Web3+Protocols.swift b/web3swift/Web3/Classes/Web3+Protocols.swift index ac4a4d0e9..91d6cb290 100755 --- a/web3swift/Web3/Classes/Web3+Protocols.swift +++ b/web3swift/Web3/Classes/Web3+Protocols.swift @@ -6,7 +6,6 @@ import Foundation import BigInt -import Result import class PromiseKit.Promise import EthereumAddress @@ -21,10 +20,10 @@ public protocol EventParserResultProtocol { /// Protocol for generic Ethereum event parser public protocol EventParserProtocol { - func parseTransaction(_ transaction: EthereumTransaction) -> Result<[EventParserResultProtocol], Web3Error> - func parseTransactionByHash(_ hash: Data) -> Result<[EventParserResultProtocol], Web3Error> - func parseBlock(_ block: Block) -> Result<[EventParserResultProtocol], Web3Error> - func parseBlockByNumber(_ blockNumber: UInt64) -> Result<[EventParserResultProtocol], Web3Error> + func parseTransaction(_ transaction: EthereumTransaction) throws -> [EventParserResultProtocol] + func parseTransactionByHash(_ hash: Data) throws -> [EventParserResultProtocol] + func parseBlock(_ block: Block) throws -> [EventParserResultProtocol] + func parseBlockByNumber(_ blockNumber: UInt64) throws -> [EventParserResultProtocol] func parseTransactionPromise(_ transaction: EthereumTransaction) -> Promise<[EventParserResultProtocol]> func parseTransactionByHashPromise(_ hash: Data) -> Promise<[EventParserResultProtocol]> func parseBlockByNumberPromise(_ blockNumber: UInt64) -> Promise<[EventParserResultProtocol]> diff --git a/web3swift/Web3/Classes/Web3+ReadingTransaction.swift b/web3swift/Web3/Classes/Web3+ReadingTransaction.swift index 0a54a4ab1..3d1740a56 100644 --- a/web3swift/Web3/Classes/Web3+ReadingTransaction.swift +++ b/web3swift/Web3/Classes/Web3+ReadingTransaction.swift @@ -81,4 +81,12 @@ public class ReadTransaction { } return returnPromise } + + public func estimateGas(transactionOptions: TransactionOptions? = nil) throws -> BigUInt { + return try self.estimateGasPromise(transactionOptions: transactionOptions).wait() + } + + public func call(transactionOptions: TransactionOptions? = nil) throws -> [String: Any] { + return try self.callPromise(transactionOptions: transactionOptions).wait() + } } diff --git a/web3swift/Web3/Classes/Web3+TransactionIntermediate.swift b/web3swift/Web3/Classes/Web3+TransactionIntermediate.swift deleted file mode 100755 index 3b0885a26..000000000 --- a/web3swift/Web3/Classes/Web3+TransactionIntermediate.swift +++ /dev/null @@ -1,241 +0,0 @@ -// web3swift -// -// Created by Alex Vlasov. -// Copyright © 2018 Alex Vlasov. All rights reserved. -// - -import Foundation -import enum Result.Result -import BigInt -import PromiseKit -fileprivate typealias PromiseResult = PromiseKit.Result - -extension web3.web3contract { - - /// TransactionIntermediate is an almost-ready transaction or a smart-contract function call. It bears all the required information - /// to call the smart-contract and decode the returned information, or estimate gas required for transaction, or send a transaciton - /// to the blockchain. - public class TransactionIntermediate{ - public var transaction:EthereumTransaction - public var contract: ContractProtocol - public var method: String - public var options: Web3Options? = Web3Options.defaultOptions() - var web3: web3 - public init (transaction: EthereumTransaction, web3 web3Instance: web3, contract: ContractProtocol, method: String, options: Web3Options?) { - self.transaction = transaction - self.web3 = web3Instance - self.contract = contract - self.contract.options = options - self.method = method - self.options = Web3Options.merge(web3.options, with: options) - if self.web3.provider.network != nil { - self.transaction.chainID = self.web3.provider.network?.chainID - } - } - - /** - *Send a prepared transaction to the blockchain. Internally checks the nonce for a sending account, assigns it, get a gas estimate and signs a transaction either locally or on the remote node.* - - - parameters: - - password: Password for a private key if transaction is signed locally - - options: Web3Options to override the previously assigned gas price, gas limit and value. - - onBlock: String field determines if nonce value and the gas estimate are based on the state of a blockchain on the latest mined block ("latest") or the expected state after all the transactions in memory pool are applied ("pending"). Using "pending" allows to send transactions one after another without waiting for inclusion of the previous one in some block. - - - returns: - - Result object - - - important: This call is synchronous - - */ - public func send(password: String = "web3swift", options: Web3Options? = nil, onBlock: String = "pending") throws -> TransactionSendingResult { - let result = try self.sendPromise(password: password, options: options, onBlock: onBlock).wait() - return result - } - - /** - *Calls a function of the smart-contract and parses the returned data to native objects.* - - - parameters: - - options: Web3Options to override the previously assigned gas price, gas limit and value. - - onBlock: String field determines if nonce value and the gas estimate are based on the state of a blockchain on the latest mined block ("latest") or the expected state after all the transactions in memory pool are applied ("pending"). Using "pending" allows to send transactions one after another without waiting for inclusion of the previous one in some block. - - - returns: - - Result object - - - important: This call is synchronous - - */ - public func call(options: Web3Options?, onBlock: String = "latest") throws -> [String:Any] { - let result = try self.callPromise(options: options, onBlock: onBlock).wait() - return result - } - - /** - *Estimates gas required to execute the transaction. Setting a gas limit lower than the estimate will most likely result in a failed transaction. If this call returns an error it can also indicate that transaction is invalid as itself.* - - - parameters: - - options: Web3Options to override the previously assigned gas price, gas limit and value. - - onBlock: String field determines if nonce value and the gas estimate are based on the state of a blockchain on the latest mined block ("latest") or the expected state after all the transactions in memory pool are applied ("pending"). Using "pending" allows to send transactions one after another without waiting for inclusion of the previous one in some block. - - - returns: - - Result object - - - important: This call is synchronous - - */ - public func estimateGas(options: Web3Options?, onBlock: String = "latest") throws -> BigUInt { - let result = try self.estimateGasPromise(options: options, onBlock: onBlock).wait() - return result - } - - /** - *Assembles (but does not sign!) a transaction by fetching the nonce value and applying provided options.* - - - parameters: - - options: Web3Options to override the previously assigned gas price, gas limit and value. - - onBlock: String field determines if nonce value and the gas estimate are based on the state of a blockchain on the latest mined block ("latest") or the expected state after all the transactions in memory pool are applied ("pending"). Using "pending" allows to send transactions one after another without waiting for inclusion of the previous one in some block. - - - returns: - - Result object - - - important: This call is synchronous - - */ - public func assemble(options: Web3Options? = nil, onBlock: String = "pending") throws -> EthereumTransaction { - let result = try self.assemblePromise(options: options, onBlock: onBlock).wait() - return result - } - - } -} - -extension web3.web3contract.TransactionIntermediate { - - public func assemblePromise(options: Web3Options? = nil, onBlock: String = "pending") -> Promise { - var assembledTransaction : EthereumTransaction = self.transaction - let queue = self.web3.requestDispatcher.queue - let returnPromise = Promise { seal in - guard let mergedOptions = Web3Options.merge(self.options, with: options) else { - seal.reject(Web3Error.inputError(desc: "Provided options are invalid")) - return - } - guard let from = mergedOptions.from else { - seal.reject(Web3Error.inputError(desc: "No 'from' field provided")) - return - } - var optionsForGasEstimation = Web3Options() - optionsForGasEstimation.from = mergedOptions.from - optionsForGasEstimation.to = mergedOptions.to - optionsForGasEstimation.value = mergedOptions.value - let getNoncePromise : Promise = self.web3.eth.getTransactionCountPromise(address: from, onBlock: onBlock) - let gasEstimatePromise : Promise = self.web3.eth.estimateGasPromise(assembledTransaction, options: optionsForGasEstimation, onBlock: onBlock) - let gasPricePromise : Promise = self.web3.eth.getGasPricePromise() - var promisesToFulfill: [Promise] = [getNoncePromise, gasPricePromise, gasPricePromise] - when(resolved: getNoncePromise, gasEstimatePromise, gasPricePromise).map(on: queue, { (results:[PromiseResult]) throws -> EthereumTransaction in - - promisesToFulfill.removeAll() - guard case .fulfilled(let nonce) = results[0] else { - throw Web3Error.processingError(desc: "Failed to fetch nonce") - } - guard case .fulfilled(let gasEstimate) = results[1] else { - throw Web3Error.processingError(desc: "Failed to fetch gas estimate") - } - guard case .fulfilled(let gasPrice) = results[2] else { - throw Web3Error.processingError(desc: "Failed to fetch gas price") - } - guard let estimate = Web3Options.smartMergeGasLimit(originalOptions: options, extraOptions: mergedOptions, gasEstimate: gasEstimate) else { - throw Web3Error.processingError(desc: "Failed to calculate gas estimate that satisfied options") - } - assembledTransaction.nonce = nonce - assembledTransaction.gasLimit = estimate - guard let finalGasPrice = Web3Options.smartMergeGasPrice(originalOptions: options, extraOptions: mergedOptions, priceEstimate: gasPrice) else { - throw Web3Error.processingError(desc: "Missing parameter of gas price for transaction") - } - assembledTransaction.gasPrice = finalGasPrice -// if assembledTransaction.gasPrice == 0 { -// if mergedOptions.gasPrice != nil { -// assembledTransaction.gasPrice = mergedOptions.gasPrice! -// } else { -// assembledTransaction.gasPrice = gasPrice -// } -// } - return assembledTransaction - }).done(on: queue) {tx in - seal.fulfill(tx) - }.catch(on: queue) {err in - seal.reject(err) - } - } - return returnPromise - } - - public func sendPromise(password:String = "web3swift", options: Web3Options? = nil, onBlock: String = "pending") -> Promise{ - let queue = self.web3.requestDispatcher.queue - return self.assemblePromise(options: options, onBlock: onBlock).then(on: queue) { transaction throws -> Promise in - guard let mergedOptions = Web3Options.merge(self.options, with: options) else { - throw Web3Error.inputError(desc: "Provided options are invalid") - } - var cleanedOptions = Web3Options() - cleanedOptions.from = mergedOptions.from - cleanedOptions.to = mergedOptions.to - return self.web3.eth.sendTransactionPromise(transaction, options: cleanedOptions, password: password) - } - } - - public func callPromise(options: Web3Options? = nil, onBlock: String = "latest") -> Promise<[String: Any]>{ - let assembledTransaction : EthereumTransaction = self.transaction - let queue = self.web3.requestDispatcher.queue - let returnPromise = Promise<[String:Any]> { seal in - guard let mergedOptions = Web3Options.merge(self.options, with: options) else { - seal.reject(Web3Error.inputError(desc: "Provided options are invalid")) - return - } - var optionsForCall = Web3Options() - optionsForCall.from = mergedOptions.from - optionsForCall.to = mergedOptions.to - optionsForCall.value = mergedOptions.value - let callPromise : Promise = self.web3.eth.callPromise(assembledTransaction, options: optionsForCall, onBlock: onBlock) - callPromise.done(on: queue) {(data:Data) throws in - do { - if (self.method == "fallback") { - let resultHex = data.toHexString().addHexPrefix() - seal.fulfill(["result": resultHex as Any]) - return - } - guard let decodedData = self.contract.decodeReturnData(self.method, data: data) else - { - throw Web3Error.processingError(desc: "Can not decode returned parameters") - } - seal.fulfill(decodedData) - } catch{ - seal.reject(error) - } - }.catch(on: queue) {err in - seal.reject(err) - } - } - return returnPromise - } - - public func estimateGasPromise(options: Web3Options? = nil, onBlock: String = "latest") -> Promise{ - let assembledTransaction : EthereumTransaction = self.transaction - let queue = self.web3.requestDispatcher.queue - let returnPromise = Promise { seal in - guard let mergedOptions = Web3Options.merge(self.options, with: options) else { - seal.reject(Web3Error.inputError(desc: "Provided options are invalid")) - return - } - var optionsForGasEstimation = Web3Options() - optionsForGasEstimation.from = mergedOptions.from - optionsForGasEstimation.to = mergedOptions.to - optionsForGasEstimation.value = mergedOptions.value - let promise = self.web3.eth.estimateGasPromise(assembledTransaction, options: optionsForGasEstimation, onBlock: onBlock) - promise.done(on: queue) {(estimate: BigUInt) in - seal.fulfill(estimate) - }.catch(on: queue) {err in - seal.reject(err) - } - } - return returnPromise - } -} diff --git a/web3swiftTests/web3swift_AdvancedABIv2_Tests.swift b/web3swiftTests/web3swift_AdvancedABIv2_Tests.swift index 93a15adfc..f9d487351 100755 --- a/web3swiftTests/web3swift_AdvancedABIv2_Tests.swift +++ b/web3swiftTests/web3swift_AdvancedABIv2_Tests.swift @@ -7,168 +7,86 @@ import XCTest import CryptoSwift import BigInt +import EthereumAddress @testable import web3swift_iOS class web3swift_AdvancedABIv2_Tests: XCTestCase { - func testAdvancedABIv2() { + func testAdvancedABIv2() throws { let abiString = "[{\"constant\":true,\"inputs\":[],\"name\":\"testDynOfDyn\",\"outputs\":[{\"name\":\"ts\",\"type\":\"string[]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testStOfDyn\",\"outputs\":[{\"name\":\"ts\",\"type\":\"string[2]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testDynArray\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"ts\",\"type\":\"tuple[]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testStaticArray\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"ts\",\"type\":\"tuple[2]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testSingle\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"t\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" let contractAddress = EthereumAddress("0xd14630167f878e92a40a1c12db4532f29cb3065e") let web3 = Web3.InfuraRinkebyWeb3() let contract = web3.contract(abiString, at: contractAddress, abiVersion: 2) - var options = Web3Options.defaultOptions() - options.from = contractAddress XCTAssert(contract != nil) - print(contract?.contract.allMethods) - let rawContract = contract?.contract as! ContractV2 - print(rawContract) - let intermediate = contract?.method("testSingle", options: options) - XCTAssertNotNil(intermediate) - let result = intermediate!.call(options: nil) - switch result { - case .success(let payload): - print(payload) - case .failure(let error): - print(error) - XCTFail() - } + let tx = contract!.read("testSingle") + let _ = try tx!.callPromise().wait() } - func testAdvancedABIv2staticArray() { + func testAdvancedABIv2staticArray() throws { let abiString = "[{\"constant\":true,\"inputs\":[],\"name\":\"testDynOfDyn\",\"outputs\":[{\"name\":\"ts\",\"type\":\"string[]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testStOfDyn\",\"outputs\":[{\"name\":\"ts\",\"type\":\"string[2]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testDynArray\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"ts\",\"type\":\"tuple[]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testStaticArray\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"ts\",\"type\":\"tuple[2]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testSingle\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"t\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" let contractAddress = EthereumAddress("0xd14630167f878e92a40a1c12db4532f29cb3065e") let web3 = Web3.InfuraRinkebyWeb3() let contract = web3.contract(abiString, at: contractAddress, abiVersion: 2) - var options = Web3Options.defaultOptions() - options.from = contractAddress XCTAssert(contract != nil) - print(contract?.contract.allMethods) - let rawContract = contract?.contract as! ContractV2 - print(rawContract) - let intermediate = contract?.method("testStaticArray", options: options) - XCTAssertNotNil(intermediate) - let result = intermediate!.call(options: nil) - switch result { - case .success(let payload): - print(payload) - case .failure(let error): - print(error) - XCTFail() - } + let tx = contract?.read("testStaticArray") + XCTAssertNotNil(tx) + let _ = try tx!.callPromise().wait() } - func testAdvancedABIv2dynamicArray() { + func testAdvancedABIv2dynamicArray() throws { let abiString = "[{\"constant\":true,\"inputs\":[],\"name\":\"testDynOfDyn\",\"outputs\":[{\"name\":\"ts\",\"type\":\"string[]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testStOfDyn\",\"outputs\":[{\"name\":\"ts\",\"type\":\"string[2]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testDynArray\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"ts\",\"type\":\"tuple[]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testStaticArray\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"ts\",\"type\":\"tuple[2]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testSingle\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"t\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" let contractAddress = EthereumAddress("0xd14630167f878e92a40a1c12db4532f29cb3065e") let web3 = Web3.InfuraRinkebyWeb3() let contract = web3.contract(abiString, at: contractAddress, abiVersion: 2) - var options = Web3Options.defaultOptions() - options.from = contractAddress XCTAssert(contract != nil) - print(contract?.contract.allMethods) - let rawContract = contract?.contract as! ContractV2 - print(rawContract) - let intermediate = contract?.method("testDynArray", options: options) - XCTAssertNotNil(intermediate) - let result = intermediate!.call(options: nil) - switch result { - case .success(let payload): - print(payload) - case .failure(let error): - print(error) - XCTFail() - } + let tx = contract?.read("testDynArray") + XCTAssertNotNil(tx) + let _ = try tx!.callPromise().wait() } - func testAdvancedABIv2dynamicArrayOfStrings() { + func testAdvancedABIv2dynamicArrayOfStrings() throws { let abiString = "[{\"constant\":true,\"inputs\":[],\"name\":\"testDynOfDyn\",\"outputs\":[{\"name\":\"ts\",\"type\":\"string[]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testStOfDyn\",\"outputs\":[{\"name\":\"ts\",\"type\":\"string[2]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testDynArray\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"ts\",\"type\":\"tuple[]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testStaticArray\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"ts\",\"type\":\"tuple[2]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testSingle\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"t\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" let contractAddress = EthereumAddress("0xd14630167f878e92a40a1c12db4532f29cb3065e") let web3 = Web3.InfuraRinkebyWeb3() let contract = web3.contract(abiString, at: contractAddress, abiVersion: 2) - var options = Web3Options.defaultOptions() - options.from = contractAddress XCTAssert(contract != nil) - print(contract?.contract.allMethods) - let rawContract = contract?.contract as! ContractV2 - print(rawContract) - let intermediate = contract?.method("testDynOfDyn", options: options) - XCTAssertNotNil(intermediate) - let result = intermediate!.call(options: nil) - switch result { - case .success(let payload): - print(payload) - case .failure(let error): - print(error) - XCTFail() - } + let tx = contract?.read("testDynOfDyn") + XCTAssertNotNil(tx) + let _ = try tx!.callPromise().wait() } - func testAdvancedABIv2staticArrayOfStrings() { + func testAdvancedABIv2staticArrayOfStrings() throws { let abiString = "[{\"constant\":true,\"inputs\":[],\"name\":\"testDynOfDyn\",\"outputs\":[{\"name\":\"ts\",\"type\":\"string[]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testStOfDyn\",\"outputs\":[{\"name\":\"ts\",\"type\":\"string[2]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testDynArray\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"ts\",\"type\":\"tuple[]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testStaticArray\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"ts\",\"type\":\"tuple[2]\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"testSingle\",\"outputs\":[{\"components\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"someText\",\"type\":\"string\"},{\"name\":\"staticArray\",\"type\":\"uint256[2]\"},{\"name\":\"dynamicArray\",\"type\":\"uint256[]\"},{\"name\":\"anotherDynamicArray\",\"type\":\"string[2]\"}],\"name\":\"t\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" let contractAddress = EthereumAddress("0xd14630167f878e92a40a1c12db4532f29cb3065e")! let web3 = Web3.InfuraRinkebyWeb3() let contract = web3.contract(abiString, at: contractAddress, abiVersion: 2) - var options = Web3Options.defaultOptions() - options.from = contractAddress XCTAssert(contract != nil) - print(contract?.contract.allMethods) - let rawContract = contract?.contract as! ContractV2 - print(rawContract) - let intermediate = contract?.method("testStOfDyn", options: options) - XCTAssertNotNil(intermediate) - let result = intermediate!.call(options: nil) - switch result { - case .success(let payload): - print(payload) - case .failure(let error): - print(error) - XCTFail() - } + let tx = contract?.read("testStOfDyn") + XCTAssertNotNil(tx) + let _ = try tx!.callPromise().wait() } - func testEmptyArrayDecoding() { + func testEmptyArrayDecoding() throws { let abiString = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[],\"name\":\"empty\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" let contractAddress = EthereumAddress("0x200eb5ccda1c35b0f5bf82552fdd65a8aee98e79")! let web3 = Web3.InfuraRinkebyWeb3() let contract = web3.contract(abiString, at: contractAddress, abiVersion: 2) - var options = Web3Options.defaultOptions() - options.from = contractAddress XCTAssert(contract != nil) - print(contract?.contract.allMethods) - let rawContract = contract?.contract as! ContractV2 - print(rawContract) - let intermediate = contract?.method("empty", options: options) - XCTAssertNotNil(intermediate) - let result = intermediate!.call(options: nil) - switch result { - case .success(let payload): - print(payload) - case .failure(let error): - print(error) - XCTFail() - } + let tx = contract?.read("empty") + XCTAssertNotNil(tx) + let _ = try tx!.callPromise().wait() } - func testUserCase() { + func testUserCase() throws { let abiString = "[{\"constant\":true,\"inputs\":[],\"name\":\"getFlagData\",\"outputs\":[{\"name\":\"data\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"data\",\"type\":\"string\"}],\"name\":\"setFlagData\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" let contractAddress = EthereumAddress("0x811411e3cdfd4750cdd3552feb3b89a46ddb612e") let web3 = Web3.InfuraRinkebyWeb3() let contract = web3.contract(abiString, at: contractAddress, abiVersion: 2) - var options = Web3Options.defaultOptions() - options.from = contractAddress XCTAssert(contract != nil) - print(contract?.contract.allMethods) - let intermediate = contract?.method("getFlagData", options: options) - XCTAssertNotNil(intermediate) - let result = intermediate!.call(options: nil) - switch result { - case .success(let payload): - print(payload) - case .failure(let error): - print(error) - XCTFail() - } + let tx = contract?.read("getFlagData") + XCTAssertNotNil(tx) + let _ = try tx!.call() } } diff --git a/web3swiftTests/web3swift_ERC20_Class_Tests.swift b/web3swiftTests/web3swift_ERC20_Class_Tests.swift index ca1e3c009..cd7e420e2 100644 --- a/web3swiftTests/web3swift_ERC20_Class_Tests.swift +++ b/web3swiftTests/web3swift_ERC20_Class_Tests.swift @@ -6,6 +6,7 @@ import XCTest import BigInt +import EthereumAddress @testable import web3swift_iOS @@ -21,13 +22,13 @@ class web3swift_ERC20_Class_Tests: XCTestCase { XCTAssert(erc20token.decimals == 18) } - func testERC20tokenBalanceAndAllowance() { + func testERC20tokenBalanceAndAllowance() throws { let web3 = Web3.InfuraMainnetWeb3() let w3sTokenAddress = EthereumAddress("0x8932404A197D84Ec3Ea55971AADE11cdA1dddff1")! let erc20token = ERC20.init(web3: web3, provider: web3.provider, address: w3sTokenAddress) let userAddress = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! - guard case .success(let balance) = erc20token.getBalance(account: userAddress) else {return XCTFail()} - guard case .success(let allowance) = erc20token.getAllowance(originalOwner: userAddress, delegate: userAddress) else {return XCTFail()} + let balance = try erc20token.getBalance(account: userAddress) + let allowance = try erc20token.getAllowance(originalOwner: userAddress, delegate: userAddress) XCTAssert(String(balance) == "1024000000000000000000") XCTAssert(allowance == 0) } diff --git a/web3swiftTests/web3swift_Tests.swift b/web3swiftTests/web3swift_Tests.swift index 9f1f4c9f3..a5940136c 100755 --- a/web3swiftTests/web3swift_Tests.swift +++ b/web3swiftTests/web3swift_Tests.swift @@ -8,7 +8,7 @@ import XCTest import CryptoSwift import BigInt -import Result +import EthereumAddress import secp256k1_swift @testable import web3swift_iOS @@ -92,15 +92,13 @@ class web3swift_Tests: XCTestCase { XCTAssert(privKey != nil, "Failed to create new private key") } - func testUserCaseEventParsing() { + func testUserCaseEventParsing() throws { let contractAddress = EthereumAddress("0x7ff546aaccd379d2d1f241e1d29cdd61d4d50778") let jsonString = "[{\"constant\":false,\"inputs\":[{\"name\":\"_id\",\"type\":\"string\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_id\",\"type\":\"string\"},{\"indexed\":true,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"}]" let web3 = Web3.InfuraRinkebyWeb3() let contract = web3.contract(jsonString, at: contractAddress, abiVersion: 2) guard let eventParser = contract?.createEventParser("Deposit", filter: nil) else {return XCTFail()} - let present = eventParser.parseBlockByNumber(UInt64(2138657)) - guard case .success(let pres) = present else {return XCTFail()} - print(pres) + let pres = try eventParser.parseBlockByNumber(UInt64(2138657)) XCTAssert(pres.count == 1) } @@ -133,11 +131,11 @@ class web3swift_Tests: XCTestCase { let contract = web3.contract(jsonString, at: addr, abiVersion: 2) XCTAssert(contract != nil) let allMethods = contract!.contract.allMethods - let userDeviceCount = try contract!.method("userDeviceCount", parameters: [addr as AnyObject], options: nil)?.callPromise().wait() + let userDeviceCount = try contract!.read("userDeviceCount", parameters: [addr as AnyObject])?.callPromise().wait() print(userDeviceCount) - let totalUsers = try contract!.method("totalUsers", parameters: [], options: nil)?.callPromise().wait() + let totalUsers = try contract!.read("totalUsers", parameters: [])?.callPromise().wait() print(totalUsers) - let user = try contract!.method("users", parameters: [0 as AnyObject], options: nil)?.callPromise().wait() + let user = try contract!.read("users", parameters: [0 as AnyObject])?.callPromise().wait() print(user) print(allMethods) } catch { diff --git a/web3swiftTests/web3swift_promises_Tests.swift b/web3swiftTests/web3swift_promises_Tests.swift index c10b8f150..d388ffc49 100755 --- a/web3swiftTests/web3swift_promises_Tests.swift +++ b/web3swiftTests/web3swift_promises_Tests.swift @@ -7,11 +7,13 @@ import XCTest import PromiseKit import BigInt +import EthereumAddress @testable import web3swift_iOS class web3swift_promises_Tests: XCTestCase { var urlSession : URLSession? + func testGetBalancePromise() { do { let web3 = Web3.InfuraMainnetWeb3() @@ -41,11 +43,10 @@ class web3swift_promises_Tests: XCTestCase { let keystoreManager = KeystoreManager([tempKeystore!]) web3.addKeystoreManager(keystoreManager) let contract = web3.contract(Web3.Utils.coldWalletABI, at: sendToAddress, abiVersion: 2) - var options = Web3Options.defaultOptions() - options.value = Web3.Utils.parseToBigUInt("1.0", units: .eth) - options.from = keystoreManager.addresses?.first - let intermediate = contract?.method("fallback", options: options) - let esimate = try intermediate!.estimateGasPromise(options: nil).wait() + guard let writeTX = contract?.write("fallback") else {return XCTFail()} + writeTX.transactionOptions.from = tempKeystore!.addresses?.first + writeTX.transactionOptions.value = BigUInt("1.0", .eth) + let esimate = try writeTX.estimateGasPromise().wait() print(esimate) XCTAssert(esimate == 21000) } catch{ @@ -54,33 +55,32 @@ class web3swift_promises_Tests: XCTestCase { } } - func testSendETHPromise() { - do { - guard let keystoreData = getKeystoreData() else {return} - guard let keystoreV3 = EthereumKeystoreV3.init(keystoreData) else {return XCTFail()} - let web3Rinkeby = Web3.InfuraRinkebyWeb3() - let keystoreManager = KeystoreManager.init([keystoreV3]) - web3Rinkeby.addKeystoreManager(keystoreManager) - guard case .success(let gasPriceRinkeby) = web3Rinkeby.eth.getGasPrice() else {return} - let sendToAddress = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! - guard let intermediate = web3Rinkeby.eth.sendETH(to: sendToAddress, amount: "0.001") else {return XCTFail()} - var options = Web3Options.defaultOptions() - options.from = keystoreV3.addresses?.first - options.gasPrice = gasPriceRinkeby - let result = try intermediate.sendPromise(options: options).wait() - print(result) - } catch { - print(error) - XCTFail() - } - } +// func testSendETHPromise() { +// do { +// guard let keystoreData = getKeystoreData() else {return} +// guard let keystoreV3 = EthereumKeystoreV3.init(keystoreData) else {return XCTFail()} +// let web3Rinkeby = Web3.InfuraRinkebyWeb3() +// let keystoreManager = KeystoreManager.init([keystoreV3]) +// web3Rinkeby.addKeystoreManager(keystoreManager) +// let gasPriceRinkeby = try web3Rinkeby.eth.getGasPrice() +// let sendToAddress = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! +// guard let writeTX = web3Rinkeby.eth.sendETH(to: sendToAddress, amount: "0.001") else {return XCTFail()} +// writeTX.transactionOptions.from = keystoreV3.addresses?.first +// writeTX.transactionOptions.gasPrice = .manual(gasPriceRinkeby) +// let result = try writeTX.sendPromise().wait() +// print(result) +// } catch { +// print(error) +// XCTFail() +// } +// } func testERC20tokenBalancePromise() { do { let web3 = Web3.InfuraMainnetWeb3() let contract = web3.contract(Web3.Utils.erc20ABI, at: EthereumAddress("0x8932404A197D84Ec3Ea55971AADE11cdA1dddff1")!, abiVersion: 2) let addressOfUser = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! - let tokenBalance = try contract!.method("balanceOf", parameters: [addressOfUser] as [AnyObject], options: nil)!.callPromise(options: nil).wait() + let tokenBalance = try contract!.read("balanceOf", parameters: [addressOfUser] as [AnyObject])!.callPromise().wait() guard let bal = tokenBalance["0"] as? BigUInt else {return XCTFail()} print(String(bal)) } catch { @@ -134,6 +134,18 @@ class web3swift_promises_Tests: XCTestCase { guard let data = NSData(contentsOfFile: path) else {return nil} return data as Data } + +// func testRegenerateKeystore() { +// let data = getKeystoreData()! +// let ks = EthereumKeystoreV3.init(data)! +// let _ = try! ks.UNSAFE_getPrivateKeyData(password: "BANKEXFOUNDATION", account: ks.addresses!.first!) +// try! ks.regenerate(oldPassword: "BANKEXFOUNDATION", newPassword: "web3swift") +// let newData = try! ks.serialize() +// let bundle = Bundle(for: type(of: self)) +// guard let path = bundle.path(forResource: "key", ofType: "json") else {return} +// let url = URL.init(fileURLWithPath: path) +// try! newData?.write(to: url) +// } } diff --git a/web3swiftTests/web3swift_remoteParsing_Tests.swift b/web3swiftTests/web3swift_remoteParsing_Tests.swift index 603a25233..637106d39 100755 --- a/web3swiftTests/web3swift_remoteParsing_Tests.swift +++ b/web3swiftTests/web3swift_remoteParsing_Tests.swift @@ -7,20 +7,19 @@ import XCTest import CryptoSwift import BigInt +import EthereumAddress @testable import web3swift_iOS class web3swift_remoteParsing_Tests: XCTestCase { - func testEventParsing1usingABIv2() { + func testEventParsing1usingABIv2() throws { let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"name\":\"_tokenName\",\"type\":\"string\"},{\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},]" let contractAddress = EthereumAddress("0x45245bc59219eeaaf6cd3f382e078a461ff9de7b") let web3 = Web3.InfuraMainnetWeb3() let contract = web3.contract(jsonString, at: contractAddress, abiVersion: 2) guard let eventParser = contract?.createEventParser("Transfer", filter: nil) else {return XCTFail()} - let present = eventParser.parseBlockByNumber(UInt64(5200088)) - guard case .success(let pres) = present else {return XCTFail()} - print(pres) + let pres = try eventParser.parseBlockByNumber(UInt64(5200088)) XCTAssert(pres.count == 1) let decoded = pres[0].decodedResult XCTAssert(decoded["name"] as! String == "Transfer") @@ -31,28 +30,24 @@ class web3swift_remoteParsing_Tests: XCTestCase { XCTAssert(pres[0].transactionReceipt!.transactionHash.toHexString().addHexPrefix() == "0xcb235e8c6ecda032bc82c1084d2159ab82e7e4de35be703da6e80034bc577673") } - func testEventParsing2usingABIv2() { + func testEventParsing2usingABIv2() throws { let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"name\":\"_tokenName\",\"type\":\"string\"},{\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},]" let web3 = Web3.InfuraMainnetWeb3() let contract = web3.contract(jsonString, at: nil, abiVersion: 2) guard let eventParser = contract?.createEventParser("Transfer", filter: nil) else {return XCTFail()} - let present = eventParser.parseBlockByNumber(UInt64(5200120)) - guard case .success(let pres) = present else {return XCTFail()} - print(pres) + let pres = try eventParser.parseBlockByNumber(UInt64(5200120)) XCTAssert(pres.count == 81) } - func testEventParsing3usingABIv2() { + func testEventParsing3usingABIv2() throws { let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"name\":\"_tokenName\",\"type\":\"string\"},{\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},]" let web3 = Web3.InfuraMainnetWeb3() let contract = web3.contract(jsonString, at: nil, abiVersion: 2) guard let eventParser = contract?.createEventParser("Transfer", filter: nil) else {return XCTFail()} - let blockNumber = web3.eth.getBlockNumber() - guard case .success(let currentBlock) = blockNumber else {return XCTFail()} + let currentBlock = try web3.eth.getBlockNumber() let currentBlockAsInt = UInt64(currentBlock) for i in currentBlockAsInt-1 ... currentBlockAsInt { - let present = eventParser.parseBlockByNumber(i) - guard case .success(let pres) = present else {return XCTFail()} + let pres = try eventParser.parseBlockByNumber(i) for p in pres { print("Block " + String(i) + "\n") print("Emitted by contract " + p.contractAddress.address + "\n") @@ -64,7 +59,7 @@ class web3swift_remoteParsing_Tests: XCTestCase { } } - func testEventParsing4usingABIv2() { + func testEventParsing4usingABIv2() throws { let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"name\":\"_tokenName\",\"type\":\"string\"},{\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},]" let web3 = Web3.InfuraMainnetWeb3() let contract = web3.contract(jsonString, at: nil, abiVersion: 2) @@ -72,16 +67,14 @@ class web3swift_remoteParsing_Tests: XCTestCase { filter.addresses = [EthereumAddress("0x53066cddbc0099eb6c96785d9b3df2aaeede5da3")!] filter.parameterFilters = [([EthereumAddress("0xefdcf2c36f3756ce7247628afdb632fa4ee12ec5")!] as [EventFilterable]), ([EthereumAddress("0xd5395c132c791a7f46fa8fc27f0ab6bacd824484")!] as [EventFilterable])] guard let eventParser = contract?.createEventParser("Transfer", filter: filter) else {return XCTFail()} - let present = eventParser.parseBlockByNumber(UInt64(5200120)) - guard case .success(let pres) = present else {return XCTFail()} - print(pres) + let pres = try eventParser.parseBlockByNumber(UInt64(5200120)) XCTAssert(pres.count == 1) //TODO: - Make following assert // with filter would be // [web3swift_iOS.EventLog(address: web3swift_iOS.EthereumAddress(_address: "0x53066cddbc0099eb6c96785d9b3df2aaeede5da3", type: web3swift_iOS.EthereumAddress.AddressType.normal), data: 32 bytes, logIndex: 132, removed: false, topics: [32 bytes, 32 bytes, 32 bytes])], status: web3swift_iOS.TransactionReceipt.TXStatus.ok, logsBloom: Optional(web3swift_iOS.EthereumBloomFilter(bytes: 256 bytes))), contractAddress: web3swift_iOS.EthereumAddress(_address: "0x53066cddbc0099eb6c96785d9b3df2aaeede5da3", type: web3swift_iOS.EthereumAddress.AddressType.normal), decodedResult: ["name": "Transfer", "1": web3swift_iOS.EthereumAddress(_address: "0xd5395c132c791a7f46fa8fc27f0ab6bacd824484", type: web3swift_iOS.EthereumAddress.AddressType.normal), "_from": web3swift_iOS.EthereumAddress(_address: "0xefdcf2c36f3756ce7247628afdb632fa4ee12ec5", type: web3swift_iOS.EthereumAddress.AddressType.normal), "_to": web3swift_iOS.EthereumAddress(_address: "0xd5395c132c791a7f46fa8fc27f0ab6bacd824484", type: web3swift_iOS.EthereumAddress.AddressType.normal), "2": 5000000000000000000, "0": web3swift_iOS.EthereumAddress(_address: "0xefdcf2c36f3756ce7247628afdb632fa4ee12ec5", type: web3swift_iOS.EthereumAddress.AddressType.normal), "_value": 5000000000000000000])] } - func testEventParsing5usingABIv2() { + func testEventParsing5usingABIv2() throws { let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"name\":\"_tokenName\",\"type\":\"string\"},{\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},]" let web3 = Web3.InfuraMainnetWeb3() let contract = web3.contract(jsonString, at: nil, abiVersion: 2) @@ -90,18 +83,11 @@ class web3swift_remoteParsing_Tests: XCTestCase { filter.toBlock = .blockNumber(UInt64(5200120)) filter.addresses = [EthereumAddress("0x53066cddbc0099eb6c96785d9b3df2aaeede5da3")!] filter.parameterFilters = [([EthereumAddress("0xefdcf2c36f3756ce7247628afdb632fa4ee12ec5")!] as [EventFilterable]), ([EthereumAddress("0xd5395c132c791a7f46fa8fc27f0ab6bacd824484")!] as [EventFilterable])] - guard let eventParserResult = contract?.getIndexedEvents(eventName: "Transfer", filter: filter) else {return XCTFail()} - switch eventParserResult { - case .success(let result): - print(result) - XCTAssert(result.count == 1) - case .failure(let error): - print(error) - XCTFail() - } + guard let result = try contract?.getIndexedEvents(eventName: "Transfer", filter: filter) else {return XCTFail()} + XCTAssert(result.count == 1) } - func testEventParsing6usingABIv2() { + func testEventParsing6usingABIv2() throws { let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"name\":\"_tokenName\",\"type\":\"string\"},{\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},]" let web3 = Web3.InfuraMainnetWeb3() let contract = web3.contract(jsonString, at: nil, abiVersion: 2) @@ -110,14 +96,7 @@ class web3swift_remoteParsing_Tests: XCTestCase { filter.toBlock = .blockNumber(UInt64(5200120)) filter.addresses = [EthereumAddress("0x53066cddbc0099eb6c96785d9b3df2aaeede5da3")!] filter.parameterFilters = [([EthereumAddress("0xefdcf2c36f3756ce7247628afdb632fa4ee12ec5")!] as [EventFilterable]), (nil as [EventFilterable]?)] - guard let eventParserResult = contract?.getIndexedEvents(eventName: "Transfer", filter: filter) else {return XCTFail()} - switch eventParserResult { - case .success(let result): - print(result) - XCTAssert(result.count == 2) - case .failure(let error): - print(error) - XCTFail() - } + guard let result = try contract?.getIndexedEvents(eventName: "Transfer", filter: filter) else {return XCTFail()} + XCTAssert(result.count == 2) } } diff --git a/web3swiftTests/web3swift_rinkeby_personalSignature_Tests.swift b/web3swiftTests/web3swift_rinkeby_personalSignature_Tests.swift index 55cf179a6..23818ef1e 100755 --- a/web3swiftTests/web3swift_rinkeby_personalSignature_Tests.swift +++ b/web3swiftTests/web3swift_rinkeby_personalSignature_Tests.swift @@ -8,6 +8,7 @@ import XCTest import CryptoSwift import BigInt import secp256k1_swift +import EthereumAddress @testable import web3swift_iOS @@ -34,7 +35,7 @@ class web3swift_rinkeby_personalSignature_Tests: XCTestCase { XCTAssert(expectedAddress == signer, "Failed to sign personal message") } - func testPersonalSignatureOnContract() { + func testPersonalSignatureOnContract() throws { let web3 = Web3.InfuraRinkebyWeb3() let tempKeystore = try! EthereumKeystoreV3(password: "") let keystoreManager = KeystoreManager([tempKeystore!]) @@ -51,30 +52,17 @@ class web3swift_rinkeby_personalSignature_Tests: XCTestCase { print("Personal hash = " + Web3.Utils.hashPersonalMessage(message.data(using: .utf8)!)!.toHexString()) let jsonString = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[{\"name\":\"_message\",\"type\":\"string\"}],\"name\":\"hashPersonalMessage\",\"outputs\":[{\"name\":\"hash\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_message\",\"type\":\"string\"},{\"name\":\"v\",\"type\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"recoverSigner\",\"outputs\":[{\"name\":\"signer\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}]" let contract = web3.contract(jsonString, at: EthereumAddress("0x6f1745a39059268e8e4572e97897b50e4aab62a8"), abiVersion: 2) - var options = Web3Options.defaultOptions() - options.from = expectedAddress - var intermediate = contract?.method("hashPersonalMessage", parameters: [message as AnyObject], options: options) - var result = intermediate!.call(options: nil) - switch result { - case .success(let res): - guard let hash = res["hash"]! as? Data else {return XCTFail()} - XCTAssert(Web3.Utils.hashPersonalMessage(message.data(using: .utf8)!)! == hash) - case .failure(let error): - print(error) - XCTFail() - } + var tx = contract?.read("hashPersonalMessage", parameters: [message as AnyObject]) + tx?.transactionOptions.from = expectedAddress + var result = try tx!.call() + guard let hash = result["hash"]! as? Data else {return XCTFail()} + XCTAssert(Web3.Utils.hashPersonalMessage(message.data(using: .utf8)!)! == hash) - intermediate = contract?.method("recoverSigner", parameters: [message, unmarshalledSignature.v, Data(unmarshalledSignature.r), Data(unmarshalledSignature.s)] as [AnyObject], options: options) - result = intermediate!.call(options: nil) - switch result { - case .success(let res): - guard let signer = res["signer"]! as? EthereumAddress else {return XCTFail()} - print(signer) - XCTAssert(signer == expectedAddress) - case .failure(let error): - print(error) - XCTFail() - } + tx = contract?.read("recoverSigner", parameters: [message, unmarshalledSignature.v, Data(unmarshalledSignature.r), Data(unmarshalledSignature.s)] as [AnyObject]) + tx?.transactionOptions.from = expectedAddress + result = try tx!.call() + guard let signer = result["signer"]! as? EthereumAddress else {return XCTFail()} + XCTAssert(signer == expectedAddress) } } From 3adf09b1b969e60b68045387a67e43fda4f53dc4 Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Tue, 30 Oct 2018 13:07:49 +0300 Subject: [PATCH 11/23] - allow EIP681 for now --- web3swift.podspec | 2 +- web3swift.xcodeproj/project.pbxproj | 4 ++++ web3swift/Utils/Classes/EIP681.swift | 35 ++++++++++++++-------------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/web3swift.podspec b/web3swift.podspec index 54f5fcc76..4810a7be4 100755 --- a/web3swift.podspec +++ b/web3swift.podspec @@ -18,7 +18,7 @@ s.module_name = 'Web3swift' s.ios.deployment_target = "9.0" s.osx.deployment_target = "10.11" s.source_files = "web3swift/**/*.{h,swift}", -s.exclude_files = "web3swift/ObjectiveCbridge/Classes/*.{swift}", "web3swift/Utils/Classes/EIP681.swift", "web3swift/Utils/Classes/ENS.swift", "web3swift/Utils/Classes/ENSResolver.swift" +s.exclude_files = "web3swift/ObjectiveCbridge/Classes/*.{swift}", "web3swift/Utils/Classes/ENS.swift", "web3swift/Utils/Classes/ENSResolver.swift" s.public_header_files = "web3swift/**/*.{h}" s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } diff --git a/web3swift.xcodeproj/project.pbxproj b/web3swift.xcodeproj/project.pbxproj index 071b82d95..776d2c4ee 100755 --- a/web3swift.xcodeproj/project.pbxproj +++ b/web3swift.xcodeproj/project.pbxproj @@ -101,6 +101,8 @@ 81909D2D218858EA007D2AE5 /* web3swift_ERC20_Class_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8159C50D2135901700197B91 /* web3swift_ERC20_Class_Tests.swift */; }; 81909D2E21885B2C007D2AE5 /* Web3+ERC721.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E94C5F217788E0005F54A0 /* Web3+ERC721.swift */; }; 81909D2F21885B2C007D2AE5 /* Web3+ERC721.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E94C5F217788E0005F54A0 /* Web3+ERC721.swift */; }; + 81909D4A218864A8007D2AE5 /* EIP681.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2862143DBF6004CD2C7 /* EIP681.swift */; }; + 81909D4B218864A9007D2AE5 /* EIP681.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2862143DBF6004CD2C7 /* EIP681.swift */; }; 81A1821520D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821620D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821A20D5A6F70016741F /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */; }; @@ -1059,6 +1061,7 @@ 817EBB162004FE4200E02EAA /* Web3+HttpProvider.swift in Sources */, 8103BBCC2077B84400499769 /* PlainKeystore.swift in Sources */, 81DFB3FF210775320011DC85 /* Web3+Infura.swift in Sources */, + 81909D4A218864A8007D2AE5 /* EIP681.swift in Sources */, 81C0FCF220440EB500D82FAF /* Web3+Protocols.swift in Sources */, 81C0FCF420440F0900D82FAF /* Web3+Options.swift in Sources */, 81A1822E20D67BC30016741F /* Promise+Web3+Eth+GetTransactionReceipt.swift in Sources */, @@ -1157,6 +1160,7 @@ 81C0FD042044A8A700D82FAF /* Web3+Options.swift in Sources */, 81A1823220D68A110016741F /* Promise+Batching.swift in Sources */, 4194813C203630530065A83B /* Base58.swift in Sources */, + 81909D4B218864A9007D2AE5 /* EIP681.swift in Sources */, 8103BBCD2077B84400499769 /* PlainKeystore.swift in Sources */, 4194813D203630530065A83B /* RIPEMD160+StackOveflow.swift in Sources */, 4194813E203630530065A83B /* Data+Extension.swift in Sources */, diff --git a/web3swift/Utils/Classes/EIP681.swift b/web3swift/Utils/Classes/EIP681.swift index 61b1e0e40..f53329ff8 100644 --- a/web3swift/Utils/Classes/EIP681.swift +++ b/web3swift/Utils/Classes/EIP681.swift @@ -120,23 +120,24 @@ extension Web3 { switch val { case .ethereumAddress(let ethereumAddress): nativeValue = ethereumAddress as AnyObject - case .ensAddress(let ens): - let web = web3(provider: InfuraProvider(Networks.fromInt(Int(code.chainID ?? 1)) ?? Networks.Mainnet)!) - let ensModel = ENS(web3: web) - let resolver = ensModel.resolver(forDomain: ens) - switch resolver { - case .failure(_): - nativeValue = ens as AnyObject - case .success(var res): - let address = res.addr(forDomain: ens) - switch address { - case .failure(_): - nativeValue = ens as AnyObject - case .success(let res): - nativeValue = res as AnyObject - } - } - + default: + return nil +// case .ensAddress(let ens): +// let web = web3(provider: InfuraProvider(Networks.fromInt(Int(code.chainID ?? 1)) ?? Networks.Mainnet)!) +// let ensModel = ENS(web3: web) +// let resolver = ensModel.resolver(forDomain: ens) +// switch resolver { +// case .failure(_): +// nativeValue = ens as AnyObject +// case .success(var res): +// let address = res.addr(forDomain: ens) +// switch address { +// case .failure(_): +// nativeValue = ens as AnyObject +// case .success(let res): +// nativeValue = res as AnyObject +// } +// } } case .uint(bits: _): if let val = BigUInt(value, radix: 10) { From 7a2178da1fc0928015ea4a0124a4b6b3d525f0cc Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Tue, 30 Oct 2018 13:26:34 +0300 Subject: [PATCH 12/23] - Import cleanups --- web3swift.podspec | 4 ++-- web3swift/Transaction/Classes/TransactionSigner.swift | 1 - web3swift/Utils/Classes/ENS.swift | 1 - web3swift/Utils/Classes/ENSResolver.swift | 1 - web3swift/Web3/Classes/Web3+Personal.swift | 1 - web3swift/Web3/Classes/Web3+TxPool.swift | 1 - web3swift/Web3/Classes/Web3.swift | 1 - 7 files changed, 2 insertions(+), 8 deletions(-) diff --git a/web3swift.podspec b/web3swift.podspec index 4810a7be4..ce711da4a 100755 --- a/web3swift.podspec +++ b/web3swift.podspec @@ -29,6 +29,6 @@ s.dependency 'PromiseKit', '~> 6.3' s.dependency 'scrypt', '~> 2.0' s.dependency 'secp256k1_swift', '~> 1.0.3' s.dependency 'SwiftRLP', '~> 1.1' -s.dependency 'EthereumAddress', '~> 1.0.1' -s.dependemcy 'EthereumABI', '~> 1.1.1' +s.dependency 'EthereumAddress', '~> 1.0.0' +s.dependency 'EthereumABI', '~> 1.1.1' end diff --git a/web3swift/Transaction/Classes/TransactionSigner.swift b/web3swift/Transaction/Classes/TransactionSigner.swift index aa962bcf0..b00b5d8c4 100755 --- a/web3swift/Transaction/Classes/TransactionSigner.swift +++ b/web3swift/Transaction/Classes/TransactionSigner.swift @@ -5,7 +5,6 @@ // import Foundation -import Result import BigInt import secp256k1_swift import EthereumAddress diff --git a/web3swift/Utils/Classes/ENS.swift b/web3swift/Utils/Classes/ENS.swift index 567fe7d20..dab9235e1 100644 --- a/web3swift/Utils/Classes/ENS.swift +++ b/web3swift/Utils/Classes/ENS.swift @@ -6,7 +6,6 @@ import Foundation import BigInt -import Result import EthereumAddress public class ENS { diff --git a/web3swift/Utils/Classes/ENSResolver.swift b/web3swift/Utils/Classes/ENSResolver.swift index ac9689c7d..e37cd38ec 100644 --- a/web3swift/Utils/Classes/ENSResolver.swift +++ b/web3swift/Utils/Classes/ENSResolver.swift @@ -6,7 +6,6 @@ import Foundation import BigInt -import Result import EthereumAddress public struct ResolverENS { diff --git a/web3swift/Web3/Classes/Web3+Personal.swift b/web3swift/Web3/Classes/Web3+Personal.swift index 2b9060899..4486ddbb4 100755 --- a/web3swift/Web3/Classes/Web3+Personal.swift +++ b/web3swift/Web3/Classes/Web3+Personal.swift @@ -6,7 +6,6 @@ import Foundation import BigInt -import Result import EthereumAddress extension web3.Personal { diff --git a/web3swift/Web3/Classes/Web3+TxPool.swift b/web3swift/Web3/Classes/Web3+TxPool.swift index 25ff46003..a9a58b6fe 100644 --- a/web3swift/Web3/Classes/Web3+TxPool.swift +++ b/web3swift/Web3/Classes/Web3+TxPool.swift @@ -5,7 +5,6 @@ // import Foundation -import Result import BigInt extension web3.TxPool { diff --git a/web3swift/Web3/Classes/Web3.swift b/web3swift/Web3/Classes/Web3.swift index 33ca06458..064d6c25e 100755 --- a/web3swift/Web3/Classes/Web3.swift +++ b/web3swift/Web3/Classes/Web3.swift @@ -5,7 +5,6 @@ // import Foundation -import Result public enum Web3Error: Error { case transactionSerializationError From 7f83ea28b2755c17bd7b0959f7a5e9d9edd1e02c Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Tue, 30 Oct 2018 13:43:37 +0300 Subject: [PATCH 13/23] - Remove "Result" everywhere - Make Podfile more explicit --- web3swift.podspec | 5 +-- .../Classes/Web3+BrowserFunctions.swift | 27 ++++++------- web3swift/Web3/Classes/Web3+Personal.swift | 32 ++++++--------- web3swift/Web3/Classes/Web3+TxPool.swift | 39 +++++-------------- web3swift/Web3/Classes/Web3.swift | 14 +++---- web3swift/web3swift-Bridging-Header.h | 6 +-- web3swift/web3swift.h | 6 +-- ...wift_rinkeby_personalSignature_Tests.swift | 11 ++---- 8 files changed, 52 insertions(+), 88 deletions(-) diff --git a/web3swift.podspec b/web3swift.podspec index ce711da4a..77ba9080e 100755 --- a/web3swift.podspec +++ b/web3swift.podspec @@ -17,9 +17,8 @@ s.swift_version = '4.1' s.module_name = 'Web3swift' s.ios.deployment_target = "9.0" s.osx.deployment_target = "10.11" -s.source_files = "web3swift/**/*.{h,swift}", -s.exclude_files = "web3swift/ObjectiveCbridge/Classes/*.{swift}", "web3swift/Utils/Classes/ENS.swift", "web3swift/Utils/Classes/ENSResolver.swift" -s.public_header_files = "web3swift/**/*.{h}" +s.source_files = "web3swift/{PrecompiledContracts,Promises,Web3,Contract,KeystoreManager,Transaction,Convenience}/Classes/*.{h,swift}", "web3swift/Utils/Classes/{EIP67Code, EIP681}.swift", "web3swift/HookedFunctions/Classes/Web3+Wallet.swift", "web3swift/web3swift.h" +s.public_header_files = "web3swift/web3swift.h" s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } s.frameworks = 'CoreImage' diff --git a/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift b/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift index 28ad05158..376f2f7f1 100755 --- a/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift +++ b/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift @@ -111,21 +111,22 @@ extension web3.BrowserFunctions { return self.prepareTxForApproval(transaction, options: options) } - public func prepareTxForApproval(_ trans: EthereumTransaction, options opts: Web3Options) -> (transaction: EthereumTransaction?, options: Web3Options?) { - var transaction = trans - var options = opts - guard let _ = options.from else {return (nil, nil)} - let gasPriceResult = self.web3.eth.getGasPrice() - if case .failure(_) = gasPriceResult { + public func prepareTxForApproval(_ trans: EthereumTransaction, options opts: Web3Options) throws -> (transaction: EthereumTransaction?, options: Web3Options?) { + do { + var transaction = trans + var options = opts + guard let _ = options.from else {return (nil, nil)} + let gasPrice = try self.web3.eth.getGasPrice() + transaction.gasPrice = gasPrice + options.gasPrice = gasPrice + guard let gasEstimate = self.estimateGas(transaction, options: options) else {return (nil, nil)} + transaction.gasLimit = gasEstimate + options.gasLimit = gasEstimate + print(transaction) + return (transaction, options) + } catch { return (nil, nil) } - transaction.gasPrice = gasPriceResult.value! - options.gasPrice = gasPriceResult.value! - guard let gasEstimate = self.estimateGas(transaction, options: options) else {return (nil, nil)} - transaction.gasLimit = gasEstimate - options.gasLimit = gasEstimate - print(transaction) - return (transaction, options) } public func signTransaction(_ transactionJSON: [String: Any], password: String = "web3swift") -> String? { diff --git a/web3swift/Web3/Classes/Web3+Personal.swift b/web3swift/Web3/Classes/Web3+Personal.swift index 4486ddbb4..0363be491 100755 --- a/web3swift/Web3/Classes/Web3+Personal.swift +++ b/web3swift/Web3/Classes/Web3+Personal.swift @@ -24,13 +24,9 @@ extension web3.Personal { - important: This call is synchronous */ - public func signPersonalMessage(message: Data, from: EthereumAddress, password:String = "web3swift") -> Result { - do { - let result = try self.signPersonalMessagePromise(message: message, from: from, password: password).wait() - return Result(result) - } catch { - return Result.failure(error as! Web3Error) - } + public func signPersonalMessage(message: Data, from: EthereumAddress, password:String = "web3swift") throws -> Data { + let result = try self.signPersonalMessagePromise(message: message, from: from, password: password).wait() + return result } /** @@ -47,13 +43,9 @@ extension web3.Personal { - important: This call is synchronous. Does nothing if private keys are stored locally. */ - public func unlockAccount(account: EthereumAddress, password:String = "web3swift", seconds: UInt64 = 300) -> Result { - do { - let result = try self.unlockAccountPromise(account: account).wait() - return Result(result) - } catch { - return Result.failure(error as! Web3Error) - } + public func unlockAccount(account: EthereumAddress, password:String = "web3swift", seconds: UInt64 = 300) throws -> Bool { + let result = try self.unlockAccountPromise(account: account).wait() + return result } /** @@ -67,11 +59,11 @@ extension web3.Personal { - Result object */ - public func ecrecover(personalMessage: Data, signature: Data) -> Result { + public func ecrecover(personalMessage: Data, signature: Data) throws -> EthereumAddress { guard let recovered = Web3.Utils.personalECRecover(personalMessage, signature: signature) else { - return Result.failure(Web3Error.dataError) + throw Web3Error.dataError } - return Result(recovered) + return recovered } /** @@ -85,10 +77,10 @@ extension web3.Personal { - Result object */ - public func ecrecover(hash: Data, signature: Data) -> Result { + public func ecrecover(hash: Data, signature: Data) throws -> EthereumAddress { guard let recovered = Web3.Utils.hashECRecover(hash: hash, signature: signature) else { - return Result.failure(Web3Error.dataError) + throw Web3Error.dataError } - return Result(recovered) + return recovered } } diff --git a/web3swift/Web3/Classes/Web3+TxPool.swift b/web3swift/Web3/Classes/Web3+TxPool.swift index a9a58b6fe..ccf9efc51 100644 --- a/web3swift/Web3/Classes/Web3+TxPool.swift +++ b/web3swift/Web3/Classes/Web3+TxPool.swift @@ -8,39 +8,18 @@ import Foundation import BigInt extension web3.TxPool { - public func getInspect() -> Result<[String:[String:[String:String]]], Web3Error> { - do { - let result = try self.getInspectPromise().wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getInspect() throws -> [String:[String:[String:String]]] { + let result = try self.getInspectPromise().wait() + return result } - public func getStatus() -> Result { - do { - let result = try self.getStatusPromise().wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getStatus() throws -> TxPoolStatus { + let result = try self.getStatusPromise().wait() + return result } - public func getContent() -> Result { - do { - let result = try self.getContentPromise().wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getContent() throws -> TxPoolContent { + let result = try self.getContentPromise().wait() + return result } } diff --git a/web3swift/Web3/Classes/Web3.swift b/web3swift/Web3/Classes/Web3.swift index 064d6c25e..0d8c25c35 100755 --- a/web3swift/Web3/Classes/Web3.swift +++ b/web3swift/Web3/Classes/Web3.swift @@ -77,24 +77,24 @@ public struct Web3 { } struct ResultUnwrapper { - static func getResponse(_ response: [String: Any]?) -> Result { + static func getResponse(_ response: [String: Any]?) throws -> Any { guard response != nil, let res = response else { - return Result.failure(Web3Error.connectionError) + throw Web3Error.connectionError } if let error = res["error"] { if let errString = error as? String { - return Result.failure(Web3Error.nodeError(desc: errString)) + throw Web3Error.nodeError(desc: errString) } else if let errDict = error as? [String:Any] { if errDict["message"] != nil, let descr = errDict["message"]! as? String { - return Result.failure(Web3Error.nodeError(desc: descr)) + throw Web3Error.nodeError(desc: descr) } } - return Result.failure(Web3Error.unknownError) + throw Web3Error.unknownError } guard let result = res["result"] else { - return Result.failure(Web3Error.dataError) + throw Web3Error.dataError } - return Result(result) + return result } } diff --git a/web3swift/web3swift-Bridging-Header.h b/web3swift/web3swift-Bridging-Header.h index 4eb75bede..f2e2c8039 100755 --- a/web3swift/web3swift-Bridging-Header.h +++ b/web3swift/web3swift-Bridging-Header.h @@ -1,9 +1,7 @@ -// -// web3swift-Bridging-Header.h // web3swift // -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // #ifndef web3swift_Bridging_Header_h diff --git a/web3swift/web3swift.h b/web3swift/web3swift.h index fe4270f58..790492491 100755 --- a/web3swift/web3swift.h +++ b/web3swift/web3swift.h @@ -1,9 +1,7 @@ -// -// web3swift.h // web3swift // -// Created by Petr Korolev on 06/12/2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // #if TARGET_OS_IPHONE diff --git a/web3swiftTests/web3swift_rinkeby_personalSignature_Tests.swift b/web3swiftTests/web3swift_rinkeby_personalSignature_Tests.swift index 23818ef1e..e404ceba8 100755 --- a/web3swiftTests/web3swift_rinkeby_personalSignature_Tests.swift +++ b/web3swiftTests/web3swift_rinkeby_personalSignature_Tests.swift @@ -15,7 +15,7 @@ import EthereumAddress class web3swift_rinkeby_personalSignature_Tests: XCTestCase { - func testPersonalSignature() { + func testPersonalSignature() throws { let web3 = Web3.InfuraRinkebyWeb3() let tempKeystore = try! EthereumKeystoreV3(password: "") let keystoreManager = KeystoreManager([tempKeystore!]) @@ -23,15 +23,13 @@ class web3swift_rinkeby_personalSignature_Tests: XCTestCase { let message = "Hello World" let expectedAddress = keystoreManager.addresses![0] print(expectedAddress) - let signRes = web3.personal.signPersonalMessage(message: message.data(using: .utf8)!, from: expectedAddress, password: "") - guard case .success(let signature) = signRes else {return XCTFail()} + let signature = try web3.personal.signPersonalMessage(message: message.data(using: .utf8)!, from: expectedAddress, password: "") let unmarshalledSignature = SECP256K1.unmarshalSignature(signatureData: signature)! print("V = " + String(unmarshalledSignature.v)) print("R = " + Data(unmarshalledSignature.r).toHexString()) print("S = " + Data(unmarshalledSignature.s).toHexString()) print("Personal hash = " + Web3.Utils.hashPersonalMessage(message.data(using: .utf8)!)!.toHexString()) - let recoveredSigner = web3.personal.ecrecover(personalMessage: message.data(using: .utf8)!, signature: signature) - guard case .success(let signer) = recoveredSigner else {return XCTFail()} + let signer = try web3.personal.ecrecover(personalMessage: message.data(using: .utf8)!, signature: signature) XCTAssert(expectedAddress == signer, "Failed to sign personal message") } @@ -43,8 +41,7 @@ class web3swift_rinkeby_personalSignature_Tests: XCTestCase { let message = "Hello World" let expectedAddress = keystoreManager.addresses![0] print(expectedAddress) - let signRes = web3.personal.signPersonalMessage(message: message.data(using: .utf8)!, from: expectedAddress, password: "") - guard case .success(let signature) = signRes else {return XCTFail()} + let signature = try web3.personal.signPersonalMessage(message: message.data(using: .utf8)!, from: expectedAddress, password: "") let unmarshalledSignature = SECP256K1.unmarshalSignature(signatureData: signature)! print("V = " + String(unmarshalledSignature.v)) print("R = " + Data(unmarshalledSignature.r).toHexString()) From cbca306177b84accf786866cd9f1c07f59172ae6 Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Tue, 30 Oct 2018 14:46:08 +0300 Subject: [PATCH 14/23] - Implement event loop. Should be started manually --- web3swift.xcodeproj/project.pbxproj | 4 + web3swift/Web3/Classes/Web3+Eventloop.swift | 85 +++++++++++++++++++ web3swift/Web3/Classes/Web3+Instance.swift | 11 +-- .../web3swift_Eventloop_Tests.swift | 38 +++++++++ .../web3swift_keystores_Tests.swift | 16 ++++ 5 files changed, 149 insertions(+), 5 deletions(-) create mode 100644 web3swiftTests/web3swift_Eventloop_Tests.swift diff --git a/web3swift.xcodeproj/project.pbxproj b/web3swift.xcodeproj/project.pbxproj index 776d2c4ee..0d69ba87b 100755 --- a/web3swift.xcodeproj/project.pbxproj +++ b/web3swift.xcodeproj/project.pbxproj @@ -103,6 +103,7 @@ 81909D2F21885B2C007D2AE5 /* Web3+ERC721.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E94C5F217788E0005F54A0 /* Web3+ERC721.swift */; }; 81909D4A218864A8007D2AE5 /* EIP681.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2862143DBF6004CD2C7 /* EIP681.swift */; }; 81909D4B218864A9007D2AE5 /* EIP681.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2862143DBF6004CD2C7 /* EIP681.swift */; }; + 81909D4F21887658007D2AE5 /* web3swift_Eventloop_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D4E21887658007D2AE5 /* web3swift_Eventloop_Tests.swift */; }; 81A1821520D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821620D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821A20D5A6F70016741F /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */; }; @@ -262,6 +263,7 @@ 81909D1421862D37007D2AE5 /* Web3+MutatingTransaction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+MutatingTransaction.swift"; sourceTree = ""; }; 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+Eventloop.swift"; sourceTree = ""; }; 81909D2021884893007D2AE5 /* BigUInt+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BigUInt+Extensions.swift"; sourceTree = ""; }; + 81909D4E21887658007D2AE5 /* web3swift_Eventloop_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_Eventloop_Tests.swift; sourceTree = ""; }; 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetBalance.swift"; sourceTree = ""; }; 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+HttpProvider.swift"; sourceTree = ""; }; 81A1821C20D5C6C10016741F /* web3swift_promises_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_promises_Tests.swift; sourceTree = ""; }; @@ -424,6 +426,7 @@ 1CD91B301FD769A6007BFB45 /* web3swiftTests */ = { isa = PBXGroup; children = ( + 81909D4E21887658007D2AE5 /* web3swift_Eventloop_Tests.swift */, 1CB8188F2160867700726CF8 /* key.json */, 81A7B2892143DF1D004CD2C7 /* web3swift_EIP681_Tests.swift */, 81A7B2782143C978004CD2C7 /* web3swift_ENS_Tests.swift */, @@ -1093,6 +1096,7 @@ 81909D1F2187BD20007D2AE5 /* web3swift_numberFormattingUtil_Tests.swift in Sources */, 81909D1E2187BC8B007D2AE5 /* web3swift_transactions_Tests.swift in Sources */, 81909D2D218858EA007D2AE5 /* web3swift_ERC20_Class_Tests.swift in Sources */, + 81909D4F21887658007D2AE5 /* web3swift_Eventloop_Tests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/web3swift/Web3/Classes/Web3+Eventloop.swift b/web3swift/Web3/Classes/Web3+Eventloop.swift index c909fadc6..8be27b909 100644 --- a/web3swift/Web3/Classes/Web3+Eventloop.swift +++ b/web3swift/Web3/Classes/Web3+Eventloop.swift @@ -8,4 +8,89 @@ import Foundation extension web3.Eventloop { +// @available(iOS 10.0, *) + public func start(_ timeInterval: TimeInterval) { + if self.timer != nil { + self.timer!.suspend() + self.timer = nil + } + let queue = self.web3.requestDispatcher.queue + queue.async { + self.timer = RepeatingTimer(timeInterval: timeInterval) + self.timer?.eventHandler = self.runnable + self.timer?.resume() + } + } + + public func stop() { + if self.timer != nil { + self.timer!.suspend() + self.timer = nil + } + } + + @objc func runnable() { + for prop in self.monitoredProperties { + let queue = prop.queue + let function = prop.calledFunction + queue.async { + function(self.web3) + } + } + } +} + +// Thank you https://medium.com/@danielgalasko/a-background-repeating-timer-in-swift-412cecfd2ef9 +class RepeatingTimer { + + let timeInterval: TimeInterval + + init(timeInterval: TimeInterval) { + self.timeInterval = timeInterval + } + + private lazy var timer: DispatchSourceTimer = { + let t = DispatchSource.makeTimerSource() + t.schedule(deadline: .now() + self.timeInterval, repeating: self.timeInterval) + t.setEventHandler(handler: { [weak self] in + self?.eventHandler?() + }) + return t + }() + + var eventHandler: (() -> Void)? + + private enum State { + case suspended + case resumed + } + + private var state: State = .suspended + + deinit { + timer.setEventHandler {} + timer.cancel() + /* + If the timer is suspended, calling cancel without resuming + triggers a crash. This is documented here https://forums.developer.apple.com/thread/15902 + */ + resume() + eventHandler = nil + } + + func resume() { + if state == .resumed { + return + } + state = .resumed + timer.resume() + } + + func suspend() { + if state == .suspended { + return + } + state = .suspended + timer.suspend() + } } diff --git a/web3swift/Web3/Classes/Web3+Instance.swift b/web3swift/Web3/Classes/Web3+Instance.swift index 42033f400..abd6eb7d0 100755 --- a/web3swift/Web3/Classes/Web3+Instance.swift +++ b/web3swift/Web3/Classes/Web3+Instance.swift @@ -166,18 +166,19 @@ public class web3: Web3OptionsInheritable { } public class Eventloop: Web3OptionsInheritable { - public typealias FunctionCall = (web3) -> Result + public typealias EventLoopCall = (web3) -> Void - public struct MonitoredProperty { + public struct MonitoredProperty { public var name: String - public var calledFunction: FunctionCall + public var queue: DispatchQueue + public var calledFunction: EventLoopCall } var provider:Web3Provider // weak var web3: web3? var web3: web3 - var timer: Promise? - var monitoredProperties: [AnyObject] = [AnyObject]() + var timer: RepeatingTimer? = nil + var monitoredProperties: [MonitoredProperty] = [MonitoredProperty]() public var options: Web3Options { return self.web3.options } diff --git a/web3swiftTests/web3swift_Eventloop_Tests.swift b/web3swiftTests/web3swift_Eventloop_Tests.swift new file mode 100644 index 000000000..5817ab5a9 --- /dev/null +++ b/web3swiftTests/web3swift_Eventloop_Tests.swift @@ -0,0 +1,38 @@ +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import XCTest +import EthereumAddress + +@testable import web3swift_iOS + +class web3swift_Eventloop_Tests: XCTestCase { + + func testBasicEventLoop() { + var ticksToWait = 10 + let expectation = self.expectation(description: "Waiting") + func getBlockNumber(_ web3: web3) { + do { + let blockNumber = try web3.eth.getBlockNumber() + print("Block number = " + String(blockNumber)) + ticksToWait = ticksToWait - 1 + if ticksToWait == 0 { + expectation.fulfill() + } + } catch { + print(error) + } + } + let web3main = Web3.InfuraMainnetWeb3() + let functionToCall: web3.Eventloop.EventLoopCall = getBlockNumber + let monitoredProperty = web3.Eventloop.MonitoredProperty.init(name: "onNewBlock", queue: web3main.requestDispatcher.queue, calledFunction: functionToCall) + web3main.eventLoop.monitoredProperties.append(monitoredProperty) + web3main.eventLoop.start(1) + + waitForExpectations(timeout: 30, handler: nil) + } + +} diff --git a/web3swiftTests/web3swift_keystores_Tests.swift b/web3swiftTests/web3swift_keystores_Tests.swift index b1abc3c3a..1047ee858 100755 --- a/web3swiftTests/web3swift_keystores_Tests.swift +++ b/web3swiftTests/web3swift_keystores_Tests.swift @@ -49,6 +49,22 @@ class web3swift_Keystores_tests: XCTestCase { XCTAssertNotNil(key) } + func testV3keystoreSerialization() { + let keystore = try! EthereumKeystoreV3(password: ""); + XCTAssertNotNil(keystore) + let account = keystore!.addresses![0] + let data = try! keystore!.serialize() + let key = try! keystore!.UNSAFE_getPrivateKeyData(password: "", account: account) + XCTAssertNotNil(key) + + let restored = EthereumKeystoreV3(data!) + XCTAssertNotNil(restored) + XCTAssertEqual(keystore!.addresses!.first!, restored!.addresses!.first!) + let restoredKey = try! restored!.UNSAFE_getPrivateKeyData(password: "", account: account) + XCTAssertNotNil(restoredKey) + XCTAssertEqual(key, restoredKey) + } + func testNewBIP32keystore() { let mnemonic = try! BIP39.generateMnemonics(bitsOfEntropy: 256)! let keystore = try! BIP32Keystore(mnemonics: mnemonic, password: "", mnemonicsPassword: "") From b988fa537d6a2f9f707a659f252db4c485ca8201 Mon Sep 17 00:00:00 2001 From: BaldyAsh Date: Fri, 2 Nov 2018 16:09:09 +0300 Subject: [PATCH 15/23] updated pods to fix building --- Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h | 2 +- Pods/Headers/Public/BigInt/BigInt-iOS.modulemap | 2 +- Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h | 2 +- Pods/Headers/Public/BigInt/BigInt-macOS.modulemap | 2 +- Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h | 2 +- Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap | 2 +- Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h | 2 +- Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap | 2 +- Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h | 2 +- Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap | 2 +- Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h | 2 +- Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap | 2 +- .../Public/EthereumAddress/EthereumAddress-iOS-umbrella.h | 2 +- .../Public/EthereumAddress/EthereumAddress-iOS.modulemap | 2 +- .../Public/EthereumAddress/EthereumAddress-macOS-umbrella.h | 2 +- .../Public/EthereumAddress/EthereumAddress-macOS.modulemap | 2 +- Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h | 2 +- Pods/Headers/Public/PromiseKit/PromiseKit.modulemap | 2 +- .../PromiseKit.root-CorePromise-Foundation-umbrella.h | 2 +- .../PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap | 2 +- Pods/Headers/Public/Result/Result-iOS-umbrella.h | 2 +- Pods/Headers/Public/Result/Result-iOS.modulemap | 2 +- Pods/Headers/Public/Result/Result-macOS-umbrella.h | 2 +- Pods/Headers/Public/Result/Result-macOS.modulemap | 2 +- Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h | 2 +- Pods/Headers/Public/SipHash/SipHash-iOS.modulemap | 2 +- Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h | 2 +- Pods/Headers/Public/SipHash/SipHash-macOS.modulemap | 2 +- Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h | 2 +- Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap | 2 +- Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h | 2 +- Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap | 2 +- Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h | 2 +- Pods/Headers/Public/scrypt/scrypt-iOS.modulemap | 2 +- Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h | 2 +- Pods/Headers/Public/scrypt/scrypt-macOS.modulemap | 2 +- .../Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h | 2 +- .../Public/secp256k1_swift/secp256k1_swift-iOS.modulemap | 2 +- .../Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h | 2 +- .../Public/secp256k1_swift/secp256k1_swift-macOS.modulemap | 2 +- 40 files changed, 40 insertions(+), 40 deletions(-) diff --git a/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h b/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h index d04d0f479..54c439564 120000 --- a/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h +++ b/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap b/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap index 5e3ba93be..5827ffd6f 120000 --- a/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap +++ b/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h b/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h index 7c100fb6e..15cd9101e 120000 --- a/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h +++ b/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap b/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap index 309999e26..db0458375 120000 --- a/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap +++ b/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h index 53d6c211e..38ee2e270 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap index c3e3c3a34..d3c8afa43 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h index 1bf7d4d73..4f6598359 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap index 19cb03653..13bb9bda2 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h b/Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h index 82745e647..372038959 120000 --- a/Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h +++ b/Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap b/Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap index bff509710..ded50b1ab 120000 --- a/Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap +++ b/Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h b/Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h index c4a703b51..e72800bb6 120000 --- a/Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h +++ b/Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap b/Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap index c270ce50e..99eb1eb31 120000 --- a/Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap +++ b/Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h index 48a0c2378..505dcdba1 120000 --- a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap index 5daa54791..2e8de9c1b 120000 --- a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h index ec4284bbd..45c29b7ea 120000 --- a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap index 71f266362..1814f3891 120000 --- a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h b/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h index 54a39550a..384f088cd 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h +++ b/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap b/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap index 03e17826b..5b105d963 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap +++ b/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h index 2202ae821..6026bec84 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h +++ b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap index 377be965b..515bc96ce 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap +++ b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-iOS-umbrella.h b/Pods/Headers/Public/Result/Result-iOS-umbrella.h index a7f847b9e..5017bcc62 120000 --- a/Pods/Headers/Public/Result/Result-iOS-umbrella.h +++ b/Pods/Headers/Public/Result/Result-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-iOS.modulemap b/Pods/Headers/Public/Result/Result-iOS.modulemap index bc4f23ca4..a9cb518ea 120000 --- a/Pods/Headers/Public/Result/Result-iOS.modulemap +++ b/Pods/Headers/Public/Result/Result-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-macOS-umbrella.h b/Pods/Headers/Public/Result/Result-macOS-umbrella.h index 5c92b47bc..d933679ed 120000 --- a/Pods/Headers/Public/Result/Result-macOS-umbrella.h +++ b/Pods/Headers/Public/Result/Result-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-macOS.modulemap b/Pods/Headers/Public/Result/Result-macOS.modulemap index a1725381e..6ff87c94a 120000 --- a/Pods/Headers/Public/Result/Result-macOS.modulemap +++ b/Pods/Headers/Public/Result/Result-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h b/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h index 909a01c80..736829e4f 120000 --- a/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h +++ b/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap b/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap index 60dbe3748..363bde1c4 120000 --- a/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap +++ b/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h b/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h index b1f95e224..c56e6a45b 120000 --- a/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h +++ b/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap b/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap index 5ea25fc9c..835353525 120000 --- a/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap +++ b/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h index b1b552e68..b77347325 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap index 0842d08e1..ae407f989 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h index b77715c02..4740a4f84 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap index c5cebdd37..d1421e204 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h b/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h index e82a48440..1c81cd5a7 120000 --- a/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h +++ b/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap b/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap index 082fbbbba..02bd8338d 120000 --- a/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap +++ b/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h b/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h index 7a0dabd86..75f99866d 120000 --- a/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h +++ b/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap b/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap index 9ec4c6ed1..2e33aed25 120000 --- a/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap +++ b/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h index 554c654f1..70cc63a67 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap index 44829fb84..c5b6fa265 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h index 56967ab47..d75b444d6 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap index 0ec25a913..c0e372d55 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap @@ -1 +1 @@ -/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap \ No newline at end of file +/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap \ No newline at end of file From 0a6e5b0f699b19a24c40d0da50bda3fb01f6dea5 Mon Sep 17 00:00:00 2001 From: BaldyAsh Date: Fri, 2 Nov 2018 19:35:43 +0300 Subject: [PATCH 16/23] fixed ens and ens resolver for 2.0, tests dont pass - need to fix --- web3swift.xcodeproj/project.pbxproj | 10 + web3swift/Utils/Classes/ENS.swift | 242 ++++++------------ web3swift/Utils/Classes/ENSResolver.swift | 205 ++++++--------- .../Classes/Web3+MutatingTransaction.swift | 4 +- 4 files changed, 173 insertions(+), 288 deletions(-) diff --git a/web3swift.xcodeproj/project.pbxproj b/web3swift.xcodeproj/project.pbxproj index 0d69ba87b..ed32b1f28 100755 --- a/web3swift.xcodeproj/project.pbxproj +++ b/web3swift.xcodeproj/project.pbxproj @@ -176,6 +176,11 @@ E2065FB92181D7D700701068 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81195AAF20D7FF8500ABC6B1 /* Promise+Web3+Contract+GetIndexedEvents.swift */; }; E2065FBA2181D7D700701068 /* Promise+Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 985BFD4D216E2E0A00B28C14 /* Promise+Web3+TxPool.swift */; }; E2065FBB2181D7D700701068 /* Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 985BFD49216CE8B100B28C14 /* Web3+TxPool.swift */; }; + E2DCA653218C875100F94FBA /* web3swift_ENS_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2782143C978004CD2C7 /* web3swift_ENS_Tests.swift */; }; + E2DCA654218C879900F94FBA /* ENS.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2E668CD214F8A7B00C3CC2D /* ENS.swift */; }; + E2DCA655218C879900F94FBA /* ENSResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B219DC162154F3EE0035BF94 /* ENSResolver.swift */; }; + E2DCA656218C87A500F94FBA /* ENS.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2E668CD214F8A7B00C3CC2D /* ENS.swift */; }; + E2DCA657218C87A500F94FBA /* ENSResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B219DC162154F3EE0035BF94 /* ENSResolver.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -1004,6 +1009,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E2DCA654218C879900F94FBA /* ENS.swift in Sources */, + E2DCA655218C879900F94FBA /* ENSResolver.swift in Sources */, 81C146F71FF274B200AA943E /* Web3+Structures.swift in Sources */, 8104E2281FE82BDC00F952CB /* Web3+Utils.swift in Sources */, 81909D2B218852E2007D2AE5 /* Web3+ERC20.swift in Sources */, @@ -1083,6 +1090,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E2DCA653218C875100F94FBA /* web3swift_ENS_Tests.swift in Sources */, 81909D292188504D007D2AE5 /* web3swift_AdvancedABIv2_Tests.swift in Sources */, 00E5FE8220EA3FF40030E0D6 /* web3swift_infura_Tests.swift in Sources */, 81909D2A21885067007D2AE5 /* web3swift_rinkeby_personalSignature_Tests.swift in Sources */, @@ -1104,6 +1112,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E2DCA656218C87A500F94FBA /* ENS.swift in Sources */, + E2DCA657218C87A500F94FBA /* ENSResolver.swift in Sources */, E2065FB82181D7D700701068 /* Promise+Web3+Eth+EstimateGas.swift in Sources */, E2065FB92181D7D700701068 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */, 81909D2C218852E2007D2AE5 /* Web3+ERC20.swift in Sources */, diff --git a/web3swift/Utils/Classes/ENS.swift b/web3swift/Utils/Classes/ENS.swift index dab9235e1..87a1c4174 100644 --- a/web3swift/Utils/Classes/ENS.swift +++ b/web3swift/Utils/Classes/ENS.swift @@ -33,216 +33,126 @@ public class ENS { return contract! }() - private lazy var defaultOptions: Web3Options = { - return Web3Options.defaultOptions() + private lazy var defaultOptions: TransactionOptions = { + return TransactionOptions.defaultOptions }() //MARK: - Convenience methods - public func getAddress(_ domain: String) -> Result { - let resolver = self.resolver(forDomain: domain) - switch resolver { - case .success(var resolver): - let isAddrSupports = resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.addr.hash()) - switch isAddrSupports{ - case .success(let isSupported): - if isSupported { - return resolver.addr(forDomain: domain) - } else { - return Result.failure(Web3Error.dataError) - } - case .failure(let error): - return Result.failure(error) - } - case .failure(let error): - return Result.failure(error) - } + public func getAddress(_ domain: String) throws -> EthereumAddress { + guard var resolver = try? self.resolver(forDomain: domain) else {throw Web3Error.processingError(desc: "Failed to get resolver for domain")} + guard let isAddrSupports = try? resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.addr.hash()) else {throw Web3Error.processingError(desc: "Resolver don't support interface with this ID")} + guard isAddrSupports else {throw Web3Error.processingError(desc: "Address isn't supported")} + guard let addr = try? resolver.addr(forDomain: domain) else {throw Web3Error.processingError(desc: "Can't get address")} + return addr } - public func setAddress(domain: String, address: EthereumAddress, options: Web3Options, password: String? = nil) -> Result{ - let resolver = self.resolver(forDomain: domain) - switch resolver { - case .success(var resolver): - let isSetAddrSupported = resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.addr.hash()) - switch isSetAddrSupported { - case .success(let value): - if value { - return resolver.setAddr(node: domain, address: address, options: options, password: password) - } else { - return Result.failure(Web3Error.dataError) - } - case .failure(let error): - return Result.failure(error) - } - case .failure(let error): - return Result.failure(error) - } + public func setAddress(domain: String, address: EthereumAddress, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { + guard var resolver = try? self.resolver(forDomain: domain) else {throw Web3Error.processingError(desc: "Failed to get resolver for domain")} + guard let isAddrSupports = try? resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.addr.hash()) else {throw Web3Error.processingError(desc: "Resolver don't support interface with this ID")} + guard isAddrSupports else {throw Web3Error.processingError(desc: "Address isn't supported")} + guard let result = try? resolver.setAddr(node: domain, address: address, options: options, password: password) else {throw Web3Error.processingError(desc: "Can't get result")} + return result } - public func getPubkey(domain: String) -> Result { - let resolver = self.resolver(forDomain: domain) - switch resolver { - case .success(var resolver): - let isPubkeySupports = resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.pubkey.hash()) - switch isPubkeySupports { - case .success(let value): - if value { - return resolver.pubkey(node: domain) - } else { - return Result.failure(Web3Error.dataError) - } - case .failure(let error): - return Result.failure(error) - } - - case .failure(let error): - return Result.failure(error) - } + public func getPubkey(domain: String) throws -> PublicKey { + guard var resolver = try? self.resolver(forDomain: domain) else {throw Web3Error.processingError(desc: "Failed to get resolver for domain")} + guard let isPubkeySupports = try? resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.pubkey.hash()) else {throw Web3Error.processingError(desc: "Resolver don't support interface with this ID")} + guard isPubkeySupports else {throw Web3Error.processingError(desc: "Pubkey isn't supported")} + guard let pubkey = try? resolver.pubkey(node: domain) else {throw Web3Error.processingError(desc: "Can't get pubkey")} + return pubkey } - public func setPubkey(domain: String, x: String, y: String, options: Web3Options, password: String? = nil) -> Result { - let resolver = self.resolver(forDomain: domain) - switch resolver { - case .success(var value): - return value.setPubkey(node: domain, x: x, y: y, options: options, password: password) - case .failure(let error): - return Result.failure(error) - } + public func setPubkey(domain: String, x: String, y: String, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { + guard var resolver = try? self.resolver(forDomain: domain) else {throw Web3Error.processingError(desc: "Failed to get resolver for domain")} + guard let result = try? resolver.setPubkey(node: domain, x: x, y: y, options: options, password: password) else {throw Web3Error.processingError(desc: "Can't get result")} + return result } - public func getContent(domain: String) -> Result { - let resolver = self.resolver(forDomain: domain) - switch resolver { - case .success(var value): - return value.content(node: domain) - case .failure(let error): - return Result.failure(error) - } + public func getContent(domain: String) throws -> String { + guard var resolver = try? self.resolver(forDomain: domain) else {throw Web3Error.processingError(desc: "Failed to get resolver for domain")} + guard let content = try? resolver.content(node: domain) else {throw Web3Error.processingError(desc: "Can't get content")} + return content } - public func setContent(domain: String, hash: String, options: Web3Options, password: String? = nil) -> Result { - let resolver = self.resolver(forDomain: domain) - switch resolver { - case .success(var value): - return value.setContent(node: domain, hash: hash, options: options, password: password) - case .failure(let error): - return Result.failure(error) - } + public func setContent(domain: String, hash: String, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { + guard var resolver = try? self.resolver(forDomain: domain) else {throw Web3Error.processingError(desc: "Failed to get resolver for domain")} + guard let result = try? resolver.setContent(node: domain, hash: hash, options: options, password: password) else {throw Web3Error.processingError(desc: "Can't get result")} + return result } - - public func getMultihash(domain: String) -> Result { - let resolver = self.resolver(forDomain: domain) - switch resolver { - case .success(var value): - return value.multihash(node: domain) - case .failure(let error): - return Result.failure(error) - } + public func getMultihash(domain: String) throws -> Data { + guard var resolver = try? self.resolver(forDomain: domain) else {throw Web3Error.processingError(desc: "Failed to get resolver for domain")} + guard let multihash = try? resolver.multihash(node: domain) else {throw Web3Error.processingError(desc: "Can't get multihash")} + return multihash } //MARK: - Returns resolver for the given domain - public func resolver(forDomain domain: String) -> Result { - guard let nameHash = NameHash.nameHash(domain) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.registryContract.method("resolver", parameters: [nameHash as AnyObject], options: defaultOptions) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = transaction.call(options: defaultOptions) - switch result { - case .success(let res): - guard let resolverAddress = res["0"] as? EthereumAddress else { return Result.failure(Web3Error.dataError) } - return Result(ResolverENS(web3: self.web3, resolverAddress: resolverAddress)) - case .failure(let error): - return Result.failure(error) - } + public func resolver(forDomain domain: String) throws -> ResolverENS { + guard let nameHash = NameHash.nameHash(domain) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.registryContract.read("resolver", parameters: [nameHash as AnyObject], extraData: Data(), transactionOptions: defaultOptions) else {throw Web3Error.transactionSerializationError} + guard let result = try? transaction.call(transactionOptions: defaultOptions) else {throw Web3Error.processingError(desc: "Can't call transaction")} + guard let resolverAddress = result["0"] as? EthereumAddress else {throw Web3Error.processingError(desc: "No address in result")} + return ResolverENS(web3: self.web3, resolverAddress: resolverAddress) } //Returns node's owner address - public func owner(node: String) -> Result { - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.registryContract.method("owner", parameters: [nameHash as AnyObject], options: defaultOptions) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = transaction.call(options: defaultOptions) - switch result { - case .success(let value): - guard let address = value["0"] as? EthereumAddress else { return Result.failure(Web3Error.dataError) } - return Result(address) - case .failure(let error): - return Result.failure(error) - } + public func owner(node: String) throws -> EthereumAddress { + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.registryContract.read("owner", parameters: [nameHash as AnyObject], extraData: Data(), transactionOptions: defaultOptions) else {throw Web3Error.transactionSerializationError} + guard let result = try? transaction.call(transactionOptions: defaultOptions) else {throw Web3Error.processingError(desc: "Can't call transaction")} + guard let address = result["0"] as? EthereumAddress else {throw Web3Error.processingError(desc: "No address in result")} + return address } //Untested - public func ttl(node: String) -> Result { - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.registryContract.method("ttl", parameters: [nameHash as AnyObject], options: defaultOptions) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = transaction.call(options: defaultOptions) - switch result { - case .success(let value): - guard let ans = value["0"] as? BigUInt else { return Result.failure(Web3Error.dataError) } - return Result(ans) - case .failure(let error): - return Result.failure(error) - } + public func ttl(node: String) throws -> BigUInt { + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.registryContract.read("ttl", parameters: [nameHash as AnyObject], extraData: Data(), transactionOptions: defaultOptions) else {throw Web3Error.transactionSerializationError} + guard let result = try? transaction.call(transactionOptions: defaultOptions) else {throw Web3Error.processingError(desc: "Can't call transaction")} + guard let ans = result["0"] as? BigUInt else {throw Web3Error.processingError(desc: "No answer in result")} + return ans } // function setOwner(bytes32 node, address owner); - public func setOwner(node: String, owner: EthereumAddress, options: Web3Options, password: String? = nil) -> Result { + public func setOwner(node: String, owner: EthereumAddress, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { let options = getOptions(options) - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.registryContract.method("setOwner", parameters: [nameHash, owner] as [AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError)} - let result = password == nil ? transaction.send() : transaction.send(password: password!, options: options) - switch result { - case .failure(let error): - return Result.failure(error) - case .success(let value): - return Result(value) - } + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.registryContract.write("setOwner", parameters: [nameHash, owner] as [AnyObject], extraData: Data(), transactionOptions: options) else {throw Web3Error.transactionSerializationError} + guard let result = password == nil ? try? transaction.send() : try? transaction.send(password: password!, transactionOptions: options) else {throw Web3Error.processingError(desc: "Can't send transaction")} + return result } // function setSubnodeOwner(bytes32 node, bytes32 label, address owner); - public func setSubnodeOwner(node: String, label: String, owner: EthereumAddress, options: Web3Options, password: String? = nil) -> Result { + public func setSubnodeOwner(node: String, label: String, owner: EthereumAddress, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { let options = getOptions(options) - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let labelHash = NameHash.nameHash(label) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.registryContract.method("setSubnodeOwner", parameters: [nameHash, labelHash, owner] as [AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError)} - let result = password == nil ? transaction.send() : transaction.send(password: password!, options: options) - switch result { - case .success(let value): - return Result(value) - case .failure(let error): - return Result.failure(error) - } + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let labelHash = NameHash.nameHash(label) else {throw Web3Error.processingError(desc: "Failed to get label hash")} + guard let transaction = self.registryContract.write("setSubnodeOwner", parameters: [nameHash, labelHash, owner] as [AnyObject], extraData: Data(), transactionOptions: options) else {throw Web3Error.transactionSerializationError} + guard let result = password == nil ? try? transaction.send() : try? transaction.send(password: password!, transactionOptions: options) else {throw Web3Error.processingError(desc: "Can't send transaction")} + return result } // function setResolver(bytes32 node, address resolver); - public func setResolver(node: String, resolver: EthereumAddress, options: Web3Options, password: String? = nil) -> Result { + public func setResolver(node: String, resolver: EthereumAddress, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { let options = getOptions(options) - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.registryContract.method("setResolver", parameters: [nameHash, resolver] as [AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = password == nil ? transaction.send() : transaction.send(password: password!, options: options) - switch result { - case .success(let value): - return Result(value) - case .failure(let error): - return Result.failure(error) - } - + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.registryContract.write("setResolver", parameters: [nameHash, resolver] as [AnyObject], extraData: Data(), transactionOptions: options) else {throw Web3Error.transactionSerializationError} + guard let result = password == nil ? try? transaction.send() : try? transaction.send(password: password!, transactionOptions: options) else {throw Web3Error.processingError(desc: "Can't send transaction")} + return result } // function setTTL(bytes32 node, uint64 ttl); - public func setTTL(node: String, ttl: BigUInt, options: Web3Options, password: String? = nil) -> Result { + public func setTTL(node: String, ttl: BigUInt, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { let options = getOptions(options) - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.registryContract.method("setTTL", parameters: [nameHash, ttl] as [AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = password == nil ? transaction.send() : transaction.send(password: password!, options: options) - switch result { - case .failure(let error): - return Result.failure(error) - case .success(let value): - return Result(value) - } + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.registryContract.write("setTTL", parameters: [nameHash, ttl] as [AnyObject], extraData: Data(), transactionOptions: options) else {throw Web3Error.transactionSerializationError} + guard let result = password == nil ? try? transaction.send() : try? transaction.send(password: password!, transactionOptions: options) else {throw Web3Error.processingError(desc: "Can't send transaction")} + return result } - private func getOptions(_ options: Web3Options) -> Web3Options { + private func getOptions(_ options: TransactionOptions) -> TransactionOptions { var options = options options.to = self.ensContractAddress return options diff --git a/web3swift/Utils/Classes/ENSResolver.swift b/web3swift/Utils/Classes/ENSResolver.swift index e37cd38ec..0a7086348 100644 --- a/web3swift/Utils/Classes/ENSResolver.swift +++ b/web3swift/Utils/Classes/ENSResolver.swift @@ -47,8 +47,8 @@ public struct ResolverENS { return contract! }() - private lazy var defaultOptions: Web3Options = { - return Web3Options.defaultOptions() + private lazy var defaultOptions: TransactionOptions = { + return TransactionOptions.defaultOptions }() init(web3: web3, resolverAddress: EthereumAddress) { @@ -56,175 +56,138 @@ public struct ResolverENS { self.resolverAddress = resolverAddress } - mutating public func supportsInterface(interfaceID: Data) -> Result { - return supportsInterface(interfaceID: interfaceID.toHexString()) + mutating public func supportsInterface(interfaceID: Data) throws -> Bool { + guard let supports = try? supportsInterface(interfaceID: interfaceID.toHexString()) else {throw Web3Error.processingError(desc: "Can't get answer")} + return supports } //MARK: - returns true if the contract supports given interface - mutating public func supportsInterface(interfaceID: String) -> Result { - guard let transaction = self.resolverContract.method("supportsInterface", parameters: [interfaceID as AnyObject], options: defaultOptions) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = transaction.call(options: defaultOptions) - switch result { - case .success(let res): - guard let supports = res["0"] as? Bool else { return Result.failure(Web3Error.dataError) } - return Result(supports) - case .failure(let error): - return Result.failure(error) - } + mutating public func supportsInterface(interfaceID: String) throws -> Bool { + guard let transaction = self.resolverContract.read("supportsInterface", parameters: [interfaceID as AnyObject], extraData: Data(), transactionOptions: defaultOptions) else {throw Web3Error.transactionSerializationError} + guard let result = try? transaction.call(transactionOptions: defaultOptions) else {throw Web3Error.processingError(desc: "Can't call transaction")} + guard let supports = result["0"] as? Bool else {throw Web3Error.processingError(desc: "Can't get answer")} + return supports } //MARK: - returns address for the given domain at given resolver - mutating public func addr(forDomain domain: String) -> Result { - guard let nameHash = NameHash.nameHash(domain) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.resolverContract.method("addr", parameters: [nameHash as AnyObject], options: defaultOptions) else { return Result.failure(Web3Error.dataError) } - let result = transaction.call(options: defaultOptions) - switch result { - case .success(let res): - return Result(res["0"] as! EthereumAddress) - case .failure(let error): - return Result.failure(error) - } + mutating public func addr(forDomain domain: String) throws -> EthereumAddress { + guard let nameHash = NameHash.nameHash(domain) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.read("addr", parameters: [nameHash as AnyObject], extraData: Data(), transactionOptions: defaultOptions) else {throw Web3Error.transactionSerializationError} + guard let result = try? transaction.call(transactionOptions: defaultOptions) else {throw Web3Error.processingError(desc: "Can't call transaction")} + guard let address = result["0"] as? EthereumAddress else {throw Web3Error.processingError(desc: "Can't get address")} + return address } //function setAddr(bytes32 node, address addr) - mutating public func setAddr(node: String, address: EthereumAddress, options: Web3Options, password: String? = nil) -> Result { + mutating public func setAddr(node: String, address: EthereumAddress, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { let options = getOptions(options) - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError)} - guard let transaction = self.resolverContract.method("setAddr", parameters: [nameHash, address] as [AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = password == nil ? transaction.send() : transaction.send(password: password!, options: options) + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.write("setAddr", parameters: [nameHash, address] as [AnyObject], extraData: Data(), transactionOptions: options) else {throw Web3Error.transactionSerializationError} + guard let result = password == nil ? try? transaction.send() : try? transaction.send(password: password!, transactionOptions: options) else {throw Web3Error.processingError(desc: "Can't send transaction")} return result } //MARK: - returns corresponding ENS to the requested node - mutating public func name(node: String) -> Result { - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.resolverContract.method("name", parameters: [nameHash as AnyObject], options: defaultOptions) else { return Result.failure(Web3Error.transactionSerializationError)} - let result = transaction.call(options: defaultOptions) - switch result { - case .success(let res): - return Result(res["0"] as! String) - case .failure(let error): - return Result.failure(error) - } + mutating public func name(node: String) throws -> String { + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.read("name", parameters: [nameHash as AnyObject], extraData: Data(), transactionOptions: defaultOptions) else {throw Web3Error.transactionSerializationError} + guard let result = try? transaction.call(transactionOptions: defaultOptions) else {throw Web3Error.processingError(desc: "Can't call transaction")} + guard let name = result["0"] as? String else {throw Web3Error.processingError(desc: "Can't get name")} + return name } - mutating func setName(node: String, name: String, options: Web3Options, password: String? = nil) -> Result{ + mutating func setName(node: String, name: String, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { let options = getOptions(options) - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.resolverContract.method("setName", parameters: [nameHash, name] as [AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = password == nil ? transaction.send() : transaction.send(password: password!, options: options) + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.write("setName", parameters: [nameHash, name] as [AnyObject], extraData: Data(), transactionOptions: options) else {throw Web3Error.transactionSerializationError} + guard let result = password == nil ? try? transaction.send() : try? transaction.send(password: password!, transactionOptions: options) else {throw Web3Error.processingError(desc: "Can't send transaction")} return result } //MARK: - returns ABI in the requested encodings - mutating public func ABI(node: String, contentType: BigUInt) -> Result<(BigUInt, Data), Web3Error> { - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.resolverContract.method("ABI", parameters: [nameHash, contentType] as [AnyObject], options: defaultOptions) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = transaction.call(options: defaultOptions) - switch result { - case .success(let res): - guard let encoding = res["0"] as? BigUInt else { return Result.failure(Web3Error.dataError) } - guard let data = res["1"] as? Data else { return Result.failure(Web3Error.dataError) } - return Result((encoding, data)) - case .failure(let error): - return Result.failure(error) - } + mutating public func ABI(node: String, contentType: BigUInt) throws -> (BigUInt, Data) { + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.read("ABI", parameters: [nameHash, contentType] as [AnyObject], extraData: Data(), transactionOptions: defaultOptions) else {throw Web3Error.transactionSerializationError} + guard let result = try? transaction.call(transactionOptions: defaultOptions) else {throw Web3Error.processingError(desc: "Can't call transaction")} + guard let encoding = result["0"] as? BigUInt else {throw Web3Error.processingError(desc: "Can't get encoding")} + guard let data = result["0"] as? Data else {throw Web3Error.processingError(desc: "Can't get data")} + return (encoding, data) } - mutating func setABI(node: String, contentType: BigUInt, data: Data, options: Web3Options, password: String? = nil) -> Result { + mutating func setABI(node: String, contentType: BigUInt, data: Data, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { let options = getOptions(options) - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.resolverContract.method("setABI", parameters: [nameHash, contentType, data] as [AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = password == nil ? transaction.send() : transaction.send(password: password!, options: options) + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.write("setABI", parameters: [nameHash, contentType, data] as [AnyObject], extraData: Data(), transactionOptions: options) else {throw Web3Error.transactionSerializationError} + guard let result = password == nil ? try? transaction.send() : try? transaction.send(password: password!, transactionOptions: options) else {throw Web3Error.processingError(desc: "Can't send transaction")} return result } //MARK: - returns x and y coordinates - mutating public func pubkey(node: String) -> Result { - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.resolverContract.method("pubkey", parameters: [nameHash as AnyObject], options: defaultOptions) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = transaction.call(options: defaultOptions) - switch result { - case .success(let value): - print(value) - guard let x = value["x"] as? Data else { return Result.failure(Web3Error.dataError) } - guard let y = value["y"] as? Data else { return Result.failure(Web3Error.dataError) } - return Result(PublicKey(x: "0x" + x.toHexString(), y: "0x" + y.toHexString())) - case .failure(let error): - return Result.failure(error) - } + mutating public func pubkey(node: String) throws -> PublicKey { + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.read("pubkey", parameters: [nameHash as AnyObject], extraData: Data(), transactionOptions: defaultOptions) else {throw Web3Error.transactionSerializationError} + guard let result = try? transaction.call(transactionOptions: defaultOptions) else {throw Web3Error.processingError(desc: "Can't call transaction")} + guard let x = result["x"] as? Data else {throw Web3Error.processingError(desc: "Can't get x")} + guard let y = result["y"] as? Data else {throw Web3Error.processingError(desc: "Can't get y")} + let pubkey = PublicKey(x: "0x" + x.toHexString(), y: "0x" + y.toHexString()) + return pubkey } - mutating public func setPubkey(node: String, x: String, y: String, options: Web3Options, password: String? = nil) -> Result { + mutating public func setPubkey(node: String, x: String, y: String, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { let options = getOptions(options) - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.resolverContract.method("getPubkey", parameters: [nameHash, x, y] as [AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = password == nil ? transaction.send() : transaction.send(password: password!, options: options) + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.write("setPubkey", parameters: [nameHash, x, y] as [AnyObject], extraData: Data(), transactionOptions: options) else {throw Web3Error.transactionSerializationError} + guard let result = password == nil ? try? transaction.send() : try? transaction.send(password: password!, transactionOptions: options) else {throw Web3Error.processingError(desc: "Can't send transaction")} return result } - mutating func content(node: String) -> Result { - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.resolverContract.method("content", parameters: [nameHash] as [AnyObject], options: defaultOptions) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = transaction.call(options: defaultOptions) - switch result { - case .success(let value): - guard let value = value["0"] as? String else { return Result.failure(Web3Error.dataError) } - return Result(value) - case .failure(let error): - return Result.failure(error) - } + mutating func content(node: String) throws -> String { + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.read("content", parameters: [nameHash] as [AnyObject], extraData: Data(), transactionOptions: defaultOptions) else {throw Web3Error.transactionSerializationError} + guard let result = try? transaction.call(transactionOptions: defaultOptions) else {throw Web3Error.processingError(desc: "Can't call transaction")} + guard let content = result["0"] as? String else {throw Web3Error.processingError(desc: "Can't get content")} + return content } - mutating func setContent(node: String, hash: String, options: Web3Options, password: String? = nil) -> Result { + mutating func setContent(node: String, hash: String, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { let options = getOptions(options) - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.resolverContract.method("setContent", parameters: [nameHash, hash] as [AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = password == nil ? transaction.send() : transaction.send(password: password!, options: options) + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.write("setContent", parameters: [nameHash, hash] as [AnyObject], extraData: Data(), transactionOptions: options) else {throw Web3Error.transactionSerializationError} + guard let result = password == nil ? try? transaction.send() : try? transaction.send(password: password!, transactionOptions: options) else {throw Web3Error.processingError(desc: "Can't send transaction")} return result } //function multihash(bytes32 node) public view returns (bytes) - mutating public func multihash(node: String) -> Result { - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.transactionSerializationError) } - guard let transaction = self.resolverContract.method("multihash", parameters: [nameHash] as [AnyObject], options: self.defaultOptions) else { return Result.failure(Web3Error.dataError) } - let result = transaction.call(options: defaultOptions) - switch result { - case .success(let value): - guard let hash = value["0"] as? Data else { return Result.failure(Web3Error.dataError) } - return Result(hash) - case .failure(let error): - return Result.failure(error) - } + mutating public func multihash(node: String) throws -> Data { + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.read("multihash", parameters: [nameHash] as [AnyObject], extraData: Data(), transactionOptions: defaultOptions) else {throw Web3Error.transactionSerializationError} + guard let result = try? transaction.call(transactionOptions: defaultOptions) else {throw Web3Error.processingError(desc: "Can't call transaction")} + guard let multihash = result["0"] as? Data else {throw Web3Error.processingError(desc: "Can't get multihash")} + return multihash } //function setMultihash(bytes32 node, bytes hash) public only_owner(node) - mutating public func setMultihash(node: String, hash: Data, options: Web3Options, password: String? = nil) -> Result { - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.transactionSerializationError) } + mutating public func setMultihash(node: String, hash: Data, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { let options = getOptions(options) - guard let transaction = self.resolverContract.method("setMultihash", parameters: [nameHash, hash] as [AnyObject], options: options) else { return Result.failure(Web3Error.dataError) } - let result = password == nil ? transaction.send() : transaction.send(password: password!, options: options) + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.write("setMultihash", parameters: [nameHash, hash] as [AnyObject], extraData: Data(), transactionOptions: options) else {throw Web3Error.transactionSerializationError} + guard let result = password == nil ? try? transaction.send() : try? transaction.send(password: password!, transactionOptions: options) else {throw Web3Error.processingError(desc: "Can't send transaction")} return result } //function text(bytes32 node, string key) public view returns (string) - mutating public func text(node: String, key: String) -> Result { - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.resolverContract.method("text", parameters: [nameHash, key] as [AnyObject], options: defaultOptions) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = transaction.call(options: defaultOptions) - switch result { - case .failure(let error): - return Result.failure(error) - case .success(let value): - guard let ans = value["0"] as? String else { return Result.failure(Web3Error.dataError) } - return Result(ans) - } + mutating public func text(node: String, key: String) throws -> String { + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.read("text", parameters: [nameHash, key] as [AnyObject], extraData: Data(), transactionOptions: defaultOptions) else {throw Web3Error.transactionSerializationError} + guard let result = try? transaction.call(transactionOptions: defaultOptions) else {throw Web3Error.processingError(desc: "Can't call transaction")} + guard let text = result["0"] as? String else {throw Web3Error.processingError(desc: "Can't get text")} + return text } //function setText(bytes32 node, string key, string value) public only_owner(node) - mutating public func setText(node: String, key: String, value: String, options: Web3Options, password: String? = nil) -> Result { - guard let nameHash = NameHash.nameHash(node) else { return Result.failure(Web3Error.dataError) } - guard let transaction = self.resolverContract.method("setText", parameters: [nameHash, key, value] as [AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = password == nil ? transaction.send() : transaction.send(password: password!, options: options) + mutating public func setText(node: String, key: String, value: String, options: TransactionOptions, password: String? = nil) throws -> TransactionSendingResult { + guard let nameHash = NameHash.nameHash(node) else {throw Web3Error.processingError(desc: "Failed to get name hash")} + guard let transaction = self.resolverContract.write("setText", parameters: [nameHash, key, value] as [AnyObject], extraData: Data(), transactionOptions: options) else {throw Web3Error.transactionSerializationError} + guard let result = password == nil ? try? transaction.send() : try? transaction.send(password: password!, transactionOptions: options) else {throw Web3Error.processingError(desc: "Can't send transaction")} return result } - private func getOptions(_ options: Web3Options) -> Web3Options { + private func getOptions(_ options: TransactionOptions) -> TransactionOptions { var options = options options.to = self.resolverAddress return options diff --git a/web3swift/Web3/Classes/Web3+MutatingTransaction.swift b/web3swift/Web3/Classes/Web3+MutatingTransaction.swift index 2b6de16fd..2ddaa9ccc 100644 --- a/web3swift/Web3/Classes/Web3+MutatingTransaction.swift +++ b/web3swift/Web3/Classes/Web3+MutatingTransaction.swift @@ -158,5 +158,7 @@ public class WriteTransaction: ReadTransaction { } } - + public func send(password:String = "web3swift", transactionOptions: TransactionOptions? = nil) throws -> TransactionSendingResult { + return try self.sendPromise(password: password, transactionOptions: transactionOptions).wait() + } } From b7e6f55a0754e722d0c0231dc3ff93eb0fdedf74 Mon Sep 17 00:00:00 2001 From: BaldyAsh Date: Fri, 2 Nov 2018 19:50:07 +0300 Subject: [PATCH 17/23] fixed tests for ens --- web3swift/Utils/Classes/ENSResolver.swift | 2 +- web3swiftTests/web3swift_ENS_Tests.swift | 147 +++++++++++++--------- 2 files changed, 88 insertions(+), 61 deletions(-) diff --git a/web3swift/Utils/Classes/ENSResolver.swift b/web3swift/Utils/Classes/ENSResolver.swift index 0a7086348..9b2b9ae3d 100644 --- a/web3swift/Utils/Classes/ENSResolver.swift +++ b/web3swift/Utils/Classes/ENSResolver.swift @@ -110,7 +110,7 @@ public struct ResolverENS { guard let transaction = self.resolverContract.read("ABI", parameters: [nameHash, contentType] as [AnyObject], extraData: Data(), transactionOptions: defaultOptions) else {throw Web3Error.transactionSerializationError} guard let result = try? transaction.call(transactionOptions: defaultOptions) else {throw Web3Error.processingError(desc: "Can't call transaction")} guard let encoding = result["0"] as? BigUInt else {throw Web3Error.processingError(desc: "Can't get encoding")} - guard let data = result["0"] as? Data else {throw Web3Error.processingError(desc: "Can't get data")} + guard let data = result["1"] as? Data else {throw Web3Error.processingError(desc: "Can't get data")} return (encoding, data) } diff --git a/web3swiftTests/web3swift_ENS_Tests.swift b/web3swiftTests/web3swift_ENS_Tests.swift index 1ec86aa36..bf78562cc 100644 --- a/web3swiftTests/web3swift_ENS_Tests.swift +++ b/web3swiftTests/web3swift_ENS_Tests.swift @@ -22,87 +22,114 @@ class web3swift_ENS_Tests: XCTestCase { } func testResolverAddress() { - let web = web3(provider: InfuraProvider(Networks.Mainnet)!) - var ens = ENS(web3: web) - guard case .success(let resolver) = ens.resolver(forDomain: "somename.eth") else { XCTAssert(false); return } - XCTAssertEqual(resolver.resolverAddress.address.lowercased(), "0x5ffc014343cd971b7eb70732021e26c35b744cc4") + do { + let web = web3(provider: InfuraProvider(Networks.Mainnet)!) + let ens = ENS(web3: web) + let domain = "somename.eth" + let resolver = try ens.resolver(forDomain: domain) + XCTAssertEqual(resolver.resolverAddress.address.lowercased(), "0x5ffc014343cd971b7eb70732021e26c35b744cc4") + } catch { + XCTFail() + } } func testResolver() { - let web = web3(provider: InfuraProvider(Networks.Mainnet)!) - var ens = ENS(web3: web) - let domain = "somename.eth" - guard case .success(var resolver) = ens.resolver(forDomain: domain) else { XCTAssert(false); return } - guard case .success(let address) = resolver.addr(forDomain: domain) else { XCTAssert(false); return } - XCTAssertEqual(address.address.lowercased(), "0x3487acfb1479ad1df6c0eb56ae743d34897798ac") - + do { + let web = web3(provider: InfuraProvider(Networks.Mainnet)!) + let ens = ENS(web3: web) + let domain = "somename.eth" + var resolver = try ens.resolver(forDomain: domain) + let address = try resolver.addr(forDomain: domain) + XCTAssertEqual(address.address.lowercased(), "0x3487acfb1479ad1df6c0eb56ae743d34897798ac") + } catch { + XCTFail() + } } func testSupportsInterface() { - let web = web3(provider: InfuraProvider(Networks.Mainnet)!) - var ens = ENS(web3: web) - let domain = "somename.eth" - guard case .success(var resolver) = ens.resolver(forDomain: domain) else { XCTAssert(false); return } - guard case .success(let isAddrSupports) = resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.addr.hash()) else { XCTAssert(false); return } - XCTAssertEqual(isAddrSupports, true) - guard case .success(let isNameSupports) = resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.name.hash()) else { XCTAssert(false); return } - XCTAssertEqual(isNameSupports, true) - guard case .success(let isABIsupports) = resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.ABI.hash()) else { XCTAssert(false); return } - XCTAssertEqual(isABIsupports, true) - guard case .success(let isPubkeySupports) = resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.pubkey.hash()) else { XCTAssert(false); return } - XCTAssertEqual(isPubkeySupports, true) + do { + let web = web3(provider: InfuraProvider(Networks.Mainnet)!) + let ens = ENS(web3: web) + let domain = "somename.eth" + var resolver = try ens.resolver(forDomain: domain) + let isAddrSupports = try resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.addr.hash()) + let isNameSupports = try resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.name.hash()) + let isABIsupports = try resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.ABI.hash()) + let isPubkeySupports = try resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.pubkey.hash()) + XCTAssertEqual(isAddrSupports, true) + XCTAssertEqual(isNameSupports, true) + XCTAssertEqual(isABIsupports, true) + XCTAssertEqual(isPubkeySupports, true) + } catch { + XCTFail() + } } func testABI() { - let web = web3(provider: InfuraProvider(Networks.Mainnet)!) - var ens = ENS(web3: web) - let domain = "somename.eth" - guard case .success(var resolver) = ens.resolver(forDomain: domain) else { XCTAssert(false); return } - guard case .success(let isABIsupported) = resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.ABI.hash()) else { XCTAssert(false); return } - if isABIsupported { - guard case .success(let res) = resolver.ABI(node: domain, contentType: 2) else { XCTAssert(false); return } - XCTAssert(res.0 == 0) - XCTAssert(res.1.count == 0) + do { + let web = web3(provider: InfuraProvider(Networks.Mainnet)!) + let ens = ENS(web3: web) + let domain = "somename.eth" + var resolver = try ens.resolver(forDomain: domain) + let isABIsupported = try resolver.supportsInterface(interfaceID: ResolverENS.InterfaceName.ABI.hash()) + if isABIsupported { + let res = try resolver.ABI(node: domain, contentType: 2) + XCTAssert(res.0 == 0) + XCTAssert(res.1.count == 0) + } else { + XCTFail() + } + } catch { + XCTFail() } } func testOwner() { - let web = web3(provider: InfuraProvider(Networks.Mainnet)!) - var ens = ENS(web3: web) - let domain = "somename.eth" - guard case .success(let result) = ens.owner(node: domain) else { XCTAssert(false); return } - XCTAssertEqual("0xc67247454e720328714c4e17bec7640572657bee", result.address.lowercased()) + do { + let web = web3(provider: InfuraProvider(Networks.Mainnet)!) + let ens = ENS(web3: web) + let domain = "somename.eth" + let owner = try ens.owner(node: domain) + XCTAssertEqual("0xc67247454e720328714c4e17bec7640572657bee", owner.address.lowercased()) + } catch { + XCTFail() + } } func testTTL() { - let web = web3(provider: InfuraProvider(Networks.Mainnet)!) - var ens = ENS(web3: web) - let domain = "somename.eth" - guard case .success(let result) = ens.ttl(node: domain) else { XCTAssert(false); return } - print(result) + do { + let web = web3(provider: InfuraProvider(Networks.Mainnet)!) + let ens = ENS(web3: web) + let domain = "somename.eth" + let ttl = try ens.ttl(node: domain) + print(ttl) + } catch { + XCTFail() + } } func testGetAddress() { - let web = web3(provider: InfuraProvider(Networks.Mainnet)!) - var ens = ENS(web3: web) - let domain = "somename.eth" - guard case .success(let address) = ens.getAddress(domain) else { XCTAssert(false); return } - XCTAssertEqual(address.address.lowercased(), "0x3487acfb1479ad1df6c0eb56ae743d34897798ac") + do { + let web = web3(provider: InfuraProvider(Networks.Mainnet)!) + let ens = ENS(web3: web) + let domain = "somename.eth" + let address = try ens.getAddress(domain) + XCTAssertEqual(address.address.lowercased(), "0x3487acfb1479ad1df6c0eb56ae743d34897798ac") + } catch { + XCTFail() + } } func testGetPubkey() { - let web = web3(provider: InfuraProvider(Networks.Mainnet)!) - var ens = ENS(web3: web) - let domain = "somename.eth" - guard case .success(let point) = ens.getPubkey(domain: domain) else { XCTAssert(false); return } - XCTAssert(point.x == "0x0000000000000000000000000000000000000000000000000000000000000000") - XCTAssert(point.y == "0x0000000000000000000000000000000000000000000000000000000000000000") + do { + let web = web3(provider: InfuraProvider(Networks.Mainnet)!) + let ens = ENS(web3: web) + let domain = "somename.eth" + let pubkey = try ens.getPubkey(domain: domain) + XCTAssert(pubkey.x == "0x0000000000000000000000000000000000000000000000000000000000000000") + XCTAssert(pubkey.y == "0x0000000000000000000000000000000000000000000000000000000000000000") + } catch { + XCTFail() + } } - - - - - - - } From 0e03dbbc72591e14d1725952f9193ccaa30afd49 Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Sat, 3 Nov 2018 13:18:45 +0300 Subject: [PATCH 18/23] first commit after the Devcon. Add more options into the event loop --- web3swift/Web3/Classes/Web3+Eventloop.swift | 9 ++++++++- web3swift/Web3/Classes/Web3+Instance.swift | 14 +++++++++++++- web3swift/Web3/Classes/Web3+Protocols.swift | 6 ++++++ web3swiftTests/web3swift_Eventloop_Tests.swift | 6 +++--- 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/web3swift/Web3/Classes/Web3+Eventloop.swift b/web3swift/Web3/Classes/Web3+Eventloop.swift index 8be27b909..d59a0e9e4 100644 --- a/web3swift/Web3/Classes/Web3+Eventloop.swift +++ b/web3swift/Web3/Classes/Web3+Eventloop.swift @@ -29,7 +29,7 @@ extension web3.Eventloop { } } - @objc func runnable() { + func runnable() { for prop in self.monitoredProperties { let queue = prop.queue let function = prop.calledFunction @@ -37,6 +37,13 @@ extension web3.Eventloop { function(self.web3) } } + + for prop in self.monitoredUserFunctions { + let queue = prop.queue + queue.async { + prop.functionToRun() + } + } } } diff --git a/web3swift/Web3/Classes/Web3+Instance.swift b/web3swift/Web3/Classes/Web3+Instance.swift index abd6eb7d0..7704fdf3a 100755 --- a/web3swift/Web3/Classes/Web3+Instance.swift +++ b/web3swift/Web3/Classes/Web3+Instance.swift @@ -166,7 +166,9 @@ public class web3: Web3OptionsInheritable { } public class Eventloop: Web3OptionsInheritable { + public typealias EventLoopCall = (web3) -> Void + public typealias EventLoopContractCall = (web3contract) -> Void public struct MonitoredProperty { public var name: String @@ -174,11 +176,21 @@ public class web3: Web3OptionsInheritable { public var calledFunction: EventLoopCall } +// public struct MonitoredContract { +// public var name: String +// public var queue: DispatchQueue +// public var calledFunction: EventLoopContractCall +// } + var provider:Web3Provider // weak var web3: web3? var web3: web3 var timer: RepeatingTimer? = nil - var monitoredProperties: [MonitoredProperty] = [MonitoredProperty]() + + public var monitoredProperties: [MonitoredProperty] = [MonitoredProperty]() +// public var monitoredContracts: [MonitoredContract] = [MonitoredContract]() + public var monitoredUserFunctions: [EventLoopRunnableProtocol] = [EventLoopRunnableProtocol]() + public var options: Web3Options { return self.web3.options } diff --git a/web3swift/Web3/Classes/Web3+Protocols.swift b/web3swift/Web3/Classes/Web3+Protocols.swift index 91d6cb290..df1b20adc 100755 --- a/web3swift/Web3/Classes/Web3+Protocols.swift +++ b/web3swift/Web3/Classes/Web3+Protocols.swift @@ -75,3 +75,9 @@ public enum Networks { } } } + +public protocol EventLoopRunnableProtocol { + var name: String {get} + var queue: DispatchQueue {get} + func functionToRun() +} diff --git a/web3swiftTests/web3swift_Eventloop_Tests.swift b/web3swiftTests/web3swift_Eventloop_Tests.swift index 5817ab5a9..d5355dd2c 100644 --- a/web3swiftTests/web3swift_Eventloop_Tests.swift +++ b/web3swiftTests/web3swift_Eventloop_Tests.swift @@ -12,7 +12,7 @@ import EthereumAddress class web3swift_Eventloop_Tests: XCTestCase { func testBasicEventLoop() { - var ticksToWait = 10 + var ticksToWait = 5 let expectation = self.expectation(description: "Waiting") func getBlockNumber(_ web3: web3) { do { @@ -30,9 +30,9 @@ class web3swift_Eventloop_Tests: XCTestCase { let functionToCall: web3.Eventloop.EventLoopCall = getBlockNumber let monitoredProperty = web3.Eventloop.MonitoredProperty.init(name: "onNewBlock", queue: web3main.requestDispatcher.queue, calledFunction: functionToCall) web3main.eventLoop.monitoredProperties.append(monitoredProperty) - web3main.eventLoop.start(1) + web3main.eventLoop.start(5) - waitForExpectations(timeout: 30, handler: nil) + waitForExpectations(timeout: 60, handler: nil) } } From 43256b11a6a5d02bb7927920783f0c0925c615c1 Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Sat, 3 Nov 2018 13:22:33 +0300 Subject: [PATCH 19/23] restore parsing of ENS names in EIP681 --- web3swift/Utils/Classes/EIP681.swift | 30 +++++++++++----------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/web3swift/Utils/Classes/EIP681.swift b/web3swift/Utils/Classes/EIP681.swift index f53329ff8..64729f7f7 100644 --- a/web3swift/Utils/Classes/EIP681.swift +++ b/web3swift/Utils/Classes/EIP681.swift @@ -120,24 +120,18 @@ extension Web3 { switch val { case .ethereumAddress(let ethereumAddress): nativeValue = ethereumAddress as AnyObject - default: - return nil -// case .ensAddress(let ens): -// let web = web3(provider: InfuraProvider(Networks.fromInt(Int(code.chainID ?? 1)) ?? Networks.Mainnet)!) -// let ensModel = ENS(web3: web) -// let resolver = ensModel.resolver(forDomain: ens) -// switch resolver { -// case .failure(_): -// nativeValue = ens as AnyObject -// case .success(var res): -// let address = res.addr(forDomain: ens) -// switch address { -// case .failure(_): -// nativeValue = ens as AnyObject -// case .success(let res): -// nativeValue = res as AnyObject -// } -// } +// default: +// return nil + case .ensAddress(let ens): + do { + let web = web3(provider: InfuraProvider(Networks.fromInt(Int(code.chainID ?? 1)) ?? Networks.Mainnet)!) + let ensModel = ENS(web3: web) + var resolver = try ensModel.resolver(forDomain: ens) + let address = try resolver.addr(forDomain: ens) + nativeValue = address as AnyObject + } catch { + return nil + } } case .uint(bits: _): if let val = BigUInt(value, radix: 10) { From b256f1153d61781c46dc8b0aab26a1d932a5c09b Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Sat, 3 Nov 2018 13:30:31 +0300 Subject: [PATCH 20/23] - add "create account" call for remote node - Fix promises visibility --- web3swift.xcodeproj/project.pbxproj | 6 +++ .../Classes/Promise+Web3+Eth+Call.swift | 2 +- .../Promise+Web3+Eth+EstimateGas.swift | 2 +- .../Promise+Web3+Eth+SendRawTransaction.swift | 4 +- .../Promise+Web3+Eth+SendTransaction.swift | 2 +- .../Promise+Web3+Personal+CreateAccount.swift | 37 +++++++++++++++++++ .../Classes/Promise+Web3+Personal+Sign.swift | 2 +- .../Promise+Web3+Personal+UnlockAccount.swift | 4 +- web3swift/Web3/Classes/Web3+Methods.swift | 2 + 9 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 web3swift/Promises/Classes/Promise+Web3+Personal+CreateAccount.swift diff --git a/web3swift.xcodeproj/project.pbxproj b/web3swift.xcodeproj/project.pbxproj index ed32b1f28..1738d8948 100755 --- a/web3swift.xcodeproj/project.pbxproj +++ b/web3swift.xcodeproj/project.pbxproj @@ -104,6 +104,8 @@ 81909D4A218864A8007D2AE5 /* EIP681.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2862143DBF6004CD2C7 /* EIP681.swift */; }; 81909D4B218864A9007D2AE5 /* EIP681.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A7B2862143DBF6004CD2C7 /* EIP681.swift */; }; 81909D4F21887658007D2AE5 /* web3swift_Eventloop_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D4E21887658007D2AE5 /* web3swift_Eventloop_Tests.swift */; }; + 81909D51218DAEC0007D2AE5 /* Promise+Web3+Personal+CreateAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D50218DAEC0007D2AE5 /* Promise+Web3+Personal+CreateAccount.swift */; }; + 81909D52218DAEC0007D2AE5 /* Promise+Web3+Personal+CreateAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D50218DAEC0007D2AE5 /* Promise+Web3+Personal+CreateAccount.swift */; }; 81A1821520D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821620D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; }; 81A1821A20D5A6F70016741F /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */; }; @@ -269,6 +271,7 @@ 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+Eventloop.swift"; sourceTree = ""; }; 81909D2021884893007D2AE5 /* BigUInt+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BigUInt+Extensions.swift"; sourceTree = ""; }; 81909D4E21887658007D2AE5 /* web3swift_Eventloop_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_Eventloop_Tests.swift; sourceTree = ""; }; + 81909D50218DAEC0007D2AE5 /* Promise+Web3+Personal+CreateAccount.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Personal+CreateAccount.swift"; sourceTree = ""; }; 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetBalance.swift"; sourceTree = ""; }; 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+HttpProvider.swift"; sourceTree = ""; }; 81A1821C20D5C6C10016741F /* web3swift_promises_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_promises_Tests.swift; sourceTree = ""; }; @@ -611,6 +614,7 @@ 81A1823F20D79FDB0016741F /* Promise+Web3+Eth+EstimateGas.swift */, 81A1824120D7AA750016741F /* Promise+Web3+Eth+SendTransaction.swift */, 81A1824720D7DDA20016741F /* Promise+Web3+Personal+Sign.swift */, + 81909D50218DAEC0007D2AE5 /* Promise+Web3+Personal+CreateAccount.swift */, 81A1824A20D7DF1B0016741F /* Promise+Web3+Personal+UnlockAccount.swift */, 81195AAF20D7FF8500ABC6B1 /* Promise+Web3+Contract+GetIndexedEvents.swift */, 985BFD4D216E2E0A00B28C14 /* Promise+Web3+TxPool.swift */, @@ -1040,6 +1044,7 @@ 81FB21FE207BB297007F9A83 /* EIP67Code.swift in Sources */, 81A1821A20D5A6F70016741F /* Promise+HttpProvider.swift in Sources */, 81A1823720D6E2BB0016741F /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */, + 81909D51218DAEC0007D2AE5 /* Promise+Web3+Personal+CreateAccount.swift in Sources */, 818D16CF204D42910084D2A4 /* Web3+EventParser.swift in Sources */, 81C5DA282072E18200424CD6 /* NativeTypesEncoding+Extensions.swift in Sources */, 8123E1C7200CBAC200B6D3AB /* Dictionary+Extension.swift in Sources */, @@ -1143,6 +1148,7 @@ 81FB21FF207BB297007F9A83 /* EIP67Code.swift in Sources */, 81A1821B20D5A6F80016741F /* Promise+HttpProvider.swift in Sources */, 81A1823820D6E2BB0016741F /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */, + 81909D52218DAEC0007D2AE5 /* Promise+Web3+Personal+CreateAccount.swift in Sources */, 818D16D0204D42940084D2A4 /* Web3+EventParser.swift in Sources */, 4194812E203630530065A83B /* AbstractKeystore.swift in Sources */, 81C5DA292072E18200424CD6 /* NativeTypesEncoding+Extensions.swift in Sources */, diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift index 2ea622788..ee206b341 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift @@ -9,7 +9,7 @@ import PromiseKit extension web3.Eth { - func callPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?) -> Promise{ + public func callPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?) -> Promise{ let queue = web3.requestDispatcher.queue do { guard let request = EthereumTransaction.createRequest(method: .call, transaction: transaction, transactionOptions: transactionOptions) else { diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift index 8d95f6d45..7c2a68bfa 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift @@ -10,7 +10,7 @@ import PromiseKit extension web3.Eth { - func estimateGasPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?) -> Promise{ + public func estimateGasPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?) -> Promise{ let queue = web3.requestDispatcher.queue do { guard let request = EthereumTransaction.createRequest(method: .estimateGas, transaction: transaction, transactionOptions: transactionOptions) else { diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift index c84cc4dfc..f80a751ca 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift @@ -8,7 +8,7 @@ import Foundation import PromiseKit extension web3.Eth { - func sendRawTransactionPromise(_ transaction: Data) -> Promise { + public func sendRawTransactionPromise(_ transaction: Data) -> Promise { guard let deserializedTX = EthereumTransaction.fromRaw(transaction) else { let promise = Promise.pending() promise.resolver.reject(Web3Error.processingError(desc: "Serialized TX is invalid")) @@ -17,7 +17,7 @@ extension web3.Eth { return sendRawTransactionPromise(deserializedTX) } - func sendRawTransactionPromise(_ transaction: EthereumTransaction) -> Promise{ + public func sendRawTransactionPromise(_ transaction: EthereumTransaction) -> Promise{ // print(transaction) let queue = web3.requestDispatcher.queue do { diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift index a42446ef2..069c8f708 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift @@ -10,7 +10,7 @@ import PromiseKit extension web3.Eth { - func sendTransactionPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?, password:String = "web3swift") -> Promise { + public func sendTransactionPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?, password:String = "web3swift") -> Promise { // print(transaction) var assembledTransaction : EthereumTransaction = transaction // .mergedWithOptions(transactionOptions) let queue = web3.requestDispatcher.queue diff --git a/web3swift/Promises/Classes/Promise+Web3+Personal+CreateAccount.swift b/web3swift/Promises/Classes/Promise+Web3+Personal+CreateAccount.swift new file mode 100644 index 000000000..bfac4ac73 --- /dev/null +++ b/web3swift/Promises/Classes/Promise+Web3+Personal+CreateAccount.swift @@ -0,0 +1,37 @@ +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt +import PromiseKit +import EthereumAddress + +extension web3.Personal { + public func createAccountPromise(password:String = "web3swift") -> Promise { + let queue = web3.requestDispatcher.queue + do { + if self.web3.provider.attachedKeystoreManager == nil { + let request = JSONRPCRequestFabric.prepareRequest(.createAccount, parameters: [password]) + return self.web3.dispatch(request).map(on: queue) {response in + guard let value: EthereumAddress = response.getValue() else { + if response.error != nil { + throw Web3Error.nodeError(desc: response.error!.message) + } + throw Web3Error.nodeError(desc: "Invalid value from Ethereum node") + } + return value + } + } + throw Web3Error.inputError(desc: "Creating account in a local keystore with this method is not supported") + } catch { + let returnPromise = Promise.pending() + queue.async { + returnPromise.resolver.reject(error) + } + return returnPromise.promise + } + } +} diff --git a/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift b/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift index a935b3e47..582bbd345 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift @@ -11,7 +11,7 @@ import EthereumAddress extension web3.Personal { - func signPersonalMessagePromise(message: Data, from: EthereumAddress, password:String = "web3swift") -> Promise { + public func signPersonalMessagePromise(message: Data, from: EthereumAddress, password:String = "web3swift") -> Promise { let queue = web3.requestDispatcher.queue do { if self.web3.provider.attachedKeystoreManager == nil { diff --git a/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift b/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift index 40c0067c4..15f5e8409 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift @@ -10,13 +10,13 @@ import PromiseKit import EthereumAddress extension web3.Personal { - func unlockAccountPromise(account: EthereumAddress, password:String = "web3swift", seconds: UInt64 = 300) -> Promise { + public func unlockAccountPromise(account: EthereumAddress, password:String = "web3swift", seconds: UInt64 = 300) -> Promise { let addr = account.address return unlockAccountPromise(account: addr, password: password, seconds: seconds) } - func unlockAccountPromise(account: String, password:String = "web3swift", seconds: UInt64 = 300) -> Promise { + public func unlockAccountPromise(account: String, password:String = "web3swift", seconds: UInt64 = 300) -> Promise { let queue = web3.requestDispatcher.queue do { if self.web3.provider.attachedKeystoreManager == nil { diff --git a/web3swift/Web3/Classes/Web3+Methods.swift b/web3swift/Web3/Classes/Web3+Methods.swift index 7a1b3018e..ff67bb278 100755 --- a/web3swift/Web3/Classes/Web3+Methods.swift +++ b/web3swift/Web3/Classes/Web3+Methods.swift @@ -26,10 +26,12 @@ public enum JSONRPCmethod: String, Encodable { case getBlockByNumber = "eth_getBlockByNumber" case personalSign = "eth_sign" case unlockAccount = "personal_unlockAccount" + case createAccount = "personal_createAccount" case getLogs = "eth_getLogs" case getTxPoolInspect = "txpool_inspect" case getTxPoolStatus = "txpool_status" case getTxPoolContent = "txpool_content" + public var requiredNumOfParameters: Int { get { From 38f8caa1b95ae417fdfac336bcaea713626fa495 Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Tue, 6 Nov 2018 00:20:54 +0300 Subject: [PATCH 21/23] - Add extra hook function - Fix ENS - Implement nonce middleware, example is in tests --- .gitignore | 1 + .../Public/BigInt/BigInt-iOS-umbrella.h | 2 +- .../Public/BigInt/BigInt-iOS.modulemap | 2 +- .../Public/BigInt/BigInt-macOS-umbrella.h | 2 +- .../Public/BigInt/BigInt-macOS.modulemap | 2 +- .../CryptoSwift/CryptoSwift-iOS-umbrella.h | 2 +- .../CryptoSwift/CryptoSwift-iOS.modulemap | 2 +- .../CryptoSwift/CryptoSwift-macOS-umbrella.h | 2 +- .../CryptoSwift/CryptoSwift-macOS.modulemap | 2 +- .../EthereumABI/EthereumABI-iOS-umbrella.h | 2 +- .../EthereumABI/EthereumABI-iOS.modulemap | 2 +- .../EthereumABI/EthereumABI-macOS-umbrella.h | 2 +- .../EthereumABI/EthereumABI-macOS.modulemap | 2 +- .../EthereumAddress-iOS-umbrella.h | 2 +- .../EthereumAddress-iOS.modulemap | 2 +- .../EthereumAddress-macOS-umbrella.h | 2 +- .../EthereumAddress-macOS.modulemap | 2 +- .../Public/PromiseKit/PromiseKit-umbrella.h | 2 +- .../Public/PromiseKit/PromiseKit.modulemap | 2 +- ...Kit.root-CorePromise-Foundation-umbrella.h | 2 +- ...eKit.root-CorePromise-Foundation.modulemap | 2 +- .../Public/Result/Result-iOS-umbrella.h | 2 +- .../Public/Result/Result-iOS.modulemap | 2 +- .../Public/Result/Result-macOS-umbrella.h | 2 +- .../Public/Result/Result-macOS.modulemap | 2 +- .../Public/SipHash/SipHash-iOS-umbrella.h | 2 +- .../Public/SipHash/SipHash-iOS.modulemap | 2 +- .../Public/SipHash/SipHash-macOS-umbrella.h | 2 +- .../Public/SipHash/SipHash-macOS.modulemap | 2 +- .../Public/SwiftRLP/SwiftRLP-iOS-umbrella.h | 2 +- .../Public/SwiftRLP/SwiftRLP-iOS.modulemap | 2 +- .../Public/SwiftRLP/SwiftRLP-macOS-umbrella.h | 2 +- .../Public/SwiftRLP/SwiftRLP-macOS.modulemap | 2 +- .../Public/scrypt/scrypt-iOS-umbrella.h | 2 +- .../Public/scrypt/scrypt-iOS.modulemap | 2 +- .../Public/scrypt/scrypt-macOS-umbrella.h | 2 +- .../Public/scrypt/scrypt-macOS.modulemap | 2 +- .../secp256k1_swift-iOS-umbrella.h | 2 +- .../secp256k1_swift-iOS.modulemap | 2 +- .../secp256k1_swift-macOS-umbrella.h | 2 +- .../secp256k1_swift-macOS.modulemap | 2 +- web3swift.xcodeproj/project.pbxproj | 6 + .../Convenience/Classes/Data+Extension.swift | 5 +- .../Promise+Web3+Eth+SendRawTransaction.swift | 5 + .../Promise+Web3+Eth+SendTransaction.swift | 9 +- web3swift/Utils/Classes/NonceMiddleware.swift | 111 ++++++++++++++++++ web3swift/Web3/Classes/Web3+Instance.swift | 9 +- .../Classes/Web3+MutatingTransaction.swift | 8 +- web3swift/Web3/Classes/Web3+Utils.swift | 4 + web3swiftTests/Resourses/key.json | 1 - .../web3swift_Eventloop_Tests.swift | 36 ++++++ .../web3swift_transactions_Tests.swift | 7 ++ 52 files changed, 234 insertions(+), 48 deletions(-) create mode 100644 web3swift/Utils/Classes/NonceMiddleware.swift delete mode 100644 web3swiftTests/Resourses/key.json diff --git a/.gitignore b/.gitignore index 268135e69..fd4001b83 100755 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,4 @@ fastlane/screenshots fastlane/test_output API_keys.plist web3swiftTests/key.json +web3swiftTests/Resources/key.json diff --git a/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h b/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h index 54c439564..d04d0f479 120000 --- a/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h +++ b/Pods/Headers/Public/BigInt/BigInt-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap b/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap index 5827ffd6f..5e3ba93be 120000 --- a/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap +++ b/Pods/Headers/Public/BigInt/BigInt-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h b/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h index 15cd9101e..7c100fb6e 120000 --- a/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h +++ b/Pods/Headers/Public/BigInt/BigInt-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap b/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap index db0458375..309999e26 120000 --- a/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap +++ b/Pods/Headers/Public/BigInt/BigInt-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h index 38ee2e270..53d6c211e 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap index d3c8afa43..c3e3c3a34 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-iOS/CryptoSwift-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h index 4f6598359..1bf7d4d73 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap index 13bb9bda2..19cb03653 120000 --- a/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap +++ b/Pods/Headers/Public/CryptoSwift/CryptoSwift-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/CryptoSwift-macOS/CryptoSwift-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h b/Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h index 372038959..82745e647 120000 --- a/Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h +++ b/Pods/Headers/Public/EthereumABI/EthereumABI-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap b/Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap index ded50b1ab..bff509710 120000 --- a/Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap +++ b/Pods/Headers/Public/EthereumABI/EthereumABI-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumABI-iOS/EthereumABI-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h b/Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h index e72800bb6..c4a703b51 120000 --- a/Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h +++ b/Pods/Headers/Public/EthereumABI/EthereumABI-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap b/Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap index 99eb1eb31..c270ce50e 120000 --- a/Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap +++ b/Pods/Headers/Public/EthereumABI/EthereumABI-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumABI-macOS/EthereumABI-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h index 505dcdba1..48a0c2378 120000 --- a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap index 2e8de9c1b..5daa54791 120000 --- a/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumAddress-iOS/EthereumAddress-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h index 45c29b7ea..ec4284bbd 120000 --- a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap index 1814f3891..71f266362 120000 --- a/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap +++ b/Pods/Headers/Public/EthereumAddress/EthereumAddress-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/EthereumAddress-macOS/EthereumAddress-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h b/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h index 384f088cd..54a39550a 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h +++ b/Pods/Headers/Public/PromiseKit/PromiseKit-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap b/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap index 5b105d963..03e17826b 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap +++ b/Pods/Headers/Public/PromiseKit/PromiseKit.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h index 6026bec84..2202ae821 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h +++ b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap index 515bc96ce..377be965b 120000 --- a/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap +++ b/Pods/Headers/Public/PromiseKit/PromiseKit.root-CorePromise-Foundation.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/PromiseKit.root-CorePromise-Foundation/PromiseKit.root-CorePromise-Foundation.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-iOS-umbrella.h b/Pods/Headers/Public/Result/Result-iOS-umbrella.h index 5017bcc62..a7f847b9e 120000 --- a/Pods/Headers/Public/Result/Result-iOS-umbrella.h +++ b/Pods/Headers/Public/Result/Result-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-iOS.modulemap b/Pods/Headers/Public/Result/Result-iOS.modulemap index a9cb518ea..bc4f23ca4 120000 --- a/Pods/Headers/Public/Result/Result-iOS.modulemap +++ b/Pods/Headers/Public/Result/Result-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-iOS/Result-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-macOS-umbrella.h b/Pods/Headers/Public/Result/Result-macOS-umbrella.h index d933679ed..5c92b47bc 120000 --- a/Pods/Headers/Public/Result/Result-macOS-umbrella.h +++ b/Pods/Headers/Public/Result/Result-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/Result/Result-macOS.modulemap b/Pods/Headers/Public/Result/Result-macOS.modulemap index 6ff87c94a..a1725381e 120000 --- a/Pods/Headers/Public/Result/Result-macOS.modulemap +++ b/Pods/Headers/Public/Result/Result-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/Result-macOS/Result-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h b/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h index 736829e4f..909a01c80 120000 --- a/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h +++ b/Pods/Headers/Public/SipHash/SipHash-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap b/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap index 363bde1c4..60dbe3748 120000 --- a/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap +++ b/Pods/Headers/Public/SipHash/SipHash-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-iOS/SipHash-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h b/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h index c56e6a45b..b1f95e224 120000 --- a/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h +++ b/Pods/Headers/Public/SipHash/SipHash-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap b/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap index 835353525..5ea25fc9c 120000 --- a/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap +++ b/Pods/Headers/Public/SipHash/SipHash-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SipHash-macOS/SipHash-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h index b77347325..b1b552e68 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap index ae407f989..0842d08e1 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-iOS/SwiftRLP-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h index 4740a4f84..b77715c02 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap index d1421e204..c5cebdd37 120000 --- a/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap +++ b/Pods/Headers/Public/SwiftRLP/SwiftRLP-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/SwiftRLP-macOS/SwiftRLP-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h b/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h index 1c81cd5a7..e82a48440 120000 --- a/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h +++ b/Pods/Headers/Public/scrypt/scrypt-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap b/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap index 02bd8338d..082fbbbba 120000 --- a/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap +++ b/Pods/Headers/Public/scrypt/scrypt-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-iOS/scrypt-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h b/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h index 75f99866d..7a0dabd86 120000 --- a/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h +++ b/Pods/Headers/Public/scrypt/scrypt-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap b/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap index 2e33aed25..9ec4c6ed1 120000 --- a/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap +++ b/Pods/Headers/Public/scrypt/scrypt-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/scrypt-macOS/scrypt-macOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h index 70cc63a67..554c654f1 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap index c5b6fa265..44829fb84 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-iOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-iOS/secp256k1_swift-iOS.modulemap \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h index d75b444d6..56967ab47 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS-umbrella.h @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS-umbrella.h \ No newline at end of file diff --git a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap index c0e372d55..0ec25a913 120000 --- a/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap +++ b/Pods/Headers/Public/secp256k1_swift/secp256k1_swift-macOS.modulemap @@ -1 +1 @@ -/Users/antongrigorev/Developer/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap \ No newline at end of file +/Users/alexvlasov/Blockchain/web3swift/web3swift/Pods/Target Support Files/secp256k1_swift-macOS/secp256k1_swift-macOS.modulemap \ No newline at end of file diff --git a/web3swift.xcodeproj/project.pbxproj b/web3swift.xcodeproj/project.pbxproj index 1738d8948..7e3afd60b 100755 --- a/web3swift.xcodeproj/project.pbxproj +++ b/web3swift.xcodeproj/project.pbxproj @@ -165,6 +165,8 @@ 81DFB400210775320011DC85 /* Web3+Infura.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81DFB3FE210775320011DC85 /* Web3+Infura.swift */; }; 81EB1E4B208173D7003BD47F /* Web3+Personal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81EB1E4A208173D7003BD47F /* Web3+Personal.swift */; }; 81EB1E4C208173D7003BD47F /* Web3+Personal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81EB1E4A208173D7003BD47F /* Web3+Personal.swift */; }; + 81ED4EA82190D922003E932E /* NonceMiddleware.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81ED4EA72190D922003E932E /* NonceMiddleware.swift */; }; + 81ED4EA92190D922003E932E /* NonceMiddleware.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81ED4EA72190D922003E932E /* NonceMiddleware.swift */; }; 81FA43F62044097100EE14D5 /* web3swift_macOS_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FA43F52044097100EE14D5 /* web3swift_macOS_Tests.swift */; }; 81FA43F82044097100EE14D5 /* web3swift_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 417715D420362916005C3E16 /* web3swift_macOS.framework */; }; 81FB21FE207BB297007F9A83 /* EIP67Code.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81FB21F8207BA78B007F9A83 /* EIP67Code.swift */; }; @@ -310,6 +312,7 @@ 81DDECCE1FDF004E0063684A /* Web3.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Web3.swift; sourceTree = ""; }; 81DFB3FE210775320011DC85 /* Web3+Infura.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Web3+Infura.swift"; sourceTree = ""; }; 81EB1E4A208173D7003BD47F /* Web3+Personal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+Personal.swift"; sourceTree = ""; }; + 81ED4EA72190D922003E932E /* NonceMiddleware.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NonceMiddleware.swift; sourceTree = ""; }; 81FA43F32044097000EE14D5 /* web3swift-macOS_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "web3swift-macOS_Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 81FA43F52044097100EE14D5 /* web3swift_macOS_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_macOS_Tests.swift; sourceTree = ""; }; 81FA43F72044097100EE14D5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -502,6 +505,7 @@ 81A7B2862143DBF6004CD2C7 /* EIP681.swift */, B2E668CD214F8A7B00C3CC2D /* ENS.swift */, B219DC162154F3EE0035BF94 /* ENSResolver.swift */, + 81ED4EA72190D922003E932E /* NonceMiddleware.swift */, ); path = Classes; sourceTree = ""; @@ -1054,6 +1058,7 @@ 8160E5CE20B8245A0070070B /* IBAN.swift in Sources */, 81909D1521862D37007D2AE5 /* Web3+MutatingTransaction.swift in Sources */, 810B0F9C1FEC520500CF0DA2 /* Web3+Methods.swift in Sources */, + 81ED4EA82190D922003E932E /* NonceMiddleware.swift in Sources */, 81A1822520D678590016741F /* Promise+Web3+Eth+GetGasPrice.swift in Sources */, 8113DE7C1FD8514400CD8DF1 /* NSRegularExpressionExtension.swift in Sources */, 81C5DA2E2074EBF500424CD6 /* EthereumContract.swift in Sources */, @@ -1158,6 +1163,7 @@ 41948131203630530065A83B /* BIP32KeystoreJSONStructure.swift in Sources */, 41948132203630530065A83B /* BIP32HDNode.swift in Sources */, 81A7B2522143C3A8004CD2C7 /* NameHash.swift in Sources */, + 81ED4EA92190D922003E932E /* NonceMiddleware.swift in Sources */, 81A1824920D7DDA20016741F /* Promise+Web3+Personal+Sign.swift in Sources */, 81A1822620D678590016741F /* Promise+Web3+Eth+GetGasPrice.swift in Sources */, 81909D1621862D37007D2AE5 /* Web3+MutatingTransaction.swift in Sources */, diff --git a/web3swift/Convenience/Classes/Data+Extension.swift b/web3swift/Convenience/Classes/Data+Extension.swift index c68fc04e7..d02fcac37 100755 --- a/web3swift/Convenience/Classes/Data+Extension.swift +++ b/web3swift/Convenience/Classes/Data+Extension.swift @@ -37,7 +37,8 @@ public extension Data { dataPtr.initialize(repeating: 0, count: count) } } - public static func randomBytes(length: Int) -> Data? { + + static func randomBytes(length: Int) -> Data? { for _ in 0...1024 { var data = Data(repeating: 0, count: length) let result = data.withUnsafeMutableBytes { @@ -51,7 +52,7 @@ public extension Data { return nil } - public static func fromHex(_ hex: String) -> Data? { + static func fromHex(_ hex: String) -> Data? { let string = hex.lowercased().stripHexPrefix() let array = Array(hex: string) if (array.count == 0) { diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift index f80a751ca..7aa3b83a6 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift @@ -33,6 +33,11 @@ extension web3.Eth { throw Web3Error.nodeError(desc: "Invalid value from Ethereum node") } let result = TransactionSendingResult(transaction: transaction, hash: value) + for hook in self.web3.postSubmissionHooks { + hook.queue.async { + hook.function(result) + } + } return result } } catch { diff --git a/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift b/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift index 069c8f708..7fe53fd98 100755 --- a/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift +++ b/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift @@ -10,7 +10,7 @@ import PromiseKit extension web3.Eth { - public func sendTransactionPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?, password:String = "web3swift") -> Promise { + public func sendTransactionPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions? = nil, password:String = "web3swift") -> Promise { // print(transaction) var assembledTransaction : EthereumTransaction = transaction // .mergedWithOptions(transactionOptions) let queue = web3.requestDispatcher.queue @@ -30,7 +30,7 @@ extension web3.Eth { } } let shouldContinue = try prom.wait() - if shouldContinue { + if !shouldContinue { throw Web3Error.processingError(desc: "Transaction is canceled by middleware") } } @@ -51,6 +51,11 @@ extension web3.Eth { throw Web3Error.nodeError(desc: "Invalid value from Ethereum node") } let result = TransactionSendingResult(transaction: assembledTransaction, hash: value) + for hook in self.web3.postSubmissionHooks { + hook.queue.async { + hook.function(result) + } + } return result } } diff --git a/web3swift/Utils/Classes/NonceMiddleware.swift b/web3swift/Utils/Classes/NonceMiddleware.swift new file mode 100644 index 000000000..e28dc53a4 --- /dev/null +++ b/web3swift/Utils/Classes/NonceMiddleware.swift @@ -0,0 +1,111 @@ +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import EthereumAddress +import BigInt +import PromiseKit + +extension Web3.Utils { + + fileprivate typealias AssemblyHook = web3.AssemblyHook + fileprivate typealias SubmissionResultHook = web3.SubmissionResultHook + + public class NonceMiddleware: EventLoopRunnableProtocol { + var web3: web3? + var nonceLookups: [EthereumAddress: BigUInt] = [EthereumAddress: BigUInt]() + public var name: String = "Nonce lookup middleware" + public let queue: DispatchQueue = DispatchQueue(label: "Nonce middleware queue") + public var synchronizationPeriod: TimeInterval = 300.0 // 5 minutes + var lastSyncTime: Date = Date() + + public func functionToRun() { + guard let w3 = self.web3 else {return} + var allPromises = [Promise]() + allPromises.reserveCapacity(self.nonceLookups.keys.count) + let knownKeys = Array(self.nonceLookups.keys) + for k in knownKeys { + let promise = w3.eth.getTransactionCountPromise(address: k, onBlock: "latest") + allPromises.append(promise) + } + when(resolved: allPromises).done(on: w3.requestDispatcher.queue) {results in + self.queue.async { + var i = 0 + for res in results { + switch res { + case .fulfilled(let newNonce): + let key = knownKeys[i] + self.nonceLookups[key] = newNonce + i = i + 1 + default: + i = i + 1 + } + } + } + + } + } + + public init() { + + } + + func preAssemblyFunction(tx: EthereumTransaction, contract: EthereumContract, transactionOptions: TransactionOptions) -> (EthereumTransaction, EthereumContract, TransactionOptions, Bool) { + guard let from = transactionOptions.from else { + // do nothing + return (tx, contract, transactionOptions, true) + } + guard let knownNonce = self.nonceLookups[from] else { + return (tx, contract, transactionOptions, true) + } + + let newNonce = knownNonce + 1 + + self.queue.async { + self.nonceLookups[from] = newNonce + } + // var modifiedTX = tx + // modifiedTX.nonce = newNonce + var newOptions = transactionOptions + newOptions.nonce = .manual(newNonce) + return (tx, contract, newOptions, true) + } + + func postSubmissionFunction(result: TransactionSendingResult) { + guard let from = result.transaction.sender else { + // do nothing + return + } + + let newNonce = result.transaction.nonce + + if let knownNonce = self.nonceLookups[from] { + if knownNonce != newNonce { + self.queue.async { + self.nonceLookups[from] = newNonce + } + } + return + } + self.queue.async { + self.nonceLookups[from] = newNonce + } + return + } + + public func attach(_ web3: web3) { + self.web3 = web3 + web3.eventLoop.monitoredUserFunctions.append(self) + let preHook = AssemblyHook(queue: web3.requestDispatcher.queue, function: self.preAssemblyFunction) + web3.preAssemblyHooks.append(preHook) + let postHook = SubmissionResultHook(queue: web3.requestDispatcher.queue, function: self.postSubmissionFunction) + web3.postSubmissionHooks.append(postHook) + } + + } + + +} diff --git a/web3swift/Web3/Classes/Web3+Instance.swift b/web3swift/Web3/Classes/Web3+Instance.swift index 7704fdf3a..c674bd0a5 100755 --- a/web3swift/Web3/Classes/Web3+Instance.swift +++ b/web3swift/Web3/Classes/Web3+Instance.swift @@ -204,6 +204,8 @@ public class web3: Web3OptionsInheritable { public typealias SubmissionHookFunction = ((EthereumTransaction, TransactionOptions)) -> (EthereumTransaction, TransactionOptions, Bool) + public typealias SubmissionResultHookFunction = (TransactionSendingResult) -> () + public struct AssemblyHook { public var queue: DispatchQueue public var function: AssemblyHookFunction @@ -214,10 +216,15 @@ public class web3: Web3OptionsInheritable { public var function: SubmissionHookFunction } + public struct SubmissionResultHook { + public var queue: DispatchQueue + public var function: SubmissionResultHookFunction + } + public var preAssemblyHooks: [AssemblyHook] = [AssemblyHook]() public var postAssemblyHooks: [AssemblyHook] = [AssemblyHook]() public var preSubmissionHooks: [SubmissionHook] = [SubmissionHook]() -// public var postSubmissionHooks: [SubmissionHook] = [SubmissionHook]() + public var postSubmissionHooks: [SubmissionResultHook] = [SubmissionResultHook]() } diff --git a/web3swift/Web3/Classes/Web3+MutatingTransaction.swift b/web3swift/Web3/Classes/Web3+MutatingTransaction.swift index 2ddaa9ccc..d5a399582 100644 --- a/web3swift/Web3/Classes/Web3+MutatingTransaction.swift +++ b/web3swift/Web3/Classes/Web3+MutatingTransaction.swift @@ -51,7 +51,7 @@ public class WriteTransaction: ReadTransaction { } } let shouldContinue = try prom.wait() - if shouldContinue { + if !shouldContinue { seal.reject(Web3Error.processingError(desc: "Transaction is canceled by middleware")) return } @@ -129,7 +129,7 @@ public class WriteTransaction: ReadTransaction { } } let shouldContinue = try prom.wait() - if shouldContinue { + if !shouldContinue { throw Web3Error.processingError(desc: "Transaction is canceled by middleware") } } @@ -161,4 +161,8 @@ public class WriteTransaction: ReadTransaction { public func send(password:String = "web3swift", transactionOptions: TransactionOptions? = nil) throws -> TransactionSendingResult { return try self.sendPromise(password: password, transactionOptions: transactionOptions).wait() } + + public func assemble(transactionOptions: TransactionOptions? = nil) throws -> EthereumTransaction { + return try self.assemblePromise(transactionOptions: transactionOptions).wait() + } } diff --git a/web3swift/Web3/Classes/Web3+Utils.swift b/web3swift/Web3/Classes/Web3+Utils.swift index bfa1cf8d6..934b759a0 100755 --- a/web3swift/Web3/Classes/Web3+Utils.swift +++ b/web3swift/Web3/Classes/Web3+Utils.swift @@ -822,4 +822,8 @@ extension Web3.Utils { public static func hexToBigUInt(_ string: String) -> BigUInt? { return BigUInt(string.stripHexPrefix(), radix: 16) } + + public static func randomBytes(length: Int) -> Data? { + return Data.randomBytes(length:length) + } } diff --git a/web3swiftTests/Resourses/key.json b/web3swiftTests/Resourses/key.json deleted file mode 100644 index a23c2ec67..000000000 --- a/web3swiftTests/Resourses/key.json +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"id":"f96d74b2-8f25-40e0-81d3-1a6875b3f9a5","crypto":{"ciphertext":"a9a1f9144fe252514f160ff23244959193f5f98de9a1c160cace5098ce3b94c8","cipherparams":{"iv":"e2afc3c43576f985fb2b64e3de363c95"},"kdf":"scrypt","kdfparams":{"r":6,"p":1,"n":4096,"dklen":32,"salt":"f2c9a8a9bcfd2672d81af8cdb86f0df9ba879113c1926e163056bf766e1671ad"},"mac":"72e2360bc01ec91f137a47d9156c89d07b23a20262b26a157917ce99554befff","cipher":"aes-128-cbc"},"address":"0x3c5bb4fec14c202352b3177e0d14e645493bbf16"} diff --git a/web3swiftTests/web3swift_Eventloop_Tests.swift b/web3swiftTests/web3swift_Eventloop_Tests.swift index d5355dd2c..6ca05f5ad 100644 --- a/web3swiftTests/web3swift_Eventloop_Tests.swift +++ b/web3swiftTests/web3swift_Eventloop_Tests.swift @@ -34,5 +34,41 @@ class web3swift_Eventloop_Tests: XCTestCase { waitForExpectations(timeout: 60, handler: nil) } + + func testNonceMiddleware() { + let web3 = Web3.InfuraRinkebyWeb3() + let middleware = Web3.Utils.NonceMiddleware() + middleware.attach(web3) + + let sendToAddress = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")! + let ksData = getKeystoreData() + let tempKeystore = EthereumKeystoreV3(ksData!) + let keystoreManager = KeystoreManager([tempKeystore!]) + web3.addKeystoreManager(keystoreManager) + + var tx = web3.eth.sendETH(to: sendToAddress, amount: 1000) + tx!.transactionOptions.from = tempKeystore!.addresses!.first! + var result = try! tx!.send(password: "web3swift") + let newNonce = result.transaction.nonce + sleep(1) + let hookNewNonce = middleware.nonceLookups[tempKeystore!.addresses!.first!]! + XCTAssertEqual(newNonce, hookNewNonce) + + tx = web3.eth.sendETH(to: sendToAddress, amount: 1000) + tx!.transactionOptions.from = tempKeystore!.addresses!.first! + result = try! tx!.send(password: "web3swift") + sleep(1) + let newNonce2 = result.transaction.nonce + let hookNewNonce2 = middleware.nonceLookups[tempKeystore!.addresses!.first!]! + XCTAssert(newNonce2 == hookNewNonce2) + } + + func getKeystoreData() -> Data? { + let bundle = Bundle(for: type(of: self)) + guard let path = bundle.path(forResource: "key", ofType: "json") else {return nil} + guard let data = NSData(contentsOfFile: path) else {return nil} + return data as Data + } + } diff --git a/web3swiftTests/web3swift_transactions_Tests.swift b/web3swiftTests/web3swift_transactions_Tests.swift index 1109764ef..32b578a70 100755 --- a/web3swiftTests/web3swift_transactions_Tests.swift +++ b/web3swiftTests/web3swift_transactions_Tests.swift @@ -84,4 +84,11 @@ class web3swift_transactions_Tests: XCTestCase { guard let data = NSData(contentsOfFile: path) else {return nil} return data as Data } + + func testGenerateDummyKeystore() { + let keystore = try! EthereumKeystoreV3.init(password: "web3swift") + let dump = try! keystore!.serialize() + let jsonString = String.init(data: dump!, encoding: .ascii) + print(jsonString) + } } From 233d2a09fbb97b4100c055b957c6ad750e06f5a7 Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Thu, 8 Nov 2018 13:37:30 +0300 Subject: [PATCH 22/23] - initial web3webview support with example --- Example/web3swiftBrowser/Podfile | 7 + Example/web3swiftBrowser/Podfile.lock | 73 + .../web3swiftBrowser/Pods/BigInt/LICENSE.md | 20 + .../web3swiftBrowser/Pods/BigInt/README.md | 435 + .../Pods/BigInt/sources/Addition.swift | 126 + .../Pods/BigInt/sources/BigInt.swift | 76 + .../Pods/BigInt/sources/BigUInt.swift | 386 + .../Pods/BigInt/sources/Bitwise Ops.swift | 121 + .../Pods/BigInt/sources/Codable.swift | 155 + .../Pods/BigInt/sources/Comparable.swift | 63 + .../Pods/BigInt/sources/Data Conversion.swift | 107 + .../Pods/BigInt/sources/Division.swift | 374 + .../Pods/BigInt/sources/Exponentiation.swift | 119 + .../sources/Floating Point Conversion.swift | 73 + .../Pods/BigInt/sources/GCD.swift | 80 + .../Pods/BigInt/sources/Hashable.swift | 28 + .../BigInt/sources/Integer Conversion.swift | 89 + .../Pods/BigInt/sources/Multiplication.swift | 165 + .../Pods/BigInt/sources/Prime Test.swift | 153 + .../Pods/BigInt/sources/Random.swift | 71 + .../Pods/BigInt/sources/Shifts.swift | 211 + .../Pods/BigInt/sources/Square Root.swift | 41 + .../Pods/BigInt/sources/Strideable.swift | 38 + .../BigInt/sources/String Conversion.swift | 242 + .../Pods/BigInt/sources/Subtraction.swift | 169 + .../Pods/BigInt/sources/Words and Bits.swift | 202 + .../web3swiftBrowser/Pods/CryptoSwift/LICENSE | 11 + .../Pods/CryptoSwift/README.md | 518 + .../Sources/CryptoSwift/AEAD/AEAD.swift | 40 + .../AEAD/AEADChaCha20Poly1305.swift | 59 + .../Sources/CryptoSwift/AES.Cryptors.swift | 35 + .../CryptoSwift/Sources/CryptoSwift/AES.swift | 539 + .../Sources/CryptoSwift/Array+Extension.swift | 148 + .../Sources/CryptoSwift/Authenticator.swift | 20 + .../CryptoSwift/BatchedCollection.swift | 63 + .../CryptoSwift/Sources/CryptoSwift/Bit.swift | 25 + .../Sources/CryptoSwift/BlockCipher.swift | 18 + .../Sources/CryptoSwift/BlockDecryptor.swift | 84 + .../Sources/CryptoSwift/BlockEncryptor.swift | 57 + .../CryptoSwift/BlockMode/BlockMode.swift | 24 + .../BlockMode/BlockModeOptions.swift | 27 + .../Sources/CryptoSwift/BlockMode/CBC.swift | 70 + .../Sources/CryptoSwift/BlockMode/CCM.swift | 359 + .../Sources/CryptoSwift/BlockMode/CFB.swift | 70 + .../Sources/CryptoSwift/BlockMode/CTR.swift | 134 + .../BlockMode/CipherModeWorker.swift | 61 + .../Sources/CryptoSwift/BlockMode/ECB.swift | 51 + .../Sources/CryptoSwift/BlockMode/GCM.swift | 367 + .../Sources/CryptoSwift/BlockMode/OFB.swift | 70 + .../Sources/CryptoSwift/BlockMode/PCBC.swift | 70 + .../Sources/CryptoSwift/Blowfish.swift | 537 + .../Sources/CryptoSwift/CBCMAC.swift | 104 + .../Sources/CryptoSwift/CMAC.swift | 20 + .../Sources/CryptoSwift/ChaCha20.swift | 347 + .../Sources/CryptoSwift/Checksum.swift | 193 + .../Sources/CryptoSwift/Cipher.swift | 47 + .../CryptoSwift/Collection+Extension.swift | 45 + .../Sources/CryptoSwift/CompactMap.swift | 23 + .../Sources/CryptoSwift/Cryptor.swift | 22 + .../Sources/CryptoSwift/Cryptors.swift | 44 + .../Sources/CryptoSwift/Digest.swift | 78 + .../Sources/CryptoSwift/DigestType.swift | 18 + .../Foundation/AES+Foundation.swift | 23 + .../Foundation/Array+Foundation.swift | 32 + .../Foundation/Blowfish+Foundation.swift | 23 + .../Foundation/ChaCha20+Foundation.swift | 22 + .../Foundation/Data+Extension.swift | 95 + .../Foundation/HMAC+Foundation.swift | 22 + .../Foundation/Rabbit+Foundation.swift | 26 + .../String+FoundationExtension.swift | 41 + .../Foundation/Utils+Foundation.swift | 27 + .../Sources/CryptoSwift/Generics.swift | 55 + .../Sources/CryptoSwift/HKDF.swift | 84 + .../Sources/CryptoSwift/HMAC.swift | 105 + .../Sources/CryptoSwift/Int+Extension.swift | 38 + .../CryptoSwift/Sources/CryptoSwift/MD5.swift | 165 + .../Sources/CryptoSwift/NoPadding.swift | 27 + .../Sources/CryptoSwift/Operators.swift | 32 + .../Sources/CryptoSwift/PKCS/PBKDF1.swift | 89 + .../Sources/CryptoSwift/PKCS/PBKDF2.swift | 116 + .../Sources/CryptoSwift/PKCS/PKCS5.swift | 22 + .../Sources/CryptoSwift/PKCS/PKCS7.swift | 18 + .../CryptoSwift/PKCS/PKCS7Padding.swift | 64 + .../Sources/CryptoSwift/Padding.swift | 49 + .../Sources/CryptoSwift/Poly1305.swift | 165 + .../Sources/CryptoSwift/Rabbit.swift | 217 + .../CryptoSwift/RandomBytesSequence.swift | 50 + .../Sources/CryptoSwift/SHA1.swift | 151 + .../Sources/CryptoSwift/SHA2.swift | 353 + .../Sources/CryptoSwift/SHA3.swift | 289 + .../Sources/CryptoSwift/SecureBytes.swift | 77 + .../Sources/CryptoSwift/StreamDecryptor.swift | 78 + .../Sources/CryptoSwift/StreamEncryptor.swift | 56 + .../CryptoSwift/String+Extension.swift | 81 + .../Sources/CryptoSwift/UInt128.swift | 90 + .../CryptoSwift/UInt16+Extension.swift | 37 + .../CryptoSwift/UInt32+Extension.swift | 48 + .../CryptoSwift/UInt64+Extension.swift | 43 + .../Sources/CryptoSwift/UInt8+Extension.swift | 76 + .../Sources/CryptoSwift/Updatable.swift | 98 + .../Sources/CryptoSwift/Utils.swift | 115 + .../Sources/CryptoSwift/ZeroPadding.swift | 38 + .../EthereumABI/EthereumABI/Classes/ABI.swift | 28 + .../EthereumABI/Classes/ABIDecoding.swift} | 38 +- .../EthereumABI/Classes/ABIElements.swift} | 152 +- .../EthereumABI/Classes/ABIEncoding.swift} | 20 +- .../EthereumABI/Classes/ABIExtensions.swift | 271 + .../Classes/ABIParameterTypes.swift} | 28 +- .../EthereumABI/Classes/ABIParsing.swift} | 105 +- .../EthereumABI/Classes/ABITypeParser.swift} | 33 +- .../EthereumABI/EthereumABI/EthereumABI.h | 23 + .../web3swiftBrowser/Pods/EthereumABI/LICENSE | 13 + .../Pods/EthereumABI/README.md | 3 + .../Classes/EthereumAddress.swift | 24 +- .../EthereumAddress/Classes/Extensions.swift | 226 + .../EthereumAddress/EthereumAddress.h | 23 + .../Pods/EthereumAddress/LICENSE | 13 + .../Pods/EthereumAddress/README.md | 3 + .../Local Podspecs/web3swift.podspec.json | 59 + Example/web3swiftBrowser/Pods/Manifest.lock | 73 + .../Pods/Pods.xcodeproj/project.pbxproj | 4039 + .../Sources/NSNotificationCenter+AnyPromise.h | 44 + .../Sources/NSNotificationCenter+AnyPromise.m | 18 + .../NSNotificationCenter+Promise.swift | 33 + .../Foundation/Sources/NSObject+Promise.swift | 57 + .../Foundation/Sources/NSTask+AnyPromise.h | 53 + .../Foundation/Sources/NSTask+AnyPromise.m | 59 + .../Sources/NSURLSession+AnyPromise.h | 79 + .../Sources/NSURLSession+AnyPromise.m | 113 + .../Sources/NSURLSession+Promise.swift | 241 + .../Foundation/Sources/PMKFoundation.h | 3 + .../Foundation/Sources/Process+Promise.swift | 190 + .../Foundation/Sources/afterlife.swift | 26 + .../Extensions/UIKit/Sources/PMKUIKit.h | 8 + .../UIKit/Sources/UIView+AnyPromise.h | 80 + .../UIKit/Sources/UIView+AnyPromise.m | 64 + .../UIKit/Sources/UIView+Promise.swift | 115 + .../Sources/UIViewController+AnyPromise.h | 71 + .../Sources/UIViewController+AnyPromise.m | 140 + .../UIViewPropertyAnimator+Promise.swift | 14 + .../web3swiftBrowser/Pods/PromiseKit/LICENSE | 20 + .../Pods/PromiseKit/README.md | 174 + .../PromiseKit/Sources/AnyPromise+Private.h | 32 + .../Pods/PromiseKit/Sources/AnyPromise.h | 299 + .../Pods/PromiseKit/Sources/AnyPromise.m | 175 + .../Pods/PromiseKit/Sources/AnyPromise.swift | 204 + .../Pods/PromiseKit/Sources/Box.swift | 101 + .../Pods/PromiseKit/Sources/Catchable.swift | 256 + .../PromiseKit/Sources/Configuration.swift | 13 + .../Sources/CustomStringConvertible.swift | 44 + .../PromiseKit/Sources/Deprecations.swift | 93 + .../Pods/PromiseKit/Sources/Error.swift | 103 + .../Pods/PromiseKit/Sources/Guarantee.swift | 201 + .../Sources/NSMethodSignatureForBlock.m | 77 + .../PromiseKit/Sources/PMKCallVariadicBlock.m | 120 + .../Pods/PromiseKit/Sources/Promise.swift | 179 + .../Pods/PromiseKit/Sources/PromiseKit.h | 7 + .../Pods/PromiseKit/Sources/Resolver.swift | 85 + .../Pods/PromiseKit/Sources/Thenable.swift | 424 + .../Pods/PromiseKit/Sources/after.m | 14 + .../Pods/PromiseKit/Sources/after.swift | 46 + .../PromiseKit/Sources/dispatch_promise.m | 10 + .../Pods/PromiseKit/Sources/firstly.swift | 39 + .../Pods/PromiseKit/Sources/fwd.h | 165 + .../Pods/PromiseKit/Sources/hang.m | 29 + .../Pods/PromiseKit/Sources/hang.swift | 51 + .../Pods/PromiseKit/Sources/join.m | 54 + .../Pods/PromiseKit/Sources/race.m | 9 + .../Pods/PromiseKit/Sources/race.swift | 57 + .../Pods/PromiseKit/Sources/when.m | 107 + .../Pods/PromiseKit/Sources/when.swift | 262 + .../Pods/SipHash/LICENSE.md} | 4 +- .../web3swiftBrowser/Pods/SipHash/README.md | 161 + .../SipHash/SipHash/Primitive Types.swift | 171 + .../Pods/SipHash/SipHash/RandomUInt64.swift | 39 + .../Pods/SipHash/SipHash/SipHashable.swift | 65 + .../Pods/SipHash/SipHash/SipHasher.swift | 197 + .../Pods/SwiftRLP}/Classes/RLP.swift | 191 +- .../web3swiftBrowser/Pods/SwiftRLP/LICENSE | 13 + .../Pods/SwiftRLP/SwiftRLP/SwiftRLP.h | 21 + .../BigInt/BigInt-Info.plist} | 2 +- .../BigInt/BigInt-dummy.m | 5 + .../BigInt/BigInt-prefix.pch} | 0 .../BigInt/BigInt-umbrella.h} | 4 +- .../BigInt/BigInt.modulemap | 6 + .../BigInt/BigInt.xcconfig | 11 + .../Target Support Files/BigInt/Info.plist} | 2 +- .../CryptoSwift/CryptoSwift-Info.plist | 26 + .../CryptoSwift/CryptoSwift-dummy.m | 5 + .../CryptoSwift/CryptoSwift-prefix.pch} | 0 .../CryptoSwift/CryptoSwift-umbrella.h | 16 + .../CryptoSwift/CryptoSwift.modulemap | 6 + .../CryptoSwift/CryptoSwift.xcconfig | 14 + .../CryptoSwift/Info.plist | 26 + .../EthereumABI/EthereumABI-Info.plist | 26 + .../EthereumABI/EthereumABI-dummy.m | 5 + .../EthereumABI/EthereumABI-prefix.pch | 12 + .../EthereumABI/EthereumABI-umbrella.h | 17 + .../EthereumABI/EthereumABI.modulemap | 6 + .../EthereumABI/EthereumABI.xcconfig | 12 + .../EthereumAddress-Info.plist | 26 + .../EthereumAddress/EthereumAddress-dummy.m | 5 + .../EthereumAddress-prefix.pch | 12 + .../EthereumAddress-umbrella.h | 17 + .../EthereumAddress/EthereumAddress.modulemap | 6 + .../EthereumAddress/EthereumAddress.xcconfig | 12 + .../Pods-web3swiftBrowser/Info.plist | 26 + .../Pods-web3swiftBrowser-Info.plist | 26 + ...web3swiftBrowser-acknowledgements.markdown | 405 + ...ds-web3swiftBrowser-acknowledgements.plist | 497 + .../Pods-web3swiftBrowser-dummy.m | 5 + .../Pods-web3swiftBrowser-frameworks.sh | 183 + .../Pods-web3swiftBrowser-resources.sh | 106 + .../Pods-web3swiftBrowser-umbrella.h | 16 + .../Pods-web3swiftBrowser.debug.xcconfig | 12 + .../Pods-web3swiftBrowser.modulemap | 6 + .../Pods-web3swiftBrowser.release.xcconfig | 12 + .../PromiseKit/Info.plist | 26 + .../PromiseKit/PromiseKit-Info.plist | 26 + .../PromiseKit/PromiseKit-dummy.m | 5 + .../PromiseKit/PromiseKit-prefix.pch | 12 + .../PromiseKit/PromiseKit-umbrella.h | 26 + .../PromiseKit/PromiseKit.modulemap | 6 + .../PromiseKit/PromiseKit.xcconfig | 10 + .../Target Support Files/SipHash/Info.plist | 26 + .../SipHash/SipHash-Info.plist | 26 + .../SipHash/SipHash-dummy.m | 5 + .../SipHash/SipHash-prefix.pch | 12 + .../SipHash/SipHash-umbrella.h | 16 + .../SipHash/SipHash.modulemap | 6 + .../SipHash/SipHash.xcconfig} | 4 +- .../SwiftRLP/SwiftRLP-Info.plist | 26 + .../SwiftRLP/SwiftRLP-dummy.m | 5 + .../SwiftRLP/SwiftRLP-prefix.pch | 12 + .../SwiftRLP/SwiftRLP-umbrella.h | 17 + .../SwiftRLP/SwiftRLP.modulemap | 6 + .../SwiftRLP/SwiftRLP.xcconfig | 12 + .../Target Support Files/WKBridge/Info.plist | 26 + .../ResourceBundle-WKBridge-Info.plist | 24 + ...esourceBundle-WKBridge-WKBridge-Info.plist | 24 + .../WKBridge/WKBridge-Info.plist | 26 + .../WKBridge/WKBridge-dummy.m | 5 + .../WKBridge/WKBridge-prefix.pch | 12 + .../WKBridge/WKBridge-umbrella.h | 16 + .../WKBridge/WKBridge.modulemap | 6 + .../WKBridge/WKBridge.xcconfig | 10 + .../scrypt/scrypt-Info.plist | 26 + .../scrypt/scrypt-dummy.m | 5 + .../scrypt/scrypt-prefix.pch | 12 + .../scrypt/scrypt-umbrella.h | 17 + .../scrypt/scrypt.modulemap | 6 + .../scrypt/scrypt.xcconfig | 19 + .../secp256k1_swift-Info.plist | 26 + .../secp256k1_swift/secp256k1_swift-dummy.m | 5 + .../secp256k1_swift-prefix.pch | 12 + .../secp256k1_swift-umbrella.h} | 4 +- .../secp256k1_swift/secp256k1_swift.modulemap | 6 + .../secp256k1_swift/secp256k1_swift.xcconfig} | 7 +- .../Target Support Files/web3swift/Info.plist | 26 + .../web3swift/web3swift-Info.plist | 26 + .../web3swift/web3swift-dummy.m | 5 + .../web3swift/web3swift-prefix.pch | 12 + .../web3swift/web3swift-umbrella.h | 17 + .../web3swift/web3swift.modulemap | 6 + .../web3swift/web3swift.xcconfig | 12 + .../Pods/WKBridge}/LICENSE | 4 +- .../web3swiftBrowser/Pods/WKBridge/README.md | 88 + .../WKBridge/WKBridge/Assets/wk.bridge.min.js | 5 + .../WKBridge/WKBridge/Classes/Bridge.swift | 223 + Example/web3swiftBrowser/Pods/scrypt/LICENSE | 13 + .../Pods/scrypt/scrypt/Cimpl.c | 368 + .../Pods/scrypt/scrypt/Cimpl.h | 51 + .../Pods/scrypt/scrypt/module.modulemap | 4 + .../Pods/scrypt/scrypt/scrypt.h | 23 + .../scrypt/scrypt/scrypt/BufferStorage.swift | 158 + .../Pods/scrypt/scrypt/scrypt/Salsa.swift | 198 + .../Pods/scrypt/scrypt/scrypt/Scrypt.swift | 230 + .../Classes}/libsecp256k1-config.h | 0 .../secp256k1_swift/Classes/secp256k1.swift} | 160 +- .../secp256k1}/contrib/lax_der_parsing.c | 0 .../secp256k1}/contrib/lax_der_parsing.h | 0 .../contrib/lax_der_privatekey_parsing.c | 0 .../contrib/lax_der_privatekey_parsing.h | 0 .../Classes/secp256k1}/include/secp256k1.h | 0 .../secp256k1}/include/secp256k1_ecdh.h | 0 .../secp256k1}/include/secp256k1_recovery.h | 0 .../Classes/secp256k1}/src/basic-config.h | 0 .../Classes/secp256k1}/src/ecdsa.h | 0 .../Classes/secp256k1}/src/ecdsa_impl.h | 0 .../Classes/secp256k1}/src/eckey.h | 0 .../Classes/secp256k1}/src/eckey_impl.h | 0 .../Classes/secp256k1}/src/ecmult.h | 0 .../Classes/secp256k1}/src/ecmult_const.h | 0 .../secp256k1}/src/ecmult_const_impl.h | 0 .../Classes/secp256k1}/src/ecmult_gen.h | 0 .../Classes/secp256k1}/src/ecmult_gen_impl.h | 0 .../Classes/secp256k1}/src/ecmult_impl.h | 0 .../Classes/secp256k1}/src/field.h | 0 .../Classes/secp256k1}/src/field_10x26.h | 0 .../Classes/secp256k1}/src/field_10x26_impl.h | 0 .../Classes/secp256k1}/src/field_5x52.h | 0 .../secp256k1}/src/field_5x52_asm_impl.h | 0 .../Classes/secp256k1}/src/field_5x52_impl.h | 0 .../secp256k1}/src/field_5x52_int128_impl.h | 0 .../Classes/secp256k1}/src/field_impl.h | 0 .../Classes/secp256k1}/src/group.h | 0 .../Classes/secp256k1}/src/group_impl.h | 0 .../Classes/secp256k1}/src/hash.h | 0 .../Classes/secp256k1}/src/hash_impl.h | 0 .../secp256k1}/src/modules/ecdh/main_impl.h | 0 .../src/modules/recovery/main_impl.h | 0 .../Classes/secp256k1}/src/num.h | 0 .../Classes/secp256k1}/src/num_gmp.h | 0 .../Classes/secp256k1}/src/num_gmp_impl.h | 0 .../Classes/secp256k1}/src/num_impl.h | 0 .../Classes/secp256k1}/src/scalar.h | 0 .../Classes/secp256k1}/src/scalar_4x64.h | 0 .../Classes/secp256k1}/src/scalar_4x64_impl.h | 0 .../Classes/secp256k1}/src/scalar_8x32.h | 0 .../Classes/secp256k1}/src/scalar_8x32_impl.h | 0 .../Classes/secp256k1}/src/scalar_impl.h | 0 .../Classes/secp256k1}/src/scalar_low.h | 0 .../Classes/secp256k1}/src/scalar_low_impl.h | 0 .../Classes/secp256k1}/src/scratch.h | 0 .../Classes/secp256k1}/src/scratch_impl.h | 0 .../Classes/secp256k1}/src/secp256k1.c | 0 .../Classes/secp256k1}/src/util.h | 0 .../Pods/secp256k1_swift/LICENSE | 13 + .../Pods/secp256k1_swift/README.md | 8 + .../project.pbxproj | 675 + .../contents.xcworkspacedata | 7 + .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../web3swiftBrowser/AppDelegate.swift | 93 + .../AppIcon.appiconset/Contents.json | 98 + .../Base.lproj/LaunchScreen.storyboard | 25 + .../Base.lproj/Main.storyboard | 28 + .../web3swiftBrowser/Info.plist | 45 + .../web3swiftBrowser/ViewController.swift | 164 + .../web3swiftBrowser/Web3Swift.js | 68345 ++++++++++++++++ .../web3swiftBrowser/Web3Swift.min.js | 2 + .../.xccurrentversion | 8 + .../web3swiftBrowser.xcdatamodel/contents | 4 + .../web3swiftBrowserTests/Info.plist | 22 + .../web3swiftBrowserTests.swift | 36 + .../web3swiftBrowserUITests/Info.plist | 22 + .../web3swiftBrowserUITests.swift | 36 + Example/web3swiftExample/Podfile.lock | 57 +- .../Pods/CryptoSwift/README.md | 23 +- .../Sources/CryptoSwift/AES.Cryptors.swift | 3 + .../Sources/CryptoSwift/BlockDecryptor.swift | 12 +- .../Sources/CryptoSwift/BlockEncryptor.swift | 6 +- .../BlockMode/BlockModeOptions.swift | 4 - .../Sources/CryptoSwift/BlockMode/CCM.swift | 359 + .../Sources/CryptoSwift/BlockMode/CTR.swift | 2 +- .../BlockMode/CipherModeWorker.swift | 26 +- .../Sources/CryptoSwift/BlockMode/GCM.swift | 61 +- .../Sources/CryptoSwift/CBCMAC.swift | 104 + .../Sources/CryptoSwift/CMAC.swift | 85 +- .../Sources/CryptoSwift/CompactMap.swift | 2 +- .../Sources/CryptoSwift/StreamDecryptor.swift | 78 + .../Sources/CryptoSwift/StreamEncryptor.swift | 10 +- .../EthereumABI/EthereumABI/Classes/ABI.swift | 28 + .../EthereumABI/Classes/ABIDecoding.swift | 281 + .../EthereumABI/Classes/ABIElements.swift | 286 + .../EthereumABI/Classes/ABIEncoding.swift | 389 + .../EthereumABI/Classes/ABIExtensions.swift | 271 + .../Classes/ABIParameterTypes.swift | 251 + .../EthereumABI/Classes/ABIParsing.swift | 186 + .../EthereumABI/Classes/ABITypeParser.swift | 110 + .../EthereumABI/EthereumABI/EthereumABI.h | 23 + .../web3swiftExample/Pods/EthereumABI/LICENSE | 13 + .../Pods/EthereumABI/README.md | 3 + .../Classes/EthereumAddress.swift | 136 + .../EthereumAddress/Classes/Extensions.swift | 226 + .../EthereumAddress/EthereumAddress.h | 23 + .../Pods/EthereumAddress/LICENSE | 13 + .../Pods/EthereumAddress/README.md | 3 + Example/web3swiftExample/Pods/Manifest.lock | 57 +- .../Pods/Pods.xcodeproj/project.pbxproj | 4340 +- .../Foundation/Sources/NSTask+AnyPromise.m | 15 +- .../Sources/NSURLSession+Promise.swift | 2 + .../Foundation/Sources/Process+Promise.swift | 50 +- .../Pods/PromiseKit/README.md | 5 +- .../Pods/PromiseKit/Sources/Error.swift | 5 + .../Pods/PromiseKit/Sources/when.swift | 9 +- .../web3swiftExample/Pods/Result/README.md | 113 - .../Pods/Result/Result/AnyError.swift | 46 - .../Pods/Result/Result/NoError.swift | 10 - .../Pods/Result/Result/Result.swift | 196 - .../Pods/Result/Result/ResultProtocol.swift | 152 - .../Pods/SwiftRLP/Classes/RLP.swift | 385 + .../web3swiftExample/Pods/SwiftRLP/LICENSE | 13 + .../Pods/SwiftRLP/SwiftRLP/SwiftRLP.h | 21 + .../CryptoSwift/CryptoSwift-Info.plist | 2 +- .../EthereumABI/EthereumABI-Info.plist | 26 + .../EthereumABI/EthereumABI-dummy.m | 5 + .../EthereumABI/EthereumABI-prefix.pch | 12 + .../EthereumABI/EthereumABI-umbrella.h | 17 + .../EthereumABI/EthereumABI.modulemap | 6 + .../EthereumABI/EthereumABI.xcconfig | 12 + .../EthereumAddress-Info.plist | 26 + .../EthereumAddress/EthereumAddress-dummy.m | 5 + .../EthereumAddress-prefix.pch | 12 + .../EthereumAddress-umbrella.h | 17 + .../EthereumAddress/EthereumAddress.modulemap | 6 + .../EthereumAddress/EthereumAddress.xcconfig | 12 + ...web3swiftExample-acknowledgements.markdown | 101 +- ...ds-web3swiftExample-acknowledgements.plist | 123 +- .../Pods-web3swiftExample-frameworks.sh | 35 +- .../Pods-web3swiftExample.debug.xcconfig | 6 +- .../Pods-web3swiftExample.release.xcconfig | 6 +- .../PromiseKit/PromiseKit-Info.plist | 2 +- .../Result/Result-dummy.m | 5 - .../Result/Result.modulemap | 6 - .../SwiftRLP/SwiftRLP-Info.plist | 26 + .../SwiftRLP/SwiftRLP-dummy.m | 5 + .../SwiftRLP/SwiftRLP-prefix.pch | 12 + .../SwiftRLP/SwiftRLP-umbrella.h | 17 + .../SwiftRLP/SwiftRLP.modulemap | 6 + .../SwiftRLP/SwiftRLP.xcconfig | 12 + .../secp256k1_ios/secp256k1_ios-dummy.m | 5 - .../secp256k1_ios/secp256k1_ios.modulemap | 6 - .../secp256k1_swift-Info.plist | 26 + .../secp256k1_swift/secp256k1_swift-dummy.m | 5 + .../secp256k1_swift-prefix.pch | 12 + .../secp256k1_swift-umbrella.h | 19 + .../secp256k1_swift/secp256k1_swift.modulemap | 6 + .../secp256k1_swift/secp256k1_swift.xcconfig | 12 + .../web3swift/web3swift-Info.plist | 2 +- .../web3swift/web3swift-umbrella.h | 5 +- .../web3swift/web3swift.modulemap | 2 +- .../web3swift/web3swift.xcconfig | 4 +- .../Pods/secp256k1_ios/README.md | 32 - .../secp256k1_ios/secp256k1_ios.h | 17 - .../Classes/libsecp256k1-config.h | 46 + .../secp256k1_swift/Classes/secp256k1.swift | 321 + .../secp256k1/contrib/lax_der_parsing.c | 150 + .../secp256k1/contrib/lax_der_parsing.h | 91 + .../contrib/lax_der_privatekey_parsing.c | 113 + .../contrib/lax_der_privatekey_parsing.h | 90 + .../Classes/secp256k1/include/secp256k1.h | 654 + .../secp256k1/include/secp256k1_ecdh.h | 31 + .../secp256k1/include/secp256k1_recovery.h | 110 + .../Classes/secp256k1/src/basic-config.h | 33 + .../Classes/secp256k1/src/ecdsa.h | 21 + .../Classes/secp256k1/src/ecdsa_impl.h | 313 + .../Classes/secp256k1/src/eckey.h | 25 + .../Classes/secp256k1/src/eckey_impl.h | 100 + .../Classes/secp256k1/src/ecmult.h | 47 + .../Classes/secp256k1/src/ecmult_const.h | 17 + .../Classes/secp256k1/src/ecmult_const_impl.h | 257 + .../Classes/secp256k1/src/ecmult_gen.h | 43 + .../Classes/secp256k1/src/ecmult_gen_impl.h | 210 + .../Classes/secp256k1/src/ecmult_impl.h | 1027 + .../Classes/secp256k1/src/field.h | 132 + .../Classes/secp256k1/src/field_10x26.h | 48 + .../Classes/secp256k1/src/field_10x26_impl.h | 1161 + .../Classes/secp256k1/src/field_5x52.h | 47 + .../secp256k1/src/field_5x52_asm_impl.h | 502 + .../Classes/secp256k1/src/field_5x52_impl.h | 496 + .../secp256k1/src/field_5x52_int128_impl.h | 277 + .../Classes/secp256k1/src/field_impl.h | 315 + .../Classes/secp256k1/src/group.h | 147 + .../Classes/secp256k1/src/group_impl.h | 706 + .../Classes/secp256k1/src/hash.h | 41 + .../Classes/secp256k1/src/hash_impl.h | 282 + .../secp256k1/src/modules/ecdh/main_impl.h | 54 + .../src/modules/recovery/main_impl.h | 193 + .../Classes/secp256k1/src/num.h | 74 + .../Classes/secp256k1/src/num_gmp.h | 20 + .../Classes/secp256k1/src/num_gmp_impl.h | 288 + .../Classes/secp256k1/src/num_impl.h | 24 + .../Classes/secp256k1/src/scalar.h | 106 + .../Classes/secp256k1/src/scalar_4x64.h | 19 + .../Classes/secp256k1/src/scalar_4x64_impl.h | 949 + .../Classes/secp256k1/src/scalar_8x32.h | 19 + .../Classes/secp256k1/src/scalar_8x32_impl.h | 721 + .../Classes/secp256k1/src/scalar_impl.h | 333 + .../Classes/secp256k1/src/scalar_low.h | 15 + .../Classes/secp256k1/src/scalar_low_impl.h | 114 + .../Classes/secp256k1/src/scratch.h | 39 + .../Classes/secp256k1/src/scratch_impl.h | 86 + .../Classes/secp256k1/src/secp256k1.c | 597 + .../Classes/secp256k1/src/util.h | 121 + .../Pods/secp256k1_swift/LICENSE | 13 + .../Pods/secp256k1_swift/README.md | 8 + .../web3swiftExample/Pods/web3swift/LICENSE | 6 +- .../web3swiftExample/Pods/web3swift/README.md | 354 +- .../web3swift/ABIv2/Classes/ABIv2.swift | 31 - .../BlockExplorer+GetTransactionHistory.swift | 244 - .../BlockExplorer/Classes/BlockExplorer.swift | 18 - .../Classes/ComparisonExtensions.swift | 7 +- .../Contract/Classes/ContractProtocol.swift | 9 +- ...ractABIv2.swift => EthereumContract.swift} | 194 +- .../EthereumFilterEncodingExtensions.swift | 7 +- .../Contract/Classes/EventFiltering.swift | 13 +- .../Convenience/Classes/Array+Extension.swift | 6 +- .../Convenience/Classes/Base58.swift | 6 +- .../Classes/BigUInt+Extensions.swift | 16 + .../Classes/CryptoExtensions.swift | 37 +- .../Convenience/Classes/Data+Extension.swift | 12 +- .../Classes/Dictionary+Extension.swift | 6 +- .../NSRegularExpressionExtension.swift | 6 +- .../NativeTypesEncoding+Extensions.swift | 6 +- .../Classes/String+Extension.swift | 8 +- .../Classes/Web3+BrowserFunctions.swift | 171 - .../HookedFunctions/Classes/Web3+Wallet.swift | 61 +- .../Classes/AbstractKeystore.swift | 10 +- .../KeystoreManager/Classes/BIP32HDNode.swift | 7 +- .../Classes/BIP32Keystore.swift | 29 +- .../Classes/BIP32KeystoreJSONStructure.swift | 6 +- .../Classes/BIP39+WordLists.swift | 6 +- .../KeystoreManager/Classes/BIP39.swift | 38 +- .../Classes/EthereumKeystoreV3.swift | 8 +- .../KeystoreManager/Classes/IBAN.swift | 7 +- .../Classes/KeystoreManager.swift | 7 +- .../Classes/KeystoreV3JSONStructure.swift | 6 +- .../Classes/PlainKeystore.swift | 9 +- .../Classes/BigUInt+ObjC.swift | 32 - .../Classes/EthereumAddress+ObjC.swift | 30 - .../Classes/KeystoreManager+ObjC.swift | 23 - .../Classes/PlainKeystore+ObjC.swift | 30 - .../Classes/Web3+Eth+ObjC.swift | 37 - .../Classes/Web3+HttpProvider+ObjC.swift | 33 - .../Classes/Web3+Instance+ObjC.swift | 22 - .../ObjectiveCbridge/Classes/Web3+ObjC.swift | 28 - .../ERC20/Web3+ERC20.swift | 207 - .../Promises/Classes/Promise+Batching.swift | 6 +- .../Classes/Promise+HttpProvider.swift | 6 +- ...omise+Web3+Contract+GetIndexedEvents.swift | 8 +- .../Classes/Promise+Web3+Eth+Call.swift | 12 +- .../Promise+Web3+Eth+EstimateGas.swift | 12 +- .../Promise+Web3+Eth+GetAccounts.swift | 14 +- .../Classes/Promise+Web3+Eth+GetBalance.swift | 7 +- .../Promise+Web3+Eth+GetBlockByHash.swift | 6 +- .../Promise+Web3+Eth+GetBlockByNumber.swift | 6 +- .../Promise+Web3+Eth+GetBlockNumber.swift | 6 +- .../Promise+Web3+Eth+GetGasPrice.swift | 6 +- ...Promise+Web3+Eth+GetTransactionCount.swift | 7 +- ...omise+Web3+Eth+GetTransactionDetails.swift | 6 +- ...omise+Web3+Eth+GetTransactionReceipt.swift | 6 +- .../Promise+Web3+Eth+SendRawTransaction.swift | 17 +- .../Promise+Web3+Eth+SendTransaction.swift | 42 +- .../Promise+Web3+Intermediate+Send.swift | 9 - .../Promise+Web3+Personal+CreateAccount.swift | 37 + .../Classes/Promise+Web3+Personal+Sign.swift | 9 +- .../Promise+Web3+Personal+UnlockAccount.swift | 11 +- .../Classes/Promise+Web3+TxPool.swift | 56 + .../Transaction/Classes/BloomFilter.swift | 30 +- .../Classes/EthereumTransaction.swift | 19 +- .../Classes/TransactionSigner.swift | 21 +- .../web3swift/Utils/Classes/EIP67Code.swift | 10 +- .../web3swift/Utils/Classes/EIP681.swift | 258 - .../web3swift/Utils/Classes/ENS.swift | 155 - .../web3swift/Utils/Classes/NameHash.swift | 54 - .../Web3/Classes/Web3+Contract.swift | 79 +- .../web3swift/Web3/Classes/Web3+Eth.swift | 338 +- .../Web3/Classes/Web3+EventParser.swift | 81 +- .../Web3/Classes/Web3+Eventloop.swift | 103 + .../Web3/Classes/Web3+HttpProvider.swift | 6 +- .../web3swift/Web3/Classes/Web3+Infura.swift | 6 +- .../Web3/Classes/Web3+Instance.swift | 95 +- .../web3swift/Web3/Classes/Web3+JSONRPC.swift | 20 +- .../web3swift/Web3/Classes/Web3+Methods.swift | 17 +- .../Classes/Web3+MutatingTransaction.swift | 168 + .../web3swift/Web3/Classes/Web3+Options.swift | 221 +- .../Web3/Classes/Web3+Personal.swift | 40 +- .../Web3/Classes/Web3+Protocols.swift | 24 +- .../Classes/Web3+ReadingTransaction.swift | 92 + .../Web3/Classes/Web3+Structures.swift | 117 +- .../Web3+TransactionIntermediate.swift | 271 - .../web3swift/Web3/Classes/Web3+TxPool.swift | 25 + .../web3swift/Web3/Classes/Web3+Utils.swift | 501 +- .../web3swift/Web3/Classes/Web3.swift | 21 +- .../web3swift/web3swift-Bridging-Header.h | 13 - .../Pods/web3swift/web3swift/web3swift.h | 6 +- .../project.pbxproj | 16 +- web3swift.podspec | 4 +- .../Classes/Web3+BrowserFunctions.swift | 147 +- 580 files changed, 115417 insertions(+), 6017 deletions(-) create mode 100755 Example/web3swiftBrowser/Podfile create mode 100755 Example/web3swiftBrowser/Podfile.lock create mode 100644 Example/web3swiftBrowser/Pods/BigInt/LICENSE.md create mode 100644 Example/web3swiftBrowser/Pods/BigInt/README.md create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Addition.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/BigInt.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/BigUInt.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Bitwise Ops.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Codable.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Comparable.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Data Conversion.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Division.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Exponentiation.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Floating Point Conversion.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/GCD.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Hashable.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Integer Conversion.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Multiplication.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Prime Test.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Random.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Shifts.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Square Root.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Strideable.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/String Conversion.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Subtraction.swift create mode 100644 Example/web3swiftBrowser/Pods/BigInt/sources/Words and Bits.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/LICENSE create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/README.md create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AES.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/OFB.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Blowfish.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/CMAC.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/ChaCha20.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Checksum.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Digest.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Generics.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/HKDF.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/HMAC.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/MD5.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF2.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS5.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Padding.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Poly1305.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Rabbit.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/RandomBytesSequence.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SHA1.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SHA2.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SHA3.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SecureBytes.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/String+Extension.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Updatable.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Utils.swift create mode 100644 Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift create mode 100755 Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABI.swift rename Example/{web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Decoding.swift => web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIDecoding.swift} (90%) rename Example/{web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Elements.swift => web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIElements.swift} (54%) rename Example/{web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Encoding.swift => web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift} (96%) create mode 100644 Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIExtensions.swift rename Example/{web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift => web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift} (90%) rename Example/{web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Parsing.swift => web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIParsing.swift} (50%) rename Example/{web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2TypeParser.swift => web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABITypeParser.swift} (72%) create mode 100644 Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/EthereumABI.h create mode 100644 Example/web3swiftBrowser/Pods/EthereumABI/LICENSE create mode 100644 Example/web3swiftBrowser/Pods/EthereumABI/README.md rename Example/{web3swiftExample/Pods/web3swift/web3swift/KeystoreManager => web3swiftBrowser/Pods/EthereumAddress/EthereumAddress}/Classes/EthereumAddress.swift (88%) mode change 100755 => 100644 create mode 100644 Example/web3swiftBrowser/Pods/EthereumAddress/EthereumAddress/Classes/Extensions.swift create mode 100644 Example/web3swiftBrowser/Pods/EthereumAddress/EthereumAddress/EthereumAddress.h create mode 100644 Example/web3swiftBrowser/Pods/EthereumAddress/LICENSE create mode 100644 Example/web3swiftBrowser/Pods/EthereumAddress/README.md create mode 100755 Example/web3swiftBrowser/Pods/Local Podspecs/web3swift.podspec.json create mode 100755 Example/web3swiftBrowser/Pods/Manifest.lock create mode 100644 Example/web3swiftBrowser/Pods/Pods.xcodeproj/project.pbxproj create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSObject+Promise.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.h create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.h create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+Promise.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/PMKFoundation.h create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/Process+Promise.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/afterlife.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/PMKUIKit.h create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.h create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+Promise.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.h create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/LICENSE create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/README.md create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise+Private.h create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise.h create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/Box.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/Catchable.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/Configuration.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/CustomStringConvertible.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/Deprecations.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/Error.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/Guarantee.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/Promise.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/PromiseKit.h create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/Resolver.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/Thenable.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/after.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/after.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/dispatch_promise.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/firstly.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/fwd.h create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/hang.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/hang.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/join.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/race.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/race.swift create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/when.m create mode 100644 Example/web3swiftBrowser/Pods/PromiseKit/Sources/when.swift rename Example/{web3swiftExample/Pods/Result/LICENSE => web3swiftBrowser/Pods/SipHash/LICENSE.md} (95%) create mode 100644 Example/web3swiftBrowser/Pods/SipHash/README.md create mode 100644 Example/web3swiftBrowser/Pods/SipHash/SipHash/Primitive Types.swift create mode 100644 Example/web3swiftBrowser/Pods/SipHash/SipHash/RandomUInt64.swift create mode 100644 Example/web3swiftBrowser/Pods/SipHash/SipHash/SipHashable.swift create mode 100644 Example/web3swiftBrowser/Pods/SipHash/SipHash/SipHasher.swift rename Example/{web3swiftExample/Pods/web3swift/web3swift/Utils => web3swiftBrowser/Pods/SwiftRLP}/Classes/RLP.swift (70%) mode change 100755 => 100644 create mode 100644 Example/web3swiftBrowser/Pods/SwiftRLP/LICENSE create mode 100644 Example/web3swiftBrowser/Pods/SwiftRLP/SwiftRLP/SwiftRLP.h rename Example/{web3swiftExample/Pods/Target Support Files/Result/Result-Info.plist => web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-Info.plist} (96%) create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-dummy.m rename Example/{web3swiftExample/Pods/Target Support Files/Result/Result-prefix.pch => web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-prefix.pch} (100%) mode change 100644 => 100755 rename Example/{web3swiftExample/Pods/Target Support Files/Result/Result-umbrella.h => web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-umbrella.h} (64%) mode change 100644 => 100755 create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt.modulemap create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt.xcconfig rename Example/{web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-Info.plist => web3swiftBrowser/Pods/Target Support Files/BigInt/Info.plist} (96%) mode change 100644 => 100755 create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-Info.plist create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-dummy.m rename Example/{web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-prefix.pch => web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-prefix.pch} (100%) mode change 100644 => 100755 create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-umbrella.h create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift.modulemap create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift.xcconfig create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/Info.plist create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-Info.plist create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-dummy.m create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-prefix.pch create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-umbrella.h create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI.modulemap create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI.xcconfig create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-Info.plist create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-dummy.m create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-prefix.pch create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-umbrella.h create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress.modulemap create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress.xcconfig create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Info.plist create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-Info.plist create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-acknowledgements.markdown create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-acknowledgements.plist create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-dummy.m create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-frameworks.sh create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-resources.sh create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-umbrella.h create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.debug.xcconfig create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.modulemap create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.release.xcconfig create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/Info.plist create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-Info.plist create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/SipHash/Info.plist create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-Info.plist create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-dummy.m create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-prefix.pch create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-umbrella.h create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash.modulemap rename Example/{web3swiftExample/Pods/Target Support Files/Result/Result.xcconfig => web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash.xcconfig} (75%) mode change 100644 => 100755 create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-Info.plist create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-dummy.m create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-prefix.pch create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-umbrella.h create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP.modulemap create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP.xcconfig create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/Info.plist create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/ResourceBundle-WKBridge-Info.plist create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/ResourceBundle-WKBridge-WKBridge-Info.plist create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-Info.plist create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-dummy.m create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-prefix.pch create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-umbrella.h create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge.modulemap create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge.xcconfig create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-Info.plist create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-dummy.m create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-prefix.pch create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-umbrella.h create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt.modulemap create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt.xcconfig create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-Info.plist create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-dummy.m create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-prefix.pch rename Example/{web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-umbrella.h => web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-umbrella.h} (68%) create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.modulemap rename Example/{web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios.xcconfig => web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.xcconfig} (80%) create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/web3swift/Info.plist create mode 100644 Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-Info.plist create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-dummy.m create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-prefix.pch create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-umbrella.h create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift.modulemap create mode 100755 Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift.xcconfig rename Example/{web3swiftExample/Pods/secp256k1_ios => web3swiftBrowser/Pods/WKBridge}/LICENSE (92%) mode change 100644 => 100755 create mode 100755 Example/web3swiftBrowser/Pods/WKBridge/README.md create mode 100755 Example/web3swiftBrowser/Pods/WKBridge/WKBridge/Assets/wk.bridge.min.js create mode 100755 Example/web3swiftBrowser/Pods/WKBridge/WKBridge/Classes/Bridge.swift create mode 100755 Example/web3swiftBrowser/Pods/scrypt/LICENSE create mode 100644 Example/web3swiftBrowser/Pods/scrypt/scrypt/Cimpl.c create mode 100644 Example/web3swiftBrowser/Pods/scrypt/scrypt/Cimpl.h create mode 100644 Example/web3swiftBrowser/Pods/scrypt/scrypt/module.modulemap create mode 100755 Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt.h create mode 100755 Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt/BufferStorage.swift create mode 100755 Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt/Salsa.swift create mode 100755 Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt/Scrypt.swift rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes}/libsecp256k1-config.h (100%) mode change 100644 => 100755 rename Example/{web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/LibSecp256k1Extension.swift => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1.swift} (68%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/contrib/lax_der_parsing.c (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/contrib/lax_der_parsing.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/contrib/lax_der_privatekey_parsing.c (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/contrib/lax_der_privatekey_parsing.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/include/secp256k1.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/include/secp256k1_ecdh.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/include/secp256k1_recovery.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/basic-config.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/ecdsa.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/ecdsa_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/eckey.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/eckey_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/ecmult.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/ecmult_const.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/ecmult_const_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/ecmult_gen.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/ecmult_gen_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/ecmult_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/field.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/field_10x26.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/field_10x26_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/field_5x52.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/field_5x52_asm_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/field_5x52_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/field_5x52_int128_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/field_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/group.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/group_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/hash.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/hash_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/modules/ecdh/main_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/modules/recovery/main_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/num.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/num_gmp.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/num_gmp_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/num_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/scalar.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/scalar_4x64.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/scalar_4x64_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/scalar_8x32.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/scalar_8x32_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/scalar_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/scalar_low.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/scalar_low_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/scratch.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/scratch_impl.h (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/secp256k1.c (100%) rename Example/{web3swiftExample/Pods/secp256k1_ios/secp256k1_ios => web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1}/src/util.h (100%) create mode 100755 Example/web3swiftBrowser/Pods/secp256k1_swift/LICENSE create mode 100755 Example/web3swiftBrowser/Pods/secp256k1_swift/README.md create mode 100644 Example/web3swiftBrowser/web3swiftBrowser.xcodeproj/project.pbxproj create mode 100755 Example/web3swiftBrowser/web3swiftBrowser.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100755 Example/web3swiftBrowser/web3swiftBrowser.xcworkspace/contents.xcworkspacedata create mode 100644 Example/web3swiftBrowser/web3swiftBrowser.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100755 Example/web3swiftBrowser/web3swiftBrowser/AppDelegate.swift create mode 100755 Example/web3swiftBrowser/web3swiftBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100755 Example/web3swiftBrowser/web3swiftBrowser/Base.lproj/LaunchScreen.storyboard create mode 100755 Example/web3swiftBrowser/web3swiftBrowser/Base.lproj/Main.storyboard create mode 100755 Example/web3swiftBrowser/web3swiftBrowser/Info.plist create mode 100755 Example/web3swiftBrowser/web3swiftBrowser/ViewController.swift create mode 100644 Example/web3swiftBrowser/web3swiftBrowser/Web3Swift.js create mode 100644 Example/web3swiftBrowser/web3swiftBrowser/Web3Swift.min.js create mode 100755 Example/web3swiftBrowser/web3swiftBrowser/web3swiftBrowser.xcdatamodeld/.xccurrentversion create mode 100755 Example/web3swiftBrowser/web3swiftBrowser/web3swiftBrowser.xcdatamodeld/web3swiftBrowser.xcdatamodel/contents create mode 100755 Example/web3swiftBrowser/web3swiftBrowserTests/Info.plist create mode 100755 Example/web3swiftBrowser/web3swiftBrowserTests/web3swiftBrowserTests.swift create mode 100755 Example/web3swiftBrowser/web3swiftBrowserUITests/Info.plist create mode 100755 Example/web3swiftBrowser/web3swiftBrowserUITests/web3swiftBrowserUITests.swift create mode 100644 Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift create mode 100644 Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift create mode 100644 Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift create mode 100755 Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABI.swift create mode 100755 Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIDecoding.swift create mode 100755 Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIElements.swift create mode 100755 Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift create mode 100644 Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIExtensions.swift create mode 100755 Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift create mode 100755 Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIParsing.swift create mode 100755 Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABITypeParser.swift create mode 100644 Example/web3swiftExample/Pods/EthereumABI/EthereumABI/EthereumABI.h create mode 100644 Example/web3swiftExample/Pods/EthereumABI/LICENSE create mode 100644 Example/web3swiftExample/Pods/EthereumABI/README.md create mode 100644 Example/web3swiftExample/Pods/EthereumAddress/EthereumAddress/Classes/EthereumAddress.swift create mode 100644 Example/web3swiftExample/Pods/EthereumAddress/EthereumAddress/Classes/Extensions.swift create mode 100644 Example/web3swiftExample/Pods/EthereumAddress/EthereumAddress/EthereumAddress.h create mode 100644 Example/web3swiftExample/Pods/EthereumAddress/LICENSE create mode 100644 Example/web3swiftExample/Pods/EthereumAddress/README.md delete mode 100644 Example/web3swiftExample/Pods/Result/README.md delete mode 100644 Example/web3swiftExample/Pods/Result/Result/AnyError.swift delete mode 100644 Example/web3swiftExample/Pods/Result/Result/NoError.swift delete mode 100644 Example/web3swiftExample/Pods/Result/Result/Result.swift delete mode 100644 Example/web3swiftExample/Pods/Result/Result/ResultProtocol.swift create mode 100644 Example/web3swiftExample/Pods/SwiftRLP/Classes/RLP.swift create mode 100644 Example/web3swiftExample/Pods/SwiftRLP/LICENSE create mode 100644 Example/web3swiftExample/Pods/SwiftRLP/SwiftRLP/SwiftRLP.h create mode 100644 Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-Info.plist create mode 100644 Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-dummy.m create mode 100644 Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-prefix.pch create mode 100644 Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-umbrella.h create mode 100644 Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI.modulemap create mode 100644 Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI.xcconfig create mode 100644 Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-Info.plist create mode 100644 Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-dummy.m create mode 100644 Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-prefix.pch create mode 100644 Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-umbrella.h create mode 100644 Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress.modulemap create mode 100644 Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress.xcconfig delete mode 100644 Example/web3swiftExample/Pods/Target Support Files/Result/Result-dummy.m delete mode 100644 Example/web3swiftExample/Pods/Target Support Files/Result/Result.modulemap create mode 100644 Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-Info.plist create mode 100644 Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-dummy.m create mode 100644 Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-prefix.pch create mode 100644 Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-umbrella.h create mode 100644 Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP.modulemap create mode 100644 Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP.xcconfig delete mode 100644 Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-dummy.m delete mode 100644 Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios.modulemap create mode 100644 Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-Info.plist create mode 100644 Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-dummy.m create mode 100644 Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-prefix.pch create mode 100644 Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-umbrella.h create mode 100644 Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.modulemap create mode 100644 Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.xcconfig delete mode 100644 Example/web3swiftExample/Pods/secp256k1_ios/README.md delete mode 100644 Example/web3swiftExample/Pods/secp256k1_ios/secp256k1_ios/secp256k1_ios.h create mode 100755 Example/web3swiftExample/Pods/secp256k1_swift/Classes/libsecp256k1-config.h create mode 100755 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1.swift create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_parsing.c create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_parsing.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_privatekey_parsing.c create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_privatekey_parsing.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/include/secp256k1.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/include/secp256k1_ecdh.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/include/secp256k1_recovery.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/basic-config.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecdsa.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecdsa_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/eckey.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/eckey_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_const.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_const_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_gen.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_gen_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_10x26.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_10x26_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52_asm_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52_int128_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/group.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/group_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/hash.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/hash_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/modules/ecdh/main_impl.h create mode 100755 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/modules/recovery/main_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num_gmp.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num_gmp_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_4x64.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_4x64_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_8x32.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_8x32_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_low.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_low_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scratch.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scratch_impl.h create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/secp256k1.c create mode 100644 Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/util.h create mode 100755 Example/web3swiftExample/Pods/secp256k1_swift/LICENSE create mode 100755 Example/web3swiftExample/Pods/secp256k1_swift/README.md delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/BlockExplorer/Classes/BlockExplorer+GetTransactionHistory.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/BlockExplorer/Classes/BlockExplorer.swift rename Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/{ContractABIv2.swift => EthereumContract.swift} (50%) create mode 100644 Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/BigUInt+Extensions.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/BigUInt+ObjC.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/KeystoreManager+ObjC.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/PlainKeystore+ObjC.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+HttpProvider+ObjC.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+Instance+ObjC.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+ObjC.swift delete mode 100644 Example/web3swiftExample/Pods/web3swift/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Intermediate+Send.swift create mode 100644 Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Personal+CreateAccount.swift create mode 100644 Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+TxPool.swift delete mode 100644 Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/EIP681.swift delete mode 100644 Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/ENS.swift delete mode 100644 Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/NameHash.swift create mode 100644 Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Eventloop.swift create mode 100644 Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+MutatingTransaction.swift create mode 100644 Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+ReadingTransaction.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+TransactionIntermediate.swift create mode 100644 Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+TxPool.swift delete mode 100755 Example/web3swiftExample/Pods/web3swift/web3swift/web3swift-Bridging-Header.h diff --git a/Example/web3swiftBrowser/Podfile b/Example/web3swiftBrowser/Podfile new file mode 100755 index 000000000..7a32e9f29 --- /dev/null +++ b/Example/web3swiftBrowser/Podfile @@ -0,0 +1,7 @@ +platform :ios, '12.0' + +target 'web3swiftBrowser' do + use_frameworks! + pod 'web3swift', :path => '../../' + pod "WKBridge" +end diff --git a/Example/web3swiftBrowser/Podfile.lock b/Example/web3swiftBrowser/Podfile.lock new file mode 100755 index 000000000..cc6a40a03 --- /dev/null +++ b/Example/web3swiftBrowser/Podfile.lock @@ -0,0 +1,73 @@ +PODS: + - BigInt (3.1.0): + - SipHash (~> 1.2) + - CryptoSwift (0.13.0) + - EthereumABI (1.1.1): + - BigInt (~> 3.1) + - CryptoSwift (~> 0.13) + - EthereumAddress (~> 1.0.0) + - EthereumAddress (1.0.0): + - CryptoSwift (~> 0.13) + - PromiseKit (6.5.2): + - PromiseKit/CorePromise (= 6.5.2) + - PromiseKit/Foundation (= 6.5.2) + - PromiseKit/UIKit (= 6.5.2) + - PromiseKit/CorePromise (6.5.2) + - PromiseKit/Foundation (6.5.2): + - PromiseKit/CorePromise + - PromiseKit/UIKit (6.5.2): + - PromiseKit/CorePromise + - scrypt (2.0): + - CryptoSwift (~> 0.11) + - secp256k1_swift (1.0.3) + - SipHash (1.2.2) + - SwiftRLP (1.2): + - BigInt (~> 3.1) + - web3swift (2.0.1): + - BigInt (~> 3.1) + - CryptoSwift (~> 0.13) + - EthereumABI (~> 1.1.1) + - EthereumAddress (~> 1.0.0) + - PromiseKit (~> 6.3) + - scrypt (~> 2.0) + - secp256k1_swift (~> 1.0.3) + - SwiftRLP (~> 1.1) + - WKBridge (0.2.4) + +DEPENDENCIES: + - web3swift (from `../../`) + - WKBridge + +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - BigInt + - CryptoSwift + - EthereumABI + - EthereumAddress + - PromiseKit + - scrypt + - secp256k1_swift + - SipHash + - SwiftRLP + - WKBridge + +EXTERNAL SOURCES: + web3swift: + :path: "../../" + +SPEC CHECKSUMS: + BigInt: 76b5dfdfa3e2e478d4ffdf161aeede5502e2742f + CryptoSwift: 16e78bebf567bad1c87b2d58f6547f25b74c31aa + EthereumABI: f040f5429e5a4366d028c88b88d9441e137593af + EthereumAddress: f476e1320dca3a0024431e713ede7a09c7eb7796 + PromiseKit: 27c1601bfb73405871b805bcb8cf7e55c4dad3db + scrypt: 3fe5b1a3b0976f97cd87488673a8f7c65708cc84 + secp256k1_swift: 4fc5c4b2d2c6d21ee8ccb868cdc92da12f38bed9 + SipHash: fad90a4683e420c52ef28063063dbbce248ea6d4 + SwiftRLP: 98a02b2210128353ca02e4c2f4d83e2a9796db4f + web3swift: aadc7a9b0c3b0384227eff181e39ba24ebfcd76c + WKBridge: 677fc36b9a9e4a80b6f9c4e915480d8fd91f5ad5 + +PODFILE CHECKSUM: ed17f63e9fc4feec3b3d9d88971f86da22d55a1f + +COCOAPODS: 1.6.0.beta.2 diff --git a/Example/web3swiftBrowser/Pods/BigInt/LICENSE.md b/Example/web3swiftBrowser/Pods/BigInt/LICENSE.md new file mode 100644 index 000000000..18cefd118 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/LICENSE.md @@ -0,0 +1,20 @@ + +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/Example/web3swiftBrowser/Pods/BigInt/README.md b/Example/web3swiftBrowser/Pods/BigInt/README.md new file mode 100644 index 000000000..0cf7f1cd5 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/README.md @@ -0,0 +1,435 @@ +[![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-4-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 3.0.0 requires Swift 4. (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.) + +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 except for `arc4random_buf` in `BigUInt Random.swift`, 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: "3.1.0") + ``` + +- **CocoaPods:** Put this in your `Podfile`: + + ```Ruby + pod 'BigInt', '~> 3.1' + ``` + +- **Carthage:** Put this in your `Cartfile`: + + ``` + github "attaswift/BigInt" ~> 3.1 + ``` + + +## 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. + +### Full-width multiplication and division primitives + +I haven't found (64,64)->128 multiplication or (128,64)->64 division operations +in Swift, so [the module has generic implementations for them][fullmuldiv] in terms of the standard +single-width `*` and `/` operators. I suspect there are LLVM intrinsics for full-width +arithmetics that are probably accessible somehow, though. ([Let me know][twitter] if you know how!) + +This sounds slow, but 64-bit digits are +still considerably faster than 32-bit, even though the latter can use direct 64-bit arithmetic to +implement these primitives. + +### 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/Example/web3swiftBrowser/Pods/BigInt/sources/Addition.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Addition.swift new file mode 100644 index 000000000..34f4d44e8 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Addition.swift @@ -0,0 +1,126 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/BigInt.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/BigInt.swift new file mode 100644 index 000000000..6976c2002 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/BigInt.swift @@ -0,0 +1,76 @@ +// +// BigInt.swift +// BigInt +// +// Created by Károly Lőrentey on 2015-12-27. +// Copyright © 2016-2017 Károly Lőrentey. +// + +import SipHash + +//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/Example/web3swiftBrowser/Pods/BigInt/sources/BigUInt.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/BigUInt.swift new file mode 100644 index 000000000..81aa9a837 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/BigUInt.swift @@ -0,0 +1,386 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Bitwise Ops.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Bitwise Ops.swift new file mode 100644 index 000000000..0d00148bd --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Bitwise Ops.swift @@ -0,0 +1,121 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Codable.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Codable.swift new file mode 100644 index 000000000..b53b30be5 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Codable.swift @@ -0,0 +1,155 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Comparable.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Comparable.swift new file mode 100644 index 000000000..d9ab87e7e --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Comparable.swift @@ -0,0 +1,63 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Data Conversion.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Data Conversion.swift new file mode 100644 index 000000000..ffc0ac206 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Data Conversion.swift @@ -0,0 +1,107 @@ +// +// 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 + + 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 + } + var word: Word = 0 + data.enumerateBytes { p, byteIndex, stop in + for byte in p { + 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) + } + + /// 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 { (p: UnsafeMutablePointer) -> Void in + 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 + } +} + diff --git a/Example/web3swiftBrowser/Pods/BigInt/sources/Division.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Division.swift new file mode 100644 index 000000000..4393f52e9 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Division.swift @@ -0,0 +1,374 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Exponentiation.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Exponentiation.swift new file mode 100644 index 000000000..9d7ee85da --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Exponentiation.swift @@ -0,0 +1,119 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Floating Point Conversion.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Floating Point Conversion.swift new file mode 100644 index 000000000..6c2395a31 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Floating Point Conversion.swift @@ -0,0 +1,73 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/GCD.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/GCD.swift new file mode 100644 index 000000000..d55605dce --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/GCD.swift @@ -0,0 +1,80 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Hashable.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Hashable.swift new file mode 100644 index 000000000..7df0ff748 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Hashable.swift @@ -0,0 +1,28 @@ +// +// Hashable.swift +// BigInt +// +// Created by Károly Lőrentey on 2016-01-03. +// Copyright © 2016-2017 Károly Lőrentey. +// + +import SipHash + +extension BigUInt: SipHashable { + //MARK: Hashing + + /// Append this `BigUInt` to the specified hasher. + public func appendHashes(to hasher: inout SipHasher) { + for word in self.words { + hasher.append(word) + } + } +} + +extension BigInt: SipHashable { + /// Append this `BigInt` to the specified hasher. + public func appendHashes(to hasher: inout SipHasher) { + hasher.append(sign) + hasher.append(magnitude) + } +} diff --git a/Example/web3swiftBrowser/Pods/BigInt/sources/Integer Conversion.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Integer Conversion.swift new file mode 100644 index 000000000..9a210e4a4 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Integer Conversion.swift @@ -0,0 +1,89 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Multiplication.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Multiplication.swift new file mode 100644 index 000000000..635c36a5f --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Multiplication.swift @@ -0,0 +1,165 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Prime Test.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Prime Test.swift new file mode 100644 index 000000000..7f1871104 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Prime Test.swift @@ -0,0 +1,153 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Random.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Random.swift new file mode 100644 index 000000000..5813b4bde --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Random.swift @@ -0,0 +1,71 @@ +// +// Random.swift +// BigInt +// +// Created by Károly Lőrentey on 2016-01-04. +// Copyright © 2016-2017 Károly Lőrentey. +// + +import Foundation +#if os(Linux) || os(FreeBSD) + import Glibc +#endif + + +extension BigUInt { + //MARK: Random Integers + + /// Create a big integer consisting of `width` uniformly distributed random bits. + /// + /// - Returns: A big integer less than `1 << width`. + /// - Note: This function uses `arc4random_buf` to generate random bits. + public static func randomInteger(withMaximumWidth width: Int) -> BigUInt { + guard width > 0 else { return 0 } + + let byteCount = (width + 7) / 8 + assert(byteCount > 0) + + let buffer = UnsafeMutablePointer.allocate(capacity: byteCount) + #if os(Linux) || os(FreeBSD) + let fd = open("/dev/urandom", O_RDONLY) + defer { + close(fd) + } + let _ = read(fd, buffer, MemoryLayout.size * byteCount) + #else + arc4random_buf(buffer, byteCount) + #endif + if width % 8 != 0 { + buffer[0] &= UInt8(1 << (width % 8) - 1) + } + defer { + buffer.deinitialize(count: byteCount) + buffer.deallocate() + } + return BigUInt(Data(bytesNoCopy: buffer, count: byteCount, deallocator: .none)) + } + + /// Create a big integer consisting of `width-1` uniformly distributed random bits followed by a one bit. + /// + /// - Returns: A random big integer whose width is `width`. + /// - Note: This function uses `arc4random_buf` to generate random bits. + public static func randomInteger(withExactWidth width: Int) -> BigUInt { + guard width > 1 else { return BigUInt(width) } + var result = randomInteger(withMaximumWidth: width - 1) + result[(width - 1) / Word.bitWidth] |= 1 << Word((width - 1) % Word.bitWidth) + return result + } + + /// Create a uniformly distributed random integer that's less than the specified limit. + /// + /// - Returns: A random big integer that is less than `limit`. + /// - Note: This function uses `arc4random_buf` to generate random bits. + public static func randomInteger(lessThan limit: BigUInt) -> BigUInt { + let width = limit.bitWidth + var random = randomInteger(withMaximumWidth: width) + while random >= limit { + random = randomInteger(withMaximumWidth: width) + } + return random + } +} diff --git a/Example/web3swiftBrowser/Pods/BigInt/sources/Shifts.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Shifts.swift new file mode 100644 index 000000000..e676e4143 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Shifts.swift @@ -0,0 +1,211 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Square Root.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Square Root.swift new file mode 100644 index 000000000..68db0691c --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Square Root.swift @@ -0,0 +1,41 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Strideable.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Strideable.swift new file mode 100644 index 000000000..2b79babd1 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Strideable.swift @@ -0,0 +1,38 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/String Conversion.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/String Conversion.swift new file mode 100644 index 000000000..02df51ede --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/String Conversion.swift @@ -0,0 +1,242 @@ +// +// 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: String, radix: Int = 10) { + // FIXME Remove this member when SE-0183 is done + self.init(Substring(text), radix: radix) + } + + public init?(_ text: Substring, 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 { + // FIXME Remove String conversion when SE-0183 is done + guard let d = Word(String(text[start ..< end]), radix: radix) else { return nil } + words.append(d) + end = start + count = 0 + } + } + if start != end { + // FIXME Remove String conversion when SE-0183 is done + guard let d = Word(String(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) { + self.init(Substring(text), radix: radix) + } + + init?(_ text: Substring, radix: Int = 10) { + var text = text + var sign: Sign = .plus + if text.first == "-" { + sign = .minus + text = text.dropFirst() + } + else if text.first == "+" { + text = text.dropFirst() + } + guard let magnitude = BigUInt(text, radix: radix) else { return nil } + self.magnitude = magnitude + 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/Example/web3swiftBrowser/Pods/BigInt/sources/Subtraction.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Subtraction.swift new file mode 100644 index 000000000..5ac872e65 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Subtraction.swift @@ -0,0 +1,169 @@ +// +// 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/Example/web3swiftBrowser/Pods/BigInt/sources/Words and Bits.swift b/Example/web3swiftBrowser/Pods/BigInt/sources/Words and Bits.swift new file mode 100644 index 000000000..040accdde --- /dev/null +++ b/Example/web3swiftBrowser/Pods/BigInt/sources/Words and Bits.swift @@ -0,0 +1,202 @@ +// +// 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.index { $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.index(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/Example/web3swiftBrowser/Pods/CryptoSwift/LICENSE b/Example/web3swiftBrowser/Pods/CryptoSwift/LICENSE new file mode 100644 index 000000000..b70d6de9a --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/LICENSE @@ -0,0 +1,11 @@ +Copyright (C) 2014-2017 Marcin Krzyżanowski +This software is provided 'as-is', without any express or implied warranty. + +In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +- This notice may not be removed or altered from any source or binary distribution. +- Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' \ No newline at end of file diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/README.md b/Example/web3swiftBrowser/Pods/CryptoSwift/README.md new file mode 100644 index 000000000..2e7f54984 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/README.md @@ -0,0 +1,518 @@ +[![Platform](https://img.shields.io/badge/Platforms-iOS%20%7C%20macOS%20%7C%20watchOS%20%7C%20tvOS%20%7C%20Linux-4E4E4E.svg?colorA=28a745)](#installation) + +[![Swift support](https://img.shields.io/badge/Swift-3.1%20%7C%203.2%20%7C%204.0%20%7C%204.1-lightgrey.svg?colorA=28a745&colorB=4E4E4E)](#swift-versions-support) +[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/CryptoSwift.svg?style=flat&label=CocoaPods&colorA=28a745&&colorB=4E4E4E)](https://cocoapods.org/pods/CryptoSwift) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg?style=flat&colorA=28a745&&colorB=4E4E4E)](https://github.com/Carthage/Carthage) +[![Swift Package Manager compatible](https://img.shields.io/badge/SPM-compatible-brightgreen.svg?style=flat&colorA=28a745&&colorB=4E4E4E)](https://github.com/apple/swift-package-manager) + +[![Twitter](https://img.shields.io/badge/Twitter-@krzyzanowskim-blue.svg?style=flat)](http://twitter.com/krzyzanowskim) + +# CryptoSwift + +Crypto related functions and helpers for [Swift](https://swift.org) implemented in Swift. ([#PureSwift](https://twitter.com/hashtag/pureswift)) + +**Note**: The `master` branch follows the latest currently released **version of Swift**. If you need an version for older version of Swift, you can specify it's version in your Podfile or use the code on the branch for that version. Older branches are unsupported. Check [versions](#swift-versions-support) for details. + +--- + +If you find the project useful, please [support authors](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=92Z6U3LBHF9J4) to keep it alive. + +--- + +[Requirements](#requirements) +| [Features](#features) +| [Contribution](#contribution) +| [Installation](#installation) +| [Swift versions](#swift-versions-support) +| [How-to](#how-to) +| [Author](#author) +| [License](#license) +| [Changelog](#changelog) + +## Requirements +Good mood + +## Features + +- Easy to use +- Convenient extensions for String and Data +- Support for incremental updates (stream, ...) +- iOS, macOS, AppleTV, watchOS, Linux support + +#### Hash (Digest) + [MD5](http://tools.ietf.org/html/rfc1321) +| [SHA1](http://tools.ietf.org/html/rfc3174) +| [SHA224](http://tools.ietf.org/html/rfc6234) +| [SHA256](http://tools.ietf.org/html/rfc6234) +| [SHA384](http://tools.ietf.org/html/rfc6234) +| [SHA512](http://tools.ietf.org/html/rfc6234) +| [SHA3](http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf) + +#### Cyclic Redundancy Check (CRC) + [CRC32](http://en.wikipedia.org/wiki/Cyclic_redundancy_check) +| [CRC32C](http://en.wikipedia.org/wiki/Cyclic_redundancy_check) +| [CRC16](http://en.wikipedia.org/wiki/Cyclic_redundancy_check) + +#### Cipher + [AES-128, AES-192, AES-256](http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf) +| [ChaCha20](http://cr.yp.to/chacha/chacha-20080128.pdf) +| [Rabbit](https://tools.ietf.org/html/rfc4503) +| [Blowfish](https://www.schneier.com/academic/blowfish/) + +#### Message authenticators + [Poly1305](http://cr.yp.to/mac/poly1305-20050329.pdf) +| [HMAC (MD5, SHA1, SHA256)](https://www.ietf.org/rfc/rfc2104.txt) +| [CMAC](https://tools.ietf.org/html/rfc4493) +| [CBC-MAC](https://en.wikipedia.org/wiki/CBC-MAC) + +#### Cipher mode of operation +- Electronic codebook ([ECB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_codebook_.28ECB.29)) +- Cipher-block chaining ([CBC](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher-block_chaining_.28CBC.29)) +- Propagating Cipher Block Chaining ([PCBC](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Propagating_Cipher_Block_Chaining_.28PCBC.29)) +- Cipher feedback ([CFB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_feedback_.28CFB.29)) +- Output Feedback ([OFB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Output_Feedback_.28OFB.29)) +- Counter Mode ([CTR](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_.28CTR.29)) +- Galois/Counter Mode ([GCM](https://csrc.nist.gov/publications/detail/sp/800-38d/final)) +- Counter with Cipher Block Chaining-Message Authentication Code ([CCM](https://csrc.nist.gov/publications/detail/sp/800-38c/final)) + +#### Password-Based Key Derivation Function +- [PBKDF1](http://tools.ietf.org/html/rfc2898#section-5.1) (Password-Based Key Derivation Function 1) +- [PBKDF2](http://tools.ietf.org/html/rfc2898#section-5.2) (Password-Based Key Derivation Function 2) +- [HKDF](https://tools.ietf.org/html/rfc5869) (HMAC-based Extract-and-Expand Key Derivation Function) + +#### Data padding + PKCS#5 +| [PKCS#7](http://tools.ietf.org/html/rfc5652#section-6.3) +| [Zero padding](https://en.wikipedia.org/wiki/Padding_(cryptography)#Zero_padding) +| No padding + +#### Authenticated Encryption with Associated Data (AEAD) +- [AEAD\_CHACHA20\_POLY1305](https://tools.ietf.org/html/rfc7539#section-2.8) + +## Why +[Why?](https://github.com/krzyzanowskim/CryptoSwift/issues/5) [Because I can](https://github.com/krzyzanowskim/CryptoSwift/issues/5#issuecomment-53379391). + +## How do I get involved? + +You want to help, great! Go ahead and fork our repo, make your changes and send us a pull request. + +## Contribution + +Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to help with CryptoSwift. + +- If you found a bug, [open an issue](https://github.com/krzyzanowskim/CryptoSwift/issues). +- If you have a feature request, [open an issue](https://github.com/krzyzanowskim/CryptoSwift/issues). + +## Installation + +To install CryptoSwift, add it as a submodule to your project (on the top level project directory): + + git submodule add https://github.com/krzyzanowskim/CryptoSwift.git + +It is recommended to enable [Whole-Module Optimization](https://swift.org/blog/whole-module-optimizations/) to gain better performance. Non-optimized build results in significantly worse performance. + +#### Embedded Framework + +Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9). Drag the `CryptoSwift.xcodeproj` file into your Xcode project, and add appropriate framework as a dependency to your target. Now select your App and choose the General tab for the app target. Find *Embedded Binaries* and press "+", then select `CryptoSwift.framework` (iOS, OS X, watchOS or tvOS) + +![](https://cloud.githubusercontent.com/assets/758033/10834511/25a26852-7e9a-11e5-8c01-6cc8f1838459.png) + +Sometimes "embedded framework" option is not available. In that case, you have to add new build phase for the target + +![](https://cloud.githubusercontent.com/assets/758033/18415615/d5edabb0-77f8-11e6-8c94-f41d9fc2b8cb.png) + +##### iOS, macOS, watchOS, tvOS + +In the project, you'll find [single scheme](http://promisekit.org/news/2016/08/Multiplatform-Single-Scheme-Xcode-Projects/) for all platforms: +- CryptoSwift + +#### Swift versions support + +- Swift 1.2: branch [swift12](https://github.com/krzyzanowskim/CryptoSwift/tree/swift12) version <= 0.0.13 +- Swift 2.1: branch [swift21](https://github.com/krzyzanowskim/CryptoSwift/tree/swift21) version <= 0.2.3 +- Swift 2.2, 2.3: branch [swift2](https://github.com/krzyzanowskim/CryptoSwift/tree/swift2) version <= 0.5.2 +- Swift 3.1, branch [swift3](https://github.com/krzyzanowskim/CryptoSwift/tree/swift3) version <= 0.6.9 +- Swift 3.2, branch [swift32](https://github.com/krzyzanowskim/CryptoSwift/tree/swift32) version = 0.7.0 +- Swift 4.0, branch [swift4](https://github.com/krzyzanowskim/CryptoSwift/tree/swift4) version >= 0.7.1 +- Swift 4.1, branch [master](https://github.com/krzyzanowskim/CryptoSwift/tree/master) version >= 0.9.0 + +#### CocoaPods + +You can use [CocoaPods](http://cocoapods.org/?q=cryptoSwift). + +```ruby +platform :ios, '8.0' +use_frameworks! + +target 'MyApp' do + pod 'CryptoSwift' +end +``` + +or for newest version from specified branch of code: + +```ruby +pod 'CryptoSwift', :git => "https://github.com/krzyzanowskim/CryptoSwift", :branch => "master" +``` + +Bear in mind that CocoaPods will build CryptoSwift without [Whole-Module Optimization](https://swift.org/blog/whole-module-optimizations/) that may impact performance. You can change it manually after installation, or use [cocoapods-wholemodule](https://github.com/jedlewison/cocoapods-wholemodule) plugin. + +#### Carthage +You can use [Carthage](https://github.com/Carthage/Carthage). +Specify in Cartfile: + +```ruby +github "krzyzanowskim/CryptoSwift" +``` + +Run `carthage` to build the framework and drag the built CryptoSwift.framework into your Xcode project. Follow [build instructions](https://github.com/Carthage/Carthage#getting-started). [Common issues](https://github.com/krzyzanowskim/CryptoSwift/issues/492#issuecomment-330822874). + +#### Swift Package Manager + +You can use [Swift Package Manager](https://swift.org/package-manager/) and specify dependency in `Package.swift` by adding this: + +```swift +dependencies: [ + .package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .upToNextMinor(from: "0.9.0")) +] +``` + +or more strict + +```swift +dependencies: [ + .package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .exact("0.9.0")) +] +``` + +See: [Package.swift - manual](http://blog.krzyzanowskim.com/2016/08/09/package-swift-manual/) + +--- + +## How-to + +* [Basics (data types, conversion, ...)](#basics) +* [Digest (MD5, SHA...)](#calculate-digest) +* [Message authenticators (HMAC, CMAC...)](#message-authenticators-1) +* [Password-Based Key Derivation Function (PBKDF2, ...)](#password-based-key-derivation-functions) +* [HMAC-based Key Derivation Function (HKDF)](#hmac-based-key-derivation-function) +* [Data Padding](#data-padding) +* [ChaCha20](#chacha20) +* [Rabbit](#rabbit) +* [Blowfish](#blowfish) +* [AES - Advanced Encryption Standard](#aes) +* [AES-GCM](#aes-gcm) +* [Authenticated Encryption with Associated Data (AEAD)](#aead) + +also check [Playground](/CryptoSwift.playground/Contents.swift) + +##### Basics + +```swift +import CryptoSwift +``` + +CryptoSwift uses array of bytes aka `Array` as a base type for all operations. Every data may be converted to a stream of bytes. You will find convenience functions that accept `String` or `Data`, and it will be internally converted to the array of bytes. + +##### Data types conversion + +For you convenience **CryptoSwift** provides two functions to easily convert array of bytes to `Data` and another way around: + +Data from bytes: + +```swift +let data = Data(bytes: [0x01, 0x02, 0x03]) +``` + +`Data` to `Array` + +```swift +let bytes = data.bytes // [1,2,3] +``` + +[Hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) encoding: + +```swift +let bytes = Array(hex: "0x010203") // [1,2,3] +let hex = bytes.toHexString() // "010203" +``` + +Build bytes out of `String` +```swift +let bytes: Array = "cipherkey".bytes // Array("cipherkey".utf8) +``` + +Also... check out helpers that work with **Base64** encoded data: +```swift +"aPf/i9th9iX+vf49eR7PYk2q7S5xmm3jkRLejgzHNJs=".decryptBase64ToString(cipher) +"aPf/i9th9iX+vf49eR7PYk2q7S5xmm3jkRLejgzHNJs=".decryptBase64(cipher) +bytes.toBase64() +``` + +##### Calculate Digest + +Hashing a data or array of bytes (aka `Array`) +```swift +/* Hash struct usage */ +let bytes:Array = [0x01, 0x02, 0x03] +let digest = input.md5() +let digest = Digest.md5(bytes) +``` + +```swift +let data = Data(bytes: [0x01, 0x02, 0x03]) + +let hash = data.md5() +let hash = data.sha1() +let hash = data.sha224() +let hash = data.sha256() +let hash = data.sha384() +let hash = data.sha512() +``` +```swift +do { + var digest = MD5() + let partial1 = try digest.update(withBytes: [0x31, 0x32]) + let partial2 = try digest.update(withBytes: [0x33]) + let result = try digest.finish() +} catch { } +``` + +Hashing a String and printing result + +```swift +let hash = "123".md5() // "123".bytes.md5() +``` + +##### Calculate CRC + +```swift +bytes.crc16() +data.crc16() + +bytes.crc32() +data.crc32() +``` + +##### Message authenticators + +```swift +// Calculate Message Authentication Code (MAC) for message +let key:Array = [1,2,3,4,5,6,7,8,9,10,...] + +try Poly1305(key: key).authenticate(bytes) +try HMAC(key: key, variant: .sha256).authenticate(bytes) +try CMAC(key: key).authenticate(bytes) +``` + +##### Password-Based Key Derivation Functions + +```swift +let password: Array = Array("s33krit".utf8) +let salt: Array = Array("nacllcan".utf8) + +let key = try PKCS5.PBKDF2(password: password, salt: salt, iterations: 4096, variant: .sha256).calculate() +``` + +##### HMAC-based Key Derivation Function + +```swift +let password: Array = Array("s33krit".utf8) +let salt: Array = Array("nacllcan".utf8) + +let key = try HKDF(password: password, salt: salt, variant: .sha256).calculate() +``` + +##### Data Padding + +Some content-encryption algorithms assume the input length is a multiple of `k` octets, where `k` is greater than one. For such algorithms, the input shall be padded. + +```swift +Padding.pkcs7.add(to: bytes, blockSize: AES.blockSize) +``` + +#### Working with Ciphers +##### ChaCha20 + +```swift +let encrypted = try ChaCha20(key: key, iv: iv).encrypt(message) +let decrypted = try ChaCha20(key: key, iv: iv).decrypt(encrypted) +``` + +##### Rabbit + +```swift +let encrypted = try Rabbit(key: key, iv: iv).encrypt(message) +let decrypted = try Rabbit(key: key, iv: iv).decrypt(encrypted) +``` +##### Blowfish + +```swift +let encrypted = try Blowfish(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).encrypt(message) +let decrypted = try Blowfish(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).decrypt(encrypted) +``` + +##### AES + +Notice regarding padding: *Manual padding of data is optional, and CryptoSwift is using PKCS7 padding by default. If you need manually disable/enable padding, you can do this by setting parameter for __AES__ class* + +Variant of AES encryption (AES-128, AES-192, AES-256) depends on given key length: + +- AES-128 = 16 bytes +- AES-192 = 24 bytes +- AES-256 = 32 bytes + +AES-256 example +```swift +try AES(key: [1,2,3,...,32], blockMode: CBC(iv: [1,2,3,...,16]), padding: .pkcs7) +``` + +###### All at once +```swift +do { + let aes = try AES(key: "keykeykeykeykeyk", iv: "drowssapdrowssap") // aes128 + let ciphertext = try aes.encrypt(Array("Nullam quis risus eget urna mollis ornare vel eu leo.".utf8)) +} catch { } +``` + +###### Incremental updates + +Incremental operations use instance of Cryptor and encrypt/decrypt one part at a time, this way you can save on memory for large files. + +```swift +do { + var encryptor = try AES(key: "keykeykeykeykeyk", iv: "drowssapdrowssap").makeEncryptor() + + var ciphertext = Array() + // aggregate partial results + ciphertext += try encryptor.update(withBytes: Array("Nullam quis risus ".utf8)) + ciphertext += try encryptor.update(withBytes: Array("eget urna mollis ".utf8)) + ciphertext += try encryptor.update(withBytes: Array("ornare vel eu leo.".utf8)) + // finish at the end + ciphertext += try encryptor.finish() + + print(ciphertext.toHexString()) +} catch { + print(error) +} +``` + +See [Playground](/CryptoSwift.playground/Contents.swift) for sample code that work with stream. + +###### AES Advanced usage +```swift +let input: Array = [0,1,2,3,4,5,6,7,8,9] + +let key: Array = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] +let iv: Array = AES.randomIV(AES.blockSize) + +do { + let encrypted = try AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).encrypt(input) + let decrypted = try AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).decrypt(encrypted) +} catch { + print(error) +} +``` + +AES without data padding + +```swift +let input: Array = [0,1,2,3,4,5,6,7,8,9] +let encrypted: Array = try! AES(key: Array("secret0key000000".utf8), blockMode: CBC(iv: Array("0123456789012345".utf8)), padding: .noPadding).encrypt(input) +``` + +Using convenience extensions + +```swift +let plain = Data(bytes: [0x01, 0x02, 0x03]) +let encrypted = try! plain.encrypt(ChaCha20(key: key, iv: iv)) +let decrypted = try! encrypted.decrypt(ChaCha20(key: key, iv: iv)) +``` + +##### AES-GCM + +The result of Galois/Counter Mode (GCM) encryption is ciphertext and **authentication tag**, that is later used to decryption. + +encryption + +```swift +do { + // In combined mode, the authentication tag is directly appended to the encrypted message. This is usually what you want. + let gcm = GCM(iv: iv, mode: .combined) + let aes = try AES(key: key, blockMode: gcm, padding: .noPadding) + let encrypted = try aes.encrypt(plaintext) + let tag = gcm.authenticationTag +catch { + // failed +} +``` + +decryption + +```swift +do { + // In combined mode, the authentication tag is appended to the encrypted message. This is usually what you want. + let gcm = GCM(iv: iv, mode: .combined) + let aes = try AES(key: key, blockMode: gcm, padding: .noPadding) + return try aes.decrypt(encrypted) +} catch { + // failed +} +``` + +**Note**: GCM instance is not intended to be reused. So you can't use the `GCM` from encoding, do decoding. + +##### AES-CCM + +The result of Counter with Cipher Block Chaining-Message Authentication Code encryption is ciphertext and **authentication tag**, that is later used to decryption. + +``` +do { + // The authentication tag is appended to the encrypted message. + let tagLength = 8 + let ccm = CCM(iv: iv, tagLength: tagLength, messageLength: ciphertext.count - tagLength, additionalAuthenticatedData: data) + let aes = try AES(key: key, blockMode: ccm, padding: .noPadding) + return try aes.decrypt(encrypted) +} catch { + // failed +} +``` + +Check documentation or CCM specification for valid parameters for CCM. + +##### AEAD + +```swift +let encrypt = try AEADChaCha20Poly1305.encrypt(plaintext, key: key, iv: nonce, authenticationHeader: header) +let decrypt = try AEADChaCha20Poly1305.decrypt(ciphertext, key: key, iv: nonce, authenticationHeader: header, authenticationTag: tagArr: tag) +``` + +## Author + +CryptoSwift is owned and maintained by [Marcin Krzyżanowski](http://www.krzyzanowskim.com) + +You can follow me on Twitter at [@krzyzanowskim](http://twitter.com/krzyzanowskim) for project updates and releases. + +# Cryptography Notice + +This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information. + +The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code. + +## License + +Copyright (C) 2014-2017 Marcin Krzyżanowski +This software is provided 'as-is', without any express or implied warranty. + +In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, **an acknowledgment in the product documentation is required**. +- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +- This notice may not be removed or altered from any source or binary distribution. +- Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' + +## Changelog + +See [CHANGELOG](./CHANGELOG) file. diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift new file mode 100644 index 000000000..67179c597 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift @@ -0,0 +1,40 @@ +// +// AEAD.swift +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// +// + +// https://www.iana.org/assignments/aead-parameters/aead-parameters.xhtml + +/// Authenticated Encryption with Associated Data (AEAD) +public protocol AEAD { + static var kLen: Int { get } // key length + static var ivRange: Range { get } // nonce length +} + +extension AEAD { + static func calculateAuthenticationTag(authenticator: Authenticator, cipherText: Array, authenticationHeader: Array) throws -> Array { + let headerPadding = ((16 - (authenticationHeader.count & 0xf)) & 0xf) + let cipherPadding = ((16 - (cipherText.count & 0xf)) & 0xf) + + var mac = authenticationHeader + mac += Array(repeating: 0, count: headerPadding) + mac += cipherText + mac += Array(repeating: 0, count: cipherPadding) + mac += UInt64(bigEndian: UInt64(authenticationHeader.count)).bytes() + mac += UInt64(bigEndian: UInt64(cipherText.count)).bytes() + + return try authenticator.authenticate(mac) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift new file mode 100644 index 000000000..791f9a442 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift @@ -0,0 +1,59 @@ +// +// ChaCha20Poly1305.swift +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// +// +// https://tools.ietf.org/html/rfc7539#section-2.8.1 + +/// AEAD_CHACHA20_POLY1305 +public final class AEADChaCha20Poly1305: AEAD { + public static let kLen = 32 // key length + public static var ivRange = Range(12...12) + + /// Authenticated encryption + public static func encrypt(_ plainText: Array, key: Array, iv: Array, authenticationHeader: Array) throws -> (cipherText: Array, authenticationTag: Array) { + let cipher = try ChaCha20(key: key, iv: iv) + + var polykey = Array(repeating: 0, count: kLen) + var toEncrypt = polykey + polykey = try cipher.encrypt(polykey) + toEncrypt += polykey + toEncrypt += plainText + + let fullCipherText = try cipher.encrypt(toEncrypt) + let cipherText = Array(fullCipherText.dropFirst(64)) + + let tag = try calculateAuthenticationTag(authenticator: Poly1305(key: polykey), cipherText: cipherText, authenticationHeader: authenticationHeader) + return (cipherText, tag) + } + + /// Authenticated decryption + public static func decrypt(_ cipherText: Array, key: Array, iv: Array, authenticationHeader: Array, authenticationTag: Array) throws -> (plainText: Array, success: Bool) { + let chacha = try ChaCha20(key: key, iv: iv) + + let polykey = try chacha.encrypt(Array(repeating: 0, count: kLen)) + let mac = try calculateAuthenticationTag(authenticator: Poly1305(key: polykey), cipherText: cipherText, authenticationHeader: authenticationHeader) + guard mac == authenticationTag else { + return (cipherText, false) + } + + var toDecrypt = Array(reserveCapacity: cipherText.count + 64) + toDecrypt += polykey + toDecrypt += polykey + toDecrypt += cipherText + let fullPlainText = try chacha.decrypt(toDecrypt) + let plainText = Array(fullPlainText.dropFirst(64)) + return (plainText, true) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift new file mode 100644 index 000000000..a461cd616 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift @@ -0,0 +1,35 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// MARK: Cryptors + +extension AES: Cryptors { + public func makeEncryptor() throws -> Cryptor & Updatable { + let worker = try blockMode.worker(blockSize: AES.blockSize, cipherOperation: encrypt) + if worker is StreamModeWorker { + return try StreamEncryptor(blockSize: AES.blockSize, padding: padding, worker) + } + return try BlockEncryptor(blockSize: AES.blockSize, padding: padding, worker) + } + + public func makeDecryptor() throws -> Cryptor & Updatable { + let cipherOperation: CipherOperationOnBlock = blockMode.options.contains(.useEncryptToDecrypt) == true ? encrypt : decrypt + let worker = try blockMode.worker(blockSize: AES.blockSize, cipherOperation: cipherOperation) + if worker is StreamModeWorker { + return try StreamDecryptor(blockSize: AES.blockSize, padding: padding, worker) + } + return try BlockDecryptor(blockSize: AES.blockSize, padding: padding, worker) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AES.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AES.swift new file mode 100644 index 000000000..631b7d518 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/AES.swift @@ -0,0 +1,539 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// Implementation of Gladman algorithm http://www.gladman.me.uk/AES +// + +/// The Advanced Encryption Standard (AES) +public final class AES: BlockCipher { + public enum Error: Swift.Error { + /// Invalid key + case invalidKeySize + /// Data padding is required + case dataPaddingRequired + /// Invalid Data + case invalidData + } + + public enum Variant: Int { + case aes128 = 1, aes192, aes256 + + var Nk: Int { // Nk words + return [4, 6, 8][self.rawValue - 1] + } + + var Nb: Int { // Nb words + return 4 + } + + var Nr: Int { // Nr + return Nk + 6 + } + } + + private let variantNr: Int + private let variantNb: Int + private let variantNk: Int + + public static let blockSize: Int = 16 // 128 /8 + public let keySize: Int + + /// AES Variant + public let variant: Variant + + // Parameters + let key: Key + let blockMode: BlockMode + let padding: Padding + + // + private lazy var expandedKey: Array> = self.expandKey(self.key, variant: self.variant) + private lazy var expandedKeyInv: Array> = self.expandKeyInv(self.key, variant: self.variant) + + private lazy var sBoxes: (sBox: Array, invSBox: Array) = self.calculateSBox() + private lazy var sBox: Array = self.sBoxes.sBox + private lazy var sBoxInv: Array = self.sBoxes.invSBox + + // Parameters for Linear Congruence Generators + private static let Rcon: Array = [ + 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, + 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, + 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, + 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, + 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, + 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, + 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, + 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, + 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, + 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, + 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, + 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, + 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, + 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, + 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, + ] + + private static let T0: Array = [0xa56363c6, 0x847c7cf8, 0x997777ee, 0x8d7b7bf6, 0xdf2f2ff, 0xbd6b6bd6, 0xb16f6fde, 0x54c5c591, 0x50303060, 0x3010102, 0xa96767ce, 0x7d2b2b56, 0x19fefee7, 0x62d7d7b5, 0xe6abab4d, 0x9a7676ec, 0x45caca8f, 0x9d82821f, 0x40c9c989, 0x877d7dfa, 0x15fafaef, 0xeb5959b2, 0xc947478e, 0xbf0f0fb, 0xecadad41, 0x67d4d4b3, 0xfda2a25f, 0xeaafaf45, 0xbf9c9c23, 0xf7a4a453, 0x967272e4, 0x5bc0c09b, 0xc2b7b775, 0x1cfdfde1, 0xae93933d, 0x6a26264c, 0x5a36366c, 0x413f3f7e, 0x2f7f7f5, 0x4fcccc83, 0x5c343468, 0xf4a5a551, 0x34e5e5d1, 0x8f1f1f9, 0x937171e2, 0x73d8d8ab, 0x53313162, 0x3f15152a, 0xc040408, 0x52c7c795, 0x65232346, 0x5ec3c39d, 0x28181830, 0xa1969637, 0xf05050a, 0xb59a9a2f, 0x907070e, 0x36121224, 0x9b80801b, 0x3de2e2df, 0x26ebebcd, 0x6927274e, 0xcdb2b27f, 0x9f7575ea, 0x1b090912, 0x9e83831d, 0x742c2c58, 0x2e1a1a34, 0x2d1b1b36, 0xb26e6edc, 0xee5a5ab4, 0xfba0a05b, 0xf65252a4, 0x4d3b3b76, 0x61d6d6b7, 0xceb3b37d, 0x7b292952, 0x3ee3e3dd, 0x712f2f5e, 0x97848413, 0xf55353a6, 0x68d1d1b9, 0x0, 0x2cededc1, 0x60202040, 0x1ffcfce3, 0xc8b1b179, 0xed5b5bb6, 0xbe6a6ad4, 0x46cbcb8d, 0xd9bebe67, 0x4b393972, 0xde4a4a94, 0xd44c4c98, 0xe85858b0, 0x4acfcf85, 0x6bd0d0bb, 0x2aefefc5, 0xe5aaaa4f, 0x16fbfbed, 0xc5434386, 0xd74d4d9a, 0x55333366, 0x94858511, 0xcf45458a, 0x10f9f9e9, 0x6020204, 0x817f7ffe, 0xf05050a0, 0x443c3c78, 0xba9f9f25, 0xe3a8a84b, 0xf35151a2, 0xfea3a35d, 0xc0404080, 0x8a8f8f05, 0xad92923f, 0xbc9d9d21, 0x48383870, 0x4f5f5f1, 0xdfbcbc63, 0xc1b6b677, 0x75dadaaf, 0x63212142, 0x30101020, 0x1affffe5, 0xef3f3fd, 0x6dd2d2bf, 0x4ccdcd81, 0x140c0c18, 0x35131326, 0x2fececc3, 0xe15f5fbe, 0xa2979735, 0xcc444488, 0x3917172e, 0x57c4c493, 0xf2a7a755, 0x827e7efc, 0x473d3d7a, 0xac6464c8, 0xe75d5dba, 0x2b191932, 0x957373e6, 0xa06060c0, 0x98818119, 0xd14f4f9e, 0x7fdcdca3, 0x66222244, 0x7e2a2a54, 0xab90903b, 0x8388880b, 0xca46468c, 0x29eeeec7, 0xd3b8b86b, 0x3c141428, 0x79dedea7, 0xe25e5ebc, 0x1d0b0b16, 0x76dbdbad, 0x3be0e0db, 0x56323264, 0x4e3a3a74, 0x1e0a0a14, 0xdb494992, 0xa06060c, 0x6c242448, 0xe45c5cb8, 0x5dc2c29f, 0x6ed3d3bd, 0xefacac43, 0xa66262c4, 0xa8919139, 0xa4959531, 0x37e4e4d3, 0x8b7979f2, 0x32e7e7d5, 0x43c8c88b, 0x5937376e, 0xb76d6dda, 0x8c8d8d01, 0x64d5d5b1, 0xd24e4e9c, 0xe0a9a949, 0xb46c6cd8, 0xfa5656ac, 0x7f4f4f3, 0x25eaeacf, 0xaf6565ca, 0x8e7a7af4, 0xe9aeae47, 0x18080810, 0xd5baba6f, 0x887878f0, 0x6f25254a, 0x722e2e5c, 0x241c1c38, 0xf1a6a657, 0xc7b4b473, 0x51c6c697, 0x23e8e8cb, 0x7cdddda1, 0x9c7474e8, 0x211f1f3e, 0xdd4b4b96, 0xdcbdbd61, 0x868b8b0d, 0x858a8a0f, 0x907070e0, 0x423e3e7c, 0xc4b5b571, 0xaa6666cc, 0xd8484890, 0x5030306, 0x1f6f6f7, 0x120e0e1c, 0xa36161c2, 0x5f35356a, 0xf95757ae, 0xd0b9b969, 0x91868617, 0x58c1c199, 0x271d1d3a, 0xb99e9e27, 0x38e1e1d9, 0x13f8f8eb, 0xb398982b, 0x33111122, 0xbb6969d2, 0x70d9d9a9, 0x898e8e07, 0xa7949433, 0xb69b9b2d, 0x221e1e3c, 0x92878715, 0x20e9e9c9, 0x49cece87, 0xff5555aa, 0x78282850, 0x7adfdfa5, 0x8f8c8c03, 0xf8a1a159, 0x80898909, 0x170d0d1a, 0xdabfbf65, 0x31e6e6d7, 0xc6424284, 0xb86868d0, 0xc3414182, 0xb0999929, 0x772d2d5a, 0x110f0f1e, 0xcbb0b07b, 0xfc5454a8, 0xd6bbbb6d, 0x3a16162c] + private static let T0_INV: Array = [0x50a7f451, 0x5365417e, 0xc3a4171a, 0x965e273a, 0xcb6bab3b, 0xf1459d1f, 0xab58faac, 0x9303e34b, 0x55fa3020, 0xf66d76ad, 0x9176cc88, 0x254c02f5, 0xfcd7e54f, 0xd7cb2ac5, 0x80443526, 0x8fa362b5, 0x495ab1de, 0x671bba25, 0x980eea45, 0xe1c0fe5d, 0x2752fc3, 0x12f04c81, 0xa397468d, 0xc6f9d36b, 0xe75f8f03, 0x959c9215, 0xeb7a6dbf, 0xda595295, 0x2d83bed4, 0xd3217458, 0x2969e049, 0x44c8c98e, 0x6a89c275, 0x78798ef4, 0x6b3e5899, 0xdd71b927, 0xb64fe1be, 0x17ad88f0, 0x66ac20c9, 0xb43ace7d, 0x184adf63, 0x82311ae5, 0x60335197, 0x457f5362, 0xe07764b1, 0x84ae6bbb, 0x1ca081fe, 0x942b08f9, 0x58684870, 0x19fd458f, 0x876cde94, 0xb7f87b52, 0x23d373ab, 0xe2024b72, 0x578f1fe3, 0x2aab5566, 0x728ebb2, 0x3c2b52f, 0x9a7bc586, 0xa50837d3, 0xf2872830, 0xb2a5bf23, 0xba6a0302, 0x5c8216ed, 0x2b1ccf8a, 0x92b479a7, 0xf0f207f3, 0xa1e2694e, 0xcdf4da65, 0xd5be0506, 0x1f6234d1, 0x8afea6c4, 0x9d532e34, 0xa055f3a2, 0x32e18a05, 0x75ebf6a4, 0x39ec830b, 0xaaef6040, 0x69f715e, 0x51106ebd, 0xf98a213e, 0x3d06dd96, 0xae053edd, 0x46bde64d, 0xb58d5491, 0x55dc471, 0x6fd40604, 0xff155060, 0x24fb9819, 0x97e9bdd6, 0xcc434089, 0x779ed967, 0xbd42e8b0, 0x888b8907, 0x385b19e7, 0xdbeec879, 0x470a7ca1, 0xe90f427c, 0xc91e84f8, 0x0, 0x83868009, 0x48ed2b32, 0xac70111e, 0x4e725a6c, 0xfbff0efd, 0x5638850f, 0x1ed5ae3d, 0x27392d36, 0x64d90f0a, 0x21a65c68, 0xd1545b9b, 0x3a2e3624, 0xb1670a0c, 0xfe75793, 0xd296eeb4, 0x9e919b1b, 0x4fc5c080, 0xa220dc61, 0x694b775a, 0x161a121c, 0xaba93e2, 0xe52aa0c0, 0x43e0223c, 0x1d171b12, 0xb0d090e, 0xadc78bf2, 0xb9a8b62d, 0xc8a91e14, 0x8519f157, 0x4c0775af, 0xbbdd99ee, 0xfd607fa3, 0x9f2601f7, 0xbcf5725c, 0xc53b6644, 0x347efb5b, 0x7629438b, 0xdcc623cb, 0x68fcedb6, 0x63f1e4b8, 0xcadc31d7, 0x10856342, 0x40229713, 0x2011c684, 0x7d244a85, 0xf83dbbd2, 0x1132f9ae, 0x6da129c7, 0x4b2f9e1d, 0xf330b2dc, 0xec52860d, 0xd0e3c177, 0x6c16b32b, 0x99b970a9, 0xfa489411, 0x2264e947, 0xc48cfca8, 0x1a3ff0a0, 0xd82c7d56, 0xef903322, 0xc74e4987, 0xc1d138d9, 0xfea2ca8c, 0x360bd498, 0xcf81f5a6, 0x28de7aa5, 0x268eb7da, 0xa4bfad3f, 0xe49d3a2c, 0xd927850, 0x9bcc5f6a, 0x62467e54, 0xc2138df6, 0xe8b8d890, 0x5ef7392e, 0xf5afc382, 0xbe805d9f, 0x7c93d069, 0xa92dd56f, 0xb31225cf, 0x3b99acc8, 0xa77d1810, 0x6e639ce8, 0x7bbb3bdb, 0x97826cd, 0xf418596e, 0x1b79aec, 0xa89a4f83, 0x656e95e6, 0x7ee6ffaa, 0x8cfbc21, 0xe6e815ef, 0xd99be7ba, 0xce366f4a, 0xd4099fea, 0xd67cb029, 0xafb2a431, 0x31233f2a, 0x3094a5c6, 0xc066a235, 0x37bc4e74, 0xa6ca82fc, 0xb0d090e0, 0x15d8a733, 0x4a9804f1, 0xf7daec41, 0xe50cd7f, 0x2ff69117, 0x8dd64d76, 0x4db0ef43, 0x544daacc, 0xdf0496e4, 0xe3b5d19e, 0x1b886a4c, 0xb81f2cc1, 0x7f516546, 0x4ea5e9d, 0x5d358c01, 0x737487fa, 0x2e410bfb, 0x5a1d67b3, 0x52d2db92, 0x335610e9, 0x1347d66d, 0x8c61d79a, 0x7a0ca137, 0x8e14f859, 0x893c13eb, 0xee27a9ce, 0x35c961b7, 0xede51ce1, 0x3cb1477a, 0x59dfd29c, 0x3f73f255, 0x79ce1418, 0xbf37c773, 0xeacdf753, 0x5baafd5f, 0x146f3ddf, 0x86db4478, 0x81f3afca, 0x3ec468b9, 0x2c342438, 0x5f40a3c2, 0x72c31d16, 0xc25e2bc, 0x8b493c28, 0x41950dff, 0x7101a839, 0xdeb30c08, 0x9ce4b4d8, 0x90c15664, 0x6184cb7b, 0x70b632d5, 0x745c6c48, 0x4257b8d0] + private static let T1: Array = [0x6363c6a5, 0x7c7cf884, 0x7777ee99, 0x7b7bf68d, 0xf2f2ff0d, 0x6b6bd6bd, 0x6f6fdeb1, 0xc5c59154, 0x30306050, 0x1010203, 0x6767cea9, 0x2b2b567d, 0xfefee719, 0xd7d7b562, 0xabab4de6, 0x7676ec9a, 0xcaca8f45, 0x82821f9d, 0xc9c98940, 0x7d7dfa87, 0xfafaef15, 0x5959b2eb, 0x47478ec9, 0xf0f0fb0b, 0xadad41ec, 0xd4d4b367, 0xa2a25ffd, 0xafaf45ea, 0x9c9c23bf, 0xa4a453f7, 0x7272e496, 0xc0c09b5b, 0xb7b775c2, 0xfdfde11c, 0x93933dae, 0x26264c6a, 0x36366c5a, 0x3f3f7e41, 0xf7f7f502, 0xcccc834f, 0x3434685c, 0xa5a551f4, 0xe5e5d134, 0xf1f1f908, 0x7171e293, 0xd8d8ab73, 0x31316253, 0x15152a3f, 0x404080c, 0xc7c79552, 0x23234665, 0xc3c39d5e, 0x18183028, 0x969637a1, 0x5050a0f, 0x9a9a2fb5, 0x7070e09, 0x12122436, 0x80801b9b, 0xe2e2df3d, 0xebebcd26, 0x27274e69, 0xb2b27fcd, 0x7575ea9f, 0x909121b, 0x83831d9e, 0x2c2c5874, 0x1a1a342e, 0x1b1b362d, 0x6e6edcb2, 0x5a5ab4ee, 0xa0a05bfb, 0x5252a4f6, 0x3b3b764d, 0xd6d6b761, 0xb3b37dce, 0x2929527b, 0xe3e3dd3e, 0x2f2f5e71, 0x84841397, 0x5353a6f5, 0xd1d1b968, 0x0, 0xededc12c, 0x20204060, 0xfcfce31f, 0xb1b179c8, 0x5b5bb6ed, 0x6a6ad4be, 0xcbcb8d46, 0xbebe67d9, 0x3939724b, 0x4a4a94de, 0x4c4c98d4, 0x5858b0e8, 0xcfcf854a, 0xd0d0bb6b, 0xefefc52a, 0xaaaa4fe5, 0xfbfbed16, 0x434386c5, 0x4d4d9ad7, 0x33336655, 0x85851194, 0x45458acf, 0xf9f9e910, 0x2020406, 0x7f7ffe81, 0x5050a0f0, 0x3c3c7844, 0x9f9f25ba, 0xa8a84be3, 0x5151a2f3, 0xa3a35dfe, 0x404080c0, 0x8f8f058a, 0x92923fad, 0x9d9d21bc, 0x38387048, 0xf5f5f104, 0xbcbc63df, 0xb6b677c1, 0xdadaaf75, 0x21214263, 0x10102030, 0xffffe51a, 0xf3f3fd0e, 0xd2d2bf6d, 0xcdcd814c, 0xc0c1814, 0x13132635, 0xececc32f, 0x5f5fbee1, 0x979735a2, 0x444488cc, 0x17172e39, 0xc4c49357, 0xa7a755f2, 0x7e7efc82, 0x3d3d7a47, 0x6464c8ac, 0x5d5dbae7, 0x1919322b, 0x7373e695, 0x6060c0a0, 0x81811998, 0x4f4f9ed1, 0xdcdca37f, 0x22224466, 0x2a2a547e, 0x90903bab, 0x88880b83, 0x46468cca, 0xeeeec729, 0xb8b86bd3, 0x1414283c, 0xdedea779, 0x5e5ebce2, 0xb0b161d, 0xdbdbad76, 0xe0e0db3b, 0x32326456, 0x3a3a744e, 0xa0a141e, 0x494992db, 0x6060c0a, 0x2424486c, 0x5c5cb8e4, 0xc2c29f5d, 0xd3d3bd6e, 0xacac43ef, 0x6262c4a6, 0x919139a8, 0x959531a4, 0xe4e4d337, 0x7979f28b, 0xe7e7d532, 0xc8c88b43, 0x37376e59, 0x6d6ddab7, 0x8d8d018c, 0xd5d5b164, 0x4e4e9cd2, 0xa9a949e0, 0x6c6cd8b4, 0x5656acfa, 0xf4f4f307, 0xeaeacf25, 0x6565caaf, 0x7a7af48e, 0xaeae47e9, 0x8081018, 0xbaba6fd5, 0x7878f088, 0x25254a6f, 0x2e2e5c72, 0x1c1c3824, 0xa6a657f1, 0xb4b473c7, 0xc6c69751, 0xe8e8cb23, 0xdddda17c, 0x7474e89c, 0x1f1f3e21, 0x4b4b96dd, 0xbdbd61dc, 0x8b8b0d86, 0x8a8a0f85, 0x7070e090, 0x3e3e7c42, 0xb5b571c4, 0x6666ccaa, 0x484890d8, 0x3030605, 0xf6f6f701, 0xe0e1c12, 0x6161c2a3, 0x35356a5f, 0x5757aef9, 0xb9b969d0, 0x86861791, 0xc1c19958, 0x1d1d3a27, 0x9e9e27b9, 0xe1e1d938, 0xf8f8eb13, 0x98982bb3, 0x11112233, 0x6969d2bb, 0xd9d9a970, 0x8e8e0789, 0x949433a7, 0x9b9b2db6, 0x1e1e3c22, 0x87871592, 0xe9e9c920, 0xcece8749, 0x5555aaff, 0x28285078, 0xdfdfa57a, 0x8c8c038f, 0xa1a159f8, 0x89890980, 0xd0d1a17, 0xbfbf65da, 0xe6e6d731, 0x424284c6, 0x6868d0b8, 0x414182c3, 0x999929b0, 0x2d2d5a77, 0xf0f1e11, 0xb0b07bcb, 0x5454a8fc, 0xbbbb6dd6, 0x16162c3a] + private static let T1_INV: Array = [0xa7f45150, 0x65417e53, 0xa4171ac3, 0x5e273a96, 0x6bab3bcb, 0x459d1ff1, 0x58faacab, 0x3e34b93, 0xfa302055, 0x6d76adf6, 0x76cc8891, 0x4c02f525, 0xd7e54ffc, 0xcb2ac5d7, 0x44352680, 0xa362b58f, 0x5ab1de49, 0x1bba2567, 0xeea4598, 0xc0fe5de1, 0x752fc302, 0xf04c8112, 0x97468da3, 0xf9d36bc6, 0x5f8f03e7, 0x9c921595, 0x7a6dbfeb, 0x595295da, 0x83bed42d, 0x217458d3, 0x69e04929, 0xc8c98e44, 0x89c2756a, 0x798ef478, 0x3e58996b, 0x71b927dd, 0x4fe1beb6, 0xad88f017, 0xac20c966, 0x3ace7db4, 0x4adf6318, 0x311ae582, 0x33519760, 0x7f536245, 0x7764b1e0, 0xae6bbb84, 0xa081fe1c, 0x2b08f994, 0x68487058, 0xfd458f19, 0x6cde9487, 0xf87b52b7, 0xd373ab23, 0x24b72e2, 0x8f1fe357, 0xab55662a, 0x28ebb207, 0xc2b52f03, 0x7bc5869a, 0x837d3a5, 0x872830f2, 0xa5bf23b2, 0x6a0302ba, 0x8216ed5c, 0x1ccf8a2b, 0xb479a792, 0xf207f3f0, 0xe2694ea1, 0xf4da65cd, 0xbe0506d5, 0x6234d11f, 0xfea6c48a, 0x532e349d, 0x55f3a2a0, 0xe18a0532, 0xebf6a475, 0xec830b39, 0xef6040aa, 0x9f715e06, 0x106ebd51, 0x8a213ef9, 0x6dd963d, 0x53eddae, 0xbde64d46, 0x8d5491b5, 0x5dc47105, 0xd406046f, 0x155060ff, 0xfb981924, 0xe9bdd697, 0x434089cc, 0x9ed96777, 0x42e8b0bd, 0x8b890788, 0x5b19e738, 0xeec879db, 0xa7ca147, 0xf427ce9, 0x1e84f8c9, 0x0, 0x86800983, 0xed2b3248, 0x70111eac, 0x725a6c4e, 0xff0efdfb, 0x38850f56, 0xd5ae3d1e, 0x392d3627, 0xd90f0a64, 0xa65c6821, 0x545b9bd1, 0x2e36243a, 0x670a0cb1, 0xe757930f, 0x96eeb4d2, 0x919b1b9e, 0xc5c0804f, 0x20dc61a2, 0x4b775a69, 0x1a121c16, 0xba93e20a, 0x2aa0c0e5, 0xe0223c43, 0x171b121d, 0xd090e0b, 0xc78bf2ad, 0xa8b62db9, 0xa91e14c8, 0x19f15785, 0x775af4c, 0xdd99eebb, 0x607fa3fd, 0x2601f79f, 0xf5725cbc, 0x3b6644c5, 0x7efb5b34, 0x29438b76, 0xc623cbdc, 0xfcedb668, 0xf1e4b863, 0xdc31d7ca, 0x85634210, 0x22971340, 0x11c68420, 0x244a857d, 0x3dbbd2f8, 0x32f9ae11, 0xa129c76d, 0x2f9e1d4b, 0x30b2dcf3, 0x52860dec, 0xe3c177d0, 0x16b32b6c, 0xb970a999, 0x489411fa, 0x64e94722, 0x8cfca8c4, 0x3ff0a01a, 0x2c7d56d8, 0x903322ef, 0x4e4987c7, 0xd138d9c1, 0xa2ca8cfe, 0xbd49836, 0x81f5a6cf, 0xde7aa528, 0x8eb7da26, 0xbfad3fa4, 0x9d3a2ce4, 0x9278500d, 0xcc5f6a9b, 0x467e5462, 0x138df6c2, 0xb8d890e8, 0xf7392e5e, 0xafc382f5, 0x805d9fbe, 0x93d0697c, 0x2dd56fa9, 0x1225cfb3, 0x99acc83b, 0x7d1810a7, 0x639ce86e, 0xbb3bdb7b, 0x7826cd09, 0x18596ef4, 0xb79aec01, 0x9a4f83a8, 0x6e95e665, 0xe6ffaa7e, 0xcfbc2108, 0xe815efe6, 0x9be7bad9, 0x366f4ace, 0x99fead4, 0x7cb029d6, 0xb2a431af, 0x233f2a31, 0x94a5c630, 0x66a235c0, 0xbc4e7437, 0xca82fca6, 0xd090e0b0, 0xd8a73315, 0x9804f14a, 0xdaec41f7, 0x50cd7f0e, 0xf691172f, 0xd64d768d, 0xb0ef434d, 0x4daacc54, 0x496e4df, 0xb5d19ee3, 0x886a4c1b, 0x1f2cc1b8, 0x5165467f, 0xea5e9d04, 0x358c015d, 0x7487fa73, 0x410bfb2e, 0x1d67b35a, 0xd2db9252, 0x5610e933, 0x47d66d13, 0x61d79a8c, 0xca1377a, 0x14f8598e, 0x3c13eb89, 0x27a9ceee, 0xc961b735, 0xe51ce1ed, 0xb1477a3c, 0xdfd29c59, 0x73f2553f, 0xce141879, 0x37c773bf, 0xcdf753ea, 0xaafd5f5b, 0x6f3ddf14, 0xdb447886, 0xf3afca81, 0xc468b93e, 0x3424382c, 0x40a3c25f, 0xc31d1672, 0x25e2bc0c, 0x493c288b, 0x950dff41, 0x1a83971, 0xb30c08de, 0xe4b4d89c, 0xc1566490, 0x84cb7b61, 0xb632d570, 0x5c6c4874, 0x57b8d042] + private static let T2: Array = [0x63c6a563, 0x7cf8847c, 0x77ee9977, 0x7bf68d7b, 0xf2ff0df2, 0x6bd6bd6b, 0x6fdeb16f, 0xc59154c5, 0x30605030, 0x1020301, 0x67cea967, 0x2b567d2b, 0xfee719fe, 0xd7b562d7, 0xab4de6ab, 0x76ec9a76, 0xca8f45ca, 0x821f9d82, 0xc98940c9, 0x7dfa877d, 0xfaef15fa, 0x59b2eb59, 0x478ec947, 0xf0fb0bf0, 0xad41ecad, 0xd4b367d4, 0xa25ffda2, 0xaf45eaaf, 0x9c23bf9c, 0xa453f7a4, 0x72e49672, 0xc09b5bc0, 0xb775c2b7, 0xfde11cfd, 0x933dae93, 0x264c6a26, 0x366c5a36, 0x3f7e413f, 0xf7f502f7, 0xcc834fcc, 0x34685c34, 0xa551f4a5, 0xe5d134e5, 0xf1f908f1, 0x71e29371, 0xd8ab73d8, 0x31625331, 0x152a3f15, 0x4080c04, 0xc79552c7, 0x23466523, 0xc39d5ec3, 0x18302818, 0x9637a196, 0x50a0f05, 0x9a2fb59a, 0x70e0907, 0x12243612, 0x801b9b80, 0xe2df3de2, 0xebcd26eb, 0x274e6927, 0xb27fcdb2, 0x75ea9f75, 0x9121b09, 0x831d9e83, 0x2c58742c, 0x1a342e1a, 0x1b362d1b, 0x6edcb26e, 0x5ab4ee5a, 0xa05bfba0, 0x52a4f652, 0x3b764d3b, 0xd6b761d6, 0xb37dceb3, 0x29527b29, 0xe3dd3ee3, 0x2f5e712f, 0x84139784, 0x53a6f553, 0xd1b968d1, 0x0, 0xedc12ced, 0x20406020, 0xfce31ffc, 0xb179c8b1, 0x5bb6ed5b, 0x6ad4be6a, 0xcb8d46cb, 0xbe67d9be, 0x39724b39, 0x4a94de4a, 0x4c98d44c, 0x58b0e858, 0xcf854acf, 0xd0bb6bd0, 0xefc52aef, 0xaa4fe5aa, 0xfbed16fb, 0x4386c543, 0x4d9ad74d, 0x33665533, 0x85119485, 0x458acf45, 0xf9e910f9, 0x2040602, 0x7ffe817f, 0x50a0f050, 0x3c78443c, 0x9f25ba9f, 0xa84be3a8, 0x51a2f351, 0xa35dfea3, 0x4080c040, 0x8f058a8f, 0x923fad92, 0x9d21bc9d, 0x38704838, 0xf5f104f5, 0xbc63dfbc, 0xb677c1b6, 0xdaaf75da, 0x21426321, 0x10203010, 0xffe51aff, 0xf3fd0ef3, 0xd2bf6dd2, 0xcd814ccd, 0xc18140c, 0x13263513, 0xecc32fec, 0x5fbee15f, 0x9735a297, 0x4488cc44, 0x172e3917, 0xc49357c4, 0xa755f2a7, 0x7efc827e, 0x3d7a473d, 0x64c8ac64, 0x5dbae75d, 0x19322b19, 0x73e69573, 0x60c0a060, 0x81199881, 0x4f9ed14f, 0xdca37fdc, 0x22446622, 0x2a547e2a, 0x903bab90, 0x880b8388, 0x468cca46, 0xeec729ee, 0xb86bd3b8, 0x14283c14, 0xdea779de, 0x5ebce25e, 0xb161d0b, 0xdbad76db, 0xe0db3be0, 0x32645632, 0x3a744e3a, 0xa141e0a, 0x4992db49, 0x60c0a06, 0x24486c24, 0x5cb8e45c, 0xc29f5dc2, 0xd3bd6ed3, 0xac43efac, 0x62c4a662, 0x9139a891, 0x9531a495, 0xe4d337e4, 0x79f28b79, 0xe7d532e7, 0xc88b43c8, 0x376e5937, 0x6ddab76d, 0x8d018c8d, 0xd5b164d5, 0x4e9cd24e, 0xa949e0a9, 0x6cd8b46c, 0x56acfa56, 0xf4f307f4, 0xeacf25ea, 0x65caaf65, 0x7af48e7a, 0xae47e9ae, 0x8101808, 0xba6fd5ba, 0x78f08878, 0x254a6f25, 0x2e5c722e, 0x1c38241c, 0xa657f1a6, 0xb473c7b4, 0xc69751c6, 0xe8cb23e8, 0xdda17cdd, 0x74e89c74, 0x1f3e211f, 0x4b96dd4b, 0xbd61dcbd, 0x8b0d868b, 0x8a0f858a, 0x70e09070, 0x3e7c423e, 0xb571c4b5, 0x66ccaa66, 0x4890d848, 0x3060503, 0xf6f701f6, 0xe1c120e, 0x61c2a361, 0x356a5f35, 0x57aef957, 0xb969d0b9, 0x86179186, 0xc19958c1, 0x1d3a271d, 0x9e27b99e, 0xe1d938e1, 0xf8eb13f8, 0x982bb398, 0x11223311, 0x69d2bb69, 0xd9a970d9, 0x8e07898e, 0x9433a794, 0x9b2db69b, 0x1e3c221e, 0x87159287, 0xe9c920e9, 0xce8749ce, 0x55aaff55, 0x28507828, 0xdfa57adf, 0x8c038f8c, 0xa159f8a1, 0x89098089, 0xd1a170d, 0xbf65dabf, 0xe6d731e6, 0x4284c642, 0x68d0b868, 0x4182c341, 0x9929b099, 0x2d5a772d, 0xf1e110f, 0xb07bcbb0, 0x54a8fc54, 0xbb6dd6bb, 0x162c3a16] + private static let T2_INV: Array = [0xf45150a7, 0x417e5365, 0x171ac3a4, 0x273a965e, 0xab3bcb6b, 0x9d1ff145, 0xfaacab58, 0xe34b9303, 0x302055fa, 0x76adf66d, 0xcc889176, 0x2f5254c, 0xe54ffcd7, 0x2ac5d7cb, 0x35268044, 0x62b58fa3, 0xb1de495a, 0xba25671b, 0xea45980e, 0xfe5de1c0, 0x2fc30275, 0x4c8112f0, 0x468da397, 0xd36bc6f9, 0x8f03e75f, 0x9215959c, 0x6dbfeb7a, 0x5295da59, 0xbed42d83, 0x7458d321, 0xe0492969, 0xc98e44c8, 0xc2756a89, 0x8ef47879, 0x58996b3e, 0xb927dd71, 0xe1beb64f, 0x88f017ad, 0x20c966ac, 0xce7db43a, 0xdf63184a, 0x1ae58231, 0x51976033, 0x5362457f, 0x64b1e077, 0x6bbb84ae, 0x81fe1ca0, 0x8f9942b, 0x48705868, 0x458f19fd, 0xde94876c, 0x7b52b7f8, 0x73ab23d3, 0x4b72e202, 0x1fe3578f, 0x55662aab, 0xebb20728, 0xb52f03c2, 0xc5869a7b, 0x37d3a508, 0x2830f287, 0xbf23b2a5, 0x302ba6a, 0x16ed5c82, 0xcf8a2b1c, 0x79a792b4, 0x7f3f0f2, 0x694ea1e2, 0xda65cdf4, 0x506d5be, 0x34d11f62, 0xa6c48afe, 0x2e349d53, 0xf3a2a055, 0x8a0532e1, 0xf6a475eb, 0x830b39ec, 0x6040aaef, 0x715e069f, 0x6ebd5110, 0x213ef98a, 0xdd963d06, 0x3eddae05, 0xe64d46bd, 0x5491b58d, 0xc471055d, 0x6046fd4, 0x5060ff15, 0x981924fb, 0xbdd697e9, 0x4089cc43, 0xd967779e, 0xe8b0bd42, 0x8907888b, 0x19e7385b, 0xc879dbee, 0x7ca1470a, 0x427ce90f, 0x84f8c91e, 0x0, 0x80098386, 0x2b3248ed, 0x111eac70, 0x5a6c4e72, 0xefdfbff, 0x850f5638, 0xae3d1ed5, 0x2d362739, 0xf0a64d9, 0x5c6821a6, 0x5b9bd154, 0x36243a2e, 0xa0cb167, 0x57930fe7, 0xeeb4d296, 0x9b1b9e91, 0xc0804fc5, 0xdc61a220, 0x775a694b, 0x121c161a, 0x93e20aba, 0xa0c0e52a, 0x223c43e0, 0x1b121d17, 0x90e0b0d, 0x8bf2adc7, 0xb62db9a8, 0x1e14c8a9, 0xf1578519, 0x75af4c07, 0x99eebbdd, 0x7fa3fd60, 0x1f79f26, 0x725cbcf5, 0x6644c53b, 0xfb5b347e, 0x438b7629, 0x23cbdcc6, 0xedb668fc, 0xe4b863f1, 0x31d7cadc, 0x63421085, 0x97134022, 0xc6842011, 0x4a857d24, 0xbbd2f83d, 0xf9ae1132, 0x29c76da1, 0x9e1d4b2f, 0xb2dcf330, 0x860dec52, 0xc177d0e3, 0xb32b6c16, 0x70a999b9, 0x9411fa48, 0xe9472264, 0xfca8c48c, 0xf0a01a3f, 0x7d56d82c, 0x3322ef90, 0x4987c74e, 0x38d9c1d1, 0xca8cfea2, 0xd498360b, 0xf5a6cf81, 0x7aa528de, 0xb7da268e, 0xad3fa4bf, 0x3a2ce49d, 0x78500d92, 0x5f6a9bcc, 0x7e546246, 0x8df6c213, 0xd890e8b8, 0x392e5ef7, 0xc382f5af, 0x5d9fbe80, 0xd0697c93, 0xd56fa92d, 0x25cfb312, 0xacc83b99, 0x1810a77d, 0x9ce86e63, 0x3bdb7bbb, 0x26cd0978, 0x596ef418, 0x9aec01b7, 0x4f83a89a, 0x95e6656e, 0xffaa7ee6, 0xbc2108cf, 0x15efe6e8, 0xe7bad99b, 0x6f4ace36, 0x9fead409, 0xb029d67c, 0xa431afb2, 0x3f2a3123, 0xa5c63094, 0xa235c066, 0x4e7437bc, 0x82fca6ca, 0x90e0b0d0, 0xa73315d8, 0x4f14a98, 0xec41f7da, 0xcd7f0e50, 0x91172ff6, 0x4d768dd6, 0xef434db0, 0xaacc544d, 0x96e4df04, 0xd19ee3b5, 0x6a4c1b88, 0x2cc1b81f, 0x65467f51, 0x5e9d04ea, 0x8c015d35, 0x87fa7374, 0xbfb2e41, 0x67b35a1d, 0xdb9252d2, 0x10e93356, 0xd66d1347, 0xd79a8c61, 0xa1377a0c, 0xf8598e14, 0x13eb893c, 0xa9ceee27, 0x61b735c9, 0x1ce1ede5, 0x477a3cb1, 0xd29c59df, 0xf2553f73, 0x141879ce, 0xc773bf37, 0xf753eacd, 0xfd5f5baa, 0x3ddf146f, 0x447886db, 0xafca81f3, 0x68b93ec4, 0x24382c34, 0xa3c25f40, 0x1d1672c3, 0xe2bc0c25, 0x3c288b49, 0xdff4195, 0xa8397101, 0xc08deb3, 0xb4d89ce4, 0x566490c1, 0xcb7b6184, 0x32d570b6, 0x6c48745c, 0xb8d04257] + private static let T3: Array = [0xc6a56363, 0xf8847c7c, 0xee997777, 0xf68d7b7b, 0xff0df2f2, 0xd6bd6b6b, 0xdeb16f6f, 0x9154c5c5, 0x60503030, 0x2030101, 0xcea96767, 0x567d2b2b, 0xe719fefe, 0xb562d7d7, 0x4de6abab, 0xec9a7676, 0x8f45caca, 0x1f9d8282, 0x8940c9c9, 0xfa877d7d, 0xef15fafa, 0xb2eb5959, 0x8ec94747, 0xfb0bf0f0, 0x41ecadad, 0xb367d4d4, 0x5ffda2a2, 0x45eaafaf, 0x23bf9c9c, 0x53f7a4a4, 0xe4967272, 0x9b5bc0c0, 0x75c2b7b7, 0xe11cfdfd, 0x3dae9393, 0x4c6a2626, 0x6c5a3636, 0x7e413f3f, 0xf502f7f7, 0x834fcccc, 0x685c3434, 0x51f4a5a5, 0xd134e5e5, 0xf908f1f1, 0xe2937171, 0xab73d8d8, 0x62533131, 0x2a3f1515, 0x80c0404, 0x9552c7c7, 0x46652323, 0x9d5ec3c3, 0x30281818, 0x37a19696, 0xa0f0505, 0x2fb59a9a, 0xe090707, 0x24361212, 0x1b9b8080, 0xdf3de2e2, 0xcd26ebeb, 0x4e692727, 0x7fcdb2b2, 0xea9f7575, 0x121b0909, 0x1d9e8383, 0x58742c2c, 0x342e1a1a, 0x362d1b1b, 0xdcb26e6e, 0xb4ee5a5a, 0x5bfba0a0, 0xa4f65252, 0x764d3b3b, 0xb761d6d6, 0x7dceb3b3, 0x527b2929, 0xdd3ee3e3, 0x5e712f2f, 0x13978484, 0xa6f55353, 0xb968d1d1, 0x0, 0xc12ceded, 0x40602020, 0xe31ffcfc, 0x79c8b1b1, 0xb6ed5b5b, 0xd4be6a6a, 0x8d46cbcb, 0x67d9bebe, 0x724b3939, 0x94de4a4a, 0x98d44c4c, 0xb0e85858, 0x854acfcf, 0xbb6bd0d0, 0xc52aefef, 0x4fe5aaaa, 0xed16fbfb, 0x86c54343, 0x9ad74d4d, 0x66553333, 0x11948585, 0x8acf4545, 0xe910f9f9, 0x4060202, 0xfe817f7f, 0xa0f05050, 0x78443c3c, 0x25ba9f9f, 0x4be3a8a8, 0xa2f35151, 0x5dfea3a3, 0x80c04040, 0x58a8f8f, 0x3fad9292, 0x21bc9d9d, 0x70483838, 0xf104f5f5, 0x63dfbcbc, 0x77c1b6b6, 0xaf75dada, 0x42632121, 0x20301010, 0xe51affff, 0xfd0ef3f3, 0xbf6dd2d2, 0x814ccdcd, 0x18140c0c, 0x26351313, 0xc32fecec, 0xbee15f5f, 0x35a29797, 0x88cc4444, 0x2e391717, 0x9357c4c4, 0x55f2a7a7, 0xfc827e7e, 0x7a473d3d, 0xc8ac6464, 0xbae75d5d, 0x322b1919, 0xe6957373, 0xc0a06060, 0x19988181, 0x9ed14f4f, 0xa37fdcdc, 0x44662222, 0x547e2a2a, 0x3bab9090, 0xb838888, 0x8cca4646, 0xc729eeee, 0x6bd3b8b8, 0x283c1414, 0xa779dede, 0xbce25e5e, 0x161d0b0b, 0xad76dbdb, 0xdb3be0e0, 0x64563232, 0x744e3a3a, 0x141e0a0a, 0x92db4949, 0xc0a0606, 0x486c2424, 0xb8e45c5c, 0x9f5dc2c2, 0xbd6ed3d3, 0x43efacac, 0xc4a66262, 0x39a89191, 0x31a49595, 0xd337e4e4, 0xf28b7979, 0xd532e7e7, 0x8b43c8c8, 0x6e593737, 0xdab76d6d, 0x18c8d8d, 0xb164d5d5, 0x9cd24e4e, 0x49e0a9a9, 0xd8b46c6c, 0xacfa5656, 0xf307f4f4, 0xcf25eaea, 0xcaaf6565, 0xf48e7a7a, 0x47e9aeae, 0x10180808, 0x6fd5baba, 0xf0887878, 0x4a6f2525, 0x5c722e2e, 0x38241c1c, 0x57f1a6a6, 0x73c7b4b4, 0x9751c6c6, 0xcb23e8e8, 0xa17cdddd, 0xe89c7474, 0x3e211f1f, 0x96dd4b4b, 0x61dcbdbd, 0xd868b8b, 0xf858a8a, 0xe0907070, 0x7c423e3e, 0x71c4b5b5, 0xccaa6666, 0x90d84848, 0x6050303, 0xf701f6f6, 0x1c120e0e, 0xc2a36161, 0x6a5f3535, 0xaef95757, 0x69d0b9b9, 0x17918686, 0x9958c1c1, 0x3a271d1d, 0x27b99e9e, 0xd938e1e1, 0xeb13f8f8, 0x2bb39898, 0x22331111, 0xd2bb6969, 0xa970d9d9, 0x7898e8e, 0x33a79494, 0x2db69b9b, 0x3c221e1e, 0x15928787, 0xc920e9e9, 0x8749cece, 0xaaff5555, 0x50782828, 0xa57adfdf, 0x38f8c8c, 0x59f8a1a1, 0x9808989, 0x1a170d0d, 0x65dabfbf, 0xd731e6e6, 0x84c64242, 0xd0b86868, 0x82c34141, 0x29b09999, 0x5a772d2d, 0x1e110f0f, 0x7bcbb0b0, 0xa8fc5454, 0x6dd6bbbb, 0x2c3a1616] + private static let T3_INV: Array = [0x5150a7f4, 0x7e536541, 0x1ac3a417, 0x3a965e27, 0x3bcb6bab, 0x1ff1459d, 0xacab58fa, 0x4b9303e3, 0x2055fa30, 0xadf66d76, 0x889176cc, 0xf5254c02, 0x4ffcd7e5, 0xc5d7cb2a, 0x26804435, 0xb58fa362, 0xde495ab1, 0x25671bba, 0x45980eea, 0x5de1c0fe, 0xc302752f, 0x8112f04c, 0x8da39746, 0x6bc6f9d3, 0x3e75f8f, 0x15959c92, 0xbfeb7a6d, 0x95da5952, 0xd42d83be, 0x58d32174, 0x492969e0, 0x8e44c8c9, 0x756a89c2, 0xf478798e, 0x996b3e58, 0x27dd71b9, 0xbeb64fe1, 0xf017ad88, 0xc966ac20, 0x7db43ace, 0x63184adf, 0xe582311a, 0x97603351, 0x62457f53, 0xb1e07764, 0xbb84ae6b, 0xfe1ca081, 0xf9942b08, 0x70586848, 0x8f19fd45, 0x94876cde, 0x52b7f87b, 0xab23d373, 0x72e2024b, 0xe3578f1f, 0x662aab55, 0xb20728eb, 0x2f03c2b5, 0x869a7bc5, 0xd3a50837, 0x30f28728, 0x23b2a5bf, 0x2ba6a03, 0xed5c8216, 0x8a2b1ccf, 0xa792b479, 0xf3f0f207, 0x4ea1e269, 0x65cdf4da, 0x6d5be05, 0xd11f6234, 0xc48afea6, 0x349d532e, 0xa2a055f3, 0x532e18a, 0xa475ebf6, 0xb39ec83, 0x40aaef60, 0x5e069f71, 0xbd51106e, 0x3ef98a21, 0x963d06dd, 0xddae053e, 0x4d46bde6, 0x91b58d54, 0x71055dc4, 0x46fd406, 0x60ff1550, 0x1924fb98, 0xd697e9bd, 0x89cc4340, 0x67779ed9, 0xb0bd42e8, 0x7888b89, 0xe7385b19, 0x79dbeec8, 0xa1470a7c, 0x7ce90f42, 0xf8c91e84, 0x0, 0x9838680, 0x3248ed2b, 0x1eac7011, 0x6c4e725a, 0xfdfbff0e, 0xf563885, 0x3d1ed5ae, 0x3627392d, 0xa64d90f, 0x6821a65c, 0x9bd1545b, 0x243a2e36, 0xcb1670a, 0x930fe757, 0xb4d296ee, 0x1b9e919b, 0x804fc5c0, 0x61a220dc, 0x5a694b77, 0x1c161a12, 0xe20aba93, 0xc0e52aa0, 0x3c43e022, 0x121d171b, 0xe0b0d09, 0xf2adc78b, 0x2db9a8b6, 0x14c8a91e, 0x578519f1, 0xaf4c0775, 0xeebbdd99, 0xa3fd607f, 0xf79f2601, 0x5cbcf572, 0x44c53b66, 0x5b347efb, 0x8b762943, 0xcbdcc623, 0xb668fced, 0xb863f1e4, 0xd7cadc31, 0x42108563, 0x13402297, 0x842011c6, 0x857d244a, 0xd2f83dbb, 0xae1132f9, 0xc76da129, 0x1d4b2f9e, 0xdcf330b2, 0xdec5286, 0x77d0e3c1, 0x2b6c16b3, 0xa999b970, 0x11fa4894, 0x472264e9, 0xa8c48cfc, 0xa01a3ff0, 0x56d82c7d, 0x22ef9033, 0x87c74e49, 0xd9c1d138, 0x8cfea2ca, 0x98360bd4, 0xa6cf81f5, 0xa528de7a, 0xda268eb7, 0x3fa4bfad, 0x2ce49d3a, 0x500d9278, 0x6a9bcc5f, 0x5462467e, 0xf6c2138d, 0x90e8b8d8, 0x2e5ef739, 0x82f5afc3, 0x9fbe805d, 0x697c93d0, 0x6fa92dd5, 0xcfb31225, 0xc83b99ac, 0x10a77d18, 0xe86e639c, 0xdb7bbb3b, 0xcd097826, 0x6ef41859, 0xec01b79a, 0x83a89a4f, 0xe6656e95, 0xaa7ee6ff, 0x2108cfbc, 0xefe6e815, 0xbad99be7, 0x4ace366f, 0xead4099f, 0x29d67cb0, 0x31afb2a4, 0x2a31233f, 0xc63094a5, 0x35c066a2, 0x7437bc4e, 0xfca6ca82, 0xe0b0d090, 0x3315d8a7, 0xf14a9804, 0x41f7daec, 0x7f0e50cd, 0x172ff691, 0x768dd64d, 0x434db0ef, 0xcc544daa, 0xe4df0496, 0x9ee3b5d1, 0x4c1b886a, 0xc1b81f2c, 0x467f5165, 0x9d04ea5e, 0x15d358c, 0xfa737487, 0xfb2e410b, 0xb35a1d67, 0x9252d2db, 0xe9335610, 0x6d1347d6, 0x9a8c61d7, 0x377a0ca1, 0x598e14f8, 0xeb893c13, 0xceee27a9, 0xb735c961, 0xe1ede51c, 0x7a3cb147, 0x9c59dfd2, 0x553f73f2, 0x1879ce14, 0x73bf37c7, 0x53eacdf7, 0x5f5baafd, 0xdf146f3d, 0x7886db44, 0xca81f3af, 0xb93ec468, 0x382c3424, 0xc25f40a3, 0x1672c31d, 0xbc0c25e2, 0x288b493c, 0xff41950d, 0x397101a8, 0x8deb30c, 0xd89ce4b4, 0x6490c156, 0x7b6184cb, 0xd570b632, 0x48745c6c, 0xd04257b8] + private static let U1: Array = [0x0, 0xb0d090e, 0x161a121c, 0x1d171b12, 0x2c342438, 0x27392d36, 0x3a2e3624, 0x31233f2a, 0x58684870, 0x5365417e, 0x4e725a6c, 0x457f5362, 0x745c6c48, 0x7f516546, 0x62467e54, 0x694b775a, 0xb0d090e0, 0xbbdd99ee, 0xa6ca82fc, 0xadc78bf2, 0x9ce4b4d8, 0x97e9bdd6, 0x8afea6c4, 0x81f3afca, 0xe8b8d890, 0xe3b5d19e, 0xfea2ca8c, 0xf5afc382, 0xc48cfca8, 0xcf81f5a6, 0xd296eeb4, 0xd99be7ba, 0x7bbb3bdb, 0x70b632d5, 0x6da129c7, 0x66ac20c9, 0x578f1fe3, 0x5c8216ed, 0x41950dff, 0x4a9804f1, 0x23d373ab, 0x28de7aa5, 0x35c961b7, 0x3ec468b9, 0xfe75793, 0x4ea5e9d, 0x19fd458f, 0x12f04c81, 0xcb6bab3b, 0xc066a235, 0xdd71b927, 0xd67cb029, 0xe75f8f03, 0xec52860d, 0xf1459d1f, 0xfa489411, 0x9303e34b, 0x980eea45, 0x8519f157, 0x8e14f859, 0xbf37c773, 0xb43ace7d, 0xa92dd56f, 0xa220dc61, 0xf66d76ad, 0xfd607fa3, 0xe07764b1, 0xeb7a6dbf, 0xda595295, 0xd1545b9b, 0xcc434089, 0xc74e4987, 0xae053edd, 0xa50837d3, 0xb81f2cc1, 0xb31225cf, 0x82311ae5, 0x893c13eb, 0x942b08f9, 0x9f2601f7, 0x46bde64d, 0x4db0ef43, 0x50a7f451, 0x5baafd5f, 0x6a89c275, 0x6184cb7b, 0x7c93d069, 0x779ed967, 0x1ed5ae3d, 0x15d8a733, 0x8cfbc21, 0x3c2b52f, 0x32e18a05, 0x39ec830b, 0x24fb9819, 0x2ff69117, 0x8dd64d76, 0x86db4478, 0x9bcc5f6a, 0x90c15664, 0xa1e2694e, 0xaaef6040, 0xb7f87b52, 0xbcf5725c, 0xd5be0506, 0xdeb30c08, 0xc3a4171a, 0xc8a91e14, 0xf98a213e, 0xf2872830, 0xef903322, 0xe49d3a2c, 0x3d06dd96, 0x360bd498, 0x2b1ccf8a, 0x2011c684, 0x1132f9ae, 0x1a3ff0a0, 0x728ebb2, 0xc25e2bc, 0x656e95e6, 0x6e639ce8, 0x737487fa, 0x78798ef4, 0x495ab1de, 0x4257b8d0, 0x5f40a3c2, 0x544daacc, 0xf7daec41, 0xfcd7e54f, 0xe1c0fe5d, 0xeacdf753, 0xdbeec879, 0xd0e3c177, 0xcdf4da65, 0xc6f9d36b, 0xafb2a431, 0xa4bfad3f, 0xb9a8b62d, 0xb2a5bf23, 0x83868009, 0x888b8907, 0x959c9215, 0x9e919b1b, 0x470a7ca1, 0x4c0775af, 0x51106ebd, 0x5a1d67b3, 0x6b3e5899, 0x60335197, 0x7d244a85, 0x7629438b, 0x1f6234d1, 0x146f3ddf, 0x97826cd, 0x2752fc3, 0x335610e9, 0x385b19e7, 0x254c02f5, 0x2e410bfb, 0x8c61d79a, 0x876cde94, 0x9a7bc586, 0x9176cc88, 0xa055f3a2, 0xab58faac, 0xb64fe1be, 0xbd42e8b0, 0xd4099fea, 0xdf0496e4, 0xc2138df6, 0xc91e84f8, 0xf83dbbd2, 0xf330b2dc, 0xee27a9ce, 0xe52aa0c0, 0x3cb1477a, 0x37bc4e74, 0x2aab5566, 0x21a65c68, 0x10856342, 0x1b886a4c, 0x69f715e, 0xd927850, 0x64d90f0a, 0x6fd40604, 0x72c31d16, 0x79ce1418, 0x48ed2b32, 0x43e0223c, 0x5ef7392e, 0x55fa3020, 0x1b79aec, 0xaba93e2, 0x17ad88f0, 0x1ca081fe, 0x2d83bed4, 0x268eb7da, 0x3b99acc8, 0x3094a5c6, 0x59dfd29c, 0x52d2db92, 0x4fc5c080, 0x44c8c98e, 0x75ebf6a4, 0x7ee6ffaa, 0x63f1e4b8, 0x68fcedb6, 0xb1670a0c, 0xba6a0302, 0xa77d1810, 0xac70111e, 0x9d532e34, 0x965e273a, 0x8b493c28, 0x80443526, 0xe90f427c, 0xe2024b72, 0xff155060, 0xf418596e, 0xc53b6644, 0xce366f4a, 0xd3217458, 0xd82c7d56, 0x7a0ca137, 0x7101a839, 0x6c16b32b, 0x671bba25, 0x5638850f, 0x5d358c01, 0x40229713, 0x4b2f9e1d, 0x2264e947, 0x2969e049, 0x347efb5b, 0x3f73f255, 0xe50cd7f, 0x55dc471, 0x184adf63, 0x1347d66d, 0xcadc31d7, 0xc1d138d9, 0xdcc623cb, 0xd7cb2ac5, 0xe6e815ef, 0xede51ce1, 0xf0f207f3, 0xfbff0efd, 0x92b479a7, 0x99b970a9, 0x84ae6bbb, 0x8fa362b5, 0xbe805d9f, 0xb58d5491, 0xa89a4f83, 0xa397468d] + private static let U2: Array = [0x0, 0xd090e0b, 0x1a121c16, 0x171b121d, 0x3424382c, 0x392d3627, 0x2e36243a, 0x233f2a31, 0x68487058, 0x65417e53, 0x725a6c4e, 0x7f536245, 0x5c6c4874, 0x5165467f, 0x467e5462, 0x4b775a69, 0xd090e0b0, 0xdd99eebb, 0xca82fca6, 0xc78bf2ad, 0xe4b4d89c, 0xe9bdd697, 0xfea6c48a, 0xf3afca81, 0xb8d890e8, 0xb5d19ee3, 0xa2ca8cfe, 0xafc382f5, 0x8cfca8c4, 0x81f5a6cf, 0x96eeb4d2, 0x9be7bad9, 0xbb3bdb7b, 0xb632d570, 0xa129c76d, 0xac20c966, 0x8f1fe357, 0x8216ed5c, 0x950dff41, 0x9804f14a, 0xd373ab23, 0xde7aa528, 0xc961b735, 0xc468b93e, 0xe757930f, 0xea5e9d04, 0xfd458f19, 0xf04c8112, 0x6bab3bcb, 0x66a235c0, 0x71b927dd, 0x7cb029d6, 0x5f8f03e7, 0x52860dec, 0x459d1ff1, 0x489411fa, 0x3e34b93, 0xeea4598, 0x19f15785, 0x14f8598e, 0x37c773bf, 0x3ace7db4, 0x2dd56fa9, 0x20dc61a2, 0x6d76adf6, 0x607fa3fd, 0x7764b1e0, 0x7a6dbfeb, 0x595295da, 0x545b9bd1, 0x434089cc, 0x4e4987c7, 0x53eddae, 0x837d3a5, 0x1f2cc1b8, 0x1225cfb3, 0x311ae582, 0x3c13eb89, 0x2b08f994, 0x2601f79f, 0xbde64d46, 0xb0ef434d, 0xa7f45150, 0xaafd5f5b, 0x89c2756a, 0x84cb7b61, 0x93d0697c, 0x9ed96777, 0xd5ae3d1e, 0xd8a73315, 0xcfbc2108, 0xc2b52f03, 0xe18a0532, 0xec830b39, 0xfb981924, 0xf691172f, 0xd64d768d, 0xdb447886, 0xcc5f6a9b, 0xc1566490, 0xe2694ea1, 0xef6040aa, 0xf87b52b7, 0xf5725cbc, 0xbe0506d5, 0xb30c08de, 0xa4171ac3, 0xa91e14c8, 0x8a213ef9, 0x872830f2, 0x903322ef, 0x9d3a2ce4, 0x6dd963d, 0xbd49836, 0x1ccf8a2b, 0x11c68420, 0x32f9ae11, 0x3ff0a01a, 0x28ebb207, 0x25e2bc0c, 0x6e95e665, 0x639ce86e, 0x7487fa73, 0x798ef478, 0x5ab1de49, 0x57b8d042, 0x40a3c25f, 0x4daacc54, 0xdaec41f7, 0xd7e54ffc, 0xc0fe5de1, 0xcdf753ea, 0xeec879db, 0xe3c177d0, 0xf4da65cd, 0xf9d36bc6, 0xb2a431af, 0xbfad3fa4, 0xa8b62db9, 0xa5bf23b2, 0x86800983, 0x8b890788, 0x9c921595, 0x919b1b9e, 0xa7ca147, 0x775af4c, 0x106ebd51, 0x1d67b35a, 0x3e58996b, 0x33519760, 0x244a857d, 0x29438b76, 0x6234d11f, 0x6f3ddf14, 0x7826cd09, 0x752fc302, 0x5610e933, 0x5b19e738, 0x4c02f525, 0x410bfb2e, 0x61d79a8c, 0x6cde9487, 0x7bc5869a, 0x76cc8891, 0x55f3a2a0, 0x58faacab, 0x4fe1beb6, 0x42e8b0bd, 0x99fead4, 0x496e4df, 0x138df6c2, 0x1e84f8c9, 0x3dbbd2f8, 0x30b2dcf3, 0x27a9ceee, 0x2aa0c0e5, 0xb1477a3c, 0xbc4e7437, 0xab55662a, 0xa65c6821, 0x85634210, 0x886a4c1b, 0x9f715e06, 0x9278500d, 0xd90f0a64, 0xd406046f, 0xc31d1672, 0xce141879, 0xed2b3248, 0xe0223c43, 0xf7392e5e, 0xfa302055, 0xb79aec01, 0xba93e20a, 0xad88f017, 0xa081fe1c, 0x83bed42d, 0x8eb7da26, 0x99acc83b, 0x94a5c630, 0xdfd29c59, 0xd2db9252, 0xc5c0804f, 0xc8c98e44, 0xebf6a475, 0xe6ffaa7e, 0xf1e4b863, 0xfcedb668, 0x670a0cb1, 0x6a0302ba, 0x7d1810a7, 0x70111eac, 0x532e349d, 0x5e273a96, 0x493c288b, 0x44352680, 0xf427ce9, 0x24b72e2, 0x155060ff, 0x18596ef4, 0x3b6644c5, 0x366f4ace, 0x217458d3, 0x2c7d56d8, 0xca1377a, 0x1a83971, 0x16b32b6c, 0x1bba2567, 0x38850f56, 0x358c015d, 0x22971340, 0x2f9e1d4b, 0x64e94722, 0x69e04929, 0x7efb5b34, 0x73f2553f, 0x50cd7f0e, 0x5dc47105, 0x4adf6318, 0x47d66d13, 0xdc31d7ca, 0xd138d9c1, 0xc623cbdc, 0xcb2ac5d7, 0xe815efe6, 0xe51ce1ed, 0xf207f3f0, 0xff0efdfb, 0xb479a792, 0xb970a999, 0xae6bbb84, 0xa362b58f, 0x805d9fbe, 0x8d5491b5, 0x9a4f83a8, 0x97468da3] + private static let U3: Array = [0x0, 0x90e0b0d, 0x121c161a, 0x1b121d17, 0x24382c34, 0x2d362739, 0x36243a2e, 0x3f2a3123, 0x48705868, 0x417e5365, 0x5a6c4e72, 0x5362457f, 0x6c48745c, 0x65467f51, 0x7e546246, 0x775a694b, 0x90e0b0d0, 0x99eebbdd, 0x82fca6ca, 0x8bf2adc7, 0xb4d89ce4, 0xbdd697e9, 0xa6c48afe, 0xafca81f3, 0xd890e8b8, 0xd19ee3b5, 0xca8cfea2, 0xc382f5af, 0xfca8c48c, 0xf5a6cf81, 0xeeb4d296, 0xe7bad99b, 0x3bdb7bbb, 0x32d570b6, 0x29c76da1, 0x20c966ac, 0x1fe3578f, 0x16ed5c82, 0xdff4195, 0x4f14a98, 0x73ab23d3, 0x7aa528de, 0x61b735c9, 0x68b93ec4, 0x57930fe7, 0x5e9d04ea, 0x458f19fd, 0x4c8112f0, 0xab3bcb6b, 0xa235c066, 0xb927dd71, 0xb029d67c, 0x8f03e75f, 0x860dec52, 0x9d1ff145, 0x9411fa48, 0xe34b9303, 0xea45980e, 0xf1578519, 0xf8598e14, 0xc773bf37, 0xce7db43a, 0xd56fa92d, 0xdc61a220, 0x76adf66d, 0x7fa3fd60, 0x64b1e077, 0x6dbfeb7a, 0x5295da59, 0x5b9bd154, 0x4089cc43, 0x4987c74e, 0x3eddae05, 0x37d3a508, 0x2cc1b81f, 0x25cfb312, 0x1ae58231, 0x13eb893c, 0x8f9942b, 0x1f79f26, 0xe64d46bd, 0xef434db0, 0xf45150a7, 0xfd5f5baa, 0xc2756a89, 0xcb7b6184, 0xd0697c93, 0xd967779e, 0xae3d1ed5, 0xa73315d8, 0xbc2108cf, 0xb52f03c2, 0x8a0532e1, 0x830b39ec, 0x981924fb, 0x91172ff6, 0x4d768dd6, 0x447886db, 0x5f6a9bcc, 0x566490c1, 0x694ea1e2, 0x6040aaef, 0x7b52b7f8, 0x725cbcf5, 0x506d5be, 0xc08deb3, 0x171ac3a4, 0x1e14c8a9, 0x213ef98a, 0x2830f287, 0x3322ef90, 0x3a2ce49d, 0xdd963d06, 0xd498360b, 0xcf8a2b1c, 0xc6842011, 0xf9ae1132, 0xf0a01a3f, 0xebb20728, 0xe2bc0c25, 0x95e6656e, 0x9ce86e63, 0x87fa7374, 0x8ef47879, 0xb1de495a, 0xb8d04257, 0xa3c25f40, 0xaacc544d, 0xec41f7da, 0xe54ffcd7, 0xfe5de1c0, 0xf753eacd, 0xc879dbee, 0xc177d0e3, 0xda65cdf4, 0xd36bc6f9, 0xa431afb2, 0xad3fa4bf, 0xb62db9a8, 0xbf23b2a5, 0x80098386, 0x8907888b, 0x9215959c, 0x9b1b9e91, 0x7ca1470a, 0x75af4c07, 0x6ebd5110, 0x67b35a1d, 0x58996b3e, 0x51976033, 0x4a857d24, 0x438b7629, 0x34d11f62, 0x3ddf146f, 0x26cd0978, 0x2fc30275, 0x10e93356, 0x19e7385b, 0x2f5254c, 0xbfb2e41, 0xd79a8c61, 0xde94876c, 0xc5869a7b, 0xcc889176, 0xf3a2a055, 0xfaacab58, 0xe1beb64f, 0xe8b0bd42, 0x9fead409, 0x96e4df04, 0x8df6c213, 0x84f8c91e, 0xbbd2f83d, 0xb2dcf330, 0xa9ceee27, 0xa0c0e52a, 0x477a3cb1, 0x4e7437bc, 0x55662aab, 0x5c6821a6, 0x63421085, 0x6a4c1b88, 0x715e069f, 0x78500d92, 0xf0a64d9, 0x6046fd4, 0x1d1672c3, 0x141879ce, 0x2b3248ed, 0x223c43e0, 0x392e5ef7, 0x302055fa, 0x9aec01b7, 0x93e20aba, 0x88f017ad, 0x81fe1ca0, 0xbed42d83, 0xb7da268e, 0xacc83b99, 0xa5c63094, 0xd29c59df, 0xdb9252d2, 0xc0804fc5, 0xc98e44c8, 0xf6a475eb, 0xffaa7ee6, 0xe4b863f1, 0xedb668fc, 0xa0cb167, 0x302ba6a, 0x1810a77d, 0x111eac70, 0x2e349d53, 0x273a965e, 0x3c288b49, 0x35268044, 0x427ce90f, 0x4b72e202, 0x5060ff15, 0x596ef418, 0x6644c53b, 0x6f4ace36, 0x7458d321, 0x7d56d82c, 0xa1377a0c, 0xa8397101, 0xb32b6c16, 0xba25671b, 0x850f5638, 0x8c015d35, 0x97134022, 0x9e1d4b2f, 0xe9472264, 0xe0492969, 0xfb5b347e, 0xf2553f73, 0xcd7f0e50, 0xc471055d, 0xdf63184a, 0xd66d1347, 0x31d7cadc, 0x38d9c1d1, 0x23cbdcc6, 0x2ac5d7cb, 0x15efe6e8, 0x1ce1ede5, 0x7f3f0f2, 0xefdfbff, 0x79a792b4, 0x70a999b9, 0x6bbb84ae, 0x62b58fa3, 0x5d9fbe80, 0x5491b58d, 0x4f83a89a, 0x468da397] + private static let U4: Array = [0x0, 0xe0b0d09, 0x1c161a12, 0x121d171b, 0x382c3424, 0x3627392d, 0x243a2e36, 0x2a31233f, 0x70586848, 0x7e536541, 0x6c4e725a, 0x62457f53, 0x48745c6c, 0x467f5165, 0x5462467e, 0x5a694b77, 0xe0b0d090, 0xeebbdd99, 0xfca6ca82, 0xf2adc78b, 0xd89ce4b4, 0xd697e9bd, 0xc48afea6, 0xca81f3af, 0x90e8b8d8, 0x9ee3b5d1, 0x8cfea2ca, 0x82f5afc3, 0xa8c48cfc, 0xa6cf81f5, 0xb4d296ee, 0xbad99be7, 0xdb7bbb3b, 0xd570b632, 0xc76da129, 0xc966ac20, 0xe3578f1f, 0xed5c8216, 0xff41950d, 0xf14a9804, 0xab23d373, 0xa528de7a, 0xb735c961, 0xb93ec468, 0x930fe757, 0x9d04ea5e, 0x8f19fd45, 0x8112f04c, 0x3bcb6bab, 0x35c066a2, 0x27dd71b9, 0x29d67cb0, 0x3e75f8f, 0xdec5286, 0x1ff1459d, 0x11fa4894, 0x4b9303e3, 0x45980eea, 0x578519f1, 0x598e14f8, 0x73bf37c7, 0x7db43ace, 0x6fa92dd5, 0x61a220dc, 0xadf66d76, 0xa3fd607f, 0xb1e07764, 0xbfeb7a6d, 0x95da5952, 0x9bd1545b, 0x89cc4340, 0x87c74e49, 0xddae053e, 0xd3a50837, 0xc1b81f2c, 0xcfb31225, 0xe582311a, 0xeb893c13, 0xf9942b08, 0xf79f2601, 0x4d46bde6, 0x434db0ef, 0x5150a7f4, 0x5f5baafd, 0x756a89c2, 0x7b6184cb, 0x697c93d0, 0x67779ed9, 0x3d1ed5ae, 0x3315d8a7, 0x2108cfbc, 0x2f03c2b5, 0x532e18a, 0xb39ec83, 0x1924fb98, 0x172ff691, 0x768dd64d, 0x7886db44, 0x6a9bcc5f, 0x6490c156, 0x4ea1e269, 0x40aaef60, 0x52b7f87b, 0x5cbcf572, 0x6d5be05, 0x8deb30c, 0x1ac3a417, 0x14c8a91e, 0x3ef98a21, 0x30f28728, 0x22ef9033, 0x2ce49d3a, 0x963d06dd, 0x98360bd4, 0x8a2b1ccf, 0x842011c6, 0xae1132f9, 0xa01a3ff0, 0xb20728eb, 0xbc0c25e2, 0xe6656e95, 0xe86e639c, 0xfa737487, 0xf478798e, 0xde495ab1, 0xd04257b8, 0xc25f40a3, 0xcc544daa, 0x41f7daec, 0x4ffcd7e5, 0x5de1c0fe, 0x53eacdf7, 0x79dbeec8, 0x77d0e3c1, 0x65cdf4da, 0x6bc6f9d3, 0x31afb2a4, 0x3fa4bfad, 0x2db9a8b6, 0x23b2a5bf, 0x9838680, 0x7888b89, 0x15959c92, 0x1b9e919b, 0xa1470a7c, 0xaf4c0775, 0xbd51106e, 0xb35a1d67, 0x996b3e58, 0x97603351, 0x857d244a, 0x8b762943, 0xd11f6234, 0xdf146f3d, 0xcd097826, 0xc302752f, 0xe9335610, 0xe7385b19, 0xf5254c02, 0xfb2e410b, 0x9a8c61d7, 0x94876cde, 0x869a7bc5, 0x889176cc, 0xa2a055f3, 0xacab58fa, 0xbeb64fe1, 0xb0bd42e8, 0xead4099f, 0xe4df0496, 0xf6c2138d, 0xf8c91e84, 0xd2f83dbb, 0xdcf330b2, 0xceee27a9, 0xc0e52aa0, 0x7a3cb147, 0x7437bc4e, 0x662aab55, 0x6821a65c, 0x42108563, 0x4c1b886a, 0x5e069f71, 0x500d9278, 0xa64d90f, 0x46fd406, 0x1672c31d, 0x1879ce14, 0x3248ed2b, 0x3c43e022, 0x2e5ef739, 0x2055fa30, 0xec01b79a, 0xe20aba93, 0xf017ad88, 0xfe1ca081, 0xd42d83be, 0xda268eb7, 0xc83b99ac, 0xc63094a5, 0x9c59dfd2, 0x9252d2db, 0x804fc5c0, 0x8e44c8c9, 0xa475ebf6, 0xaa7ee6ff, 0xb863f1e4, 0xb668fced, 0xcb1670a, 0x2ba6a03, 0x10a77d18, 0x1eac7011, 0x349d532e, 0x3a965e27, 0x288b493c, 0x26804435, 0x7ce90f42, 0x72e2024b, 0x60ff1550, 0x6ef41859, 0x44c53b66, 0x4ace366f, 0x58d32174, 0x56d82c7d, 0x377a0ca1, 0x397101a8, 0x2b6c16b3, 0x25671bba, 0xf563885, 0x15d358c, 0x13402297, 0x1d4b2f9e, 0x472264e9, 0x492969e0, 0x5b347efb, 0x553f73f2, 0x7f0e50cd, 0x71055dc4, 0x63184adf, 0x6d1347d6, 0xd7cadc31, 0xd9c1d138, 0xcbdcc623, 0xc5d7cb2a, 0xefe6e815, 0xe1ede51c, 0xf3f0f207, 0xfdfbff0e, 0xa792b479, 0xa999b970, 0xbb84ae6b, 0xb58fa362, 0x9fbe805d, 0x91b58d54, 0x83a89a4f, 0x8da39746] + + /// Initialize AES with variant calculated out of key length: + /// - 16 bytes (AES-128) + /// - 24 bytes (AES-192) + /// - 32 bytes (AES-256) + /// + /// - parameter key: Key. Length of the key decides on AES variant. + /// - parameter iv: Initialization Vector (Optional for some blockMode values) + /// - parameter blockMode: Cipher mode of operation + /// - parameter padding: Padding method. .pkcs7, .noPadding, .zeroPadding, ... + /// + /// - throws: AES.Error + /// + /// - returns: Instance + public init(key: Array, blockMode: BlockMode, padding: Padding = .pkcs7) throws { + self.key = Key(bytes: key) + self.blockMode = blockMode + self.padding = padding + self.keySize = self.key.count + + // Validate key size + switch keySize * 8 { + case 128: + variant = .aes128 + case 192: + variant = .aes192 + case 256: + variant = .aes256 + default: + throw Error.invalidKeySize + } + + variantNb = variant.Nb + variantNk = variant.Nk + variantNr = variant.Nr + } + + internal func encrypt(block: ArraySlice) -> Array? { + if blockMode.options.contains(.paddingRequired) && block.count != AES.blockSize { + return Array(block) + } + + let rounds = variantNr + let rk = expandedKey + + let b00 = UInt32(block[block.startIndex.advanced(by: 0)]) + let b01 = UInt32(block[block.startIndex.advanced(by: 1)]) << 8 + let b02 = UInt32(block[block.startIndex.advanced(by: 2)]) << 16 + let b03 = UInt32(block[block.startIndex.advanced(by: 3)]) << 24 + var b0 = b00 | b01 | b02 | b03 + + let b10 = UInt32(block[block.startIndex.advanced(by: 4)]) + let b11 = UInt32(block[block.startIndex.advanced(by: 5)]) << 8 + let b12 = UInt32(block[block.startIndex.advanced(by: 6)]) << 16 + let b13 = UInt32(block[block.startIndex.advanced(by: 7)]) << 24 + var b1 = b10 | b11 | b12 | b13 + + let b20 = UInt32(block[block.startIndex.advanced(by: 8)]) + let b21 = UInt32(block[block.startIndex.advanced(by: 9)]) << 8 + let b22 = UInt32(block[block.startIndex.advanced(by: 10)]) << 16 + let b23 = UInt32(block[block.startIndex.advanced(by: 11)]) << 24 + var b2 = b20 | b21 | b22 | b23 + + let b30 = UInt32(block[block.startIndex.advanced(by: 12)]) + let b31 = UInt32(block[block.startIndex.advanced(by: 13)]) << 8 + let b32 = UInt32(block[block.startIndex.advanced(by: 14)]) << 16 + let b33 = UInt32(block[block.startIndex.advanced(by: 15)]) << 24 + var b3 = b30 | b31 | b32 | b33 + + let tLength = 4 + let t = UnsafeMutablePointer.allocate(capacity: tLength) + t.initialize(repeating: 0, count: tLength) + defer { + t.deinitialize(count: tLength) + t.deallocate() + } + + for r in 0..> 8) & 0xff)] + let lb02 = AES.T2[Int((t[2] >> 16) & 0xff)] + let lb03 = AES.T3[Int(t[3] >> 24)] + b0 = lb00 ^ lb01 ^ lb02 ^ lb03 + + let lb10 = AES.T0[Int(t[1] & 0xff)] + let lb11 = AES.T1[Int((t[2] >> 8) & 0xff)] + let lb12 = AES.T2[Int((t[3] >> 16) & 0xff)] + let lb13 = AES.T3[Int(t[0] >> 24)] + b1 = lb10 ^ lb11 ^ lb12 ^ lb13 + + let lb20 = AES.T0[Int(t[2] & 0xff)] + let lb21 = AES.T1[Int((t[3] >> 8) & 0xff)] + let lb22 = AES.T2[Int((t[0] >> 16) & 0xff)] + let lb23 = AES.T3[Int(t[1] >> 24)] + b2 = lb20 ^ lb21 ^ lb22 ^ lb23 + + let lb30 = AES.T0[Int(t[3] & 0xff)] + let lb31 = AES.T1[Int((t[0] >> 8) & 0xff)] + let lb32 = AES.T2[Int((t[1] >> 16) & 0xff)] + let lb33 = AES.T3[Int(t[2] >> 24)] + b3 = lb30 ^ lb31 ^ lb32 ^ lb33 + } + + // last round + let r = rounds - 1 + + t[0] = b0 ^ rk[r][0] + t[1] = b1 ^ rk[r][1] + t[2] = b2 ^ rk[r][2] + t[3] = b3 ^ rk[r][3] + + // rounds + b0 = F1(t[0], t[1], t[2], t[3]) ^ rk[rounds][0] + b1 = F1(t[1], t[2], t[3], t[0]) ^ rk[rounds][1] + b2 = F1(t[2], t[3], t[0], t[1]) ^ rk[rounds][2] + b3 = F1(t[3], t[0], t[1], t[2]) ^ rk[rounds][3] + + let encrypted: Array = [ + UInt8(b0 & 0xff), UInt8((b0 >> 8) & 0xff), UInt8((b0 >> 16) & 0xff), UInt8((b0 >> 24) & 0xff), + UInt8(b1 & 0xff), UInt8((b1 >> 8) & 0xff), UInt8((b1 >> 16) & 0xff), UInt8((b1 >> 24) & 0xff), + UInt8(b2 & 0xff), UInt8((b2 >> 8) & 0xff), UInt8((b2 >> 16) & 0xff), UInt8((b2 >> 24) & 0xff), + UInt8(b3 & 0xff), UInt8((b3 >> 8) & 0xff), UInt8((b3 >> 16) & 0xff), UInt8((b3 >> 24) & 0xff), + ] + return encrypted + } + + internal func decrypt(block: ArraySlice) -> Array? { + if blockMode.options.contains(.paddingRequired) && block.count != AES.blockSize { + return Array(block) + } + + let rounds = variantNr + let rk = expandedKeyInv + + // Save miliseconds by not using `block.toUInt32Array()` + let b00 = UInt32(block[block.startIndex.advanced(by: 0)]) + let b01 = UInt32(block[block.startIndex.advanced(by: 1)]) << 8 + let b02 = UInt32(block[block.startIndex.advanced(by: 2)]) << 16 + let b03 = UInt32(block[block.startIndex.advanced(by: 3)]) << 24 + var b0 = b00 | b01 | b02 | b03 + + let b10 = UInt32(block[block.startIndex.advanced(by: 4)]) + let b11 = UInt32(block[block.startIndex.advanced(by: 5)]) << 8 + let b12 = UInt32(block[block.startIndex.advanced(by: 6)]) << 16 + let b13 = UInt32(block[block.startIndex.advanced(by: 7)]) << 24 + var b1 = b10 | b11 | b12 | b13 + + let b20 = UInt32(block[block.startIndex.advanced(by: 8)]) + let b21 = UInt32(block[block.startIndex.advanced(by: 9)]) << 8 + let b22 = UInt32(block[block.startIndex.advanced(by: 10)]) << 16 + let b23 = UInt32(block[block.startIndex.advanced(by: 11)]) << 24 + var b2 = b20 | b21 | b22 | b23 + + let b30 = UInt32(block[block.startIndex.advanced(by: 12)]) + let b31 = UInt32(block[block.startIndex.advanced(by: 13)]) << 8 + let b32 = UInt32(block[block.startIndex.advanced(by: 14)]) << 16 + let b33 = UInt32(block[block.startIndex.advanced(by: 15)]) << 24 + var b3 = b30 | b31 | b32 | b33 + + let tLength = 4 + let t = UnsafeMutablePointer.allocate(capacity: tLength) + t.initialize(repeating: 0, count: tLength) + defer { + t.deinitialize(count: tLength) + t.deallocate() + } + + for r in (2...rounds).reversed() { + t[0] = b0 ^ rk[r][0] + t[1] = b1 ^ rk[r][1] + t[2] = b2 ^ rk[r][2] + t[3] = b3 ^ rk[r][3] + + let b00 = AES.T0_INV[Int(t[0] & 0xff)] + let b01 = AES.T1_INV[Int((t[3] >> 8) & 0xff)] + let b02 = AES.T2_INV[Int((t[2] >> 16) & 0xff)] + let b03 = AES.T3_INV[Int(t[1] >> 24)] + b0 = b00 ^ b01 ^ b02 ^ b03 + + let b10 = AES.T0_INV[Int(t[1] & 0xff)] + let b11 = AES.T1_INV[Int((t[0] >> 8) & 0xff)] + let b12 = AES.T2_INV[Int((t[3] >> 16) & 0xff)] + let b13 = AES.T3_INV[Int(t[2] >> 24)] + b1 = b10 ^ b11 ^ b12 ^ b13 + + let b20 = AES.T0_INV[Int(t[2] & 0xff)] + let b21 = AES.T1_INV[Int((t[1] >> 8) & 0xff)] + let b22 = AES.T2_INV[Int((t[0] >> 16) & 0xff)] + let b23 = AES.T3_INV[Int(t[3] >> 24)] + b2 = b20 ^ b21 ^ b22 ^ b23 + + let b30 = AES.T0_INV[Int(t[3] & 0xff)] + let b31 = AES.T1_INV[Int((t[2] >> 8) & 0xff)] + let b32 = AES.T2_INV[Int((t[1] >> 16) & 0xff)] + let b33 = AES.T3_INV[Int(t[0] >> 24)] + b3 = b30 ^ b31 ^ b32 ^ b33 + } + + // last round + t[0] = b0 ^ rk[1][0] + t[1] = b1 ^ rk[1][1] + t[2] = b2 ^ rk[1][2] + t[3] = b3 ^ rk[1][3] + + // rounds + + let lb00 = sBoxInv[Int(B0(t[0]))] + let lb01 = (sBoxInv[Int(B1(t[3]))] << 8) + let lb02 = (sBoxInv[Int(B2(t[2]))] << 16) + let lb03 = (sBoxInv[Int(B3(t[1]))] << 24) + b0 = lb00 | lb01 | lb02 | lb03 ^ rk[0][0] + + let lb10 = sBoxInv[Int(B0(t[1]))] + let lb11 = (sBoxInv[Int(B1(t[0]))] << 8) + let lb12 = (sBoxInv[Int(B2(t[3]))] << 16) + let lb13 = (sBoxInv[Int(B3(t[2]))] << 24) + b1 = lb10 | lb11 | lb12 | lb13 ^ rk[0][1] + + let lb20 = sBoxInv[Int(B0(t[2]))] + let lb21 = (sBoxInv[Int(B1(t[1]))] << 8) + let lb22 = (sBoxInv[Int(B2(t[0]))] << 16) + let lb23 = (sBoxInv[Int(B3(t[3]))] << 24) + b2 = lb20 | lb21 | lb22 | lb23 ^ rk[0][2] + + let lb30 = sBoxInv[Int(B0(t[3]))] + let lb31 = (sBoxInv[Int(B1(t[2]))] << 8) + let lb32 = (sBoxInv[Int(B2(t[1]))] << 16) + let lb33 = (sBoxInv[Int(B3(t[0]))] << 24) + b3 = lb30 | lb31 | lb32 | lb33 ^ rk[0][3] + + let result: Array = [ + UInt8(b0 & 0xff), UInt8((b0 >> 8) & 0xff), UInt8((b0 >> 16) & 0xff), UInt8((b0 >> 24) & 0xff), + UInt8(b1 & 0xff), UInt8((b1 >> 8) & 0xff), UInt8((b1 >> 16) & 0xff), UInt8((b1 >> 24) & 0xff), + UInt8(b2 & 0xff), UInt8((b2 >> 8) & 0xff), UInt8((b2 >> 16) & 0xff), UInt8((b2 >> 24) & 0xff), + UInt8(b3 & 0xff), UInt8((b3 >> 8) & 0xff), UInt8((b3 >> 16) & 0xff), UInt8((b3 >> 24) & 0xff), + ] + return result + } +} + +private extension AES { + private func expandKeyInv(_ key: Key, variant: Variant) -> Array> { + let rounds = variantNr + var rk2: Array> = expandKey(key, variant: variant) + + for r in 1.. Array> { + func convertExpandedKey(_ expanded: Array) -> Array> { + return expanded.batched(by: 4).map({ UInt32(bytes: $0.reversed()) }).batched(by: 4).map { Array($0) } + } + + /* + * Function used in the Key Expansion routine that takes a four-byte + * input word and applies an S-box to each of the four bytes to + * produce an output word. + */ + func subWord(_ word: Array) -> Array { + precondition(word.count == 4) + + var result = word + for i in 0..<4 { + result[i] = UInt8(sBox[Int(word[i])]) + } + return result + } + + @inline(__always) + func subWordInPlace(_ word: inout Array) { + precondition(word.count == 4) + word[0] = UInt8(sBox[Int(word[0])]) + word[1] = UInt8(sBox[Int(word[1])]) + word[2] = UInt8(sBox[Int(word[2])]) + word[3] = UInt8(sBox[Int(word[3])]) + } + + let wLength = variantNb * (variantNr + 1) * 4 + let w = UnsafeMutablePointer.allocate(capacity: wLength) + w.initialize(repeating: 0, count: wLength) + defer { + w.deinitialize(count: wLength) + w.deallocate() + } + + for i in 0.. + + for i in variantNk..(repeating: 0, count: 4) + + for wordIdx in 0..<4 { + tmp[wordIdx] = w[4 * (i - 1) + wordIdx] + } + if (i % variantNk) == 0 { + tmp = subWord(rotateLeft(UInt32(bytes: tmp), by: 8).bytes(totalBytes: 4)) + tmp[0] = tmp.first! ^ AES.Rcon[i / variantNk] + } else if variantNk > 6 && (i % variantNk) == 4 { + subWordInPlace(&tmp) + } + + // xor array of bytes + for wordIdx in 0..<4 { + w[4 * i + wordIdx] = w[4 * (i - variantNk) + wordIdx] ^ tmp[wordIdx] + } + } + return convertExpandedKey(Array(UnsafeBufferPointer(start: w, count: wLength))) + } + + @inline(__always) + private func B0(_ x: UInt32) -> UInt32 { + return x & 0xff + } + + @inline(__always) + private func B1(_ x: UInt32) -> UInt32 { + return (x >> 8) & 0xff + } + + @inline(__always) + private func B2(_ x: UInt32) -> UInt32 { + return (x >> 16) & 0xff + } + + @inline(__always) + private func B3(_ x: UInt32) -> UInt32 { + return (x >> 24) & 0xff + } + + @inline(__always) + private func F1(_ x0: UInt32, _ x1: UInt32, _ x2: UInt32, _ x3: UInt32) -> UInt32 { + var result: UInt32 = 0 + result |= UInt32(B1(AES.T0[Int(x0 & 255)])) + result |= UInt32(B1(AES.T0[Int((x1 >> 8) & 255)])) << 8 + result |= UInt32(B1(AES.T0[Int((x2 >> 16) & 255)])) << 16 + result |= UInt32(B1(AES.T0[Int(x3 >> 24)])) << 24 + return result + } + + private func calculateSBox() -> (sBox: Array, invSBox: Array) { + let sboxLength = 256 + let sbox = UnsafeMutablePointer.allocate(capacity: sboxLength) + let invsbox = UnsafeMutablePointer.allocate(capacity: sboxLength) + sbox.initialize(repeating: 0, count: sboxLength) + invsbox.initialize(repeating: 0, count: sboxLength) + defer { + sbox.deinitialize(count: sboxLength) + sbox.deallocate() + invsbox.deinitialize(count: sboxLength) + invsbox.deallocate() + } + + sbox[0] = 0x63 + + var p: UInt8 = 1, q: UInt8 = 1 + + repeat { + p = p ^ (UInt8(truncatingIfNeeded: Int(p) << 1) ^ ((p & 0x80) == 0x80 ? 0x1b : 0)) + q ^= q << 1 + q ^= q << 2 + q ^= q << 4 + q ^= (q & 0x80) == 0x80 ? 0x09 : 0 + + let s = 0x63 ^ q ^ rotateLeft(q, by: 1) ^ rotateLeft(q, by: 2) ^ rotateLeft(q, by: 3) ^ rotateLeft(q, by: 4) + + sbox[Int(p)] = UInt32(s) + invsbox[Int(s)] = UInt32(p) + } while (p != 1) + + return (sBox: Array(UnsafeBufferPointer(start: sbox, count: sboxLength)), invSBox: Array(UnsafeBufferPointer(start: invsbox, count: sboxLength))) + } +} + +// MARK: Cipher + +extension AES: Cipher { + public func encrypt(_ bytes: ArraySlice) throws -> Array { + let chunks = bytes.batched(by: AES.blockSize) + + var oneTimeCryptor = try makeEncryptor() + var out = Array(reserveCapacity: bytes.count) + for chunk in chunks { + out += try oneTimeCryptor.update(withBytes: chunk, isLast: false) + } + // Padding may be added at the very end + out += try oneTimeCryptor.finish() + + if blockMode.options.contains(.paddingRequired) && (out.count % AES.blockSize != 0) { + throw Error.dataPaddingRequired + } + + return out + } + + public func decrypt(_ bytes: ArraySlice) throws -> Array { + if blockMode.options.contains(.paddingRequired) && (bytes.count % AES.blockSize != 0) { + throw Error.dataPaddingRequired + } + + var oneTimeCryptor = try makeDecryptor() + let chunks = bytes.batched(by: AES.blockSize) + if chunks.isEmpty { + throw Error.invalidData + } + + var out = Array(reserveCapacity: bytes.count) + + var lastIdx = chunks.startIndex + chunks.indices.formIndex(&lastIdx, offsetBy: chunks.count - 1) + + // To properly remove padding, `isLast` has to be known when called with the last chunk of ciphertext + // Last chunk of ciphertext may contains padded data so next call to update(..) won't be able to remove it + for idx in chunks.indices { + out += try oneTimeCryptor.update(withBytes: chunks[idx], isLast: idx == lastIdx) + } + return out + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift new file mode 100644 index 000000000..b6bc43303 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift @@ -0,0 +1,148 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +extension Array { + public init(reserveCapacity: Int) { + self = Array() + self.reserveCapacity(reserveCapacity) + } + + var slice: ArraySlice { + return self[self.startIndex ..< self.endIndex] + } +} + +extension Array where Element == UInt8 { + public init(hex: String) { + self.init(reserveCapacity: hex.unicodeScalars.lazy.underestimatedCount) + var buffer: UInt8? + var skip = hex.hasPrefix("0x") ? 2 : 0 + for char in hex.unicodeScalars.lazy { + guard skip == 0 else { + skip -= 1 + continue + } + guard char.value >= 48 && char.value <= 102 else { + removeAll() + return + } + let v: UInt8 + let c: UInt8 = UInt8(char.value) + switch c { + case let c where c <= 57: + v = c - 48 + case let c where c >= 65 && c <= 70: + v = c - 55 + case let c where c >= 97: + v = c - 87 + default: + removeAll() + return + } + if let b = buffer { + append(b << 4 | v) + buffer = nil + } else { + buffer = v + } + } + if let b = buffer { + append(b) + } + } + + public func toHexString() -> String { + return `lazy`.reduce("") { + var s = String($1, radix: 16) + if s.count == 1 { + s = "0" + s + } + return $0 + s + } + } +} + +extension Array where Element == UInt8 { + /// split in chunks with given chunk size + @available(*, deprecated: 0.8.0, message: "") + public func chunks(size chunksize: Int) -> Array> { + var words = Array>() + words.reserveCapacity(count / chunksize) + for idx in stride(from: chunksize, through: count, by: chunksize) { + words.append(Array(self[idx - chunksize ..< idx])) // slow for large table + } + let remainder = suffix(count % chunksize) + if !remainder.isEmpty { + words.append(Array(remainder)) + } + return words + } + + public func md5() -> [Element] { + return Digest.md5(self) + } + + public func sha1() -> [Element] { + return Digest.sha1(self) + } + + public func sha224() -> [Element] { + return Digest.sha224(self) + } + + public func sha256() -> [Element] { + return Digest.sha256(self) + } + + public func sha384() -> [Element] { + return Digest.sha384(self) + } + + public func sha512() -> [Element] { + return Digest.sha512(self) + } + + public func sha2(_ variant: SHA2.Variant) -> [Element] { + return Digest.sha2(self, variant: variant) + } + + public func sha3(_ variant: SHA3.Variant) -> [Element] { + return Digest.sha3(self, variant: variant) + } + + public func crc32(seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { + return Checksum.crc32(self, seed: seed, reflect: reflect) + } + + public func crc32c(seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { + return Checksum.crc32c(self, seed: seed, reflect: reflect) + } + + public func crc16(seed: UInt16? = nil) -> UInt16 { + return Checksum.crc16(self, seed: seed) + } + + public func encrypt(cipher: Cipher) throws -> [Element] { + return try cipher.encrypt(slice) + } + + public func decrypt(cipher: Cipher) throws -> [Element] { + return try cipher.decrypt(slice) + } + + public func authenticate(with authenticator: A) throws -> [Element] { + return try authenticator.authenticate(self) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift new file mode 100644 index 000000000..03215a646 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift @@ -0,0 +1,20 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +/// Message authentication code. +public protocol Authenticator { + /// Calculate Message Authentication Code (MAC) for message. + func authenticate(_ bytes: Array) throws -> Array +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift new file mode 100644 index 000000000..575bc1fc0 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift @@ -0,0 +1,63 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +struct BatchedCollectionIndex { + let range: Range +} + +extension BatchedCollectionIndex: Comparable { + static func == (lhs: BatchedCollectionIndex, rhs: BatchedCollectionIndex) -> Bool { + return lhs.range.lowerBound == rhs.range.lowerBound + } + + static func < (lhs: BatchedCollectionIndex, rhs: BatchedCollectionIndex) -> Bool { + return lhs.range.lowerBound < rhs.range.lowerBound + } +} + +protocol BatchedCollectionType: Collection { + associatedtype Base: Collection +} + +struct BatchedCollection: Collection { + let base: Base + let size: Int + typealias Index = BatchedCollectionIndex + private func nextBreak(after idx: Base.Index) -> Base.Index { + return base.index(idx, offsetBy: size, limitedBy: base.endIndex) ?? base.endIndex + } + + var startIndex: Index { + return Index(range: base.startIndex.. Index { + return Index(range: idx.range.upperBound.. Base.SubSequence { + return base[idx.range] + } +} + +extension Collection { + func batched(by size: Int) -> BatchedCollection { + return BatchedCollection(base: self, size: size) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift new file mode 100644 index 000000000..2e9552ed3 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift @@ -0,0 +1,25 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public enum Bit: Int { + case zero + case one +} + +extension Bit { + func inverted() -> Bit { + return self == .zero ? .one : .zero + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift new file mode 100644 index 000000000..b3c1ffa90 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift @@ -0,0 +1,18 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +protocol BlockCipher: Cipher { + static var blockSize: Int { get } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift new file mode 100644 index 000000000..9772cb4c5 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift @@ -0,0 +1,84 @@ +// CryptoSwift +// +// Copyright (C) 2014-2018 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public class BlockDecryptor: Cryptor, Updatable { + private let blockSize: Int + private let padding: Padding + private var worker: CipherModeWorker + private var accumulated = Array() + + init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { + self.blockSize = blockSize + self.padding = padding + self.worker = worker + } + + public func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { + accumulated += bytes + + // If a worker (eg GCM) can combine ciphertext + tag + // we need to remove tag from the ciphertext. + if !isLast && accumulated.count < blockSize + worker.additionalBufferSize { + return [] + } + + let accumulatedWithoutSuffix: Array + if worker.additionalBufferSize > 0 { + // FIXME: how slow is that? + accumulatedWithoutSuffix = Array(accumulated.prefix(accumulated.count - worker.additionalBufferSize)) + } else { + accumulatedWithoutSuffix = accumulated + } + + var processedBytesCount = 0 + var plaintext = Array(reserveCapacity: accumulatedWithoutSuffix.count) + // Processing in a block-size manner. It's good for block modes, but bad for stream modes. + for var chunk in accumulatedWithoutSuffix.batched(by: blockSize) { + if isLast || (accumulatedWithoutSuffix.count - processedBytesCount) >= blockSize { + + if isLast, var finalizingWorker = worker as? FinalizingDecryptModeWorker { + chunk = try finalizingWorker.willDecryptLast(bytes: chunk + accumulated.suffix(worker.additionalBufferSize)) // tag size + } + + if !chunk.isEmpty { + plaintext += worker.decrypt(block: chunk) + } + + if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { + plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice)) + } + + processedBytesCount += chunk.count + } + } + accumulated.removeFirst(processedBytesCount) // super-slow + + if isLast { + plaintext = padding.remove(from: plaintext, blockSize: blockSize) + } + + return plaintext + } + + public func seek(to position: Int) throws { + guard var worker = self.worker as? SeekableModeWorker else { + fatalError("Not supported") + } + + try worker.seek(to: position) + self.worker = worker + + accumulated = [] + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift new file mode 100644 index 000000000..ba3fe2810 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift @@ -0,0 +1,57 @@ +// CryptoSwift +// +// Copyright (C) 2014-2018 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// +final class BlockEncryptor: Cryptor, Updatable { + private let blockSize: Int + private var worker: CipherModeWorker + private let padding: Padding + // Accumulated bytes. Not all processed bytes. + private var accumulated = Array(reserveCapacity: 16) + + private var lastBlockRemainder = 0 + + init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { + self.blockSize = blockSize + self.padding = padding + self.worker = worker + } + + // MARK: Updatable + public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { + accumulated += bytes + + if isLast { + accumulated = padding.add(to: accumulated, blockSize: blockSize) + } + + var encrypted = Array(reserveCapacity: accumulated.count) + for chunk in accumulated.batched(by: blockSize) { + if isLast || chunk.count == blockSize { + encrypted += worker.encrypt(block: chunk) + } + } + + // Stream encrypts all, so it removes all elements + accumulated.removeFirst(encrypted.count) + + if var finalizingWorker = worker as? FinalizingEncryptModeWorker, isLast == true { + encrypted = Array(try finalizingWorker.finalize(encrypt: encrypted.slice)) + } + + return encrypted + } + + func seek(to: Int) throws { + fatalError("Not supported") + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift new file mode 100644 index 000000000..b78e27468 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift @@ -0,0 +1,24 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public typealias CipherOperationOnBlock = (_ block: ArraySlice) -> Array? + +public protocol BlockMode { + var options: BlockModeOption { get } + //TODO: doesn't have to be public + func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker +} + +typealias StreamMode = BlockMode diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift new file mode 100644 index 000000000..646184941 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift @@ -0,0 +1,27 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public struct BlockModeOption: OptionSet { + public let rawValue: Int + + public init(rawValue: Int) { + self.rawValue = rawValue + } + + static let none = BlockModeOption(rawValue: 1 << 0) + static let initializationVectorRequired = BlockModeOption(rawValue: 1 << 1) + static let paddingRequired = BlockModeOption(rawValue: 1 << 2) + static let useEncryptToDecrypt = BlockModeOption(rawValue: 1 << 3) +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift new file mode 100644 index 000000000..f98d9bf6e --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift @@ -0,0 +1,70 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// Cipher-block chaining (CBC) +// + +public struct CBC: BlockMode { + public enum Error: Swift.Error { + /// Invalid IV + case invalidInitializationVector + } + + public let options: BlockModeOption = [.initializationVectorRequired, .paddingRequired] + private let iv: Array + + public init(iv: Array) { + self.iv = iv + } + + public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { + if iv.count != blockSize { + throw Error.invalidInitializationVector + } + + return CBCModeWorker(blockSize: blockSize, iv: iv.slice, cipherOperation: cipherOperation) + } +} + +struct CBCModeWorker: BlockModeWorker { + let cipherOperation: CipherOperationOnBlock + var blockSize: Int + let additionalBufferSize: Int = 0 + private let iv: ArraySlice + private var prev: ArraySlice? + + init(blockSize: Int, iv: ArraySlice, cipherOperation: @escaping CipherOperationOnBlock) { + self.blockSize = blockSize + self.iv = iv + self.cipherOperation = cipherOperation + } + + mutating func encrypt(block plaintext: ArraySlice) -> Array { + guard let ciphertext = cipherOperation(xor(prev ?? iv, plaintext)) else { + return Array(plaintext) + } + prev = ciphertext.slice + return ciphertext + } + + mutating func decrypt(block ciphertext: ArraySlice) -> Array { + guard let plaintext = cipherOperation(ciphertext) else { + return Array(ciphertext) + } + let result: Array = xor(prev ?? iv, plaintext) + prev = ciphertext + return result + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift new file mode 100644 index 000000000..fb59ebe94 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift @@ -0,0 +1,359 @@ +//// CryptoSwift +// +// Copyright (C) 2014-2018 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// CCM mode combines the well known CBC-MAC with the well known counter mode of encryption. +// https://tools.ietf.org/html/rfc3610 +// https://csrc.nist.gov/publications/detail/sp/800-38c/final + +#if canImport(Darwin) +import Darwin +#else +import Glibc +#endif + + +/// Counter with Cipher Block Chaining-Message Authentication Code +public struct CCM: StreamMode { + public enum Error: Swift.Error { + /// Invalid IV + case invalidInitializationVector + case invalidParameter + case fail + } + + public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] + private let nonce: Array + private let additionalAuthenticatedData: Array? + private let tagLength: Int + private let messageLength: Int // total message length. need to know in advance + + // `authenticationTag` nil for encryption, known tag for decryption + /// For encryption, the value is set at the end of the encryption. + /// For decryption, this is a known Tag to validate against. + public var authenticationTag: Array? + + /// Initialize CCM + /// + /// - Parameters: + /// - iv: Initialization vector. Nonce. Valid length between 7 and 13 bytes. + /// - tagLength: Authentication tag length, in bytes. Value of {4, 6, 8, 10, 12, 14, 16}. + /// - messageLength: Plaintext message length (excluding tag if attached). Length have to be provided in advance. + /// - additionalAuthenticatedData: Additional authenticated data. + public init(iv: Array, tagLength: Int, messageLength: Int, additionalAuthenticatedData: Array? = nil) { + self.nonce = iv + self.tagLength = tagLength + self.additionalAuthenticatedData = additionalAuthenticatedData + self.messageLength = messageLength // - tagLength + } + + /// Initialize CCM + /// + /// - Parameters: + /// - iv: Initialization vector. Nonce. Valid length between 7 and 13 bytes. + /// - tagLength: Authentication tag length, in bytes. Value of {4, 6, 8, 10, 12, 14, 16}. + /// - messageLength: Plaintext message length (excluding tag if attached). Length have to be provided in advance. + /// - authenticationTag: Authentication Tag value if not concatenated to ciphertext. + /// - additionalAuthenticatedData: Additional authenticated data. + public init(iv: Array, tagLength: Int, messageLength: Int, authenticationTag: Array, additionalAuthenticatedData: Array? = nil) { + self.init(iv: iv, tagLength: tagLength, messageLength: messageLength, additionalAuthenticatedData: additionalAuthenticatedData) + self.authenticationTag = authenticationTag + } + + + public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { + if nonce.isEmpty { + throw Error.invalidInitializationVector + } + + return CCMModeWorker(blockSize: blockSize, nonce: nonce.slice, messageLength: messageLength, additionalAuthenticatedData: additionalAuthenticatedData, tagLength: tagLength, cipherOperation: cipherOperation) + } +} + +class CCMModeWorker: StreamModeWorker, SeekableModeWorker, CounterModeWorker, FinalizingEncryptModeWorker, FinalizingDecryptModeWorker { + typealias Counter = Int + var counter = 0 + + let cipherOperation: CipherOperationOnBlock + let blockSize: Int + private let tagLength: Int + private let messageLength: Int // total message length. need to know in advance + private let q: UInt8 + + let additionalBufferSize: Int + private var keystreamPosIdx = 0 + private let nonce: Array + private var last_y: ArraySlice = [] + private var keystream: Array = [] + // Known Tag used to validate during decryption + private var expectedTag: Array? + + public enum Error: Swift.Error { + case invalidParameter + } + + init(blockSize: Int, nonce: ArraySlice, messageLength: Int, additionalAuthenticatedData: [UInt8]?, expectedTag: Array? = nil, tagLength: Int, cipherOperation: @escaping CipherOperationOnBlock) { + self.blockSize = 16 // CCM is defined for 128 block size + self.tagLength = tagLength + self.additionalBufferSize = tagLength + self.messageLength = messageLength + self.expectedTag = expectedTag + self.cipherOperation = cipherOperation + self.nonce = Array(nonce) + self.q = UInt8(15 - nonce.count) // n = 15-q + + let hasAssociatedData = additionalAuthenticatedData != nil && !additionalAuthenticatedData!.isEmpty + processControlInformation(nonce: self.nonce, tagLength: tagLength, hasAssociatedData: hasAssociatedData) + + if let aad = additionalAuthenticatedData, hasAssociatedData { + process(aad: aad) + } + } + + // For the very first time setup new IV (aka y0) from the block0 + private func processControlInformation(nonce: [UInt8], tagLength: Int, hasAssociatedData: Bool) { + let block0 = try! format(nonce: nonce, Q: UInt32(messageLength), q: q, t: UInt8(tagLength), hasAssociatedData: hasAssociatedData).slice + let y0 = cipherOperation(block0)!.slice + last_y = y0 + } + + private func process(aad: [UInt8]) { + let encodedAAD = format(aad: aad) + + for block_i in encodedAAD.batched(by: 16) { + let y_i = cipherOperation(xor(block_i, last_y))!.slice + last_y = y_i + } + } + + private func S(i: Int) throws -> [UInt8] { + let ctr = try format(counter: i, nonce: nonce, q: q) + return cipherOperation(ctr.slice)! + } + + func seek(to position: Int) throws { + self.counter = position + keystream = try S(i: position) + let offset = position % blockSize + keystreamPosIdx = offset + } + + func encrypt(block plaintext: ArraySlice) -> Array { + var result = Array(reserveCapacity: plaintext.count) + + var processed = 0 + while processed < plaintext.count { + // Need a full block here to update keystream and do CBC + if keystream.isEmpty || keystreamPosIdx == blockSize { + // y[i], where i is the counter. Can encrypt 1 block at a time + counter += 1 + guard let S = try? S(i: counter) else { return Array(plaintext) } + let plaintextP = addPadding(Array(plaintext), blockSize: blockSize) + guard let y = cipherOperation(xor(last_y, plaintextP)) else { return Array(plaintext) } + last_y = y.slice + + keystream = S + keystreamPosIdx = 0 + } + + let xored: Array = xor(plaintext[plaintext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) + keystreamPosIdx += xored.count + processed += xored.count + result += xored + } + return result + } + + func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice { + // concatenate T at the end + guard let S0 = try? S(i: 0) else { return ciphertext } + + let computedTag = xor(last_y.prefix(tagLength), S0) as ArraySlice + return ciphertext + computedTag + } + + // Decryption is stream + // CBC is block + private var accumulatedPlaintext: [UInt8] = [] + + func decrypt(block ciphertext: ArraySlice) -> Array { + var output = Array(reserveCapacity: ciphertext.count) + + do { + var currentCounter = counter + var processed = 0 + while processed < ciphertext.count { + // Need a full block here to update keystream and do CBC + // New keystream for a new block + if keystream.isEmpty || keystreamPosIdx == blockSize { + currentCounter += 1 + guard let S = try? S(i: currentCounter) else { return Array(ciphertext) } + keystream = S + keystreamPosIdx = 0 + } + + let xored: Array = xor(ciphertext[ciphertext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) // plaintext + keystreamPosIdx += xored.count + processed += xored.count + output += xored + counter = currentCounter + } + } + + // Accumulate plaintext for the MAC calculations at the end. + // It would be good to process it together though, here. + accumulatedPlaintext += output + + // Shouldn't return plaintext until validate tag. + // With incremental update, can't validate tag until all block are processed. + return output + } + + func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice { + // concatenate T at the end + let computedTag = Array(last_y.prefix(tagLength)) + guard let expectedTag = self.expectedTag, expectedTag == computedTag else { + throw CCM.Error.fail + } + + return plaintext + } + + @discardableResult + func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice { + // get tag of additionalBufferSize size + // `ciphertext` contains at least additionalBufferSize bytes + // overwrite expectedTag property used later for verification + guard let S0 = try? S(i: 0) else { return ciphertext } + self.expectedTag = xor(ciphertext.suffix(tagLength), S0) as [UInt8] + return ciphertext[ciphertext.startIndex..) throws -> ArraySlice { + + // Calculate Tag, from the last CBC block, for accumulated plaintext. + var processed = 0 + for block in accumulatedPlaintext.batched(by: blockSize) { + let blockP = addPadding(Array(block), blockSize: blockSize) + guard let y = cipherOperation(xor(last_y, blockP)) else { return plaintext } + last_y = y.slice + processed += block.count + } + accumulatedPlaintext.removeFirst(processed) + return plaintext + } +} + +// Q - octet length of P +// q - octet length of Q. Maximum length (in octets) of payload. An element of {2,3,4,5,6,7,8} +// t - octet length of T (MAC length). An element of {4,6,8,10,12,14,16} +private func format(nonce N: [UInt8], Q: UInt32, q: UInt8, t: UInt8, hasAssociatedData: Bool) throws -> [UInt8] { + var flags0: UInt8 = 0 + + if hasAssociatedData { + // 7 bit + flags0 |= (1 << 6) + } + + // 6,5,4 bit is t in 3 bits + flags0 |= (((t-2)/2) & 0x07) << 3 + + // 3,2,1 bit is q in 3 bits + flags0 |= ((q-1) & 0x07) << 0 + + var block0: [UInt8] = Array(repeating: 0, count: 16) + block0[0] = flags0 + + // N in 1...(15-q) octets, n = 15-q + // n is an element of {7,8,9,10,11,12,13} + let n = 15-Int(q) + guard (n + Int(q)) == 15 else { + // n+q == 15 + throw CCMModeWorker.Error.invalidParameter + } + block0[1...n] = N[0...(n-1)] + + // Q in (16-q)...15 octets + block0[(16-Int(q))...15] = Q.bytes(totalBytes: Int(q)).slice + + return block0 +} + +/// Formatting of the Counter Blocks. Ctr[i] +/// The counter generation function. +/// Q - octet length of P +/// q - octet length of Q. Maximum length (in octets) of payload. An element of {2,3,4,5,6,7,8} +private func format(counter i: Int, nonce N: [UInt8], q: UInt8) throws -> [UInt8] { + var flags0: UInt8 = 0 + + // bit 8,7 is Reserved + // bit 4,5,6 shall be set to 0 + // 3,2,1 bit is q in 3 bits + flags0 |= ((q-1) & 0x07) << 0 + + var block = Array(repeating: 0, count: 16) // block[0] + block[0] = flags0 + + // N in 1...(15-q) octets, n = 15-q + // n is an element of {7,8,9,10,11,12,13} + let n = 15-Int(q) + guard (n + Int(q)) == 15 else { + // n+q == 15 + throw CCMModeWorker.Error.invalidParameter + } + block[1...n] = N[0...(n-1)] + + // [i]8q in (16-q)...15 octets + block[(16-Int(q))...15] = i.bytes(totalBytes: Int(q)).slice + + return block +} + +/// Resulting can be partitioned into 16-octet blocks +private func format(aad: [UInt8]) -> [UInt8] { + let a = aad.count + + switch Double(a) { + case 0..<65280: // 2^16-2^8 + // [a]16 + return addPadding(a.bytes(totalBytes: 2) + aad, blockSize: 16) + case 65280..<4_294_967_296: // 2^32 + // [a]32 + return addPadding([0xFF, 0xFE] + a.bytes(totalBytes: 4) + aad, blockSize: 16) + case 4_294_967_296.., blockSize: Int) -> Array { + if bytes.isEmpty { + return Array(repeating: 0, count: blockSize) + } + + let remainder = bytes.count % blockSize + if remainder == 0 { + return bytes + } + + let paddingCount = blockSize - remainder + if paddingCount > 0 { + return bytes + Array(repeating: 0, count: paddingCount) + } + return bytes +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift new file mode 100644 index 000000000..316283cba --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift @@ -0,0 +1,70 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// Cipher feedback (CFB) +// + +public struct CFB: BlockMode { + public enum Error: Swift.Error { + /// Invalid IV + case invalidInitializationVector + } + + public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] + private let iv: Array + + public init(iv: Array) { + self.iv = iv + } + + public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { + if iv.count != blockSize { + throw Error.invalidInitializationVector + } + + return CFBModeWorker(blockSize: blockSize, iv: iv.slice, cipherOperation: cipherOperation) + } +} + +struct CFBModeWorker: BlockModeWorker { + let cipherOperation: CipherOperationOnBlock + let blockSize: Int + let additionalBufferSize: Int = 0 + private let iv: ArraySlice + private var prev: ArraySlice? + + init(blockSize: Int, iv: ArraySlice, cipherOperation: @escaping CipherOperationOnBlock) { + self.blockSize = blockSize + self.iv = iv + self.cipherOperation = cipherOperation + } + + mutating func encrypt(block plaintext: ArraySlice) -> Array { + guard let ciphertext = cipherOperation(prev ?? iv) else { + return Array(plaintext) + } + prev = xor(plaintext, ciphertext.slice) + return Array(prev ?? []) + } + + mutating func decrypt(block ciphertext: ArraySlice) -> Array { + guard let plaintext = cipherOperation(prev ?? iv) else { + return Array(ciphertext) + } + let result: Array = xor(plaintext, ciphertext) + prev = ciphertext + return result + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift new file mode 100644 index 000000000..2dc6a9ecb --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift @@ -0,0 +1,134 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// Counter (CTR) + +public struct CTR: StreamMode { + public enum Error: Swift.Error { + /// Invalid IV + case invalidInitializationVector + } + + public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] + private let iv: Array + private let counter: Int + + public init(iv: Array, counter: Int = 0) { + self.iv = iv + self.counter = counter + } + + public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { + if iv.count != blockSize { + throw Error.invalidInitializationVector + } + + return CTRModeWorker(blockSize: blockSize, iv: iv.slice, counter: counter, cipherOperation: cipherOperation) + } +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +struct CTRModeWorker: StreamModeWorker, SeekableModeWorker, CounterModeWorker { + typealias Counter = CTRCounter + + final class CTRCounter { + private let constPrefix: Array + private var value: UInt64 + //TODO: make it an updatable value, computing is too slow + var bytes: Array { + return constPrefix + value.bytes() + } + + init(_ initialValue: Array) { + let halfIndex = initialValue.startIndex.advanced(by: initialValue.count / 2) + constPrefix = Array(initialValue[initialValue.startIndex.., startAt index: Int) { + self.init(buildCounterValue(nonce, counter: UInt64(index))) + } + + static func +=(lhs: CTRCounter, rhs: Int) { + lhs.value += UInt64(rhs) + } + } + + let cipherOperation: CipherOperationOnBlock + let additionalBufferSize: Int = 0 + let iv: Array + var counter: CTRCounter + + private let blockSize: Int + + // The same keystream is used for the block length plaintext + // As new data is added, keystream suffix is used to xor operation. + private var keystream: Array + private var keystreamPosIdx = 0 + + init(blockSize: Int, iv: ArraySlice, counter: Int, cipherOperation: @escaping CipherOperationOnBlock) { + self.cipherOperation = cipherOperation + self.blockSize = blockSize + self.iv = Array(iv) + + // the first keystream is calculated from the nonce = initial value of counter + self.counter = CTRCounter(nonce: Array(iv), startAt: counter) + self.keystream = Array(cipherOperation(self.counter.bytes.slice)!) + } + + mutating func seek(to position: Int) throws { + let offset = position % blockSize + counter = CTRCounter(nonce: iv, startAt: position / blockSize) + keystream = Array(cipherOperation(counter.bytes.slice)!) + keystreamPosIdx = offset + } + + // plaintext is at most blockSize long + mutating func encrypt(block plaintext: ArraySlice) -> Array { + var result = Array(reserveCapacity: plaintext.count) + + var processed = 0 + while processed < plaintext.count { + // Update keystream + if keystreamPosIdx == blockSize { + counter += 1 + keystream = Array(cipherOperation(counter.bytes.slice)!) + keystreamPosIdx = 0 + } + + let xored: Array = xor(plaintext[plaintext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) + keystreamPosIdx += xored.count + processed += xored.count + result += xored + } + + return result + } + + mutating func decrypt(block ciphertext: ArraySlice) -> Array { + return encrypt(block: ciphertext) + } +} + +private func buildCounterValue(_ iv: Array, counter: UInt64) -> Array { + let noncePartLen = iv.count / 2 + let noncePrefix = iv[iv.startIndex.. +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public protocol CipherModeWorker { + var cipherOperation: CipherOperationOnBlock { get } + + // Additional space needed when incrementally process data + // eg. for GCM combined mode + var additionalBufferSize: Int { get } + + mutating func encrypt(block plaintext: ArraySlice) -> Array + mutating func decrypt(block ciphertext: ArraySlice) -> Array +} + +/// Block workers use `BlockEncryptor` +public protocol BlockModeWorker: CipherModeWorker { + var blockSize: Int { get } +} + +public protocol CounterModeWorker: CipherModeWorker { + associatedtype Counter + var counter: Counter { get set } +} + +public protocol SeekableModeWorker: CipherModeWorker { + mutating func seek(to position: Int) throws +} + +/// Stream workers use `StreamEncryptor` +public protocol StreamModeWorker: CipherModeWorker { +} + +public protocol FinalizingEncryptModeWorker: CipherModeWorker { + // Any final calculations, eg. calculate tag + // Called after the last block is encrypted + mutating func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice +} + +public protocol FinalizingDecryptModeWorker: CipherModeWorker { + // Called before decryption, hence input is ciphertext. + // ciphertext is either a last block, or a tag (for stream workers) + @discardableResult + mutating func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice + // Called after decryption, hence input is ciphertext + mutating func didDecryptLast(bytes plaintext: ArraySlice) throws -> ArraySlice + // Any final calculations, eg. calculate tag + // Called after the last block is encrypted + mutating func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift new file mode 100644 index 000000000..ce410b307 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift @@ -0,0 +1,51 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// Electronic codebook (ECB) +// + +public struct ECB: BlockMode { + public let options: BlockModeOption = .paddingRequired + + public init() { + } + + public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { + return ECBModeWorker(blockSize: blockSize, cipherOperation: cipherOperation) + } +} + +struct ECBModeWorker: BlockModeWorker { + typealias Element = Array + let cipherOperation: CipherOperationOnBlock + let blockSize: Int + let additionalBufferSize: Int = 0 + + init(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) { + self.blockSize = blockSize + self.cipherOperation = cipherOperation + } + + mutating func encrypt(block plaintext: ArraySlice) -> Array { + guard let ciphertext = cipherOperation(plaintext) else { + return Array(plaintext) + } + return ciphertext + } + + mutating func decrypt(block ciphertext: ArraySlice) -> Array { + return encrypt(block: ciphertext) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift new file mode 100644 index 000000000..aee8d29e2 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift @@ -0,0 +1,367 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// Galois/Counter Mode (GCM) +// https://csrc.nist.gov/publications/detail/sp/800-38d/final +// ref: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.694.695&rep=rep1&type=pdf +// + +public final class GCM: BlockMode { + public enum Mode { + /// In combined mode, the authentication tag is directly appended to the encrypted message. This is usually what you want. + case combined + /// Some applications may need to store the authentication tag and the encrypted message at different locations. + case detached + + var additionalBufferSize: Int { + switch self { + case .combined: + return GCMModeWorker.tagLength + case .detached: + return 0 + } + } + } + + public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] + + public enum Error: Swift.Error { + /// Invalid IV + case invalidInitializationVector + /// Special symbol FAIL that indicates that the inputs are not authentic. + case fail + } + + private let iv: Array + private let additionalAuthenticatedData: Array? + private let mode: Mode + + // `authenticationTag` nil for encryption, known tag for decryption + /// For encryption, the value is set at the end of the encryption. + /// For decryption, this is a known Tag to validate against. + public var authenticationTag: Array? + + // encrypt + public init(iv: Array, additionalAuthenticatedData: Array? = nil, mode: Mode = .detached) { + self.iv = iv + self.additionalAuthenticatedData = additionalAuthenticatedData + self.mode = mode + } + + // decrypt + public convenience init(iv: Array, authenticationTag: Array, additionalAuthenticatedData: Array? = nil, mode: Mode = .detached) { + self.init(iv: iv, additionalAuthenticatedData: additionalAuthenticatedData, mode: mode) + self.authenticationTag = authenticationTag + } + + public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { + if iv.isEmpty { + throw Error.invalidInitializationVector + } + + let worker = GCMModeWorker(iv: iv.slice, aad: additionalAuthenticatedData?.slice, expectedTag: authenticationTag, mode: mode, cipherOperation: cipherOperation) + worker.didCalculateTag = { [weak self] tag in + self?.authenticationTag = tag + } + return worker + } +} + +// MARK: - Worker + +final class GCMModeWorker: BlockModeWorker, FinalizingEncryptModeWorker, FinalizingDecryptModeWorker { + let cipherOperation: CipherOperationOnBlock + + // Callback called when authenticationTag is ready + var didCalculateTag: ((Array) -> Void)? + + // 128 bit tag. Other possible tags 4,8,12,13,14,15,16 + fileprivate static let tagLength = 16 + // GCM nonce is 96-bits by default. It's the most effective length for the IV + private static let nonceSize = 12 + + // GCM is designed for 128-bit ciphers like AES (but not really for Blowfish). 64-bit mode is not implemented. + let blockSize = 16 // 128 bit + let additionalBufferSize: Int + private let iv: ArraySlice + private let mode: GCM.Mode + private var counter: UInt128 + private let eky0: UInt128 // move to GF? + private let h: UInt128 + + // Additional authenticated data + private let aad: ArraySlice? + // Known Tag used to validate during decryption + private var expectedTag: Array? + + // Note: need new worker to reset instance + // Use empty aad if not specified. AAD is optional. + private lazy var gf: GF = { + if let aad = aad { + return GF(aad: Array(aad), h: h, blockSize: blockSize) + } + return GF(aad: [UInt8](), h: h, blockSize: blockSize) + }() + + init(iv: ArraySlice, aad: ArraySlice? = nil, expectedTag: Array? = nil, mode: GCM.Mode, cipherOperation: @escaping CipherOperationOnBlock) { + self.cipherOperation = cipherOperation + self.iv = iv + self.mode = mode + self.additionalBufferSize = mode.additionalBufferSize + self.aad = aad + self.expectedTag = expectedTag + h = UInt128(cipherOperation(Array(repeating: 0, count: blockSize).slice)!) // empty block + + // Assume nonce is 12 bytes long, otherwise initial counter would be calulated from GHASH + // counter = GF.ghash(aad: [UInt8](), ciphertext: nonce) + if iv.count == GCMModeWorker.nonceSize { + counter = makeCounter(nonce: Array(self.iv)) + } else { + counter = GF.ghash(h: h, aad: [UInt8](), ciphertext: Array(iv), blockSize: blockSize) + } + + // Set constants + eky0 = UInt128(cipherOperation(counter.bytes.slice)!) + } + + func encrypt(block plaintext: ArraySlice) -> Array { + counter = incrementCounter(counter) + + guard let ekyN = cipherOperation(counter.bytes.slice) else { + return Array(plaintext) + } + + // plaintext block ^ ek1 + let ciphertext = xor(plaintext, ekyN) as Array + + // update ghash incrementally + gf.ghashUpdate(block: ciphertext) + + return Array(ciphertext) + } + + func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice { + // Calculate MAC tag. + let ghash = gf.ghashFinish() + let tag = Array((ghash ^ eky0).bytes.prefix(GCMModeWorker.tagLength)) + + // Notify handler + didCalculateTag?(tag) + + switch mode { + case .combined: + return (ciphertext + tag).slice + case .detached: + return ciphertext + } + } + + func decrypt(block ciphertext: ArraySlice) -> Array { + counter = incrementCounter(counter) + + // update ghash incrementally + gf.ghashUpdate(block: Array(ciphertext)) + + guard let ekN = cipherOperation(counter.bytes.slice) else { + return Array(ciphertext) + } + + // ciphertext block ^ ek1 + let plaintext = xor(ciphertext, ekN) as Array + return plaintext + } + + // The authenticated decryption operation has five inputs: K, IV , C, A, and T. It has only a single + // output, either the plaintext value P or a special symbol FAIL that indicates that the inputs are not + // authentic. + @discardableResult + func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice { + // Validate tag + switch mode { + case .combined: + // overwrite expectedTag property used later for verification + self.expectedTag = Array(ciphertext.suffix(GCMModeWorker.tagLength)) + return ciphertext[ciphertext.startIndex..) throws -> ArraySlice { + // Calculate MAC tag. + let ghash = gf.ghashFinish() + let computedTag = Array((ghash ^ eky0).bytes.prefix(GCMModeWorker.tagLength)) + + // Validate tag + guard let expectedTag = self.expectedTag, computedTag == expectedTag else { + throw GCM.Error.fail + } + + return plaintext + } + + func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice { + // do nothing + return plaintext + } +} + +// MARK: - Local utils + +private func makeCounter(nonce: Array) -> UInt128 { + return UInt128(nonce + [0, 0, 0, 1]) +} + +// Successive counter values are generated using the function incr(), which treats the rightmost 32 +// bits of its argument as a nonnegative integer with the least significant bit on the right +private func incrementCounter(_ counter: UInt128) -> UInt128 { + let b = counter.i.b + 1 + let a = (b == 0 ? counter.i.a + 1 : counter.i.a) + return UInt128((a, b)) +} + +// If data is not a multiple of block size bytes long then the remainder is zero padded +// Note: It's similar to ZeroPadding, but it's not the same. +private func addPadding(_ bytes: Array, blockSize: Int) -> Array { + if bytes.isEmpty { + return Array(repeating: 0, count: blockSize) + } + + let remainder = bytes.count % blockSize + if remainder == 0 { + return bytes + } + + let paddingCount = blockSize - remainder + if paddingCount > 0 { + return bytes + Array(repeating: 0, count: paddingCount) + } + return bytes +} + +// MARK: - GF + +/// The Field GF(2^128) +private final class GF { + static let r = UInt128(a: 0xE100000000000000, b: 0) + + let blockSize: Int + let h: UInt128 + + // AAD won't change + let aadLength: Int + + // Updated for every consumed block + var ciphertextLength: Int + + // Start with 0 + var x: UInt128 + + init(aad: [UInt8], h: UInt128, blockSize: Int) { + self.blockSize = blockSize + aadLength = aad.count + ciphertextLength = 0 + self.h = h + x = 0 + + // Calculate for AAD at the begining + x = GF.calculateX(aad: aad, x: x, h: h, blockSize: blockSize) + } + + @discardableResult + func ghashUpdate(block ciphertextBlock: Array) -> UInt128 { + ciphertextLength += ciphertextBlock.count + x = GF.calculateX(block: addPadding(ciphertextBlock, blockSize: blockSize), x: x, h: h, blockSize: blockSize) + return x + } + + func ghashFinish() -> UInt128 { + // len(A) || len(C) + let len = UInt128(a: UInt64(aadLength * 8), b: UInt64(ciphertextLength * 8)) + x = GF.multiply((x ^ len), h) + return x + } + + // GHASH. One-time calculation + static func ghash(x startx: UInt128 = 0, h: UInt128, aad: Array, ciphertext: Array, blockSize: Int) -> UInt128 { + var x = calculateX(aad: aad, x: startx, h: h, blockSize: blockSize) + x = calculateX(ciphertext: ciphertext, x: x, h: h, blockSize: blockSize) + + // len(aad) || len(ciphertext) + let len = UInt128(a: UInt64(aad.count * 8), b: UInt64(ciphertext.count * 8)) + x = multiply((x ^ len), h) + + return x + } + + // Calculate Ciphertext part, for all blocks + // Not used with incremental calculation. + private static func calculateX(ciphertext: [UInt8], x startx: UInt128, h: UInt128, blockSize: Int) -> UInt128 { + let pciphertext = addPadding(ciphertext, blockSize: blockSize) + let blocksCount = pciphertext.count / blockSize + + var x = startx + for i in 0.., x: UInt128, h: UInt128, blockSize: Int) -> UInt128 { + let k = x ^ UInt128(ciphertextBlock) + return multiply(k, h) + } + + // Calculate AAD part, for all blocks + private static func calculateX(aad: [UInt8], x startx: UInt128, h: UInt128, blockSize: Int) -> UInt128 { + let paad = addPadding(aad, blockSize: blockSize) + let blocksCount = paad.count / blockSize + + var x = startx + for i in 0.. UInt128 { + var z: UInt128 = 0 + var v = x + var k = UInt128(a: 1 << 63, b: 0) + + for _ in 0..<128 { + if y & k == k { + z = z ^ v + } + + if v & 1 != 1 { + v = v >> 1 + } else { + v = (v >> 1) ^ r + } + + k = k >> 1 + } + + return z + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/OFB.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/OFB.swift new file mode 100644 index 000000000..0f5c66a48 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/OFB.swift @@ -0,0 +1,70 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// Output Feedback (OFB) +// + +public struct OFB: BlockMode { + public enum Error: Swift.Error { + /// Invalid IV + case invalidInitializationVector + } + + public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] + private let iv: Array + + public init(iv: Array) { + self.iv = iv + } + + public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { + if iv.count != blockSize { + throw Error.invalidInitializationVector + } + + return OFBModeWorker(blockSize: blockSize, iv: iv.slice, cipherOperation: cipherOperation) + } +} + +struct OFBModeWorker: BlockModeWorker { + let cipherOperation: CipherOperationOnBlock + let blockSize: Int + let additionalBufferSize: Int = 0 + private let iv: ArraySlice + private var prev: ArraySlice? + + init(blockSize: Int, iv: ArraySlice, cipherOperation: @escaping CipherOperationOnBlock) { + self.blockSize = blockSize + self.iv = iv + self.cipherOperation = cipherOperation + } + + mutating func encrypt(block plaintext: ArraySlice) -> Array { + guard let ciphertext = cipherOperation(prev ?? iv) else { + return Array(plaintext) + } + prev = ciphertext.slice + return xor(plaintext, ciphertext) + } + + mutating func decrypt(block ciphertext: ArraySlice) -> Array { + guard let decrypted = cipherOperation(prev ?? iv) else { + return Array(ciphertext) + } + let plaintext: Array = xor(decrypted, ciphertext) + prev = decrypted.slice + return plaintext + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift new file mode 100644 index 000000000..846015d6a --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift @@ -0,0 +1,70 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// Propagating Cipher Block Chaining (PCBC) +// + +public struct PCBC: BlockMode { + public enum Error: Swift.Error { + /// Invalid IV + case invalidInitializationVector + } + + public let options: BlockModeOption = [.initializationVectorRequired, .paddingRequired] + private let iv: Array + + public init(iv: Array) { + self.iv = iv + } + + public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { + if iv.count != blockSize { + throw Error.invalidInitializationVector + } + + return PCBCModeWorker(blockSize: blockSize, iv: iv.slice, cipherOperation: cipherOperation) + } +} + +struct PCBCModeWorker: BlockModeWorker { + let cipherOperation: CipherOperationOnBlock + var blockSize: Int + let additionalBufferSize: Int = 0 + private let iv: ArraySlice + private var prev: ArraySlice? + + init(blockSize: Int, iv: ArraySlice, cipherOperation: @escaping CipherOperationOnBlock) { + self.blockSize = blockSize + self.iv = iv + self.cipherOperation = cipherOperation + } + + mutating func encrypt(block plaintext: ArraySlice) -> Array { + guard let ciphertext = cipherOperation(xor(prev ?? iv, plaintext)) else { + return Array(plaintext) + } + prev = xor(plaintext, ciphertext.slice) + return ciphertext + } + + mutating func decrypt(block ciphertext: ArraySlice) -> Array { + guard let plaintext = cipherOperation(ciphertext) else { + return Array(ciphertext) + } + let result: Array = xor(prev ?? iv, plaintext) + prev = xor(plaintext.slice, ciphertext) + return result + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Blowfish.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Blowfish.swift new file mode 100644 index 000000000..34c771c27 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Blowfish.swift @@ -0,0 +1,537 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// https://en.wikipedia.org/wiki/Blowfish_(cipher) +// Based on Paul Kocher implementation +// + +public final class Blowfish { + public enum Error: Swift.Error { + /// Data padding is required + case dataPaddingRequired + /// Invalid key or IV + case invalidKeyOrInitializationVector + /// Invalid IV + case invalidInitializationVector + /// Invalid block mode + case invalidBlockMode + } + + public static let blockSize: Int = 8 // 64 bit + public let keySize: Int + + private let blockMode: BlockMode + private let padding: Padding + private var decryptWorker: CipherModeWorker! + private var encryptWorker: CipherModeWorker! + + private let N = 16 // rounds + private var P: Array + private var S: Array> + private let origP: Array = [ + 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, + 0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, + 0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, + 0xb5470917, 0x9216d5d9, 0x8979fb1b, + ] + + private let origS: Array> = [ + [ + 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, + 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, + 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, + 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, + 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, + 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, + 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, + 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, + 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, + 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, + 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, + 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, + 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, + 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, + 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, + 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, + 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, + 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, + 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, + 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, + 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, + 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, + 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, + 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, + 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, + 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, + 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, + 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, + 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, + 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, + 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, + 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, + 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, + 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, + 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, + 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, + 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, + 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, + 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, + 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, + 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, + 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, + 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, + 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, + 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, + 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, + 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, + 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, + 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, + 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, + 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, + 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, + 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, + 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, + 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, + 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, + 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, + 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, + 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, + 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, + 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, + 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, + 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, + 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a, + ], + [ + 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, + 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, + 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, + 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, + 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, + 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, + 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, + 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, + 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, + 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, + 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, + 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, + 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, + 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, + 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, + 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, + 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, + 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, + 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, + 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, + 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, + 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, + 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, + 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, + 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, + 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, + 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, + 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, + 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, + 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, + 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, + 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, + 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, + 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, + 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, + 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, + 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, + 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, + 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, + 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, + 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, + 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, + 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, + 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, + 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, + 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, + 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, + 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, + 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, + 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, + 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, + 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, + 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, + 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, + 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, + 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, + 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, + 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, + 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, + 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, + 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, + 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, + 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, + 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7, + ], + [ + 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, + 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, + 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, + 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, + 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, + 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, + 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, + 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, + 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, + 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, + 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, + 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, + 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, + 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, + 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, + 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, + 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, + 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, + 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, + 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, + 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, + 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, + 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, + 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, + 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, + 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, + 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, + 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, + 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, + 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, + 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, + 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, + 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, + 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, + 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, + 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, + 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, + 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, + 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, + 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, + 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, + 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, + 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, + 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, + 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, + 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, + 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, + 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, + 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, + 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, + 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, + 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, + 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, + 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, + 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, + 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, + 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, + 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, + 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, + 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, + 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, + 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, + 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, + 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0, + ], + [ + 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, + 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, + 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, + 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, + 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, + 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, + 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, + 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, + 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, + 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, + 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, + 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, + 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, + 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, + 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, + 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, + 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, + 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, + 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, + 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, + 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, + 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, + 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, + 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, + 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, + 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, + 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, + 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, + 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, + 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, + 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, + 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, + 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, + 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, + 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, + 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, + 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, + 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, + 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, + 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, + 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, + 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, + 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, + 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, + 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, + 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, + 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, + 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, + 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, + 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, + 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, + 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, + 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, + 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, + 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, + 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, + 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, + 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, + 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, + 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, + 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, + 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, + 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, + 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6, + ], + ] + + public init(key: Array, blockMode: BlockMode = CBC(iv: Array(repeating: 0, count: Blowfish.blockSize)), padding: Padding) throws { + precondition(key.count >= 5 && key.count <= 56) + + self.blockMode = blockMode + self.padding = padding + keySize = key.count + + S = origS + P = origP + + expandKey(key: key) + try setupBlockModeWorkers() + } + + private func setupBlockModeWorkers() throws { + encryptWorker = try blockMode.worker(blockSize: Blowfish.blockSize, cipherOperation: encrypt) + + if blockMode.options.contains(.useEncryptToDecrypt) { + decryptWorker = try blockMode.worker(blockSize: Blowfish.blockSize, cipherOperation: encrypt) + } else { + decryptWorker = try blockMode.worker(blockSize: Blowfish.blockSize, cipherOperation: decrypt) + } + } + + private func reset() { + S = origS + P = origP + // todo expand key + } + + private func expandKey(key: Array) { + var j = 0 + for i in 0..<(N + 2) { + var data: UInt32 = 0x0 + for _ in 0..<4 { + data = (data << 8) | UInt32(key[j]) + j += 1 + if j >= key.count { + j = 0 + } + } + P[i] ^= data + } + + var datal: UInt32 = 0 + var datar: UInt32 = 0 + + for i in stride(from: 0, to: N + 2, by: 2) { + encryptBlowfishBlock(l: &datal, r: &datar) + P[i] = datal + P[i + 1] = datar + } + + for i in 0..<4 { + for j in stride(from: 0, to: 256, by: 2) { + encryptBlowfishBlock(l: &datal, r: &datar) + S[i][j] = datal + S[i][j + 1] = datar + } + } + } + + fileprivate func encrypt(block: ArraySlice) -> Array? { + var result = Array() + + var l = UInt32(bytes: block[block.startIndex..> 24) & 0xff), + UInt8((l >> 16) & 0xff), + ] + result += [ + UInt8((l >> 8) & 0xff), + UInt8((l >> 0) & 0xff), + ] + result += [ + UInt8((r >> 24) & 0xff), + UInt8((r >> 16) & 0xff), + ] + result += [ + UInt8((r >> 8) & 0xff), + UInt8((r >> 0) & 0xff), + ] + + return result + } + + fileprivate func decrypt(block: ArraySlice) -> Array? { + var result = Array() + + var l = UInt32(bytes: block[block.startIndex..> 24) & 0xff), + UInt8((l >> 16) & 0xff), + ] + result += [ + UInt8((l >> 8) & 0xff), + UInt8((l >> 0) & 0xff), + ] + result += [ + UInt8((r >> 24) & 0xff), + UInt8((r >> 16) & 0xff), + ] + result += [ + UInt8((r >> 8) & 0xff), + UInt8((r >> 0) & 0xff), + ] + return result + } + + /// Encrypts the 8-byte padded buffer + /// + /// - Parameters: + /// - l: left half + /// - r: right half + fileprivate func encryptBlowfishBlock(l: inout UInt32, r: inout UInt32) { + var Xl = l + var Xr = r + + for i in 0.. UInt32 { + let f1 = S[0][Int(x >> 24) & 0xff] + let f2 = S[1][Int(x >> 16) & 0xff] + let f3 = S[2][Int(x >> 8) & 0xff] + let f4 = S[3][Int(x & 0xff)] + return ((f1 &+ f2) ^ f3) &+ f4 + } +} + +extension Blowfish: Cipher { + /// Encrypt the 8-byte padded buffer, block by block. Note that for amounts of data larger than a block, it is not safe to just call encrypt() on successive blocks. + /// + /// - Parameter bytes: Plaintext data + /// - Returns: Encrypted data + public func encrypt(_ bytes: C) throws -> Array where C.Element == UInt8, C.Index == Int { + let bytes = padding.add(to: Array(bytes), blockSize: Blowfish.blockSize) // FIXME: Array(bytes) copies + + var out = Array() + out.reserveCapacity(bytes.count) + + for chunk in bytes.batched(by: Blowfish.blockSize) { + out += encryptWorker.encrypt(block: chunk) + } + + if blockMode.options.contains(.paddingRequired) && (out.count % Blowfish.blockSize != 0) { + throw Error.dataPaddingRequired + } + + return out + } + + /// Decrypt the 8-byte padded buffer + /// + /// - Parameter bytes: Ciphertext data + /// - Returns: Plaintext data + public func decrypt(_ bytes: C) throws -> Array where C.Element == UInt8, C.Index == Int { + if blockMode.options.contains(.paddingRequired) && (bytes.count % Blowfish.blockSize != 0) { + throw Error.dataPaddingRequired + } + + var out = Array() + out.reserveCapacity(bytes.count) + + for chunk in Array(bytes).batched(by: Blowfish.blockSize) { + out += decryptWorker.decrypt(block: chunk) // FIXME: copying here is innefective + } + + out = padding.remove(from: out, blockSize: Blowfish.blockSize) + + return out + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift new file mode 100644 index 000000000..e14f2bd52 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift @@ -0,0 +1,104 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public class CBCMAC: Authenticator { + public enum Error: Swift.Error { + case wrongKeyLength + } + + private let key: SecureBytes + + private static let BlockSize: Int = 16 + private static let Zero: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] + private static let Rb: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87] + + public init(key: Array) throws { + if key.count != 16 { + throw Error.wrongKeyLength + } + self.key = SecureBytes(bytes: key) + } + + // MARK: Authenticator + + public func authenticate(_ bytes: Array) throws -> Array { + let aes = try AES(key: Array(key), blockMode: CBC(iv: CBCMAC.Zero), padding: .noPadding) + + let l = try aes.encrypt(CBCMAC.Zero) + var subKey1 = leftShiftOneBit(l) + if (l[0] & 0x80) != 0 { + subKey1 = xor(CBCMAC.Rb, subKey1) + } + var subKey2 = leftShiftOneBit(subKey1) + if (subKey1[0] & 0x80) != 0 { + subKey2 = xor(CBCMAC.Rb, subKey2) + } + + let lastBlockComplete: Bool + let blockCount = (bytes.count + CBCMAC.BlockSize - 1) / CBCMAC.BlockSize + if blockCount == 0 { + lastBlockComplete = false + } else { + lastBlockComplete = bytes.count % CBCMAC.BlockSize == 0 + } + var paddedBytes = bytes + if !lastBlockComplete { + bitPadding(to: &paddedBytes, blockSize: CBCMAC.BlockSize) + } + + var blocks = Array(paddedBytes.batched(by: CBCMAC.BlockSize)) + var lastBlock = blocks.popLast()! + if lastBlockComplete { + lastBlock = xor(lastBlock, subKey1) + } else { + lastBlock = xor(lastBlock, subKey2) + } + + var x = Array(repeating: 0x00, count: CBCMAC.BlockSize) + var y = Array(repeating: 0x00, count: CBCMAC.BlockSize) + for block in blocks { + y = xor(block, x) + x = try aes.encrypt(y) + } + // the difference between CMAC and CBC-MAC is that CMAC xors the final block with a secret value + y = process(lastBlock: lastBlock, with: x) + return try aes.encrypt(y) + } + + func process(lastBlock: ArraySlice, with x: [UInt8]) -> [UInt8] { + return Array(lastBlock) + } + + // MARK: Helper methods + + /** + Performs left shift by one bit to the bit string aquired after concatenating al bytes in the byte array + - parameters: + - bytes: byte array + - returns: bit shifted bit string split again in array of bytes + */ + private func leftShiftOneBit(_ bytes: Array) -> Array { + var shifted = Array(repeating: 0x00, count: bytes.count) + let last = bytes.count - 1 + for index in 0.. +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public final class CMAC: CBCMAC { + override func process(lastBlock: ArraySlice, with x: [UInt8]) -> [UInt8] { + return xor(lastBlock, x) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/ChaCha20.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/ChaCha20.swift new file mode 100644 index 000000000..250ee9d01 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/ChaCha20.swift @@ -0,0 +1,347 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// https://tools.ietf.org/html/rfc7539 +// + +public final class ChaCha20: BlockCipher { + public enum Error: Swift.Error { + case invalidKeyOrInitializationVector + case notSupported + } + + public static let blockSize = 64 // 512 / 8 + public let keySize: Int + + fileprivate let key: Key + fileprivate var counter: Array + + public init(key: Array, iv nonce: Array) throws { + precondition(nonce.count == 12 || nonce.count == 8) + + if key.count != 32 { + throw Error.invalidKeyOrInitializationVector + } + + self.key = Key(bytes: key) + keySize = self.key.count + + if nonce.count == 8 { + counter = [0, 0, 0, 0, 0, 0, 0, 0] + nonce + } else { + counter = [0, 0, 0, 0] + nonce + } + + assert(counter.count == 16) + } + + /// https://tools.ietf.org/html/rfc7539#section-2.3. + fileprivate func core(block: inout Array, counter: Array, key: Array) { + precondition(block.count == ChaCha20.blockSize) + precondition(counter.count == 16) + precondition(key.count == 32) + + let j0: UInt32 = 0x61707865 + let j1: UInt32 = 0x3320646e // 0x3620646e sigma/tau + let j2: UInt32 = 0x79622d32 + let j3: UInt32 = 0x6b206574 + let j4: UInt32 = UInt32(bytes: key[0..<4]).bigEndian + let j5: UInt32 = UInt32(bytes: key[4..<8]).bigEndian + let j6: UInt32 = UInt32(bytes: key[8..<12]).bigEndian + let j7: UInt32 = UInt32(bytes: key[12..<16]).bigEndian + let j8: UInt32 = UInt32(bytes: key[16..<20]).bigEndian + let j9: UInt32 = UInt32(bytes: key[20..<24]).bigEndian + let j10: UInt32 = UInt32(bytes: key[24..<28]).bigEndian + let j11: UInt32 = UInt32(bytes: key[28..<32]).bigEndian + let j12: UInt32 = UInt32(bytes: counter[0..<4]).bigEndian + let j13: UInt32 = UInt32(bytes: counter[4..<8]).bigEndian + let j14: UInt32 = UInt32(bytes: counter[8..<12]).bigEndian + let j15: UInt32 = UInt32(bytes: counter[12..<16]).bigEndian + + var (x0, x1, x2, x3, x4, x5, x6, x7) = (j0, j1, j2, j3, j4, j5, j6, j7) + var (x8, x9, x10, x11, x12, x13, x14, x15) = (j8, j9, j10, j11, j12, j13, j14, j15) + + for _ in 0..<10 { // 20 rounds + x0 = x0 &+ x4 + x12 ^= x0 + x12 = (x12 << 16) | (x12 >> 16) + x8 = x8 &+ x12 + x4 ^= x8 + x4 = (x4 << 12) | (x4 >> 20) + x0 = x0 &+ x4 + x12 ^= x0 + x12 = (x12 << 8) | (x12 >> 24) + x8 = x8 &+ x12 + x4 ^= x8 + x4 = (x4 << 7) | (x4 >> 25) + x1 = x1 &+ x5 + x13 ^= x1 + x13 = (x13 << 16) | (x13 >> 16) + x9 = x9 &+ x13 + x5 ^= x9 + x5 = (x5 << 12) | (x5 >> 20) + x1 = x1 &+ x5 + x13 ^= x1 + x13 = (x13 << 8) | (x13 >> 24) + x9 = x9 &+ x13 + x5 ^= x9 + x5 = (x5 << 7) | (x5 >> 25) + x2 = x2 &+ x6 + x14 ^= x2 + x14 = (x14 << 16) | (x14 >> 16) + x10 = x10 &+ x14 + x6 ^= x10 + x6 = (x6 << 12) | (x6 >> 20) + x2 = x2 &+ x6 + x14 ^= x2 + x14 = (x14 << 8) | (x14 >> 24) + x10 = x10 &+ x14 + x6 ^= x10 + x6 = (x6 << 7) | (x6 >> 25) + x3 = x3 &+ x7 + x15 ^= x3 + x15 = (x15 << 16) | (x15 >> 16) + x11 = x11 &+ x15 + x7 ^= x11 + x7 = (x7 << 12) | (x7 >> 20) + x3 = x3 &+ x7 + x15 ^= x3 + x15 = (x15 << 8) | (x15 >> 24) + x11 = x11 &+ x15 + x7 ^= x11 + x7 = (x7 << 7) | (x7 >> 25) + x0 = x0 &+ x5 + x15 ^= x0 + x15 = (x15 << 16) | (x15 >> 16) + x10 = x10 &+ x15 + x5 ^= x10 + x5 = (x5 << 12) | (x5 >> 20) + x0 = x0 &+ x5 + x15 ^= x0 + x15 = (x15 << 8) | (x15 >> 24) + x10 = x10 &+ x15 + x5 ^= x10 + x5 = (x5 << 7) | (x5 >> 25) + x1 = x1 &+ x6 + x12 ^= x1 + x12 = (x12 << 16) | (x12 >> 16) + x11 = x11 &+ x12 + x6 ^= x11 + x6 = (x6 << 12) | (x6 >> 20) + x1 = x1 &+ x6 + x12 ^= x1 + x12 = (x12 << 8) | (x12 >> 24) + x11 = x11 &+ x12 + x6 ^= x11 + x6 = (x6 << 7) | (x6 >> 25) + x2 = x2 &+ x7 + x13 ^= x2 + x13 = (x13 << 16) | (x13 >> 16) + x8 = x8 &+ x13 + x7 ^= x8 + x7 = (x7 << 12) | (x7 >> 20) + x2 = x2 &+ x7 + x13 ^= x2 + x13 = (x13 << 8) | (x13 >> 24) + x8 = x8 &+ x13 + x7 ^= x8 + x7 = (x7 << 7) | (x7 >> 25) + x3 = x3 &+ x4 + x14 ^= x3 + x14 = (x14 << 16) | (x14 >> 16) + x9 = x9 &+ x14 + x4 ^= x9 + x4 = (x4 << 12) | (x4 >> 20) + x3 = x3 &+ x4 + x14 ^= x3 + x14 = (x14 << 8) | (x14 >> 24) + x9 = x9 &+ x14 + x4 ^= x9 + x4 = (x4 << 7) | (x4 >> 25) + } + + x0 = x0 &+ j0 + x1 = x1 &+ j1 + x2 = x2 &+ j2 + x3 = x3 &+ j3 + x4 = x4 &+ j4 + x5 = x5 &+ j5 + x6 = x6 &+ j6 + x7 = x7 &+ j7 + x8 = x8 &+ j8 + x9 = x9 &+ j9 + x10 = x10 &+ j10 + x11 = x11 &+ j11 + x12 = x12 &+ j12 + x13 = x13 &+ j13 + x14 = x14 &+ j14 + x15 = x15 &+ j15 + + block.replaceSubrange(0..<4, with: x0.bigEndian.bytes()) + block.replaceSubrange(4..<8, with: x1.bigEndian.bytes()) + block.replaceSubrange(8..<12, with: x2.bigEndian.bytes()) + block.replaceSubrange(12..<16, with: x3.bigEndian.bytes()) + block.replaceSubrange(16..<20, with: x4.bigEndian.bytes()) + block.replaceSubrange(20..<24, with: x5.bigEndian.bytes()) + block.replaceSubrange(24..<28, with: x6.bigEndian.bytes()) + block.replaceSubrange(28..<32, with: x7.bigEndian.bytes()) + block.replaceSubrange(32..<36, with: x8.bigEndian.bytes()) + block.replaceSubrange(36..<40, with: x9.bigEndian.bytes()) + block.replaceSubrange(40..<44, with: x10.bigEndian.bytes()) + block.replaceSubrange(44..<48, with: x11.bigEndian.bytes()) + block.replaceSubrange(48..<52, with: x12.bigEndian.bytes()) + block.replaceSubrange(52..<56, with: x13.bigEndian.bytes()) + block.replaceSubrange(56..<60, with: x14.bigEndian.bytes()) + block.replaceSubrange(60..<64, with: x15.bigEndian.bytes()) + } + + // XORKeyStream + func process(bytes: ArraySlice, counter: inout Array, key: Array) -> Array { + precondition(counter.count == 16) + precondition(key.count == 32) + + var block = Array(repeating: 0, count: ChaCha20.blockSize) + var bytesSlice = bytes + var out = Array(reserveCapacity: bytesSlice.count) + + while bytesSlice.count >= ChaCha20.blockSize { + core(block: &block, counter: counter, key: key) + for (i, x) in block.enumerated() { + out.append(bytesSlice[bytesSlice.startIndex + i] ^ x) + } + var u: UInt32 = 1 + for i in 0..<4 { + u += UInt32(counter[i]) + counter[i] = UInt8(u & 0xff) + u >>= 8 + } + bytesSlice = bytesSlice[bytesSlice.startIndex + ChaCha20.blockSize.. 0 { + core(block: &block, counter: counter, key: key) + for (i, v) in bytesSlice.enumerated() { + out.append(v ^ block[i]) + } + } + return out + } +} + +// MARK: Cipher + +extension ChaCha20: Cipher { + public func encrypt(_ bytes: ArraySlice) throws -> Array { + return process(bytes: bytes, counter: &counter, key: Array(key)) + } + + public func decrypt(_ bytes: ArraySlice) throws -> Array { + return try encrypt(bytes) + } +} + +// MARK: Encryptor + +extension ChaCha20 { + public struct ChaChaEncryptor: Cryptor, Updatable { + private var accumulated = Array() + private let chacha: ChaCha20 + + init(chacha: ChaCha20) { + self.chacha = chacha + } + + public mutating func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { + accumulated += bytes + + var encrypted = Array() + encrypted.reserveCapacity(accumulated.count) + for chunk in accumulated.batched(by: ChaCha20.blockSize) { + if isLast || accumulated.count >= ChaCha20.blockSize { + encrypted += try chacha.encrypt(chunk) + accumulated.removeFirst(chunk.count) // TODO: improve performance + } + } + return encrypted + } + + public func seek(to: Int) throws { + throw Error.notSupported + } + } +} + +// MARK: Decryptor + +extension ChaCha20 { + public struct ChaChaDecryptor: Cryptor, Updatable { + private var accumulated = Array() + + private var offset: Int = 0 + private var offsetToRemove: Int = 0 + private let chacha: ChaCha20 + + init(chacha: ChaCha20) { + self.chacha = chacha + } + + public mutating func update(withBytes bytes: ArraySlice, isLast: Bool = true) throws -> Array { + // prepend "offset" number of bytes at the beginning + if offset > 0 { + accumulated += Array(repeating: 0, count: offset) + bytes + offsetToRemove = offset + offset = 0 + } else { + accumulated += bytes + } + + var plaintext = Array() + plaintext.reserveCapacity(accumulated.count) + for chunk in accumulated.batched(by: ChaCha20.blockSize) { + if isLast || accumulated.count >= ChaCha20.blockSize { + plaintext += try chacha.decrypt(chunk) + + // remove "offset" from the beginning of first chunk + if offsetToRemove > 0 { + plaintext.removeFirst(offsetToRemove) // TODO: improve performance + offsetToRemove = 0 + } + + accumulated.removeFirst(chunk.count) + } + } + + return plaintext + } + + public func seek(to: Int) throws { + throw Error.notSupported + } + } +} + +// MARK: Cryptors + +extension ChaCha20: Cryptors { + //TODO: Use BlockEncryptor/BlockDecryptor + + public func makeEncryptor() -> Cryptor & Updatable { + return ChaCha20.ChaChaEncryptor(chacha: self) + } + + public func makeDecryptor() -> Cryptor & Updatable { + return ChaCha20.ChaChaDecryptor(chacha: self) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Checksum.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Checksum.swift new file mode 100644 index 000000000..1c4fd48c3 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Checksum.swift @@ -0,0 +1,193 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +/// CRC - cyclic redundancy check code. +public final class Checksum { + private static let table32: Array = [ + 0x0000_0000, 0x7707_3096, 0xEE0E_612C, 0x9909_51BA, 0x076D_C419, 0x706A_F48F, 0xE963_A535, 0x9E64_95A3, + 0x0EDB_8832, 0x79DC_B8A4, 0xE0D5_E91E, 0x97D2_D988, 0x09B6_4C2B, 0x7EB1_7CBD, 0xE7B8_2D07, 0x90BF_1D91, + 0x1DB7_1064, 0x6AB0_20F2, 0xF3B9_7148, 0x84BE_41DE, 0x1ADA_D47D, 0x6DDD_E4EB, 0xF4D4_B551, 0x83D3_85C7, + 0x136C_9856, 0x646B_A8C0, 0xFD62_F97A, 0x8A65_C9EC, 0x1401_5C4F, 0x6306_6CD9, 0xFA0F_3D63, 0x8D08_0DF5, + 0x3B6E_20C8, 0x4C69_105E, 0xD560_41E4, 0xA267_7172, 0x3C03_E4D1, 0x4B04_D447, 0xD20D_85FD, 0xA50A_B56B, + 0x35B5_A8FA, 0x42B2_986C, 0xDBBB_C9D6, 0xACBC_F940, 0x32D8_6CE3, 0x45DF_5C75, 0xDCD6_0DCF, 0xABD1_3D59, + 0x26D9_30AC, 0x51DE_003A, 0xC8D7_5180, 0xBFD0_6116, 0x21B4_F4B5, 0x56B3_C423, 0xCFBA_9599, 0xB8BD_A50F, + 0x2802_B89E, 0x5F05_8808, 0xC60C_D9B2, 0xB10B_E924, 0x2F6F_7C87, 0x5868_4C11, 0xC161_1DAB, 0xB666_2D3D, + 0x76DC_4190, 0x01DB_7106, 0x98D2_20BC, 0xEFD5_102A, 0x71B1_8589, 0x06B6_B51F, 0x9FBF_E4A5, 0xE8B8_D433, + 0x7807_C9A2, 0x0F00_F934, 0x9609_A88E, 0xE10E_9818, 0x7F6A_0DBB, 0x086D_3D2D, 0x9164_6C97, 0xE663_5C01, + 0x6B6B_51F4, 0x1C6C_6162, 0x8565_30D8, 0xF262_004E, 0x6C06_95ED, 0x1B01_A57B, 0x8208_F4C1, 0xF50F_C457, + 0x65B0_D9C6, 0x12B7_E950, 0x8BBE_B8EA, 0xFCB9_887C, 0x62DD_1DDF, 0x15DA_2D49, 0x8CD3_7CF3, 0xFBD4_4C65, + 0x4DB2_6158, 0x3AB5_51CE, 0xA3BC_0074, 0xD4BB_30E2, 0x4ADF_A541, 0x3DD8_95D7, 0xA4D1_C46D, 0xD3D6_F4FB, + 0x4369_E96A, 0x346E_D9FC, 0xAD67_8846, 0xDA60_B8D0, 0x4404_2D73, 0x3303_1DE5, 0xAA0A_4C5F, 0xDD0D_7CC9, + 0x5005_713C, 0x2702_41AA, 0xBE0B_1010, 0xC90C_2086, 0x5768_B525, 0x206F_85B3, 0xB966_D409, 0xCE61_E49F, + 0x5EDE_F90E, 0x29D9_C998, 0xB0D0_9822, 0xC7D7_A8B4, 0x59B3_3D17, 0x2EB4_0D81, 0xB7BD_5C3B, 0xC0BA_6CAD, + 0xEDB8_8320, 0x9ABF_B3B6, 0x03B6_E20C, 0x74B1_D29A, 0xEAD5_4739, 0x9DD2_77AF, 0x04DB_2615, 0x73DC_1683, + 0xE363_0B12, 0x9464_3B84, 0x0D6D_6A3E, 0x7A6A_5AA8, 0xE40E_CF0B, 0x9309_FF9D, 0x0A00_AE27, 0x7D07_9EB1, + 0xF00F_9344, 0x8708_A3D2, 0x1E01_F268, 0x6906_C2FE, 0xF762_575D, 0x8065_67CB, 0x196C_3671, 0x6E6B_06E7, + 0xFED4_1B76, 0x89D3_2BE0, 0x10DA_7A5A, 0x67DD_4ACC, 0xF9B9_DF6F, 0x8EBE_EFF9, 0x17B7_BE43, 0x60B0_8ED5, + 0xD6D6_A3E8, 0xA1D1_937E, 0x38D8_C2C4, 0x4FDF_F252, 0xD1BB_67F1, 0xA6BC_5767, 0x3FB5_06DD, 0x48B2_364B, + 0xD80D_2BDA, 0xAF0A_1B4C, 0x3603_4AF6, 0x4104_7A60, 0xDF60_EFC3, 0xA867_DF55, 0x316E_8EEF, 0x4669_BE79, + 0xCB61_B38C, 0xBC66_831A, 0x256F_D2A0, 0x5268_E236, 0xCC0C_7795, 0xBB0B_4703, 0x2202_16B9, 0x5505_262F, + 0xC5BA_3BBE, 0xB2BD_0B28, 0x2BB4_5A92, 0x5CB3_6A04, 0xC2D7_FFA7, 0xB5D0_CF31, 0x2CD9_9E8B, 0x5BDE_AE1D, + 0x9B64_C2B0, 0xEC63_F226, 0x756A_A39C, 0x026D_930A, 0x9C09_06A9, 0xEB0E_363F, 0x7207_6785, 0x0500_5713, + 0x95BF_4A82, 0xE2B8_7A14, 0x7BB1_2BAE, 0x0CB6_1B38, 0x92D2_8E9B, 0xE5D5_BE0D, 0x7CDC_EFB7, 0x0BDB_DF21, + 0x86D3_D2D4, 0xF1D4_E242, 0x68DD_B3F8, 0x1FDA_836E, 0x81BE_16CD, 0xF6B9_265B, 0x6FB0_77E1, 0x18B7_4777, + 0x8808_5AE6, 0xFF0F_6A70, 0x6606_3BCA, 0x1101_0B5C, 0x8F65_9EFF, 0xF862_AE69, 0x616B_FFD3, 0x166C_CF45, + 0xA00A_E278, 0xD70D_D2EE, 0x4E04_8354, 0x3903_B3C2, 0xA767_2661, 0xD060_16F7, 0x4969_474D, 0x3E6E_77DB, + 0xAED1_6A4A, 0xD9D6_5ADC, 0x40DF_0B66, 0x37D8_3BF0, 0xA9BC_AE53, 0xDEBB_9EC5, 0x47B2_CF7F, 0x30B5_FFE9, + 0xBDBD_F21C, 0xCABA_C28A, 0x53B3_9330, 0x24B4_A3A6, 0xBAD0_3605, 0xCDD7_0693, 0x54DE_5729, 0x23D9_67BF, + 0xB366_7A2E, 0xC461_4AB8, 0x5D68_1B02, 0x2A6F_2B94, 0xB40B_BE37, 0xC30C_8EA1, 0x5A05_DF1B, 0x2D02_EF8D, + ] + + private static let table32c: Array = [ + 0x0000_0000, 0xF26B_8303, 0xE13B_70F7, 0x1350_F3F4, 0xC79A_971F, 0x35F1_141C, 0x26A1_E7E8, 0xD4CA_64EB, + 0x8AD9_58CF, 0x78B2_DBCC, 0x6BE2_2838, 0x9989_AB3B, 0x4D43_CFD0, 0xBF28_4CD3, 0xAC78_BF27, 0x5E13_3C24, + 0x105E_C76F, 0xE235_446C, 0xF165_B798, 0x030E_349B, 0xD7C4_5070, 0x25AF_D373, 0x36FF_2087, 0xC494_A384, + 0x9A87_9FA0, 0x68EC_1CA3, 0x7BBC_EF57, 0x89D7_6C54, 0x5D1D_08BF, 0xAF76_8BBC, 0xBC26_7848, 0x4E4D_FB4B, + 0x20BD_8EDE, 0xD2D6_0DDD, 0xC186_FE29, 0x33ED_7D2A, 0xE727_19C1, 0x154C_9AC2, 0x061C_6936, 0xF477_EA35, + 0xAA64_D611, 0x580F_5512, 0x4B5F_A6E6, 0xB934_25E5, 0x6DFE_410E, 0x9F95_C20D, 0x8CC5_31F9, 0x7EAE_B2FA, + 0x30E3_49B1, 0xC288_CAB2, 0xD1D8_3946, 0x23B3_BA45, 0xF779_DEAE, 0x0512_5DAD, 0x1642_AE59, 0xE429_2D5A, + 0xBA3A_117E, 0x4851_927D, 0x5B01_6189, 0xA96A_E28A, 0x7DA0_8661, 0x8FCB_0562, 0x9C9B_F696, 0x6EF0_7595, + 0x417B_1DBC, 0xB310_9EBF, 0xA040_6D4B, 0x522B_EE48, 0x86E1_8AA3, 0x748A_09A0, 0x67DA_FA54, 0x95B1_7957, + 0xCBA2_4573, 0x39C9_C670, 0x2A99_3584, 0xD8F2_B687, 0x0C38_D26C, 0xFE53_516F, 0xED03_A29B, 0x1F68_2198, + 0x5125_DAD3, 0xA34E_59D0, 0xB01E_AA24, 0x4275_2927, 0x96BF_4DCC, 0x64D4_CECF, 0x7784_3D3B, 0x85EF_BE38, + 0xDBFC_821C, 0x2997_011F, 0x3AC7_F2EB, 0xC8AC_71E8, 0x1C66_1503, 0xEE0D_9600, 0xFD5D_65F4, 0x0F36_E6F7, + 0x61C6_9362, 0x93AD_1061, 0x80FD_E395, 0x7296_6096, 0xA65C_047D, 0x5437_877E, 0x4767_748A, 0xB50C_F789, + 0xEB1F_CBAD, 0x1974_48AE, 0x0A24_BB5A, 0xF84F_3859, 0x2C85_5CB2, 0xDEEE_DFB1, 0xCDBE_2C45, 0x3FD5_AF46, + 0x7198_540D, 0x83F3_D70E, 0x90A3_24FA, 0x62C8_A7F9, 0xB602_C312, 0x4469_4011, 0x5739_B3E5, 0xA552_30E6, + 0xFB41_0CC2, 0x092A_8FC1, 0x1A7A_7C35, 0xE811_FF36, 0x3CDB_9BDD, 0xCEB0_18DE, 0xDDE0_EB2A, 0x2F8B_6829, + 0x82F6_3B78, 0x709D_B87B, 0x63CD_4B8F, 0x91A6_C88C, 0x456C_AC67, 0xB707_2F64, 0xA457_DC90, 0x563C_5F93, + 0x082F_63B7, 0xFA44_E0B4, 0xE914_1340, 0x1B7F_9043, 0xCFB5_F4A8, 0x3DDE_77AB, 0x2E8E_845F, 0xDCE5_075C, + 0x92A8_FC17, 0x60C3_7F14, 0x7393_8CE0, 0x81F8_0FE3, 0x5532_6B08, 0xA759_E80B, 0xB409_1BFF, 0x4662_98FC, + 0x1871_A4D8, 0xEA1A_27DB, 0xF94A_D42F, 0x0B21_572C, 0xDFEB_33C7, 0x2D80_B0C4, 0x3ED0_4330, 0xCCBB_C033, + 0xA24B_B5A6, 0x5020_36A5, 0x4370_C551, 0xB11B_4652, 0x65D1_22B9, 0x97BA_A1BA, 0x84EA_524E, 0x7681_D14D, + 0x2892_ED69, 0xDAF9_6E6A, 0xC9A9_9D9E, 0x3BC2_1E9D, 0xEF08_7A76, 0x1D63_F975, 0x0E33_0A81, 0xFC58_8982, + 0xB215_72C9, 0x407E_F1CA, 0x532E_023E, 0xA145_813D, 0x758F_E5D6, 0x87E4_66D5, 0x94B4_9521, 0x66DF_1622, + 0x38CC_2A06, 0xCAA7_A905, 0xD9F7_5AF1, 0x2B9C_D9F2, 0xFF56_BD19, 0x0D3D_3E1A, 0x1E6D_CDEE, 0xEC06_4EED, + 0xC38D_26C4, 0x31E6_A5C7, 0x22B6_5633, 0xD0DD_D530, 0x0417_B1DB, 0xF67C_32D8, 0xE52C_C12C, 0x1747_422F, + 0x4954_7E0B, 0xBB3F_FD08, 0xA86F_0EFC, 0x5A04_8DFF, 0x8ECE_E914, 0x7CA5_6A17, 0x6FF5_99E3, 0x9D9E_1AE0, + 0xD3D3_E1AB, 0x21B8_62A8, 0x32E8_915C, 0xC083_125F, 0x1449_76B4, 0xE622_F5B7, 0xF572_0643, 0x0719_8540, + 0x590A_B964, 0xAB61_3A67, 0xB831_C993, 0x4A5A_4A90, 0x9E90_2E7B, 0x6CFB_AD78, 0x7FAB_5E8C, 0x8DC0_DD8F, + 0xE330_A81A, 0x115B_2B19, 0x020B_D8ED, 0xF060_5BEE, 0x24AA_3F05, 0xD6C1_BC06, 0xC591_4FF2, 0x37FA_CCF1, + 0x69E9_F0D5, 0x9B82_73D6, 0x88D2_8022, 0x7AB9_0321, 0xAE73_67CA, 0x5C18_E4C9, 0x4F48_173D, 0xBD23_943E, + 0xF36E_6F75, 0x0105_EC76, 0x1255_1F82, 0xE03E_9C81, 0x34F4_F86A, 0xC69F_7B69, 0xD5CF_889D, 0x27A4_0B9E, + 0x79B7_37BA, 0x8BDC_B4B9, 0x988C_474D, 0x6AE7_C44E, 0xBE2D_A0A5, 0x4C46_23A6, 0x5F16_D052, 0xAD7D_5351, + ] + + private static let table16: Array = [ + 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, + 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, + 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, + 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, + 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, + 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, + 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, + 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, + 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, + 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, + 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, + 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, + 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, + 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, + 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, + 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, + 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, + 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, + 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, + 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, + 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, + 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, + 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, + 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, + 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, + 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, + 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, + 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, + 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, + 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, + 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, + 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040, + ] + + /// Polynomial: 0xEDB88320 (Reversed) - IEEE + func crc32(_ message: Array, seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { + var crc: UInt32 = seed != nil ? seed! : 0xFFFF_FFFF + for chunk in message.batched(by: 256) { + for b in chunk { + let idx = Int((crc ^ UInt32(reflect ? b : reversed(b))) & 0xFF) + crc = (crc >> 8) ^ Checksum.table32[idx] + } + } + return (reflect ? crc : reversed(crc)) ^ 0xFFFF_FFFF + } + + /// Polynomial: 0x82F63B78 (Reversed) - Castagnoli + func crc32c(_ message: Array, seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { + var crc: UInt32 = seed != nil ? seed! : 0xFFFF_FFFF + for chunk in message.batched(by: 256) { + for b in chunk { + let idx = Int((crc ^ UInt32(reflect ? b : reversed(b))) & 0xFF) + crc = (crc >> 8) ^ Checksum.table32c[idx] + } + } + return (reflect ? crc : reversed(crc)) ^ 0xFFFF_FFFF + } + + /// Polynomial: 0xA001 (Reversed) - IBM + func crc16(_ message: Array, seed: UInt16? = nil) -> UInt16 { + var crc: UInt16 = seed != nil ? seed! : 0x0000 + for chunk in message.batched(by: 256) { + for b in chunk { + crc = (crc >> 8) ^ Checksum.table16[Int((crc ^ UInt16(b)) & 0xFF)] + } + } + return crc + } +} + +// MARK: Public interface + +public extension Checksum { + /// Calculate CRC32. + /// + /// - parameter message: Message + /// - parameter seed: Seed value (Optional) + /// - parameter reflect: is reflect (default true) + /// + /// - returns: Calculated code + static func crc32(_ message: Array, seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { + return Checksum().crc32(message, seed: seed, reflect: reflect) + } + + /// Calculate CRC32C + /// + /// - parameter message: Message + /// - parameter seed: Seed value (Optional) + /// - parameter reflect: is reflect (default true) + /// + /// - returns: Calculated code + static func crc32c(_ message: Array, seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { + return Checksum().crc32c(message, seed: seed, reflect: reflect) + } + + /// Calculate CRC16 + /// + /// - parameter message: Message + /// - parameter seed: Seed value (Optional) + /// + /// - returns: Calculated code + static func crc16(_ message: Array, seed: UInt16? = nil) -> UInt16 { + return Checksum().crc16(message, seed: seed) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift new file mode 100644 index 000000000..6e2b63622 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift @@ -0,0 +1,47 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public enum CipherError: Error { + case encrypt + case decrypt +} + +public protocol Cipher: class { + var keySize: Int { get } + + /// Encrypt given bytes at once + /// + /// - parameter bytes: Plaintext data + /// - returns: Encrypted data + func encrypt(_ bytes: ArraySlice) throws -> Array + func encrypt(_ bytes: Array) throws -> Array + + /// Decrypt given bytes at once + /// + /// - parameter bytes: Ciphertext data + /// - returns: Plaintext data + func decrypt(_ bytes: ArraySlice) throws -> Array + func decrypt(_ bytes: Array) throws -> Array +} + +extension Cipher { + public func encrypt(_ bytes: Array) throws -> Array { + return try encrypt(bytes.slice) + } + + public func decrypt(_ bytes: Array) throws -> Array { + return try decrypt(bytes.slice) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift new file mode 100644 index 000000000..1b79faad0 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift @@ -0,0 +1,45 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// +extension Collection where Self.Element == UInt8, Self.Index == Int { + // Big endian order + func toUInt32Array() -> Array { + if isEmpty { + return [] + } + + var result = Array(reserveCapacity: 16) + for idx in stride(from: startIndex, to: endIndex, by: 4) { + let val = UInt32(bytes: self, fromIndex: idx).bigEndian + result.append(val) + } + + return result + } + + // Big endian order + func toUInt64Array() -> Array { + if isEmpty { + return [] + } + + var result = Array(reserveCapacity: 32) + for idx in stride(from: startIndex, to: endIndex, by: 8) { + let val = UInt64(bytes: self, fromIndex: idx).bigEndian + result.append(val) + } + + return result + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift new file mode 100644 index 000000000..74cf92a9c --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift @@ -0,0 +1,23 @@ +//// CryptoSwift +// +// Copyright (C) 2014-2018 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +#if swift(>=4.1) + // TODO: remove this file when Xcode 9.2 is no longer used +#else + extension Sequence { + public func compactMap(_ transform: (Element) throws -> ElementOfResult?) rethrows -> [ElementOfResult] { + return try flatMap(transform) + } + } +#endif diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift new file mode 100644 index 000000000..f79f4b359 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift @@ -0,0 +1,22 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +/// Cryptor (Encryptor or Decryptor) +public protocol Cryptor { + /// Seek to position in file, if block mode allows random access. + /// + /// - parameter to: new value of counter + mutating func seek(to: Int) throws +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift new file mode 100644 index 000000000..4baa53bde --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift @@ -0,0 +1,44 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +#if canImport(Darwin) +import Darwin +#else +import Glibc +#endif + +/// Worker cryptor/decryptor of `Updatable` types +public protocol Cryptors: class { + + /// Cryptor suitable for encryption + func makeEncryptor() throws -> Cryptor & Updatable + + /// Cryptor suitable for decryption + func makeDecryptor() throws -> Cryptor & Updatable + + /// Generate array of random bytes. Helper function. + static func randomIV(_ blockSize: Int) -> Array +} + +extension Cryptors { + public static func randomIV(_ blockSize: Int) -> Array { + var randomIV: Array = Array() + randomIV.reserveCapacity(blockSize) + for randomByte in RandomBytesSequence(size: blockSize) { + randomIV.append(randomByte) + } + return randomIV + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Digest.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Digest.swift new file mode 100644 index 000000000..a80f8a739 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Digest.swift @@ -0,0 +1,78 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +@available(*, deprecated: 0.6.0, renamed: "Digest") +public typealias Hash = Digest + +/// Hash functions to calculate Digest. +public struct Digest { + /// Calculate MD5 Digest + /// - parameter bytes: input message + /// - returns: Digest bytes + public static func md5(_ bytes: Array) -> Array { + return MD5().calculate(for: bytes) + } + + /// Calculate SHA1 Digest + /// - parameter bytes: input message + /// - returns: Digest bytes + public static func sha1(_ bytes: Array) -> Array { + return SHA1().calculate(for: bytes) + } + + /// Calculate SHA2-224 Digest + /// - parameter bytes: input message + /// - returns: Digest bytes + public static func sha224(_ bytes: Array) -> Array { + return sha2(bytes, variant: .sha224) + } + + /// Calculate SHA2-256 Digest + /// - parameter bytes: input message + /// - returns: Digest bytes + public static func sha256(_ bytes: Array) -> Array { + return sha2(bytes, variant: .sha256) + } + + /// Calculate SHA2-384 Digest + /// - parameter bytes: input message + /// - returns: Digest bytes + public static func sha384(_ bytes: Array) -> Array { + return sha2(bytes, variant: .sha384) + } + + /// Calculate SHA2-512 Digest + /// - parameter bytes: input message + /// - returns: Digest bytes + public static func sha512(_ bytes: Array) -> Array { + return sha2(bytes, variant: .sha512) + } + + /// Calculate SHA2 Digest + /// - parameter bytes: input message + /// - parameter variant: SHA-2 variant + /// - returns: Digest bytes + public static func sha2(_ bytes: Array, variant: SHA2.Variant) -> Array { + return SHA2(variant: variant).calculate(for: bytes) + } + + /// Calculate SHA3 Digest + /// - parameter bytes: input message + /// - parameter variant: SHA-3 variant + /// - returns: Digest bytes + public static func sha3(_ bytes: Array, variant: SHA3.Variant) -> Array { + return SHA3(variant: variant).calculate(for: bytes) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift new file mode 100644 index 000000000..48c40d680 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift @@ -0,0 +1,18 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +internal protocol DigestType { + func calculate(for bytes: Array) -> Array +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift new file mode 100644 index 000000000..ba797337f --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift @@ -0,0 +1,23 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +import Foundation + +extension AES { + /// Initialize with CBC block mode. + public convenience init(key: String, iv: String, padding: Padding = .pkcs7) throws { + try self.init(key: key.bytes, blockMode: CBC(iv: iv.bytes), padding: padding) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift new file mode 100644 index 000000000..46059d59b --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift @@ -0,0 +1,32 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +import Foundation + +public extension Array where Element == UInt8 { + public func toBase64() -> String? { + return Data(bytes: self).base64EncodedString() + } + + public init(base64: String) { + self.init() + + guard let decodedData = Data(base64Encoded: base64) else { + return + } + + append(contentsOf: decodedData.bytes) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift new file mode 100644 index 000000000..be065b92f --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift @@ -0,0 +1,23 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +import Foundation + +extension Blowfish { + /// Initialize with CBC block mode. + public convenience init(key: String, iv: String, padding: Padding = .pkcs7) throws { + try self.init(key: key.bytes, blockMode: CBC(iv: iv.bytes), padding: padding) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift new file mode 100644 index 000000000..c1f367683 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift @@ -0,0 +1,22 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +import Foundation + +extension ChaCha20 { + public convenience init(key: String, iv: String) throws { + try self.init(key: key.bytes, iv: iv.bytes) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift new file mode 100644 index 000000000..ed5a8bfe3 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift @@ -0,0 +1,95 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +import Foundation + +extension Data { + /// Two octet checksum as defined in RFC-4880. Sum of all octets, mod 65536 + public func checksum() -> UInt16 { + var s: UInt32 = 0 + var bytesArray = bytes + for i in 0 ..< bytesArray.count { + s = s + UInt32(bytesArray[i]) + } + s = s % 65536 + return UInt16(s) + } + + public func md5() -> Data { + return Data(bytes: Digest.md5(bytes)) + } + + public func sha1() -> Data { + return Data(bytes: Digest.sha1(bytes)) + } + + public func sha224() -> Data { + return Data(bytes: Digest.sha224(bytes)) + } + + public func sha256() -> Data { + return Data(bytes: Digest.sha256(bytes)) + } + + public func sha384() -> Data { + return Data(bytes: Digest.sha384(bytes)) + } + + public func sha512() -> Data { + return Data(bytes: Digest.sha512(bytes)) + } + + public func sha3(_ variant: SHA3.Variant) -> Data { + return Data(bytes: Digest.sha3(bytes, variant: variant)) + } + + public func crc32(seed: UInt32? = nil, reflect: Bool = true) -> Data { + return Data(bytes: Checksum.crc32(bytes, seed: seed, reflect: reflect).bytes()) + } + + public func crc32c(seed: UInt32? = nil, reflect: Bool = true) -> Data { + return Data(bytes: Checksum.crc32c(bytes, seed: seed, reflect: reflect).bytes()) + } + + public func crc16(seed: UInt16? = nil) -> Data { + return Data(bytes: Checksum.crc16(bytes, seed: seed).bytes()) + } + + public func encrypt(cipher: Cipher) throws -> Data { + return Data(bytes: try cipher.encrypt(bytes.slice)) + } + + public func decrypt(cipher: Cipher) throws -> Data { + return Data(bytes: try cipher.decrypt(bytes.slice)) + } + + public func authenticate(with authenticator: Authenticator) throws -> Data { + return Data(bytes: try authenticator.authenticate(bytes)) + } +} + +extension Data { + public init(hex: String) { + self.init(bytes: Array(hex: hex)) + } + + public var bytes: Array { + return Array(self) + } + + public func toHexString() -> String { + return bytes.toHexString() + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift new file mode 100644 index 000000000..fd4d77cda --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift @@ -0,0 +1,22 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +import Foundation + +extension HMAC { + public convenience init(key: String, variant: HMAC.Variant = .md5) throws { + self.init(key: key.bytes, variant: variant) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift new file mode 100644 index 000000000..2a497e660 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift @@ -0,0 +1,26 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +import Foundation + +extension Rabbit { + public convenience init(key: String) throws { + try self.init(key: key.bytes) + } + + public convenience init(key: String, iv: String) throws { + try self.init(key: key.bytes, iv: iv.bytes) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift new file mode 100644 index 000000000..5cd7e9dce --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift @@ -0,0 +1,41 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +import Foundation + +extension String { + /// Return Base64 back to String + public func decryptBase64ToString(cipher: Cipher) throws -> String { + guard let decodedData = Data(base64Encoded: self, options: []) else { + throw CipherError.decrypt + } + + let decrypted = try decodedData.decrypt(cipher: cipher) + + if let decryptedString = String(data: decrypted, encoding: String.Encoding.utf8) { + return decryptedString + } + + throw CipherError.decrypt + } + + public func decryptBase64(cipher: Cipher) throws -> Array { + guard let decodedData = Data(base64Encoded: self, options: []) else { + throw CipherError.decrypt + } + + return try decodedData.decrypt(cipher: cipher).bytes + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift new file mode 100644 index 000000000..f94536508 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift @@ -0,0 +1,27 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +import Foundation + +func perf(_ text: String, closure: () -> Void) { + let measurementStart = Date() + + closure() + + let measurementStop = Date() + let executionTime = measurementStop.timeIntervalSince(measurementStart) + + print("\(text) \(executionTime)") +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Generics.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Generics.swift new file mode 100644 index 000000000..51797ce43 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Generics.swift @@ -0,0 +1,55 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +/** build bit pattern from array of bits */ +@_specialize(exported: true, where T == UInt8) +func integerFrom(_ bits: Array) -> T { + var bitPattern: T = 0 + for idx in bits.indices { + if bits[idx] == Bit.one { + let bit = T(UInt64(1) << UInt64(idx)) + bitPattern = bitPattern | bit + } + } + return bitPattern +} + +/// Array of bytes. Caution: don't use directly because generic is slow. +/// +/// - parameter value: integer value +/// - parameter length: length of output array. By default size of value type +/// +/// - returns: Array of bytes +@_specialize(exported: true, where T == Int) +@_specialize(exported: true, where T == UInt) +@_specialize(exported: true, where T == UInt8) +@_specialize(exported: true, where T == UInt16) +@_specialize(exported: true, where T == UInt32) +@_specialize(exported: true, where T == UInt64) +func arrayOfBytes(value: T, length totalBytes: Int = MemoryLayout.size) -> Array { + let valuePointer = UnsafeMutablePointer.allocate(capacity: 1) + valuePointer.pointee = value + + let bytesPointer = UnsafeMutablePointer(OpaquePointer(valuePointer)) + var bytes = Array(repeating: 0, count: totalBytes) + for j in 0...size, totalBytes) { + bytes[totalBytes - 1 - j] = (bytesPointer + j).pointee + } + + valuePointer.deinitialize(count: 1) + valuePointer.deallocate() + + return bytes +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/HKDF.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/HKDF.swift new file mode 100644 index 000000000..daa8bbff8 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/HKDF.swift @@ -0,0 +1,84 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// https://www.ietf.org/rfc/rfc5869.txt +// + +#if canImport(Darwin) +import Darwin +#else +import Glibc +#endif + +/// A key derivation function. +/// +/// HKDF - HMAC-based Extract-and-Expand Key Derivation Function. +public struct HKDF { + public enum Error: Swift.Error { + case invalidInput + case derivedKeyTooLong + } + + private let numBlocks: Int // l + private let dkLen: Int + private let info: Array + fileprivate let prk: Array + fileprivate let variant: HMAC.Variant + + /// - parameters: + /// - variant: hash variant + /// - salt: optional salt (if not provided, it is set to a sequence of variant.digestLength zeros) + /// - info: optional context and application specific information + /// - keyLength: intended length of derived key + public init(password: Array, salt: Array? = nil, info: Array? = nil, keyLength: Int? = nil /* dkLen */, variant: HMAC.Variant = .sha256) throws { + guard !password.isEmpty else { + throw Error.invalidInput + } + + let dkLen = keyLength ?? variant.digestLength + let keyLengthFinal = Double(dkLen) + let hLen = Double(variant.digestLength) + let numBlocks = Int(ceil(keyLengthFinal / hLen)) // l = ceil(keyLength / hLen) + guard numBlocks <= 255 else { + throw Error.derivedKeyTooLong + } + + /// HKDF-Extract(salt, password) -> PRK + /// - PRK - a pseudo-random key; it is used by calculate() + prk = try HMAC(key: salt ?? [], variant: variant).authenticate(password) + self.info = info ?? [] + self.variant = variant + self.dkLen = dkLen + self.numBlocks = numBlocks + } + + public func calculate() throws -> Array { + let hmac = HMAC(key: prk, variant: variant) + var ret = Array() + ret.reserveCapacity(numBlocks * variant.digestLength) + var value = Array() + for i in 1...numBlocks { + value.append(contentsOf: info) + value.append(UInt8(i)) + + let bytes = try hmac.authenticate(value) + ret.append(contentsOf: bytes) + + /// update value to use it as input for next iteration + value = bytes + } + return Array(ret.prefix(dkLen)) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/HMAC.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/HMAC.swift new file mode 100644 index 000000000..16c3f1a7a --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/HMAC.swift @@ -0,0 +1,105 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public final class HMAC: Authenticator { + public enum Error: Swift.Error { + case authenticateError + case invalidInput + } + + public enum Variant { + case sha1, sha256, sha384, sha512, md5 + + var digestLength: Int { + switch self { + case .sha1: + return SHA1.digestLength + case .sha256: + return SHA2.Variant.sha256.digestLength + case .sha384: + return SHA2.Variant.sha384.digestLength + case .sha512: + return SHA2.Variant.sha512.digestLength + case .md5: + return MD5.digestLength + } + } + + func calculateHash(_ bytes: Array) -> Array? { + switch self { + case .sha1: + return Digest.sha1(bytes) + case .sha256: + return Digest.sha256(bytes) + case .sha384: + return Digest.sha384(bytes) + case .sha512: + return Digest.sha512(bytes) + case .md5: + return Digest.md5(bytes) + } + } + + func blockSize() -> Int { + switch self { + case .md5: + return MD5.blockSize + case .sha1, .sha256: + return 64 + case .sha384, .sha512: + return 128 + } + } + } + + var key: Array + let variant: Variant + + public init(key: Array, variant: HMAC.Variant = .md5) { + self.variant = variant + self.key = key + + if key.count > variant.blockSize() { + if let hash = variant.calculateHash(key) { + self.key = hash + } + } + + if key.count < variant.blockSize() { + self.key = ZeroPadding().add(to: key, blockSize: variant.blockSize()) + } + } + + // MARK: Authenticator + + public func authenticate(_ bytes: Array) throws -> Array { + var opad = Array(repeating: 0x5c, count: variant.blockSize()) + for idx in key.indices { + opad[idx] = key[idx] ^ opad[idx] + } + var ipad = Array(repeating: 0x36, count: variant.blockSize()) + for idx in key.indices { + ipad[idx] = key[idx] ^ ipad[idx] + } + + guard let ipadAndMessageHash = variant.calculateHash(ipad + bytes), + let result = variant.calculateHash(opad + ipadAndMessageHash) else { + throw Error.authenticateError + } + + // return Array(result[0..<10]) // 80 bits + return result + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift new file mode 100644 index 000000000..98b14762f --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift @@ -0,0 +1,38 @@ +// +// CryptoSwift +// +// Created by Marcin Krzyzanowski on 12/08/14. +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +#if canImport(Darwin) +import Darwin +#else +import Glibc +#endif + +/* array of bits */ +extension Int { + init(bits: [Bit]) { + self.init(bitPattern: integerFrom(bits) as UInt) + } +} + +extension FixedWidthInteger { + @_transparent + func bytes(totalBytes: Int = MemoryLayout.size) -> Array { + return arrayOfBytes(value: self.littleEndian, length: totalBytes) + // TODO: adjust bytes order + // var value = self.littleEndian + // return withUnsafeBytes(of: &value, Array.init).reversed() + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/MD5.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/MD5.swift new file mode 100644 index 000000000..7f44b4a28 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/MD5.swift @@ -0,0 +1,165 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public final class MD5: DigestType { + static let blockSize: Int = 64 + static let digestLength: Int = 16 // 128 / 8 + fileprivate static let hashInitialValue: Array = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476] + + fileprivate var accumulated = Array() + fileprivate var processedBytesTotalCount: Int = 0 + fileprivate var accumulatedHash: Array = MD5.hashInitialValue + + /** specifies the per-round shift amounts */ + private let s: Array = [ + 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 k: Array = [ + 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, + 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, + 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, + 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, + 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, + 0xd62f105d, 0x2441453, 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, + ] + + public init() { + } + + public func calculate(for bytes: Array) -> Array { + do { + return try update(withBytes: bytes.slice, isLast: true) + } catch { + fatalError() + } + } + + // mutating currentHash in place is way faster than returning new result + fileprivate func process(block chunk: ArraySlice, currentHash: inout Array) { + assert(chunk.count == 16 * 4) + + // Initialize hash value for this chunk: + var A: UInt32 = currentHash[0] + var B: UInt32 = currentHash[1] + var C: UInt32 = currentHash[2] + var D: UInt32 = currentHash[3] + + var dTemp: UInt32 = 0 + + // Main loop + for j in 0.., isLast: Bool = false) throws -> Array { + accumulated += bytes + + if isLast { + let lengthInBits = (processedBytesTotalCount + accumulated.count) * 8 + let lengthBytes = lengthInBits.bytes(totalBytes: 64 / 8) // A 64-bit representation of b + + // Step 1. Append padding + bitPadding(to: &accumulated, blockSize: MD5.blockSize, allowance: 64 / 8) + + // Step 2. Append Length a 64-bit representation of lengthInBits + accumulated += lengthBytes.reversed() + } + + var processedBytes = 0 + for chunk in accumulated.batched(by: MD5.blockSize) { + if isLast || (accumulated.count - processedBytes) >= MD5.blockSize { + process(block: chunk, currentHash: &accumulatedHash) + processedBytes += chunk.count + } + } + accumulated.removeFirst(processedBytes) + processedBytesTotalCount += processedBytes + + // output current hash + var result = Array() + result.reserveCapacity(MD5.digestLength) + + for hElement in accumulatedHash { + let hLE = hElement.littleEndian + result += Array(arrayLiteral: UInt8(hLE & 0xff), UInt8((hLE >> 8) & 0xff), UInt8((hLE >> 16) & 0xff), UInt8((hLE >> 24) & 0xff)) + } + + // reset hash value for instance + if isLast { + accumulatedHash = MD5.hashInitialValue + } + + return result + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift new file mode 100644 index 000000000..57670ad36 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift @@ -0,0 +1,27 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +struct NoPadding: PaddingProtocol { + init() { + } + + func add(to data: Array, blockSize _: Int) -> Array { + return data + } + + func remove(from data: Array, blockSize _: Int?) -> Array { + return data + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift new file mode 100644 index 000000000..a15fe3c95 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift @@ -0,0 +1,32 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +/* + Bit shifting with overflow protection using overflow operator "&". + Approach is consistent with standard overflow operators &+, &-, &*, &/ + and introduce new overflow operators for shifting: &<<, &>> + + Note: Works with unsigned integers values only + + Usage + + var i = 1 // init + var j = i &<< 2 //shift left + j &<<= 2 //shift left and assign + + @see: https://medium.com/@krzyzanowskim/swiftly-shift-bits-and-protect-yourself-be33016ce071 + + This fuctonality is now implemented as part of Swift 3, SE-0104 https://github.com/apple/swift-evolution/blob/master/proposals/0104-improved-integers.md + */ diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift new file mode 100644 index 000000000..15d6f0625 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift @@ -0,0 +1,89 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public extension PKCS5 { + /// A key derivation function. + /// + /// PBKDF1 is recommended only for compatibility with existing + /// applications since the keys it produces may not be large enough for + /// some applications. + public struct PBKDF1 { + public enum Error: Swift.Error { + case invalidInput + case derivedKeyTooLong + } + + public enum Variant { + case md5, sha1 + + var size: Int { + switch self { + case .md5: + return MD5.digestLength + case .sha1: + return SHA1.digestLength + } + } + + fileprivate func calculateHash(_ bytes: Array) -> Array? { + switch self { + case .sha1: + return Digest.sha1(bytes) + case .md5: + return Digest.md5(bytes) + } + } + } + + private let iterations: Int // c + private let variant: Variant + private let keyLength: Int + private let t1: Array + + /// - parameters: + /// - salt: salt, an eight-bytes + /// - variant: hash variant + /// - iterations: iteration count, a positive integer + /// - keyLength: intended length of derived key + public init(password: Array, salt: Array, variant: Variant = .sha1, iterations: Int = 4096 /* c */, keyLength: Int? = nil /* dkLen */ ) throws { + precondition(iterations > 0) + precondition(salt.count == 8) + + let keyLength = keyLength ?? variant.size + + if keyLength > variant.size { + throw Error.derivedKeyTooLong + } + + guard let t1 = variant.calculateHash(password + salt) else { + throw Error.invalidInput + } + + self.iterations = iterations + self.variant = variant + self.keyLength = keyLength + self.t1 = t1 + } + + /// Apply the underlying hash function Hash for c iterations + public func calculate() -> Array { + var t = t1 + for _ in 2...iterations { + t = variant.calculateHash(t)! + } + return Array(t[0.. +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// https://www.ietf.org/rfc/rfc2898.txt +// + +#if canImport(Darwin) +import Darwin +#else +import Glibc +#endif + +public extension PKCS5 { + /// A key derivation function. + /// + /// PBKDF2 - Password-Based Key Derivation Function 2. Key stretching technique. + /// DK = PBKDF2(PRF, Password, Salt, c, dkLen) + public struct PBKDF2 { + public enum Error: Swift.Error { + case invalidInput + case derivedKeyTooLong + } + + private let salt: Array // S + fileprivate let iterations: Int // c + private let numBlocks: Int // l + private let dkLen: Int + fileprivate let prf: HMAC + + /// - parameters: + /// - salt: salt + /// - variant: hash variant + /// - iterations: iteration count, a positive integer + /// - keyLength: intended length of derived key + /// - variant: MAC variant. Defaults to SHA256 + public init(password: Array, salt: Array, iterations: Int = 4096 /* c */, keyLength: Int? = nil /* dkLen */, variant: HMAC.Variant = .sha256) throws { + precondition(iterations > 0) + + let prf = HMAC(key: password, variant: variant) + + guard iterations > 0 && !salt.isEmpty else { + throw Error.invalidInput + } + + dkLen = keyLength ?? variant.digestLength + let keyLengthFinal = Double(dkLen) + let hLen = Double(prf.variant.digestLength) + if keyLengthFinal > (pow(2, 32) - 1) * hLen { + throw Error.derivedKeyTooLong + } + + self.salt = salt + self.iterations = iterations + self.prf = prf + + numBlocks = Int(ceil(Double(keyLengthFinal) / hLen)) // l = ceil(keyLength / hLen) + } + + public func calculate() throws -> Array { + var ret = Array() + ret.reserveCapacity(numBlocks * prf.variant.digestLength) + for i in 1...numBlocks { + // for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter + if let value = try calculateBlock(self.salt, blockNum: i) { + ret.append(contentsOf: value) + } + } + return Array(ret.prefix(dkLen)) + } + } +} + +fileprivate extension PKCS5.PBKDF2 { + func ARR(_ i: Int) -> Array { + var inti = Array(repeating: 0, count: 4) + inti[0] = UInt8((i >> 24) & 0xff) + inti[1] = UInt8((i >> 16) & 0xff) + inti[2] = UInt8((i >> 8) & 0xff) + inti[3] = UInt8(i & 0xff) + return inti + } + + // F (P, S, c, i) = U_1 \xor U_2 \xor ... \xor U_c + // U_1 = PRF (P, S || INT (i)) + func calculateBlock(_ salt: Array, blockNum: Int) throws -> Array? { + guard let u1 = try? prf.authenticate(salt + ARR(blockNum)) else { // blockNum.bytes() is slower + return nil + } + + var u = u1 + var ret = u + if iterations > 1 { + // U_2 = PRF (P, U_1) , + // U_c = PRF (P, U_{c-1}) . + for _ in 2...iterations { + u = try prf.authenticate(u) + for x in 0.. +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// PKCS is a group of public-key cryptography standards devised +// and published by RSA Security Inc, starting in the early 1990s. +// + +public enum PKCS5 { + typealias Padding = PKCS7Padding +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift new file mode 100644 index 000000000..9c0128494 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift @@ -0,0 +1,18 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public enum PKCS7 { + typealias Padding = PKCS7Padding +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift new file mode 100644 index 000000000..37cd165e4 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift @@ -0,0 +1,64 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// PKCS is a group of public-key cryptography standards devised +// and published by RSA Security Inc, starting in the early 1990s. +// + +struct PKCS7Padding: PaddingProtocol { + enum Error: Swift.Error { + case invalidPaddingValue + } + + init() { + } + + func add(to bytes: Array, blockSize: Int) -> Array { + let padding = UInt8(blockSize - (bytes.count % blockSize)) + var withPadding = bytes + if padding == 0 { + // If the original data is a multiple of N bytes, then an extra block of bytes with value N is added. + for _ in 0..(arrayLiteral: UInt8(blockSize)) + } + } else { + // The value of each added byte is the number of bytes that are added + for _ in 0..(arrayLiteral: UInt8(padding)) + } + } + return withPadding + } + + func remove(from bytes: Array, blockSize _: Int?) -> Array { + guard !bytes.isEmpty, let lastByte = bytes.last else { + return bytes + } + + assert(!bytes.isEmpty, "Need bytes to remove padding") + + let padding = Int(lastByte) // last byte + let finalLength = bytes.count - padding + + if finalLength < 0 { + return bytes + } + + if padding >= 1 { + return Array(bytes[0.. +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public protocol PaddingProtocol { + func add(to: Array, blockSize: Int) -> Array + func remove(from: Array, blockSize: Int?) -> Array +} + +public enum Padding: PaddingProtocol { + case noPadding, zeroPadding, pkcs7, pkcs5 + + public func add(to: Array, blockSize: Int) -> Array { + switch self { + case .noPadding: + return to // NoPadding().add(to: to, blockSize: blockSize) + case .zeroPadding: + return ZeroPadding().add(to: to, blockSize: blockSize) + case .pkcs7: + return PKCS7.Padding().add(to: to, blockSize: blockSize) + case .pkcs5: + return PKCS5.Padding().add(to: to, blockSize: blockSize) + } + } + + public func remove(from: Array, blockSize: Int?) -> Array { + switch self { + case .noPadding: + return from //NoPadding().remove(from: from, blockSize: blockSize) + case .zeroPadding: + return ZeroPadding().remove(from: from, blockSize: blockSize) + case .pkcs7: + return PKCS7.Padding().remove(from: from, blockSize: blockSize) + case .pkcs5: + return PKCS5.Padding().remove(from: from, blockSize: blockSize) + } + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Poly1305.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Poly1305.swift new file mode 100644 index 000000000..c97f94044 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Poly1305.swift @@ -0,0 +1,165 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-04#section-4 +// nacl/crypto_onetimeauth/poly1305/ref/auth.c +// +/// Poly1305 takes a 32-byte, one-time key and a message and produces a 16-byte tag that authenticates the +/// message such that an attacker has a negligible chance of producing a valid tag for an inauthentic message. + +public final class Poly1305: Authenticator { + public enum Error: Swift.Error { + case authenticateError + } + + public static let blockSize: Int = 16 + + private let key: SecureBytes + + /// - parameter key: 32-byte key + public init(key: Array) { + self.key = SecureBytes(bytes: key) + } + + private func squeeze(h: inout Array) { + assert(h.count == 17) + var u: UInt32 = 0 + for j in 0..<16 { + u = u &+ h[j] + h[j] = u & 255 + u = u >> 8 + } + + u = u &+ h[16] + h[16] = u & 3 + u = 5 * (u >> 2) + + for j in 0..<16 { + u = u &+ h[j] + h[j] = u & 255 + u = u >> 8 + } + + u = u &+ h[16] + h[16] = u + } + + private func add(h: inout Array, c: Array) { + assert(h.count == 17 && c.count == 17) + + var u: UInt32 = 0 + for j in 0..<17 { + u = u &+ (h[j] &+ c[j]) + h[j] = u & 255 + u = u >> 8 + } + } + + private func mulmod(h: inout Array, r: Array) { + var hr = Array(repeating: 0, count: 17) + var u: UInt32 = 0 + for i in 0..<17 { + u = 0 + for j in 0...i { + u = u &+ (h[j] * r[i &- j]) + } + for j in (i + 1)..<17 { + u = u &+ (320 * h[j] * r[i &+ 17 &- j]) + } + hr[i] = u + } + h = hr + squeeze(h: &h) + } + + private func freeze(h: inout Array) { + let horig = h + add(h: &h, c: [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252]) + let negative = UInt32(bitPattern: -Int32(h[16] >> 7)) + for j in 0..<17 { + h[j] ^= negative & (horig[j] ^ h[j]) + } + } + + /// the key is partitioned into two parts, called "r" and "s" + fileprivate func onetimeauth(message input: Array, key k: Array) -> Array { + // clamp + var r = Array(repeating: 0, count: 17) + var h = Array(repeating: 0, count: 17) + var c = Array(repeating: 0, count: 17) + + r[0] = UInt32(k[0]) + r[1] = UInt32(k[1]) + r[2] = UInt32(k[2]) + r[3] = UInt32(k[3] & 15) + r[4] = UInt32(k[4] & 252) + r[5] = UInt32(k[5]) + r[6] = UInt32(k[6]) + r[7] = UInt32(k[7] & 15) + r[8] = UInt32(k[8] & 252) + r[9] = UInt32(k[9]) + r[10] = UInt32(k[10]) + r[11] = UInt32(k[11] & 15) + r[12] = UInt32(k[12] & 252) + r[13] = UInt32(k[13]) + r[14] = UInt32(k[14]) + r[15] = UInt32(k[15] & 15) + r[16] = 0 + + var inlen = input.count + var inpos = 0 + while inlen > 0 { + for j in 0..) throws -> Array { + return onetimeauth(message: bytes, key: Array(key)) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Rabbit.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Rabbit.swift new file mode 100644 index 000000000..974ae90ce --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Rabbit.swift @@ -0,0 +1,217 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public final class Rabbit: BlockCipher { + public enum Error: Swift.Error { + case invalidKeyOrInitializationVector + } + + /// Size of IV in bytes + public static let ivSize = 64 / 8 + + /// Size of key in bytes + public static let keySize = 128 / 8 + + /// Size of block in bytes + public static let blockSize = 128 / 8 + + public var keySize: Int { + return key.count + } + + /// Key + private let key: Key + + /// IV (optional) + private let iv: Array? + + /// State variables + private var x = Array(repeating: 0, count: 8) + + /// Counter variables + private var c = Array(repeating: 0, count: 8) + + /// Counter carry + private var p7: UInt32 = 0 + + /// 'a' constants + private var a: Array = [ + 0x4d34d34d, + 0xd34d34d3, + 0x34d34d34, + 0x4d34d34d, + 0xd34d34d3, + 0x34d34d34, + 0x4d34d34d, + 0xd34d34d3, + ] + + // MARK: - Initializers + + public convenience init(key: Array) throws { + try self.init(key: key, iv: nil) + } + + public init(key: Array, iv: Array?) throws { + self.key = Key(bytes: key) + self.iv = iv + + guard key.count == Rabbit.keySize && (iv == nil || iv!.count == Rabbit.ivSize) else { + throw Error.invalidKeyOrInitializationVector + } + } + + // MARK: - + + fileprivate func setup() { + p7 = 0 + + // Key divided into 8 subkeys + var k = Array(repeating: 0, count: 8) + for j in 0..<8 { + k[j] = UInt32(key[Rabbit.blockSize - (2 * j + 1)]) | (UInt32(key[Rabbit.blockSize - (2 * j + 2)]) << 8) + } + + // Initialize state and counter variables from subkeys + for j in 0..<8 { + if j % 2 == 0 { + x[j] = (k[(j + 1) % 8] << 16) | k[j] + c[j] = (k[(j + 4) % 8] << 16) | k[(j + 5) % 8] + } else { + x[j] = (k[(j + 5) % 8] << 16) | k[(j + 4) % 8] + c[j] = (k[j] << 16) | k[(j + 1) % 8] + } + } + + // Iterate system four times + nextState() + nextState() + nextState() + nextState() + + // Reinitialize counter variables + for j in 0..<8 { + c[j] = c[j] ^ x[(j + 4) % 8] + } + + if let iv = iv { + setupIV(iv) + } + } + + private func setupIV(_ iv: Array) { + // 63...56 55...48 47...40 39...32 31...24 23...16 15...8 7...0 IV bits + // 0 1 2 3 4 5 6 7 IV bytes in array + let iv0 = UInt32(bytes: [iv[4], iv[5], iv[6], iv[7]]) + let iv1 = UInt32(bytes: [iv[0], iv[1], iv[4], iv[5]]) + let iv2 = UInt32(bytes: [iv[0], iv[1], iv[2], iv[3]]) + let iv3 = UInt32(bytes: [iv[2], iv[3], iv[6], iv[7]]) + + // Modify the counter state as function of the IV + c[0] = c[0] ^ iv0 + c[1] = c[1] ^ iv1 + c[2] = c[2] ^ iv2 + c[3] = c[3] ^ iv3 + c[4] = c[4] ^ iv0 + c[5] = c[5] ^ iv1 + c[6] = c[6] ^ iv2 + c[7] = c[7] ^ iv3 + + // Iterate system four times + nextState() + nextState() + nextState() + nextState() + } + + private func nextState() { + // Before an iteration the counters are incremented + var carry = p7 + for j in 0..<8 { + let prev = c[j] + c[j] = prev &+ a[j] &+ carry + carry = prev > c[j] ? 1 : 0 // detect overflow + } + p7 = carry // save last carry bit + + // Iteration of the system + var newX = Array(repeating: 0, count: 8) + newX[0] = g(0) &+ rotateLeft(g(7), by: 16) &+ rotateLeft(g(6), by: 16) + newX[1] = g(1) &+ rotateLeft(g(0), by: 8) &+ g(7) + newX[2] = g(2) &+ rotateLeft(g(1), by: 16) &+ rotateLeft(g(0), by: 16) + newX[3] = g(3) &+ rotateLeft(g(2), by: 8) &+ g(1) + newX[4] = g(4) &+ rotateLeft(g(3), by: 16) &+ rotateLeft(g(2), by: 16) + newX[5] = g(5) &+ rotateLeft(g(4), by: 8) &+ g(3) + newX[6] = g(6) &+ rotateLeft(g(5), by: 16) &+ rotateLeft(g(4), by: 16) + newX[7] = g(7) &+ rotateLeft(g(6), by: 8) &+ g(5) + x = newX + } + + private func g(_ j: Int) -> UInt32 { + let sum = x[j] &+ c[j] + let square = UInt64(sum) * UInt64(sum) + return UInt32(truncatingIfNeeded: square ^ (square >> 32)) + } + + fileprivate func nextOutput() -> Array { + nextState() + + var output16 = Array(repeating: 0, count: Rabbit.blockSize / 2) + output16[7] = UInt16(truncatingIfNeeded: x[0]) ^ UInt16(truncatingIfNeeded: x[5] >> 16) + output16[6] = UInt16(truncatingIfNeeded: x[0] >> 16) ^ UInt16(truncatingIfNeeded: x[3]) + output16[5] = UInt16(truncatingIfNeeded: x[2]) ^ UInt16(truncatingIfNeeded: x[7] >> 16) + output16[4] = UInt16(truncatingIfNeeded: x[2] >> 16) ^ UInt16(truncatingIfNeeded: x[5]) + output16[3] = UInt16(truncatingIfNeeded: x[4]) ^ UInt16(truncatingIfNeeded: x[1] >> 16) + output16[2] = UInt16(truncatingIfNeeded: x[4] >> 16) ^ UInt16(truncatingIfNeeded: x[7]) + output16[1] = UInt16(truncatingIfNeeded: x[6]) ^ UInt16(truncatingIfNeeded: x[3] >> 16) + output16[0] = UInt16(truncatingIfNeeded: x[6] >> 16) ^ UInt16(truncatingIfNeeded: x[1]) + + var output8 = Array(repeating: 0, count: Rabbit.blockSize) + for j in 0..> 8) + output8[j * 2 + 1] = UInt8(truncatingIfNeeded: output16[j]) + } + return output8 + } +} + +// MARK: Cipher + +extension Rabbit: Cipher { + public func encrypt(_ bytes: ArraySlice) throws -> Array { + setup() + + var result = Array(repeating: 0, count: bytes.count) + var output = nextOutput() + var byteIdx = 0 + var outputIdx = 0 + while byteIdx < bytes.count { + if outputIdx == Rabbit.blockSize { + output = nextOutput() + outputIdx = 0 + } + + result[byteIdx] = bytes[byteIdx] ^ output[outputIdx] + + byteIdx += 1 + outputIdx += 1 + } + return result + } + + public func decrypt(_ bytes: ArraySlice) throws -> Array { + return try encrypt(bytes) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/RandomBytesSequence.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/RandomBytesSequence.swift new file mode 100644 index 000000000..be7bdcb74 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/RandomBytesSequence.swift @@ -0,0 +1,50 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +#if canImport(Darwin) + import Darwin +#else + import Glibc +#endif + +struct RandomBytesSequence: Sequence { + let size: Int + + func makeIterator() -> AnyIterator { + var count = 0 + return AnyIterator.init { () -> UInt8? in + guard count < self.size else { + return nil + } + count = count + 1 + + #if os(Linux) || os(Android) || os(FreeBSD) + let fd = open("/dev/urandom", O_RDONLY) + if fd <= 0 { + return nil + } + + var value: UInt8 = 0 + let result = read(fd, &value, MemoryLayout.size) + precondition(result == 1) + + close(fd) + return value + #else + return UInt8(arc4random_uniform(UInt32(UInt8.max) + 1)) + #endif + } + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SHA1.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SHA1.swift new file mode 100644 index 000000000..61f6bce3f --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SHA1.swift @@ -0,0 +1,151 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public final class SHA1: DigestType { + static let digestLength: Int = 20 // 160 / 8 + static let blockSize: Int = 64 + fileprivate static let hashInitialValue: ContiguousArray = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0] + + fileprivate var accumulated = Array() + fileprivate var processedBytesTotalCount: Int = 0 + fileprivate var accumulatedHash: ContiguousArray = SHA1.hashInitialValue + + public init() { + } + + public func calculate(for bytes: Array) -> Array { + do { + return try update(withBytes: bytes.slice, isLast: true) + } catch { + return [] + } + } + + fileprivate func process(block chunk: ArraySlice, currentHash hh: inout ContiguousArray) { + // break chunk into sixteen 32-bit words M[j], 0 ≤ j ≤ 15, big-endian + // Extend the sixteen 32-bit words into eighty 32-bit words: + let M = UnsafeMutablePointer.allocate(capacity: 80) + M.initialize(repeating: 0, count: 80) + defer { + M.deinitialize(count: 80) + M.deallocate() + } + + for x in 0..<80 { + switch x { + case 0...15: + let start = chunk.startIndex.advanced(by: x * 4) // * MemoryLayout.size + M[x] = UInt32(bytes: chunk, fromIndex: start) + break + default: + M[x] = rotateLeft(M[x - 3] ^ M[x - 8] ^ M[x - 14] ^ M[x - 16], by: 1) + break + } + } + + var A = hh[0] + var B = hh[1] + var C = hh[2] + var D = hh[3] + var E = hh[4] + + // Main loop + for j in 0...79 { + var f: UInt32 = 0 + var k: UInt32 = 0 + + switch j { + case 0...19: + f = (B & C) | ((~B) & D) + k = 0x5a827999 + break + case 20...39: + f = B ^ C ^ D + k = 0x6ed9eba1 + break + case 40...59: + f = (B & C) | (B & D) | (C & D) + k = 0x8f1bbcdc + break + case 60...79: + f = B ^ C ^ D + k = 0xca62c1d6 + break + default: + break + } + + let temp = rotateLeft(A, by: 5) &+ f &+ E &+ M[j] &+ k + E = D + D = C + C = rotateLeft(B, by: 30) + B = A + A = temp + } + + hh[0] = hh[0] &+ A + hh[1] = hh[1] &+ B + hh[2] = hh[2] &+ C + hh[3] = hh[3] &+ D + hh[4] = hh[4] &+ E + } +} + +extension SHA1: Updatable { + @discardableResult + public func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { + accumulated += bytes + + if isLast { + let lengthInBits = (processedBytesTotalCount + accumulated.count) * 8 + let lengthBytes = lengthInBits.bytes(totalBytes: 64 / 8) // A 64-bit representation of b + + // Step 1. Append padding + bitPadding(to: &accumulated, blockSize: SHA1.blockSize, allowance: 64 / 8) + + // Step 2. Append Length a 64-bit representation of lengthInBits + accumulated += lengthBytes + } + + var processedBytes = 0 + for chunk in accumulated.batched(by: SHA1.blockSize) { + if isLast || (accumulated.count - processedBytes) >= SHA1.blockSize { + process(block: chunk, currentHash: &accumulatedHash) + processedBytes += chunk.count + } + } + accumulated.removeFirst(processedBytes) + processedBytesTotalCount += processedBytes + + // output current hash + var result = Array(repeating: 0, count: SHA1.digestLength) + var pos = 0 + for idx in 0..> 24) & 0xff) + result[pos + 1] = UInt8((h >> 16) & 0xff) + result[pos + 2] = UInt8((h >> 8) & 0xff) + result[pos + 3] = UInt8(h & 0xff) + pos += 4 + } + + // reset hash value for instance + if isLast { + accumulatedHash = SHA1.hashInitialValue + } + + return result + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SHA2.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SHA2.swift new file mode 100644 index 000000000..2e9940d39 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SHA2.swift @@ -0,0 +1,353 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// TODO: generic for process32/64 (UInt32/UInt64) +// + +public final class SHA2: DigestType { + let variant: Variant + let size: Int + let blockSize: Int + let digestLength: Int + private let k: Array + + fileprivate var accumulated = Array() + fileprivate var processedBytesTotalCount: Int = 0 + fileprivate var accumulatedHash32 = Array() + fileprivate var accumulatedHash64 = Array() + + public enum Variant: RawRepresentable { + case sha224, sha256, sha384, sha512 + + public var digestLength: Int { + return rawValue / 8 + } + + public var blockSize: Int { + switch self { + case .sha224, .sha256: + return 64 + case .sha384, .sha512: + return 128 + } + } + + public typealias RawValue = Int + public var rawValue: RawValue { + switch self { + case .sha224: + return 224 + case .sha256: + return 256 + case .sha384: + return 384 + case .sha512: + return 512 + } + } + + public init?(rawValue: RawValue) { + switch rawValue { + case 224: + self = .sha224 + break + case 256: + self = .sha256 + break + case 384: + self = .sha384 + break + case 512: + self = .sha512 + break + default: + return nil + } + } + + fileprivate var h: Array { + switch self { + case .sha224: + return [0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4] + case .sha256: + return [0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19] + case .sha384: + return [0xcbbb9d5dc1059ed8, 0x629a292a367cd507, 0x9159015a3070dd17, 0x152fecd8f70e5939, 0x67332667ffc00b31, 0x8eb44a8768581511, 0xdb0c2e0d64f98fa7, 0x47b5481dbefa4fa4] + case .sha512: + return [0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1, 0x510e527fade682d1, 0x9b05688c2b3e6c1f, 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179] + } + } + + fileprivate var finalLength: Int { + switch self { + case .sha224: + return 7 + case .sha384: + return 6 + default: + return Int.max + } + } + } + + public init(variant: SHA2.Variant) { + self.variant = variant + switch self.variant { + case .sha224, .sha256: + accumulatedHash32 = variant.h.map { UInt32($0) } // FIXME: UInt64 for process64 + blockSize = variant.blockSize + size = variant.rawValue + digestLength = variant.digestLength + k = [ + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2, + ] + case .sha384, .sha512: + accumulatedHash64 = variant.h + blockSize = variant.blockSize + size = variant.rawValue + digestLength = variant.digestLength + k = [ + 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc, 0x3956c25bf348b538, + 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118, 0xd807aa98a3030242, 0x12835b0145706fbe, + 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2, 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, + 0xc19bf174cf692694, 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65, + 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5, 0x983e5152ee66dfab, + 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4, 0xc6e00bf33da88fc2, 0xd5a79147930aa725, + 0x06ca6351e003826f, 0x142929670a0e6e70, 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, + 0x53380d139d95b3df, 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b, + 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30, 0xd192e819d6ef5218, + 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8, 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, + 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8, 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, + 0x682e6ff3d6b2b8a3, 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec, + 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b, 0xca273eceea26619c, + 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178, 0x06f067aa72176fba, 0x0a637dc5a2c898a6, + 0x113f9804bef90dae, 0x1b710b35131c471b, 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, + 0x431d67c49c100d4c, 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817, + ] + } + } + + public func calculate(for bytes: Array) -> Array { + do { + return try update(withBytes: bytes.slice, isLast: true) + } catch { + return [] + } + } + + fileprivate func process64(block chunk: ArraySlice, currentHash hh: inout Array) { + // break chunk into sixteen 64-bit words M[j], 0 ≤ j ≤ 15, big-endian + // Extend the sixteen 64-bit words into eighty 64-bit words: + let M = UnsafeMutablePointer.allocate(capacity: k.count) + M.initialize(repeating: 0, count: k.count) + defer { + M.deinitialize(count: self.k.count) + M.deallocate() + } + for x in 0...size + M[x] = UInt64(bytes: chunk, fromIndex: start) + break + default: + let s0 = rotateRight(M[x - 15], by: 1) ^ rotateRight(M[x - 15], by: 8) ^ (M[x - 15] >> 7) + let s1 = rotateRight(M[x - 2], by: 19) ^ rotateRight(M[x - 2], by: 61) ^ (M[x - 2] >> 6) + M[x] = M[x - 16] &+ s0 &+ M[x - 7] &+ s1 + break + } + } + + var A = hh[0] + var B = hh[1] + var C = hh[2] + var D = hh[3] + var E = hh[4] + var F = hh[5] + var G = hh[6] + var H = hh[7] + + // Main loop + for j in 0.., currentHash hh: inout Array) { + // break chunk into sixteen 32-bit words M[j], 0 ≤ j ≤ 15, big-endian + // Extend the sixteen 32-bit words into sixty-four 32-bit words: + let M = UnsafeMutablePointer.allocate(capacity: k.count) + M.initialize(repeating: 0, count: k.count) + defer { + M.deinitialize(count: self.k.count) + M.deallocate() + } + + for x in 0...size + M[x] = UInt32(bytes: chunk, fromIndex: start) + break + default: + let s0 = rotateRight(M[x - 15], by: 7) ^ rotateRight(M[x - 15], by: 18) ^ (M[x - 15] >> 3) + let s1 = rotateRight(M[x - 2], by: 17) ^ rotateRight(M[x - 2], by: 19) ^ (M[x - 2] >> 10) + M[x] = M[x - 16] &+ s0 &+ M[x - 7] &+ s1 + break + } + } + + var A = hh[0] + var B = hh[1] + var C = hh[2] + var D = hh[3] + var E = hh[4] + var F = hh[5] + var G = hh[6] + var H = hh[7] + + // Main loop + for j in 0.., isLast: Bool = false) throws -> Array { + accumulated += bytes + + if isLast { + let lengthInBits = (processedBytesTotalCount + accumulated.count) * 8 + let lengthBytes = lengthInBits.bytes(totalBytes: blockSize / 8) // A 64-bit/128-bit representation of b. blockSize fit by accident. + + // Step 1. Append padding + bitPadding(to: &accumulated, blockSize: blockSize, allowance: blockSize / 8) + + // Step 2. Append Length a 64-bit representation of lengthInBits + accumulated += lengthBytes + } + + var processedBytes = 0 + for chunk in accumulated.batched(by: blockSize) { + if isLast || (accumulated.count - processedBytes) >= blockSize { + switch variant { + case .sha224, .sha256: + process32(block: chunk, currentHash: &accumulatedHash32) + case .sha384, .sha512: + process64(block: chunk, currentHash: &accumulatedHash64) + } + processedBytes += chunk.count + } + } + accumulated.removeFirst(processedBytes) + processedBytesTotalCount += processedBytes + + // output current hash + var result = Array(repeating: 0, count: variant.digestLength) + switch variant { + case .sha224, .sha256: + var pos = 0 + for idx in 0..> 24) & 0xff) + result[pos + 1] = UInt8((h >> 16) & 0xff) + result[pos + 2] = UInt8((h >> 8) & 0xff) + result[pos + 3] = UInt8(h & 0xff) + pos += 4 + } + case .sha384, .sha512: + var pos = 0 + for idx in 0..> 56) & 0xff) + result[pos + 1] = UInt8((h >> 48) & 0xff) + result[pos + 2] = UInt8((h >> 40) & 0xff) + result[pos + 3] = UInt8((h >> 32) & 0xff) + result[pos + 4] = UInt8((h >> 24) & 0xff) + result[pos + 5] = UInt8((h >> 16) & 0xff) + result[pos + 6] = UInt8((h >> 8) & 0xff) + result[pos + 7] = UInt8(h & 0xff) + pos += 8 + } + } + + // reset hash value for instance + if isLast { + switch variant { + case .sha224, .sha256: + accumulatedHash32 = variant.h.lazy.map { UInt32($0) } // FIXME: UInt64 for process64 + case .sha384, .sha512: + accumulatedHash64 = variant.h + } + } + + return result + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SHA3.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SHA3.swift new file mode 100644 index 000000000..b22fb5a19 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/SHA3.swift @@ -0,0 +1,289 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf +// http://keccak.noekeon.org/specs_summary.html +// + +#if canImport(Darwin) +import Darwin +#else +import Glibc +#endif + +public final class SHA3: DigestType { + let round_constants: Array = [ + 0x0000000000000001, 0x0000000000008082, 0x800000000000808a, 0x8000000080008000, + 0x000000000000808b, 0x0000000080000001, 0x8000000080008081, 0x8000000000008009, + 0x000000000000008a, 0x0000000000000088, 0x0000000080008009, 0x000000008000000a, + 0x000000008000808b, 0x800000000000008b, 0x8000000000008089, 0x8000000000008003, + 0x8000000000008002, 0x8000000000000080, 0x000000000000800a, 0x800000008000000a, + 0x8000000080008081, 0x8000000000008080, 0x0000000080000001, 0x8000000080008008, + ] + + public let blockSize: Int + public let digestLength: Int + public let markByte: UInt8 + + fileprivate var accumulated = Array() + fileprivate var accumulatedHash: Array + + public enum Variant { + case sha224, sha256, sha384, sha512, keccak224, keccak256, keccak384, keccak512 + + var digestLength: Int { + return 100 - (blockSize / 2) + } + + var blockSize: Int { + return (1600 - outputLength * 2) / 8 + } + + var markByte: UInt8 { + switch self { + case .sha224, .sha256, .sha384, .sha512: + return 0x06 // 0x1F for SHAKE + case .keccak224, .keccak256, .keccak384, .keccak512: + return 0x01 + } + } + + public var outputLength: Int { + switch self { + case .sha224, .keccak224: + return 224 + case .sha256, .keccak256: + return 256 + case .sha384, .keccak384: + return 384 + case .sha512, .keccak512: + return 512 + } + } + } + + public init(variant: SHA3.Variant) { + blockSize = variant.blockSize + digestLength = variant.digestLength + markByte = variant.markByte + accumulatedHash = Array(repeating: 0, count: digestLength) + } + + public func calculate(for bytes: Array) -> Array { + do { + return try update(withBytes: bytes.slice, isLast: true) + } catch { + return [] + } + } + + /// 1. For all pairs (x,z) such that 0≤x<5 and 0≤z) { + let c = UnsafeMutablePointer.allocate(capacity: 5) + c.initialize(repeating: 0, count: 5) + defer { + c.deinitialize(count: 5) + c.deallocate() + } + let d = UnsafeMutablePointer.allocate(capacity: 5) + d.initialize(repeating: 0, count: 5) + defer { + d.deinitialize(count: 5) + d.deallocate() + } + + for i in 0..<5 { + c[i] = a[i] ^ a[i &+ 5] ^ a[i &+ 10] ^ a[i &+ 15] ^ a[i &+ 20] + } + + d[0] = rotateLeft(c[1], by: 1) ^ c[4] + d[1] = rotateLeft(c[2], by: 1) ^ c[0] + d[2] = rotateLeft(c[3], by: 1) ^ c[1] + d[3] = rotateLeft(c[4], by: 1) ^ c[2] + d[4] = rotateLeft(c[0], by: 1) ^ c[3] + + for i in 0..<5 { + a[i] ^= d[i] + a[i &+ 5] ^= d[i] + a[i &+ 10] ^= d[i] + a[i &+ 15] ^= d[i] + a[i &+ 20] ^= d[i] + } + } + + /// A′[x, y, z]=A[(x &+ 3y) mod 5, x, z] + private func π(_ a: inout Array) { + let a1 = a[1] + a[1] = a[6] + a[6] = a[9] + a[9] = a[22] + a[22] = a[14] + a[14] = a[20] + a[20] = a[2] + a[2] = a[12] + a[12] = a[13] + a[13] = a[19] + a[19] = a[23] + a[23] = a[15] + a[15] = a[4] + a[4] = a[24] + a[24] = a[21] + a[21] = a[8] + a[8] = a[16] + a[16] = a[5] + a[5] = a[3] + a[3] = a[18] + a[18] = a[17] + a[17] = a[11] + a[11] = a[7] + a[7] = a[10] + a[10] = a1 + } + + /// For all triples (x, y, z) such that 0≤x<5, 0≤y<5, and 0≤z) { + for i in stride(from: 0, to: 25, by: 5) { + let a0 = a[0 &+ i] + let a1 = a[1 &+ i] + a[0 &+ i] ^= ~a1 & a[2 &+ i] + a[1 &+ i] ^= ~a[2 &+ i] & a[3 &+ i] + a[2 &+ i] ^= ~a[3 &+ i] & a[4 &+ i] + a[3 &+ i] ^= ~a[4 &+ i] & a0 + a[4 &+ i] ^= ~a0 & a1 + } + } + + private func ι(_ a: inout Array, round: Int) { + a[0] ^= round_constants[round] + } + + fileprivate func process(block chunk: ArraySlice, currentHash hh: inout Array) { + // expand + hh[0] ^= chunk[0].littleEndian + hh[1] ^= chunk[1].littleEndian + hh[2] ^= chunk[2].littleEndian + hh[3] ^= chunk[3].littleEndian + hh[4] ^= chunk[4].littleEndian + hh[5] ^= chunk[5].littleEndian + hh[6] ^= chunk[6].littleEndian + hh[7] ^= chunk[7].littleEndian + hh[8] ^= chunk[8].littleEndian + if blockSize > 72 { // 72 / 8, sha-512 + hh[9] ^= chunk[9].littleEndian + hh[10] ^= chunk[10].littleEndian + hh[11] ^= chunk[11].littleEndian + hh[12] ^= chunk[12].littleEndian + if blockSize > 104 { // 104 / 8, sha-384 + hh[13] ^= chunk[13].littleEndian + hh[14] ^= chunk[14].littleEndian + hh[15] ^= chunk[15].littleEndian + hh[16] ^= chunk[16].littleEndian + if blockSize > 136 { // 136 / 8, sha-256 + hh[17] ^= chunk[17].littleEndian + // FULL_SHA3_FAMILY_SUPPORT + if blockSize > 144 { // 144 / 8, sha-224 + hh[18] ^= chunk[18].littleEndian + hh[19] ^= chunk[19].littleEndian + hh[20] ^= chunk[20].littleEndian + hh[21] ^= chunk[21].littleEndian + hh[22] ^= chunk[22].littleEndian + hh[23] ^= chunk[23].littleEndian + hh[24] ^= chunk[24].littleEndian + } + } + } + } + + // Keccak-f + for round in 0..<24 { + θ(&hh) + + hh[1] = rotateLeft(hh[1], by: 1) + hh[2] = rotateLeft(hh[2], by: 62) + hh[3] = rotateLeft(hh[3], by: 28) + hh[4] = rotateLeft(hh[4], by: 27) + hh[5] = rotateLeft(hh[5], by: 36) + hh[6] = rotateLeft(hh[6], by: 44) + hh[7] = rotateLeft(hh[7], by: 6) + hh[8] = rotateLeft(hh[8], by: 55) + hh[9] = rotateLeft(hh[9], by: 20) + hh[10] = rotateLeft(hh[10], by: 3) + hh[11] = rotateLeft(hh[11], by: 10) + hh[12] = rotateLeft(hh[12], by: 43) + hh[13] = rotateLeft(hh[13], by: 25) + hh[14] = rotateLeft(hh[14], by: 39) + hh[15] = rotateLeft(hh[15], by: 41) + hh[16] = rotateLeft(hh[16], by: 45) + hh[17] = rotateLeft(hh[17], by: 15) + hh[18] = rotateLeft(hh[18], by: 21) + hh[19] = rotateLeft(hh[19], by: 8) + hh[20] = rotateLeft(hh[20], by: 18) + hh[21] = rotateLeft(hh[21], by: 2) + hh[22] = rotateLeft(hh[22], by: 61) + hh[23] = rotateLeft(hh[23], by: 56) + hh[24] = rotateLeft(hh[24], by: 14) + + π(&hh) + χ(&hh) + ι(&hh, round: round) + } + } +} + +extension SHA3: Updatable { + public func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { + accumulated += bytes + + if isLast { + // Add padding + let markByteIndex = accumulated.count + + // We need to always pad the input. Even if the input is a multiple of blockSize. + let r = blockSize * 8 + let q = (r / 8) - (accumulated.count % (r / 8)) + accumulated += Array(repeating: 0, count: q) + + accumulated[markByteIndex] |= markByte + accumulated[self.accumulated.count - 1] |= 0x80 + } + + var processedBytes = 0 + for chunk in accumulated.batched(by: blockSize) { + if isLast || (accumulated.count - processedBytes) >= blockSize { + process(block: chunk.toUInt64Array().slice, currentHash: &accumulatedHash) + processedBytes += chunk.count + } + } + accumulated.removeFirst(processedBytes) + + // TODO: verify performance, reduce vs for..in + let result = accumulatedHash.reduce(Array()) { (result, value) -> Array in + return result + value.bigEndian.bytes() + } + + // reset hash value for instance + if isLast { + accumulatedHash = Array(repeating: 0, count: digestLength) + } + + return Array(result[0.. +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +#if canImport(Darwin) +import Darwin +#else +import Glibc +#endif + +typealias Key = SecureBytes + +/// Keeps bytes in memory. Because this is class, bytes are not copied +/// and memory area is locked as long as referenced, then unlocked on deinit +final class SecureBytes { + fileprivate let bytes: Array + let count: Int + + init(bytes: Array) { + self.bytes = bytes + count = bytes.count + self.bytes.withUnsafeBufferPointer { (pointer) -> Void in + mlock(pointer.baseAddress, pointer.count) + } + } + + deinit { + self.bytes.withUnsafeBufferPointer { (pointer) -> Void in + munlock(pointer.baseAddress, pointer.count) + } + } +} + +extension SecureBytes: Collection { + typealias Index = Int + + var endIndex: Int { + return bytes.endIndex + } + + var startIndex: Int { + return bytes.startIndex + } + + subscript(position: Index) -> UInt8 { + return bytes[position] + } + + subscript(bounds: Range) -> ArraySlice { + return bytes[bounds] + } + + func formIndex(after i: inout Int) { + bytes.formIndex(after: &i) + } + + func index(after i: Int) -> Int { + return bytes.index(after: i) + } +} + +extension SecureBytes: ExpressibleByArrayLiteral { + public convenience init(arrayLiteral elements: UInt8...) { + self.init(bytes: elements) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift new file mode 100644 index 000000000..81ab2705e --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift @@ -0,0 +1,78 @@ +// CryptoSwift +// +// Copyright (C) 2014-2018 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +final class StreamDecryptor: Cryptor, Updatable { + private let blockSize: Int + private var worker: CipherModeWorker + private let padding: Padding + private var accumulated = Array() + + private var lastBlockRemainder = 0 + + init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { + self.blockSize = blockSize + self.padding = padding + self.worker = worker + } + + // MARK: Updatable + public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { + accumulated += bytes + + let toProcess = accumulated.prefix(max(accumulated.count - worker.additionalBufferSize, 0)) + + if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { + // will truncate suffix if needed + try finalizingWorker.willDecryptLast(bytes: accumulated.slice) + } + + var processedBytesCount = 0 + var plaintext = Array(reserveCapacity: bytes.count + worker.additionalBufferSize) + for chunk in toProcess.batched(by: blockSize) { + plaintext += worker.decrypt(block: chunk) + processedBytesCount += chunk.count + } + + if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { + plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice)) + } + + // omit unecessary calculation if not needed + if padding != .noPadding { + lastBlockRemainder = plaintext.count.quotientAndRemainder(dividingBy: blockSize).remainder + } + + if isLast { + // CTR doesn't need padding. Really. Add padding to the last block if really want. but... don't. + plaintext = padding.remove(from: plaintext, blockSize: blockSize - lastBlockRemainder) + } + + accumulated.removeFirst(processedBytesCount) // super-slow + + if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { + plaintext = Array(try finalizingWorker.finalize(decrypt: plaintext.slice)) + } + + return plaintext + } + + public func seek(to position: Int) throws { + guard var worker = self.worker as? SeekableModeWorker else { + fatalError("Not supported") + } + + try worker.seek(to: position) + self.worker = worker + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift new file mode 100644 index 000000000..7cd54e3fb --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift @@ -0,0 +1,56 @@ +// CryptoSwift +// +// Copyright (C) 2014-2018 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +final class StreamEncryptor: Cryptor, Updatable { + private let blockSize: Int + private var worker: CipherModeWorker + private let padding: Padding + + private var lastBlockRemainder = 0 + + init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { + self.blockSize = blockSize + self.padding = padding + self.worker = worker + } + + // MARK: Updatable + public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { + var accumulated = Array(bytes) + if isLast { + // CTR doesn't need padding. Really. Add padding to the last block if really want. but... don't. + accumulated = padding.add(to: accumulated, blockSize: blockSize - lastBlockRemainder) + } + + var encrypted = Array(reserveCapacity: bytes.count) + for chunk in accumulated.batched(by: blockSize) { + encrypted += worker.encrypt(block: chunk) + } + + // omit unecessary calculation if not needed + if padding != .noPadding { + lastBlockRemainder = encrypted.count.quotientAndRemainder(dividingBy: blockSize).remainder + } + + if var finalizingWorker = worker as? FinalizingEncryptModeWorker, isLast == true { + encrypted = Array(try finalizingWorker.finalize(encrypt: encrypted.slice)) + } + + return encrypted + } + + func seek(to: Int) throws { + fatalError("Not supported") + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/String+Extension.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/String+Extension.swift new file mode 100644 index 000000000..b186e3414 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/String+Extension.swift @@ -0,0 +1,81 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +/** String extension */ +extension String { + public var bytes: Array { + return data(using: String.Encoding.utf8, allowLossyConversion: true)?.bytes ?? Array(utf8) + } + + public func md5() -> String { + return bytes.md5().toHexString() + } + + public func sha1() -> String { + return bytes.sha1().toHexString() + } + + public func sha224() -> String { + return bytes.sha224().toHexString() + } + + public func sha256() -> String { + return bytes.sha256().toHexString() + } + + public func sha384() -> String { + return bytes.sha384().toHexString() + } + + public func sha512() -> String { + return bytes.sha512().toHexString() + } + + public func sha3(_ variant: SHA3.Variant) -> String { + return bytes.sha3(variant).toHexString() + } + + public func crc32(seed: UInt32? = nil, reflect: Bool = true) -> String { + return bytes.crc32(seed: seed, reflect: reflect).bytes().toHexString() + } + + public func crc32c(seed: UInt32? = nil, reflect: Bool = true) -> String { + return bytes.crc32(seed: seed, reflect: reflect).bytes().toHexString() + } + + public func crc16(seed: UInt16? = nil) -> String { + return bytes.crc16(seed: seed).bytes().toHexString() + } + + /// - parameter cipher: Instance of `Cipher` + /// - returns: hex string of bytes + public func encrypt(cipher: Cipher) throws -> String { + return try bytes.encrypt(cipher: cipher).toHexString() + } + + /// - parameter cipher: Instance of `Cipher` + /// - returns: base64 encoded string of encrypted bytes + public func encryptToBase64(cipher: Cipher) throws -> String? { + return try bytes.encrypt(cipher: cipher).toBase64() + } + + // decrypt() does not make sense for String + + /// - parameter authenticator: Instance of `Authenticator` + /// - returns: hex string of string + public func authenticate(with authenticator: A) throws -> String { + return try bytes.authenticate(with: authenticator).toHexString() + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift new file mode 100644 index 000000000..201579027 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift @@ -0,0 +1,90 @@ +// +// UInt128.swift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +import Foundation + +struct UInt128: Equatable, ExpressibleByIntegerLiteral { + let i: (a: UInt64, b: UInt64) + + typealias IntegerLiteralType = UInt64 + + init(integerLiteral value: IntegerLiteralType) { + self = UInt128(value) + } + + init(_ raw: Array) { + self = raw.prefix(MemoryLayout.stride).withUnsafeBytes({ (rawBufferPointer) -> UInt128 in + let arr = rawBufferPointer.bindMemory(to: UInt64.self) + return UInt128((arr[0].bigEndian, arr[1].bigEndian)) + }) + } + + init(_ raw: ArraySlice) { + self.init(Array(raw)) + } + + init(_ i: (a: UInt64, b: UInt64)) { + self.i = i + } + + init(a: UInt64, b: UInt64) { + self.init((a, b)) + } + + init(_ b: UInt64) { + self.init((0, b)) + } + + // Bytes + var bytes: Array { + var at = i.a.bigEndian + var bt = i.b.bigEndian + + let ar = Data(bytes: &at, count: MemoryLayout.size(ofValue: at)) + let br = Data(bytes: &bt, count: MemoryLayout.size(ofValue: bt)) + + var result = Data() + result.append(ar) + result.append(br) + return result.bytes + } + + static func ^(n1: UInt128, n2: UInt128) -> UInt128 { + return UInt128((n1.i.a ^ n2.i.a, n1.i.b ^ n2.i.b)) + } + + static func &(n1: UInt128, n2: UInt128) -> UInt128 { + return UInt128((n1.i.a & n2.i.a, n1.i.b & n2.i.b)) + } + + static func >>(value: UInt128, by: Int) -> UInt128 { + var result = value + for _ in 0..> 1 + let b = result.i.b >> 1 + ((result.i.a & 1) << 63) + result = UInt128((a, b)) + } + return result + } + + // Equatable. + static func ==(lhs: UInt128, rhs: UInt128) -> Bool { + return lhs.i == rhs.i + } + + static func !=(lhs: UInt128, rhs: UInt128) -> Bool { + return !(lhs == rhs) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift new file mode 100644 index 000000000..65f628989 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift @@ -0,0 +1,37 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +/** array of bytes */ +extension UInt16 { + @_specialize(exported: true, where T == ArraySlice) + init(bytes: T) where T.Element == UInt8, T.Index == Int { + self = UInt16(bytes: bytes, fromIndex: bytes.startIndex) + } + + @_specialize(exported: true, where T == ArraySlice) + init(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int { + if bytes.isEmpty { + self = 0 + return + } + + let count = bytes.count + + let val0 = count > 0 ? UInt16(bytes[index.advanced(by: 0)]) << 8 : 0 + let val1 = count > 1 ? UInt16(bytes[index.advanced(by: 1)]) : 0 + + self = val0 | val1 + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift new file mode 100644 index 000000000..0901148eb --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift @@ -0,0 +1,48 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +#if canImport(Darwin) +import Darwin +#else +import Glibc +#endif + +protocol _UInt32Type {} +extension UInt32: _UInt32Type {} + +/** array of bytes */ +extension UInt32 { + @_specialize(exported: true, where T == ArraySlice) + init(bytes: T) where T.Element == UInt8, T.Index == Int { + self = UInt32(bytes: bytes, fromIndex: bytes.startIndex) + } + + @_specialize(exported: true, where T == ArraySlice) + init(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int { + if bytes.isEmpty { + self = 0 + return + } + + let count = bytes.count + + let val0 = count > 0 ? UInt32(bytes[index.advanced(by: 0)]) << 24 : 0 + let val1 = count > 1 ? UInt32(bytes[index.advanced(by: 1)]) << 16 : 0 + let val2 = count > 2 ? UInt32(bytes[index.advanced(by: 2)]) << 8 : 0 + let val3 = count > 3 ? UInt32(bytes[index.advanced(by: 3)]) : 0 + + self = val0 | val1 | val2 | val3 + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift new file mode 100644 index 000000000..6c8d2c6ed --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift @@ -0,0 +1,43 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +/** array of bytes */ +extension UInt64 { + @_specialize(exported: true, where T == ArraySlice) + init(bytes: T) where T.Element == UInt8, T.Index == Int { + self = UInt64(bytes: bytes, fromIndex: bytes.startIndex) + } + + @_specialize(exported: true, where T == ArraySlice) + init(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int { + if bytes.isEmpty { + self = 0 + return + } + + let count = bytes.count + + let val0 = count > 0 ? UInt64(bytes[index.advanced(by: 0)]) << 56 : 0 + let val1 = count > 0 ? UInt64(bytes[index.advanced(by: 1)]) << 48 : 0 + let val2 = count > 0 ? UInt64(bytes[index.advanced(by: 2)]) << 40 : 0 + let val3 = count > 0 ? UInt64(bytes[index.advanced(by: 3)]) << 32 : 0 + let val4 = count > 0 ? UInt64(bytes[index.advanced(by: 4)]) << 24 : 0 + let val5 = count > 0 ? UInt64(bytes[index.advanced(by: 5)]) << 16 : 0 + let val6 = count > 0 ? UInt64(bytes[index.advanced(by: 6)]) << 8 : 0 + let val7 = count > 0 ? UInt64(bytes[index.advanced(by: 7)]) : 0 + + self = val0 | val1 | val2 | val3 | val4 | val5 | val6 | val7 + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift new file mode 100644 index 000000000..481d57fdb --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift @@ -0,0 +1,76 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +#if canImport(Darwin) +import Darwin +#else +import Glibc +#endif + +public protocol _UInt8Type {} +extension UInt8: _UInt8Type {} + +/** casting */ +extension UInt8 { + /** cast because UInt8() because std initializer crash if value is > byte */ + static func with(value: UInt64) -> UInt8 { + let tmp = value & 0xff + return UInt8(tmp) + } + + static func with(value: UInt32) -> UInt8 { + let tmp = value & 0xff + return UInt8(tmp) + } + + static func with(value: UInt16) -> UInt8 { + let tmp = value & 0xff + return UInt8(tmp) + } +} + +/** Bits */ +extension UInt8 { + init(bits: [Bit]) { + self.init(integerFrom(bits) as UInt8) + } + + /** array of bits */ + public func bits() -> [Bit] { + let totalBitsCount = MemoryLayout.size * 8 + + var bitsArray = [Bit](repeating: Bit.zero, count: totalBitsCount) + + for j in 0.. String { + var s = String() + let arr: [Bit] = bits() + for idx in arr.indices { + s += (arr[idx] == Bit.one ? "1" : "0") + if idx.advanced(by: 1) % 8 == 0 { s += " " } + } + return s + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Updatable.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Updatable.swift new file mode 100644 index 000000000..23f165450 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Updatable.swift @@ -0,0 +1,98 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +/// A type that supports incremental updates. For example Digest or Cipher may be updatable +/// and calculate result incerementally. +public protocol Updatable { + /// Update given bytes in chunks. + /// + /// - parameter bytes: Bytes to process. + /// - parameter isLast: Indicate if given chunk is the last one. No more updates after this call. + /// - returns: Processed partial result data or empty array. + mutating func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array + + /// Update given bytes in chunks. + /// + /// - Parameters: + /// - bytes: Bytes to process. + /// - isLast: Indicate if given chunk is the last one. No more updates after this call. + /// - output: Resulting bytes callback. + /// - Returns: Processed partial result data or empty array. + mutating func update(withBytes bytes: ArraySlice, isLast: Bool, output: (_ bytes: Array) -> Void) throws +} + +extension Updatable { + public mutating func update(withBytes bytes: ArraySlice, isLast: Bool = false, output: (_ bytes: Array) -> Void) throws { + let processed = try update(withBytes: bytes, isLast: isLast) + if !processed.isEmpty { + output(processed) + } + } + + public mutating func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { + return try update(withBytes: bytes, isLast: isLast) + } + + public mutating func update(withBytes bytes: Array, isLast: Bool = false) throws -> Array { + return try update(withBytes: bytes.slice, isLast: isLast) + } + + public mutating func update(withBytes bytes: Array, isLast: Bool = false, output: (_ bytes: Array) -> Void) throws { + return try update(withBytes: bytes.slice, isLast: isLast, output: output) + } + + /// Finish updates. This may apply padding. + /// - parameter bytes: Bytes to process + /// - returns: Processed data. + public mutating func finish(withBytes bytes: ArraySlice) throws -> Array { + return try update(withBytes: bytes, isLast: true) + } + + public mutating func finish(withBytes bytes: Array) throws -> Array { + return try finish(withBytes: bytes.slice) + } + + + /// Finish updates. May add padding. + /// + /// - Returns: Processed data + /// - Throws: Error + public mutating func finish() throws -> Array { + return try update(withBytes: [], isLast: true) + } + + /// Finish updates. This may apply padding. + /// - parameter bytes: Bytes to process + /// - parameter output: Resulting data + /// - returns: Processed data. + public mutating func finish(withBytes bytes: ArraySlice, output: (_ bytes: Array) -> Void) throws { + let processed = try update(withBytes: bytes, isLast: true) + if !processed.isEmpty { + output(processed) + } + } + + public mutating func finish(withBytes bytes: Array, output: (_ bytes: Array) -> Void) throws { + return try finish(withBytes: bytes.slice, output: output) + } + + /// Finish updates. May add padding. + /// + /// - Parameter output: Processed data + /// - Throws: Error + public mutating func finish(output: (Array) -> Void) throws { + try finish(withBytes: [], output: output) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Utils.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Utils.swift new file mode 100644 index 000000000..17b368af0 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/Utils.swift @@ -0,0 +1,115 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +@_transparent +func rotateLeft(_ value: UInt8, by: UInt8) -> UInt8 { + return ((value << by) & 0xff) | (value >> (8 - by)) +} + +@_transparent +func rotateLeft(_ value: UInt16, by: UInt16) -> UInt16 { + return ((value << by) & 0xffff) | (value >> (16 - by)) +} + +@_transparent +func rotateLeft(_ value: UInt32, by: UInt32) -> UInt32 { + return ((value << by) & 0xffffffff) | (value >> (32 - by)) +} + +@_transparent +func rotateLeft(_ value: UInt64, by: UInt64) -> UInt64 { + return (value << by) | (value >> (64 - by)) +} + +@_transparent +func rotateRight(_ value: UInt16, by: UInt16) -> UInt16 { + return (value >> by) | (value << (16 - by)) +} + +@_transparent +func rotateRight(_ value: UInt32, by: UInt32) -> UInt32 { + return (value >> by) | (value << (32 - by)) +} + +@_transparent +func rotateRight(_ value: UInt64, by: UInt64) -> UInt64 { + return ((value >> by) | (value << (64 - by))) +} + +@_transparent +func reversed(_ uint8: UInt8) -> UInt8 { + var v = uint8 + v = (v & 0xf0) >> 4 | (v & 0x0f) << 4 + v = (v & 0xcc) >> 2 | (v & 0x33) << 2 + v = (v & 0xaa) >> 1 | (v & 0x55) << 1 + return v +} + +@_transparent +func reversed(_ uint32: UInt32) -> UInt32 { + var v = uint32 + v = ((v >> 1) & 0x55555555) | ((v & 0x55555555) << 1) + v = ((v >> 2) & 0x33333333) | ((v & 0x33333333) << 2) + v = ((v >> 4) & 0x0f0f0f0f) | ((v & 0x0f0f0f0f) << 4) + v = ((v >> 8) & 0x00ff00ff) | ((v & 0x00ff00ff) << 8) + v = ((v >> 16) & 0xffff) | ((v & 0xffff) << 16) + return v +} + +func xor(_ left: T, _ right: V) -> ArraySlice where T: RandomAccessCollection, V: RandomAccessCollection, T.Element == UInt8, T.Index == Int, V.Element == UInt8, V.Index == Int { + return xor(left, right).slice +} + +func xor(_ left: T, _ right: V) -> Array where T: RandomAccessCollection, V: RandomAccessCollection, T.Element == UInt8, T.Index == Int, V.Element == UInt8, V.Index == Int { + let length = Swift.min(left.count, right.count) + + let buf = UnsafeMutablePointer.allocate(capacity: length) + buf.initialize(repeating: 0, count: length) + defer { + buf.deinitialize(count: length) + buf.deallocate() + } + + // xor + for i in 0.., blockSize: Int, allowance: Int = 0) { + let msgLength = data.count + // Step 1. Append Padding Bits + // append one bit (UInt8 with one bit) to message + data.append(0x80) + + // Step 2. append "0" bit until message length in bits ≡ 448 (mod 512) + let max = blockSize - allowance // 448, 986 + if msgLength % blockSize < max { // 448 + data += Array(repeating: 0, count: max - 1 - (msgLength % blockSize)) + } else { + data += Array(repeating: 0, count: blockSize + max - 1 - (msgLength % blockSize)) + } +} diff --git a/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift new file mode 100644 index 000000000..7d1d8276c --- /dev/null +++ b/Example/web3swiftBrowser/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift @@ -0,0 +1,38 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +/// All the bytes that are required to be padded are padded with zero. +/// Zero padding may not be reversible if the original file ends with one or more zero bytes. +struct ZeroPadding: PaddingProtocol { + init() { + } + + func add(to bytes: Array, blockSize: Int) -> Array { + let paddingCount = blockSize - (bytes.count % blockSize) + if paddingCount > 0 { + return bytes + Array(repeating: 0, count: paddingCount) + } + return bytes + } + + func remove(from bytes: Array, blockSize _: Int?) -> Array { + for (idx, value) in bytes.reversed().enumerated() { + if value != 0 { + return Array(bytes[0.. [AnyObject]? { - let params = types.compactMap { (el) -> ABIv2.Element.ParameterType in +extension ABIDecoder { + public static func decode(types: [ABI.Element.InOut], data: Data) -> [AnyObject]? { + let params = types.compactMap { (el) -> ABI.Element.ParameterType in return el.type } return decode(types: params, data: data) } - public static func decode(types: [ABIv2.Element.ParameterType], data: Data) -> [AnyObject]? { + public static func decode(types: [ABI.Element.ParameterType], data: Data) -> [AnyObject]? { // print("Full data: \n" + data.toHexString()) var toReturn = [AnyObject]() var consumed: UInt64 = 0 @@ -35,7 +33,7 @@ extension ABIv2Decoder { return toReturn } - public static func decodeSignleType(type: ABIv2.Element.ParameterType, data: Data, pointer: UInt64 = 0) -> (value: AnyObject?, bytesConsumed: UInt64?) { + public static func decodeSignleType(type: ABI.Element.ParameterType, data: Data, pointer: UInt64 = 0) -> (value: AnyObject?, bytesConsumed: UInt64?) { let (elData, nextPtr) = followTheData(type: type, data: data, pointer: pointer) guard let elementItself = elData, let nextElementPointer = nextPtr else { return (nil, nil) @@ -183,7 +181,7 @@ extension ABIv2Decoder { return (nil, nil) } - fileprivate static func followTheData(type: ABIv2.Element.ParameterType, data: Data, pointer: UInt64 = 0) -> (elementEncoding: Data?, nextElementPointer: UInt64?) { + fileprivate static func followTheData(type: ABI.Element.ParameterType, data: Data, pointer: UInt64 = 0) -> (elementEncoding: Data?, nextElementPointer: UInt64?) { // print("Follow the data: \n" + data.toHexString()) // print("At pointer: \n" + String(pointer)) if type.isStatic { @@ -219,14 +217,14 @@ extension ABIv2Decoder { } } - public static func decodeLog(event: ABIv2.Element.Event, eventLog: EventLog) -> [String:Any]? { - if event.topic != eventLog.topics[0] && !event.anonymous { + public static func decodeLog(event: ABI.Element.Event, eventLogTopics: [Data], eventLogData: Data) -> [String:Any]? { + if event.topic != eventLogTopics[0] && !event.anonymous { return nil } var eventContent = [String: Any]() eventContent["name"]=event.name - let logs = eventLog.topics - let dataForProcessing = eventLog.data + let logs = eventLogTopics + let dataForProcessing = eventLogData let indexedInputs = event.inputs.filter { (inp) -> Bool in return inp.indexed } @@ -236,7 +234,7 @@ extension ABIv2Decoder { let nonIndexedInputs = event.inputs.filter { (inp) -> Bool in return !inp.indexed } - let nonIndexedTypes = nonIndexedInputs.compactMap { (inp) -> ABIv2.Element.ParameterType in + let nonIndexedTypes = nonIndexedInputs.compactMap { (inp) -> ABI.Element.ParameterType in return inp.type } guard logs.count == indexedInputs.count + 1 else {return nil} @@ -245,16 +243,16 @@ extension ABIv2Decoder { let data = logs[i+1] let input = indexedInputs[i] if !input.type.isStatic || input.type.isArray || input.type.memoryUsage != 32 { - let (v, _) = ABIv2Decoder.decodeSignleType(type: .bytes(length: 32), data: data) + let (v, _) = ABIDecoder.decodeSignleType(type: .bytes(length: 32), data: data) guard let valueUnwrapped = v else {return nil} indexedValues.append(valueUnwrapped) } else { - let (v, _) = ABIv2Decoder.decodeSignleType(type: input.type, data: data) + let (v, _) = ABIDecoder.decodeSignleType(type: input.type, data: data) guard let valueUnwrapped = v else {return nil} indexedValues.append(valueUnwrapped) } } - let v = ABIv2Decoder.decode(types: nonIndexedTypes, data: dataForProcessing) + let v = ABIDecoder.decode(types: nonIndexedTypes, data: dataForProcessing) guard let nonIndexedValues = v else {return nil} var indexedInputCounter = 0 var nonIndexedInputCounter = 0 diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Elements.swift b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIElements.swift similarity index 54% rename from Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Elements.swift rename to Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIElements.swift index ec6e455b3..523f68741 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Elements.swift +++ b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIElements.swift @@ -1,38 +1,35 @@ // -// ABIElements.swift -// web3swift -// -// Created by Alexander Vlasov on 06.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt -public extension ABIv2 { +public extension ABI { // JSON Decoding public struct Input: Decodable { - var name: String? - var type: String - var indexed: Bool? - var components: [Input]? + public var name: String? + public var type: String + public var indexed: Bool? + public var components: [Input]? } public struct Output: Decodable { - var name: String? - var type: String - var components: [Output]? + public var name: String? + public var type: String + public var components: [Output]? } public struct Record: Decodable { - var name: String? - var type: String? - var payable: Bool? - var constant: Bool? - var stateMutability: String? - var inputs: [ABIv2.Input]? - var outputs: [ABIv2.Output]? - var anonymous: Bool? + public var name: String? + public var type: String? + public var payable: Bool? + public var constant: Bool? + public var stateMutability: String? + public var inputs: [ABI.Input]? + public var outputs: [ABI.Output]? + public var anonymous: Bool? } public enum Element { @@ -47,50 +44,113 @@ public extension ABIv2 { case fallback(Fallback) case event(Event) + public enum StateMutability { + case payable + case mutating + case view + case pure + + var isConstant: Bool { + switch self { + case .payable: + return false + case .mutating: + return false + default: + return true + } + } + + var isPayable: Bool { + switch self { + case .payable: + return true + default: + return false + } + } + } + public struct InOut { public let name: String public let type: ParameterType + + public init(name: String, type: ParameterType) { + self.name = name + self.type = type + } } public struct Function { public let name: String? public let inputs: [InOut] public let outputs: [InOut] + public let stateMutability: StateMutability? = nil public let constant: Bool public let payable: Bool + + public init(name: String?, inputs: [InOut], outputs: [InOut], constant: Bool, payable: Bool) { + self.name = name + self.inputs = inputs + self.outputs = outputs + self.constant = constant + self.payable = payable + } } public struct Constructor { - let inputs: [InOut] - let constant: Bool - let payable: Bool + public let inputs: [InOut] + public let constant: Bool + public let payable: Bool + public init(inputs: [InOut], constant: Bool, payable: Bool) { + self.inputs = inputs + self.constant = constant + self.payable = payable + } } public struct Fallback { - let constant: Bool - let payable: Bool + public let constant: Bool + public let payable: Bool + + public init(constant: Bool, payable: Bool) { + self.constant = constant + self.payable = payable + } } public struct Event { - let name: String - let inputs: [Input] - let anonymous: Bool + public let name: String + public let inputs: [Input] + public let anonymous: Bool - struct Input { - let name: String - let type: ParameterType - let indexed: Bool + public init(name: String, inputs: [Input], anonymous: Bool) { + self.name = name + self.inputs = inputs + self.anonymous = anonymous + } + + public struct Input { + public let name: String + public let type: ParameterType + public let indexed: Bool + + public init(name: String, type: ParameterType, indexed: Bool) { + self.name = name + self.type = type + self.indexed = indexed + } } } } } -extension ABIv2.Element { - func encodeParameters(_ parameters: [AnyObject]) -> Data? { +extension ABI.Element { + public func encodeParameters(_ parameters: [AnyObject]) -> Data? { switch self { case .constructor(let constructor): guard parameters.count == constructor.inputs.count else {return nil} - guard let data = ABIv2Encoder.encode(types: constructor.inputs, values: parameters) else {return nil} + guard let data = ABIEncoder.encode(types: constructor.inputs, values: parameters) else {return nil} return data case .event(_): return nil @@ -99,14 +159,14 @@ extension ABIv2.Element { case .function(let function): guard parameters.count == function.inputs.count else {return nil} let signature = function.methodEncoding - guard let data = ABIv2Encoder.encode(types: function.inputs, values: parameters) else {return nil} + guard let data = ABIEncoder.encode(types: function.inputs, values: parameters) else {return nil} return signature + data } } } -extension ABIv2.Element { - func decodeReturnData(_ data: Data) -> [String:Any]? { +extension ABI.Element { + public func decodeReturnData(_ data: Data) -> [String:Any]? { switch self { case .constructor(_): return nil @@ -129,7 +189,7 @@ extension ABIv2.Element { guard function.outputs.count*32 <= data.count else {return nil} var returnArray = [String:Any]() var i = 0; - guard let values = ABIv2Decoder.decode(types: function.outputs, data: data) else {return nil} + guard let values = ABIDecoder.decode(types: function.outputs, data: data) else {return nil} for output in function.outputs { let name = "\(i)" returnArray[name] = values[i] @@ -142,7 +202,7 @@ extension ABIv2.Element { } } - func decodeInputData(_ rawData: Data) -> [String: Any]? { + public func decodeInputData(_ rawData: Data) -> [String: Any]? { var data = rawData var sig: Data? = nil switch rawData.count % 32 { @@ -170,7 +230,7 @@ extension ABIv2.Element { guard function.inputs.count*32 <= data.count else {return nil} var returnArray = [String:Any]() var i = 0; - guard let values = ABIv2Decoder.decode(types: function.inputs, data: data) else {return nil} + guard let values = ABIDecoder.decode(types: function.inputs, data: data) else {return nil} for input in function.inputs { let name = "\(i)" returnArray[name] = values[i] @@ -202,7 +262,7 @@ extension ABIv2.Element { guard function.inputs.count*32 <= data.count else {return nil} var returnArray = [String:Any]() var i = 0; - guard let values = ABIv2Decoder.decode(types: function.inputs, data: data) else {return nil} + guard let values = ABIDecoder.decode(types: function.inputs, data: data) else {return nil} for input in function.inputs { let name = "\(i)" returnArray[name] = values[i] @@ -216,9 +276,9 @@ extension ABIv2.Element { } } -extension ABIv2.Element.Event { - func decodeReturnedLogs(_ eventLog: EventLog) -> [String:Any]? { - guard let eventContent = ABIv2Decoder.decodeLog(event: self, eventLog: eventLog) else {return nil} +extension ABI.Element.Event { + public func decodeReturnedLogs(eventLogTopics: [Data], eventLogData: Data) -> [String:Any]? { + guard let eventContent = ABIDecoder.decodeLog(event: self, eventLogTopics: eventLogTopics, eventLogData: eventLogData) else {return nil} return eventContent } } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Encoding.swift b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift similarity index 96% rename from Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Encoding.swift rename to Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift index c24b8c5a2..e163dc0a2 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Encoding.swift +++ b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift @@ -1,19 +1,17 @@ // -// ABIv2Encoding.swift -// web3swift -// -// Created by Alexander Vlasov on 03.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt +import EthereumAddress -public struct ABIv2Encoder { +public struct ABIEncoder { } -extension ABIv2Encoder { +extension ABIEncoder { public static func convertToBigUInt(_ value: AnyObject) -> BigUInt? { switch value { case let v as BigUInt: @@ -136,15 +134,15 @@ extension ABIv2Encoder { } - public static func encode(types: [ABIv2.Element.InOut], values: [AnyObject]) -> Data? { + public static func encode(types: [ABI.Element.InOut], values: [AnyObject]) -> Data? { guard types.count == values.count else {return nil} - let params = types.compactMap { (el) -> ABIv2.Element.ParameterType in + let params = types.compactMap { (el) -> ABI.Element.ParameterType in return el.type } return encode(types: params, values: values) } - public static func encode(types: [ABIv2.Element.ParameterType], values: [AnyObject]) -> Data? { + public static func encode(types: [ABI.Element.ParameterType], values: [AnyObject]) -> Data? { guard types.count == values.count else {return nil} var tails = [Data]() var heads = [Data]() @@ -182,7 +180,7 @@ extension ABIv2Encoder { return headsConcatenated + tailsConcatenated } - public static func encodeSingleType(type: ABIv2.Element.ParameterType, value: AnyObject) -> Data? { + public static func encodeSingleType(type: ABI.Element.ParameterType, value: AnyObject) -> Data? { switch type { case .uint(_): if let biguint = convertToBigUInt(value) { diff --git a/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIExtensions.swift b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIExtensions.swift new file mode 100644 index 000000000..f006e44e9 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIExtensions.swift @@ -0,0 +1,271 @@ +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt + +extension Data { + func setLengthLeft(_ toBytes: UInt64, isNegative:Bool = false ) -> Data? { + let existingLength = UInt64(self.count) + if (existingLength == toBytes) { + return Data(self) + } else if (existingLength > toBytes) { + return nil + } + var data:Data + if (isNegative) { + data = Data(repeating: UInt8(255), count: Int(toBytes - existingLength)) + } else { + data = Data(repeating: UInt8(0), count: Int(toBytes - existingLength)) + } + data.append(self) + return data + } + + func setLengthRight(_ toBytes: UInt64, isNegative:Bool = false ) -> Data? { + let existingLength = UInt64(self.count) + if (existingLength == toBytes) { + return Data(self) + } else if (existingLength > toBytes) { + return nil + } + var data:Data = Data() + data.append(self) + if (isNegative) { + data.append(Data(repeating: UInt8(255), count: Int(toBytes - existingLength))) + } else { + data.append(Data(repeating: UInt8(0), count:Int(toBytes - existingLength))) + } + return data + } + + static func fromHex(_ hex: String) -> Data? { + let string = hex.lowercased().stripHexPrefix() + let array = Array(hex: string) + if (array.count == 0) { + if (hex == "0x" || hex == "") { + return Data() + } else { + return nil + } + } + return Data(array) + } +} + +extension BigInt { + func toTwosComplement() -> Data { + if (self.sign == BigInt.Sign.plus) { + return self.magnitude.serialize() + } else { + let serializedLength = self.magnitude.serialize().count + let MAX = BigUInt(1) << (serializedLength*8) + let twoComplement = MAX - self.magnitude + return twoComplement.serialize() + } + } +} + +extension BigUInt { + func abiEncode(bits: UInt64) -> Data? { + let data = self.serialize() + let paddedLength = UInt64((bits + 7) / 8) + let padded = data.setLengthLeft(paddedLength) + return padded + } +} + +extension BigInt { + func abiEncode(bits: UInt64) -> Data? { + let isNegative = self < (BigInt(0)) + let data = self.toTwosComplement() + let paddedLength = UInt64((bits + 7) / 8) + let padded = data.setLengthLeft(paddedLength, isNegative: isNegative) + return padded + } +} + +extension BigInt { + static func fromTwosComplement(data: Data) -> BigInt { + let isPositive = ((data[0] & 128) >> 7) == 0 + if (isPositive) { + let magnitude = BigUInt(data) + return BigInt(magnitude) + } else { + let MAX = (BigUInt(1) << (data.count*8)) + let magnitude = MAX - BigUInt(data) + let bigint = BigInt(0) - BigInt(magnitude) + return bigint + } + } +} + +extension String { + var fullRange: Range { + return startIndex.. Index? { + guard let range = range(of: String(char)) else { + return nil + } + return range.lowerBound + } + +// func split(intoChunksOf chunkSize: Int) -> [String] { +// var output = [String]() +// let splittedString = self +// .map { $0 } +// .split(intoChunksOf: chunkSize) +// splittedString.forEach { +// output.append($0.map { String($0) }.joined(separator: "")) +// } +// return output +// } + + subscript (bounds: CountableClosedRange) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = index(self.startIndex, offsetBy: bounds.upperBound) + return String(self[start...end]) + } + + subscript (bounds: CountableRange) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = index(self.startIndex, offsetBy: bounds.upperBound) + return String(self[start..) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = self.endIndex + return String(self[start.. String { + let stringLength = self.count + if stringLength < toLength { + return String(repeatElement(character, count: toLength - stringLength)) + self + } else { + return String(self.suffix(toLength)) + } + } + +// func interpretAsBinaryData() -> Data? { +// let padded = self.padding(toLength: ((self.count + 7) / 8) * 8, withPad: "0", startingAt: 0) +// let byteArray = padded.split(intoChunksOf: 8).map { UInt8(strtoul($0, nil, 2)) } +// return Data(byteArray) +// } + + func hasHexPrefix() -> Bool { + return self.hasPrefix("0x") + } + + func stripHexPrefix() -> String { + if self.hasPrefix("0x") { + let indexStart = self.index(self.startIndex, offsetBy: 2) + return String(self[indexStart...]) + } + return self + } + + func addHexPrefix() -> String { + if !self.hasPrefix("0x") { + return "0x" + self + } + return self + } + + func matchingStrings(regex: String) -> [[String]] { + guard let regex = try? NSRegularExpression(pattern: regex, options: []) else { return [] } + let nsString = self as NSString + let results = regex.matches(in: self, options: [], range: NSMakeRange(0, nsString.length)) + return results.map { result in + (0.. Range? { + guard + let from16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location, limitedBy: utf16.endIndex), + let to16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location + nsRange.length, limitedBy: utf16.endIndex), + let from = from16.samePosition(in: self), + let to = to16.samePosition(in: self) + else { return nil } + return from ..< to + } + + var asciiValue: Int { + get { + let s = self.unicodeScalars + return Int(s[s.startIndex].value) + } + } +} + +extension Character { + var asciiValue: Int { + get { + let s = String(self).unicodeScalars + return Int(s[s.startIndex].value) + } + } +} + +extension Array where Element == UInt8 { + init(hex: String) { + self.init(reserveCapacity: hex.unicodeScalars.lazy.underestimatedCount) + var buffer: UInt8? + var skip = hex.hasPrefix("0x") ? 2 : 0 + for char in hex.unicodeScalars.lazy { + guard skip == 0 else { + skip -= 1 + continue + } + guard char.value >= 48 && char.value <= 102 else { + removeAll() + return + } + let v: UInt8 + let c: UInt8 = UInt8(char.value) + switch c { + case let c where c <= 57: + v = c - 48 + case let c where c >= 65 && c <= 70: + v = c - 55 + case let c where c >= 97: + v = c - 87 + default: + removeAll() + return + } + if let b = buffer { + append(b << 4 | v) + buffer = nil + } else { + buffer = v + } + } + if let b = buffer { + append(b) + } + } + + func toHexString() -> String { + return `lazy`.reduce("") { + var s = String($1, radix: 16) + if s.count == 1 { + s = "0" + s + } + return $0 + s + } + } +} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift similarity index 90% rename from Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift rename to Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift index 72e0c495a..469c155fd 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift +++ b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift @@ -1,18 +1,16 @@ // -// ABIv2ParameterTypes.swift -// web3swift -// -// Created by Alexander Vlasov on 02.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt +import EthereumAddress -extension ABIv2.Element { +extension ABI.Element { /// Specifies the type that parameters in a contract have. - public enum ParameterType: ABIv2ElementPropertiesProtocol { + public enum ParameterType: ABIElementPropertiesProtocol { case uint(bits: UInt64) case int(bits: UInt64) case address @@ -70,7 +68,7 @@ extension ABIv2.Element { } } - var subtype: ABIv2.Element.ParameterType? { + var subtype: ABI.Element.ParameterType? { switch self { case .array(type: let type, length: _): return type @@ -129,7 +127,7 @@ extension ABIv2.Element { } } - var arraySize: ABIv2.Element.ArraySize { + var arraySize: ABI.Element.ArraySize { switch self { case .array(type: _, length: let length): if (length == 0) { @@ -145,8 +143,8 @@ extension ABIv2.Element { } -extension ABIv2.Element.ParameterType: Equatable { - public static func ==(lhs: ABIv2.Element.ParameterType, rhs: ABIv2.Element.ParameterType) -> Bool { +extension ABI.Element.ParameterType: Equatable { + public static func ==(lhs: ABI.Element.ParameterType, rhs: ABI.Element.ParameterType) -> Bool { switch (lhs, rhs) { case let (.uint(length1), .uint(length2)): return length1 == length2 @@ -172,7 +170,7 @@ extension ABIv2.Element.ParameterType: Equatable { } } -extension ABIv2.Element.Function { +extension ABI.Element.Function { public var signature: String { return "\(name ?? "")(\(inputs.map { $0.type.abiRepresentation }.joined(separator: ",")))" } @@ -187,7 +185,7 @@ extension ABIv2.Element.Function { } // MARK: - Event topic -extension ABIv2.Element.Event { +extension ABI.Element.Event { public var signature: String { return "\(name)(\(inputs.map { $0.type.abiRepresentation }.joined(separator: ",")))" } @@ -198,7 +196,7 @@ extension ABIv2.Element.Event { } -extension ABIv2.Element.ParameterType: ABIv2Encoding { +extension ABI.Element.ParameterType: ABIEncoding { public var abiRepresentation: String { switch self { case .uint(let bits): @@ -230,7 +228,7 @@ extension ABIv2.Element.ParameterType: ABIv2Encoding { } } -extension ABIv2.Element.ParameterType: ABIv2Validation { +extension ABI.Element.ParameterType: ABIValidation { public var isValid: Bool { switch self { case .uint(let bits), .int(let bits): diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Parsing.swift b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIParsing.swift similarity index 50% rename from Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Parsing.swift rename to Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIParsing.swift index 5ae447ca4..f99c13295 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2Parsing.swift +++ b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIParsing.swift @@ -1,16 +1,13 @@ // -// ABIParser.swift -// web3swift -// -// Created by Alexander Vlasov on 06.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -extension ABIv2 { +extension ABI { - public enum ParsingError: Error { + public enum ParsingError: Swift.Error { case invalidJsonFile case elementTypeInvalid case elementNameInvalid @@ -37,69 +34,69 @@ extension ABIv2 { } -extension ABIv2.Record { - public func parse() throws -> ABIv2.Element { +extension ABI.Record { + public func parse() throws -> ABI.Element { let typeString = self.type != nil ? self.type! : "function" - guard let type = ABIv2.ElementType(rawValue: typeString) else { - throw ABIv2.ParsingError.elementTypeInvalid + guard let type = ABI.ElementType(rawValue: typeString) else { + throw ABI.ParsingError.elementTypeInvalid } return try parseToElement(from: self, type: type) } } -fileprivate func parseToElement(from abiRecord: ABIv2.Record, type: ABIv2.ElementType) throws -> ABIv2.Element { +fileprivate func parseToElement(from abiRecord: ABI.Record, type: ABI.ElementType) throws -> ABI.Element { switch type { case .function: let function = try parseFunction(abiRecord: abiRecord) - return ABIv2.Element.function(function) + return ABI.Element.function(function) case .constructor: let constructor = try parseConstructor(abiRecord: abiRecord) - return ABIv2.Element.constructor(constructor) + return ABI.Element.constructor(constructor) case .fallback: let fallback = try parseFallback(abiRecord: abiRecord) - return ABIv2.Element.fallback(fallback) + return ABI.Element.fallback(fallback) case .event: let event = try parseEvent(abiRecord: abiRecord) - return ABIv2.Element.event(event) + return ABI.Element.event(event) } } -fileprivate func parseFunction(abiRecord:ABIv2.Record) throws -> ABIv2.Element.Function { - let inputs = try abiRecord.inputs?.map({ (input:ABIv2.Input) throws -> ABIv2.Element.InOut in +fileprivate func parseFunction(abiRecord:ABI.Record) throws -> ABI.Element.Function { + let inputs = try abiRecord.inputs?.map({ (input:ABI.Input) throws -> ABI.Element.InOut in let nativeInput = try input.parse() return nativeInput }) - let abiInputs = inputs != nil ? inputs! : [ABIv2.Element.InOut]() - let outputs = try abiRecord.outputs?.map({ (output:ABIv2.Output) throws -> ABIv2.Element.InOut in + let abiInputs = inputs != nil ? inputs! : [ABI.Element.InOut]() + let outputs = try abiRecord.outputs?.map({ (output:ABI.Output) throws -> ABI.Element.InOut in let nativeOutput = try output.parse() return nativeOutput }) - let abiOutputs = outputs != nil ? outputs! : [ABIv2.Element.InOut]() + let abiOutputs = outputs != nil ? outputs! : [ABI.Element.InOut]() let name = abiRecord.name != nil ? abiRecord.name! : "" let payable = abiRecord.stateMutability != nil ? (abiRecord.stateMutability == "payable" || abiRecord.payable!) : false let constant = (abiRecord.constant == true || abiRecord.stateMutability == "view" || abiRecord.stateMutability == "pure") - let functionElement = ABIv2.Element.Function(name: name, inputs: abiInputs, outputs: abiOutputs, constant: constant, payable: payable) + let functionElement = ABI.Element.Function(name: name, inputs: abiInputs, outputs: abiOutputs, constant: constant, payable: payable) return functionElement } -fileprivate func parseFallback(abiRecord:ABIv2.Record) throws -> ABIv2.Element.Fallback { +fileprivate func parseFallback(abiRecord:ABI.Record) throws -> ABI.Element.Fallback { let payable = (abiRecord.stateMutability == "payable" || abiRecord.payable!) var constant = abiRecord.constant == true if (abiRecord.stateMutability == "view" || abiRecord.stateMutability == "pure") { constant = true } - let functionElement = ABIv2.Element.Fallback(constant: constant, payable: payable) + let functionElement = ABI.Element.Fallback(constant: constant, payable: payable) return functionElement } -fileprivate func parseConstructor(abiRecord:ABIv2.Record) throws -> ABIv2.Element.Constructor { - let inputs = try abiRecord.inputs?.map({ (input:ABIv2.Input) throws -> ABIv2.Element.InOut in +fileprivate func parseConstructor(abiRecord:ABI.Record) throws -> ABI.Element.Constructor { + let inputs = try abiRecord.inputs?.map({ (input:ABI.Input) throws -> ABI.Element.InOut in let nativeInput = try input.parse() return nativeInput }) - let abiInputs = inputs != nil ? inputs! : [ABIv2.Element.InOut]() + let abiInputs = inputs != nil ? inputs! : [ABI.Element.InOut]() var payable = false if (abiRecord.payable != nil) { payable = abiRecord.payable! @@ -108,79 +105,79 @@ fileprivate func parseConstructor(abiRecord:ABIv2.Record) throws -> ABIv2.Elemen payable = true } let constant = false - let functionElement = ABIv2.Element.Constructor(inputs: abiInputs, constant: constant, payable: payable) + let functionElement = ABI.Element.Constructor(inputs: abiInputs, constant: constant, payable: payable) return functionElement } -fileprivate func parseEvent(abiRecord:ABIv2.Record) throws -> ABIv2.Element.Event { - let inputs = try abiRecord.inputs?.map({ (input:ABIv2.Input) throws -> ABIv2.Element.Event.Input in +fileprivate func parseEvent(abiRecord:ABI.Record) throws -> ABI.Element.Event { + let inputs = try abiRecord.inputs?.map({ (input:ABI.Input) throws -> ABI.Element.Event.Input in let nativeInput = try input.parseForEvent() return nativeInput }) - let abiInputs = inputs != nil ? inputs! : [ABIv2.Element.Event.Input]() + let abiInputs = inputs != nil ? inputs! : [ABI.Element.Event.Input]() let name = abiRecord.name != nil ? abiRecord.name! : "" let anonymous = abiRecord.anonymous != nil ? abiRecord.anonymous! : false - let functionElement = ABIv2.Element.Event(name: name, inputs: abiInputs, anonymous: anonymous) + let functionElement = ABI.Element.Event(name: name, inputs: abiInputs, anonymous: anonymous) return functionElement } -extension ABIv2.Input { - func parse() throws -> ABIv2.Element.InOut { +extension ABI.Input { + func parse() throws -> ABI.Element.InOut { let name = self.name != nil ? self.name! : "" - let parameterType = try ABIv2TypeParser.parseTypeString(self.type) + let parameterType = try ABITypeParser.parseTypeString(self.type) if case .tuple(types: _) = parameterType { - let components = try self.components?.compactMap({ (inp: ABIv2.Input) throws -> ABIv2.Element.ParameterType in + let components = try self.components?.compactMap({ (inp: ABI.Input) throws -> ABI.Element.ParameterType in let input = try inp.parse() return input.type }) - let type = ABIv2.Element.ParameterType.tuple(types: components!) - let nativeInput = ABIv2.Element.InOut(name: name, type: type) + let type = ABI.Element.ParameterType.tuple(types: components!) + let nativeInput = ABI.Element.InOut(name: name, type: type) return nativeInput } else { - let nativeInput = ABIv2.Element.InOut(name: name, type: parameterType) + let nativeInput = ABI.Element.InOut(name: name, type: parameterType) return nativeInput } } - func parseForEvent() throws -> ABIv2.Element.Event.Input{ + func parseForEvent() throws -> ABI.Element.Event.Input{ let name = self.name != nil ? self.name! : "" - let parameterType = try ABIv2TypeParser.parseTypeString(self.type) + let parameterType = try ABITypeParser.parseTypeString(self.type) let indexed = self.indexed == true - return ABIv2.Element.Event.Input(name:name, type: parameterType, indexed: indexed) + return ABI.Element.Event.Input(name:name, type: parameterType, indexed: indexed) } } -extension ABIv2.Output { - func parse() throws -> ABIv2.Element.InOut { +extension ABI.Output { + func parse() throws -> ABI.Element.InOut { let name = self.name != nil ? self.name! : "" - let parameterType = try ABIv2TypeParser.parseTypeString(self.type) + let parameterType = try ABITypeParser.parseTypeString(self.type) switch parameterType { case .tuple(types: _): - let components = try self.components?.compactMap({ (inp: ABIv2.Output) throws -> ABIv2.Element.ParameterType in + let components = try self.components?.compactMap({ (inp: ABI.Output) throws -> ABI.Element.ParameterType in let input = try inp.parse() return input.type }) - let type = ABIv2.Element.ParameterType.tuple(types: components!) - let nativeInput = ABIv2.Element.InOut(name: name, type: type) + let type = ABI.Element.ParameterType.tuple(types: components!) + let nativeInput = ABI.Element.InOut(name: name, type: type) return nativeInput case .array(type: let subtype, length: let length): switch subtype { case .tuple(types: _): - let components = try self.components?.compactMap({ (inp: ABIv2.Output) throws -> ABIv2.Element.ParameterType in + let components = try self.components?.compactMap({ (inp: ABI.Output) throws -> ABI.Element.ParameterType in let input = try inp.parse() return input.type }) - let nestedSubtype = ABIv2.Element.ParameterType.tuple(types: components!) - let properType = ABIv2.Element.ParameterType.array(type: nestedSubtype, length: length) - let nativeInput = ABIv2.Element.InOut(name: name, type: properType) + let nestedSubtype = ABI.Element.ParameterType.tuple(types: components!) + let properType = ABI.Element.ParameterType.array(type: nestedSubtype, length: length) + let nativeInput = ABI.Element.InOut(name: name, type: properType) return nativeInput default: - let nativeInput = ABIv2.Element.InOut(name: name, type: parameterType) + let nativeInput = ABI.Element.InOut(name: name, type: parameterType) return nativeInput } default: - let nativeInput = ABIv2.Element.InOut(name: name, type: parameterType) + let nativeInput = ABI.Element.InOut(name: name, type: parameterType) return nativeInput } } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2TypeParser.swift b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABITypeParser.swift similarity index 72% rename from Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2TypeParser.swift rename to Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABITypeParser.swift index 370dc26fe..274712471 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2TypeParser.swift +++ b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABITypeParser.swift @@ -1,14 +1,11 @@ // -// ABIv2TypeParser.swift -// web3swift -// -// Created by Alexander Vlasov on 03.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -public struct ABIv2TypeParser { +public struct ABITypeParser { private enum BaseParameterType: String { case address @@ -21,7 +18,7 @@ public struct ABIv2TypeParser { case tuple } - private static func baseTypeMatch(from string: String, length: UInt64 = 0) -> ABIv2.Element.ParameterType? { + static func baseTypeMatch(from string: String, length: UInt64 = 0) -> ABI.Element.ParameterType? { switch BaseParameterType(rawValue: string) { case .address?: return .address @@ -41,26 +38,26 @@ public struct ABIv2TypeParser { case .string?: return .string case .tuple?: - return .tuple(types: [ABIv2.Element.ParameterType]()) + return .tuple(types: [ABI.Element.ParameterType]()) default: return nil } } - public static func parseTypeString(_ string:String) throws -> ABIv2.Element.ParameterType { + public static func parseTypeString(_ string:String) throws -> ABI.Element.ParameterType { let (type, tail) = recursiveParseType(string) - guard let t = type, tail == nil else {throw Web3Error.inputError(desc: "Failed to parse ABI element " + string)} + guard let t = type, tail == nil else {throw ABI.ParsingError.elementTypeInvalid} return t } - public static func recursiveParseType(_ string: String) -> (type: ABIv2.Element.ParameterType?, tail: String?) { - let matcher = try! NSRegularExpression(pattern: ABIv2.TypeParsingExpressions.typeEatingRegex, options: NSRegularExpression.Options.dotMatchesLineSeparators) + static func recursiveParseType(_ string: String) -> (type: ABI.Element.ParameterType?, tail: String?) { + let matcher = try! NSRegularExpression(pattern: ABI.TypeParsingExpressions.typeEatingRegex, options: NSRegularExpression.Options.dotMatchesLineSeparators) let match = matcher.matches(in: string, options: NSRegularExpression.MatchingOptions.anchored, range: string.fullNSRange) guard match.count == 1 else { return (nil, nil) } var tail: String = "" - var type: ABIv2.Element.ParameterType? + var type: ABI.Element.ParameterType? guard match[0].numberOfRanges >= 1 else {return (nil, nil)} guard let baseTypeRange = Range(match[0].range(at: 1), in: string) else {return (nil, nil)} let baseTypeString = String(string[baseTypeRange]) @@ -86,22 +83,22 @@ public struct ABIv2TypeParser { return recursiveParseArray(baseType: type!, string: tail) } - public static func recursiveParseArray(baseType: ABIv2.Element.ParameterType, string: String) -> (type: ABIv2.Element.ParameterType?, tail: String?) { - let matcher = try! NSRegularExpression(pattern: ABIv2.TypeParsingExpressions.arrayEatingRegex, options: NSRegularExpression.Options.dotMatchesLineSeparators) + static func recursiveParseArray(baseType: ABI.Element.ParameterType, string: String) -> (type: ABI.Element.ParameterType?, tail: String?) { + let matcher = try! NSRegularExpression(pattern: ABI.TypeParsingExpressions.arrayEatingRegex, options: NSRegularExpression.Options.dotMatchesLineSeparators) let match = matcher.matches(in: string, options: NSRegularExpression.MatchingOptions.anchored, range: string.fullNSRange) guard match.count == 1 else {return (nil, nil)} var tail: String = "" - var type: ABIv2.Element.ParameterType? + var type: ABI.Element.ParameterType? guard match[0].numberOfRanges >= 1 else {return (nil, nil)} guard let baseArrayRange = Range(match[0].range(at: 1), in: string) else {return (nil, nil)} let baseArrayString = String(string[baseArrayRange]) if match[0].numberOfRanges >= 2, let exactArrayRange = Range(match[0].range(at: 2), in: string) { let lengthString = String(string[exactArrayRange]) guard let arrayLength = UInt64(lengthString) else {return (nil, nil)} - let baseType = ABIv2.Element.ParameterType.array(type: baseType, length: arrayLength) + let baseType = ABI.Element.ParameterType.array(type: baseType, length: arrayLength) type = baseType } else { - let baseType = ABIv2.Element.ParameterType.array(type: baseType, length: 0) + let baseType = ABI.Element.ParameterType.array(type: baseType, length: 0) type = baseType } tail = string.replacingCharacters(in: string.range(of: baseArrayString)!, with: "") diff --git a/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/EthereumABI.h b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/EthereumABI.h new file mode 100644 index 000000000..f2d5c0b75 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/EthereumABI.h @@ -0,0 +1,23 @@ +// +// EthereumABI.h +// EthereumABI +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +#if TARGET_OS_IPHONE +#import +#else +#import +#endif + +//! Project version number for EthereumABI. +FOUNDATION_EXPORT double EthereumABIVersionNumber; + +//! Project version string for EthereumABI. +FOUNDATION_EXPORT const unsigned char EthereumABIVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Example/web3swiftBrowser/Pods/EthereumABI/LICENSE b/Example/web3swiftBrowser/Pods/EthereumABI/LICENSE new file mode 100644 index 000000000..d49e6aa41 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/EthereumABI/LICENSE @@ -0,0 +1,13 @@ +Copyright 2018 Alex Vlasov + +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/Example/web3swiftBrowser/Pods/EthereumABI/README.md b/Example/web3swiftBrowser/Pods/EthereumABI/README.md new file mode 100644 index 000000000..0e96dc82f --- /dev/null +++ b/Example/web3swiftBrowser/Pods/EthereumABI/README.md @@ -0,0 +1,3 @@ +# Description + +Ethereum ABI parsing, decoding and encoding module for other projects diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/EthereumAddress.swift b/Example/web3swiftBrowser/Pods/EthereumAddress/EthereumAddress/Classes/EthereumAddress.swift old mode 100755 new mode 100644 similarity index 88% rename from Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/EthereumAddress.swift rename to Example/web3swiftBrowser/Pods/EthereumAddress/EthereumAddress/Classes/EthereumAddress.swift index c2d260f3a..da47d982c --- a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/EthereumAddress.swift +++ b/Example/web3swiftBrowser/Pods/EthereumAddress/EthereumAddress/Classes/EthereumAddress.swift @@ -1,13 +1,13 @@ // // EthereumAddress.swift -// web3swift +// EthereumAddress // -// Created by Alexander Vlasov on 07.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -import BigInt +import CryptoSwift public struct EthereumAddress: Equatable { public enum AddressType { @@ -30,7 +30,7 @@ public struct EthereumAddress: Equatable { public var type: AddressType = .normal public static func ==(lhs: EthereumAddress, rhs: EthereumAddress) -> Bool { return lhs.addressData == rhs.addressData && lhs.type == rhs.type -// return lhs.address.lowercased() == rhs.address.lowercased() && lhs.type == rhs.type + // return lhs.address.lowercased() == rhs.address.lowercased() && lhs.type == rhs.type } public var addressData: Data { @@ -39,8 +39,8 @@ public struct EthereumAddress: Equatable { case .normal: guard let dataArray = Data.fromHex(_address) else {return Data()} return dataArray -// guard let d = dataArray.setLengthLeft(20) else { return Data()} -// return d + // guard let d = dataArray.setLengthLeft(20) else { return Data()} + // return d case .contractDeployment: return Data() } @@ -121,9 +121,13 @@ public struct EthereumAddress: Equatable { return EthereumAddress("0x", type: .contractDeployment)! } -// public static func fromIBAN(_ iban: String) -> EthereumAddress { -// -// } + // public static func fromIBAN(_ iban: String) -> EthereumAddress { + // + // } + +} + +extension EthereumAddress: Hashable { } diff --git a/Example/web3swiftBrowser/Pods/EthereumAddress/EthereumAddress/Classes/Extensions.swift b/Example/web3swiftBrowser/Pods/EthereumAddress/EthereumAddress/Classes/Extensions.swift new file mode 100644 index 000000000..58cf99d59 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/EthereumAddress/EthereumAddress/Classes/Extensions.swift @@ -0,0 +1,226 @@ +// +// Extensions.swift +// EthereumAddress +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation + +extension Data { + func setLengthLeft(_ toBytes: UInt64, isNegative:Bool = false ) -> Data? { + let existingLength = UInt64(self.count) + if (existingLength == toBytes) { + return Data(self) + } else if (existingLength > toBytes) { + return nil + } + var data:Data + if (isNegative) { + data = Data(repeating: UInt8(255), count: Int(toBytes - existingLength)) + } else { + data = Data(repeating: UInt8(0), count: Int(toBytes - existingLength)) + } + data.append(self) + return data + } + + func setLengthRight(_ toBytes: UInt64, isNegative:Bool = false ) -> Data? { + let existingLength = UInt64(self.count) + if (existingLength == toBytes) { + return Data(self) + } else if (existingLength > toBytes) { + return nil + } + var data:Data = Data() + data.append(self) + if (isNegative) { + data.append(Data(repeating: UInt8(255), count: Int(toBytes - existingLength))) + } else { + data.append(Data(repeating: UInt8(0), count:Int(toBytes - existingLength))) + } + return data + } + + static func fromHex(_ hex: String) -> Data? { + let string = hex.lowercased().stripHexPrefix() + let array = Array(hex: string) + if (array.count == 0) { + if (hex == "0x" || hex == "") { + return Data() + } else { + return nil + } + } + return Data(array) + } +} + +extension String { + var fullRange: Range { + return startIndex.. Index? { + guard let range = range(of: String(char)) else { + return nil + } + return range.lowerBound + } + + // func split(intoChunksOf chunkSize: Int) -> [String] { + // var output = [String]() + // let splittedString = self + // .map { $0 } + // .split(intoChunksOf: chunkSize) + // splittedString.forEach { + // output.append($0.map { String($0) }.joined(separator: "")) + // } + // return output + // } + + subscript (bounds: CountableClosedRange) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = index(self.startIndex, offsetBy: bounds.upperBound) + return String(self[start...end]) + } + + subscript (bounds: CountableRange) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = index(self.startIndex, offsetBy: bounds.upperBound) + return String(self[start..) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = self.endIndex + return String(self[start.. String { + let stringLength = self.count + if stringLength < toLength { + return String(repeatElement(character, count: toLength - stringLength)) + self + } else { + return String(self.suffix(toLength)) + } + } + + // func interpretAsBinaryData() -> Data? { + // let padded = self.padding(toLength: ((self.count + 7) / 8) * 8, withPad: "0", startingAt: 0) + // let byteArray = padded.split(intoChunksOf: 8).map { UInt8(strtoul($0, nil, 2)) } + // return Data(byteArray) + // } + + func hasHexPrefix() -> Bool { + return self.hasPrefix("0x") + } + + func stripHexPrefix() -> String { + if self.hasPrefix("0x") { + let indexStart = self.index(self.startIndex, offsetBy: 2) + return String(self[indexStart...]) + } + return self + } + + func addHexPrefix() -> String { + if !self.hasPrefix("0x") { + return "0x" + self + } + return self + } + + func matchingStrings(regex: String) -> [[String]] { + guard let regex = try? NSRegularExpression(pattern: regex, options: []) else { return [] } + let nsString = self as NSString + let results = regex.matches(in: self, options: [], range: NSMakeRange(0, nsString.length)) + return results.map { result in + (0.. Range? { + guard + let from16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location, limitedBy: utf16.endIndex), + let to16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location + nsRange.length, limitedBy: utf16.endIndex), + let from = from16.samePosition(in: self), + let to = to16.samePosition(in: self) + else { return nil } + return from ..< to + } + + var asciiValue: Int { + get { + let s = self.unicodeScalars + return Int(s[s.startIndex].value) + } + } +} + +extension Character { + var asciiValue: Int { + get { + let s = String(self).unicodeScalars + return Int(s[s.startIndex].value) + } + } +} + +extension Array where Element == UInt8 { + init(hex: String) { + self.init(reserveCapacity: hex.unicodeScalars.lazy.underestimatedCount) + var buffer: UInt8? + var skip = hex.hasPrefix("0x") ? 2 : 0 + for char in hex.unicodeScalars.lazy { + guard skip == 0 else { + skip -= 1 + continue + } + guard char.value >= 48 && char.value <= 102 else { + removeAll() + return + } + let v: UInt8 + let c: UInt8 = UInt8(char.value) + switch c { + case let c where c <= 57: + v = c - 48 + case let c where c >= 65 && c <= 70: + v = c - 55 + case let c where c >= 97: + v = c - 87 + default: + removeAll() + return + } + if let b = buffer { + append(b << 4 | v) + buffer = nil + } else { + buffer = v + } + } + if let b = buffer { + append(b) + } + } + + func toHexString() -> String { + return `lazy`.reduce("") { + var s = String($1, radix: 16) + if s.count == 1 { + s = "0" + s + } + return $0 + s + } + } +} diff --git a/Example/web3swiftBrowser/Pods/EthereumAddress/EthereumAddress/EthereumAddress.h b/Example/web3swiftBrowser/Pods/EthereumAddress/EthereumAddress/EthereumAddress.h new file mode 100644 index 000000000..32cf27a4d --- /dev/null +++ b/Example/web3swiftBrowser/Pods/EthereumAddress/EthereumAddress/EthereumAddress.h @@ -0,0 +1,23 @@ +// +// EthereumAddress.h +// EthereumAddress +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +#if TARGET_OS_IPHONE +#import +#else +#import +#endif + +//! Project version number for EthereumAddress. +FOUNDATION_EXPORT double EthereumAddressVersionNumber; + +//! Project version string for EthereumAddress. +FOUNDATION_EXPORT const unsigned char EthereumAddressVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Example/web3swiftBrowser/Pods/EthereumAddress/LICENSE b/Example/web3swiftBrowser/Pods/EthereumAddress/LICENSE new file mode 100644 index 000000000..d49e6aa41 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/EthereumAddress/LICENSE @@ -0,0 +1,13 @@ +Copyright 2018 Alex Vlasov + +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/Example/web3swiftBrowser/Pods/EthereumAddress/README.md b/Example/web3swiftBrowser/Pods/EthereumAddress/README.md new file mode 100644 index 000000000..8678762a3 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/EthereumAddress/README.md @@ -0,0 +1,3 @@ +# Ethereum address + +Lightweight implementaiton of Ethereum address native structure with parsing and validation options. diff --git a/Example/web3swiftBrowser/Pods/Local Podspecs/web3swift.podspec.json b/Example/web3swiftBrowser/Pods/Local Podspecs/web3swift.podspec.json new file mode 100755 index 000000000..a78abc265 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Local Podspecs/web3swift.podspec.json @@ -0,0 +1,59 @@ +{ + "name": "web3swift", + "version": "2.0.1", + "summary": "Web3 implementation in vanilla Swift for iOS ans macOS", + "description": "Web3 implementation in vanilla Swift, intended for mobile developers of wallets, Dapps and Web3.0", + "homepage": "https://github.com/matterinc/web3swift", + "license": "Apache License 2.0", + "authors": { + "Alex Vlasov": "alex.m.vlasov@gmail.com" + }, + "source": { + "git": "https://github.com/matterinc/web3swift.git", + "tag": "2.0.1" + }, + "social_media_url": "https://twitter.com/shamatar", + "swift_version": "4.1", + "module_name": "Web3swift", + "platforms": { + "ios": "9.0", + "osx": "10.11" + }, + "source_files": [ + "web3swift/{PrecompiledContracts,Promises,Web3,Contract,KeystoreManager,Transaction,Convenience}/Classes/*.{h,swift}", + "web3swift/Utils/Classes/{EIP67Code, EIP681}.swift", + "web3swift/HookedFunctions/Classes/*.swift", + "web3swift/web3swift.h" + ], + "public_header_files": "web3swift/web3swift.h", + "pod_target_xcconfig": { + "DEFINES_MODULE": "YES" + }, + "frameworks": "CoreImage", + "dependencies": { + "BigInt": [ + "~> 3.1" + ], + "CryptoSwift": [ + "~> 0.13" + ], + "PromiseKit": [ + "~> 6.3" + ], + "scrypt": [ + "~> 2.0" + ], + "secp256k1_swift": [ + "~> 1.0.3" + ], + "SwiftRLP": [ + "~> 1.1" + ], + "EthereumAddress": [ + "~> 1.0.0" + ], + "EthereumABI": [ + "~> 1.1.1" + ] + } +} diff --git a/Example/web3swiftBrowser/Pods/Manifest.lock b/Example/web3swiftBrowser/Pods/Manifest.lock new file mode 100755 index 000000000..cc6a40a03 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Manifest.lock @@ -0,0 +1,73 @@ +PODS: + - BigInt (3.1.0): + - SipHash (~> 1.2) + - CryptoSwift (0.13.0) + - EthereumABI (1.1.1): + - BigInt (~> 3.1) + - CryptoSwift (~> 0.13) + - EthereumAddress (~> 1.0.0) + - EthereumAddress (1.0.0): + - CryptoSwift (~> 0.13) + - PromiseKit (6.5.2): + - PromiseKit/CorePromise (= 6.5.2) + - PromiseKit/Foundation (= 6.5.2) + - PromiseKit/UIKit (= 6.5.2) + - PromiseKit/CorePromise (6.5.2) + - PromiseKit/Foundation (6.5.2): + - PromiseKit/CorePromise + - PromiseKit/UIKit (6.5.2): + - PromiseKit/CorePromise + - scrypt (2.0): + - CryptoSwift (~> 0.11) + - secp256k1_swift (1.0.3) + - SipHash (1.2.2) + - SwiftRLP (1.2): + - BigInt (~> 3.1) + - web3swift (2.0.1): + - BigInt (~> 3.1) + - CryptoSwift (~> 0.13) + - EthereumABI (~> 1.1.1) + - EthereumAddress (~> 1.0.0) + - PromiseKit (~> 6.3) + - scrypt (~> 2.0) + - secp256k1_swift (~> 1.0.3) + - SwiftRLP (~> 1.1) + - WKBridge (0.2.4) + +DEPENDENCIES: + - web3swift (from `../../`) + - WKBridge + +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - BigInt + - CryptoSwift + - EthereumABI + - EthereumAddress + - PromiseKit + - scrypt + - secp256k1_swift + - SipHash + - SwiftRLP + - WKBridge + +EXTERNAL SOURCES: + web3swift: + :path: "../../" + +SPEC CHECKSUMS: + BigInt: 76b5dfdfa3e2e478d4ffdf161aeede5502e2742f + CryptoSwift: 16e78bebf567bad1c87b2d58f6547f25b74c31aa + EthereumABI: f040f5429e5a4366d028c88b88d9441e137593af + EthereumAddress: f476e1320dca3a0024431e713ede7a09c7eb7796 + PromiseKit: 27c1601bfb73405871b805bcb8cf7e55c4dad3db + scrypt: 3fe5b1a3b0976f97cd87488673a8f7c65708cc84 + secp256k1_swift: 4fc5c4b2d2c6d21ee8ccb868cdc92da12f38bed9 + SipHash: fad90a4683e420c52ef28063063dbbce248ea6d4 + SwiftRLP: 98a02b2210128353ca02e4c2f4d83e2a9796db4f + web3swift: aadc7a9b0c3b0384227eff181e39ba24ebfcd76c + WKBridge: 677fc36b9a9e4a80b6f9c4e915480d8fd91f5ad5 + +PODFILE CHECKSUM: ed17f63e9fc4feec3b3d9d88971f86da22d55a1f + +COCOAPODS: 1.6.0.beta.2 diff --git a/Example/web3swiftBrowser/Pods/Pods.xcodeproj/project.pbxproj b/Example/web3swiftBrowser/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 000000000..bb5d1f214 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,4039 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 001B8E53F2E74A971F96B5A0AFB56312 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD348A58C7418F12CFFB351832F482C1 /* Box.swift */; }; + 007379B6A57F0D9A5FF552E4B1FC8E69 /* ContractProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C8EBEC10E3FBDC2083ADA95D32AC0ED /* ContractProtocol.swift */; }; + 01E4DB01249E9AA0E845814E97CC91BD /* BigUInt+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 424F526B84880AC3C8DF8C0573DF835E /* BigUInt+Extensions.swift */; }; + 02B549BB960DE62E6196AA2E19DCFF55 /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = ECBB84241612CB8E52527516FFE28AEA /* scratch_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 03FA8EDEAAF28C2F20B6134374C42DAB /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3A86CD1B64C94999039F9ACDAD84755 /* SipHashable.swift */; }; + 0485DDC0DDDFAD1E8E278AD9C56EC1B4 /* ABIDecoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66464724192E063C8B230881F1B456A2 /* ABIDecoding.swift */; }; + 04D95F835813F0085F9DC352CB105212 /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 48A962A1A4952B499D08CAC0AF45834D /* scalar_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 051FB19BCE07901C0908D6891915505C /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BDEF8754C41FB3C25C8798C86E97514 /* scalar_low.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0522CCAF40281716390D9A04D44878FF /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = C703D877C454A5F831BF937286917A7B /* ecmult_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0627DC84943C9B21BBFFD77F73ECE3AA /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A88C260909AC2076CAEE4AA3727708BE /* HMAC.swift */; }; + 063877A2694F8B1409516732B8FFE41D /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD39B279684147812B3B6046364239D /* Promise.swift */; }; + 0695472F8D85187F3A02AAD9C60C9666 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 62EBED6AB6D078935F477606DA4D2E4F /* WebKit.framework */; }; + 069D7C62F3A828A1818AA531E783CEB1 /* Promise+Web3+Eth+Call.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171C1B4115FFABA129DA2134F08A7517 /* Promise+Web3+Eth+Call.swift */; }; + 07CB80647C63863F46097ECFE0E2852C /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBA3A73FEC3AD94CEC6829D43EBC9007 /* UInt64+Extension.swift */; }; + 07E55C4B3E245C156E30DF5CAB44BB2A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */; }; + 07EC96850E785B06D4F9BF5F581EE49E /* Promise+Web3+Eth+GetTransactionReceipt.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB34E7BDA8823633902171C623258D0 /* Promise+Web3+Eth+GetTransactionReceipt.swift */; }; + 088387733523D1CAFA7D4DC267EA4433 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2895ED4BBDDDCD15EEE8BE57E871905E /* Strideable.swift */; }; + 08BBE3B0A2885A94DE68FEEA9FBCD256 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EDA03F88844DA2CEB94E8B6E5E7EA0E /* Array+Foundation.swift */; }; + 08BF91C8E2A145AF73F8BF81DB7B7F28 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB2D691DC0E19B534C6FB9309CC2DD22 /* NSNotificationCenter+Promise.swift */; }; + 099726630FECA2EBB07D4AD11FC8AF8A /* EthereumABI.h in Headers */ = {isa = PBXBuildFile; fileRef = EBB03F81A5DAD541D6700C67C675CB53 /* EthereumABI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 09FDF66FFD0B0F990C2642B628941ACF /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A29CFAFD42016E44DA67CD28A4A53E /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0A0FBCAD7A1F908EF9B1197FE8BB63D2 /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F04647FAE97ECB37E38BC9149CFD24CF /* CMAC.swift */; }; + 0D32A5EE13EC8FB94162257D12B47954 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13A4E032075CD48B220512CD2E572CE3 /* PKCS7.swift */; }; + 0E4DDEFEB93FCA89A74E8F331B54DD72 /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = DD170A4EF842C6E5F5E805F57DECB21E /* secp256k1.c */; }; + 0E7DC8600622ED2E0516F25A9F51C903 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6825C5A45C42B011E0B27E2C0BB22B8A /* Extensions.swift */; }; + 0E8865F19ED08938AD447CE3EFEB6164 /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C41D6EB6280997499F263CCD10037EBD /* Checksum.swift */; }; + 0E8E48300480C88807201CAC2E4AC266 /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 81EFF929AA27215C7D61876E7C56A729 /* field_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F47AECED76239456F530A9F34C202AB /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3857774CE53B2BEDC3F679EBB0AE5B7 /* PBKDF2.swift */; }; + 11155D066240AA9BCB5FB19A8915C253 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0B13DF96A30F118B276B5CE29A288FE /* GCD.swift */; }; + 12D7EAE6F2CEC81702FD70455699210D /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF8C4AF0B078000272844DE8E509B59E /* UInt8+Extension.swift */; }; + 13261B4C1AE15B2C4E3CD2B3F460348F /* Promise+Web3+Eth+SendRawTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5660736868BFD803613F44199C911E8D /* Promise+Web3+Eth+SendRawTransaction.swift */; }; + 136BB1F21A2CA9531F6C9BC75306880F /* PromiseKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD08AEFD82A48A903C0E28B98A460A9 /* PromiseKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 13DAA7C3BD250712E95FE9EDA2A43AA5 /* WKBridge-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 494BD19DEF7C0C243E083E0566F97724 /* WKBridge-dummy.m */; }; + 13DD826D801F12539901BF1560784BCF /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 35611AB8339829A3115FD187AEF3AA44 /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 13E900B217EB7AABB8685EDD051A97E5 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48123FF1ECC25A15E6EED58BC66255C0 /* CCM.swift */; }; + 144B8E6AE31FC45452E8E3D36D959015 /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 91583D020D3BAD71D4BF8E0424771B02 /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 14A6030032E12C1B957F620FECF742EA /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6C4C9241708169F8BB5415B3063214 /* Digest.swift */; }; + 153FB6537DB060583F6ED637524362D6 /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B704EE429FEF981BE8D8C7643A03C30 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 16051A9D762585F3113675911D9F320E /* scrypt-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4AA008BE866DF99C1C6DE45E77988794 /* scrypt-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 161E411D1D54E1E1046CE252996A66B0 /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13CBA29E86E7029B3D6D8C8E5E459D91 /* firstly.swift */; }; + 1627FBC31FB1E8E0DC641011B657E3C0 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 75CD5FF7AF27DC775EF9AE5ACA8D2D10 /* group_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 168831EA2809233CFD6E98640D126804 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6234C75FBEE77F3DD66B1F78CC2C4592 /* Operators.swift */; }; + 169B55A24D3FDC159B797D85588C8A34 /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = C24BFEB3CC3A0F95E8CAB9EFE3353A5A /* CompactMap.swift */; }; + 18704C29935E06F5FB353933C7B93897 /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A35A35171C6DCDD78DE9D7E912AEF40 /* MD5.swift */; }; + 18863E02F23DAC3344E1E0F46A69E8A8 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6B4F2568D7F8FA82E928E9C33560CE /* CustomStringConvertible.swift */; }; + 18B0F374DF423121E792073034E5648C /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1C6D0D72CDECD3C4692CF2C744702C /* race.swift */; }; + 19EEEF4225421C0F5F4AD79A1DD4A7B0 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1B629056BCD1A0B29E0B7A2ECEB575A /* CryptoSwift.framework */; }; + 1A3CA564761B01FC3D99DFD8EBD833DE /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4450354D56E439B899DA89877CE790D9 /* BlockModeOptions.swift */; }; + 1B15C6A29C4F824A7AAE287ED45E0A64 /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EF0564DF34B20BE60B2D0F8ABCDAA56 /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 1C53AF4113DA6608A4B207AFF139039A /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = F29D0D43A5E2F070BB7AC998E4B03360 /* RandomUInt64.swift */; }; + 1C6305612C71BA4A41EA3EE86EF9DE98 /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32B08B487E3F8EE9452B131EE879CB0 /* Addition.swift */; }; + 1CC09E01D92FFFCADA00B961383303F2 /* Pods-web3swiftBrowser-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 33F64C66E20D23F271A741FC8050552E /* Pods-web3swiftBrowser-dummy.m */; }; + 1E7E841D003B374F3FF046EB1D5491D7 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CFE307BBC4FC48203B269E8D5E575FC /* PromiseKit.framework */; }; + 1F3ECECED1D617C7008825A0DC7DEAC1 /* Promise+Web3+Eth+EstimateGas.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC2ABD82554314CFEBC7DE3F1281B60A /* Promise+Web3+Eth+EstimateGas.swift */; }; + 209184E7CDAD2ABA0C69651FD6E85F06 /* Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8826B17C2F67CDD48367F8B6D55B44B6 /* Web3+TxPool.swift */; }; + 21DAA040E775A3EE958A1E980A2B8BC0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5E2592E125D878422270A2B22863541 /* UIKit.framework */; }; + 22FE67B665841A937E8D95D9DBCC7EB7 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42E5B0322736A75CEAC2E5E0BC47322B /* Bitwise Ops.swift */; }; + 23916C64C98204C928896ABA4BE1DAE6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */; }; + 23BA112C655FA27BE38C9C321EBD3A4E /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88F487D60ABCAD2A9A3B56A79D2ED18B /* Cipher.swift */; }; + 25E4EED1BE03777CB6ABDF322A6C9CEF /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F2A0DCA6CEDBE5C5673C1D80CE85C57 /* num_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 26F636BA86A94182E5B3D4B6371B7990 /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC7C28895D25F6E931DA5BA7812F56E8 /* CBCMAC.swift */; }; + 287AF814872A1828332826075A3A769D /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = F96BF23CF830D12FEDD7E43604266D1D /* SHA3.swift */; }; + 288250141FA353726E30472933B3E9DC /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = A860FAAA8B72A45E7A4DBB1A5E70D412 /* Prime Test.swift */; }; + 28CFAA3F415F6AA26FE3A81387558344 /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8E012E821E2E1C361C95827C144B459 /* CipherModeWorker.swift */; }; + 29924F2EF0F199F7AFA50702DFD1D10F /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 891D5D33624F23A99EC9DBBFF1DCAA61 /* AnyPromise.m */; }; + 2A72B2B6E6C45921FD002A2E3454C9CA /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF42513E74B9593131CE78F650930D1F /* secp256k1.swift */; }; + 2ADD61CDA6604966DA306959A92FA086 /* ABI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C84C17B948CBA407FE31EAEEECFC91 /* ABI.swift */; }; + 2CD7546ECD0943764AEADCD7145FF106 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */; }; + 2D6F68A3EE6AD170EDC30E7485B54524 /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9617FF9C97A50142809334E0B01FB17 /* PKCS7Padding.swift */; }; + 2E3A0CE83A9DC669521D768D83113007 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42500BB4EB58F6E89B258D12EA3A85EA /* NoPadding.swift */; }; + 2FE673D84E661D60155A11362457EEDA /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 65366C8DC193D6D3E38E8C595AA3659A /* num_gmp.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 303CD299BAF68CF57E3286E7D2DF25C2 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = C7071FF52323C987C31EF1E24C37720D /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 31FCEF8F13F00A6EB5C8E43CD2040D52 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AF34671C5E5439C0DD3DE54FE81281D /* PCBC.swift */; }; + 331FE6905358B3045B3C43F41E5E5DED /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 92E5D31F81E395B97C48C62CD69DB7C7 /* hash_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 33D0F3C5F22E0FDC84DC6516F86496EB /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = 24398DC00BA1BCB8E22EF1FDF5AD8C92 /* hang.m */; }; + 34B17DF22062E35B740FA4AA29300ED0 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD1F563FDA7A19C9E2F3C652F6C1E135 /* Division.swift */; }; + 3619B989C2E488056B62E7517BF4CCCB /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F0E95ECC77D57875AF18515D6747915 /* SHA2.swift */; }; + 373BCBD3BAFD4EEF405BA6A4B1DD206B /* SipHash-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 64D96A4A36A8A5AA89014CE3E6C9C4E7 /* SipHash-dummy.m */; }; + 37FA075C16F67C2E4B98C4D34A8C00E5 /* EthereumAddress-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E6C2D396E24165F68410447706A29239 /* EthereumAddress-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 382BA96CCC1E7E7B0927C453432C342B /* ABIParsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC336E044244591A6F79F0F8ADDD1128 /* ABIParsing.swift */; }; + 39A8574229CA6D6BFDF5A952A0738292 /* PlainKeystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 324ECBACBF53FADE4508E0991F921BB4 /* PlainKeystore.swift */; }; + 3A73C66F10621ABDDA6DA99B83737FD1 /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 689472C8CF352350A3CD7B1E7E59C6F9 /* ChaCha20+Foundation.swift */; }; + 3CB3B02AEC265ED9588E627710E76C00 /* Promise+Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 542D0C2B13E449318182E68180808311 /* Promise+Web3+TxPool.swift */; }; + 3D35EF8411FBCB48774166750EED461B /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4B5AC1F1E07F263DAC83AA9764A5039 /* BigInt.framework */; }; + 3D681CDB0E43BE6DF71048D474960575 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CA0C95378DAEB8937D1C315D2D6432 /* hang.swift */; }; + 3E4F34CF3A56C3BCA61A15667B8911CC /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5E1458539C38D066641C4E67054E10E /* SecureBytes.swift */; }; + 3E531578FF1145393154092B38E896E6 /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4256999392495EB9FABEC7E402B28532 /* ChaCha20.swift */; }; + 3E6A54D3B0E37437A4AC70E5FA3455B4 /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = F99A13C2EF8094A93F2E62428CADE0D0 /* eckey.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 3E7B3566E3CC285CAACA093A9832E526 /* ABITypeParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D90F369C275DFF1EC8501F18B40B406 /* ABITypeParser.swift */; }; + 3EF6931D1DB8885ABEDC7D6D955BCB03 /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E1640B527296E8143540D9724C734B2 /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3F234F05F3F7D53BA0A32C63FDA1C44C /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 40464D87CFD9D884A7B31C58C14B1644 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 3F6D5AB8F29A603C8B1D45808851A17A /* BIP39+WordLists.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86D1816CB67A6FCF7B1578DA72BBAE6E /* BIP39+WordLists.swift */; }; + 42C1CDB904E3BDFF4F16858486389C37 /* Web3+Structures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50BF5D525FA16E334BB0CE14B3AD85E5 /* Web3+Structures.swift */; }; + 433B07326BF66C0B669C6B2C226E9549 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2760171835447D6D826035C278C064DD /* Process+Promise.swift */; }; + 435810361677F2688E0567B9BF9D1510 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = F4041B96ADE4AB2DC81C6D01E1520F6B /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 43A213F845B41C54A0C6E74E216D28E5 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38909D1D1D234FACCFF80C34BBD908FA /* Random.swift */; }; + 43D028079C5651E507D92FF3543DAAA1 /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 9EC833B3E3BB46A92A4C47DE70502CC3 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 442BABE7C9B1479EF68FF91F97DCFD9F /* NSRegularExpressionExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5C01011429A22DE545E0E585A014FE0 /* NSRegularExpressionExtension.swift */; }; + 4439BC8E6D9AEA02C485E3D1D96B42A4 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = CF021D41994060D5828EEB3570EF7A9B /* scalar.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 469D6C96006AFE25B8A7FCDB1B70DD7F /* Dictionary+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DA298A6BE39A99E9D7A606FC61EB866 /* Dictionary+Extension.swift */; }; + 46C3B25A6C180EAFB95C8894055212ED /* Web3+Instance.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1DE17ECDE4ACD8B74BC10F97EB047A8 /* Web3+Instance.swift */; }; + 47F09AB386ECB4F06DC94B5D84B829E3 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5F518854281D5187CD0D2A099AE8E1F /* Utils.swift */; }; + 486AE96A069EC0BAA1E35FE79194A25E /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4B5AC1F1E07F263DAC83AA9764A5039 /* BigInt.framework */; }; + 48AEAA9AEFB46AF33C359BAB88AEC324 /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CE608572AD31FF362DB8F616FE3BA3E /* BatchedCollection.swift */; }; + 4901F615576719ED8E8AEB507965D52D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5E2592E125D878422270A2B22863541 /* UIKit.framework */; }; + 4BD14199C2C6D58D4B234A44B749D8BD /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 35BC2FC0319F475C0BB0DED5802938B0 /* Cimpl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 4BD49C6CEF3E4405132B4AF8CA0DE003 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5F1260B3700C4A67A1F6B962D0A34D7 /* BlockEncryptor.swift */; }; + 4BD9DF9CA6B0CE7AB933E1C688769CB3 /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E1AFF12D87C54B362C705BFE7693CC9 /* Scrypt.swift */; }; + 4C2FA74837ADF9282EC82AAEA3344905 /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = E523BAD98061D16273E2705EF059D6C1 /* Cryptors.swift */; }; + 4E7CA13DF171ABA4AA57B994027D5145 /* EIP67Code.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42A74C7F34F50640959528454C7ADF7A /* EIP67Code.swift */; }; + 4E7D3B4F4857BF0D33431DF3642F34BA /* Web3+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6881646ACF82A8F9FDCECA39F47366AC /* Web3+Utils.swift */; }; + 4F448640DE2AB108DE676C77DEF2E571 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D71857B37785CBE90B82B36A09E1550F /* String+Extension.swift */; }; + 4F98ECB60DA15591AC0D5C44DCBF09E1 /* Web3+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D41D11BFA6D30CD8497C0851DD9C600 /* Web3+HttpProvider.swift */; }; + 505CA5BFBA1D9ADF951C40E1EA125BD2 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DAF747CAA73B11A76FF5D1B0FC68B04 /* BlockCipher.swift */; }; + 509F59699E14560CA8C9071A0922A9D5 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = E349136A1DB718A586AF30A7DC511324 /* hash.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 511A621851375585E3F12ADDC7427E87 /* EthereumKeystoreV3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 541E696B5463A8496D191CDA00CF17BF /* EthereumKeystoreV3.swift */; }; + 514821AC03DEAB80E61FD438FC0CF126 /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A53224C7344478B1488A631A4405A57 /* DigestType.swift */; }; + 516069987CCD426257D9FB53C77FBF64 /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = C4A72B026B3481D0FF01C45BC4B4CEFC /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 5211E62A23DC79810DF988EBD96EFC32 /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = F920A7CF425193534FF7EB6EF32088AF /* CFB.swift */; }; + 521929B74C540A89354F6B479324C9DA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */; }; + 524F1ECEC68E0DBFE51BECDF1AF5D32E /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5731BA92FB60C72DFEC2371FC45C24A /* Salsa.swift */; }; + 531AEDA769F58EA3B5CB7B4469897C49 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3FC98049DD2477DB821E3B7BA9DE1D7 /* Data+Extension.swift */; }; + 53A6C8947D6C38ECBAAC9735D6B1F5B5 /* KeystoreManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59E39637C57D2F37915C807D8978A103 /* KeystoreManager.swift */; }; + 541EE41CC83131708FC4873E24EB6813 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB757C507F8FC74F442D6F1BC5026BCF /* Subtraction.swift */; }; + 545072A7AC12349191FBBEFCDE711892 /* EthereumABI-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D7CBEC08F89166DBCD005AB00D61AA4A /* EthereumABI-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 55D76DA09959B887783A16587EFBEBC4 /* wk.bridge.min.js in Resources */ = {isa = PBXBuildFile; fileRef = B70C4737914067ADDDF7B927A6503861 /* wk.bridge.min.js */; }; + 56042FC0568311A6A2ACC5115780C525 /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8FB6B595972CDB77622B1768EDBA2E5 /* when.swift */; }; + 5607376D582314ED41B2F29F64F015BF /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C73C3A210D9E9A675E3638D4124FA98 /* field.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 57C331CEB4B39FB0070C27DA4A306494 /* EthereumFilterEncodingExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8E661D9EF637E09D80AAAFC5092AE7C /* EthereumFilterEncodingExtensions.swift */; }; + 58518342F50B48A5451FB54693FF75CE /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 37A4EB8546247EC0A9BC21EE2F416280 /* scratch.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 58D378DF3FF9C2C523F72714F028BC18 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4E3E62100D8A348942C26EFDFA1F58A /* Utils+Foundation.swift */; }; + 59B38B239A37DCEA91F03D99EDBB65DB /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = C714668C86259E60C0444E41B71A56A9 /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5B5A1021C78EDC5EB1216C03C6B3A3E3 /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0F29F69196DDE8C7B18B22BB7716BAC /* AEADChaCha20Poly1305.swift */; }; + 5DC3242A8DF659780B2BA7423076DA7C /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B2F598919D796732EBEBF2B9066A614 /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5ED753E367A75BE0055D8AADD86B71CB /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27071742E28DDEA24E402E2086DA6A84 /* Words and Bits.swift */; }; + 5F1786E1B8206DBB670FF17083BA0533 /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C48298733543ADE743DCB301EBA5FDD /* ecdsa.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 5FCE918F81777C227E72A6C620FE0E9B /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96DE9A932DA105BDB0D9F7E14BE34084 /* StreamDecryptor.swift */; }; + 60D03407C65DD41B77633BEBA45350BD /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FB556D67EEBBC9FE8BC6D9D18E065D2 /* Square Root.swift */; }; + 60F020078907CC571799F8EEE8657FD0 /* SipHash-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FC5A1B5377410F43913058422F4FB975 /* SipHash-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 60F4B2F499CC1CA8566907DC5D3DDA97 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1B629056BCD1A0B29E0B7A2ECEB575A /* CryptoSwift.framework */; }; + 61628EFF367CD65E150CEC6436B7224D /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71160870C237FDB54F5F6B39C1EC249D /* Promise+HttpProvider.swift */; }; + 61E5C5661F226B7688E897840C549BD7 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AF4E2F3E0D1A048162CD9DF44207BC /* NSNotificationCenter+AnyPromise.m */; }; + 6364B48EBCB9241D1D75FB5F7FA4DC71 /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 636623F0AFC27BCE4832C83B4C2C5711 /* secp256k1.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 64FEBBCF2539C5D6C427FA6E165E09A9 /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DF0DF79F1C86E4187095322220061CB /* join.m */; }; + 65D4A5CFCCD7ABBBCA0E9E2CEE10CA62 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBD060B0B9D8702A510715B56DDC19EA /* CBC.swift */; }; + 66FCC04FCEB5CC2EA4BFF087187158B8 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B48A647A6F4823FD3139C0A88A84B8F7 /* Array+Extension.swift */; }; + 672775CF1B1D142513B11D15554EBFDC /* KeystoreV3JSONStructure.swift in Sources */ = {isa = PBXBuildFile; fileRef = D65EA110104F9E503B33056E4DEC5F2D /* KeystoreV3JSONStructure.swift */; }; + 67C514AAB55E4CC59A4B89DBC1E0D631 /* NativeTypesEncoding+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BBA1996EF6015BDB31DC18603F2AB33 /* NativeTypesEncoding+Extensions.swift */; }; + 68D2E365C15D702B66669BDB2DE2D027 /* Promise+Web3+Eth+GetAccounts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EB8B5D77B01F5062EBF15521EA0A15 /* Promise+Web3+Eth+GetAccounts.swift */; }; + 690C4D456CA99E69165B98684F9E5033 /* Web3+Personal.swift in Sources */ = {isa = PBXBuildFile; fileRef = F11E6EEC87603C04CDFDAC08A150FE30 /* Web3+Personal.swift */; }; + 69504F2AF1EEAE350B0F805D59E4ACDA /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 946B04DDF91DFDC0717E6FF8A3F5BCC2 /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 69E6BE13070187CED87503CD613CAEE1 /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52317509EEB497A31C47EDA71B823477 /* Integer Conversion.swift */; }; + 6DF9FDAB9C7F26B557B3A0DA94578241 /* ABIElements.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10F6512DE5B20FE9B13AB14EFC933636 /* ABIElements.swift */; }; + 6E262FD4F7951CE75C36B8CDE234BA45 /* secp256k1_swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 65211025493449630ACDE59F4289A1EB /* secp256k1_swift-dummy.m */; }; + 6ECA12EBC8C3C088A82E29B9AA883C6D /* BloomFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BD5EF5645402720EBB6C1911A6BFB3A /* BloomFilter.swift */; }; + 6ECDAE05BFAAF1CF8481B20BAA4354B4 /* web3swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F6381389003AB93AE7DEE082D4607BF6 /* web3swift-dummy.m */; }; + 6F25774B8EA3E538845FAD096A932C24 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E17BE21276DDB77E0928EE0908DEC2EF /* NSObject+Promise.swift */; }; + 6F5D85F40B8894277C27740CF462C9C0 /* Promise+Web3+Personal+Sign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41E5DD31BCCEE472F0E7A9944A6D6E58 /* Promise+Web3+Personal+Sign.swift */; }; + 710A84BE387009C61BC639D12DEB4259 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */; }; + 71B9B8543875E4E32E42B4A9A1312C01 /* BigInt-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = BD039C81CCBE816A0584340AC75A9457 /* BigInt-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 72541048B150E29F22A0CBD388ED2ABD /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 565A8FD7BF67B138CD0F83CE05D70070 /* HMAC+Foundation.swift */; }; + 7305A8877907D8AB16B39AB7AB277805 /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = B7248A2518844FF8FB81C01C51AEA94E /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 7407AA4A6B9DC3C8FA2C7915587477C2 /* Promise+Web3+Personal+UnlockAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B148BEF285BBBDCA991704A719187CE /* Promise+Web3+Personal+UnlockAccount.swift */; }; + 74291AD6673289F237FCED6BF5CC7368 /* Web3+Contract.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B7B7666CA71FCEAC7E2AAFDF044B8CB /* Web3+Contract.swift */; }; + 74AACFA2A98BDACD9FB46044E927A8B4 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B86841BA77468E728D1DA022C3293EF /* AnyPromise.swift */; }; + 74CD9FDBBCF1284F80B2BF8A37D20E1C /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = 19DE8429E289A06751CFA4678897FED4 /* scalar_8x32.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 77067A0D7F6EC55261D95BED4A518E93 /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = 062D9C6FABF3AFDE9ED77302FBC883F1 /* SwiftRLP.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 773CBE65419B40A9E8444F9EA0138112 /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E12322986FCB7A5188750A10D61D74F /* basic-config.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 77E19544FC2C5609EDB3B556F6A59B33 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */; }; + 78BA93D15E1637DB45E8F207C6A6C84F /* BIP32Keystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = B12CA03389EEA8FC37A6082513F6DF76 /* BIP32Keystore.swift */; }; + 7950CDCD0730EC4DE69E4452A2117CB4 /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB2FDC770609373945C150AB8D55EBB7 /* Int+Extension.swift */; }; + 79B64474F88117AD95243F5CFE382C77 /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E85CF9B2EE84E87E19B992031AC869 /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 7AD3EC0E50AB19EEEE1343022DAE9E81 /* Web3+EventParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = A33D7B31A153649EAAFE73327AFD17BE /* Web3+EventParser.swift */; }; + 7AFD9E747116893B7D0BFA33C4A7DEDC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */; }; + 7B50A0E57C8C0F860C0E2D3E2DF889C5 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3E8BD20BDF0C39915321B5C52B4177 /* OFB.swift */; }; + 7BD54FE9072879D7D8FF9E3CBF42F321 /* EthereumAddress.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84BFFFAC8D94F54E9A392AAC6BF0791B /* EthereumAddress.framework */; }; + 7C25D56E17A18A7ABA0A2AAD188E00AF /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = E7A31F2F68211BCAC53099040812EF51 /* UIViewController+AnyPromise.m */; }; + 7F5A057BF6CE7C10456C07593DDAFE79 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E20A79511884CD034ED58E821AB9963 /* dispatch_promise.m */; }; + 7F758DDFAF3D2F78C3FCE40009226C31 /* EthereumContract.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33956022CB96C24F3DEE7ABE10DE83A8 /* EthereumContract.swift */; }; + 7FA4D5AF26202B4C493F6349840E6215 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BEE4B0903B74B5BD6F84FC210AE80B0 /* after.swift */; }; + 80826C6547E303565F38870D25564B23 /* WKBridge-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F0E85EBA5CC5456C331AA49EF82E3483 /* WKBridge-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 815AE90F23754A0CDD43C46A3E4D097B /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB791012FF3E163437EB0CAB98D55BF7 /* Resolver.swift */; }; + 81E624F2E60C885DFCBE97C533144E5B /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F150F672F56CC5A829842B06F3FDDFE /* field_5x52.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 83009CD89A5677794EE37AEA37F14223 /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EC71259233835B41A5A554C88E18649 /* Catchable.swift */; }; + 8322BA13EEF4C52C53DB7596E0AD68E0 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 12E8D11B7DA2DB8E7A2E76105D0C7544 /* PMKFoundation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 83A11C4D1D8A371F0C08EDA7AFF4156D /* Promise+Web3+Eth+GetTransactionDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECE68C8BB981C254FD7ADA05F97DAA0F /* Promise+Web3+Eth+GetTransactionDetails.swift */; }; + 83B5BC56560C7D387AA427415CEAE05C /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0C689AC74B3E30F98DBEB9EC81F2A46 /* BlockDecryptor.swift */; }; + 83B6E486549B4A12E2D126B91B4E317E /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E153E8EBD86647263301C6E6A153E86 /* eckey_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 840088C95BD348EF752325719E5FD3A6 /* ComparisonExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00F39DD73D1D89F1983D0C79F273311E /* ComparisonExtensions.swift */; }; + 8413BF7A30C04021BED6564D4B77738C /* ABIEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8318D9A04DD887291DA86FA0BC263C42 /* ABIEncoding.swift */; }; + 84AD9AA7FCDCF491E5F839BDA9E62923 /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E78EC4E433E08662483F70A1F8ED62 /* Rabbit.swift */; }; + 866F37DBC526107DFA0837C799950BB6 /* Web3+JSONRPC.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C90CE06DC9958A4F81C4447FB43BB6 /* Web3+JSONRPC.swift */; }; + 878645FC5C5AA385461FBF097AC34764 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40F0165751F94455542A7A7D744E5868 /* afterlife.swift */; }; + 878FA7AFAC9A5F2C96A75F6B2A7ACDF2 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 206AF79124DC369D97D761130E5258E3 /* Error.swift */; }; + 879A1A29A87F21EEF155FFDBFCC819A3 /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D2C18BCBD74E4D525C72CF46DE26110 /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8810B1755E12EA66B16B02545A73842F /* WKBridge.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D2743E7F22E7046D29BA1B4B30C249F9 /* WKBridge.bundle */; }; + 8816DEDF81268823C029BB076619038E /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 29FB4C7393B3C84320BFDAE8EAA115BA /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 8817A69E6C85E2BEBA24BC0490DBF26B /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = E4611ED6EF7395079ACCC6EF9EF2648A /* main_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 88D423232D4BCC30F1B60BADEBB464D1 /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = D89CCEEBCA76D9E2EFC5BB67E76F0837 /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 892CE74F3E4A889E6F69425C79DD7E55 /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3A71EF005A3B4FAD7DED21F449C3EE2 /* AES.Cryptors.swift */; }; + 8A33228BA4C6B84613ACA9834C13EC9B /* Promise+Web3+Eth+GetBlockNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = F67F5F5BD5149669AF5633225D196140 /* Promise+Web3+Eth+GetBlockNumber.swift */; }; + 8A665C5336BE77B07D853FD06713690B /* Pods-web3swiftBrowser-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A02A35A4F2E0BC3921E16844895653B0 /* Pods-web3swiftBrowser-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8AA4F289B20DB86C6D5CFC0551222C48 /* CryptoSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 28CCF54795809F1AD0E17AFB25AD2B49 /* CryptoSwift-dummy.m */; }; + 8AD698D80534E787ABF4E533E6D7598C /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ECD71C919CAE4C6A9E3B282EF0B3D74 /* Guarantee.swift */; }; + 8AE7AC39D2792CC5429814826DF23D59 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307CE8E75570F9CEB673E76E355FC654 /* Promise+Web3+Contract+GetIndexedEvents.swift */; }; + 8D5BA4D08F578660123B2E81CE8D0C84 /* EthereumAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34DF5BCF035BA07B33ACEC8EE07FD8DD /* EthereumAddress.swift */; }; + 8D94C3199BDD8BD58F284FDE8DF799C7 /* Web3+Methods.swift in Sources */ = {isa = PBXBuildFile; fileRef = C713FD62CE54CBCDB4016C39AE9FDDC3 /* Web3+Methods.swift */; }; + 8F4EFA8B45792F0E1132D47FCB66D5C5 /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = BA535050C5A6D04616FD5C982B59CD32 /* lax_der_privatekey_parsing.c */; }; + 8FC26FC4527AC222B1C2F40D4E1F3D81 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F0CC651AC5CA8E789308F515200E02A /* Primitive Types.swift */; }; + 90BB63BE1A3F2906186D961714165CD7 /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12A1718EFBFA304BB295D486CC6DDB28 /* PKCS5.swift */; }; + 910DECB543C55FB96E09E4E2557A6755 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 368F1410F802290995CB5C9BF967D229 /* Exponentiation.swift */; }; + 91EEA882F90DC420CC971255DB2B91D4 /* SwiftRLP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7FE9449730F32989612680CF7B0ADCE0 /* SwiftRLP.framework */; }; + 938239477B6A9C665CB93642E1DFD0EB /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2A505AB695098EBEFB3D7CCD6CCDBD3 /* UInt128.swift */; }; + 948C38948743D31A8E07ECF1278C0438 /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = E58EA42D8997BE6B895966D7349728B0 /* PBKDF1.swift */; }; + 970A66DA078EAE00112AF99B6A8E2743 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = B285972B02773D32DA37B50342D3C441 /* NSTask+AnyPromise.m */; }; + 97D85307763F8B8299524EEFD059729E /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA174416833D677ABCB0BA66EF73C794 /* StreamEncryptor.swift */; }; + 98CE98572CFA84CF0113B0B95D197CED /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = FFBA39EA8661DEA5878E3A05D1FA703A /* fwd.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 98DA224F5999FBB83A4D2090F9CFBCFC /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7360A21DD120411552BEB0A46979C113 /* AES.swift */; }; + 9958F9D586E3B4A9B800DDD1B809046C /* Promise+Web3+Eth+GetGasPrice.swift in Sources */ = {isa = PBXBuildFile; fileRef = E36A1DDEEC24A045F94D5AA2BAED727B /* Promise+Web3+Eth+GetGasPrice.swift */; }; + 9979250510F331D6F6C4BF5F8A07234C /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5176316A82C935673D351FFBE8525B9 /* Rabbit+Foundation.swift */; }; + 99C1CB799C2708904B77C48469B5D2CE /* UIViewPropertyAnimator+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8FE152E35A78B5989B4D55C6E01D198 /* UIViewPropertyAnimator+Promise.swift */; }; + 9A033C23BEBE8097E0A3B1C2DC2399C3 /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = 96D9786FECD142DCF0FC2CE63497CE9A /* ecmult_const.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 9A683FAB2843A7181358FFC2F9AA7FAA /* BigInt-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B50D4481F4B63FAB12C79BCAA18DCD0F /* BigInt-dummy.m */; }; + 9AE3952131E530F55D34A350ECC9B909 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = F01550F0F03E400613B77FAFC01A8FF0 /* Multiplication.swift */; }; + 9B1D8B3F81DA09FA60C1B87DBD2D3F63 /* EthereumAddress-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CA9C67E1505CC590B1C66CD4094EFE4B /* EthereumAddress-dummy.m */; }; + 9B76CBD3C4E3BF68F7D98105D748DD23 /* secp256k1_swift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 86AFF41F0299157D70853C515F4BF386 /* secp256k1_swift.framework */; }; + 9C74C32724E1E50BB5C0C3814BE5157E /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = E4E82201804431BAF2192B73FD6FF539 /* field_10x26.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 9DA1244904AD9E535DFE95EC136A5799 /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFCC6B16030BE9425E5F29A066364CF2 /* Floating Point Conversion.swift */; }; + 9DB4F701AA25B29530B637CEBF119539 /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6A110A95F963A420BF7C34E9F05A6A6 /* RLP.swift */; }; + 9E0EA761A039CF1D354B222E90243CF5 /* web3swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A131AD6DA92EBABD1E5C58625BFBC416 /* web3swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9E4D717515815E3308EC9DC06966D0B1 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = BCCC751CE0AB5AE1FDC9E568D696DAF4 /* after.m */; }; + 9E500E32A76DA2F6356AA3391AD1311C /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92D22B73F9E8D52B7C3B6D9DB75DC95E /* BlockMode.swift */; }; + 9E8CC528BCE6CD8751B925E2DFFC7E72 /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CCC4B276372F3617E9FA8542C905713 /* String+FoundationExtension.swift */; }; + 9EA2F7C896BF5E76DBA0592AD5098EA8 /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = FB2EA77B3D9E5B9D373E510C409F9D9F /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 9FB73B8E5CD3587FE8A9F8B1ED94DB00 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E0347E5B00F3BD0CCEFDDBB51F86D93 /* num.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A1257C2EF19E838CC9954197DDCA5734 /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13EBECB5D300E44E2990E4880EB1E2E0 /* Updatable.swift */; }; + A235EBE6F35C5CE3D9A4897EF9458536 /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = AB91F828E995E49B38C1FF2FF4AB41B9 /* AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3B3988D1BE65A4B037754384D6E2A8F /* CryptoSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 91EA7B53FDE18767FDBA0BF51DE25031 /* CryptoSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3B5C83EC08D179D48D072455E25C16D /* EventFiltering.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E88FFB81700974B3E763F82320864A2 /* EventFiltering.swift */; }; + A40347FBA49DCAF786314B76D48EDD88 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 406D92F6318C2D2FDE44655D6AC38A54 /* Authenticator.swift */; }; + A6B9BF2F0D5DEA52AC43A9863779A093 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A460A8BF9D5B12FF2A0DAF89B087E08B /* Codable.swift */; }; + A7F90D1983A30E71A1F2E14903595CC7 /* RIPEMD160+StackOveflow.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9CB9DEF9D24AA7C3CE36E4B1661808C /* RIPEMD160+StackOveflow.swift */; }; + A80714DA1FDAEB79B1C40745973DEDFC /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4359453F2A3367521E7F3A5AD25CDD3F /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A84072A0FF9E2E8060F199A0B5B49F36 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72312181430CDA8D72ABA61658459BFE /* Thenable.swift */; }; + A89883197ADD5C0B0E2D8C797E23A8C3 /* EthereumABI-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E00048326E77E5C8CFF0383F8739C1A /* EthereumABI-dummy.m */; }; + A95AFD0C2BC0C07CB65C970E57D177E3 /* ABIParameterTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 391C4280C6A01CB9846859C1FFE83915 /* ABIParameterTypes.swift */; }; + AA26709A41864C5147351BEBEB1EB6E2 /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B763DDE0268D6D9332897A195BDF78D /* Promise+Web3+Eth+GetBlockByHash.swift */; }; + ACC1F645D1E18CD0290FF25A19FD256F /* Web3+Protocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62D1EC7EE1A8DD6F9D29A13516592DFC /* Web3+Protocols.swift */; }; + AD251E7937B3885E2B635F6FE675F9CC /* EthereumAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = BF260D435734569BB8C726F8D071E8CB /* EthereumAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ADF002888B9B556442E02EE52A42A3E5 /* PMKUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 451F30EF753C7E51F2A54B2DCEAC0F15 /* PMKUIKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AE4BEB8FDA432C14865B73FF184D36FA /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1B629056BCD1A0B29E0B7A2ECEB575A /* CryptoSwift.framework */; }; + AF82951396DEAAC0D2EC0094529EEC0E /* AbstractKeystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EFDA840159430F66637527A30AC9B91 /* AbstractKeystore.swift */; }; + AFD68E6B13C8C94F2AE939D73A1FBBC0 /* EthereumAddress.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84BFFFAC8D94F54E9A392AAC6BF0791B /* EthereumAddress.framework */; }; + B2C95AF0913B22FAC6381544E5CB24B5 /* Promise+Web3+Personal+CreateAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = E31DB4951BABF1FA92A5DD9A156FA8B7 /* Promise+Web3+Personal+CreateAccount.swift */; }; + B33CA635DC508E5B761478A92EE0F136 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39DD919FF492E17F9100996422AC1508 /* Configuration.swift */; }; + B36B455F657969EB188E7565DF945D8C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */; }; + B4EBAAA60F52804AA9213213860A16EA /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DA7843B23C33194220A0A42069EEAB1 /* ecmult_gen.h */; settings = {ATTRIBUTES = (Private, ); }; }; + B514B4E9DB02B1EC4321D62DFA0524A1 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC72984CEA465EB43AB30D0471B8665E /* Hashable.swift */; }; + B62CACA365319AB8308998971E9FE248 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 40CBCE6B505653A1F75F1A7D05CF2BB0 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B6A966F2C5D597B0D0F3FA0764CFB5E6 /* secp256k1_swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 31BE620C30B7F661020814723E9A4225 /* secp256k1_swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B7B562B6DF28A81C460A537715E46FDD /* Web3+Eth.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCB80A7BBF94A82EA7B094D6247C326D /* Web3+Eth.swift */; }; + B7E7FA8D90FB4C6AE52A0DAA055E8A91 /* BIP32HDNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25206B780E1095DD8A556008D0EFD481 /* BIP32HDNode.swift */; }; + B7F3D476C87C0EC57139955A579FA3DC /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C3AAAE22680746584135041FCB912E /* Comparable.swift */; }; + B8AC31FF13CB4D0F71A7655A01AC3389 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB771366BAAF8741157D9507D0D790C2 /* NSURLSession+Promise.swift */; }; + BACD5D8ED9A6CC34F201CF3E4AC9337A /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E05124E91BA4591DB0BF994ABF679 /* NSURLSession+AnyPromise.m */; }; + BB2EBA041C1D99F0E24A16187D135DD1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */; }; + BB7715EA617B76E46F2FD6F6BDA9383C /* Promise+Web3+Eth+SendTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1376CDDC29869E19D993178B6AC1A129 /* Promise+Web3+Eth+SendTransaction.swift */; }; + BB8192451EF7E13509E103A4600B425B /* scrypt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D09A4B53633B0FCABF560E464F19BBED /* scrypt.framework */; }; + BC5A7791F499DEA385857C4883691D04 /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4E15BD868B7451191C19B591710E5A5 /* Deprecations.swift */; }; + BF1CBE2864240ABA0FFCA1990215D2C5 /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90E2AECF50D5615909E614BC523EF269 /* Padding.swift */; }; + BF2BC7810ED77CD581F80CEEE9EF13FE /* Promise+Batching.swift in Sources */ = {isa = PBXBuildFile; fileRef = 544E5616451C52825554845F26D60869 /* Promise+Batching.swift */; }; + C03A5E7CDA94D1EEFAA95BD7C8AA8A80 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */; }; + C1157E9525133C26CE4356BF5D9CC345 /* Web3+Wallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B8615EF5D46BD32F614236A86B3A18B /* Web3+Wallet.swift */; }; + C14B28E1B085DB351DDFC83187893EAD /* SipHash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69D7BF66AADCC0A28B7630C346BD9FA7 /* SipHash.framework */; }; + C1C43C97C18AF274097C08F6DB96B3F0 /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BD122AF1F62FC100EEF85049D4D920C /* PromiseKit-dummy.m */; }; + C336A99180A6D5AD84C44CC15F48E2EE /* ABIExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B99F243F4D23E83F6B35849493C403AC /* ABIExtensions.swift */; }; + C441B6F6F01DCAC9C0FE6D31193EDCDC /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B20BA6CCC201B4EB3604F16C9256EB3 /* when.m */; }; + C4588BD98D41DCD0F44F6FA043DC15FF /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307616C6A80CFE4505531FC5A4611B5C /* UInt16+Extension.swift */; }; + C46FEED96A64B1FC8B72B8650E6CCAB8 /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 7853B24622707B8DB692B1A0E1EB8260 /* scrypt.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C4CDFEEEDDAD44CED19260B6DBEAE02E /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C25E00AF342D92A280F30659A49D3F9 /* Collection+Extension.swift */; }; + C4F766173E97C087AAABE2A8F8F27BE6 /* scrypt-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F259EE97EF815BB3F76F27DBA855651 /* scrypt-dummy.m */; }; + C5443D345E878DA9400BCB516DF56B12 /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70E57365C8A66C10AF9519E9A5EC1964 /* AES+Foundation.swift */; }; + C8B8E009A0D7C10B5AF099126D4C2CF2 /* Web3+Infura.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A6CA0A2631E73B74977A5EEF611D45D /* Web3+Infura.swift */; }; + C8F56AFE1314D0FEA0624469D6D4DC94 /* SwiftRLP-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A9EE071D88E3F4715B3B496529500DB0 /* SwiftRLP-dummy.m */; }; + CAF579CC2CED09FBDCE2864827B8A085 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6B1C4BF2AB8814190CA26B07BED6EA /* BigUInt.swift */; }; + CB3DEE2F11A1123D6115B651C38FF59B /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BA4DB1D132786518B1CD01DCFCF4552 /* String+Extension.swift */; }; + CB9E28ED036D0671ABA94278E83ADC49 /* Web3+MutatingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = D82FE8B893C5A39208C326028C27B679 /* Web3+MutatingTransaction.swift */; }; + CBD2721CEFBBE23D6F3B7F3F86165BD7 /* Bridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB8D4DF4B11DD9931D7FBB48FEAC7DA3 /* Bridge.swift */; }; + CF242CC22A5E926B526EDFBACDACF71B /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 362C19AA54822D5E48C43123219374E0 /* ecmult.h */; settings = {ATTRIBUTES = (Private, ); }; }; + CF5BD058C3E2C78B0DAF6358755DE4BC /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13459E0970243A6475DD720C5C5ECBB6 /* Array+Extension.swift */; }; + CF9E91FF64AEBD06486F49509872C007 /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0A8EF22FBDF6BD96A3D73B1EE21A8CB /* ZeroPadding.swift */; }; + CFE8E9ADF0B2C6758E619C4CDB178CF4 /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B85C211A21CDBD9C8D265211586674 /* Blowfish.swift */; }; + D0FADC96E8F7801159BFBB1314143B58 /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = 621EE5F99F75465A1124BCF732CAA05F /* Cimpl.c */; }; + D298B2FB17474067F30A1CC45CB8CF59 /* Web3+Options.swift in Sources */ = {isa = PBXBuildFile; fileRef = 858FE8C832C8AF89EB75CD71170E1C11 /* Web3+Options.swift */; }; + D3F0FDDF83E5E27D2159EFF7BB764012 /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 0CFCA591C39DE0DAD7358D92B3641F1D /* lax_der_parsing.c */; }; + D40DC88727D4B8B7F73F5145ADC440A4 /* CoreImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B08667AD4A557EF6D5285A60C564FC42 /* CoreImage.framework */; }; + D41CBBA4660B26D0AE12C867C2D27DF3 /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE3E7A78534269CF3CD526A2A1F789B9 /* SHA1.swift */; }; + D46F7A664AF8E32F279796216BD7D44F /* Promise+Web3+Eth+GetTransactionCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF748D9F54E1A14415902EA96FD6D0CF /* Promise+Web3+Eth+GetTransactionCount.swift */; }; + D635C2DBC6036691665B3309B59D6C2E /* SwiftRLP-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C3661F81034FA201DE95CFF6804DBE7F /* SwiftRLP-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D9E4551F2781BB1F0A7F2B2487B807BD /* EthereumTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = C437CD71580F73919581C4632318AE05 /* EthereumTransaction.swift */; }; + DAD449D02AE6A0ED29999074BF3B8102 /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE9A4E1F012F918A399F1D4374F5EFAF /* BufferStorage.swift */; }; + DB6F71BBDA7F04D880A8384AB7BBB396 /* Web3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F8A9FD6B3B6A7356DD63CCD32069DBC /* Web3.swift */; }; + DB89FEA78F107128C40F87A238CAD98C /* Web3+Eventloop.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD83C6989AAE345C22EB457E17D3FA74 /* Web3+Eventloop.swift */; }; + DBD97B9D166E3D04E502A6664E2155E6 /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = C873F258D4ECB7658F720D01655A322C /* UIView+Promise.swift */; }; + DBE553B80B7B7A047BC80FADEC7B5F83 /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CB8E17B8EE0B6C2480C96F79D789F69 /* HKDF.swift */; }; + DC7336EC3F7331F6A630EDA5F32F30E7 /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA73B1B0CB87877BB26D1A122A8B99FC /* AEAD.swift */; }; + DDFAEFC66B26C97D9B0FBDB88DE6077B /* BIP32KeystoreJSONStructure.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0025188EA3228DD3211ACDDE025D320 /* BIP32KeystoreJSONStructure.swift */; }; + E1705CF699458B16784782F8A86F23EB /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A14AD6290BE667C8948C69A74CBE719 /* CTR.swift */; }; + E25CC0BD6475813592D7722F3FCECA43 /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9044C673C01EC75BD5C634185B7FF160 /* ECB.swift */; }; + E4339E5E7ECB60FD90211A3CD8E64568 /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CA1A89AEB94FBB90F1A43A95699DBE3 /* UInt32+Extension.swift */; }; + E4DD719ABBF7C744F5D7E48426BA461D /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = 8DE3D14EDCC1F521B41873B5806197FF /* group.h */; settings = {ATTRIBUTES = (Private, ); }; }; + E766E43AFDF18D5012C83670A1B48A27 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 104575A0B9C97E5E12A25CE66E7C5172 /* Blowfish+Foundation.swift */; }; + E8CA9824DFEFDBE5FC430276A237F97B /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BA3C8D1E35D4FA6C86B2C9CD2E3A62C /* Data Conversion.swift */; }; + E9BF248618ECAEAA87DEC0E52791B3B3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */; }; + EAB81225067608C7D770E34314000E54 /* EthereumABI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75BBD65C7F475167F8986FAB6A6BC661 /* EthereumABI.framework */; }; + EB6960534DC994F693416785194067EF /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = 92567CADB38E81705DF451EF01AA6AC7 /* util.h */; settings = {ATTRIBUTES = (Private, ); }; }; + EC242E2446B7867BEA4FDBCF3DF21C0C /* Web3+ReadingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = B898BB32772DFFD2CF28F1EDFA664337 /* Web3+ReadingTransaction.swift */; }; + ED33D11F2EE6A9FD5ACDD70C7321F019 /* BIP39.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32CE559EA6C174B4184662AC6704496A /* BIP39.swift */; }; + EDCBAD6FE0DC05519BE87FA79D6ECCD1 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AC34580C2A4A62877DB38C69B59FDEA /* RandomBytesSequence.swift */; }; + EE851A358B5CFC5DB55B649D4E0F6817 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10F1B9DCE2F6C8A0F77F404B3CF5DC8C /* String Conversion.swift */; }; + EF2D257F439AB4E0C37E407B20DF41BC /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A372E9BE81FEB4E6595E16504874649 /* Cryptor.swift */; }; + EF3ED3977E4419E08716E4837C55BAD9 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 1937050612CE7BA9C2FD5606B8CBA5E0 /* UIView+AnyPromise.m */; }; + EFB38A3AC0C79689874458BE12601515 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D27B55643A375443A10C5FBC5B412E6C /* Data+Extension.swift */; }; + F13C10147FD70A83FF09E607E4A02D82 /* IBAN.swift in Sources */ = {isa = PBXBuildFile; fileRef = B682EADF3606618490DE2BDC22BAF5FF /* IBAN.swift */; }; + F14C2AE999E9BEC413C9B6C006FC3525 /* Base58.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90B5C042B418434B2F5298F6B176B1F1 /* Base58.swift */; }; + F1631F5F7CD77D9527E4FE5EEFBCEB3D /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69D13C6F2D474D345F3C62E4404D449D /* BigInt.swift */; }; + F503C6CF7B01C55540349E399732C0D1 /* Web3+BrowserFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97F28F0E9DF36732F3114E69BFE48A95 /* Web3+BrowserFunctions.swift */; }; + F5BCE1E730F746F620A9DB13EE2C1B60 /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2462799983D9188216A26DCD7CD51F11 /* Generics.swift */; }; + F6666F3FE8D03AFE4FDEE4421D50B914 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB16B9341AB0EF82837820815F7D5F20 /* GCM.swift */; }; + F68103A274867FC3D714744E8A1E1A27 /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF040A0EE2F4531B7E16666B1D49218 /* Bit.swift */; }; + F6F9AF37C197AAA6E2F2341E1D2F3EAD /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DACF2245288A10F8DC82E76CB5AE107 /* Poly1305.swift */; }; + F6FCAB11BE49F63A1CB2C1635F70482B /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F6832F3872775C7589031CEFD3D3344 /* race.m */; }; + F755BAC8DF9939C2D5F69BA342182F12 /* web3swift.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C7AFE1A1CD765C4C0CD104A148784DE /* web3swift.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F79164F06C90C81A48EB83EE0AB5F761 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99748D72CB2448D4F30EFFEF9F9636D4 /* SipHasher.swift */; }; + F7B2B783AC72C8F47FA88372798B2232 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */; }; + F8DD154677493E8C442C99739A25C33C /* Promise+Web3+Eth+GetBlockByNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07FD3969B760763BEEEDE945A6E38421 /* Promise+Web3+Eth+GetBlockByNumber.swift */; }; + F94C10C305D8C9DA78C97BB2FD7A6786 /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = A10B704CFEAD959114479F5012CD2532 /* scalar_4x64.h */; settings = {ATTRIBUTES = (Private, ); }; }; + F9A32A61F4618BE82B7D31D98764A4A4 /* CryptoExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01E9833E49E6D2D8F06EADE27064F8C /* CryptoExtensions.swift */; }; + FA024A288AA4357EB04E48AF9BCE53D1 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1B629056BCD1A0B29E0B7A2ECEB575A /* CryptoSwift.framework */; }; + FA6FDD79C516BF0B0989FB5BE916E68F /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4B5AC1F1E07F263DAC83AA9764A5039 /* BigInt.framework */; }; + FB60E1ACA882A4A355806B9E3607339E /* TransactionSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE6E6E31E3E393B6CB357229FE36FAD8 /* TransactionSigner.swift */; }; + FDB241EEE48E72130F3660732CB636AA /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E2FA12D8596CFE06F4142DB6BCF99A /* PromiseKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FFB816CFAA25371F9D03B1B19BB52F0C /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 613E99CC294DBBBA463C2B4D8ACE9BD1 /* Promise+Web3+Eth+GetBalance.swift */; }; + FFBA8696A49B49BA33D1499546FCEC58 /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 733A9B74D1EC3F4A9A9C2DAC1D2177EF /* Shifts.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 006C656F528857067DA0DCD83953E6C1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6B2BD3AE818AA2BB4A99C917FC4D7BB1; + remoteInfo = web3swift; + }; + 029E29D8B81AE5D437799689C0E167A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 70B9B02B65110648B14877481CCA7615; + remoteInfo = EthereumAddress; + }; + 054D99CBFB470CB076380C2E38C44FD8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 137411A4D3CCDCAE6EE1A79271E0889C; + remoteInfo = BigInt; + }; + 059CDDC6050505123137B45381E2FCB7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7ABECC867E8D48C3DB5FA3D8C6D7E92E; + remoteInfo = SwiftRLP; + }; + 1DAA2A8DE3F6478894FCCD6AA0C45BA2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = F3894E5CF485C0E7597132389A4A5184; + remoteInfo = PromiseKit; + }; + 2FA32F8330EC7F6C6E3F77FE126086D6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9441B2FDFEA998907E1265F5E274B882; + remoteInfo = scrypt; + }; + 48510A0AF73E49722A3143C5BED7DDA1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9441B2FDFEA998907E1265F5E274B882; + remoteInfo = scrypt; + }; + 4E9D74E7CDF6D61C608BA27D99B37C91 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 70B9B02B65110648B14877481CCA7615; + remoteInfo = EthereumAddress; + }; + 5798E623C400C35A25502C267904E058 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 888C7AD1D57FC2EBE4CF200F6BD2A842; + remoteInfo = EthereumABI; + }; + 59D976835BD89262523E7053FA4AB189 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 137411A4D3CCDCAE6EE1A79271E0889C; + remoteInfo = BigInt; + }; + 5ED7085516CC4C38EC3D8A95CD2F66A6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 137411A4D3CCDCAE6EE1A79271E0889C; + remoteInfo = BigInt; + }; + 6C195B6859DCD8F2D3C782F5FD430E20 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = DD5642DA01E4562317625956478C4871; + remoteInfo = secp256k1_swift; + }; + 6EFC843E872F80A24BD00A4CCCAD2D9E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6F5F8CED7C3379A0404E745819F8B311; + remoteInfo = CryptoSwift; + }; + 6FCC81CE6704A065043446C3B1417938 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 137411A4D3CCDCAE6EE1A79271E0889C; + remoteInfo = BigInt; + }; + 762544960A4DDB6CB89CA98F3FB11E31 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = F3894E5CF485C0E7597132389A4A5184; + remoteInfo = PromiseKit; + }; + 7BC7567AE0CFD664FF5852311BB37F3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1F2F1FBE901FE03D2F17A9F6FC7AF7B0; + remoteInfo = "WKBridge-WKBridge"; + }; + 819472C9CA5B12290E4B3D5D1BD88D51 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6F5F8CED7C3379A0404E745819F8B311; + remoteInfo = CryptoSwift; + }; + 85C88091B1ACBA57400E03A1EB7F3ACE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 10CE248718E0C5B72B7E3D962D834A1F; + remoteInfo = WKBridge; + }; + 915DAB95B318BB6C015A64D97054014A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7FF8752D2607B0617A8EA59CB6F52DA7; + remoteInfo = SipHash; + }; + A4B9D3E6898271819A4A87350E28CAA9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 70B9B02B65110648B14877481CCA7615; + remoteInfo = EthereumAddress; + }; + C6C17D0086F8D9E70B8AF619657FF2BC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7FF8752D2607B0617A8EA59CB6F52DA7; + remoteInfo = SipHash; + }; + D9070BF395305634365FA26967ADA25B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 888C7AD1D57FC2EBE4CF200F6BD2A842; + remoteInfo = EthereumABI; + }; + DEE978CB09E9ED72BBBC50BF4790740F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6F5F8CED7C3379A0404E745819F8B311; + remoteInfo = CryptoSwift; + }; + E19B5B3C2803C0BC123423D9AC962A2D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7ABECC867E8D48C3DB5FA3D8C6D7E92E; + remoteInfo = SwiftRLP; + }; + E4FC701433367BA181560601B8D6E1A3 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = DD5642DA01E4562317625956478C4871; + remoteInfo = secp256k1_swift; + }; + E8FE9B34F5286A63BC37DAC6EA777F8E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6F5F8CED7C3379A0404E745819F8B311; + remoteInfo = CryptoSwift; + }; + F088BCFA58BE219A05988AB5110D91FD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6F5F8CED7C3379A0404E745819F8B311; + remoteInfo = CryptoSwift; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 007D6C3F9DCFC9239BCA248B0E2DFF2D /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + 00F39DD73D1D89F1983D0C79F273311E /* ComparisonExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ComparisonExtensions.swift; sourceTree = ""; }; + 062D9C6FABF3AFDE9ED77302FBC883F1 /* SwiftRLP.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftRLP.h; path = SwiftRLP/SwiftRLP.h; sourceTree = ""; }; + 068F7D300822D361C595574A9744ECFA /* secp256k1_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = secp256k1_swift.framework; path = secp256k1_swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 07842A4A7594D4FB43E140B6213CD7AE /* secp256k1_swift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = secp256k1_swift.xcconfig; sourceTree = ""; }; + 07FD3969B760763BEEEDE945A6E38421 /* Promise+Web3+Eth+GetBlockByNumber.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetBlockByNumber.swift"; sourceTree = ""; }; + 082CC56E889112D5D9469E5D80B8C71B /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; + 0B86841BA77468E728D1DA022C3293EF /* AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; + 0C7AFE1A1CD765C4C0CD104A148784DE /* web3swift.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = web3swift.h; path = web3swift/web3swift.h; sourceTree = ""; }; + 0CFCA591C39DE0DAD7358D92B3641F1D /* lax_der_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_parsing.c; path = Classes/secp256k1/contrib/lax_der_parsing.c; sourceTree = ""; }; + 0E0347E5B00F3BD0CCEFDDBB51F86D93 /* num.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num.h; path = Classes/secp256k1/src/num.h; sourceTree = ""; }; + 0E6BDD6A18A0A98E719C9100AB141D82 /* scrypt-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "scrypt-Info.plist"; sourceTree = ""; }; + 0EAFCA8048E1F2A5B44C6A36ADAA3C10 /* EthereumAddress.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = EthereumAddress.framework; path = EthereumAddress.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0F0CC651AC5CA8E789308F515200E02A /* Primitive Types.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Primitive Types.swift"; path = "SipHash/Primitive Types.swift"; sourceTree = ""; }; + 104575A0B9C97E5E12A25CE66E7C5172 /* Blowfish+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Blowfish+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift"; sourceTree = ""; }; + 10F1B9DCE2F6C8A0F77F404B3CF5DC8C /* String Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String Conversion.swift"; path = "sources/String Conversion.swift"; sourceTree = ""; }; + 10F6512DE5B20FE9B13AB14EFC933636 /* ABIElements.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIElements.swift; path = EthereumABI/Classes/ABIElements.swift; sourceTree = ""; }; + 11740C9C5ADCEDE3F9F474C910AE177D /* WKBridge.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = WKBridge.xcconfig; sourceTree = ""; }; + 12A1718EFBFA304BB295D486CC6DDB28 /* PKCS5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS5.swift; path = Sources/CryptoSwift/PKCS/PKCS5.swift; sourceTree = ""; }; + 12B5186D6005F8A96238E422ED611D16 /* Web3swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Web3swift.framework; path = web3swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 12E8D11B7DA2DB8E7A2E76105D0C7544 /* PMKFoundation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKFoundation.h; path = Extensions/Foundation/Sources/PMKFoundation.h; sourceTree = ""; }; + 13459E0970243A6475DD720C5C5ECBB6 /* Array+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Array+Extension.swift"; sourceTree = ""; }; + 1376CDDC29869E19D993178B6AC1A129 /* Promise+Web3+Eth+SendTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+SendTransaction.swift"; sourceTree = ""; }; + 13A4E032075CD48B220512CD2E572CE3 /* PKCS7.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7.swift; path = Sources/CryptoSwift/PKCS/PKCS7.swift; sourceTree = ""; }; + 13CBA29E86E7029B3D6D8C8E5E459D91 /* firstly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = firstly.swift; path = Sources/firstly.swift; sourceTree = ""; }; + 13EBECB5D300E44E2990E4880EB1E2E0 /* Updatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Updatable.swift; path = Sources/CryptoSwift/Updatable.swift; sourceTree = ""; }; + 171C1B4115FFABA129DA2134F08A7517 /* Promise+Web3+Eth+Call.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+Call.swift"; sourceTree = ""; }; + 180EA8D0AEC14E5267B872E9CAD75E87 /* web3swift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = web3swift.modulemap; sourceTree = ""; }; + 18EDC06AE59AF6AF4A5A214D18BC0228 /* SwiftRLP-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SwiftRLP-Info.plist"; sourceTree = ""; }; + 18FF56EF6E70BE342A92437F9EAEF056 /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; + 1937050612CE7BA9C2FD5606B8CBA5E0 /* UIView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.m"; sourceTree = ""; }; + 19DE8429E289A06751CFA4678897FED4 /* scalar_8x32.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32.h; path = Classes/secp256k1/src/scalar_8x32.h; sourceTree = ""; }; + 1A35A35171C6DCDD78DE9D7E912AEF40 /* MD5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MD5.swift; path = Sources/CryptoSwift/MD5.swift; sourceTree = ""; }; + 1AFAE3BE99E70D61C8B31B3AA3850D3C /* SipHash-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-prefix.pch"; sourceTree = ""; }; + 1C48298733543ADE743DCB301EBA5FDD /* ecdsa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa.h; path = Classes/secp256k1/src/ecdsa.h; sourceTree = ""; }; + 1CE608572AD31FF362DB8F616FE3BA3E /* BatchedCollection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BatchedCollection.swift; path = Sources/CryptoSwift/BatchedCollection.swift; sourceTree = ""; }; + 1CFE307BBC4FC48203B269E8D5E575FC /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DA7843B23C33194220A0A42069EEAB1 /* ecmult_gen.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen.h; path = Classes/secp256k1/src/ecmult_gen.h; sourceTree = ""; }; + 1EC71259233835B41A5A554C88E18649 /* Catchable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catchable.swift; path = Sources/Catchable.swift; sourceTree = ""; }; + 1F6832F3872775C7589031CEFD3D3344 /* race.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = race.m; path = Sources/race.m; sourceTree = ""; }; + 1F6C4C9241708169F8BB5415B3063214 /* Digest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Digest.swift; path = Sources/CryptoSwift/Digest.swift; sourceTree = ""; }; + 206AF79124DC369D97D761130E5258E3 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; + 24398DC00BA1BCB8E22EF1FDF5AD8C92 /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; + 24520FDFD345C564DAD95D2183DE8161 /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; + 2462799983D9188216A26DCD7CD51F11 /* Generics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generics.swift; path = Sources/CryptoSwift/Generics.swift; sourceTree = ""; }; + 25206B780E1095DD8A556008D0EFD481 /* BIP32HDNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BIP32HDNode.swift; sourceTree = ""; }; + 27071742E28DDEA24E402E2086DA6A84 /* Words and Bits.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Words and Bits.swift"; path = "sources/Words and Bits.swift"; sourceTree = ""; }; + 2760171835447D6D826035C278C064DD /* Process+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Process+Promise.swift"; path = "Extensions/Foundation/Sources/Process+Promise.swift"; sourceTree = ""; }; + 2895ED4BBDDDCD15EEE8BE57E871905E /* Strideable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Strideable.swift; path = sources/Strideable.swift; sourceTree = ""; }; + 28CCF54795809F1AD0E17AFB25AD2B49 /* CryptoSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CryptoSwift-dummy.m"; sourceTree = ""; }; + 29FB4C7393B3C84320BFDAE8EAA115BA /* field_5x52_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_impl.h; path = Classes/secp256k1/src/field_5x52_impl.h; sourceTree = ""; }; + 2B8615EF5D46BD32F614236A86B3A18B /* Web3+Wallet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+Wallet.swift"; sourceTree = ""; }; + 2C0686789655E34A6E7B11303EFD4816 /* CryptoSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-prefix.pch"; sourceTree = ""; }; + 2CB8E17B8EE0B6C2480C96F79D789F69 /* HKDF.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HKDF.swift; path = Sources/CryptoSwift/HKDF.swift; sourceTree = ""; }; + 2DA298A6BE39A99E9D7A606FC61EB866 /* Dictionary+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Dictionary+Extension.swift"; sourceTree = ""; }; + 307616C6A80CFE4505531FC5A4611B5C /* UInt16+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt16+Extension.swift"; path = "Sources/CryptoSwift/UInt16+Extension.swift"; sourceTree = ""; }; + 307CE8E75570F9CEB673E76E355FC654 /* Promise+Web3+Contract+GetIndexedEvents.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Contract+GetIndexedEvents.swift"; sourceTree = ""; }; + 31BE620C30B7F661020814723E9A4225 /* secp256k1_swift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-umbrella.h"; sourceTree = ""; }; + 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 324ECBACBF53FADE4508E0991F921BB4 /* PlainKeystore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PlainKeystore.swift; sourceTree = ""; }; + 32CE559EA6C174B4184662AC6704496A /* BIP39.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BIP39.swift; sourceTree = ""; }; + 33956022CB96C24F3DEE7ABE10DE83A8 /* EthereumContract.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EthereumContract.swift; sourceTree = ""; }; + 33F64C66E20D23F271A741FC8050552E /* Pods-web3swiftBrowser-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swiftBrowser-dummy.m"; sourceTree = ""; }; + 34DF5BCF035BA07B33ACEC8EE07FD8DD /* EthereumAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumAddress.swift; path = EthereumAddress/Classes/EthereumAddress.swift; sourceTree = ""; }; + 35611AB8339829A3115FD187AEF3AA44 /* field_5x52_int128_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_int128_impl.h; path = Classes/secp256k1/src/field_5x52_int128_impl.h; sourceTree = ""; }; + 35BC2FC0319F475C0BB0DED5802938B0 /* Cimpl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Cimpl.h; path = scrypt/Cimpl.h; sourceTree = ""; }; + 362C19AA54822D5E48C43123219374E0 /* ecmult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult.h; path = Classes/secp256k1/src/ecmult.h; sourceTree = ""; }; + 368F1410F802290995CB5C9BF967D229 /* Exponentiation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Exponentiation.swift; path = sources/Exponentiation.swift; sourceTree = ""; }; + 37A4EB8546247EC0A9BC21EE2F416280 /* scratch.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch.h; path = Classes/secp256k1/src/scratch.h; sourceTree = ""; }; + 38909D1D1D234FACCFF80C34BBD908FA /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = sources/Random.swift; sourceTree = ""; }; + 391C4280C6A01CB9846859C1FFE83915 /* ABIParameterTypes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIParameterTypes.swift; path = EthereumABI/Classes/ABIParameterTypes.swift; sourceTree = ""; }; + 392C26487BB8C836CB89BE4F0DCD413F /* secp256k1_swift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-prefix.pch"; sourceTree = ""; }; + 39DD919FF492E17F9100996422AC1508 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Configuration.swift; sourceTree = ""; }; + 3AC34580C2A4A62877DB38C69B59FDEA /* RandomBytesSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomBytesSequence.swift; path = Sources/CryptoSwift/RandomBytesSequence.swift; sourceTree = ""; }; + 3B763DDE0268D6D9332897A195BDF78D /* Promise+Web3+Eth+GetBlockByHash.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetBlockByHash.swift"; sourceTree = ""; }; + 3C903C6D7CD96415FDAFF69A8B150939 /* EthereumAddress.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = EthereumAddress.modulemap; sourceTree = ""; }; + 3DAF747CAA73B11A76FF5D1B0FC68B04 /* BlockCipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockCipher.swift; path = Sources/CryptoSwift/BlockCipher.swift; sourceTree = ""; }; + 3F8A9FD6B3B6A7356DD63CCD32069DBC /* Web3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Web3.swift; sourceTree = ""; }; + 3FB556D67EEBBC9FE8BC6D9D18E065D2 /* Square Root.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Square Root.swift"; path = "sources/Square Root.swift"; sourceTree = ""; }; + 40464D87CFD9D884A7B31C58C14B1644 /* scalar_4x64_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64_impl.h; path = Classes/secp256k1/src/scalar_4x64_impl.h; sourceTree = ""; }; + 406D92F6318C2D2FDE44655D6AC38A54 /* Authenticator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Authenticator.swift; path = Sources/CryptoSwift/Authenticator.swift; sourceTree = ""; }; + 40913BEE22327E543CEC071EB47591B3 /* SwiftRLP.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SwiftRLP.modulemap; sourceTree = ""; }; + 40CBCE6B505653A1F75F1A7D05CF2BB0 /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/ecdh/main_impl.h; sourceTree = ""; }; + 40F0165751F94455542A7A7D744E5868 /* afterlife.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Extensions/Foundation/Sources/afterlife.swift; sourceTree = ""; }; + 41E5DD31BCCEE472F0E7A9944A6D6E58 /* Promise+Web3+Personal+Sign.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Personal+Sign.swift"; sourceTree = ""; }; + 424F526B84880AC3C8DF8C0573DF835E /* BigUInt+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "BigUInt+Extensions.swift"; sourceTree = ""; }; + 42500BB4EB58F6E89B258D12EA3A85EA /* NoPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoPadding.swift; path = Sources/CryptoSwift/NoPadding.swift; sourceTree = ""; }; + 4256999392495EB9FABEC7E402B28532 /* ChaCha20.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChaCha20.swift; path = Sources/CryptoSwift/ChaCha20.swift; sourceTree = ""; }; + 42A74C7F34F50640959528454C7ADF7A /* EIP67Code.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EIP67Code.swift; sourceTree = ""; }; + 42E5B0322736A75CEAC2E5E0BC47322B /* Bitwise Ops.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bitwise Ops.swift"; path = "sources/Bitwise Ops.swift"; sourceTree = ""; }; + 4318D30BB5A154771EC1F0AFEAA3727B /* BigInt.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = BigInt.modulemap; sourceTree = ""; }; + 4359453F2A3367521E7F3A5AD25CDD3F /* scalar_low_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low_impl.h; path = Classes/secp256k1/src/scalar_low_impl.h; sourceTree = ""; }; + 4450354D56E439B899DA89877CE790D9 /* BlockModeOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockModeOptions.swift; path = Sources/CryptoSwift/BlockMode/BlockModeOptions.swift; sourceTree = ""; }; + 451F30EF753C7E51F2A54B2DCEAC0F15 /* PMKUIKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKUIKit.h; path = Extensions/UIKit/Sources/PMKUIKit.h; sourceTree = ""; }; + 48123FF1ECC25A15E6EED58BC66255C0 /* CCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CCM.swift; path = Sources/CryptoSwift/BlockMode/CCM.swift; sourceTree = ""; }; + 48A962A1A4952B499D08CAC0AF45834D /* scalar_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_impl.h; path = Classes/secp256k1/src/scalar_impl.h; sourceTree = ""; }; + 494BD19DEF7C0C243E083E0566F97724 /* WKBridge-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "WKBridge-dummy.m"; sourceTree = ""; }; + 4AA008BE866DF99C1C6DE45E77988794 /* scrypt-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-umbrella.h"; sourceTree = ""; }; + 4B3E8BD20BDF0C39915321B5C52B4177 /* OFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OFB.swift; path = Sources/CryptoSwift/BlockMode/OFB.swift; sourceTree = ""; }; + 4BBA1996EF6015BDB31DC18603F2AB33 /* NativeTypesEncoding+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NativeTypesEncoding+Extensions.swift"; sourceTree = ""; }; + 4BD5EF5645402720EBB6C1911A6BFB3A /* BloomFilter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BloomFilter.swift; sourceTree = ""; }; + 4BEE4B0903B74B5BD6F84FC210AE80B0 /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; + 4D90F369C275DFF1EC8501F18B40B406 /* ABITypeParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABITypeParser.swift; path = EthereumABI/Classes/ABITypeParser.swift; sourceTree = ""; }; + 4E22CAD063C8023B0442BB773AC99E02 /* Pods-web3swiftBrowser-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-web3swiftBrowser-frameworks.sh"; sourceTree = ""; }; + 4F2A0DCA6CEDBE5C5673C1D80CE85C57 /* num_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_impl.h; path = Classes/secp256k1/src/num_impl.h; sourceTree = ""; }; + 4F954F77DD10F9F183C7C606598847C1 /* Pods-web3swiftBrowser-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swiftBrowser-Info.plist"; sourceTree = ""; }; + 5088C65D0379C8BB766099D8F00B214D /* SipHash.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SipHash.modulemap; sourceTree = ""; }; + 50BF5D525FA16E334BB0CE14B3AD85E5 /* Web3+Structures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+Structures.swift"; sourceTree = ""; }; + 50E85CF9B2EE84E87E19B992031AC869 /* num_gmp_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp_impl.h; path = Classes/secp256k1/src/num_gmp_impl.h; sourceTree = ""; }; + 52317509EEB497A31C47EDA71B823477 /* Integer Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Integer Conversion.swift"; path = "sources/Integer Conversion.swift"; sourceTree = ""; }; + 541E696B5463A8496D191CDA00CF17BF /* EthereumKeystoreV3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EthereumKeystoreV3.swift; sourceTree = ""; }; + 542D0C2B13E449318182E68180808311 /* Promise+Web3+TxPool.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+TxPool.swift"; sourceTree = ""; }; + 544E5616451C52825554845F26D60869 /* Promise+Batching.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Batching.swift"; sourceTree = ""; }; + 54E7C195D145991317E68B99D0059387 /* EthereumABI-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumABI-prefix.pch"; sourceTree = ""; }; + 565A8FD7BF67B138CD0F83CE05D70070 /* HMAC+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "HMAC+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/HMAC+Foundation.swift"; sourceTree = ""; }; + 5660736868BFD803613F44199C911E8D /* Promise+Web3+Eth+SendRawTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+SendRawTransaction.swift"; sourceTree = ""; }; + 59E39637C57D2F37915C807D8978A103 /* KeystoreManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = KeystoreManager.swift; sourceTree = ""; }; + 5A14AD6290BE667C8948C69A74CBE719 /* CTR.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CTR.swift; path = Sources/CryptoSwift/BlockMode/CTR.swift; sourceTree = ""; }; + 5AF34671C5E5439C0DD3DE54FE81281D /* PCBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PCBC.swift; path = Sources/CryptoSwift/BlockMode/PCBC.swift; sourceTree = ""; }; + 5B148BEF285BBBDCA991704A719187CE /* Promise+Web3+Personal+UnlockAccount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Personal+UnlockAccount.swift"; sourceTree = ""; }; + 5B704EE429FEF981BE8D8C7643A03C30 /* field_5x52_asm_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_asm_impl.h; path = Classes/secp256k1/src/field_5x52_asm_impl.h; sourceTree = ""; }; + 5CCC4B276372F3617E9FA8542C905713 /* String+FoundationExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FoundationExtension.swift"; path = "Sources/CryptoSwift/Foundation/String+FoundationExtension.swift"; sourceTree = ""; }; + 5E12322986FCB7A5188750A10D61D74F /* basic-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "basic-config.h"; path = "Classes/secp256k1/src/basic-config.h"; sourceTree = ""; }; + 5EE6FD8D4AD88AC23CEEFD75C9514635 /* EthereumAddress-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "EthereumAddress-Info.plist"; sourceTree = ""; }; + 5F1C6D0D72CDECD3C4692CF2C744702C /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; + 5F259EE97EF815BB3F76F27DBA855651 /* scrypt-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "scrypt-dummy.m"; sourceTree = ""; }; + 613D1AD1E5D58C3293126DF7F7186BD7 /* EthereumABI.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = EthereumABI.xcconfig; sourceTree = ""; }; + 613E99CC294DBBBA463C2B4D8ACE9BD1 /* Promise+Web3+Eth+GetBalance.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetBalance.swift"; sourceTree = ""; }; + 621EE5F99F75465A1124BCF732CAA05F /* Cimpl.c */ = {isa = PBXFileReference; includeInIndex = 1; name = Cimpl.c; path = scrypt/Cimpl.c; sourceTree = ""; }; + 6234C75FBEE77F3DD66B1F78CC2C4592 /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/CryptoSwift/Operators.swift; sourceTree = ""; }; + 62D1EC7EE1A8DD6F9D29A13516592DFC /* Web3+Protocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+Protocols.swift"; sourceTree = ""; }; + 62EBED6AB6D078935F477606DA4D2E4F /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/WebKit.framework; sourceTree = DEVELOPER_DIR; }; + 636623F0AFC27BCE4832C83B4C2C5711 /* secp256k1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1.h; path = Classes/secp256k1/include/secp256k1.h; sourceTree = ""; }; + 64D96A4A36A8A5AA89014CE3E6C9C4E7 /* SipHash-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SipHash-dummy.m"; sourceTree = ""; }; + 65211025493449630ACDE59F4289A1EB /* secp256k1_swift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "secp256k1_swift-dummy.m"; sourceTree = ""; }; + 65366C8DC193D6D3E38E8C595AA3659A /* num_gmp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp.h; path = Classes/secp256k1/src/num_gmp.h; sourceTree = ""; }; + 66464724192E063C8B230881F1B456A2 /* ABIDecoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIDecoding.swift; path = EthereumABI/Classes/ABIDecoding.swift; sourceTree = ""; }; + 6825C5A45C42B011E0B27E2C0BB22B8A /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = EthereumAddress/Classes/Extensions.swift; sourceTree = ""; }; + 6881646ACF82A8F9FDCECA39F47366AC /* Web3+Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+Utils.swift"; sourceTree = ""; }; + 689472C8CF352350A3CD7B1E7E59C6F9 /* ChaCha20+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ChaCha20+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift"; sourceTree = ""; }; + 691F97532232D3B8FA3FAB232B4935E2 /* Pods-web3swiftBrowser.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swiftBrowser.debug.xcconfig"; sourceTree = ""; }; + 69D13C6F2D474D345F3C62E4404D449D /* BigInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigInt.swift; path = sources/BigInt.swift; sourceTree = ""; }; + 69D7BF66AADCC0A28B7630C346BD9FA7 /* SipHash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SipHash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6A372E9BE81FEB4E6595E16504874649 /* Cryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptor.swift; path = Sources/CryptoSwift/Cryptor.swift; sourceTree = ""; }; + 6B17152B79677F5CAE589C1DCC93E60D /* Pods-web3swiftBrowser-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swiftBrowser-acknowledgements.plist"; sourceTree = ""; }; + 6BA4DB1D132786518B1CD01DCFCF4552 /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = ""; }; + 6BDEF8754C41FB3C25C8798C86E97514 /* scalar_low.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low.h; path = Classes/secp256k1/src/scalar_low.h; sourceTree = ""; }; + 6C25E00AF342D92A280F30659A49D3F9 /* Collection+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Collection+Extension.swift"; path = "Sources/CryptoSwift/Collection+Extension.swift"; sourceTree = ""; }; + 6C6B6330EB0E015DCBBC2AD07133A419 /* PromiseKit-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "PromiseKit-Info.plist"; sourceTree = ""; }; + 6C73C3A210D9E9A675E3638D4124FA98 /* field.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field.h; path = Classes/secp256k1/src/field.h; sourceTree = ""; }; + 6CD3C8CF5E6418482BD86D4A982F4D18 /* SipHash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SipHash.framework; path = SipHash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D2C18BCBD74E4D525C72CF46DE26110 /* UIView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.h"; sourceTree = ""; }; + 6E153E8EBD86647263301C6E6A153E86 /* eckey_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey_impl.h; path = Classes/secp256k1/src/eckey_impl.h; sourceTree = ""; }; + 6E1640B527296E8143540D9724C734B2 /* libsecp256k1-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "libsecp256k1-config.h"; path = "Classes/libsecp256k1-config.h"; sourceTree = ""; }; + 6E20A79511884CD034ED58E821AB9963 /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; + 6E2931FB3C9B813ABA682B147C905690 /* EthereumABI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = EthereumABI.framework; path = EthereumABI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6EDA03F88844DA2CEB94E8B6E5E7EA0E /* Array+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Array+Foundation.swift"; sourceTree = ""; }; + 6EF0564DF34B20BE60B2D0F8ABCDAA56 /* ecmult_gen_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen_impl.h; path = Classes/secp256k1/src/ecmult_gen_impl.h; sourceTree = ""; }; + 6EFDA840159430F66637527A30AC9B91 /* AbstractKeystore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AbstractKeystore.swift; sourceTree = ""; }; + 6FD08AEFD82A48A903C0E28B98A460A9 /* PromiseKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-umbrella.h"; sourceTree = ""; }; + 70E57365C8A66C10AF9519E9A5EC1964 /* AES+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AES+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/AES+Foundation.swift"; sourceTree = ""; }; + 71160870C237FDB54F5F6B39C1EC249D /* Promise+HttpProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+HttpProvider.swift"; sourceTree = ""; }; + 72312181430CDA8D72ABA61658459BFE /* Thenable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Thenable.swift; path = Sources/Thenable.swift; sourceTree = ""; }; + 733A9B74D1EC3F4A9A9C2DAC1D2177EF /* Shifts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Shifts.swift; path = sources/Shifts.swift; sourceTree = ""; }; + 7360A21DD120411552BEB0A46979C113 /* AES.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.swift; path = Sources/CryptoSwift/AES.swift; sourceTree = ""; }; + 75BBD65C7F475167F8986FAB6A6BC661 /* EthereumABI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = EthereumABI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 75CD5FF7AF27DC775EF9AE5ACA8D2D10 /* group_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group_impl.h; path = Classes/secp256k1/src/group_impl.h; sourceTree = ""; }; + 75EB8B5D77B01F5062EBF15521EA0A15 /* Promise+Web3+Eth+GetAccounts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetAccounts.swift"; sourceTree = ""; }; + 7853B24622707B8DB692B1A0E1EB8260 /* scrypt.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scrypt.h; path = scrypt/scrypt.h; sourceTree = ""; }; + 79E7D3DA87C999F8C31B3F469A0A3FF8 /* web3swift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "web3swift-prefix.pch"; sourceTree = ""; }; + 7B6B1C4BF2AB8814190CA26B07BED6EA /* BigUInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigUInt.swift; path = sources/BigUInt.swift; sourceTree = ""; }; + 7BD122AF1F62FC100EEF85049D4D920C /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; + 7CA1A89AEB94FBB90F1A43A95699DBE3 /* UInt32+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt32+Extension.swift"; path = "Sources/CryptoSwift/UInt32+Extension.swift"; sourceTree = ""; }; + 7D41D11BFA6D30CD8497C0851DD9C600 /* Web3+HttpProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+HttpProvider.swift"; sourceTree = ""; }; + 7ECD71C919CAE4C6A9E3B282EF0B3D74 /* Guarantee.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Guarantee.swift; path = Sources/Guarantee.swift; sourceTree = ""; }; + 7F150F672F56CC5A829842B06F3FDDFE /* field_5x52.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52.h; path = Classes/secp256k1/src/field_5x52.h; sourceTree = ""; }; + 7FE9449730F32989612680CF7B0ADCE0 /* SwiftRLP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftRLP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 802A6F8F9E9E11516A30DFDD8622B05B /* WKBridge.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = WKBridge.framework; path = WKBridge.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 81EFF929AA27215C7D61876E7C56A729 /* field_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_impl.h; path = Classes/secp256k1/src/field_impl.h; sourceTree = ""; }; + 823BF773E09B19D9C42CDD3C78CF9DAB /* secp256k1_swift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "secp256k1_swift-Info.plist"; sourceTree = ""; }; + 8318D9A04DD887291DA86FA0BC263C42 /* ABIEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIEncoding.swift; path = EthereumABI/Classes/ABIEncoding.swift; sourceTree = ""; }; + 83E2FA12D8596CFE06F4142DB6BCF99A /* PromiseKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; + 84BFFFAC8D94F54E9A392AAC6BF0791B /* EthereumAddress.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = EthereumAddress.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 84C3AAAE22680746584135041FCB912E /* Comparable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Comparable.swift; path = sources/Comparable.swift; sourceTree = ""; }; + 858FE8C832C8AF89EB75CD71170E1C11 /* Web3+Options.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+Options.swift"; sourceTree = ""; }; + 85BCD04BE36FBBE6C2EACDD6A6AFC71D /* scrypt.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = scrypt.xcconfig; sourceTree = ""; }; + 86AFF41F0299157D70853C515F4BF386 /* secp256k1_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = secp256k1_swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 86D1816CB67A6FCF7B1578DA72BBAE6E /* BIP39+WordLists.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "BIP39+WordLists.swift"; sourceTree = ""; }; + 8826B17C2F67CDD48367F8B6D55B44B6 /* Web3+TxPool.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+TxPool.swift"; sourceTree = ""; }; + 88F487D60ABCAD2A9A3B56A79D2ED18B /* Cipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cipher.swift; path = Sources/CryptoSwift/Cipher.swift; sourceTree = ""; }; + 891D5D33624F23A99EC9DBBFF1DCAA61 /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; + 899CD0EEEF792C2486273185A3A39126 /* web3swift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "web3swift-Info.plist"; sourceTree = ""; }; + 8A53224C7344478B1488A631A4405A57 /* DigestType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DigestType.swift; path = Sources/CryptoSwift/DigestType.swift; sourceTree = ""; }; + 8A6CA0A2631E73B74977A5EEF611D45D /* Web3+Infura.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+Infura.swift"; sourceTree = ""; }; + 8B20BA6CCC201B4EB3604F16C9256EB3 /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; + 8B7B7666CA71FCEAC7E2AAFDF044B8CB /* Web3+Contract.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+Contract.swift"; sourceTree = ""; }; + 8BA3C8D1E35D4FA6C86B2C9CD2E3A62C /* Data Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data Conversion.swift"; path = "sources/Data Conversion.swift"; sourceTree = ""; }; + 8C8EBEC10E3FBDC2083ADA95D32AC0ED /* ContractProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ContractProtocol.swift; sourceTree = ""; }; + 8DACF2245288A10F8DC82E76CB5AE107 /* Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Poly1305.swift; path = Sources/CryptoSwift/Poly1305.swift; sourceTree = ""; }; + 8DE3D14EDCC1F521B41873B5806197FF /* group.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group.h; path = Classes/secp256k1/src/group.h; sourceTree = ""; }; + 8DF0DF79F1C86E4187095322220061CB /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; + 8E1AFF12D87C54B362C705BFE7693CC9 /* Scrypt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scrypt.swift; path = scrypt/scrypt/Scrypt.swift; sourceTree = ""; }; + 8E592B8848CE134E030D26C3BBA349DC /* CryptoSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CryptoSwift-Info.plist"; sourceTree = ""; }; + 8E88FFB81700974B3E763F82320864A2 /* EventFiltering.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EventFiltering.swift; sourceTree = ""; }; + 8F3894D38C1417CFEBA87F5BED30A0D1 /* EthereumABI.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = EthereumABI.modulemap; sourceTree = ""; }; + 9044C673C01EC75BD5C634185B7FF160 /* ECB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ECB.swift; path = Sources/CryptoSwift/BlockMode/ECB.swift; sourceTree = ""; }; + 90B5C042B418434B2F5298F6B176B1F1 /* Base58.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Base58.swift; sourceTree = ""; }; + 90E2AECF50D5615909E614BC523EF269 /* Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Padding.swift; path = Sources/CryptoSwift/Padding.swift; sourceTree = ""; }; + 91583D020D3BAD71D4BF8E0424771B02 /* ecmult_const_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const_impl.h; path = Classes/secp256k1/src/ecmult_const_impl.h; sourceTree = ""; }; + 91EA7B53FDE18767FDBA0BF51DE25031 /* CryptoSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-umbrella.h"; sourceTree = ""; }; + 92567CADB38E81705DF451EF01AA6AC7 /* util.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = util.h; path = Classes/secp256k1/src/util.h; sourceTree = ""; }; + 92D22B73F9E8D52B7C3B6D9DB75DC95E /* BlockMode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockMode.swift; path = Sources/CryptoSwift/BlockMode/BlockMode.swift; sourceTree = ""; }; + 92E5D31F81E395B97C48C62CD69DB7C7 /* hash_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash_impl.h; path = Classes/secp256k1/src/hash_impl.h; sourceTree = ""; }; + 946B04DDF91DFDC0717E6FF8A3F5BCC2 /* NSURLSession+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLSession+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.h"; sourceTree = ""; }; + 95C84C17B948CBA407FE31EAEEECFC91 /* ABI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABI.swift; path = EthereumABI/Classes/ABI.swift; sourceTree = ""; }; + 96CA0C95378DAEB8937D1C315D2D6432 /* hang.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = hang.swift; path = Sources/hang.swift; sourceTree = ""; }; + 96D9786FECD142DCF0FC2CE63497CE9A /* ecmult_const.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const.h; path = Classes/secp256k1/src/ecmult_const.h; sourceTree = ""; }; + 96DE9A932DA105BDB0D9F7E14BE34084 /* StreamDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamDecryptor.swift; path = Sources/CryptoSwift/StreamDecryptor.swift; sourceTree = ""; }; + 976A070A96F216885426DFC61563B481 /* BigInt.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = BigInt.xcconfig; sourceTree = ""; }; + 97E78EC4E433E08662483F70A1F8ED62 /* Rabbit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rabbit.swift; path = Sources/CryptoSwift/Rabbit.swift; sourceTree = ""; }; + 97F28F0E9DF36732F3114E69BFE48A95 /* Web3+BrowserFunctions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+BrowserFunctions.swift"; sourceTree = ""; }; + 9842944A75F47B877FA075B19DEFC371 /* Pods_web3swiftBrowser.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_web3swiftBrowser.framework; path = "Pods-web3swiftBrowser.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 98692EF4A56523CA0BF26DDAB4717B10 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PromiseKit.framework; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 99748D72CB2448D4F30EFFEF9F9636D4 /* SipHasher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHasher.swift; path = SipHash/SipHasher.swift; sourceTree = ""; }; + 9B2F598919D796732EBEBF2B9066A614 /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.h"; sourceTree = ""; }; + 9B4E537BADD99D1B07974C09D7D3797F /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = BigInt.framework; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9B6E05124E91BA4591DB0BF994ABF679 /* NSURLSession+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLSession+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.m"; sourceTree = ""; }; + 9E00048326E77E5C8CFF0383F8739C1A /* EthereumABI-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EthereumABI-dummy.m"; sourceTree = ""; }; + 9EC833B3E3BB46A92A4C47DE70502CC3 /* NSTask+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSTask+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.h"; sourceTree = ""; }; + 9F0E95ECC77D57875AF18515D6747915 /* SHA2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA2.swift; path = Sources/CryptoSwift/SHA2.swift; sourceTree = ""; }; + 9F7741FDAB4EA857FB1B4AF556A4CED8 /* CryptoSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CryptoSwift.xcconfig; sourceTree = ""; }; + A02A35A4F2E0BC3921E16844895653B0 /* Pods-web3swiftBrowser-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-web3swiftBrowser-umbrella.h"; sourceTree = ""; }; + A0A8EF22FBDF6BD96A3D73B1EE21A8CB /* ZeroPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZeroPadding.swift; path = Sources/CryptoSwift/ZeroPadding.swift; sourceTree = ""; }; + A10B704CFEAD959114479F5012CD2532 /* scalar_4x64.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64.h; path = Classes/secp256k1/src/scalar_4x64.h; sourceTree = ""; }; + A131AD6DA92EBABD1E5C58625BFBC416 /* web3swift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "web3swift-umbrella.h"; sourceTree = ""; }; + A33D7B31A153649EAAFE73327AFD17BE /* Web3+EventParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+EventParser.swift"; sourceTree = ""; }; + A3A86CD1B64C94999039F9ACDAD84755 /* SipHashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHashable.swift; path = SipHash/SipHashable.swift; sourceTree = ""; }; + A460A8BF9D5B12FF2A0DAF89B087E08B /* Codable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Codable.swift; path = sources/Codable.swift; sourceTree = ""; }; + A5176316A82C935673D351FFBE8525B9 /* Rabbit+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Rabbit+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift"; sourceTree = ""; }; + A5A29CFAFD42016E44DA67CD28A4A53E /* lax_der_privatekey_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_privatekey_parsing.h; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.h; sourceTree = ""; }; + A5A81617ECCFFCBF930BDD8E4ADA6EA7 /* web3swift.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = web3swift.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + A5E1458539C38D066641C4E67054E10E /* SecureBytes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SecureBytes.swift; path = Sources/CryptoSwift/SecureBytes.swift; sourceTree = ""; }; + A7C3B26AB1F183D1A7300640488DDD82 /* Pods-web3swiftBrowser.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-web3swiftBrowser.modulemap"; sourceTree = ""; }; + A860FAAA8B72A45E7A4DBB1A5E70D412 /* Prime Test.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Prime Test.swift"; path = "sources/Prime Test.swift"; sourceTree = ""; }; + A88C260909AC2076CAEE4AA3727708BE /* HMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HMAC.swift; path = Sources/CryptoSwift/HMAC.swift; sourceTree = ""; }; + A8934D313BE8E23E076C05562DE3069C /* secp256k1_swift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = secp256k1_swift.modulemap; sourceTree = ""; }; + A8C77A4E8583F1291F86B150C936AE24 /* scrypt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = scrypt.framework; path = scrypt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A8FE152E35A78B5989B4D55C6E01D198 /* UIViewPropertyAnimator+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewPropertyAnimator+Promise.swift"; path = "Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift"; sourceTree = ""; }; + A9B85C211A21CDBD9C8D265211586674 /* Blowfish.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Blowfish.swift; path = Sources/CryptoSwift/Blowfish.swift; sourceTree = ""; }; + A9EE071D88E3F4715B3B496529500DB0 /* SwiftRLP-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftRLP-dummy.m"; sourceTree = ""; }; + AA174416833D677ABCB0BA66EF73C794 /* StreamEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamEncryptor.swift; path = Sources/CryptoSwift/StreamEncryptor.swift; sourceTree = ""; }; + AA73B1B0CB87877BB26D1A122A8B99FC /* AEAD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEAD.swift; path = Sources/CryptoSwift/AEAD/AEAD.swift; sourceTree = ""; }; + AB757C507F8FC74F442D6F1BC5026BCF /* Subtraction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Subtraction.swift; path = sources/Subtraction.swift; sourceTree = ""; }; + AB791012FF3E163437EB0CAB98D55BF7 /* Resolver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Resolver.swift; path = Sources/Resolver.swift; sourceTree = ""; }; + AB8D4DF4B11DD9931D7FBB48FEAC7DA3 /* Bridge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bridge.swift; path = WKBridge/Classes/Bridge.swift; sourceTree = ""; }; + AB91F828E995E49B38C1FF2FF4AB41B9 /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; + AC389A03DEBE4C53703596A2959AF768 /* SwiftRLP-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-prefix.pch"; sourceTree = ""; }; + AD1F563FDA7A19C9E2F3C652F6C1E135 /* Division.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Division.swift; path = sources/Division.swift; sourceTree = ""; }; + ADF040A0EE2F4531B7E16666B1D49218 /* Bit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bit.swift; path = Sources/CryptoSwift/Bit.swift; sourceTree = ""; }; + AF42513E74B9593131CE78F650930D1F /* secp256k1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = secp256k1.swift; path = Classes/secp256k1.swift; sourceTree = ""; }; + AFD1621635112880074012EE850D50D4 /* CryptoSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CryptoSwift.framework; path = CryptoSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B0025188EA3228DD3211ACDDE025D320 /* BIP32KeystoreJSONStructure.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BIP32KeystoreJSONStructure.swift; sourceTree = ""; }; + B08667AD4A557EF6D5285A60C564FC42 /* CoreImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/CoreImage.framework; sourceTree = DEVELOPER_DIR; }; + B0B13DF96A30F118B276B5CE29A288FE /* GCD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCD.swift; path = sources/GCD.swift; sourceTree = ""; }; + B0B18B14E2CF77C300EF29C3CC494416 /* Pods-web3swiftBrowser-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swiftBrowser-acknowledgements.markdown"; sourceTree = ""; }; + B12CA03389EEA8FC37A6082513F6DF76 /* BIP32Keystore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BIP32Keystore.swift; sourceTree = ""; }; + B1B629056BCD1A0B29E0B7A2ECEB575A /* CryptoSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CryptoSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B285972B02773D32DA37B50342D3C441 /* NSTask+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSTask+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.m"; sourceTree = ""; }; + B36AB396275697EEE1A5B13BA8A38FE3 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + B3FC98049DD2477DB821E3B7BA9DE1D7 /* Data+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Data+Extension.swift"; sourceTree = ""; }; + B48A647A6F4823FD3139C0A88A84B8F7 /* Array+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Extension.swift"; path = "Sources/CryptoSwift/Array+Extension.swift"; sourceTree = ""; }; + B50D4481F4B63FAB12C79BCAA18DCD0F /* BigInt-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BigInt-dummy.m"; sourceTree = ""; }; + B66D6F40FB1A3E4C8B70597E53218232 /* WKBridge.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = WKBridge.modulemap; sourceTree = ""; }; + B682EADF3606618490DE2BDC22BAF5FF /* IBAN.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = IBAN.swift; sourceTree = ""; }; + B70C4737914067ADDDF7B927A6503861 /* wk.bridge.min.js */ = {isa = PBXFileReference; includeInIndex = 1; name = wk.bridge.min.js; path = WKBridge/Assets/wk.bridge.min.js; sourceTree = ""; }; + B7248A2518844FF8FB81C01C51AEA94E /* field_10x26_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26_impl.h; path = Classes/secp256k1/src/field_10x26_impl.h; sourceTree = ""; }; + B898BB32772DFFD2CF28F1EDFA664337 /* Web3+ReadingTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+ReadingTransaction.swift"; sourceTree = ""; }; + B8FB6B595972CDB77622B1768EDBA2E5 /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; + B9617FF9C97A50142809334E0B01FB17 /* PKCS7Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7Padding.swift; path = Sources/CryptoSwift/PKCS/PKCS7Padding.swift; sourceTree = ""; }; + B99F243F4D23E83F6B35849493C403AC /* ABIExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIExtensions.swift; path = EthereumABI/Classes/ABIExtensions.swift; sourceTree = ""; }; + B9CB9DEF9D24AA7C3CE36E4B1661808C /* RIPEMD160+StackOveflow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "RIPEMD160+StackOveflow.swift"; sourceTree = ""; }; + BA535050C5A6D04616FD5C982B59CD32 /* lax_der_privatekey_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_privatekey_parsing.c; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.c; sourceTree = ""; }; + BA6657C8B03BA7D1FCB321E9CDB10F75 /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PromiseKit.modulemap; sourceTree = ""; }; + BC72984CEA465EB43AB30D0471B8665E /* Hashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hashable.swift; path = sources/Hashable.swift; sourceTree = ""; }; + BCCC751CE0AB5AE1FDC9E568D696DAF4 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; + BD039C81CCBE816A0584340AC75A9457 /* BigInt-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-umbrella.h"; sourceTree = ""; }; + BD348A58C7418F12CFFB351832F482C1 /* Box.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Sources/Box.swift; sourceTree = ""; }; + BDF440EC1DDD6B0DC0DC6E6BA2303AA3 /* BigInt-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "BigInt-Info.plist"; sourceTree = ""; }; + BF260D435734569BB8C726F8D071E8CB /* EthereumAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EthereumAddress.h; path = EthereumAddress/EthereumAddress.h; sourceTree = ""; }; + BF8C4AF0B078000272844DE8E509B59E /* UInt8+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt8+Extension.swift"; path = "Sources/CryptoSwift/UInt8+Extension.swift"; sourceTree = ""; }; + C01E9833E49E6D2D8F06EADE27064F8C /* CryptoExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CryptoExtensions.swift; sourceTree = ""; }; + C24BFEB3CC3A0F95E8CAB9EFE3353A5A /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = Sources/CryptoSwift/CompactMap.swift; sourceTree = ""; }; + C276DBD2DDB9C71FC0EACEE0DEF2FCE3 /* BigInt-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-prefix.pch"; sourceTree = ""; }; + C32B08B487E3F8EE9452B131EE879CB0 /* Addition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Addition.swift; path = sources/Addition.swift; sourceTree = ""; }; + C3661F81034FA201DE95CFF6804DBE7F /* SwiftRLP-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-umbrella.h"; sourceTree = ""; }; + C37D0F02BF4831EA794AD3A043134EF3 /* Pods-web3swiftBrowser.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swiftBrowser.release.xcconfig"; sourceTree = ""; }; + C41D6EB6280997499F263CCD10037EBD /* Checksum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Checksum.swift; path = Sources/CryptoSwift/Checksum.swift; sourceTree = ""; }; + C437CD71580F73919581C4632318AE05 /* EthereumTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EthereumTransaction.swift; sourceTree = ""; }; + C4A72B026B3481D0FF01C45BC4B4CEFC /* scalar_8x32_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32_impl.h; path = Classes/secp256k1/src/scalar_8x32_impl.h; sourceTree = ""; }; + C4E15BD868B7451191C19B591710E5A5 /* Deprecations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecations.swift; path = Sources/Deprecations.swift; sourceTree = ""; }; + C5F518854281D5187CD0D2A099AE8E1F /* Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Utils.swift; path = Sources/CryptoSwift/Utils.swift; sourceTree = ""; }; + C703D877C454A5F831BF937286917A7B /* ecmult_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_impl.h; path = Classes/secp256k1/src/ecmult_impl.h; sourceTree = ""; }; + C7071FF52323C987C31EF1E24C37720D /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h"; sourceTree = ""; }; + C713FD62CE54CBCDB4016C39AE9FDDC3 /* Web3+Methods.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+Methods.swift"; sourceTree = ""; }; + C714668C86259E60C0444E41B71A56A9 /* secp256k1_recovery.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_recovery.h; path = Classes/secp256k1/include/secp256k1_recovery.h; sourceTree = ""; }; + C873F258D4ECB7658F720D01655A322C /* UIView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Extensions/UIKit/Sources/UIView+Promise.swift"; sourceTree = ""; }; + CA9C67E1505CC590B1C66CD4094EFE4B /* EthereumAddress-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EthereumAddress-dummy.m"; sourceTree = ""; }; + CD6B4F2568D7F8FA82E928E9C33560CE /* CustomStringConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomStringConvertible.swift; path = Sources/CustomStringConvertible.swift; sourceTree = ""; }; + CD83C6989AAE345C22EB457E17D3FA74 /* Web3+Eventloop.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+Eventloop.swift"; sourceTree = ""; }; + CDD39B279684147812B3B6046364239D /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; + CE9A4E1F012F918A399F1D4374F5EFAF /* BufferStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BufferStorage.swift; path = scrypt/scrypt/BufferStorage.swift; sourceTree = ""; }; + CF021D41994060D5828EEB3570EF7A9B /* scalar.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar.h; path = Classes/secp256k1/src/scalar.h; sourceTree = ""; }; + CFCC6B16030BE9425E5F29A066364CF2 /* Floating Point Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Floating Point Conversion.swift"; path = "sources/Floating Point Conversion.swift"; sourceTree = ""; }; + D09A4B53633B0FCABF560E464F19BBED /* scrypt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = scrypt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D0F29F69196DDE8C7B18B22BB7716BAC /* AEADChaCha20Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEADChaCha20Poly1305.swift; path = Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift; sourceTree = ""; }; + D1DE17ECDE4ACD8B74BC10F97EB047A8 /* Web3+Instance.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+Instance.swift"; sourceTree = ""; }; + D2743E7F22E7046D29BA1B4B30C249F9 /* WKBridge.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = WKBridge.bundle; path = "WKBridge-WKBridge.bundle"; sourceTree = BUILT_PRODUCTS_DIR; }; + D27B55643A375443A10C5FBC5B412E6C /* Data+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Extension.swift"; path = "Sources/CryptoSwift/Foundation/Data+Extension.swift"; sourceTree = ""; }; + D3A71EF005A3B4FAD7DED21F449C3EE2 /* AES.Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.Cryptors.swift; path = Sources/CryptoSwift/AES.Cryptors.swift; sourceTree = ""; }; + D4E3E62100D8A348942C26EFDFA1F58A /* Utils+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Utils+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Utils+Foundation.swift"; sourceTree = ""; }; + D4F852CF17E9611E408DD74ECE1A92D7 /* CryptoSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CryptoSwift.modulemap; sourceTree = ""; }; + D5731BA92FB60C72DFEC2371FC45C24A /* Salsa.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Salsa.swift; path = scrypt/scrypt/Salsa.swift; sourceTree = ""; }; + D65EA110104F9E503B33056E4DEC5F2D /* KeystoreV3JSONStructure.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = KeystoreV3JSONStructure.swift; sourceTree = ""; }; + D71857B37785CBE90B82B36A09E1550F /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Extension.swift"; path = "Sources/CryptoSwift/String+Extension.swift"; sourceTree = ""; }; + D7CBEC08F89166DBCD005AB00D61AA4A /* EthereumABI-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumABI-umbrella.h"; sourceTree = ""; }; + D82FE8B893C5A39208C326028C27B679 /* Web3+MutatingTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+MutatingTransaction.swift"; sourceTree = ""; }; + D89CCEEBCA76D9E2EFC5BB67E76F0837 /* ecdsa_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa_impl.h; path = Classes/secp256k1/src/ecdsa_impl.h; sourceTree = ""; }; + D8BB5553237763952EA36043107076ED /* SwiftRLP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SwiftRLP.framework; path = SwiftRLP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D8E661D9EF637E09D80AAAFC5092AE7C /* EthereumFilterEncodingExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EthereumFilterEncodingExtensions.swift; sourceTree = ""; }; + D9BE7F456CD821B74DF98BE6F8DCE690 /* ResourceBundle-WKBridge-WKBridge-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-WKBridge-WKBridge-Info.plist"; sourceTree = ""; }; + D9C90CE06DC9958A4F81C4447FB43BB6 /* Web3+JSONRPC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+JSONRPC.swift"; sourceTree = ""; }; + DB16B9341AB0EF82837820815F7D5F20 /* GCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCM.swift; path = Sources/CryptoSwift/BlockMode/GCM.swift; sourceTree = ""; }; + DB771366BAAF8741157D9507D0D790C2 /* NSURLSession+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Promise.swift"; path = "Extensions/Foundation/Sources/NSURLSession+Promise.swift"; sourceTree = ""; }; + DBC7B7921208684651234FED044059D5 /* WKBridge-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "WKBridge-prefix.pch"; sourceTree = ""; }; + DCB80A7BBF94A82EA7B094D6247C326D /* Web3+Eth.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+Eth.swift"; sourceTree = ""; }; + DD170A4EF842C6E5F5E805F57DECB21E /* secp256k1.c */ = {isa = PBXFileReference; includeInIndex = 1; name = secp256k1.c; path = Classes/secp256k1/src/secp256k1.c; sourceTree = ""; }; + DDA0088996F02C169EC4300B94C632BC /* EthereumAddress-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumAddress-prefix.pch"; sourceTree = ""; }; + DE0AABB48A76B8C6604286BFDE1AB4C6 /* EthereumAddress.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = EthereumAddress.xcconfig; sourceTree = ""; }; + DE3E7A78534269CF3CD526A2A1F789B9 /* SHA1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA1.swift; path = Sources/CryptoSwift/SHA1.swift; sourceTree = ""; }; + DFBB06C89E889E3D6B1DE62B2F1D0941 /* scrypt.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = scrypt.modulemap; sourceTree = ""; }; + E0C689AC74B3E30F98DBEB9EC81F2A46 /* BlockDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockDecryptor.swift; path = Sources/CryptoSwift/BlockDecryptor.swift; sourceTree = ""; }; + E17BE21276DDB77E0928EE0908DEC2EF /* NSObject+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Extensions/Foundation/Sources/NSObject+Promise.swift"; sourceTree = ""; }; + E2A505AB695098EBEFB3D7CCD6CCDBD3 /* UInt128.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UInt128.swift; path = Sources/CryptoSwift/UInt128.swift; sourceTree = ""; }; + E31DB4951BABF1FA92A5DD9A156FA8B7 /* Promise+Web3+Personal+CreateAccount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Personal+CreateAccount.swift"; sourceTree = ""; }; + E349136A1DB718A586AF30A7DC511324 /* hash.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash.h; path = Classes/secp256k1/src/hash.h; sourceTree = ""; }; + E36A1DDEEC24A045F94D5AA2BAED727B /* Promise+Web3+Eth+GetGasPrice.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetGasPrice.swift"; sourceTree = ""; }; + E3857774CE53B2BEDC3F679EBB0AE5B7 /* PBKDF2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF2.swift; path = Sources/CryptoSwift/PKCS/PBKDF2.swift; sourceTree = ""; }; + E4611ED6EF7395079ACCC6EF9EF2648A /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/recovery/main_impl.h; sourceTree = ""; }; + E4B5AC1F1E07F263DAC83AA9764A5039 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E4E82201804431BAF2192B73FD6FF539 /* field_10x26.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26.h; path = Classes/secp256k1/src/field_10x26.h; sourceTree = ""; }; + E523BAD98061D16273E2705EF059D6C1 /* Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptors.swift; path = Sources/CryptoSwift/Cryptors.swift; sourceTree = ""; }; + E58EA42D8997BE6B895966D7349728B0 /* PBKDF1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF1.swift; path = Sources/CryptoSwift/PKCS/PBKDF1.swift; sourceTree = ""; }; + E5E2592E125D878422270A2B22863541 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + E5F1260B3700C4A67A1F6B962D0A34D7 /* BlockEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockEncryptor.swift; path = Sources/CryptoSwift/BlockEncryptor.swift; sourceTree = ""; }; + E6A110A95F963A420BF7C34E9F05A6A6 /* RLP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RLP.swift; path = Classes/RLP.swift; sourceTree = ""; }; + E6C2D396E24165F68410447706A29239 /* EthereumAddress-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumAddress-umbrella.h"; sourceTree = ""; }; + E6DDF2FAD4EBDA3EAC4D8EA7E434A255 /* SwiftRLP.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftRLP.xcconfig; sourceTree = ""; }; + E7A31F2F68211BCAC53099040812EF51 /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.m"; sourceTree = ""; }; + E8E012E821E2E1C361C95827C144B459 /* CipherModeWorker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CipherModeWorker.swift; path = Sources/CryptoSwift/BlockMode/CipherModeWorker.swift; sourceTree = ""; }; + EAB34E7BDA8823633902171C623258D0 /* Promise+Web3+Eth+GetTransactionReceipt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetTransactionReceipt.swift"; sourceTree = ""; }; + EB2D691DC0E19B534C6FB9309CC2DD22 /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift"; sourceTree = ""; }; + EB2FDC770609373945C150AB8D55EBB7 /* Int+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Int+Extension.swift"; path = "Sources/CryptoSwift/Int+Extension.swift"; sourceTree = ""; }; + EBB03F81A5DAD541D6700C67C675CB53 /* EthereumABI.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EthereumABI.h; path = EthereumABI/EthereumABI.h; sourceTree = ""; }; + EBD060B0B9D8702A510715B56DDC19EA /* CBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBC.swift; path = Sources/CryptoSwift/BlockMode/CBC.swift; sourceTree = ""; }; + ECBB84241612CB8E52527516FFE28AEA /* scratch_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch_impl.h; path = Classes/secp256k1/src/scratch_impl.h; sourceTree = ""; }; + ECE68C8BB981C254FD7ADA05F97DAA0F /* Promise+Web3+Eth+GetTransactionDetails.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetTransactionDetails.swift"; sourceTree = ""; }; + ED9C0470C42FAC75235C5F414C5CA44B /* SipHash-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SipHash-Info.plist"; sourceTree = ""; }; + EDE52591381A5BC90E93B78B8374408A /* SipHash.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SipHash.xcconfig; sourceTree = ""; }; + EE1DBBC84FDEEBADD50459603C53D9EC /* WKBridge-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "WKBridge-Info.plist"; sourceTree = ""; }; + EE6E6E31E3E393B6CB357229FE36FAD8 /* TransactionSigner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TransactionSigner.swift; sourceTree = ""; }; + EF748D9F54E1A14415902EA96FD6D0CF /* Promise+Web3+Eth+GetTransactionCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetTransactionCount.swift"; sourceTree = ""; }; + F01550F0F03E400613B77FAFC01A8FF0 /* Multiplication.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multiplication.swift; path = sources/Multiplication.swift; sourceTree = ""; }; + F04647FAE97ECB37E38BC9149CFD24CF /* CMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CMAC.swift; path = Sources/CryptoSwift/CMAC.swift; sourceTree = ""; }; + F0E85EBA5CC5456C331AA49EF82E3483 /* WKBridge-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "WKBridge-umbrella.h"; sourceTree = ""; }; + F11E6EEC87603C04CDFDAC08A150FE30 /* Web3+Personal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Web3+Personal.swift"; sourceTree = ""; }; + F29D0D43A5E2F070BB7AC998E4B03360 /* RandomUInt64.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomUInt64.swift; path = SipHash/RandomUInt64.swift; sourceTree = ""; }; + F4041B96ADE4AB2DC81C6D01E1520F6B /* secp256k1_ecdh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_ecdh.h; path = Classes/secp256k1/include/secp256k1_ecdh.h; sourceTree = ""; }; + F5C01011429A22DE545E0E585A014FE0 /* NSRegularExpressionExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NSRegularExpressionExtension.swift; sourceTree = ""; }; + F6381389003AB93AE7DEE082D4607BF6 /* web3swift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "web3swift-dummy.m"; sourceTree = ""; }; + F67F5F5BD5149669AF5633225D196140 /* Promise+Web3+Eth+GetBlockNumber.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetBlockNumber.swift"; sourceTree = ""; }; + F80B94BDD9699BB8FB9F57DB56F14FA5 /* EthereumABI-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "EthereumABI-Info.plist"; sourceTree = ""; }; + F8AF4E2F3E0D1A048162CD9DF44207BC /* NSNotificationCenter+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSNotificationCenter+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m"; sourceTree = ""; }; + F920A7CF425193534FF7EB6EF32088AF /* CFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CFB.swift; path = Sources/CryptoSwift/BlockMode/CFB.swift; sourceTree = ""; }; + F96BF23CF830D12FEDD7E43604266D1D /* SHA3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA3.swift; path = Sources/CryptoSwift/SHA3.swift; sourceTree = ""; }; + F99A13C2EF8094A93F2E62428CADE0D0 /* eckey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey.h; path = Classes/secp256k1/src/eckey.h; sourceTree = ""; }; + FB2EA77B3D9E5B9D373E510C409F9D9F /* lax_der_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_parsing.h; path = Classes/secp256k1/contrib/lax_der_parsing.h; sourceTree = ""; }; + FBA3A73FEC3AD94CEC6829D43EBC9007 /* UInt64+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt64+Extension.swift"; path = "Sources/CryptoSwift/UInt64+Extension.swift"; sourceTree = ""; }; + FC2ABD82554314CFEBC7DE3F1281B60A /* Promise+Web3+Eth+EstimateGas.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+EstimateGas.swift"; sourceTree = ""; }; + FC336E044244591A6F79F0F8ADDD1128 /* ABIParsing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIParsing.swift; path = EthereumABI/Classes/ABIParsing.swift; sourceTree = ""; }; + FC5A1B5377410F43913058422F4FB975 /* SipHash-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-umbrella.h"; sourceTree = ""; }; + FC7C28895D25F6E931DA5BA7812F56E8 /* CBCMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBCMAC.swift; path = Sources/CryptoSwift/CBCMAC.swift; sourceTree = ""; }; + FD43C0AD45A6E239C08186A5873D28F4 /* scrypt-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-prefix.pch"; sourceTree = ""; }; + FF5DDFF64F22AA1902EAC1A64CB5D997 /* web3swift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = web3swift.xcconfig; sourceTree = ""; }; + FFBA39EA8661DEA5878E3A05D1FA703A /* fwd.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = fwd.h; path = Sources/fwd.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 043A44B6F07B17B9FDB237C80C547215 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C03A5E7CDA94D1EEFAA95BD7C8AA8A80 /* Foundation.framework in Frameworks */, + C14B28E1B085DB351DDFC83187893EAD /* SipHash.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 30D68B77A2DAB060755632E5E528C760 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 23916C64C98204C928896ABA4BE1DAE6 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 344937C62D0D8330E4E48094DCB0CC66 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2CD7546ECD0943764AEADCD7145FF106 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3EB472E2EE778BA2800B34DBF4BA6E58 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 486AE96A069EC0BAA1E35FE79194A25E /* BigInt.framework in Frameworks */, + FA024A288AA4357EB04E48AF9BCE53D1 /* CryptoSwift.framework in Frameworks */, + AFD68E6B13C8C94F2AE939D73A1FBBC0 /* EthereumAddress.framework in Frameworks */, + BB2EBA041C1D99F0E24A16187D135DD1 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 41F4954ADB1829B547B43831A90A456B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + F7B2B783AC72C8F47FA88372798B2232 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 47443B33B58650AA30AE35A1A765ADD3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 60F4B2F499CC1CA8566907DC5D3DDA97 /* CryptoSwift.framework in Frameworks */, + 710A84BE387009C61BC639D12DEB4259 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 52F89C5C9C2D8E422D7CB9267911EA07 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7AFD9E747116893B7D0BFA33C4A7DEDC /* Foundation.framework in Frameworks */, + 4901F615576719ED8E8AEB507965D52D /* UIKit.framework in Frameworks */, + 0695472F8D85187F3A02AAD9C60C9666 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6CC026A03F69450384829E9BD9ABF12C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FA6FDD79C516BF0B0989FB5BE916E68F /* BigInt.framework in Frameworks */, + 77E19544FC2C5609EDB3B556F6A59B33 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9038963056849032E1FEE0427471A22B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3D35EF8411FBCB48774166750EED461B /* BigInt.framework in Frameworks */, + D40DC88727D4B8B7F73F5145ADC440A4 /* CoreImage.framework in Frameworks */, + AE4BEB8FDA432C14865B73FF184D36FA /* CryptoSwift.framework in Frameworks */, + EAB81225067608C7D770E34314000E54 /* EthereumABI.framework in Frameworks */, + 7BD54FE9072879D7D8FF9E3CBF42F321 /* EthereumAddress.framework in Frameworks */, + B36B455F657969EB188E7565DF945D8C /* Foundation.framework in Frameworks */, + 1E7E841D003B374F3FF046EB1D5491D7 /* PromiseKit.framework in Frameworks */, + BB8192451EF7E13509E103A4600B425B /* scrypt.framework in Frameworks */, + 9B76CBD3C4E3BF68F7D98105D748DD23 /* secp256k1_swift.framework in Frameworks */, + 91EEA882F90DC420CC971255DB2B91D4 /* SwiftRLP.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C1C0F535C630D629D4BE8DD8EB940435 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E9BF248618ECAEAA87DEC0E52791B3B3 /* Foundation.framework in Frameworks */, + 21DAA040E775A3EE958A1E980A2B8BC0 /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D1D2E3112C8952F649A1AA6C2A244398 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 07E55C4B3E245C156E30DF5CAB44BB2A /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F88A903EB36D7AF6FC3A163B862AEE5B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 19EEEF4225421C0F5F4AD79A1DD4A7B0 /* CryptoSwift.framework in Frameworks */, + 521929B74C540A89354F6B479324C9DA /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FC12984555235D403D14B286742ACD09 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 09DB22EDD292025251C9A2EEC5F81AC6 /* Pod */ = { + isa = PBXGroup; + children = ( + 082CC56E889112D5D9469E5D80B8C71B /* LICENSE */, + 007D6C3F9DCFC9239BCA248B0E2DFF2D /* README.md */, + A5A81617ECCFFCBF930BDD8E4ADA6EA7 /* web3swift.podspec */, + ); + name = Pod; + sourceTree = ""; + }; + 0CBBD8A65F9A11C1AEEF275A613D544B /* Support Files */ = { + isa = PBXGroup; + children = ( + D4F852CF17E9611E408DD74ECE1A92D7 /* CryptoSwift.modulemap */, + 9F7741FDAB4EA857FB1B4AF556A4CED8 /* CryptoSwift.xcconfig */, + 28CCF54795809F1AD0E17AFB25AD2B49 /* CryptoSwift-dummy.m */, + 8E592B8848CE134E030D26C3BBA349DC /* CryptoSwift-Info.plist */, + 2C0686789655E34A6E7B11303EFD4816 /* CryptoSwift-prefix.pch */, + 91EA7B53FDE18767FDBA0BF51DE25031 /* CryptoSwift-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/CryptoSwift"; + sourceTree = ""; + }; + 0D7FB36F52A93B15E5FC40786C92AF4B /* web3swift */ = { + isa = PBXGroup; + children = ( + 0C7AFE1A1CD765C4C0CD104A148784DE /* web3swift.h */, + D9E3E64B24D84E6D1395446AE7061418 /* Contract */, + 7A473CD39D9FD83A1C5EE7B83BE1BD77 /* Convenience */, + D7322C8BFB3817D8602C2C7ACD3AE6F7 /* HookedFunctions */, + EDC73027D1CCF26D4F9B1960BC7CB619 /* KeystoreManager */, + 09DB22EDD292025251C9A2EEC5F81AC6 /* Pod */, + 9DEFA9DAF1F3E3A2125760DC3044D9DD /* Promises */, + DF754BE70549B7284DC03BD9DC9FB382 /* Support Files */, + 25D2337E10ECBD7F57B3B9BD700D9129 /* Transaction */, + E09753B4409D0EAAA77A7EC35C623DF5 /* Utils */, + 22F8C357BE78E634A6E1A0038640940B /* Web3 */, + ); + name = web3swift; + path = ../../..; + sourceTree = ""; + }; + 21E57A723159745EDE60E0F83B1DC3C3 /* Support Files */ = { + isa = PBXGroup; + children = ( + 4318D30BB5A154771EC1F0AFEAA3727B /* BigInt.modulemap */, + 976A070A96F216885426DFC61563B481 /* BigInt.xcconfig */, + B50D4481F4B63FAB12C79BCAA18DCD0F /* BigInt-dummy.m */, + BDF440EC1DDD6B0DC0DC6E6BA2303AA3 /* BigInt-Info.plist */, + C276DBD2DDB9C71FC0EACEE0DEF2FCE3 /* BigInt-prefix.pch */, + BD039C81CCBE816A0584340AC75A9457 /* BigInt-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/BigInt"; + sourceTree = ""; + }; + 22F8C357BE78E634A6E1A0038640940B /* Web3 */ = { + isa = PBXGroup; + children = ( + A3BB82093CBC895520755B6055CA0050 /* Classes */, + ); + name = Web3; + path = web3swift/Web3; + sourceTree = ""; + }; + 25A35FC50E8F4C4894A0F532F82D9531 /* Support Files */ = { + isa = PBXGroup; + children = ( + 40913BEE22327E543CEC071EB47591B3 /* SwiftRLP.modulemap */, + E6DDF2FAD4EBDA3EAC4D8EA7E434A255 /* SwiftRLP.xcconfig */, + A9EE071D88E3F4715B3B496529500DB0 /* SwiftRLP-dummy.m */, + 18EDC06AE59AF6AF4A5A214D18BC0228 /* SwiftRLP-Info.plist */, + AC389A03DEBE4C53703596A2959AF768 /* SwiftRLP-prefix.pch */, + C3661F81034FA201DE95CFF6804DBE7F /* SwiftRLP-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/SwiftRLP"; + sourceTree = ""; + }; + 25D2337E10ECBD7F57B3B9BD700D9129 /* Transaction */ = { + isa = PBXGroup; + children = ( + 3D1F9BA675E03DA256565EB054346C3F /* Classes */, + ); + name = Transaction; + path = web3swift/Transaction; + sourceTree = ""; + }; + 2BEB49F1B5C9C07816CE5EDC687C4D49 /* Support Files */ = { + isa = PBXGroup; + children = ( + D9BE7F456CD821B74DF98BE6F8DCE690 /* ResourceBundle-WKBridge-WKBridge-Info.plist */, + B66D6F40FB1A3E4C8B70597E53218232 /* WKBridge.modulemap */, + 11740C9C5ADCEDE3F9F474C910AE177D /* WKBridge.xcconfig */, + 494BD19DEF7C0C243E083E0566F97724 /* WKBridge-dummy.m */, + EE1DBBC84FDEEBADD50459603C53D9EC /* WKBridge-Info.plist */, + DBC7B7921208684651234FED044059D5 /* WKBridge-prefix.pch */, + F0E85EBA5CC5456C331AA49EF82E3483 /* WKBridge-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/WKBridge"; + sourceTree = ""; + }; + 2F0263746DF978145F147B7B2013E02E /* Support Files */ = { + isa = PBXGroup; + children = ( + 8F3894D38C1417CFEBA87F5BED30A0D1 /* EthereumABI.modulemap */, + 613D1AD1E5D58C3293126DF7F7186BD7 /* EthereumABI.xcconfig */, + 9E00048326E77E5C8CFF0383F8739C1A /* EthereumABI-dummy.m */, + F80B94BDD9699BB8FB9F57DB56F14FA5 /* EthereumABI-Info.plist */, + 54E7C195D145991317E68B99D0059387 /* EthereumABI-prefix.pch */, + D7CBEC08F89166DBCD005AB00D61AA4A /* EthereumABI-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/EthereumABI"; + sourceTree = ""; + }; + 31875FC9BF92723DACA1D8F57F6D4573 /* Support Files */ = { + isa = PBXGroup; + children = ( + DFBB06C89E889E3D6B1DE62B2F1D0941 /* scrypt.modulemap */, + 85BCD04BE36FBBE6C2EACDD6A6AFC71D /* scrypt.xcconfig */, + 5F259EE97EF815BB3F76F27DBA855651 /* scrypt-dummy.m */, + 0E6BDD6A18A0A98E719C9100AB141D82 /* scrypt-Info.plist */, + FD43C0AD45A6E239C08186A5873D28F4 /* scrypt-prefix.pch */, + 4AA008BE866DF99C1C6DE45E77988794 /* scrypt-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/scrypt"; + sourceTree = ""; + }; + 3D1F9BA675E03DA256565EB054346C3F /* Classes */ = { + isa = PBXGroup; + children = ( + 4BD5EF5645402720EBB6C1911A6BFB3A /* BloomFilter.swift */, + C437CD71580F73919581C4632318AE05 /* EthereumTransaction.swift */, + EE6E6E31E3E393B6CB357229FE36FAD8 /* TransactionSigner.swift */, + ); + name = Classes; + path = Classes; + sourceTree = ""; + }; + 42507265AB2124D01C924B835A8EC586 /* Classes */ = { + isa = PBXGroup; + children = ( + 544E5616451C52825554845F26D60869 /* Promise+Batching.swift */, + 71160870C237FDB54F5F6B39C1EC249D /* Promise+HttpProvider.swift */, + 307CE8E75570F9CEB673E76E355FC654 /* Promise+Web3+Contract+GetIndexedEvents.swift */, + 171C1B4115FFABA129DA2134F08A7517 /* Promise+Web3+Eth+Call.swift */, + FC2ABD82554314CFEBC7DE3F1281B60A /* Promise+Web3+Eth+EstimateGas.swift */, + 75EB8B5D77B01F5062EBF15521EA0A15 /* Promise+Web3+Eth+GetAccounts.swift */, + 613E99CC294DBBBA463C2B4D8ACE9BD1 /* Promise+Web3+Eth+GetBalance.swift */, + 3B763DDE0268D6D9332897A195BDF78D /* Promise+Web3+Eth+GetBlockByHash.swift */, + 07FD3969B760763BEEEDE945A6E38421 /* Promise+Web3+Eth+GetBlockByNumber.swift */, + F67F5F5BD5149669AF5633225D196140 /* Promise+Web3+Eth+GetBlockNumber.swift */, + E36A1DDEEC24A045F94D5AA2BAED727B /* Promise+Web3+Eth+GetGasPrice.swift */, + EF748D9F54E1A14415902EA96FD6D0CF /* Promise+Web3+Eth+GetTransactionCount.swift */, + ECE68C8BB981C254FD7ADA05F97DAA0F /* Promise+Web3+Eth+GetTransactionDetails.swift */, + EAB34E7BDA8823633902171C623258D0 /* Promise+Web3+Eth+GetTransactionReceipt.swift */, + 5660736868BFD803613F44199C911E8D /* Promise+Web3+Eth+SendRawTransaction.swift */, + 1376CDDC29869E19D993178B6AC1A129 /* Promise+Web3+Eth+SendTransaction.swift */, + E31DB4951BABF1FA92A5DD9A156FA8B7 /* Promise+Web3+Personal+CreateAccount.swift */, + 41E5DD31BCCEE472F0E7A9944A6D6E58 /* Promise+Web3+Personal+Sign.swift */, + 5B148BEF285BBBDCA991704A719187CE /* Promise+Web3+Personal+UnlockAccount.swift */, + 542D0C2B13E449318182E68180808311 /* Promise+Web3+TxPool.swift */, + ); + name = Classes; + path = Classes; + sourceTree = ""; + }; + 4A3308A44D6BD2EFA394D43EDF4C4C3B /* secp256k1_swift */ = { + isa = PBXGroup; + children = ( + 5E12322986FCB7A5188750A10D61D74F /* basic-config.h */, + 1C48298733543ADE743DCB301EBA5FDD /* ecdsa.h */, + D89CCEEBCA76D9E2EFC5BB67E76F0837 /* ecdsa_impl.h */, + F99A13C2EF8094A93F2E62428CADE0D0 /* eckey.h */, + 6E153E8EBD86647263301C6E6A153E86 /* eckey_impl.h */, + 362C19AA54822D5E48C43123219374E0 /* ecmult.h */, + 96D9786FECD142DCF0FC2CE63497CE9A /* ecmult_const.h */, + 91583D020D3BAD71D4BF8E0424771B02 /* ecmult_const_impl.h */, + 1DA7843B23C33194220A0A42069EEAB1 /* ecmult_gen.h */, + 6EF0564DF34B20BE60B2D0F8ABCDAA56 /* ecmult_gen_impl.h */, + C703D877C454A5F831BF937286917A7B /* ecmult_impl.h */, + 6C73C3A210D9E9A675E3638D4124FA98 /* field.h */, + E4E82201804431BAF2192B73FD6FF539 /* field_10x26.h */, + B7248A2518844FF8FB81C01C51AEA94E /* field_10x26_impl.h */, + 7F150F672F56CC5A829842B06F3FDDFE /* field_5x52.h */, + 5B704EE429FEF981BE8D8C7643A03C30 /* field_5x52_asm_impl.h */, + 29FB4C7393B3C84320BFDAE8EAA115BA /* field_5x52_impl.h */, + 35611AB8339829A3115FD187AEF3AA44 /* field_5x52_int128_impl.h */, + 81EFF929AA27215C7D61876E7C56A729 /* field_impl.h */, + 8DE3D14EDCC1F521B41873B5806197FF /* group.h */, + 75CD5FF7AF27DC775EF9AE5ACA8D2D10 /* group_impl.h */, + E349136A1DB718A586AF30A7DC511324 /* hash.h */, + 92E5D31F81E395B97C48C62CD69DB7C7 /* hash_impl.h */, + 0CFCA591C39DE0DAD7358D92B3641F1D /* lax_der_parsing.c */, + FB2EA77B3D9E5B9D373E510C409F9D9F /* lax_der_parsing.h */, + BA535050C5A6D04616FD5C982B59CD32 /* lax_der_privatekey_parsing.c */, + A5A29CFAFD42016E44DA67CD28A4A53E /* lax_der_privatekey_parsing.h */, + 6E1640B527296E8143540D9724C734B2 /* libsecp256k1-config.h */, + E4611ED6EF7395079ACCC6EF9EF2648A /* main_impl.h */, + 40CBCE6B505653A1F75F1A7D05CF2BB0 /* main_impl.h */, + 0E0347E5B00F3BD0CCEFDDBB51F86D93 /* num.h */, + 65366C8DC193D6D3E38E8C595AA3659A /* num_gmp.h */, + 50E85CF9B2EE84E87E19B992031AC869 /* num_gmp_impl.h */, + 4F2A0DCA6CEDBE5C5673C1D80CE85C57 /* num_impl.h */, + CF021D41994060D5828EEB3570EF7A9B /* scalar.h */, + A10B704CFEAD959114479F5012CD2532 /* scalar_4x64.h */, + 40464D87CFD9D884A7B31C58C14B1644 /* scalar_4x64_impl.h */, + 19DE8429E289A06751CFA4678897FED4 /* scalar_8x32.h */, + C4A72B026B3481D0FF01C45BC4B4CEFC /* scalar_8x32_impl.h */, + 48A962A1A4952B499D08CAC0AF45834D /* scalar_impl.h */, + 6BDEF8754C41FB3C25C8798C86E97514 /* scalar_low.h */, + 4359453F2A3367521E7F3A5AD25CDD3F /* scalar_low_impl.h */, + 37A4EB8546247EC0A9BC21EE2F416280 /* scratch.h */, + ECBB84241612CB8E52527516FFE28AEA /* scratch_impl.h */, + DD170A4EF842C6E5F5E805F57DECB21E /* secp256k1.c */, + 636623F0AFC27BCE4832C83B4C2C5711 /* secp256k1.h */, + AF42513E74B9593131CE78F650930D1F /* secp256k1.swift */, + F4041B96ADE4AB2DC81C6D01E1520F6B /* secp256k1_ecdh.h */, + C714668C86259E60C0444E41B71A56A9 /* secp256k1_recovery.h */, + 92567CADB38E81705DF451EF01AA6AC7 /* util.h */, + 99A35B8DFC150B974B1C739C0A9A1547 /* Support Files */, + ); + name = secp256k1_swift; + path = secp256k1_swift; + sourceTree = ""; + }; + 5EE87E13142ACB4FAAB99FB38D938799 /* Support Files */ = { + isa = PBXGroup; + children = ( + BA6657C8B03BA7D1FCB321E9CDB10F75 /* PromiseKit.modulemap */, + 18FF56EF6E70BE342A92437F9EAEF056 /* PromiseKit.xcconfig */, + 7BD122AF1F62FC100EEF85049D4D920C /* PromiseKit-dummy.m */, + 6C6B6330EB0E015DCBBC2AD07133A419 /* PromiseKit-Info.plist */, + 24520FDFD345C564DAD95D2183DE8161 /* PromiseKit-prefix.pch */, + 6FD08AEFD82A48A903C0E28B98A460A9 /* PromiseKit-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/PromiseKit"; + sourceTree = ""; + }; + 684F30321DCB67512C3D730DE8FD7181 /* CorePromise */ = { + isa = PBXGroup; + children = ( + BCCC751CE0AB5AE1FDC9E568D696DAF4 /* after.m */, + 4BEE4B0903B74B5BD6F84FC210AE80B0 /* after.swift */, + AB91F828E995E49B38C1FF2FF4AB41B9 /* AnyPromise.h */, + 891D5D33624F23A99EC9DBBFF1DCAA61 /* AnyPromise.m */, + 0B86841BA77468E728D1DA022C3293EF /* AnyPromise.swift */, + BD348A58C7418F12CFFB351832F482C1 /* Box.swift */, + 1EC71259233835B41A5A554C88E18649 /* Catchable.swift */, + 39DD919FF492E17F9100996422AC1508 /* Configuration.swift */, + CD6B4F2568D7F8FA82E928E9C33560CE /* CustomStringConvertible.swift */, + C4E15BD868B7451191C19B591710E5A5 /* Deprecations.swift */, + 6E20A79511884CD034ED58E821AB9963 /* dispatch_promise.m */, + 206AF79124DC369D97D761130E5258E3 /* Error.swift */, + 13CBA29E86E7029B3D6D8C8E5E459D91 /* firstly.swift */, + FFBA39EA8661DEA5878E3A05D1FA703A /* fwd.h */, + 7ECD71C919CAE4C6A9E3B282EF0B3D74 /* Guarantee.swift */, + 24398DC00BA1BCB8E22EF1FDF5AD8C92 /* hang.m */, + 96CA0C95378DAEB8937D1C315D2D6432 /* hang.swift */, + 8DF0DF79F1C86E4187095322220061CB /* join.m */, + CDD39B279684147812B3B6046364239D /* Promise.swift */, + 83E2FA12D8596CFE06F4142DB6BCF99A /* PromiseKit.h */, + 1F6832F3872775C7589031CEFD3D3344 /* race.m */, + 5F1C6D0D72CDECD3C4692CF2C744702C /* race.swift */, + AB791012FF3E163437EB0CAB98D55BF7 /* Resolver.swift */, + 72312181430CDA8D72ABA61658459BFE /* Thenable.swift */, + 8B20BA6CCC201B4EB3604F16C9256EB3 /* when.m */, + B8FB6B595972CDB77622B1768EDBA2E5 /* when.swift */, + ); + name = CorePromise; + sourceTree = ""; + }; + 6CBCB067787B17DC870FDBB4B5E0A38E /* Classes */ = { + isa = PBXGroup; + children = ( + 00F39DD73D1D89F1983D0C79F273311E /* ComparisonExtensions.swift */, + 8C8EBEC10E3FBDC2083ADA95D32AC0ED /* ContractProtocol.swift */, + 33956022CB96C24F3DEE7ABE10DE83A8 /* EthereumContract.swift */, + D8E661D9EF637E09D80AAAFC5092AE7C /* EthereumFilterEncodingExtensions.swift */, + 8E88FFB81700974B3E763F82320864A2 /* EventFiltering.swift */, + ); + name = Classes; + path = Classes; + sourceTree = ""; + }; + 707E4B0DB7CE43FD997238D450F1A251 /* Resources */ = { + isa = PBXGroup; + children = ( + B70C4737914067ADDDF7B927A6503861 /* wk.bridge.min.js */, + ); + name = Resources; + sourceTree = ""; + }; + 7A473CD39D9FD83A1C5EE7B83BE1BD77 /* Convenience */ = { + isa = PBXGroup; + children = ( + 9D44C525ABC33B63751291A86C8C8C6B /* Classes */, + ); + name = Convenience; + path = web3swift/Convenience; + sourceTree = ""; + }; + 7C54D5E69C4397B6BD6BC770522C3453 /* SipHash */ = { + isa = PBXGroup; + children = ( + 0F0CC651AC5CA8E789308F515200E02A /* Primitive Types.swift */, + F29D0D43A5E2F070BB7AC998E4B03360 /* RandomUInt64.swift */, + A3A86CD1B64C94999039F9ACDAD84755 /* SipHashable.swift */, + 99748D72CB2448D4F30EFFEF9F9636D4 /* SipHasher.swift */, + ACF0CD25E98057032CE472263E2EACC8 /* Support Files */, + ); + name = SipHash; + path = SipHash; + sourceTree = ""; + }; + 7CF6D09A555AC5E6CAB1DBE5DA80E888 /* SwiftRLP */ = { + isa = PBXGroup; + children = ( + E6A110A95F963A420BF7C34E9F05A6A6 /* RLP.swift */, + 062D9C6FABF3AFDE9ED77302FBC883F1 /* SwiftRLP.h */, + 25A35FC50E8F4C4894A0F532F82D9531 /* Support Files */, + ); + name = SwiftRLP; + path = SwiftRLP; + sourceTree = ""; + }; + 7D2DCBEB9752121AD6ADEE312EBC559F /* Classes */ = { + isa = PBXGroup; + children = ( + 42A74C7F34F50640959528454C7ADF7A /* EIP67Code.swift */, + ); + name = Classes; + path = Classes; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + B36AB396275697EEE1A5B13BA8A38FE3 /* Podfile */, + D8AE129855A312AB38578EB83BB2EFC8 /* Development Pods */, + EB95F8BEE6A36643AE4A58C0E30E6FF2 /* Frameworks */, + DDE5962A36814833D7A9EA1647E3D027 /* Pods */, + 8ABD27EC2F9E69938B8CD3194C143680 /* Products */, + 88177E3E8CF6F9C3A847BD2B4BF6EED6 /* Targets Support Files */, + ); + sourceTree = ""; + }; + 7DDC8C3DD1E419C81DA6FCAA9CBBF0DA /* EthereumABI */ = { + isa = PBXGroup; + children = ( + 95C84C17B948CBA407FE31EAEEECFC91 /* ABI.swift */, + 66464724192E063C8B230881F1B456A2 /* ABIDecoding.swift */, + 10F6512DE5B20FE9B13AB14EFC933636 /* ABIElements.swift */, + 8318D9A04DD887291DA86FA0BC263C42 /* ABIEncoding.swift */, + B99F243F4D23E83F6B35849493C403AC /* ABIExtensions.swift */, + 391C4280C6A01CB9846859C1FFE83915 /* ABIParameterTypes.swift */, + FC336E044244591A6F79F0F8ADDD1128 /* ABIParsing.swift */, + 4D90F369C275DFF1EC8501F18B40B406 /* ABITypeParser.swift */, + EBB03F81A5DAD541D6700C67C675CB53 /* EthereumABI.h */, + 2F0263746DF978145F147B7B2013E02E /* Support Files */, + ); + name = EthereumABI; + path = EthereumABI; + sourceTree = ""; + }; + 88177E3E8CF6F9C3A847BD2B4BF6EED6 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + ECABECB291F4F9C239D97B1B45C2F90C /* Pods-web3swiftBrowser */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 8ABD27EC2F9E69938B8CD3194C143680 /* Products */ = { + isa = PBXGroup; + children = ( + 9B4E537BADD99D1B07974C09D7D3797F /* BigInt.framework */, + AFD1621635112880074012EE850D50D4 /* CryptoSwift.framework */, + 6E2931FB3C9B813ABA682B147C905690 /* EthereumABI.framework */, + 0EAFCA8048E1F2A5B44C6A36ADAA3C10 /* EthereumAddress.framework */, + 9842944A75F47B877FA075B19DEFC371 /* Pods_web3swiftBrowser.framework */, + 98692EF4A56523CA0BF26DDAB4717B10 /* PromiseKit.framework */, + A8C77A4E8583F1291F86B150C936AE24 /* scrypt.framework */, + 068F7D300822D361C595574A9744ECFA /* secp256k1_swift.framework */, + 6CD3C8CF5E6418482BD86D4A982F4D18 /* SipHash.framework */, + D8BB5553237763952EA36043107076ED /* SwiftRLP.framework */, + 12B5186D6005F8A96238E422ED611D16 /* Web3swift.framework */, + D2743E7F22E7046D29BA1B4B30C249F9 /* WKBridge.bundle */, + 802A6F8F9E9E11516A30DFDD8622B05B /* WKBridge.framework */, + ); + name = Products; + sourceTree = ""; + }; + 8B1023BCE10338F886470AC644650E29 /* Classes */ = { + isa = PBXGroup; + children = ( + 97F28F0E9DF36732F3114E69BFE48A95 /* Web3+BrowserFunctions.swift */, + 2B8615EF5D46BD32F614236A86B3A18B /* Web3+Wallet.swift */, + ); + name = Classes; + path = Classes; + sourceTree = ""; + }; + 99A35B8DFC150B974B1C739C0A9A1547 /* Support Files */ = { + isa = PBXGroup; + children = ( + A8934D313BE8E23E076C05562DE3069C /* secp256k1_swift.modulemap */, + 07842A4A7594D4FB43E140B6213CD7AE /* secp256k1_swift.xcconfig */, + 65211025493449630ACDE59F4289A1EB /* secp256k1_swift-dummy.m */, + 823BF773E09B19D9C42CDD3C78CF9DAB /* secp256k1_swift-Info.plist */, + 392C26487BB8C836CB89BE4F0DCD413F /* secp256k1_swift-prefix.pch */, + 31BE620C30B7F661020814723E9A4225 /* secp256k1_swift-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/secp256k1_swift"; + sourceTree = ""; + }; + 9D44C525ABC33B63751291A86C8C8C6B /* Classes */ = { + isa = PBXGroup; + children = ( + 13459E0970243A6475DD720C5C5ECBB6 /* Array+Extension.swift */, + 90B5C042B418434B2F5298F6B176B1F1 /* Base58.swift */, + 424F526B84880AC3C8DF8C0573DF835E /* BigUInt+Extensions.swift */, + C01E9833E49E6D2D8F06EADE27064F8C /* CryptoExtensions.swift */, + B3FC98049DD2477DB821E3B7BA9DE1D7 /* Data+Extension.swift */, + 2DA298A6BE39A99E9D7A606FC61EB866 /* Dictionary+Extension.swift */, + 4BBA1996EF6015BDB31DC18603F2AB33 /* NativeTypesEncoding+Extensions.swift */, + F5C01011429A22DE545E0E585A014FE0 /* NSRegularExpressionExtension.swift */, + B9CB9DEF9D24AA7C3CE36E4B1661808C /* RIPEMD160+StackOveflow.swift */, + 6BA4DB1D132786518B1CD01DCFCF4552 /* String+Extension.swift */, + ); + name = Classes; + path = Classes; + sourceTree = ""; + }; + 9DEFA9DAF1F3E3A2125760DC3044D9DD /* Promises */ = { + isa = PBXGroup; + children = ( + 42507265AB2124D01C924B835A8EC586 /* Classes */, + ); + name = Promises; + path = web3swift/Promises; + sourceTree = ""; + }; + A3BB82093CBC895520755B6055CA0050 /* Classes */ = { + isa = PBXGroup; + children = ( + 3F8A9FD6B3B6A7356DD63CCD32069DBC /* Web3.swift */, + 8B7B7666CA71FCEAC7E2AAFDF044B8CB /* Web3+Contract.swift */, + DCB80A7BBF94A82EA7B094D6247C326D /* Web3+Eth.swift */, + CD83C6989AAE345C22EB457E17D3FA74 /* Web3+Eventloop.swift */, + A33D7B31A153649EAAFE73327AFD17BE /* Web3+EventParser.swift */, + 7D41D11BFA6D30CD8497C0851DD9C600 /* Web3+HttpProvider.swift */, + 8A6CA0A2631E73B74977A5EEF611D45D /* Web3+Infura.swift */, + D1DE17ECDE4ACD8B74BC10F97EB047A8 /* Web3+Instance.swift */, + D9C90CE06DC9958A4F81C4447FB43BB6 /* Web3+JSONRPC.swift */, + C713FD62CE54CBCDB4016C39AE9FDDC3 /* Web3+Methods.swift */, + D82FE8B893C5A39208C326028C27B679 /* Web3+MutatingTransaction.swift */, + 858FE8C832C8AF89EB75CD71170E1C11 /* Web3+Options.swift */, + F11E6EEC87603C04CDFDAC08A150FE30 /* Web3+Personal.swift */, + 62D1EC7EE1A8DD6F9D29A13516592DFC /* Web3+Protocols.swift */, + B898BB32772DFFD2CF28F1EDFA664337 /* Web3+ReadingTransaction.swift */, + 50BF5D525FA16E334BB0CE14B3AD85E5 /* Web3+Structures.swift */, + 8826B17C2F67CDD48367F8B6D55B44B6 /* Web3+TxPool.swift */, + 6881646ACF82A8F9FDCECA39F47366AC /* Web3+Utils.swift */, + ); + name = Classes; + path = Classes; + sourceTree = ""; + }; + A6410AC528116D5E8605717E0285EE47 /* iOS */ = { + isa = PBXGroup; + children = ( + B08667AD4A557EF6D5285A60C564FC42 /* CoreImage.framework */, + 32338008C4C24554BA46866F9ACAC97C /* Foundation.framework */, + E5E2592E125D878422270A2B22863541 /* UIKit.framework */, + 62EBED6AB6D078935F477606DA4D2E4F /* WebKit.framework */, + ); + name = iOS; + sourceTree = ""; + }; + A6663955BFD7CBDCEEEDC893DD8A00AD /* UIKit */ = { + isa = PBXGroup; + children = ( + 451F30EF753C7E51F2A54B2DCEAC0F15 /* PMKUIKit.h */, + 6D2C18BCBD74E4D525C72CF46DE26110 /* UIView+AnyPromise.h */, + 1937050612CE7BA9C2FD5606B8CBA5E0 /* UIView+AnyPromise.m */, + C873F258D4ECB7658F720D01655A322C /* UIView+Promise.swift */, + 9B2F598919D796732EBEBF2B9066A614 /* UIViewController+AnyPromise.h */, + E7A31F2F68211BCAC53099040812EF51 /* UIViewController+AnyPromise.m */, + A8FE152E35A78B5989B4D55C6E01D198 /* UIViewPropertyAnimator+Promise.swift */, + ); + name = UIKit; + sourceTree = ""; + }; + A69ABA19E21468E98801E935DFAC1D16 /* PromiseKit */ = { + isa = PBXGroup; + children = ( + 684F30321DCB67512C3D730DE8FD7181 /* CorePromise */, + E96E432B6806B5ECE282EBB946C2F784 /* Foundation */, + 5EE87E13142ACB4FAAB99FB38D938799 /* Support Files */, + A6663955BFD7CBDCEEEDC893DD8A00AD /* UIKit */, + ); + name = PromiseKit; + path = PromiseKit; + sourceTree = ""; + }; + ACF0CD25E98057032CE472263E2EACC8 /* Support Files */ = { + isa = PBXGroup; + children = ( + 5088C65D0379C8BB766099D8F00B214D /* SipHash.modulemap */, + EDE52591381A5BC90E93B78B8374408A /* SipHash.xcconfig */, + 64D96A4A36A8A5AA89014CE3E6C9C4E7 /* SipHash-dummy.m */, + ED9C0470C42FAC75235C5F414C5CA44B /* SipHash-Info.plist */, + 1AFAE3BE99E70D61C8B31B3AA3850D3C /* SipHash-prefix.pch */, + FC5A1B5377410F43913058422F4FB975 /* SipHash-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/SipHash"; + sourceTree = ""; + }; + B9FA08DE375F28E426C3AEE2891970F4 /* WKBridge */ = { + isa = PBXGroup; + children = ( + AB8D4DF4B11DD9931D7FBB48FEAC7DA3 /* Bridge.swift */, + 707E4B0DB7CE43FD997238D450F1A251 /* Resources */, + 2BEB49F1B5C9C07816CE5EDC687C4D49 /* Support Files */, + ); + name = WKBridge; + path = WKBridge; + sourceTree = ""; + }; + C03CEB265587AD5660EF0C4941AC89D0 /* BigInt */ = { + isa = PBXGroup; + children = ( + C32B08B487E3F8EE9452B131EE879CB0 /* Addition.swift */, + 69D13C6F2D474D345F3C62E4404D449D /* BigInt.swift */, + 7B6B1C4BF2AB8814190CA26B07BED6EA /* BigUInt.swift */, + 42E5B0322736A75CEAC2E5E0BC47322B /* Bitwise Ops.swift */, + A460A8BF9D5B12FF2A0DAF89B087E08B /* Codable.swift */, + 84C3AAAE22680746584135041FCB912E /* Comparable.swift */, + 8BA3C8D1E35D4FA6C86B2C9CD2E3A62C /* Data Conversion.swift */, + AD1F563FDA7A19C9E2F3C652F6C1E135 /* Division.swift */, + 368F1410F802290995CB5C9BF967D229 /* Exponentiation.swift */, + CFCC6B16030BE9425E5F29A066364CF2 /* Floating Point Conversion.swift */, + B0B13DF96A30F118B276B5CE29A288FE /* GCD.swift */, + BC72984CEA465EB43AB30D0471B8665E /* Hashable.swift */, + 52317509EEB497A31C47EDA71B823477 /* Integer Conversion.swift */, + F01550F0F03E400613B77FAFC01A8FF0 /* Multiplication.swift */, + A860FAAA8B72A45E7A4DBB1A5E70D412 /* Prime Test.swift */, + 38909D1D1D234FACCFF80C34BBD908FA /* Random.swift */, + 733A9B74D1EC3F4A9A9C2DAC1D2177EF /* Shifts.swift */, + 3FB556D67EEBBC9FE8BC6D9D18E065D2 /* Square Root.swift */, + 2895ED4BBDDDCD15EEE8BE57E871905E /* Strideable.swift */, + 10F1B9DCE2F6C8A0F77F404B3CF5DC8C /* String Conversion.swift */, + AB757C507F8FC74F442D6F1BC5026BCF /* Subtraction.swift */, + 27071742E28DDEA24E402E2086DA6A84 /* Words and Bits.swift */, + 21E57A723159745EDE60E0F83B1DC3C3 /* Support Files */, + ); + name = BigInt; + path = BigInt; + sourceTree = ""; + }; + C098B4AF2B99D646D579A51A38E3502D /* Support Files */ = { + isa = PBXGroup; + children = ( + 3C903C6D7CD96415FDAFF69A8B150939 /* EthereumAddress.modulemap */, + DE0AABB48A76B8C6604286BFDE1AB4C6 /* EthereumAddress.xcconfig */, + CA9C67E1505CC590B1C66CD4094EFE4B /* EthereumAddress-dummy.m */, + 5EE6FD8D4AD88AC23CEEFD75C9514635 /* EthereumAddress-Info.plist */, + DDA0088996F02C169EC4300B94C632BC /* EthereumAddress-prefix.pch */, + E6C2D396E24165F68410447706A29239 /* EthereumAddress-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/EthereumAddress"; + sourceTree = ""; + }; + D6227CC03C4726A36262F223BDFEE551 /* EthereumAddress */ = { + isa = PBXGroup; + children = ( + BF260D435734569BB8C726F8D071E8CB /* EthereumAddress.h */, + 34DF5BCF035BA07B33ACEC8EE07FD8DD /* EthereumAddress.swift */, + 6825C5A45C42B011E0B27E2C0BB22B8A /* Extensions.swift */, + C098B4AF2B99D646D579A51A38E3502D /* Support Files */, + ); + name = EthereumAddress; + path = EthereumAddress; + sourceTree = ""; + }; + D7322C8BFB3817D8602C2C7ACD3AE6F7 /* HookedFunctions */ = { + isa = PBXGroup; + children = ( + 8B1023BCE10338F886470AC644650E29 /* Classes */, + ); + name = HookedFunctions; + path = web3swift/HookedFunctions; + sourceTree = ""; + }; + D8AE129855A312AB38578EB83BB2EFC8 /* Development Pods */ = { + isa = PBXGroup; + children = ( + 0D7FB36F52A93B15E5FC40786C92AF4B /* web3swift */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + D9E3E64B24D84E6D1395446AE7061418 /* Contract */ = { + isa = PBXGroup; + children = ( + 6CBCB067787B17DC870FDBB4B5E0A38E /* Classes */, + ); + name = Contract; + path = web3swift/Contract; + sourceTree = ""; + }; + DDE5962A36814833D7A9EA1647E3D027 /* Pods */ = { + isa = PBXGroup; + children = ( + C03CEB265587AD5660EF0C4941AC89D0 /* BigInt */, + E2C81B4276091A78776F808055057498 /* CryptoSwift */, + 7DDC8C3DD1E419C81DA6FCAA9CBBF0DA /* EthereumABI */, + D6227CC03C4726A36262F223BDFEE551 /* EthereumAddress */, + A69ABA19E21468E98801E935DFAC1D16 /* PromiseKit */, + F4AFF13168E7FB1047CBB0E3727C8D02 /* scrypt */, + 4A3308A44D6BD2EFA394D43EDF4C4C3B /* secp256k1_swift */, + 7C54D5E69C4397B6BD6BC770522C3453 /* SipHash */, + 7CF6D09A555AC5E6CAB1DBE5DA80E888 /* SwiftRLP */, + B9FA08DE375F28E426C3AEE2891970F4 /* WKBridge */, + ); + name = Pods; + sourceTree = ""; + }; + DF754BE70549B7284DC03BD9DC9FB382 /* Support Files */ = { + isa = PBXGroup; + children = ( + 180EA8D0AEC14E5267B872E9CAD75E87 /* web3swift.modulemap */, + FF5DDFF64F22AA1902EAC1A64CB5D997 /* web3swift.xcconfig */, + F6381389003AB93AE7DEE082D4607BF6 /* web3swift-dummy.m */, + 899CD0EEEF792C2486273185A3A39126 /* web3swift-Info.plist */, + 79E7D3DA87C999F8C31B3F469A0A3FF8 /* web3swift-prefix.pch */, + A131AD6DA92EBABD1E5C58625BFBC416 /* web3swift-umbrella.h */, + ); + name = "Support Files"; + path = "Example/web3swiftBrowser/Pods/Target Support Files/web3swift"; + sourceTree = ""; + }; + E09753B4409D0EAAA77A7EC35C623DF5 /* Utils */ = { + isa = PBXGroup; + children = ( + 7D2DCBEB9752121AD6ADEE312EBC559F /* Classes */, + ); + name = Utils; + path = web3swift/Utils; + sourceTree = ""; + }; + E2C81B4276091A78776F808055057498 /* CryptoSwift */ = { + isa = PBXGroup; + children = ( + AA73B1B0CB87877BB26D1A122A8B99FC /* AEAD.swift */, + D0F29F69196DDE8C7B18B22BB7716BAC /* AEADChaCha20Poly1305.swift */, + 7360A21DD120411552BEB0A46979C113 /* AES.swift */, + 70E57365C8A66C10AF9519E9A5EC1964 /* AES+Foundation.swift */, + D3A71EF005A3B4FAD7DED21F449C3EE2 /* AES.Cryptors.swift */, + B48A647A6F4823FD3139C0A88A84B8F7 /* Array+Extension.swift */, + 6EDA03F88844DA2CEB94E8B6E5E7EA0E /* Array+Foundation.swift */, + 406D92F6318C2D2FDE44655D6AC38A54 /* Authenticator.swift */, + 1CE608572AD31FF362DB8F616FE3BA3E /* BatchedCollection.swift */, + ADF040A0EE2F4531B7E16666B1D49218 /* Bit.swift */, + 3DAF747CAA73B11A76FF5D1B0FC68B04 /* BlockCipher.swift */, + E0C689AC74B3E30F98DBEB9EC81F2A46 /* BlockDecryptor.swift */, + E5F1260B3700C4A67A1F6B962D0A34D7 /* BlockEncryptor.swift */, + 92D22B73F9E8D52B7C3B6D9DB75DC95E /* BlockMode.swift */, + 4450354D56E439B899DA89877CE790D9 /* BlockModeOptions.swift */, + A9B85C211A21CDBD9C8D265211586674 /* Blowfish.swift */, + 104575A0B9C97E5E12A25CE66E7C5172 /* Blowfish+Foundation.swift */, + EBD060B0B9D8702A510715B56DDC19EA /* CBC.swift */, + FC7C28895D25F6E931DA5BA7812F56E8 /* CBCMAC.swift */, + 48123FF1ECC25A15E6EED58BC66255C0 /* CCM.swift */, + F920A7CF425193534FF7EB6EF32088AF /* CFB.swift */, + 4256999392495EB9FABEC7E402B28532 /* ChaCha20.swift */, + 689472C8CF352350A3CD7B1E7E59C6F9 /* ChaCha20+Foundation.swift */, + C41D6EB6280997499F263CCD10037EBD /* Checksum.swift */, + 88F487D60ABCAD2A9A3B56A79D2ED18B /* Cipher.swift */, + E8E012E821E2E1C361C95827C144B459 /* CipherModeWorker.swift */, + F04647FAE97ECB37E38BC9149CFD24CF /* CMAC.swift */, + 6C25E00AF342D92A280F30659A49D3F9 /* Collection+Extension.swift */, + C24BFEB3CC3A0F95E8CAB9EFE3353A5A /* CompactMap.swift */, + 6A372E9BE81FEB4E6595E16504874649 /* Cryptor.swift */, + E523BAD98061D16273E2705EF059D6C1 /* Cryptors.swift */, + 5A14AD6290BE667C8948C69A74CBE719 /* CTR.swift */, + D27B55643A375443A10C5FBC5B412E6C /* Data+Extension.swift */, + 1F6C4C9241708169F8BB5415B3063214 /* Digest.swift */, + 8A53224C7344478B1488A631A4405A57 /* DigestType.swift */, + 9044C673C01EC75BD5C634185B7FF160 /* ECB.swift */, + DB16B9341AB0EF82837820815F7D5F20 /* GCM.swift */, + 2462799983D9188216A26DCD7CD51F11 /* Generics.swift */, + 2CB8E17B8EE0B6C2480C96F79D789F69 /* HKDF.swift */, + A88C260909AC2076CAEE4AA3727708BE /* HMAC.swift */, + 565A8FD7BF67B138CD0F83CE05D70070 /* HMAC+Foundation.swift */, + EB2FDC770609373945C150AB8D55EBB7 /* Int+Extension.swift */, + 1A35A35171C6DCDD78DE9D7E912AEF40 /* MD5.swift */, + 42500BB4EB58F6E89B258D12EA3A85EA /* NoPadding.swift */, + 4B3E8BD20BDF0C39915321B5C52B4177 /* OFB.swift */, + 6234C75FBEE77F3DD66B1F78CC2C4592 /* Operators.swift */, + 90E2AECF50D5615909E614BC523EF269 /* Padding.swift */, + E58EA42D8997BE6B895966D7349728B0 /* PBKDF1.swift */, + E3857774CE53B2BEDC3F679EBB0AE5B7 /* PBKDF2.swift */, + 5AF34671C5E5439C0DD3DE54FE81281D /* PCBC.swift */, + 12A1718EFBFA304BB295D486CC6DDB28 /* PKCS5.swift */, + 13A4E032075CD48B220512CD2E572CE3 /* PKCS7.swift */, + B9617FF9C97A50142809334E0B01FB17 /* PKCS7Padding.swift */, + 8DACF2245288A10F8DC82E76CB5AE107 /* Poly1305.swift */, + 97E78EC4E433E08662483F70A1F8ED62 /* Rabbit.swift */, + A5176316A82C935673D351FFBE8525B9 /* Rabbit+Foundation.swift */, + 3AC34580C2A4A62877DB38C69B59FDEA /* RandomBytesSequence.swift */, + A5E1458539C38D066641C4E67054E10E /* SecureBytes.swift */, + DE3E7A78534269CF3CD526A2A1F789B9 /* SHA1.swift */, + 9F0E95ECC77D57875AF18515D6747915 /* SHA2.swift */, + F96BF23CF830D12FEDD7E43604266D1D /* SHA3.swift */, + 96DE9A932DA105BDB0D9F7E14BE34084 /* StreamDecryptor.swift */, + AA174416833D677ABCB0BA66EF73C794 /* StreamEncryptor.swift */, + D71857B37785CBE90B82B36A09E1550F /* String+Extension.swift */, + 5CCC4B276372F3617E9FA8542C905713 /* String+FoundationExtension.swift */, + E2A505AB695098EBEFB3D7CCD6CCDBD3 /* UInt128.swift */, + 307616C6A80CFE4505531FC5A4611B5C /* UInt16+Extension.swift */, + 7CA1A89AEB94FBB90F1A43A95699DBE3 /* UInt32+Extension.swift */, + FBA3A73FEC3AD94CEC6829D43EBC9007 /* UInt64+Extension.swift */, + BF8C4AF0B078000272844DE8E509B59E /* UInt8+Extension.swift */, + 13EBECB5D300E44E2990E4880EB1E2E0 /* Updatable.swift */, + C5F518854281D5187CD0D2A099AE8E1F /* Utils.swift */, + D4E3E62100D8A348942C26EFDFA1F58A /* Utils+Foundation.swift */, + A0A8EF22FBDF6BD96A3D73B1EE21A8CB /* ZeroPadding.swift */, + 0CBBD8A65F9A11C1AEEF275A613D544B /* Support Files */, + ); + name = CryptoSwift; + path = CryptoSwift; + sourceTree = ""; + }; + E96E432B6806B5ECE282EBB946C2F784 /* Foundation */ = { + isa = PBXGroup; + children = ( + 40F0165751F94455542A7A7D744E5868 /* afterlife.swift */, + C7071FF52323C987C31EF1E24C37720D /* NSNotificationCenter+AnyPromise.h */, + F8AF4E2F3E0D1A048162CD9DF44207BC /* NSNotificationCenter+AnyPromise.m */, + EB2D691DC0E19B534C6FB9309CC2DD22 /* NSNotificationCenter+Promise.swift */, + E17BE21276DDB77E0928EE0908DEC2EF /* NSObject+Promise.swift */, + 9EC833B3E3BB46A92A4C47DE70502CC3 /* NSTask+AnyPromise.h */, + B285972B02773D32DA37B50342D3C441 /* NSTask+AnyPromise.m */, + 946B04DDF91DFDC0717E6FF8A3F5BCC2 /* NSURLSession+AnyPromise.h */, + 9B6E05124E91BA4591DB0BF994ABF679 /* NSURLSession+AnyPromise.m */, + DB771366BAAF8741157D9507D0D790C2 /* NSURLSession+Promise.swift */, + 12E8D11B7DA2DB8E7A2E76105D0C7544 /* PMKFoundation.h */, + 2760171835447D6D826035C278C064DD /* Process+Promise.swift */, + ); + name = Foundation; + sourceTree = ""; + }; + EB95F8BEE6A36643AE4A58C0E30E6FF2 /* Frameworks */ = { + isa = PBXGroup; + children = ( + E4B5AC1F1E07F263DAC83AA9764A5039 /* BigInt.framework */, + B1B629056BCD1A0B29E0B7A2ECEB575A /* CryptoSwift.framework */, + 75BBD65C7F475167F8986FAB6A6BC661 /* EthereumABI.framework */, + 84BFFFAC8D94F54E9A392AAC6BF0791B /* EthereumAddress.framework */, + 1CFE307BBC4FC48203B269E8D5E575FC /* PromiseKit.framework */, + D09A4B53633B0FCABF560E464F19BBED /* scrypt.framework */, + 86AFF41F0299157D70853C515F4BF386 /* secp256k1_swift.framework */, + 69D7BF66AADCC0A28B7630C346BD9FA7 /* SipHash.framework */, + 7FE9449730F32989612680CF7B0ADCE0 /* SwiftRLP.framework */, + A6410AC528116D5E8605717E0285EE47 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + ECABECB291F4F9C239D97B1B45C2F90C /* Pods-web3swiftBrowser */ = { + isa = PBXGroup; + children = ( + A7C3B26AB1F183D1A7300640488DDD82 /* Pods-web3swiftBrowser.modulemap */, + B0B18B14E2CF77C300EF29C3CC494416 /* Pods-web3swiftBrowser-acknowledgements.markdown */, + 6B17152B79677F5CAE589C1DCC93E60D /* Pods-web3swiftBrowser-acknowledgements.plist */, + 33F64C66E20D23F271A741FC8050552E /* Pods-web3swiftBrowser-dummy.m */, + 4E22CAD063C8023B0442BB773AC99E02 /* Pods-web3swiftBrowser-frameworks.sh */, + 4F954F77DD10F9F183C7C606598847C1 /* Pods-web3swiftBrowser-Info.plist */, + A02A35A4F2E0BC3921E16844895653B0 /* Pods-web3swiftBrowser-umbrella.h */, + 691F97532232D3B8FA3FAB232B4935E2 /* Pods-web3swiftBrowser.debug.xcconfig */, + C37D0F02BF4831EA794AD3A043134EF3 /* Pods-web3swiftBrowser.release.xcconfig */, + ); + name = "Pods-web3swiftBrowser"; + path = "Target Support Files/Pods-web3swiftBrowser"; + sourceTree = ""; + }; + EDC73027D1CCF26D4F9B1960BC7CB619 /* KeystoreManager */ = { + isa = PBXGroup; + children = ( + EEB38736B5E0DD21BEC86D8CF3E40CAC /* Classes */, + ); + name = KeystoreManager; + path = web3swift/KeystoreManager; + sourceTree = ""; + }; + EEB38736B5E0DD21BEC86D8CF3E40CAC /* Classes */ = { + isa = PBXGroup; + children = ( + 6EFDA840159430F66637527A30AC9B91 /* AbstractKeystore.swift */, + 25206B780E1095DD8A556008D0EFD481 /* BIP32HDNode.swift */, + B12CA03389EEA8FC37A6082513F6DF76 /* BIP32Keystore.swift */, + B0025188EA3228DD3211ACDDE025D320 /* BIP32KeystoreJSONStructure.swift */, + 32CE559EA6C174B4184662AC6704496A /* BIP39.swift */, + 86D1816CB67A6FCF7B1578DA72BBAE6E /* BIP39+WordLists.swift */, + 541E696B5463A8496D191CDA00CF17BF /* EthereumKeystoreV3.swift */, + B682EADF3606618490DE2BDC22BAF5FF /* IBAN.swift */, + 59E39637C57D2F37915C807D8978A103 /* KeystoreManager.swift */, + D65EA110104F9E503B33056E4DEC5F2D /* KeystoreV3JSONStructure.swift */, + 324ECBACBF53FADE4508E0991F921BB4 /* PlainKeystore.swift */, + ); + name = Classes; + path = Classes; + sourceTree = ""; + }; + F4AFF13168E7FB1047CBB0E3727C8D02 /* scrypt */ = { + isa = PBXGroup; + children = ( + CE9A4E1F012F918A399F1D4374F5EFAF /* BufferStorage.swift */, + 621EE5F99F75465A1124BCF732CAA05F /* Cimpl.c */, + 35BC2FC0319F475C0BB0DED5802938B0 /* Cimpl.h */, + D5731BA92FB60C72DFEC2371FC45C24A /* Salsa.swift */, + 7853B24622707B8DB692B1A0E1EB8260 /* scrypt.h */, + 8E1AFF12D87C54B362C705BFE7693CC9 /* Scrypt.swift */, + 31875FC9BF92723DACA1D8F57F6D4573 /* Support Files */, + ); + name = scrypt; + path = scrypt; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 09EADEA037FE0B8626C8AEE86F19B108 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 60F020078907CC571799F8EEE8657FD0 /* SipHash-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0A4B7E70A1F29480252D3FE01FE5087A /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 80826C6547E303565F38870D25564B23 /* WKBridge-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 12CEE37EB029F4F25C5690D060394CB2 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8A665C5336BE77B07D853FD06713690B /* Pods-web3swiftBrowser-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 34AFF57E71E707ED02EE87E12F3CF7A4 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 773CBE65419B40A9E8444F9EA0138112 /* basic-config.h in Headers */, + 5F1786E1B8206DBB670FF17083BA0533 /* ecdsa.h in Headers */, + 88D423232D4BCC30F1B60BADEBB464D1 /* ecdsa_impl.h in Headers */, + 3E6A54D3B0E37437A4AC70E5FA3455B4 /* eckey.h in Headers */, + 83B6E486549B4A12E2D126B91B4E317E /* eckey_impl.h in Headers */, + CF242CC22A5E926B526EDFBACDACF71B /* ecmult.h in Headers */, + 9A033C23BEBE8097E0A3B1C2DC2399C3 /* ecmult_const.h in Headers */, + 144B8E6AE31FC45452E8E3D36D959015 /* ecmult_const_impl.h in Headers */, + B4EBAAA60F52804AA9213213860A16EA /* ecmult_gen.h in Headers */, + 1B15C6A29C4F824A7AAE287ED45E0A64 /* ecmult_gen_impl.h in Headers */, + 0522CCAF40281716390D9A04D44878FF /* ecmult_impl.h in Headers */, + 5607376D582314ED41B2F29F64F015BF /* field.h in Headers */, + 9C74C32724E1E50BB5C0C3814BE5157E /* field_10x26.h in Headers */, + 7305A8877907D8AB16B39AB7AB277805 /* field_10x26_impl.h in Headers */, + 81E624F2E60C885DFCBE97C533144E5B /* field_5x52.h in Headers */, + 153FB6537DB060583F6ED637524362D6 /* field_5x52_asm_impl.h in Headers */, + 8816DEDF81268823C029BB076619038E /* field_5x52_impl.h in Headers */, + 13DD826D801F12539901BF1560784BCF /* field_5x52_int128_impl.h in Headers */, + 0E8E48300480C88807201CAC2E4AC266 /* field_impl.h in Headers */, + E4DD719ABBF7C744F5D7E48426BA461D /* group.h in Headers */, + 1627FBC31FB1E8E0DC641011B657E3C0 /* group_impl.h in Headers */, + 509F59699E14560CA8C9071A0922A9D5 /* hash.h in Headers */, + 331FE6905358B3045B3C43F41E5E5DED /* hash_impl.h in Headers */, + 9EA2F7C896BF5E76DBA0592AD5098EA8 /* lax_der_parsing.h in Headers */, + 09FDF66FFD0B0F990C2642B628941ACF /* lax_der_privatekey_parsing.h in Headers */, + 3EF6931D1DB8885ABEDC7D6D955BCB03 /* libsecp256k1-config.h in Headers */, + 8817A69E6C85E2BEBA24BC0490DBF26B /* main_impl.h in Headers */, + B62CACA365319AB8308998971E9FE248 /* main_impl.h in Headers */, + 9FB73B8E5CD3587FE8A9F8B1ED94DB00 /* num.h in Headers */, + 2FE673D84E661D60155A11362457EEDA /* num_gmp.h in Headers */, + 79B64474F88117AD95243F5CFE382C77 /* num_gmp_impl.h in Headers */, + 25E4EED1BE03777CB6ABDF322A6C9CEF /* num_impl.h in Headers */, + 4439BC8E6D9AEA02C485E3D1D96B42A4 /* scalar.h in Headers */, + F94C10C305D8C9DA78C97BB2FD7A6786 /* scalar_4x64.h in Headers */, + 3F234F05F3F7D53BA0A32C63FDA1C44C /* scalar_4x64_impl.h in Headers */, + 74CD9FDBBCF1284F80B2BF8A37D20E1C /* scalar_8x32.h in Headers */, + 516069987CCD426257D9FB53C77FBF64 /* scalar_8x32_impl.h in Headers */, + 04D95F835813F0085F9DC352CB105212 /* scalar_impl.h in Headers */, + 051FB19BCE07901C0908D6891915505C /* scalar_low.h in Headers */, + A80714DA1FDAEB79B1C40745973DEDFC /* scalar_low_impl.h in Headers */, + 58518342F50B48A5451FB54693FF75CE /* scratch.h in Headers */, + 02B549BB960DE62E6196AA2E19DCFF55 /* scratch_impl.h in Headers */, + 6364B48EBCB9241D1D75FB5F7FA4DC71 /* secp256k1.h in Headers */, + 435810361677F2688E0567B9BF9D1510 /* secp256k1_ecdh.h in Headers */, + 59B38B239A37DCEA91F03D99EDBB65DB /* secp256k1_recovery.h in Headers */, + B6A966F2C5D597B0D0F3FA0764CFB5E6 /* secp256k1_swift-umbrella.h in Headers */, + EB6960534DC994F693416785194067EF /* util.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3FD102C69B8A80AA835E2638D0C66C4F /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 37FA075C16F67C2E4B98C4D34A8C00E5 /* EthereumAddress-umbrella.h in Headers */, + AD251E7937B3885E2B635F6FE675F9CC /* EthereumAddress.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4DEF6EEC441DF54ABD8FE57E87799788 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 4BD14199C2C6D58D4B234A44B749D8BD /* Cimpl.h in Headers */, + 16051A9D762585F3113675911D9F320E /* scrypt-umbrella.h in Headers */, + C46FEED96A64B1FC8B72B8650E6CCAB8 /* scrypt.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5BB7A0FCC95EC7CD413E98D637584D9A /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 545072A7AC12349191FBBEFCDE711892 /* EthereumABI-umbrella.h in Headers */, + 099726630FECA2EBB07D4AD11FC8AF8A /* EthereumABI.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 774228ED792886C81715D8A22C69639B /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 71B9B8543875E4E32E42B4A9A1312C01 /* BigInt-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A055C66095197F02465154297261D825 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 9E0EA761A039CF1D354B222E90243CF5 /* web3swift-umbrella.h in Headers */, + F755BAC8DF9939C2D5F69BA342182F12 /* web3swift.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BAD93DB6B8BEE3ECEF6AD4068AA5E6BC /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D635C2DBC6036691665B3309B59D6C2E /* SwiftRLP-umbrella.h in Headers */, + 77067A0D7F6EC55261D95BED4A518E93 /* SwiftRLP.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C7150F46F252F89C9D95A984159062F1 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A235EBE6F35C5CE3D9A4897EF9458536 /* AnyPromise.h in Headers */, + 98CE98572CFA84CF0113B0B95D197CED /* fwd.h in Headers */, + 303CD299BAF68CF57E3286E7D2DF25C2 /* NSNotificationCenter+AnyPromise.h in Headers */, + 43D028079C5651E507D92FF3543DAAA1 /* NSTask+AnyPromise.h in Headers */, + 69504F2AF1EEAE350B0F805D59E4ACDA /* NSURLSession+AnyPromise.h in Headers */, + 8322BA13EEF4C52C53DB7596E0AD68E0 /* PMKFoundation.h in Headers */, + ADF002888B9B556442E02EE52A42A3E5 /* PMKUIKit.h in Headers */, + 136BB1F21A2CA9531F6C9BC75306880F /* PromiseKit-umbrella.h in Headers */, + FDB241EEE48E72130F3660732CB636AA /* PromiseKit.h in Headers */, + 879A1A29A87F21EEF155FFDBFCC819A3 /* UIView+AnyPromise.h in Headers */, + 5DC3242A8DF659780B2BA7423076DA7C /* UIViewController+AnyPromise.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C9B8F223C5191C06610567F142437FA1 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A3B3988D1BE65A4B037754384D6E2A8F /* CryptoSwift-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 10CE248718E0C5B72B7E3D962D834A1F /* WKBridge */ = { + isa = PBXNativeTarget; + buildConfigurationList = C02511D99A042C944D054ED1DCE50877 /* Build configuration list for PBXNativeTarget "WKBridge" */; + buildPhases = ( + 0A4B7E70A1F29480252D3FE01FE5087A /* Headers */, + 1FA528EF7959E2062B84A4C3BD1FF5FC /* Sources */, + 52F89C5C9C2D8E422D7CB9267911EA07 /* Frameworks */, + 8390ED4FDE7B307505BE030D5165B846 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 859CE45AB7233171D2FCBF54C0A00EF0 /* PBXTargetDependency */, + ); + name = WKBridge; + productName = WKBridge; + productReference = 802A6F8F9E9E11516A30DFDD8622B05B /* WKBridge.framework */; + productType = "com.apple.product-type.framework"; + }; + 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */ = { + isa = PBXNativeTarget; + buildConfigurationList = 64983011E689E8B1A79C910DC9586585 /* Build configuration list for PBXNativeTarget "BigInt" */; + buildPhases = ( + 774228ED792886C81715D8A22C69639B /* Headers */, + 876CA817B2DD9F8DD2A4932BACF03F12 /* Sources */, + 043A44B6F07B17B9FDB237C80C547215 /* Frameworks */, + 1AF3324DAB2C8E0DD11A0DEC66CD5799 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 61069262FD5BCD41F1C291E25CAF599B /* PBXTargetDependency */, + ); + name = BigInt; + productName = BigInt; + productReference = 9B4E537BADD99D1B07974C09D7D3797F /* BigInt.framework */; + productType = "com.apple.product-type.framework"; + }; + 1CE80AE713FAAEBFFBA2E129FE93E3B3 /* Pods-web3swiftBrowser */ = { + isa = PBXNativeTarget; + buildConfigurationList = E93338D2724289712425B66A4CFCB60E /* Build configuration list for PBXNativeTarget "Pods-web3swiftBrowser" */; + buildPhases = ( + 12CEE37EB029F4F25C5690D060394CB2 /* Headers */, + 6B7437576CC6D510345E9530AE5CDB95 /* Sources */, + 344937C62D0D8330E4E48094DCB0CC66 /* Frameworks */, + 2F07974C416513AE7942C46826041CA3 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 9DD0E8793F48908118D637A29689C517 /* PBXTargetDependency */, + 14D8F1E12939096C4654E926ED247F06 /* PBXTargetDependency */, + 8AB38B1A4B9C3F71FB98B990739198C9 /* PBXTargetDependency */, + 4425E49AD173D87FFE012E32AFAB72CD /* PBXTargetDependency */, + F29D9B2E1C9A82B15EA374619CA48486 /* PBXTargetDependency */, + 608894A2A5F597FF199A84794135F472 /* PBXTargetDependency */, + 3FBA3331114E785AB82C1F5DA93A469C /* PBXTargetDependency */, + F05596DBCE1AB7202DA70131E915495A /* PBXTargetDependency */, + 00AAECC0448E2C802FDE57B3A69B54C8 /* PBXTargetDependency */, + DED75B686F80F8C6011F09354D41AB76 /* PBXTargetDependency */, + 3F132D74E2CC625CCDA51BAD82720B9D /* PBXTargetDependency */, + ); + name = "Pods-web3swiftBrowser"; + productName = "Pods-web3swiftBrowser"; + productReference = 9842944A75F47B877FA075B19DEFC371 /* Pods_web3swiftBrowser.framework */; + productType = "com.apple.product-type.framework"; + }; + 1F2F1FBE901FE03D2F17A9F6FC7AF7B0 /* WKBridge-WKBridge */ = { + isa = PBXNativeTarget; + buildConfigurationList = B45B593041ED21431B5D6A52269C1D0E /* Build configuration list for PBXNativeTarget "WKBridge-WKBridge" */; + buildPhases = ( + F9780505703A24AAE6BE360764E5B992 /* Sources */, + FC12984555235D403D14B286742ACD09 /* Frameworks */, + E8136849104759468C66D2DBF3E2DC11 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "WKBridge-WKBridge"; + productName = "WKBridge-WKBridge"; + productReference = D2743E7F22E7046D29BA1B4B30C249F9 /* WKBridge.bundle */; + productType = "com.apple.product-type.bundle"; + }; + 6B2BD3AE818AA2BB4A99C917FC4D7BB1 /* web3swift */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3A4D7356EE3DA53B9D8CDC20EE5F5116 /* Build configuration list for PBXNativeTarget "web3swift" */; + buildPhases = ( + A055C66095197F02465154297261D825 /* Headers */, + 13BA9D21729F050B85047538447EFFDF /* Sources */, + 9038963056849032E1FEE0427471A22B /* Frameworks */, + FBCD855224C9901278E4C831A3251505 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + A4C98E7444F433A92875874871A981C9 /* PBXTargetDependency */, + 67E498190FADE1D81F2A03ED6F035991 /* PBXTargetDependency */, + E34A2CC8DEA60AB9A1102679DA2869F3 /* PBXTargetDependency */, + 973CA18440D51AA4850B32F9270BA5B4 /* PBXTargetDependency */, + 5F3CB64E8D0315B1C491AD006114AE37 /* PBXTargetDependency */, + C6B78623C36CDED4FF4F48DBADE08D64 /* PBXTargetDependency */, + 9BD3FB36ECFDF281440C408D81D4721C /* PBXTargetDependency */, + 2096020EBE0457646F67E45FD27149C9 /* PBXTargetDependency */, + ); + name = web3swift; + productName = web3swift; + productReference = 12B5186D6005F8A96238E422ED611D16 /* Web3swift.framework */; + productType = "com.apple.product-type.framework"; + }; + 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8292BE0D9164B6CA74EDE2D0B4A9C609 /* Build configuration list for PBXNativeTarget "CryptoSwift" */; + buildPhases = ( + C9B8F223C5191C06610567F142437FA1 /* Headers */, + CCBB251F64ECEFA16156983A60AFC5CA /* Sources */, + 30D68B77A2DAB060755632E5E528C760 /* Frameworks */, + C25E3F3E20AE8C3A5BA89FBE4505DC7A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CryptoSwift; + productName = CryptoSwift; + productReference = AFD1621635112880074012EE850D50D4 /* CryptoSwift.framework */; + productType = "com.apple.product-type.framework"; + }; + 70B9B02B65110648B14877481CCA7615 /* EthereumAddress */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33565CE9A008BC2D28F678145BCCC377 /* Build configuration list for PBXNativeTarget "EthereumAddress" */; + buildPhases = ( + 3FD102C69B8A80AA835E2638D0C66C4F /* Headers */, + 6F5D95792A7DD5623B7EC84E0E8359C3 /* Sources */, + F88A903EB36D7AF6FC3A163B862AEE5B /* Frameworks */, + F06C85F4A9893E89799A082D9511B26D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 82927588D81F01270CF30C1779752B8B /* PBXTargetDependency */, + ); + name = EthereumAddress; + productName = EthereumAddress; + productReference = 0EAFCA8048E1F2A5B44C6A36ADAA3C10 /* EthereumAddress.framework */; + productType = "com.apple.product-type.framework"; + }; + 7ABECC867E8D48C3DB5FA3D8C6D7E92E /* SwiftRLP */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9010AD0E7B30D348C8B8E0B299590D1A /* Build configuration list for PBXNativeTarget "SwiftRLP" */; + buildPhases = ( + BAD93DB6B8BEE3ECEF6AD4068AA5E6BC /* Headers */, + 13A61F189C82D970945DEBD8FB770347 /* Sources */, + 6CC026A03F69450384829E9BD9ABF12C /* Frameworks */, + 10EBB92E801F6BA6A116C764B03B03F8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 1877A8A1F20ABA6D16E2886F94196D53 /* PBXTargetDependency */, + ); + name = SwiftRLP; + productName = SwiftRLP; + productReference = D8BB5553237763952EA36043107076ED /* SwiftRLP.framework */; + productType = "com.apple.product-type.framework"; + }; + 7FF8752D2607B0617A8EA59CB6F52DA7 /* SipHash */ = { + isa = PBXNativeTarget; + buildConfigurationList = 18A84A1682CD37CFA0F42453F6BF95C9 /* Build configuration list for PBXNativeTarget "SipHash" */; + buildPhases = ( + 09EADEA037FE0B8626C8AEE86F19B108 /* Headers */, + 92881122437CB3C21DE6947CADDF0A60 /* Sources */, + D1D2E3112C8952F649A1AA6C2A244398 /* Frameworks */, + E2C10720FE37B7B597C0A2FD39826949 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SipHash; + productName = SipHash; + productReference = 6CD3C8CF5E6418482BD86D4A982F4D18 /* SipHash.framework */; + productType = "com.apple.product-type.framework"; + }; + 888C7AD1D57FC2EBE4CF200F6BD2A842 /* EthereumABI */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0639662C632CDF2297369DF6E66E9D8C /* Build configuration list for PBXNativeTarget "EthereumABI" */; + buildPhases = ( + 5BB7A0FCC95EC7CD413E98D637584D9A /* Headers */, + 06CD91273F3B56F7F839CD6CFA8913FC /* Sources */, + 3EB472E2EE778BA2800B34DBF4BA6E58 /* Frameworks */, + 41CAFDA813475848A6160E155F303F7C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 2965740EC5E2A6513D2A920460471AD7 /* PBXTargetDependency */, + 6C89BCE50AEDF956DF810088461B0749 /* PBXTargetDependency */, + A21A883EB1BF16D519AA5DFA79834214 /* PBXTargetDependency */, + ); + name = EthereumABI; + productName = EthereumABI; + productReference = 6E2931FB3C9B813ABA682B147C905690 /* EthereumABI.framework */; + productType = "com.apple.product-type.framework"; + }; + 9441B2FDFEA998907E1265F5E274B882 /* scrypt */ = { + isa = PBXNativeTarget; + buildConfigurationList = F7A6714615609EB10C414D105F5EFD60 /* Build configuration list for PBXNativeTarget "scrypt" */; + buildPhases = ( + 4DEF6EEC441DF54ABD8FE57E87799788 /* Headers */, + 6186CCCA6A2656D757D4E66D4F0321A5 /* Sources */, + 47443B33B58650AA30AE35A1A765ADD3 /* Frameworks */, + 378C4FBCDA565FB7E2E51C2E2F481BE7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + D0BB0B7E95B105FC14CC0277CA9204CB /* PBXTargetDependency */, + ); + name = scrypt; + productName = scrypt; + productReference = A8C77A4E8583F1291F86B150C936AE24 /* scrypt.framework */; + productType = "com.apple.product-type.framework"; + }; + DD5642DA01E4562317625956478C4871 /* secp256k1_swift */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2DA7E26F7D6C15BED837CFE2AC083BA1 /* Build configuration list for PBXNativeTarget "secp256k1_swift" */; + buildPhases = ( + 34AFF57E71E707ED02EE87E12F3CF7A4 /* Headers */, + 8AD08D8150A19659AF43B48AE498EACE /* Sources */, + 41F4954ADB1829B547B43831A90A456B /* Frameworks */, + D5FF42908C3B1D2C08D352EEDD573528 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = secp256k1_swift; + productName = secp256k1_swift; + productReference = 068F7D300822D361C595574A9744ECFA /* secp256k1_swift.framework */; + productType = "com.apple.product-type.framework"; + }; + F3894E5CF485C0E7597132389A4A5184 /* PromiseKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4AF9961E1A57922D689374EB0EAED802 /* Build configuration list for PBXNativeTarget "PromiseKit" */; + buildPhases = ( + C7150F46F252F89C9D95A984159062F1 /* Headers */, + EF90CBA49455C783D043AE133D9BDFCF /* Sources */, + C1C0F535C630D629D4BE8DD8EB940435 /* Frameworks */, + 4031AE32D233128883AEEDBBE0D8EA49 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PromiseKit; + productName = PromiseKit; + productReference = 98692EF4A56523CA0BF26DDAB4717B10 /* PromiseKit.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = 8ABD27EC2F9E69938B8CD3194C143680 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */, + 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */, + 888C7AD1D57FC2EBE4CF200F6BD2A842 /* EthereumABI */, + 70B9B02B65110648B14877481CCA7615 /* EthereumAddress */, + 1CE80AE713FAAEBFFBA2E129FE93E3B3 /* Pods-web3swiftBrowser */, + F3894E5CF485C0E7597132389A4A5184 /* PromiseKit */, + 9441B2FDFEA998907E1265F5E274B882 /* scrypt */, + DD5642DA01E4562317625956478C4871 /* secp256k1_swift */, + 7FF8752D2607B0617A8EA59CB6F52DA7 /* SipHash */, + 7ABECC867E8D48C3DB5FA3D8C6D7E92E /* SwiftRLP */, + 6B2BD3AE818AA2BB4A99C917FC4D7BB1 /* web3swift */, + 10CE248718E0C5B72B7E3D962D834A1F /* WKBridge */, + 1F2F1FBE901FE03D2F17A9F6FC7AF7B0 /* WKBridge-WKBridge */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 10EBB92E801F6BA6A116C764B03B03F8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1AF3324DAB2C8E0DD11A0DEC66CD5799 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2F07974C416513AE7942C46826041CA3 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 378C4FBCDA565FB7E2E51C2E2F481BE7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4031AE32D233128883AEEDBBE0D8EA49 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 41CAFDA813475848A6160E155F303F7C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8390ED4FDE7B307505BE030D5165B846 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8810B1755E12EA66B16B02545A73842F /* WKBridge.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C25E3F3E20AE8C3A5BA89FBE4505DC7A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D5FF42908C3B1D2C08D352EEDD573528 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2C10720FE37B7B597C0A2FD39826949 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E8136849104759468C66D2DBF3E2DC11 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 55D76DA09959B887783A16587EFBEBC4 /* wk.bridge.min.js in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F06C85F4A9893E89799A082D9511B26D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FBCD855224C9901278E4C831A3251505 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 06CD91273F3B56F7F839CD6CFA8913FC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2ADD61CDA6604966DA306959A92FA086 /* ABI.swift in Sources */, + 0485DDC0DDDFAD1E8E278AD9C56EC1B4 /* ABIDecoding.swift in Sources */, + 6DF9FDAB9C7F26B557B3A0DA94578241 /* ABIElements.swift in Sources */, + 8413BF7A30C04021BED6564D4B77738C /* ABIEncoding.swift in Sources */, + C336A99180A6D5AD84C44CC15F48E2EE /* ABIExtensions.swift in Sources */, + A95AFD0C2BC0C07CB65C970E57D177E3 /* ABIParameterTypes.swift in Sources */, + 382BA96CCC1E7E7B0927C453432C342B /* ABIParsing.swift in Sources */, + 3E7B3566E3CC285CAACA093A9832E526 /* ABITypeParser.swift in Sources */, + A89883197ADD5C0B0E2D8C797E23A8C3 /* EthereumABI-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13A61F189C82D970945DEBD8FB770347 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9DB4F701AA25B29530B637CEBF119539 /* RLP.swift in Sources */, + C8F56AFE1314D0FEA0624469D6D4DC94 /* SwiftRLP-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13BA9D21729F050B85047538447EFFDF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AF82951396DEAAC0D2EC0094529EEC0E /* AbstractKeystore.swift in Sources */, + CF5BD058C3E2C78B0DAF6358755DE4BC /* Array+Extension.swift in Sources */, + F14C2AE999E9BEC413C9B6C006FC3525 /* Base58.swift in Sources */, + 01E4DB01249E9AA0E845814E97CC91BD /* BigUInt+Extensions.swift in Sources */, + B7E7FA8D90FB4C6AE52A0DAA055E8A91 /* BIP32HDNode.swift in Sources */, + 78BA93D15E1637DB45E8F207C6A6C84F /* BIP32Keystore.swift in Sources */, + DDFAEFC66B26C97D9B0FBDB88DE6077B /* BIP32KeystoreJSONStructure.swift in Sources */, + 3F6D5AB8F29A603C8B1D45808851A17A /* BIP39+WordLists.swift in Sources */, + ED33D11F2EE6A9FD5ACDD70C7321F019 /* BIP39.swift in Sources */, + 6ECA12EBC8C3C088A82E29B9AA883C6D /* BloomFilter.swift in Sources */, + 840088C95BD348EF752325719E5FD3A6 /* ComparisonExtensions.swift in Sources */, + 007379B6A57F0D9A5FF552E4B1FC8E69 /* ContractProtocol.swift in Sources */, + F9A32A61F4618BE82B7D31D98764A4A4 /* CryptoExtensions.swift in Sources */, + 531AEDA769F58EA3B5CB7B4469897C49 /* Data+Extension.swift in Sources */, + 469D6C96006AFE25B8A7FCDB1B70DD7F /* Dictionary+Extension.swift in Sources */, + 4E7CA13DF171ABA4AA57B994027D5145 /* EIP67Code.swift in Sources */, + 7F758DDFAF3D2F78C3FCE40009226C31 /* EthereumContract.swift in Sources */, + 57C331CEB4B39FB0070C27DA4A306494 /* EthereumFilterEncodingExtensions.swift in Sources */, + 511A621851375585E3F12ADDC7427E87 /* EthereumKeystoreV3.swift in Sources */, + D9E4551F2781BB1F0A7F2B2487B807BD /* EthereumTransaction.swift in Sources */, + A3B5C83EC08D179D48D072455E25C16D /* EventFiltering.swift in Sources */, + F13C10147FD70A83FF09E607E4A02D82 /* IBAN.swift in Sources */, + 53A6C8947D6C38ECBAAC9735D6B1F5B5 /* KeystoreManager.swift in Sources */, + 672775CF1B1D142513B11D15554EBFDC /* KeystoreV3JSONStructure.swift in Sources */, + 67C514AAB55E4CC59A4B89DBC1E0D631 /* NativeTypesEncoding+Extensions.swift in Sources */, + 442BABE7C9B1479EF68FF91F97DCFD9F /* NSRegularExpressionExtension.swift in Sources */, + 39A8574229CA6D6BFDF5A952A0738292 /* PlainKeystore.swift in Sources */, + BF2BC7810ED77CD581F80CEEE9EF13FE /* Promise+Batching.swift in Sources */, + 61628EFF367CD65E150CEC6436B7224D /* Promise+HttpProvider.swift in Sources */, + 8AE7AC39D2792CC5429814826DF23D59 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */, + 069D7C62F3A828A1818AA531E783CEB1 /* Promise+Web3+Eth+Call.swift in Sources */, + 1F3ECECED1D617C7008825A0DC7DEAC1 /* Promise+Web3+Eth+EstimateGas.swift in Sources */, + 68D2E365C15D702B66669BDB2DE2D027 /* Promise+Web3+Eth+GetAccounts.swift in Sources */, + FFB816CFAA25371F9D03B1B19BB52F0C /* Promise+Web3+Eth+GetBalance.swift in Sources */, + AA26709A41864C5147351BEBEB1EB6E2 /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */, + F8DD154677493E8C442C99739A25C33C /* Promise+Web3+Eth+GetBlockByNumber.swift in Sources */, + 8A33228BA4C6B84613ACA9834C13EC9B /* Promise+Web3+Eth+GetBlockNumber.swift in Sources */, + 9958F9D586E3B4A9B800DDD1B809046C /* Promise+Web3+Eth+GetGasPrice.swift in Sources */, + D46F7A664AF8E32F279796216BD7D44F /* Promise+Web3+Eth+GetTransactionCount.swift in Sources */, + 83A11C4D1D8A371F0C08EDA7AFF4156D /* Promise+Web3+Eth+GetTransactionDetails.swift in Sources */, + 07EC96850E785B06D4F9BF5F581EE49E /* Promise+Web3+Eth+GetTransactionReceipt.swift in Sources */, + 13261B4C1AE15B2C4E3CD2B3F460348F /* Promise+Web3+Eth+SendRawTransaction.swift in Sources */, + BB7715EA617B76E46F2FD6F6BDA9383C /* Promise+Web3+Eth+SendTransaction.swift in Sources */, + B2C95AF0913B22FAC6381544E5CB24B5 /* Promise+Web3+Personal+CreateAccount.swift in Sources */, + 6F5D85F40B8894277C27740CF462C9C0 /* Promise+Web3+Personal+Sign.swift in Sources */, + 7407AA4A6B9DC3C8FA2C7915587477C2 /* Promise+Web3+Personal+UnlockAccount.swift in Sources */, + 3CB3B02AEC265ED9588E627710E76C00 /* Promise+Web3+TxPool.swift in Sources */, + A7F90D1983A30E71A1F2E14903595CC7 /* RIPEMD160+StackOveflow.swift in Sources */, + CB3DEE2F11A1123D6115B651C38FF59B /* String+Extension.swift in Sources */, + FB60E1ACA882A4A355806B9E3607339E /* TransactionSigner.swift in Sources */, + F503C6CF7B01C55540349E399732C0D1 /* Web3+BrowserFunctions.swift in Sources */, + 74291AD6673289F237FCED6BF5CC7368 /* Web3+Contract.swift in Sources */, + B7B562B6DF28A81C460A537715E46FDD /* Web3+Eth.swift in Sources */, + DB89FEA78F107128C40F87A238CAD98C /* Web3+Eventloop.swift in Sources */, + 7AD3EC0E50AB19EEEE1343022DAE9E81 /* Web3+EventParser.swift in Sources */, + 4F98ECB60DA15591AC0D5C44DCBF09E1 /* Web3+HttpProvider.swift in Sources */, + C8B8E009A0D7C10B5AF099126D4C2CF2 /* Web3+Infura.swift in Sources */, + 46C3B25A6C180EAFB95C8894055212ED /* Web3+Instance.swift in Sources */, + 866F37DBC526107DFA0837C799950BB6 /* Web3+JSONRPC.swift in Sources */, + 8D94C3199BDD8BD58F284FDE8DF799C7 /* Web3+Methods.swift in Sources */, + CB9E28ED036D0671ABA94278E83ADC49 /* Web3+MutatingTransaction.swift in Sources */, + D298B2FB17474067F30A1CC45CB8CF59 /* Web3+Options.swift in Sources */, + 690C4D456CA99E69165B98684F9E5033 /* Web3+Personal.swift in Sources */, + ACC1F645D1E18CD0290FF25A19FD256F /* Web3+Protocols.swift in Sources */, + EC242E2446B7867BEA4FDBCF3DF21C0C /* Web3+ReadingTransaction.swift in Sources */, + 42C1CDB904E3BDFF4F16858486389C37 /* Web3+Structures.swift in Sources */, + 209184E7CDAD2ABA0C69651FD6E85F06 /* Web3+TxPool.swift in Sources */, + 4E7D3B4F4857BF0D33431DF3642F34BA /* Web3+Utils.swift in Sources */, + C1157E9525133C26CE4356BF5D9CC345 /* Web3+Wallet.swift in Sources */, + DB6F71BBDA7F04D880A8384AB7BBB396 /* Web3.swift in Sources */, + 6ECDAE05BFAAF1CF8481B20BAA4354B4 /* web3swift-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1FA528EF7959E2062B84A4C3BD1FF5FC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CBD2721CEFBBE23D6F3B7F3F86165BD7 /* Bridge.swift in Sources */, + 13DAA7C3BD250712E95FE9EDA2A43AA5 /* WKBridge-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6186CCCA6A2656D757D4E66D4F0321A5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DAD449D02AE6A0ED29999074BF3B8102 /* BufferStorage.swift in Sources */, + D0FADC96E8F7801159BFBB1314143B58 /* Cimpl.c in Sources */, + 524F1ECEC68E0DBFE51BECDF1AF5D32E /* Salsa.swift in Sources */, + C4F766173E97C087AAABE2A8F8F27BE6 /* scrypt-dummy.m in Sources */, + 4BD9DF9CA6B0CE7AB933E1C688769CB3 /* Scrypt.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6B7437576CC6D510345E9530AE5CDB95 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1CC09E01D92FFFCADA00B961383303F2 /* Pods-web3swiftBrowser-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6F5D95792A7DD5623B7EC84E0E8359C3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9B1D8B3F81DA09FA60C1B87DBD2D3F63 /* EthereumAddress-dummy.m in Sources */, + 8D5BA4D08F578660123B2E81CE8D0C84 /* EthereumAddress.swift in Sources */, + 0E7DC8600622ED2E0516F25A9F51C903 /* Extensions.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 876CA817B2DD9F8DD2A4932BACF03F12 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1C6305612C71BA4A41EA3EE86EF9DE98 /* Addition.swift in Sources */, + 9A683FAB2843A7181358FFC2F9AA7FAA /* BigInt-dummy.m in Sources */, + F1631F5F7CD77D9527E4FE5EEFBCEB3D /* BigInt.swift in Sources */, + CAF579CC2CED09FBDCE2864827B8A085 /* BigUInt.swift in Sources */, + 22FE67B665841A937E8D95D9DBCC7EB7 /* Bitwise Ops.swift in Sources */, + A6B9BF2F0D5DEA52AC43A9863779A093 /* Codable.swift in Sources */, + B7F3D476C87C0EC57139955A579FA3DC /* Comparable.swift in Sources */, + E8CA9824DFEFDBE5FC430276A237F97B /* Data Conversion.swift in Sources */, + 34B17DF22062E35B740FA4AA29300ED0 /* Division.swift in Sources */, + 910DECB543C55FB96E09E4E2557A6755 /* Exponentiation.swift in Sources */, + 9DA1244904AD9E535DFE95EC136A5799 /* Floating Point Conversion.swift in Sources */, + 11155D066240AA9BCB5FB19A8915C253 /* GCD.swift in Sources */, + B514B4E9DB02B1EC4321D62DFA0524A1 /* Hashable.swift in Sources */, + 69E6BE13070187CED87503CD613CAEE1 /* Integer Conversion.swift in Sources */, + 9AE3952131E530F55D34A350ECC9B909 /* Multiplication.swift in Sources */, + 288250141FA353726E30472933B3E9DC /* Prime Test.swift in Sources */, + 43A213F845B41C54A0C6E74E216D28E5 /* Random.swift in Sources */, + FFBA8696A49B49BA33D1499546FCEC58 /* Shifts.swift in Sources */, + 60D03407C65DD41B77633BEBA45350BD /* Square Root.swift in Sources */, + 088387733523D1CAFA7D4DC267EA4433 /* Strideable.swift in Sources */, + EE851A358B5CFC5DB55B649D4E0F6817 /* String Conversion.swift in Sources */, + 541EE41CC83131708FC4873E24EB6813 /* Subtraction.swift in Sources */, + 5ED753E367A75BE0055D8AADD86B71CB /* Words and Bits.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8AD08D8150A19659AF43B48AE498EACE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D3F0FDDF83E5E27D2159EFF7BB764012 /* lax_der_parsing.c in Sources */, + 8F4EFA8B45792F0E1132D47FCB66D5C5 /* lax_der_privatekey_parsing.c in Sources */, + 0E4DDEFEB93FCA89A74E8F331B54DD72 /* secp256k1.c in Sources */, + 2A72B2B6E6C45921FD002A2E3454C9CA /* secp256k1.swift in Sources */, + 6E262FD4F7951CE75C36B8CDE234BA45 /* secp256k1_swift-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 92881122437CB3C21DE6947CADDF0A60 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8FC26FC4527AC222B1C2F40D4E1F3D81 /* Primitive Types.swift in Sources */, + 1C53AF4113DA6608A4B207AFF139039A /* RandomUInt64.swift in Sources */, + 373BCBD3BAFD4EEF405BA6A4B1DD206B /* SipHash-dummy.m in Sources */, + 03FA8EDEAAF28C2F20B6134374C42DAB /* SipHashable.swift in Sources */, + F79164F06C90C81A48EB83EE0AB5F761 /* SipHasher.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CCBB251F64ECEFA16156983A60AFC5CA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DC7336EC3F7331F6A630EDA5F32F30E7 /* AEAD.swift in Sources */, + 5B5A1021C78EDC5EB1216C03C6B3A3E3 /* AEADChaCha20Poly1305.swift in Sources */, + C5443D345E878DA9400BCB516DF56B12 /* AES+Foundation.swift in Sources */, + 892CE74F3E4A889E6F69425C79DD7E55 /* AES.Cryptors.swift in Sources */, + 98DA224F5999FBB83A4D2090F9CFBCFC /* AES.swift in Sources */, + 66FCC04FCEB5CC2EA4BFF087187158B8 /* Array+Extension.swift in Sources */, + 08BBE3B0A2885A94DE68FEEA9FBCD256 /* Array+Foundation.swift in Sources */, + A40347FBA49DCAF786314B76D48EDD88 /* Authenticator.swift in Sources */, + 48AEAA9AEFB46AF33C359BAB88AEC324 /* BatchedCollection.swift in Sources */, + F68103A274867FC3D714744E8A1E1A27 /* Bit.swift in Sources */, + 505CA5BFBA1D9ADF951C40E1EA125BD2 /* BlockCipher.swift in Sources */, + 83B5BC56560C7D387AA427415CEAE05C /* BlockDecryptor.swift in Sources */, + 4BD49C6CEF3E4405132B4AF8CA0DE003 /* BlockEncryptor.swift in Sources */, + 9E500E32A76DA2F6356AA3391AD1311C /* BlockMode.swift in Sources */, + 1A3CA564761B01FC3D99DFD8EBD833DE /* BlockModeOptions.swift in Sources */, + E766E43AFDF18D5012C83670A1B48A27 /* Blowfish+Foundation.swift in Sources */, + CFE8E9ADF0B2C6758E619C4CDB178CF4 /* Blowfish.swift in Sources */, + 65D4A5CFCCD7ABBBCA0E9E2CEE10CA62 /* CBC.swift in Sources */, + 26F636BA86A94182E5B3D4B6371B7990 /* CBCMAC.swift in Sources */, + 13E900B217EB7AABB8685EDD051A97E5 /* CCM.swift in Sources */, + 5211E62A23DC79810DF988EBD96EFC32 /* CFB.swift in Sources */, + 3A73C66F10621ABDDA6DA99B83737FD1 /* ChaCha20+Foundation.swift in Sources */, + 3E531578FF1145393154092B38E896E6 /* ChaCha20.swift in Sources */, + 0E8865F19ED08938AD447CE3EFEB6164 /* Checksum.swift in Sources */, + 23BA112C655FA27BE38C9C321EBD3A4E /* Cipher.swift in Sources */, + 28CFAA3F415F6AA26FE3A81387558344 /* CipherModeWorker.swift in Sources */, + 0A0FBCAD7A1F908EF9B1197FE8BB63D2 /* CMAC.swift in Sources */, + C4CDFEEEDDAD44CED19260B6DBEAE02E /* Collection+Extension.swift in Sources */, + 169B55A24D3FDC159B797D85588C8A34 /* CompactMap.swift in Sources */, + EF2D257F439AB4E0C37E407B20DF41BC /* Cryptor.swift in Sources */, + 4C2FA74837ADF9282EC82AAEA3344905 /* Cryptors.swift in Sources */, + 8AA4F289B20DB86C6D5CFC0551222C48 /* CryptoSwift-dummy.m in Sources */, + E1705CF699458B16784782F8A86F23EB /* CTR.swift in Sources */, + EFB38A3AC0C79689874458BE12601515 /* Data+Extension.swift in Sources */, + 14A6030032E12C1B957F620FECF742EA /* Digest.swift in Sources */, + 514821AC03DEAB80E61FD438FC0CF126 /* DigestType.swift in Sources */, + E25CC0BD6475813592D7722F3FCECA43 /* ECB.swift in Sources */, + F6666F3FE8D03AFE4FDEE4421D50B914 /* GCM.swift in Sources */, + F5BCE1E730F746F620A9DB13EE2C1B60 /* Generics.swift in Sources */, + DBE553B80B7B7A047BC80FADEC7B5F83 /* HKDF.swift in Sources */, + 72541048B150E29F22A0CBD388ED2ABD /* HMAC+Foundation.swift in Sources */, + 0627DC84943C9B21BBFFD77F73ECE3AA /* HMAC.swift in Sources */, + 7950CDCD0730EC4DE69E4452A2117CB4 /* Int+Extension.swift in Sources */, + 18704C29935E06F5FB353933C7B93897 /* MD5.swift in Sources */, + 2E3A0CE83A9DC669521D768D83113007 /* NoPadding.swift in Sources */, + 7B50A0E57C8C0F860C0E2D3E2DF889C5 /* OFB.swift in Sources */, + 168831EA2809233CFD6E98640D126804 /* Operators.swift in Sources */, + BF1CBE2864240ABA0FFCA1990215D2C5 /* Padding.swift in Sources */, + 948C38948743D31A8E07ECF1278C0438 /* PBKDF1.swift in Sources */, + 0F47AECED76239456F530A9F34C202AB /* PBKDF2.swift in Sources */, + 31FCEF8F13F00A6EB5C8E43CD2040D52 /* PCBC.swift in Sources */, + 90BB63BE1A3F2906186D961714165CD7 /* PKCS5.swift in Sources */, + 0D32A5EE13EC8FB94162257D12B47954 /* PKCS7.swift in Sources */, + 2D6F68A3EE6AD170EDC30E7485B54524 /* PKCS7Padding.swift in Sources */, + F6F9AF37C197AAA6E2F2341E1D2F3EAD /* Poly1305.swift in Sources */, + 9979250510F331D6F6C4BF5F8A07234C /* Rabbit+Foundation.swift in Sources */, + 84AD9AA7FCDCF491E5F839BDA9E62923 /* Rabbit.swift in Sources */, + EDCBAD6FE0DC05519BE87FA79D6ECCD1 /* RandomBytesSequence.swift in Sources */, + 3E4F34CF3A56C3BCA61A15667B8911CC /* SecureBytes.swift in Sources */, + D41CBBA4660B26D0AE12C867C2D27DF3 /* SHA1.swift in Sources */, + 3619B989C2E488056B62E7517BF4CCCB /* SHA2.swift in Sources */, + 287AF814872A1828332826075A3A769D /* SHA3.swift in Sources */, + 5FCE918F81777C227E72A6C620FE0E9B /* StreamDecryptor.swift in Sources */, + 97D85307763F8B8299524EEFD059729E /* StreamEncryptor.swift in Sources */, + 4F448640DE2AB108DE676C77DEF2E571 /* String+Extension.swift in Sources */, + 9E8CC528BCE6CD8751B925E2DFFC7E72 /* String+FoundationExtension.swift in Sources */, + 938239477B6A9C665CB93642E1DFD0EB /* UInt128.swift in Sources */, + C4588BD98D41DCD0F44F6FA043DC15FF /* UInt16+Extension.swift in Sources */, + E4339E5E7ECB60FD90211A3CD8E64568 /* UInt32+Extension.swift in Sources */, + 07CB80647C63863F46097ECFE0E2852C /* UInt64+Extension.swift in Sources */, + 12D7EAE6F2CEC81702FD70455699210D /* UInt8+Extension.swift in Sources */, + A1257C2EF19E838CC9954197DDCA5734 /* Updatable.swift in Sources */, + 58D378DF3FF9C2C523F72714F028BC18 /* Utils+Foundation.swift in Sources */, + 47F09AB386ECB4F06DC94B5D84B829E3 /* Utils.swift in Sources */, + CF9E91FF64AEBD06486F49509872C007 /* ZeroPadding.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EF90CBA49455C783D043AE133D9BDFCF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9E4D717515815E3308EC9DC06966D0B1 /* after.m in Sources */, + 7FA4D5AF26202B4C493F6349840E6215 /* after.swift in Sources */, + 878645FC5C5AA385461FBF097AC34764 /* afterlife.swift in Sources */, + 29924F2EF0F199F7AFA50702DFD1D10F /* AnyPromise.m in Sources */, + 74AACFA2A98BDACD9FB46044E927A8B4 /* AnyPromise.swift in Sources */, + 001B8E53F2E74A971F96B5A0AFB56312 /* Box.swift in Sources */, + 83009CD89A5677794EE37AEA37F14223 /* Catchable.swift in Sources */, + B33CA635DC508E5B761478A92EE0F136 /* Configuration.swift in Sources */, + 18863E02F23DAC3344E1E0F46A69E8A8 /* CustomStringConvertible.swift in Sources */, + BC5A7791F499DEA385857C4883691D04 /* Deprecations.swift in Sources */, + 7F5A057BF6CE7C10456C07593DDAFE79 /* dispatch_promise.m in Sources */, + 878FA7AFAC9A5F2C96A75F6B2A7ACDF2 /* Error.swift in Sources */, + 161E411D1D54E1E1046CE252996A66B0 /* firstly.swift in Sources */, + 8AD698D80534E787ABF4E533E6D7598C /* Guarantee.swift in Sources */, + 33D0F3C5F22E0FDC84DC6516F86496EB /* hang.m in Sources */, + 3D681CDB0E43BE6DF71048D474960575 /* hang.swift in Sources */, + 64FEBBCF2539C5D6C427FA6E165E09A9 /* join.m in Sources */, + 61E5C5661F226B7688E897840C549BD7 /* NSNotificationCenter+AnyPromise.m in Sources */, + 08BF91C8E2A145AF73F8BF81DB7B7F28 /* NSNotificationCenter+Promise.swift in Sources */, + 6F25774B8EA3E538845FAD096A932C24 /* NSObject+Promise.swift in Sources */, + 970A66DA078EAE00112AF99B6A8E2743 /* NSTask+AnyPromise.m in Sources */, + BACD5D8ED9A6CC34F201CF3E4AC9337A /* NSURLSession+AnyPromise.m in Sources */, + B8AC31FF13CB4D0F71A7655A01AC3389 /* NSURLSession+Promise.swift in Sources */, + 433B07326BF66C0B669C6B2C226E9549 /* Process+Promise.swift in Sources */, + 063877A2694F8B1409516732B8FFE41D /* Promise.swift in Sources */, + C1C43C97C18AF274097C08F6DB96B3F0 /* PromiseKit-dummy.m in Sources */, + F6FCAB11BE49F63A1CB2C1635F70482B /* race.m in Sources */, + 18B0F374DF423121E792073034E5648C /* race.swift in Sources */, + 815AE90F23754A0CDD43C46A3E4D097B /* Resolver.swift in Sources */, + A84072A0FF9E2E8060F199A0B5B49F36 /* Thenable.swift in Sources */, + EF3ED3977E4419E08716E4837C55BAD9 /* UIView+AnyPromise.m in Sources */, + DBD97B9D166E3D04E502A6664E2155E6 /* UIView+Promise.swift in Sources */, + 7C25D56E17A18A7ABA0A2AAD188E00AF /* UIViewController+AnyPromise.m in Sources */, + 99C1CB799C2708904B77C48469B5D2CE /* UIViewPropertyAnimator+Promise.swift in Sources */, + C441B6F6F01DCAC9C0FE6D31193EDCDC /* when.m in Sources */, + 56042FC0568311A6A2ACC5115780C525 /* when.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F9780505703A24AAE6BE360764E5B992 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 00AAECC0448E2C802FDE57B3A69B54C8 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = scrypt; + target = 9441B2FDFEA998907E1265F5E274B882 /* scrypt */; + targetProxy = 48510A0AF73E49722A3143C5BED7DDA1 /* PBXContainerItemProxy */; + }; + 14D8F1E12939096C4654E926ED247F06 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CryptoSwift; + target = 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */; + targetProxy = 6EFC843E872F80A24BD00A4CCCAD2D9E /* PBXContainerItemProxy */; + }; + 1877A8A1F20ABA6D16E2886F94196D53 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BigInt; + target = 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */; + targetProxy = 59D976835BD89262523E7053FA4AB189 /* PBXContainerItemProxy */; + }; + 2096020EBE0457646F67E45FD27149C9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = secp256k1_swift; + target = DD5642DA01E4562317625956478C4871 /* secp256k1_swift */; + targetProxy = 6C195B6859DCD8F2D3C782F5FD430E20 /* PBXContainerItemProxy */; + }; + 2965740EC5E2A6513D2A920460471AD7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BigInt; + target = 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */; + targetProxy = 5ED7085516CC4C38EC3D8A95CD2F66A6 /* PBXContainerItemProxy */; + }; + 3F132D74E2CC625CCDA51BAD82720B9D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = web3swift; + target = 6B2BD3AE818AA2BB4A99C917FC4D7BB1 /* web3swift */; + targetProxy = 006C656F528857067DA0DCD83953E6C1 /* PBXContainerItemProxy */; + }; + 3FBA3331114E785AB82C1F5DA93A469C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SwiftRLP; + target = 7ABECC867E8D48C3DB5FA3D8C6D7E92E /* SwiftRLP */; + targetProxy = E19B5B3C2803C0BC123423D9AC962A2D /* PBXContainerItemProxy */; + }; + 4425E49AD173D87FFE012E32AFAB72CD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = EthereumAddress; + target = 70B9B02B65110648B14877481CCA7615 /* EthereumAddress */; + targetProxy = 029E29D8B81AE5D437799689C0E167A7 /* PBXContainerItemProxy */; + }; + 5F3CB64E8D0315B1C491AD006114AE37 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PromiseKit; + target = F3894E5CF485C0E7597132389A4A5184 /* PromiseKit */; + targetProxy = 762544960A4DDB6CB89CA98F3FB11E31 /* PBXContainerItemProxy */; + }; + 608894A2A5F597FF199A84794135F472 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SipHash; + target = 7FF8752D2607B0617A8EA59CB6F52DA7 /* SipHash */; + targetProxy = 915DAB95B318BB6C015A64D97054014A /* PBXContainerItemProxy */; + }; + 61069262FD5BCD41F1C291E25CAF599B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SipHash; + target = 7FF8752D2607B0617A8EA59CB6F52DA7 /* SipHash */; + targetProxy = C6C17D0086F8D9E70B8AF619657FF2BC /* PBXContainerItemProxy */; + }; + 67E498190FADE1D81F2A03ED6F035991 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CryptoSwift; + target = 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */; + targetProxy = E8FE9B34F5286A63BC37DAC6EA777F8E /* PBXContainerItemProxy */; + }; + 6C89BCE50AEDF956DF810088461B0749 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CryptoSwift; + target = 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */; + targetProxy = DEE978CB09E9ED72BBBC50BF4790740F /* PBXContainerItemProxy */; + }; + 82927588D81F01270CF30C1779752B8B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CryptoSwift; + target = 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */; + targetProxy = 819472C9CA5B12290E4B3D5D1BD88D51 /* PBXContainerItemProxy */; + }; + 859CE45AB7233171D2FCBF54C0A00EF0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "WKBridge-WKBridge"; + target = 1F2F1FBE901FE03D2F17A9F6FC7AF7B0 /* WKBridge-WKBridge */; + targetProxy = 7BC7567AE0CFD664FF5852311BB37F3A /* PBXContainerItemProxy */; + }; + 8AB38B1A4B9C3F71FB98B990739198C9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = EthereumABI; + target = 888C7AD1D57FC2EBE4CF200F6BD2A842 /* EthereumABI */; + targetProxy = 5798E623C400C35A25502C267904E058 /* PBXContainerItemProxy */; + }; + 973CA18440D51AA4850B32F9270BA5B4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = EthereumAddress; + target = 70B9B02B65110648B14877481CCA7615 /* EthereumAddress */; + targetProxy = A4B9D3E6898271819A4A87350E28CAA9 /* PBXContainerItemProxy */; + }; + 9BD3FB36ECFDF281440C408D81D4721C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = scrypt; + target = 9441B2FDFEA998907E1265F5E274B882 /* scrypt */; + targetProxy = 2FA32F8330EC7F6C6E3F77FE126086D6 /* PBXContainerItemProxy */; + }; + 9DD0E8793F48908118D637A29689C517 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BigInt; + target = 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */; + targetProxy = 6FCC81CE6704A065043446C3B1417938 /* PBXContainerItemProxy */; + }; + A21A883EB1BF16D519AA5DFA79834214 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = EthereumAddress; + target = 70B9B02B65110648B14877481CCA7615 /* EthereumAddress */; + targetProxy = 4E9D74E7CDF6D61C608BA27D99B37C91 /* PBXContainerItemProxy */; + }; + A4C98E7444F433A92875874871A981C9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BigInt; + target = 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */; + targetProxy = 054D99CBFB470CB076380C2E38C44FD8 /* PBXContainerItemProxy */; + }; + C6B78623C36CDED4FF4F48DBADE08D64 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SwiftRLP; + target = 7ABECC867E8D48C3DB5FA3D8C6D7E92E /* SwiftRLP */; + targetProxy = 059CDDC6050505123137B45381E2FCB7 /* PBXContainerItemProxy */; + }; + D0BB0B7E95B105FC14CC0277CA9204CB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CryptoSwift; + target = 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */; + targetProxy = F088BCFA58BE219A05988AB5110D91FD /* PBXContainerItemProxy */; + }; + DED75B686F80F8C6011F09354D41AB76 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = secp256k1_swift; + target = DD5642DA01E4562317625956478C4871 /* secp256k1_swift */; + targetProxy = E4FC701433367BA181560601B8D6E1A3 /* PBXContainerItemProxy */; + }; + E34A2CC8DEA60AB9A1102679DA2869F3 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = EthereumABI; + target = 888C7AD1D57FC2EBE4CF200F6BD2A842 /* EthereumABI */; + targetProxy = D9070BF395305634365FA26967ADA25B /* PBXContainerItemProxy */; + }; + F05596DBCE1AB7202DA70131E915495A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = WKBridge; + target = 10CE248718E0C5B72B7E3D962D834A1F /* WKBridge */; + targetProxy = 85C88091B1ACBA57400E03A1EB7F3ACE /* PBXContainerItemProxy */; + }; + F29D9B2E1C9A82B15EA374619CA48486 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PromiseKit; + target = F3894E5CF485C0E7597132389A4A5184 /* PromiseKit */; + targetProxy = 1DAA2A8DE3F6478894FCCD6AA0C45BA2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 1F37B44CF65D723A98B4C8CDA6116B78 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 691F97532232D3B8FA3FAB232B4935E2 /* Pods-web3swiftBrowser.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "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-web3swiftBrowser/Pods-web3swiftBrowser-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.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; + }; + 28DBD9DABB5CE406DD9243C39941245B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 18FF56EF6E70BE342A92437F9EAEF056 /* PromiseKit.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/PromiseKit/PromiseKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PromiseKit/PromiseKit-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PromiseKit/PromiseKit.modulemap"; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = PromiseKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 3237627CAE2D69FDC9A7D5A730FABB02 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 85BCD04BE36FBBE6C2EACDD6A6AFC71D /* scrypt.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/scrypt/scrypt-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/scrypt/scrypt-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/scrypt/scrypt.modulemap"; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = scrypt; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 3FEC3B68BF0E89ECD6D132154597C756 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 976A070A96F216885426DFC61563B481 /* BigInt.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/BigInt-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/BigInt/BigInt-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/BigInt/BigInt.modulemap"; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = BigInt; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 4387B1362ED59CCA2154466131D79507 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 07842A4A7594D4FB43E140B6213CD7AE /* secp256k1_swift.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/secp256k1_swift/secp256k1_swift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/secp256k1_swift/secp256k1_swift-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/secp256k1_swift/secp256k1_swift.modulemap"; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = secp256k1_swift; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 440C636F8DA325BBF8222F5D0B18955C /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FF5DDFF64F22AA1902EAC1A64CB5D997 /* web3swift.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/web3swift/web3swift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/web3swift/web3swift-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/web3swift/web3swift.modulemap"; + PRODUCT_MODULE_NAME = Web3swift; + PRODUCT_NAME = Web3swift; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 50CA14B63B81244DBB1341390943A5A2 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EDE52591381A5BC90E93B78B8374408A /* SipHash.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/SipHash/SipHash-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SipHash/SipHash-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SipHash/SipHash.modulemap"; + PRODUCT_MODULE_NAME = SipHash; + PRODUCT_NAME = SipHash; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 554E657D20EA5E554C3593E5717B276E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 11740C9C5ADCEDE3F9F474C910AE177D /* WKBridge.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/WKBridge/WKBridge-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/WKBridge/WKBridge-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/WKBridge/WKBridge.modulemap"; + PRODUCT_MODULE_NAME = WKBridge; + PRODUCT_NAME = WKBridge; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 55C1A2076EB2D86AE1A4558A541A335D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 11740C9C5ADCEDE3F9F474C910AE177D /* WKBridge.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/WKBridge"; + INFOPLIST_FILE = "Target Support Files/WKBridge/ResourceBundle-WKBridge-WKBridge-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + PRODUCT_NAME = WKBridge; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; + 620023D6C528EDD0A908D00E8E201B37 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 18FF56EF6E70BE342A92437F9EAEF056 /* PromiseKit.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/PromiseKit/PromiseKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PromiseKit/PromiseKit-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PromiseKit/PromiseKit.modulemap"; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = PromiseKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 660494C878962B4002AA7524AFB329C8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 85BCD04BE36FBBE6C2EACDD6A6AFC71D /* scrypt.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/scrypt/scrypt-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/scrypt/scrypt-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/scrypt/scrypt.modulemap"; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = scrypt; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 6A53AA94EBD4707AC2C2A20D12036F9F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 11740C9C5ADCEDE3F9F474C910AE177D /* WKBridge.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/WKBridge"; + INFOPLIST_FILE = "Target Support Files/WKBridge/ResourceBundle-WKBridge-WKBridge-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + PRODUCT_NAME = WKBridge; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + 6F2E2F54C89E9EF0A12FED0F558A8098 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C37D0F02BF4831EA794AD3A043134EF3 /* Pods-web3swiftBrowser.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "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-web3swiftBrowser/Pods-web3swiftBrowser-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.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; + }; + 749A3881BF507DF1FDBA73E79D292109 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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_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 = 12.0; + 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 = 4.2; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + 83A976E6ACB6DA0E29129AFDCB4295A1 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 613D1AD1E5D58C3293126DF7F7186BD7 /* EthereumABI.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/EthereumABI/EthereumABI-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/EthereumABI/EthereumABI-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/EthereumABI/EthereumABI.modulemap"; + PRODUCT_MODULE_NAME = EthereumABI; + PRODUCT_NAME = EthereumABI; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 947D174EBA8A73C9D9606BABF8576374 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DE0AABB48A76B8C6604286BFDE1AB4C6 /* EthereumAddress.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/EthereumAddress/EthereumAddress-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/EthereumAddress/EthereumAddress-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/EthereumAddress/EthereumAddress.modulemap"; + PRODUCT_MODULE_NAME = EthereumAddress; + PRODUCT_NAME = EthereumAddress; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + A1CBB4736B5B4470080F6F91A81682DE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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_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 = 12.0; + 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 = 4.2; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + C203C40714A8A9A2C69EDA74A2C8C954 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9F7741FDAB4EA857FB1B4AF556A4CED8 /* CryptoSwift.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/CryptoSwift/CryptoSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CryptoSwift/CryptoSwift-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/CryptoSwift/CryptoSwift.modulemap"; + PRODUCT_MODULE_NAME = CryptoSwift; + PRODUCT_NAME = CryptoSwift; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + C5FA1665155012E022803A36BCAC1ADC /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DE0AABB48A76B8C6604286BFDE1AB4C6 /* EthereumAddress.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/EthereumAddress/EthereumAddress-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/EthereumAddress/EthereumAddress-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/EthereumAddress/EthereumAddress.modulemap"; + PRODUCT_MODULE_NAME = EthereumAddress; + PRODUCT_NAME = EthereumAddress; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + C8BC85C45607FB28F2B40A26239C6862 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EDE52591381A5BC90E93B78B8374408A /* SipHash.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/SipHash/SipHash-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SipHash/SipHash-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SipHash/SipHash.modulemap"; + PRODUCT_MODULE_NAME = SipHash; + PRODUCT_NAME = SipHash; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + C9D2276E35925F8A3D7215E05AE84097 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 07842A4A7594D4FB43E140B6213CD7AE /* secp256k1_swift.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/secp256k1_swift/secp256k1_swift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/secp256k1_swift/secp256k1_swift-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/secp256k1_swift/secp256k1_swift.modulemap"; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = secp256k1_swift; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + CFADDD5C10A193932A93A0A4B3890911 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 613D1AD1E5D58C3293126DF7F7186BD7 /* EthereumABI.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/EthereumABI/EthereumABI-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/EthereumABI/EthereumABI-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/EthereumABI/EthereumABI.modulemap"; + PRODUCT_MODULE_NAME = EthereumABI; + PRODUCT_NAME = EthereumABI; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + D4685E8989A97FE79A80919A3E3BA366 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 11740C9C5ADCEDE3F9F474C910AE177D /* WKBridge.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/WKBridge/WKBridge-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/WKBridge/WKBridge-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/WKBridge/WKBridge.modulemap"; + PRODUCT_MODULE_NAME = WKBridge; + PRODUCT_NAME = WKBridge; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + E1AB1ED2F63AD977033C4849C695DD28 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E6DDF2FAD4EBDA3EAC4D8EA7E434A255 /* SwiftRLP.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/SwiftRLP/SwiftRLP-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftRLP/SwiftRLP-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SwiftRLP/SwiftRLP.modulemap"; + PRODUCT_MODULE_NAME = SwiftRLP; + PRODUCT_NAME = SwiftRLP; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + E9C70B143A6A4E23F42470FDEF49819C /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 976A070A96F216885426DFC61563B481 /* BigInt.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/BigInt-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/BigInt/BigInt-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/BigInt/BigInt.modulemap"; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = BigInt; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + F5D6AF95F4B74A6D7063CB61D5DD4217 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9F7741FDAB4EA857FB1B4AF556A4CED8 /* CryptoSwift.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/CryptoSwift/CryptoSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CryptoSwift/CryptoSwift-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/CryptoSwift/CryptoSwift.modulemap"; + PRODUCT_MODULE_NAME = CryptoSwift; + PRODUCT_NAME = CryptoSwift; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + F9490AB36DA74D40D66BA982215C0F27 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E6DDF2FAD4EBDA3EAC4D8EA7E434A255 /* SwiftRLP.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/SwiftRLP/SwiftRLP-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftRLP/SwiftRLP-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SwiftRLP/SwiftRLP.modulemap"; + PRODUCT_MODULE_NAME = SwiftRLP; + PRODUCT_NAME = SwiftRLP; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + FA34DAD4725E89E8C3B63773B07D4144 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FF5DDFF64F22AA1902EAC1A64CB5D997 /* web3swift.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CODE_SIGN_IDENTITY = ""; + "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/web3swift/web3swift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/web3swift/web3swift-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/web3swift/web3swift.modulemap"; + PRODUCT_MODULE_NAME = Web3swift; + PRODUCT_NAME = Web3swift; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 0639662C632CDF2297369DF6E66E9D8C /* Build configuration list for PBXNativeTarget "EthereumABI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83A976E6ACB6DA0E29129AFDCB4295A1 /* Debug */, + CFADDD5C10A193932A93A0A4B3890911 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 18A84A1682CD37CFA0F42453F6BF95C9 /* Build configuration list for PBXNativeTarget "SipHash" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 50CA14B63B81244DBB1341390943A5A2 /* Debug */, + C8BC85C45607FB28F2B40A26239C6862 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 749A3881BF507DF1FDBA73E79D292109 /* Debug */, + A1CBB4736B5B4470080F6F91A81682DE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2DA7E26F7D6C15BED837CFE2AC083BA1 /* Build configuration list for PBXNativeTarget "secp256k1_swift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4387B1362ED59CCA2154466131D79507 /* Debug */, + C9D2276E35925F8A3D7215E05AE84097 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33565CE9A008BC2D28F678145BCCC377 /* Build configuration list for PBXNativeTarget "EthereumAddress" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C5FA1665155012E022803A36BCAC1ADC /* Debug */, + 947D174EBA8A73C9D9606BABF8576374 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3A4D7356EE3DA53B9D8CDC20EE5F5116 /* Build configuration list for PBXNativeTarget "web3swift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 440C636F8DA325BBF8222F5D0B18955C /* Debug */, + FA34DAD4725E89E8C3B63773B07D4144 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4AF9961E1A57922D689374EB0EAED802 /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 28DBD9DABB5CE406DD9243C39941245B /* Debug */, + 620023D6C528EDD0A908D00E8E201B37 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 64983011E689E8B1A79C910DC9586585 /* Build configuration list for PBXNativeTarget "BigInt" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3FEC3B68BF0E89ECD6D132154597C756 /* Debug */, + E9C70B143A6A4E23F42470FDEF49819C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8292BE0D9164B6CA74EDE2D0B4A9C609 /* Build configuration list for PBXNativeTarget "CryptoSwift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C203C40714A8A9A2C69EDA74A2C8C954 /* Debug */, + F5D6AF95F4B74A6D7063CB61D5DD4217 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9010AD0E7B30D348C8B8E0B299590D1A /* Build configuration list for PBXNativeTarget "SwiftRLP" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F9490AB36DA74D40D66BA982215C0F27 /* Debug */, + E1AB1ED2F63AD977033C4849C695DD28 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B45B593041ED21431B5D6A52269C1D0E /* Build configuration list for PBXNativeTarget "WKBridge-WKBridge" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6A53AA94EBD4707AC2C2A20D12036F9F /* Debug */, + 55C1A2076EB2D86AE1A4558A541A335D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C02511D99A042C944D054ED1DCE50877 /* Build configuration list for PBXNativeTarget "WKBridge" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 554E657D20EA5E554C3593E5717B276E /* Debug */, + D4685E8989A97FE79A80919A3E3BA366 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E93338D2724289712425B66A4CFCB60E /* Build configuration list for PBXNativeTarget "Pods-web3swiftBrowser" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1F37B44CF65D723A98B4C8CDA6116B78 /* Debug */, + 6F2E2F54C89E9EF0A12FED0F558A8098 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F7A6714615609EB10C414D105F5EFD60 /* Build configuration list for PBXNativeTarget "scrypt" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3237627CAE2D69FDC9A7D5A730FABB02 /* Debug */, + 660494C878962B4002AA7524AFB329C8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h new file mode 100644 index 000000000..351a93b97 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h @@ -0,0 +1,44 @@ +#import +#import + + +/** + To import the `NSNotificationCenter` category: + + use_frameworks! + pod "PromiseKit/Foundation" + + Or `NSNotificationCenter` is one of the categories imported by the umbrella pod: + + use_frameworks! + pod "PromiseKit" + + And then in your sources: + + #import +*/ +@interface NSNotificationCenter (PromiseKit) +/** + Observe the named notification once. + + [NSNotificationCenter once:UIKeyboardWillShowNotification].then(^(id note, id userInfo){ + UIViewAnimationCurve curve = [userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue]; + CGFloat duration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue]; + + return [UIView promiseWithDuration:duration delay:0.0 options:(curve << 16) animations:^{ + + }]; + }); + + @warning *Important* Promises only resolve once. If you need your block to execute more than once then use `-addObserverForName:object:queue:usingBlock:`. + + @param notificationName The name of the notification for which to register the observer. + + @return A promise that fulfills with two parameters: + + 1. The NSNotification object. + 2. The NSNotification’s userInfo property. +*/ ++ (AnyPromise *)once:(NSString *)notificationName NS_REFINED_FOR_SWIFT; + +@end diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m new file mode 100644 index 000000000..f8aee7109 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m @@ -0,0 +1,18 @@ +#import +#import +#import "PMKFoundation.h" + +@implementation NSNotificationCenter (PromiseKit) + ++ (AnyPromise *)once:(NSString *)name { + return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { + __block id identifier; + identifier = [[NSNotificationCenter defaultCenter] addObserverForName:name object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) { + [[NSNotificationCenter defaultCenter] removeObserver:identifier name:name object:nil]; + identifier = nil; + resolve(PMKManifold(note, note.userInfo)); + }]; + }]; +} + +@end diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift new file mode 100644 index 000000000..3b7f84345 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift @@ -0,0 +1,33 @@ +import Foundation +#if !PMKCocoaPods +import PromiseKit +#endif + +/** + To import the `NSNotificationCenter` category: + + use_frameworks! + pod "PromiseKit/Foundation" + + Or `NSNotificationCenter` is one of the categories imported by the umbrella pod: + + use_frameworks! + pod "PromiseKit" + + And then in your sources: + + import PromiseKit +*/ +extension NotificationCenter { + /// Observe the named notification once + public func observe(once name: Notification.Name, object: Any? = nil) -> Guarantee { + let (promise, fulfill) = Guarantee.pending() + #if os(Linux) && ((swift(>=4.0) && !swift(>=4.0.1)) || (swift(>=3.0) && !swift(>=3.2.1))) + let id = addObserver(forName: name, object: object, queue: nil, usingBlock: fulfill) + #else + let id = addObserver(forName: name, object: object, queue: nil, using: fulfill) + #endif + promise.done { _ in self.removeObserver(id) } + return promise + } +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSObject+Promise.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSObject+Promise.swift new file mode 100644 index 000000000..135719bf6 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSObject+Promise.swift @@ -0,0 +1,57 @@ +import Foundation +#if !PMKCocoaPods +import PromiseKit +#endif + +/** + To import the `NSObject` category: + + use_frameworks! + pod "PromiseKit/Foundation" + + Or `NSObject` is one of the categories imported by the umbrella pod: + + use_frameworks! + pod "PromiseKit" + + And then in your sources: + + import PromiseKit +*/ +extension NSObject { + /** + - Returns: A promise that resolves when the provided keyPath changes. + - Warning: *Important* The promise must not outlive the object under observation. + - SeeAlso: Apple’s KVO documentation. + */ + public func observe(_: PMKNamespacer, keyPath: String) -> Guarantee { + return Guarantee { KVOProxy(observee: self, keyPath: keyPath, resolve: $0) } + } +} + +private class KVOProxy: NSObject { + var retainCycle: KVOProxy? + let fulfill: (Any?) -> Void + + @discardableResult + init(observee: NSObject, keyPath: String, resolve: @escaping (Any?) -> Void) { + fulfill = resolve + super.init() + observee.addObserver(self, forKeyPath: keyPath, options: NSKeyValueObservingOptions.new, context: pointer) + retainCycle = self + } + + fileprivate override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { + if let change = change, context == pointer { + defer { retainCycle = nil } + fulfill(change[NSKeyValueChangeKey.newKey]) + if let object = object as? NSObject, let keyPath = keyPath { + object.removeObserver(self, forKeyPath: keyPath) + } + } + } + + private lazy var pointer: UnsafeMutableRawPointer = { + return Unmanaged.passUnretained(self).toOpaque() + }() +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.h b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.h new file mode 100644 index 000000000..29c2c0389 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.h @@ -0,0 +1,53 @@ +#if TARGET_OS_MAC && !TARGET_OS_EMBEDDED && !TARGET_OS_SIMULATOR + +#import +#import + +#define PMKTaskErrorLaunchPathKey @"PMKTaskErrorLaunchPathKey" +#define PMKTaskErrorArgumentsKey @"PMKTaskErrorArgumentsKey" +#define PMKTaskErrorStandardOutputKey @"PMKTaskErrorStandardOutputKey" +#define PMKTaskErrorStandardErrorKey @"PMKTaskErrorStandardErrorKey" +#define PMKTaskErrorExitStatusKey @"PMKTaskErrorExitStatusKey" + +/** + To import the `NSTask` category: + + use_frameworks! + pod "PromiseKit/Foundation" + + Or `NSTask` is one of the categories imported by the umbrella pod: + + use_frameworks! + pod "PromiseKit" + + And then in your sources: + + #import +*/ +@interface NSTask (PromiseKit) + +/** + Launches the receiver and resolves when it exits. + + If the task fails the promise is rejected with code `PMKTaskError`, and + `userInfo` keys: `PMKTaskErrorStandardOutputKey`, + `PMKTaskErrorStandardErrorKey` and `PMKTaskErrorExitStatusKey`. + + NSTask *task = [NSTask new]; + task.launchPath = @"/usr/bin/basename"; + task.arguments = @[@"/usr/bin/sleep"]; + [task promise].then(^(NSString *stdout){ + //… + }); + + @return A promise that fulfills with three parameters: + + 1) The stdout interpreted as a UTF8 string. + 2) The stderr interpreted as a UTF8 string. + 3) The stdout as `NSData`. +*/ +- (AnyPromise *)promise NS_REFINED_FOR_SWIFT; + +@end + +#endif diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.m b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.m new file mode 100644 index 000000000..beae27758 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.m @@ -0,0 +1,59 @@ +#import +#import +#import +#import +#import + +#if TARGET_OS_MAC && !TARGET_OS_EMBEDDED && !TARGET_OS_SIMULATOR + +#import "NSTask+AnyPromise.h" + +@implementation NSTask (PromiseKit) + +- (AnyPromise *)promise { + return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { + self.standardOutput = [NSPipe pipe]; + self.standardError = [NSPipe pipe]; + self.terminationHandler = ^(NSTask *task){ + id stdoutData = [[task.standardOutput fileHandleForReading] readDataToEndOfFile]; + id stdoutString = [[NSString alloc] initWithData:stdoutData encoding:NSUTF8StringEncoding]; + id stderrData = [[task.standardError fileHandleForReading] readDataToEndOfFile]; + id stderrString = [[NSString alloc] initWithData:stderrData encoding:NSUTF8StringEncoding]; + + if (task.terminationReason == NSTaskTerminationReasonExit && self.terminationStatus == 0) { + resolve(PMKManifold(stdoutString, stderrString, stdoutData)); + } else { + id cmd = [NSMutableArray arrayWithObject:task.launchPath]; + [cmd addObjectsFromArray:task.arguments]; + cmd = [cmd componentsJoinedByString:@" "]; + + id info = @{ + NSLocalizedDescriptionKey:[NSString stringWithFormat:@"Failed executing: %@.", cmd], + PMKTaskErrorStandardOutputKey: stdoutString, + PMKTaskErrorStandardErrorKey: stderrString, + PMKTaskErrorExitStatusKey: @(task.terminationStatus), + }; + + resolve([NSError errorWithDomain:PMKErrorDomain code:PMKTaskError userInfo:info]); + } + }; + + #if __clang_major__ >= 9 + if (@available(macOS 10.13, *)) { + NSError *error = nil; + + if (![self launchAndReturnError:&error]) { + resolve(error); + } + } else { + [self launch]; + } + #else + [self launch]; // might @throw + #endif + }]; +} + +@end + +#endif diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.h b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.h new file mode 100644 index 000000000..71952d48c --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.h @@ -0,0 +1,79 @@ +#import +#import +#import +#import + +#define PMKURLErrorFailingURLResponseKey @"PMKURLErrorFailingURLResponseKey" +#define PMKURLErrorFailingDataKey @"PMKURLErrorFailingDataKey" +#define PMKURLErrorFailingStringKey @"PMKURLErrorFailingStringKey" +#define PMKJSONErrorJSONObjectKey @"PMKJSONErrorJSONObjectKey" + +/** + Really we shouldn’t assume JSON for (application|text)/(x-)javascript, + really we should return a String of Javascript. However in practice + for the apps we write it *will be* JSON. Thus if you actually want + a Javascript String, use the promise variant of our category functions. + */ +#define PMKHTTPURLResponseIsJSON(rsp) [@[@"application/json", @"text/json", @"text/javascript", @"application/x-javascript", @"application/javascript"] containsObject:[rsp MIMEType]] +#define PMKHTTPURLResponseIsImage(rsp) [@[@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap"] containsObject:[rsp MIMEType]] +#define PMKHTTPURLResponseIsText(rsp) [[rsp MIMEType] hasPrefix:@"text/"] + +#define PMKJSONDeserializationOptions ((NSJSONReadingOptions)(NSJSONReadingAllowFragments | NSJSONReadingMutableContainers)) + + +/** + To import the `NSURLSession` category: + + use_frameworks! + pod "PromiseKit/Foundation" + + Or `NSURLConnection` is one of the categories imported by the umbrella pod: + + use_frameworks! + pod "PromiseKit" + + And then in your sources: + + #import +*/ +@interface NSURLSession (PromiseKit) + +/** + Creates a task that retrieves the contents of a URL based on the + specified URL request object. + + PromiseKit automatically deserializes the raw HTTP data response into the + appropriate rich data type based on the mime type the server provides. + Thus if the response is JSON you will get the deserialized JSON response. + PromiseKit supports decoding into strings, JSON and UIImages. + + However if your server does not provide a rich content-type, you will + just get `NSData`. This is rare, but a good example we came across was + downloading files from Dropbox. + + PromiseKit goes to quite some lengths to provide good `NSError` objects + for error conditions at all stages of the HTTP to rich-data type + pipeline. We provide the following additional `userInfo` keys as + appropriate: + + - `PMKURLErrorFailingDataKey` + - `PMKURLErrorFailingStringKey` + - `PMKURLErrorFailingURLResponseKey` + + [[NSURLConnection sharedSession] promiseDataTaskWithRequest:rq].then(^(id response){ + // response is probably an NSDictionary deserialized from JSON + }); + + @param request The URL request. + + @return A promise that fulfills with three parameters: + + 1) The deserialized data response. + 2) The `NSHTTPURLResponse`. + 3) The raw `NSData` response. + + @see https://github.com/mxcl/OMGHTTPURLRQ +*/ +- (AnyPromise *)promiseDataTaskWithRequest:(NSURLRequest *)request NS_REFINED_FOR_SWIFT; + +@end diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.m b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.m new file mode 100644 index 000000000..901eb2813 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.m @@ -0,0 +1,113 @@ +#import +#import +#import +#import "NSURLSession+AnyPromise.h" +#import +#import +#import +#import +#import +#import +#import +#import + +@implementation NSURLSession (PromiseKit) + +- (AnyPromise *)promiseDataTaskWithRequest:(NSURLRequest *)rq { + return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { + [[self dataTaskWithRequest:rq completionHandler:^(NSData *data, id rsp, NSError *urlError){ + assert(![NSThread isMainThread]); + + PMKResolver fulfiller = ^(id responseObject){ + resolve(PMKManifold(responseObject, rsp, data)); + }; + PMKResolver rejecter = ^(NSError *error){ + id userInfo = error.userInfo.mutableCopy ?: [NSMutableDictionary new]; + if (data) userInfo[PMKURLErrorFailingDataKey] = data; + if (rsp) userInfo[PMKURLErrorFailingURLResponseKey] = rsp; + error = [NSError errorWithDomain:error.domain code:error.code userInfo:userInfo]; + resolve(error); + }; + + NSStringEncoding (^stringEncoding)(void) = ^NSStringEncoding{ + id encodingName = [rsp textEncodingName]; + if (encodingName) { + CFStringEncoding encoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)encodingName); + if (encoding != kCFStringEncodingInvalidId) + return CFStringConvertEncodingToNSStringEncoding(encoding); + } + return NSUTF8StringEncoding; + }; + + if (urlError) { + rejecter(urlError); + } else if (![rsp isKindOfClass:[NSHTTPURLResponse class]]) { + fulfiller(data); + } else if ([rsp statusCode] < 200 || [rsp statusCode] >= 300) { + id info = @{ + NSLocalizedDescriptionKey: @"The server returned a bad HTTP response code", + NSURLErrorFailingURLStringErrorKey: rq.URL.absoluteString, + NSURLErrorFailingURLErrorKey: rq.URL + }; + id err = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorBadServerResponse userInfo:info]; + rejecter(err); + } else if (PMKHTTPURLResponseIsJSON(rsp)) { + // work around ever-so-common Rails workaround: https://github.com/rails/rails/issues/1742 + if ([rsp expectedContentLength] == 1 && [data isEqualToData:[NSData dataWithBytes:" " length:1]]) + return fulfiller(nil); + + NSError *err = nil; + id json = [NSJSONSerialization JSONObjectWithData:data options:PMKJSONDeserializationOptions error:&err]; + if (!err) { + fulfiller(json); + } else { + id userInfo = err.userInfo.mutableCopy; + if (data) { + NSString *string = [[NSString alloc] initWithData:data encoding:stringEncoding()]; + if (string) + userInfo[PMKURLErrorFailingStringKey] = string; + } + long long length = [rsp expectedContentLength]; + id bytes = length <= 0 ? @"" : [NSString stringWithFormat:@"%lld bytes", length]; + id fmt = @"The server claimed a %@ JSON response, but decoding failed with: %@"; + userInfo[NSLocalizedDescriptionKey] = [NSString stringWithFormat:fmt, bytes, userInfo[NSLocalizedDescriptionKey]]; + err = [NSError errorWithDomain:err.domain code:err.code userInfo:userInfo]; + rejecter(err); + } + #ifdef UIKIT_EXTERN + } else if (PMKHTTPURLResponseIsImage(rsp)) { + UIImage *image = [[UIImage alloc] initWithData:data]; + image = [[UIImage alloc] initWithCGImage:[image CGImage] scale:image.scale orientation:image.imageOrientation]; + if (image) + fulfiller(image); + else { + id info = @{ + NSLocalizedDescriptionKey: @"The server returned invalid image data", + NSURLErrorFailingURLStringErrorKey: rq.URL.absoluteString, + NSURLErrorFailingURLErrorKey: rq.URL + }; + id err = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:info]; + rejecter(err); + } + #endif + } else if (PMKHTTPURLResponseIsText(rsp)) { + id str = [[NSString alloc] initWithData:data encoding:stringEncoding()]; + if (str) + fulfiller(str); + else { + id info = @{ + NSLocalizedDescriptionKey: @"The server returned invalid string data", + NSURLErrorFailingURLStringErrorKey: rq.URL.absoluteString, + NSURLErrorFailingURLErrorKey: rq.URL + }; + id err = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:info]; + rejecter(err); + } + } else { + fulfiller(data); + } + }] resume]; + }]; +} + +@end diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+Promise.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+Promise.swift new file mode 100644 index 000000000..13259a0c0 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+Promise.swift @@ -0,0 +1,241 @@ +import Foundation +#if !PMKCocoaPods +import PromiseKit +#endif + +/** + To import the `NSURLSession` category: + + use_frameworks! + pod "PromiseKit/Foundation" + + Or `NSURLSession` is one of the categories imported by the umbrella pod: + + use_frameworks! + pod "PromiseKit" + + And then in your sources: + + import PromiseKit +*/ +extension URLSession { + /** + Example usage: + + firstly { + URLSession.shared.dataTask(.promise, with: rq) + }.compactMap { data, _ in + try JSONSerialization.jsonObject(with: data) as? [String: Any] + }.then { json in + //… + } + + We recommend the use of [OMGHTTPURLRQ] which allows you to construct correct REST requests: + + firstly { + let rq = OMGHTTPURLRQ.POST(url, json: parameters) + URLSession.shared.dataTask(.promise, with: rq) + }.then { data, urlResponse in + //… + } + + We provide a convenience initializer for `String` specifically for this promise: + + firstly { + URLSession.shared.dataTask(.promise, with: rq) + }.compactMap(String.init).then { string in + // decoded per the string encoding specified by the server + }.then { string in + print("response: string") + } + + Other common types can be easily decoded using compactMap also: + + firstly { + URLSession.shared.dataTask(.promise, with: rq) + }.compactMap { + UIImage(data: $0) + }.then { + self.imageView.image = $0 + } + + Though if you do decode the image this way, we recommend inflating it on a background thread + first as this will improve main thread performance when rendering the image: + + firstly { + URLSession.shared.dataTask(.promise, with: rq) + }.compactMap(on: QoS.userInitiated) { data, _ in + guard let img = UIImage(data: data) else { return nil } + _ = cgImage?.dataProvider?.data + return img + }.then { + self.imageView.image = $0 + } + + - Parameter convertible: A URL or URLRequest. + - Returns: A promise that represents the URL request. + - SeeAlso: [OMGHTTPURLRQ] + - Remark: We deliberately don’t provide a `URLRequestConvertible` for `String` because in our experience, you should be explicit with this error path to make good apps. + + [OMGHTTPURLRQ]: https://github.com/mxcl/OMGHTTPURLRQ + */ + public func dataTask(_: PMKNamespacer, with convertible: URLRequestConvertible) -> Promise<(data: Data, response: URLResponse)> { + return Promise { dataTask(with: convertible.pmkRequest, completionHandler: adapter($0)).resume() } + } + + public func uploadTask(_: PMKNamespacer, with convertible: URLRequestConvertible, from data: Data) -> Promise<(data: Data, response: URLResponse)> { + return Promise { uploadTask(with: convertible.pmkRequest, from: data, completionHandler: adapter($0)).resume() } + } + + public func uploadTask(_: PMKNamespacer, with convertible: URLRequestConvertible, fromFile file: URL) -> Promise<(data: Data, response: URLResponse)> { + return Promise { uploadTask(with: convertible.pmkRequest, fromFile: file, completionHandler: adapter($0)).resume() } + } + + /// - Remark: we force a `to` parameter because Apple deletes the downloaded file immediately after the underyling completion handler returns. + /// - Note: we do not create the destination directory for you, because we move the file with FileManager.moveItem which changes it behavior depending on the directory status of the URL you provide. So create your own directory first! + public func downloadTask(_: PMKNamespacer, with convertible: URLRequestConvertible, to saveLocation: URL) -> Promise<(saveLocation: URL, response: URLResponse)> { + return Promise { seal in + downloadTask(with: convertible.pmkRequest, completionHandler: { tmp, rsp, err in + if let error = err { + seal.reject(error) + } else if let rsp = rsp, let tmp = tmp { + do { + try FileManager.default.moveItem(at: tmp, to: saveLocation) + seal.fulfill((saveLocation, rsp)) + } catch { + seal.reject(error) + } + } else { + seal.reject(PMKError.invalidCallingConvention) + } + }).resume() + } + } +} + + +public protocol URLRequestConvertible { + var pmkRequest: URLRequest { get } +} +extension URLRequest: URLRequestConvertible { + public var pmkRequest: URLRequest { return self } +} +extension URL: URLRequestConvertible { + public var pmkRequest: URLRequest { return URLRequest(url: self) } +} + + +#if !os(Linux) +public extension String { + /** + - Remark: useful when converting a `URLSession` response into a `String` + + firstly { + URLSession.shared.dataTask(.promise, with: rq) + }.map(String.init).done { + print($0) + } + */ + init?(data: Data, urlResponse: URLResponse) { + guard let str = String(bytes: data, encoding: urlResponse.stringEncoding ?? .utf8) else { + return nil + } + self.init(str) + } +} + +private extension URLResponse { + var stringEncoding: String.Encoding? { + guard let encodingName = textEncodingName else { return nil } + let encoding = CFStringConvertIANACharSetNameToEncoding(encodingName as CFString) + guard encoding != kCFStringEncodingInvalidId else { return nil } + return String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(encoding)) + } +} +#endif + +private func adapter(_ seal: Resolver<(data: T, response: U)>) -> (T?, U?, Error?) -> Void { + return { t, u, e in + if let t = t, let u = u { + seal.fulfill((t, u)) + } else if let e = e { + seal.reject(e) + } else { + seal.reject(PMKError.invalidCallingConvention) + } + } +} + + +#if swift(>=3.1) +public enum PMKHTTPError: Error, LocalizedError, CustomStringConvertible { + case badStatusCode(Int, Data, HTTPURLResponse) + + public var errorDescription: String? { + func url(_ rsp: URLResponse) -> String { + return rsp.url?.absoluteString ?? "nil" + } + switch self { + case .badStatusCode(401, _, let response): + return "Unauthorized (\(url(response))" + case .badStatusCode(let code, _, let response): + return "Invalid HTTP response (\(code)) for \(url(response))." + } + } + +#if swift(>=4.0) + public func decodeResponse(_ t: T.Type, decoder: JSONDecoder = JSONDecoder()) -> T? { + switch self { + case .badStatusCode(_, let data, _): + return try? decoder.decode(t, from: data) + } + } +#endif + + //TODO rename responseJSON + public var jsonDictionary: Any? { + switch self { + case .badStatusCode(_, let data, _): + return try? JSONSerialization.jsonObject(with: data) + } + } + + var responseBodyString: String? { + switch self { + case .badStatusCode(_, let data, _): + return String(data: data, encoding: .utf8) + } + } + + public var failureReason: String? { + return responseBodyString + } + + public var description: String { + switch self { + case .badStatusCode(let code, let data, let response): + var dict: [String: Any] = [ + "Status Code": code, + "Body": String(data: data, encoding: .utf8) ?? "\(data.count) bytes" + ] + dict["URL"] = response.url + dict["Headers"] = response.allHeaderFields + return " \(NSDictionary(dictionary: dict))" // as NSDictionary makes the output look like NSHTTPURLResponse looks + } + } +} + +public extension Promise where T == (data: Data, response: URLResponse) { + func validate() -> Promise { + return map { + guard let response = $0.response as? HTTPURLResponse else { return $0 } + switch response.statusCode { + case 200..<300: + return $0 + case let code: + throw PMKHTTPError.badStatusCode(code, $0.data, response) + } + } + } +} +#endif diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/PMKFoundation.h b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/PMKFoundation.h new file mode 100644 index 000000000..8796c0d11 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/PMKFoundation.h @@ -0,0 +1,3 @@ +#import "NSNotificationCenter+AnyPromise.h" +#import "NSURLSession+AnyPromise.h" +#import "NSTask+AnyPromise.h" diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/Process+Promise.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/Process+Promise.swift new file mode 100644 index 000000000..03cab3cfe --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/Process+Promise.swift @@ -0,0 +1,190 @@ +import Foundation +#if !PMKCocoaPods +import PromiseKit +#endif + +#if os(macOS) + +/** + To import the `Process` category: + + use_frameworks! + pod "PromiseKit/Foundation" + + Or `Process` is one of the categories imported by the umbrella pod: + + use_frameworks! + pod "PromiseKit" + + And then in your sources: + + import PromiseKit + */ +extension Process { + /** + Launches the receiver and resolves when it exits. + + let proc = Process() + proc.launchPath = "/bin/ls" + proc.arguments = ["/bin"] + proc.launch(.promise).compactMap { std in + String(data: std.out.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) + }.then { stdout in + print(str) + } + */ + public func launch(_: PMKNamespacer) -> Promise<(out: Pipe, err: Pipe)> { + let (stdout, stderr) = (Pipe(), Pipe()) + + do { + standardOutput = stdout + standardError = stderr + + #if swift(>=4.0) + if #available(OSX 10.13, *) { + try run() + } else if let path = launchPath, FileManager.default.isExecutableFile(atPath: path) { + launch() + } else { + throw PMKError.notExecutable(launchPath) + } + #else + guard let path = launchPath, FileManager.default.isExecutableFile(atPath: path) else { + throw PMKError.notExecutable(launchPath) + } + launch() + #endif + } catch { + return Promise(error: error) + } + + + var q: DispatchQueue { + if #available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) { + return DispatchQueue.global(qos: .default) + } else { + return DispatchQueue.global(priority: .default) + } + } + + return Promise { seal in + q.async { + self.waitUntilExit() + + guard self.terminationReason == .exit, self.terminationStatus == 0 else { + let stdoutData = try? self.readDataFromPipe(stdout) + let stderrData = try? self.readDataFromPipe(stderr) + + let stdoutString = stdoutData.flatMap { (data: Data) -> String? in String(data: data, encoding: .utf8) } + let stderrString = stderrData.flatMap { (data: Data) -> String? in String(data: data, encoding: .utf8) } + + return seal.reject(PMKError.execution(process: self, standardOutput: stdoutString, standardError: stderrString)) + } + seal.fulfill((stdout, stderr)) + } + } + } + + private func readDataFromPipe(_ pipe: Pipe) throws -> Data { + let handle = pipe.fileHandleForReading + defer { handle.closeFile() } + + // Someday, NSFileHandle will probably be updated with throwing equivalents to its read and write methods, + // as NSTask has, to avoid raising exceptions and crashing the app. + // Unfortunately that day has not yet come, so use the underlying BSD calls for now. + + let fd = handle.fileDescriptor + + let bufsize = 1024 * 8 + let buf = UnsafeMutablePointer.allocate(capacity: bufsize) + + #if swift(>=4.1) + defer { buf.deallocate() } + #else + defer { buf.deallocate(capacity: bufsize) } + #endif + + var data = Data() + + while true { + let bytesRead = read(fd, buf, bufsize) + + if bytesRead == 0 { + break + } + + if bytesRead < 0 { + throw POSIXError.Code(rawValue: errno).map { POSIXError($0) } ?? CocoaError(.fileReadUnknown) + } + + data.append(buf, count: bytesRead) + } + + return data + } + + /** + The error generated by PromiseKit’s `Process` extension + */ + public enum PMKError { + /// NOT AVAILABLE ON 10.13 and above because Apple provide this error handling themselves + case notExecutable(String?) + case execution(process: Process, standardOutput: String?, standardError: String?) + } +} + + +extension Process.PMKError: LocalizedError { + public var errorDescription: String? { + switch self { + case .notExecutable(let path?): + return "File not executable: \(path)" + case .notExecutable(nil): + return "No launch path specified" + case .execution(process: let task, standardOutput: _, standardError: _): + return "Failed executing: `\(task)` (\(task.terminationStatus))." + } + } +} + +public extension Promise where T == (out: Pipe, err: Pipe) { + func print() -> Promise { + return tap { result in + switch result { + case .fulfilled(let raw): + let stdout = String(data: raw.out.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) + let stderr = String(data: raw.err.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) + Swift.print("stdout: `\(stdout ?? "")`") + Swift.print("stderr: `\(stderr ?? "")`") + case .rejected(let err): + Swift.print(err) + } + } + } +} + +extension Process { + /// Provided because Foundation’s is USELESS + open override var description: String { + let launchPath = self.launchPath ?? "$0" + var args = [launchPath] + arguments.flatMap{ args += $0 } + return args.map { arg in + let contains: Bool + #if swift(>=3.2) + contains = arg.contains(" ") + #else + contains = arg.characters.contains(" ") + #endif + if contains { + return "\"\(arg)\"" + } else if arg == "" { + return "\"\"" + } else { + return arg + } + }.joined(separator: " ") + } +} + +#endif diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/afterlife.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/afterlife.swift new file mode 100644 index 000000000..232c8da90 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/Foundation/Sources/afterlife.swift @@ -0,0 +1,26 @@ +import Foundation +#if !PMKCocoaPods +import PromiseKit +#endif + +/** + - Returns: A promise that resolves when the provided object deallocates + - Important: The promise is not guarenteed to resolve immediately when the provided object is deallocated. So you cannot write code that depends on exact timing. + */ +public func after(life object: NSObject) -> Guarantee { + var reaper = objc_getAssociatedObject(object, &handle) as? GrimReaper + if reaper == nil { + reaper = GrimReaper() + objc_setAssociatedObject(object, &handle, reaper, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + } + return reaper!.promise +} + +private var handle: UInt8 = 0 + +private class GrimReaper: NSObject { + deinit { + fulfill(()) + } + let (promise, fulfill) = Guarantee.pending() +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/PMKUIKit.h b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/PMKUIKit.h new file mode 100644 index 000000000..75cbf90f0 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/PMKUIKit.h @@ -0,0 +1,8 @@ +#import "UIView+AnyPromise.h" +#import "UIViewController+AnyPromise.h" + +typedef NS_OPTIONS(NSInteger, PMKAnimationOptions) { + PMKAnimationOptionsNone = 1 << 0, + PMKAnimationOptionsAppear = 1 << 1, + PMKAnimationOptionsDisappear = 1 << 2, +}; diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.h b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.h new file mode 100644 index 000000000..0a19cd6fe --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.h @@ -0,0 +1,80 @@ +#import +#import + +// Created by Masafumi Yoshida on 2014/07/11. +// Copyright (c) 2014年 DeNA. All rights reserved. + +/** + To import the `UIView` category: + + use_frameworks! + pod "PromiseKit/UIKit" + + Or `UIKit` is one of the categories imported by the umbrella pod: + + use_frameworks! + pod "PromiseKit" + + And then in your sources: + + @import PromiseKit; +*/ +@interface UIView (PromiseKit) + +/** + Animate changes to one or more views using the specified duration. + + @param duration The total duration of the animations, measured in + seconds. If you specify a negative value or 0, the changes are made + without animating them. + + @param animations A block object containing the changes to commit to the + views. + + @return A promise that fulfills with a boolean NSNumber indicating + whether or not the animations actually finished. +*/ ++ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations NS_REFINED_FOR_SWIFT; + +/** + Animate changes to one or more views using the specified duration, delay, + options, and completion handler. + + @param duration The total duration of the animations, measured in + seconds. If you specify a negative value or 0, the changes are made + without animating them. + + @param delay The amount of time (measured in seconds) to wait before + beginning the animations. Specify a value of 0 to begin the animations + immediately. + + @param options A mask of options indicating how you want to perform the + animations. For a list of valid constants, see UIViewAnimationOptions. + + @param animations A block object containing the changes to commit to the + views. + + @return A promise that fulfills with a boolean NSNumber indicating + whether or not the animations actually finished. +*/ ++ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^)(void))animations NS_REFINED_FOR_SWIFT; + +/** + Performs a view animation using a timing curve corresponding to the + motion of a physical spring. + + @return A promise that fulfills with a boolean NSNumber indicating + whether or not the animations actually finished. +*/ ++ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay usingSpringWithDamping:(CGFloat)dampingRatio initialSpringVelocity:(CGFloat)velocity options:(UIViewAnimationOptions)options animations:(void (^)(void))animations NS_REFINED_FOR_SWIFT; + +/** + Creates an animation block object that can be used to set up + keyframe-based animations for the current view. + + @return A promise that fulfills with a boolean NSNumber indicating + whether or not the animations actually finished. +*/ ++ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewKeyframeAnimationOptions)options keyframeAnimations:(void (^)(void))animations NS_REFINED_FOR_SWIFT; + +@end diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.m b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.m new file mode 100644 index 000000000..04ee94035 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.m @@ -0,0 +1,64 @@ +// +// UIView+PromiseKit_UIAnimation.m +// YahooDenaStudy +// +// Created by Masafumi Yoshida on 2014/07/11. +// Copyright (c) 2014年 DeNA. All rights reserved. +// + +#import +#import "UIView+AnyPromise.h" + + +#define CopyPasta \ + NSAssert([NSThread isMainThread], @"UIKit animation must be performed on the main thread"); \ + \ + if (![NSThread isMainThread]) { \ + id error = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"Animation was attempted on a background thread"}]; \ + return [AnyPromise promiseWithValue:error]; \ + } \ + \ + PMKResolver resolve = nil; \ + AnyPromise *promise = [[AnyPromise alloc] initWithResolver:&resolve]; + + +@implementation UIView (PromiseKit) + ++ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations { + return [self promiseWithDuration:duration delay:0 options:0 animations:animations]; +} + ++ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void(^)(void))animations +{ + CopyPasta; + + [UIView animateWithDuration:duration delay:delay options:options animations:animations completion:^(BOOL finished) { + resolve(@(finished)); + }]; + + return promise; +} + ++ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay usingSpringWithDamping:(CGFloat)dampingRatio initialSpringVelocity:(CGFloat)velocity options:(UIViewAnimationOptions)options animations:(void(^)(void))animations +{ + CopyPasta; + + [UIView animateWithDuration:duration delay:delay usingSpringWithDamping:dampingRatio initialSpringVelocity:velocity options:options animations:animations completion:^(BOOL finished) { + resolve(@(finished)); + }]; + + return promise; +} + ++ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewKeyframeAnimationOptions)options keyframeAnimations:(void(^)(void))animations +{ + CopyPasta; + + [UIView animateKeyframesWithDuration:duration delay:delay options:options animations:animations completion:^(BOOL finished) { + resolve(@(finished)); + }]; + + return promise; +} + +@end diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+Promise.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+Promise.swift new file mode 100644 index 000000000..1bbb8c649 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+Promise.swift @@ -0,0 +1,115 @@ +import UIKit.UIView +#if !PMKCocoaPods +import PromiseKit +#endif + +/** + To import the `UIView` category: + + use_frameworks! + pod "PromiseKit/UIKit" + + Or `UIKit` is one of the categories imported by the umbrella pod: + + use_frameworks! + pod "PromiseKit" + + And then in your sources: + + import PromiseKit +*/ +public extension UIView { +#if swift(>=4.2) +/** + Animate changes to one or more views using the specified duration, delay, + options, and completion handler. + + - Parameter duration: The total duration of the animations, measured in + seconds. If you specify a negative value or 0, the changes are made + without animating them. + + - Parameter delay: The amount of time (measured in seconds) to wait before + beginning the animations. Specify a value of 0 to begin the animations + immediately. + + - Parameter options: A mask of options indicating how you want to perform the + animations. For a list of valid constants, see UIViewAnimationOptions. + + - Parameter animations: A block object containing the changes to commit to the + views. + + - Returns: A promise that fulfills with a boolean NSNumber indicating + whether or not the animations actually finished. + */ + @discardableResult + static func animate(_: PMKNamespacer, duration: TimeInterval, delay: TimeInterval = 0, options: UIView.AnimationOptions = [], animations: @escaping () -> Void) -> Guarantee { + return Guarantee { animate(withDuration: duration, delay: delay, options: options, animations: animations, completion: $0) } + } + + @discardableResult + static func animate(_: PMKNamespacer, duration: TimeInterval, delay: TimeInterval, usingSpringWithDamping damping: CGFloat, initialSpringVelocity: CGFloat, options: UIView.AnimationOptions = [], animations: @escaping () -> Void) -> Guarantee { + return Guarantee { animate(withDuration: duration, delay: delay, usingSpringWithDamping: damping, initialSpringVelocity: initialSpringVelocity, options: options, animations: animations, completion: $0) } + } + + @discardableResult + static func transition(_: PMKNamespacer, with view: UIView, duration: TimeInterval, options: UIView.AnimationOptions = [], animations: (() -> Void)?) -> Guarantee { + return Guarantee { transition(with: view, duration: duration, options: options, animations: animations, completion: $0) } + } + + @discardableResult + static func transition(_: PMKNamespacer, from: UIView, to: UIView, duration: TimeInterval, options: UIView.AnimationOptions = []) -> Guarantee { + return Guarantee { transition(from: from, to: to, duration: duration, options: options, completion: $0) } + } + + @discardableResult + static func perform(_: PMKNamespacer, animation: UIView.SystemAnimation, on views: [UIView], options: UIView.AnimationOptions = [], animations: (() -> Void)?) -> Guarantee { + return Guarantee { perform(animation, on: views, options: options, animations: animations, completion: $0) } + } +#else + /** + Animate changes to one or more views using the specified duration, delay, + options, and completion handler. + + - Parameter duration: The total duration of the animations, measured in + seconds. If you specify a negative value or 0, the changes are made + without animating them. + + - Parameter delay: The amount of time (measured in seconds) to wait before + beginning the animations. Specify a value of 0 to begin the animations + immediately. + + - Parameter options: A mask of options indicating how you want to perform the + animations. For a list of valid constants, see UIViewAnimationOptions. + + - Parameter animations: A block object containing the changes to commit to the + views. + + - Returns: A promise that fulfills with a boolean NSNumber indicating + whether or not the animations actually finished. + */ + @discardableResult + static func animate(_: PMKNamespacer, duration: TimeInterval, delay: TimeInterval = 0, options: UIViewAnimationOptions = [], animations: @escaping () -> Void) -> Guarantee { + return Guarantee { animate(withDuration: duration, delay: delay, options: options, animations: animations, completion: $0) } + } + + @discardableResult + static func animate(_: PMKNamespacer, duration: TimeInterval, delay: TimeInterval, usingSpringWithDamping damping: CGFloat, initialSpringVelocity: CGFloat, options: UIViewAnimationOptions = [], animations: @escaping () -> Void) -> Guarantee { + return Guarantee { animate(withDuration: duration, delay: delay, usingSpringWithDamping: damping, initialSpringVelocity: initialSpringVelocity, options: options, animations: animations, completion: $0) } + } + + @discardableResult + static func transition(_: PMKNamespacer, with view: UIView, duration: TimeInterval, options: UIViewAnimationOptions = [], animations: (() -> Void)?) -> Guarantee { + return Guarantee { transition(with: view, duration: duration, options: options, animations: animations, completion: $0) } + } + + @discardableResult + static func transition(_: PMKNamespacer, from: UIView, to: UIView, duration: TimeInterval, options: UIViewAnimationOptions = []) -> Guarantee { + return Guarantee { transition(from: from, to: to, duration: duration, options: options, completion: $0) } + } + + @discardableResult + static func perform(_: PMKNamespacer, animation: UISystemAnimation, on views: [UIView], options: UIViewAnimationOptions = [], animations: (() -> Void)?) -> Guarantee { + return Guarantee { perform(animation, on: views, options: options, animations: animations, completion: $0) } + } +#endif +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.h b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.h new file mode 100644 index 000000000..0e60ca9e7 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.h @@ -0,0 +1,71 @@ +#import +#import + +/** + To import the `UIViewController` category: + + use_frameworks! + pod "PromiseKit/UIKit" + + Or `UIKit` is one of the categories imported by the umbrella pod: + + use_frameworks! + pod "PromiseKit" + + And then in your sources: + + @import PromiseKit; +*/ +@interface UIViewController (PromiseKit) + +/** + Presents a view controller modally. + + If the view controller is one of the following: + + - MFMailComposeViewController + - MFMessageComposeViewController + - UIImagePickerController + - SLComposeViewController + + Then PromiseKit presents the view controller returning a promise that is + resolved as per the documentation for those classes. Eg. if you present a + `UIImagePickerController` the view controller will be presented for you + and the returned promise will resolve with the media the user selected. + + [self promiseViewController:[MFMailComposeViewController new] animated:YES completion:nil].then(^{ + //… + }); + + Otherwise PromiseKit expects your view controller to implement a + `promise` property. This promise will be returned from this method and + presentation and dismissal of the presented view controller will be + managed for you. + + \@interface MyViewController: UIViewController + @property (readonly) AnyPromise *promise; + @end + + @implementation MyViewController { + PMKResolver resolve; + } + + - (void)viewDidLoad { + _promise = [[AnyPromise alloc] initWithResolver:&resolve]; + } + + - (void)later { + resolve(@"some fulfilled value"); + } + + @end + + [self promiseViewController:[MyViewController new] aniamted:YES completion:nil].then(^(id value){ + // value == @"some fulfilled value" + }); + + @return A promise that can be resolved by the presented view controller. +*/ +- (AnyPromise *)promiseViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)(void))block NS_REFINED_FOR_SWIFT; + +@end diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.m b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.m new file mode 100644 index 000000000..5231e55bf --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.m @@ -0,0 +1,140 @@ +#import +#import "UIViewController+AnyPromise.h" +#import + +#if PMKImagePickerController +#import +#endif + +@interface PMKGenericDelegate : NSObject { +@public + PMKResolver resolve; +} ++ (instancetype)delegateWithPromise:(AnyPromise **)promise; +@end + +@interface UIViewController () +- (AnyPromise*) promise; +@end + +@implementation UIViewController (PromiseKit) + +- (AnyPromise *)promiseViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)(void))block { + __kindof UIViewController *vc2present = vc; + AnyPromise *promise = nil; + + if ([vc isKindOfClass:NSClassFromString(@"MFMailComposeViewController")]) { + PMKGenericDelegate *delegate = [PMKGenericDelegate delegateWithPromise:&promise]; + [vc setValue:delegate forKey:@"mailComposeDelegate"]; + } + else if ([vc isKindOfClass:NSClassFromString(@"MFMessageComposeViewController")]) { + PMKGenericDelegate *delegate = [PMKGenericDelegate delegateWithPromise:&promise]; + [vc setValue:delegate forKey:@"messageComposeDelegate"]; + } +#ifdef PMKImagePickerController + else if ([vc isKindOfClass:[UIImagePickerController class]]) { + PMKGenericDelegate *delegate = [PMKGenericDelegate delegateWithPromise:&promise]; + [vc setValue:delegate forKey:@"delegate"]; + } +#endif + else if ([vc isKindOfClass:NSClassFromString(@"SLComposeViewController")]) { + PMKResolver resolve; + promise = [[AnyPromise alloc] initWithResolver:&resolve]; + [vc setValue:^(NSInteger result){ + if (result == 0) { + resolve([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]); + } else { + resolve(@(result)); + } + } forKey:@"completionHandler"]; + } + else if ([vc isKindOfClass:[UINavigationController class]]) + vc = [(id)vc viewControllers].firstObject; + + if (!vc) { + id userInfo = @{NSLocalizedDescriptionKey: @"nil or effective nil passed to promiseViewController"}; + id err = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:userInfo]; + return [AnyPromise promiseWithValue:err]; + } + + if (!promise) { + if (![vc respondsToSelector:@selector(promise)]) { + id userInfo = @{NSLocalizedDescriptionKey: @"ViewController is not promisable"}; + id err = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:userInfo]; + return [AnyPromise promiseWithValue:err]; + } + + promise = [vc valueForKey:@"promise"]; + + if (![promise isKindOfClass:[AnyPromise class]]) { + id userInfo = @{NSLocalizedDescriptionKey: @"The promise property is nil or not of type AnyPromise"}; + id err = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:userInfo]; + return [AnyPromise promiseWithValue:err]; + } + } + + if (!promise.pending) + return promise; + + [self presentViewController:vc2present animated:animated completion:block]; + + promise.ensure(^{ + [vc2present.presentingViewController dismissViewControllerAnimated:animated completion:nil]; + }); + + return promise; +} + +@end + + + +@implementation PMKGenericDelegate { + id retainCycle; +} + ++ (instancetype)delegateWithPromise:(AnyPromise **)promise; { + PMKGenericDelegate *d = [PMKGenericDelegate new]; + d->retainCycle = d; + *promise = [[AnyPromise alloc] initWithResolver:&d->resolve]; + return d; +} + +- (void)mailComposeController:(id)controller didFinishWithResult:(int)result error:(NSError *)error { + if (error != nil) { + resolve(error); + } else if (result == 0) { + resolve([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]); + } else { + resolve(@(result)); + } + retainCycle = nil; +} + +- (void)messageComposeViewController:(id)controller didFinishWithResult:(int)result { + if (result == 2) { + id userInfo = @{NSLocalizedDescriptionKey: @"The attempt to save or send the message was unsuccessful."}; + id error = [NSError errorWithDomain:PMKErrorDomain code:PMKOperationFailed userInfo:userInfo]; + resolve(error); + } else { + resolve(@(result)); + } + retainCycle = nil; +} + +#ifdef PMKImagePickerController + +- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { + id img = info[UIImagePickerControllerEditedImage] ?: info[UIImagePickerControllerOriginalImage]; + resolve(PMKManifold(img, info)); + retainCycle = nil; +} + +- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { + resolve([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]); + retainCycle = nil; +} + +#endif + +@end diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift new file mode 100644 index 000000000..34ee14084 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift @@ -0,0 +1,14 @@ +#if !PMKCocoaPods +import PromiseKit +#endif +import UIKit + +@available(iOS 10, tvOS 10, *) +public extension UIViewPropertyAnimator { + func startAnimation(_: PMKNamespacer) -> Guarantee { + return Guarantee { + addCompletion($0) + startAnimation() + } + } +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/LICENSE b/Example/web3swiftBrowser/Pods/PromiseKit/LICENSE new file mode 100644 index 000000000..50f758c89 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/LICENSE @@ -0,0 +1,20 @@ +Copyright 2016-present, Max Howell; mxcl@me.com + +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/Example/web3swiftBrowser/Pods/PromiseKit/README.md b/Example/web3swiftBrowser/Pods/PromiseKit/README.md new file mode 100644 index 000000000..78f555fc6 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/README.md @@ -0,0 +1,174 @@ +![PromiseKit](http://promisekit.org/public/img/logo-tight.png) + +![badge-pod] ![badge-languages] ![badge-pms] ![badge-platforms] [![Build Status](https://travis-ci.org/mxcl/PromiseKit.svg?branch=master)](https://travis-ci.org/mxcl/PromiseKit) + +--- + +Promises simplify asynchronous programming, freeing you up to focus on the more +important things. They are easy to learn, easy to master and result in clearer, +more readable code. Your co-workers will thank you. + +```swift +UIApplication.shared.isNetworkActivityIndicatorVisible = true + +let fetchImage = URLSession.shared.dataTask(.promise, with: url).compactMap{ UIImage(data: $0.data) } +let fetchLocation = CLLocationManager.requestLocation().lastValue + +firstly { + when(fulfilled: fetchImage, fetchLocation) +}.done { image, location in + self.imageView.image = image + self.label.text = "\(location)" +}.ensure { + UIApplication.shared.isNetworkActivityIndicatorVisible = false +}.catch { error in + self.show(UIAlertController(for: error), sender: self) +} +``` + +PromiseKit is a thoughtful and complete implementation of promises for any +platform that has a `swiftc`. It has *excellent* Objective-C bridging and +*delightful* specializations for iOS, macOS, tvOS and watchOS. It is a top-100 +pod used in many of the most popular apps in the world. + +[![codecov](https://codecov.io/gh/mxcl/PromiseKit/branch/master/graph/badge.svg)](https://codecov.io/gh/mxcl/PromiseKit) + +# PromiseKit 6 Released + +PromiseKit 6 has been released; [read the release notes and migration guide][PMK6]. + +# Quick Start + +In your [Podfile]: + +```ruby +use_frameworks! + +target "Change Me!" do + pod "PromiseKit", "~> 6.0" +end +``` + +> The above gives an Xcode warning? See our [Installation Guide]. + +PromiseKit 6, 5 and 4 support Xcode 8.3, 9.x and 10.0; Swift 3.1, +3.2, 3.3, 3.4, 4.0, 4.1 and 4.2; iOS, macOS, tvOS, watchOS, Linux and Android; CocoaPods, +Carthage and SwiftPM; ([CI Matrix](https://travis-ci.org/mxcl/PromiseKit)). + +For Carthage, SwiftPM, etc., or for instructions when using older Swifts or +Xcodes, see our [Installation Guide]. We +recommend [Carthage](https://github.com/Carthage/Carthage). + +# Documentation + +* Handbook + * [Getting Started](Documentation/GettingStarted.md) + * [Promises: Common Patterns](Documentation/CommonPatterns.md) + * [Frequently Asked Questions](Documentation/FAQ.md) +* Manual + * [Installation Guide](Documentation/Installation.md) + * [Objective-C Guide](Documentation/ObjectiveC.md) + * [Troubleshooting](Documentation/Troubleshooting.md) (e.g., solutions to common compile errors) + * [Appendix](Documentation/Appendix.md) +* [API Reference](https://promisekit.org/reference/) + +# Extensions + +Promises are only as useful as the asynchronous tasks they represent. Thus, we +have converted (almost) all of Apple’s APIs to promises. The default CocoaPod +provides Promises and the extensions for Foundation and UIKit. The other +extensions are available by specifying additional subspecs in your `Podfile`, +e.g.: + +```ruby +pod "PromiseKit/MapKit" # MKDirections().calculate().then { /*…*/ } +pod "PromiseKit/CoreLocation" # CLLocationManager.requestLocation().then { /*…*/ } +``` + +All our extensions are separate repositories at the [PromiseKit organization]. + +## I don't want the extensions! + +Then don’t have them: + +```ruby +pod "PromiseKit/CorePromise", "~> 6.0" +``` + +> *Note:* Carthage installations come with no extensions by default. + +## Choose Your Networking Library + +Promise chains commonly start with a network operation. Thus, we offer +extensions for `URLSession`: + +```swift +// pod 'PromiseKit/Foundation' # https://github.com/PromiseKit/Foundation + +firstly { + URLSession.shared.dataTask(.promise, with: try makeUrlRequest()).validate() + // ^^ we provide `.validate()` so that eg. 404s get converted to errors +}.map { + try JSONDecoder().decode(Foo.self, with: $0.data) +}.done { foo in + //… +}.catch { error in + //… +} + +func makeUrlRequest() throws -> URLRequest { + var rq = URLRequest(url: url) + rq.httpMethod = "POST" + rq.addValue("application/json", forHTTPHeaderField: "Content-Type") + rq.addValue("application/json", forHTTPHeaderField: "Accept") + rq.httpBody = try JSONEncoder().encode(obj) + return rq +} +``` + +And [Alamofire]: + +```swift +// pod 'PromiseKit/Alamofire' # https://github.com/PromiseKit/Alamofire- + +firstly { + Alamofire + .request("http://example.com", method: .post, parameters: params) + .responseDecodable(Foo.self) +}.done { foo in + //… +}.catch { error in + //… +} +``` + +Nowadays, considering that: + +* We almost always POST JSON +* We now have `JSONDecoder` +* PromiseKit now has `map` and other functional primitives +* PromiseKit (like Alamofire, but not raw-URLSession) also defaults to having callbacks go to the main thread + +We recommend vanilla `URLSession`. It uses fewer black boxes and sticks closer to the +metal. Alamofire was essential until the three bulletpoints above became true, +but nowadays it isn’t really necessary. + +# Support + +Please check our [Troubleshooting Guide](Documentation/Troubleshooting.md), and +if after that you still have a question, ask at our [Gitter chat channel] or on [our bug tracker]. + + +[badge-pod]: https://img.shields.io/cocoapods/v/PromiseKit.svg?label=version +[badge-pms]: https://img.shields.io/badge/supports-CocoaPods%20%7C%20Carthage%20%7C%20SwiftPM-green.svg +[badge-languages]: https://img.shields.io/badge/languages-Swift%20%7C%20ObjC-orange.svg +[badge-platforms]: https://img.shields.io/badge/platforms-macOS%20%7C%20iOS%20%7C%20watchOS%20%7C%20tvOS%20%7C%20Linux-lightgrey.svg +[badge-mit]: https://img.shields.io/badge/license-MIT-blue.svg +[OMGHTTPURLRQ]: https://github.com/PromiseKit/OMGHTTPURLRQ +[Alamofire]: http://github.com/PromiseKit/Alamofire- +[PromiseKit organization]: https://github.com/PromiseKit +[Gitter chat channel]: https://gitter.im/mxcl/PromiseKit +[our bug tracker]: https://github.com/mxcl/PromiseKit/issues/new +[Podfile]: https://guides.cocoapods.org/syntax/podfile.html +[PMK6]: http://promisekit.org/news/2018/02/PromiseKit-6.0-Released/ +[Installation Guide]: Documentation/Installation.md diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise+Private.h b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise+Private.h new file mode 100644 index 000000000..cd28c4183 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise+Private.h @@ -0,0 +1,32 @@ +@import Foundation.NSError; +@import Foundation.NSPointerArray; + +#if TARGET_OS_IPHONE + #define NSPointerArrayMake(N) ({ \ + NSPointerArray *aa = [NSPointerArray strongObjectsPointerArray]; \ + aa.count = N; \ + aa; \ + }) +#else + static inline NSPointerArray * __nonnull NSPointerArrayMake(NSUInteger count) { + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdeprecated-declarations" + NSPointerArray *aa = [[NSPointerArray class] respondsToSelector:@selector(strongObjectsPointerArray)] + ? [NSPointerArray strongObjectsPointerArray] + : [NSPointerArray pointerArrayWithStrongObjects]; + #pragma clang diagnostic pop + aa.count = count; + return aa; + } +#endif + +#define IsError(o) [o isKindOfClass:[NSError class]] +#define IsPromise(o) [o isKindOfClass:[AnyPromise class]] + +#import "AnyPromise.h" + +@class PMKArray; + +@interface AnyPromise () +- (void)__pipe:(void(^ __nonnull)(__nullable id))block NS_REFINED_FOR_SWIFT; +@end diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise.h b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise.h new file mode 100644 index 000000000..cd625d9ef --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise.h @@ -0,0 +1,299 @@ +#import +#import +#import "fwd.h" + +/// INTERNAL DO NOT USE +@class __AnyPromise; + +/// Provided to simplify some usage sites +typedef void (^PMKResolver)(id __nullable) NS_REFINED_FOR_SWIFT; + + +/// An Objective-C implementation of the promise pattern. +@interface AnyPromise: NSObject + +/** + Create a new promise that resolves with the provided block. + + Use this method when wrapping asynchronous code that does *not* use promises so that this code can be used in promise chains. + + If `resolve` is called with an `NSError` object, the promise is rejected, otherwise the promise is fulfilled. + + Don’t use this method if you already have promises! Instead, just return your promise. + + Should you need to fulfill a promise but have no sensical value to use: your promise is a `void` promise: fulfill with `nil`. + + The block you pass is executed immediately on the calling thread. + + - Parameter block: The provided block is immediately executed, inside the block call `resolve` to resolve this promise and cause any attached handlers to execute. If you are wrapping a delegate-based system, we recommend instead to use: initWithResolver: + - Returns: A new promise. + - Warning: Resolving a promise with `nil` fulfills it. + - SeeAlso: http://promisekit.org/sealing-your-own-promises/ + - SeeAlso: http://promisekit.org/wrapping-delegation/ + */ ++ (instancetype __nonnull)promiseWithResolverBlock:(void (^ __nonnull)(__nonnull PMKResolver))resolveBlock NS_REFINED_FOR_SWIFT; + + +/// INTERNAL DO NOT USE +- (instancetype __nonnull)initWith__D:(__AnyPromise * __nonnull)d; + +/** + Creates a resolved promise. + + When developing your own promise systems, it is occasionally useful to be able to return an already resolved promise. + + - Parameter value: The value with which to resolve this promise. Passing an `NSError` will cause the promise to be rejected, passing an AnyPromise will return a new AnyPromise bound to that promise, otherwise the promise will be fulfilled with the value passed. + - Returns: A resolved promise. + */ ++ (instancetype __nonnull)promiseWithValue:(__nullable id)value NS_REFINED_FOR_SWIFT; + +/** + The value of the asynchronous task this promise represents. + + A promise has `nil` value if the asynchronous task it represents has not finished. If the value is `nil` the promise is still `pending`. + + - Warning: *Note* Our Swift variant’s value property returns nil if the promise is rejected where AnyPromise will return the error object. This fits with the pattern where AnyPromise is not strictly typed and is more dynamic, but you should be aware of the distinction. + + - Note: If the AnyPromise was fulfilled with a `PMKManifold`, returns only the first fulfillment object. + + - Returns: The value with which this promise was resolved or `nil` if this promise is pending. + */ +@property (nonatomic, readonly) __nullable id value NS_REFINED_FOR_SWIFT; + +/// - Returns: if the promise is pending resolution. +@property (nonatomic, readonly) BOOL pending NS_REFINED_FOR_SWIFT; + +/// - Returns: if the promise is resolved and fulfilled. +@property (nonatomic, readonly) BOOL fulfilled NS_REFINED_FOR_SWIFT; + +/// - Returns: if the promise is resolved and rejected. +@property (nonatomic, readonly) BOOL rejected NS_REFINED_FOR_SWIFT; + + +/** + The provided block is executed when its receiver is resolved. + + If you provide a block that takes a parameter, the value of the receiver will be passed as that parameter. + + [NSURLSession GET:url].then(^(NSData *data){ + // do something with data + }); + + @return A new promise that is resolved with the value returned from the provided block. For example: + + [NSURLSession GET:url].then(^(NSData *data){ + return data.length; + }).then(^(NSNumber *number){ + //… + }); + + @warning *Important* The block passed to `then` may take zero, one, two or three arguments, and return an object or return nothing. This flexibility is why the method signature for then is `id`, which means you will not get completion for the block parameter, and must type it yourself. It is safe to type any block syntax here, so to start with try just: `^{}`. + + @warning *Important* If an `NSError` or `NSString` is thrown inside your block, or you return an `NSError` object the next `Promise` will be rejected. See `catch` for documentation on error handling. + + @warning *Important* `then` is always executed on the main queue. + + @see thenOn + @see thenInBackground +*/ +- (AnyPromise * __nonnull (^ __nonnull)(id __nonnull))then NS_REFINED_FOR_SWIFT; + + +/** + The provided block is executed on the default queue when the receiver is fulfilled. + + This method is provided as a convenience for `thenOn`. + + @see then + @see thenOn +*/ +- (AnyPromise * __nonnull(^ __nonnull)(id __nonnull))thenInBackground NS_REFINED_FOR_SWIFT; + +/** + The provided block is executed on the dispatch queue of your choice when the receiver is fulfilled. + + @see then + @see thenInBackground +*/ +- (AnyPromise * __nonnull(^ __nonnull)(dispatch_queue_t __nonnull, id __nonnull))thenOn NS_REFINED_FOR_SWIFT; + +#ifndef __cplusplus +/** + The provided block is executed when the receiver is rejected. + + Provide a block of form `^(NSError *){}` or simply `^{}`. The parameter has type `id` to give you the freedom to choose either. + + The provided block always runs on the main queue. + + @warning *Note* Cancellation errors are not caught. + + @warning *Note* Since catch is a c++ keyword, this method is not available in Objective-C++ files. Instead use catchOn. + + @see catchOn + @see catchInBackground +*/ +- (AnyPromise * __nonnull(^ __nonnull)(id __nonnull))catch NS_REFINED_FOR_SWIFT; +#endif + +/** + The provided block is executed when the receiver is rejected. + + Provide a block of form `^(NSError *){}` or simply `^{}`. The parameter has type `id` to give you the freedom to choose either. + + The provided block always runs on the global background queue. + + @warning *Note* Cancellation errors are not caught. + + @warning *Note* Since catch is a c++ keyword, this method is not available in Objective-C++ files. Instead use catchWithPolicy. + + @see catch + @see catchOn + */ +- (AnyPromise * __nonnull(^ __nonnull)(id __nonnull))catchInBackground NS_REFINED_FOR_SWIFT; + + +/** + The provided block is executed when the receiver is rejected. + + Provide a block of form `^(NSError *){}` or simply `^{}`. The parameter has type `id` to give you the freedom to choose either. + + The provided block always runs on queue provided. + + @warning *Note* Cancellation errors are not caught. + + @see catch + @see catchInBackground + */ +- (AnyPromise * __nonnull(^ __nonnull)(dispatch_queue_t __nonnull, id __nonnull))catchOn NS_REFINED_FOR_SWIFT; + +/** + The provided block is executed when the receiver is resolved. + + The provided block always runs on the main queue. + + @see ensureOn +*/ +- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull))ensure NS_REFINED_FOR_SWIFT; + +/** + The provided block is executed on the dispatch queue of your choice when the receiver is resolved. + + @see ensure + */ +- (AnyPromise * __nonnull(^ __nonnull)(dispatch_queue_t __nonnull, dispatch_block_t __nonnull))ensureOn NS_REFINED_FOR_SWIFT; + +/** + Create a new promise with an associated resolver. + + Use this method when wrapping asynchronous code that does *not* use + promises so that this code can be used in promise chains. Generally, + prefer `promiseWithResolverBlock:` as the resulting code is more elegant. + + PMKResolver resolve; + AnyPromise *promise = [[AnyPromise alloc] initWithResolver:&resolve]; + + // later + resolve(@"foo"); + + @param resolver A reference to a block pointer of PMKResolver type. + You can then call your resolver to resolve this promise. + + @return A new promise. + + @warning *Important* The resolver strongly retains the promise. + + @see promiseWithResolverBlock: +*/ +- (instancetype __nonnull)initWithResolver:(PMKResolver __strong __nonnull * __nonnull)resolver NS_REFINED_FOR_SWIFT; + +@end + + +typedef void (^PMKAdapter)(id __nullable, NSError * __nullable) NS_REFINED_FOR_SWIFT; +typedef void (^PMKIntegerAdapter)(NSInteger, NSError * __nullable) NS_REFINED_FOR_SWIFT; +typedef void (^PMKBooleanAdapter)(BOOL, NSError * __nullable) NS_REFINED_FOR_SWIFT; + + +@interface AnyPromise (Adapters) + +/** + Create a new promise by adapting an existing asynchronous system. + + The pattern of a completion block that passes two parameters, the first + the result and the second an `NSError` object is so common that we + provide this convenience adapter to make wrapping such systems more + elegant. + + return [PMKPromise promiseWithAdapterBlock:^(PMKAdapter adapter){ + PFQuery *query = [PFQuery …]; + [query findObjectsInBackgroundWithBlock:adapter]; + }]; + + @warning *Important* If both parameters are nil, the promise fulfills, + if both are non-nil the promise rejects. This is per the convention. + + @see http://promisekit.org/sealing-your-own-promises/ + */ ++ (instancetype __nonnull)promiseWithAdapterBlock:(void (^ __nonnull)(PMKAdapter __nonnull adapter))block NS_REFINED_FOR_SWIFT; + +/** + Create a new promise by adapting an existing asynchronous system. + + Adapts asynchronous systems that complete with `^(NSInteger, NSError *)`. + NSInteger will cast to enums provided the enum has been wrapped with + `NS_ENUM`. All of Apple’s enums are, so if you find one that hasn’t you + may need to make a pull-request. + + @see promiseWithAdapter + */ ++ (instancetype __nonnull)promiseWithIntegerAdapterBlock:(void (^ __nonnull)(PMKIntegerAdapter __nonnull adapter))block NS_REFINED_FOR_SWIFT; + +/** + Create a new promise by adapting an existing asynchronous system. + + Adapts asynchronous systems that complete with `^(BOOL, NSError *)`. + + @see promiseWithAdapter + */ ++ (instancetype __nonnull)promiseWithBooleanAdapterBlock:(void (^ __nonnull)(PMKBooleanAdapter __nonnull adapter))block NS_REFINED_FOR_SWIFT; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Whenever resolving a promise you may resolve with a tuple, eg. + returning from a `then` or `catch` handler or resolving a new promise. + + Consumers of your Promise are not compelled to consume any arguments and + in fact will often only consume the first parameter. Thus ensure the + order of parameters is: from most-important to least-important. + + Currently PromiseKit limits you to THREE parameters to the manifold. +*/ +#define PMKManifold(...) __PMKManifold(__VA_ARGS__, 3, 2, 1) +#define __PMKManifold(_1, _2, _3, N, ...) __PMKArrayWithCount(N, _1, _2, _3) +extern id __nonnull __PMKArrayWithCount(NSUInteger, ...); + +#ifdef __cplusplus +} // Extern C +#endif + + +@interface AnyPromise (Unavailable) + +- (instancetype __nonnull)init __attribute__((unavailable("It is illegal to create an unresolvable promise."))); ++ (instancetype __nonnull)new __attribute__((unavailable("It is illegal to create an unresolvable promise."))); +- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull))always __attribute__((unavailable("See -ensure"))); +- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull))alwaysOn __attribute__((unavailable("See -ensureOn"))); +- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull))finally __attribute__((unavailable("See -ensure"))); +- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull, dispatch_block_t __nonnull))finallyOn __attribute__((unavailable("See -ensureOn"))); + +@end + +__attribute__((unavailable("See AnyPromise"))) +@interface PMKPromise +@end diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise.m b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise.m new file mode 100644 index 000000000..af6631004 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise.m @@ -0,0 +1,175 @@ +#if __has_include("PromiseKit-Swift.h") + #import "PromiseKit-Swift.h" +#else + #import +#endif +#import "PMKCallVariadicBlock.m" +#import "AnyPromise+Private.h" +#import "AnyPromise.h" + +NSString *const PMKErrorDomain = @"PMKErrorDomain"; + + +@implementation AnyPromise { + __AnyPromise *d; +} + +- (instancetype)initWith__D:(__AnyPromise *)dd { + self = [super init]; + if (self) self->d = dd; + return self; +} + +- (instancetype)initWithResolver:(PMKResolver __strong *)resolver { + self = [super init]; + if (self) + d = [[__AnyPromise alloc] initWithResolver:^(void (^resolve)(id)) { + *resolver = resolve; + }]; + return self; +} + ++ (instancetype)promiseWithResolverBlock:(void (^)(PMKResolver _Nonnull))resolveBlock { + id d = [[__AnyPromise alloc] initWithResolver:resolveBlock]; + return [[self alloc] initWith__D:d]; +} + ++ (instancetype)promiseWithValue:(id)value { + //TODO provide a more efficient route for sealed promises + id d = [[__AnyPromise alloc] initWithResolver:^(void (^resolve)(id)) { + resolve(value); + }]; + return [[self alloc] initWith__D:d]; +} + +//TODO remove if possible, but used by when.m +- (void)__pipe:(void (^)(id _Nullable))block { + [d __pipe:block]; +} + +//NOTE used by AnyPromise.swift +- (id)__d { + return d; +} + +- (AnyPromise *(^)(id))then { + return ^(id block) { + return [self->d __thenOn:dispatch_get_main_queue() execute:^(id obj) { + return PMKCallVariadicBlock(block, obj); + }]; + }; +} + +- (AnyPromise *(^)(dispatch_queue_t, id))thenOn { + return ^(dispatch_queue_t queue, id block) { + return [self->d __thenOn:queue execute:^(id obj) { + return PMKCallVariadicBlock(block, obj); + }]; + }; +} + +- (AnyPromise *(^)(id))thenInBackground { + return ^(id block) { + return [self->d __thenOn:dispatch_get_global_queue(0, 0) execute:^(id obj) { + return PMKCallVariadicBlock(block, obj); + }]; + }; +} + +- (AnyPromise *(^)(dispatch_queue_t, id))catchOn { + return ^(dispatch_queue_t q, id block) { + return [self->d __catchOn:q execute:^(id obj) { + return PMKCallVariadicBlock(block, obj); + }]; + }; +} + +- (AnyPromise *(^)(id))catch { + return ^(id block) { + return [self->d __catchOn:dispatch_get_main_queue() execute:^(id obj) { + return PMKCallVariadicBlock(block, obj); + }]; + }; +} + +- (AnyPromise *(^)(id))catchInBackground { + return ^(id block) { + return [self->d __catchOn:dispatch_get_global_queue(0, 0) execute:^(id obj) { + return PMKCallVariadicBlock(block, obj); + }]; + }; +} + +- (AnyPromise *(^)(dispatch_block_t))ensure { + return ^(dispatch_block_t block) { + return [self->d __ensureOn:dispatch_get_main_queue() execute:block]; + }; +} + +- (AnyPromise *(^)(dispatch_queue_t, dispatch_block_t))ensureOn { + return ^(dispatch_queue_t queue, dispatch_block_t block) { + return [self->d __ensureOn:queue execute:block]; + }; +} + +- (BOOL)pending { + return [[d valueForKey:@"__pending"] boolValue]; +} + +- (BOOL)rejected { + return IsError([d __value]); +} + +- (BOOL)fulfilled { + return !self.rejected; +} + +- (id)value { + id obj = [d __value]; + + if ([obj isKindOfClass:[PMKArray class]]) { + return obj[0]; + } else { + return obj; + } +} + +@end + + + +@implementation AnyPromise (Adapters) + ++ (instancetype)promiseWithAdapterBlock:(void (^)(PMKAdapter))block { + return [self promiseWithResolverBlock:^(PMKResolver resolve) { + block(^(id value, id error){ + resolve(error ?: value); + }); + }]; +} + ++ (instancetype)promiseWithIntegerAdapterBlock:(void (^)(PMKIntegerAdapter))block { + return [self promiseWithResolverBlock:^(PMKResolver resolve) { + block(^(NSInteger value, id error){ + if (error) { + resolve(error); + } else { + resolve(@(value)); + } + }); + }]; +} + ++ (instancetype)promiseWithBooleanAdapterBlock:(void (^)(PMKBooleanAdapter adapter))block { + return [self promiseWithResolverBlock:^(PMKResolver resolve) { + block(^(BOOL value, id error){ + if (error) { + resolve(error); + } else { + resolve(@(value)); + } + }); + }]; +} + +@end diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise.swift new file mode 100644 index 000000000..5dfa1df4c --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/AnyPromise.swift @@ -0,0 +1,204 @@ +import Foundation + +/** + __AnyPromise is an implementation detail. + + Because of how ObjC/Swift compatability work we have to compose our AnyPromise + with this internal object, however this is still part of the public interface. + Sadly. Please don’t use it. +*/ +@objc(__AnyPromise) public class __AnyPromise: NSObject { + fileprivate let box: Box + + @objc public init(resolver body: (@escaping (Any?) -> Void) -> Void) { + box = EmptyBox() + super.init() + body { + if let p = $0 as? AnyPromise { + p.d.__pipe(self.box.seal) + } else { + self.box.seal($0) + } + } + } + + @objc public func __thenOn(_ q: DispatchQueue, execute: @escaping (Any?) -> Any?) -> AnyPromise { + return AnyPromise(__D: __AnyPromise(resolver: { resolve in + self.__pipe { obj in + if !(obj is NSError) { + q.async { + resolve(execute(obj)) + } + } else { + resolve(obj) + } + } + })) + } + + @objc public func __catchOn(_ q: DispatchQueue, execute: @escaping (Any?) -> Any?) -> AnyPromise { + return AnyPromise(__D: __AnyPromise(resolver: { resolve in + self.__pipe { obj in + if obj is NSError { + q.async { + resolve(execute(obj)) + } + } else { + resolve(obj) + } + } + })) + } + + @objc public func __ensureOn(_ q: DispatchQueue, execute: @escaping () -> Void) -> AnyPromise { + return AnyPromise(__D: __AnyPromise(resolver: { resolve in + self.__pipe { obj in + q.async { + execute() + resolve(obj) + } + } + })) + } + + /// Internal, do not use! Some behaviors undefined. + @objc public func __pipe(_ to: @escaping (Any?) -> Void) { + let to = { (obj: Any?) -> Void in + if obj is NSError { + to(obj) // or we cannot determine if objects are errors in objc land + } else { + to(obj) + } + } + switch box.inspect() { + case .pending: + box.inspect { + switch $0 { + case .pending(let handlers): + handlers.append { obj in + to(obj) + } + case .resolved(let obj): + to(obj) + } + } + case .resolved(let obj): + to(obj) + } + } + + @objc public var __value: Any? { + switch box.inspect() { + case .resolved(let obj): + return obj + default: + return nil + } + } + + @objc public var __pending: Bool { + switch box.inspect() { + case .pending: + return true + case .resolved: + return false + } + } +} + +extension AnyPromise: Thenable, CatchMixin { + + /// - Returns: A new `AnyPromise` bound to a `Promise`. + public convenience init(_ bridge: U) { + self.init(__D: __AnyPromise(resolver: { resolve in + bridge.pipe { + switch $0 { + case .rejected(let error): + resolve(error as NSError) + case .fulfilled(let value): + resolve(value) + } + } + })) + } + + public func pipe(to body: @escaping (Result) -> Void) { + + func fulfill() { + // calling through to the ObjC `value` property unwraps (any) PMKManifold + // and considering this is the Swift pipe; we want that. + body(.fulfilled(self.value(forKey: "value"))) + } + + switch box.inspect() { + case .pending: + box.inspect { + switch $0 { + case .pending(let handlers): + handlers.append { + if let error = $0 as? Error { + body(.rejected(error)) + } else { + fulfill() + } + } + case .resolved(let error as Error): + body(.rejected(error)) + case .resolved: + fulfill() + } + } + case .resolved(let error as Error): + body(.rejected(error)) + case .resolved: + fulfill() + } + } + + fileprivate var d: __AnyPromise { + return value(forKey: "__d") as! __AnyPromise + } + + var box: Box { + return d.box + } + + public var result: Result? { + guard let value = __value else { + return nil + } + if let error = value as? Error { + return .rejected(error) + } else { + return .fulfilled(value) + } + } + + public typealias T = Any? +} + + +#if swift(>=3.1) +public extension Promise where T == Any? { + convenience init(_ anyPromise: AnyPromise) { + self.init { + anyPromise.pipe(to: $0.resolve) + } + } +} +#else +extension AnyPromise { + public func asPromise() -> Promise { + return Promise(.pending, resolver: { resolve in + pipe { result in + switch result { + case .rejected(let error): + resolve.reject(error) + case .fulfilled(let obj): + resolve.fulfill(obj) + } + } + }) + } +} +#endif diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Box.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Box.swift new file mode 100644 index 000000000..3bf7ecd7a --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Box.swift @@ -0,0 +1,101 @@ +import Dispatch + +enum Sealant { + case pending(Handlers) + case resolved(R) +} + +class Handlers { + var bodies: [(R) -> Void] = [] + func append(_ item: @escaping(R) -> Void) { bodies.append(item) } +} + +/// - Remark: not protocol ∵ http://www.russbishop.net/swift-associated-types-cont +class Box { + func inspect() -> Sealant { fatalError() } + func inspect(_: (Sealant) -> Void) { fatalError() } + func seal(_: T) {} +} + +class SealedBox: Box { + let value: T + + init(value: T) { + self.value = value + } + + override func inspect() -> Sealant { + return .resolved(value) + } +} + +class EmptyBox: Box { + private var sealant = Sealant.pending(.init()) + private let barrier = DispatchQueue(label: "org.promisekit.barrier", attributes: .concurrent) + + override func seal(_ value: T) { + var handlers: Handlers! + barrier.sync(flags: .barrier) { + guard case .pending(let _handlers) = self.sealant else { + return // already fulfilled! + } + handlers = _handlers + self.sealant = .resolved(value) + } + + //FIXME we are resolved so should `pipe(to:)` be called at this instant, “thens are called in order” would be invalid + //NOTE we don’t do this in the above `sync` because that could potentially deadlock + //THOUGH since `then` etc. typically invoke after a run-loop cycle, this issue is somewhat less severe + + if let handlers = handlers { + handlers.bodies.forEach{ $0(value) } + } + + //TODO solution is an unfortunate third state “sealed” where then's get added + // to a separate handler pool for that state + // any other solution has potential races + } + + override func inspect() -> Sealant { + var rv: Sealant! + barrier.sync { + rv = self.sealant + } + return rv + } + + override func inspect(_ body: (Sealant) -> Void) { + var sealed = false + barrier.sync(flags: .barrier) { + switch sealant { + case .pending: + // body will append to handlers, so we must stay barrier’d + body(sealant) + case .resolved: + sealed = true + } + } + if sealed { + // we do this outside the barrier to prevent potential deadlocks + // it's safe because we never transition away from this state + body(sealant) + } + } +} + + +extension Optional where Wrapped: DispatchQueue { + @inline(__always) + func async(flags: DispatchWorkItemFlags?, _ body: @escaping() -> Void) { + switch self { + case .none: + body() + case .some(let q): + if let flags = flags { + q.async(flags: flags, execute: body) + } else { + q.async(execute: body) + } + } + } +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Catchable.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Catchable.swift new file mode 100644 index 000000000..41ec7277e --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Catchable.swift @@ -0,0 +1,256 @@ +import Dispatch + +/// Provides `catch` and `recover` to your object that conforms to `Thenable` +public protocol CatchMixin: Thenable +{} + +public extension CatchMixin { + + /** + The provided closure executes when this promise rejects. + + Rejecting a promise cascades: rejecting all subsequent promises (unless + recover is invoked) thus you will typically place your catch at the end + of a chain. Often utility promises will not have a catch, instead + delegating the error handling to the caller. + + - Parameter on: The queue to which the provided closure dispatches. + - Parameter policy: The default policy does not execute your handler for cancellation errors. + - Parameter execute: The handler to execute if this promise is rejected. + - Returns: A promise finalizer. + - SeeAlso: [Cancellation](http://promisekit.org/docs/) + */ + @discardableResult + func `catch`(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, policy: CatchPolicy = conf.catchPolicy, _ body: @escaping(Error) -> Void) -> PMKFinalizer { + let finalizer = PMKFinalizer() + pipe { + switch $0 { + case .rejected(let error): + guard policy == .allErrors || !error.isCancelled else { + fallthrough + } + on.async(flags: flags) { + body(error) + finalizer.pending.resolve(()) + } + case .fulfilled: + finalizer.pending.resolve(()) + } + } + return finalizer + } +} + +public class PMKFinalizer { + let pending = Guarantee.pending() + + /// `finally` is the same as `ensure`, but it is not chainable + public func finally(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping () -> Void) { + pending.guarantee.done(on: on, flags: flags) { + body() + } + } +} + + +public extension CatchMixin { + + /** + The provided closure executes when this promise rejects. + + Unlike `catch`, `recover` continues the chain. + Use `recover` in circumstances where recovering the chain from certain errors is a possibility. For example: + + firstly { + CLLocationManager.requestLocation() + }.recover { error in + guard error == CLError.unknownLocation else { throw error } + return .value(CLLocation.chicago) + } + + - Parameter on: The queue to which the provided closure dispatches. + - Parameter body: The handler to execute if this promise is rejected. + - SeeAlso: [Cancellation](http://promisekit.org/docs/) + */ + func recover(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, policy: CatchPolicy = conf.catchPolicy, _ body: @escaping(Error) throws -> U) -> Promise where U.T == T { + let rp = Promise(.pending) + pipe { + switch $0 { + case .fulfilled(let value): + rp.box.seal(.fulfilled(value)) + case .rejected(let error): + if policy == .allErrors || !error.isCancelled { + on.async(flags: flags) { + do { + let rv = try body(error) + guard rv !== rp else { throw PMKError.returnedSelf } + rv.pipe(to: rp.box.seal) + } catch { + rp.box.seal(.rejected(error)) + } + } + } else { + rp.box.seal(.rejected(error)) + } + } + } + return rp + } + + /** + The provided closure executes when this promise rejects. + This variant of `recover` requires the handler to return a Guarantee, thus it returns a Guarantee itself and your closure cannot `throw`. + - Note it is logically impossible for this to take a `catchPolicy`, thus `allErrors` are handled. + - Parameter on: The queue to which the provided closure dispatches. + - Parameter body: The handler to execute if this promise is rejected. + - SeeAlso: [Cancellation](http://promisekit.org/docs/) + */ + @discardableResult + func recover(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(Error) -> Guarantee) -> Guarantee { + let rg = Guarantee(.pending) + pipe { + switch $0 { + case .fulfilled(let value): + rg.box.seal(value) + case .rejected(let error): + on.async(flags: flags) { + body(error).pipe(to: rg.box.seal) + } + } + } + return rg + } + + /** + The provided closure executes when this promise resolves, whether it rejects or not. + + firstly { + UIApplication.shared.networkActivityIndicatorVisible = true + }.done { + //… + }.ensure { + UIApplication.shared.networkActivityIndicatorVisible = false + }.catch { + //… + } + + - Parameter on: The queue to which the provided closure dispatches. + - Parameter body: The closure that executes when this promise resolves. + - Returns: A new promise, resolved with this promise’s resolution. + */ + func ensure(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping () -> Void) -> Promise { + let rp = Promise(.pending) + pipe { result in + on.async(flags: flags) { + body() + rp.box.seal(result) + } + } + return rp + } + + /** + The provided closure executes when this promise resolves, whether it rejects or not. + The chain waits on the returned `Guarantee`. + + firstly { + setup() + }.done { + //… + }.ensureThen { + teardown() // -> Guarante + }.catch { + //… + } + + - Parameter on: The queue to which the provided closure dispatches. + - Parameter body: The closure that executes when this promise resolves. + - Returns: A new promise, resolved with this promise’s resolution. + */ + func ensureThen(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping () -> Guarantee) -> Promise { + let rp = Promise(.pending) + pipe { result in + on.async(flags: flags) { + body().done { + rp.box.seal(result) + } + } + } + return rp + } + + + + /** + Consumes the Swift unused-result warning. + - Note: You should `catch`, but in situations where you know you don’t need a `catch`, `cauterize` makes your intentions clear. + */ + @discardableResult + func cauterize() -> PMKFinalizer { + return self.catch { + Swift.print("PromiseKit:cauterized-error:", $0) + } + } +} + + +public extension CatchMixin where T == Void { + + /** + The provided closure executes when this promise rejects. + + This variant of `recover` is specialized for `Void` promises and de-errors your chain returning a `Guarantee`, thus you cannot `throw` and you must handle all errors including cancellation. + + - Parameter on: The queue to which the provided closure dispatches. + - Parameter body: The handler to execute if this promise is rejected. + - SeeAlso: [Cancellation](http://promisekit.org/docs/) + */ + @discardableResult + func recover(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(Error) -> Void) -> Guarantee { + let rg = Guarantee(.pending) + pipe { + switch $0 { + case .fulfilled: + rg.box.seal(()) + case .rejected(let error): + on.async(flags: flags) { + body(error) + rg.box.seal(()) + } + } + } + return rg + } + + /** + The provided closure executes when this promise rejects. + + This variant of `recover` ensures that no error is thrown from the handler and allows specifying a catch policy. + + - Parameter on: The queue to which the provided closure dispatches. + - Parameter body: The handler to execute if this promise is rejected. + - SeeAlso: [Cancellation](http://promisekit.org/docs/) + */ + func recover(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, policy: CatchPolicy = conf.catchPolicy, _ body: @escaping(Error) throws -> Void) -> Promise { + let rg = Promise(.pending) + pipe { + switch $0 { + case .fulfilled: + rg.box.seal(.fulfilled(())) + case .rejected(let error): + if policy == .allErrors || !error.isCancelled { + on.async(flags: flags) { + do { + rg.box.seal(.fulfilled(try body(error))) + } catch { + rg.box.seal(.rejected(error)) + } + } + } else { + rg.box.seal(.rejected(error)) + } + } + } + return rg + } +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Configuration.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Configuration.swift new file mode 100644 index 000000000..4891c45e8 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Configuration.swift @@ -0,0 +1,13 @@ +import Dispatch + +/// PromiseKit’s configurable parameters +public struct PMKConfiguration { + /// The default queues that promises handlers dispatch to + public var Q: (map: DispatchQueue?, return: DispatchQueue?) = (map: DispatchQueue.main, return: DispatchQueue.main) + + /// The default catch-policy for all `catch` and `resolve` + public var catchPolicy = CatchPolicy.allErrorsExceptCancellation +} + +/// Modify this as soon as possible in your application’s lifetime +public var conf = PMKConfiguration() diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/CustomStringConvertible.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/CustomStringConvertible.swift new file mode 100644 index 000000000..eee0b020a --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/CustomStringConvertible.swift @@ -0,0 +1,44 @@ + +extension Promise: CustomStringConvertible { + /// - Returns: A description of the state of this promise. + public var description: String { + switch result { + case nil: + return "Promise(…\(T.self))" + case .rejected(let error)?: + return "Promise(\(error))" + case .fulfilled(let value)?: + return "Promise(\(value))" + } + } +} + +extension Promise: CustomDebugStringConvertible { + /// - Returns: A debug-friendly description of the state of this promise. + public var debugDescription: String { + switch box.inspect() { + case .pending(let handlers): + return "Promise<\(T.self)>.pending(handlers: \(handlers.bodies.count))" + case .resolved(.rejected(let error)): + return "Promise<\(T.self)>.rejected(\(type(of: error)).\(error))" + case .resolved(.fulfilled(let value)): + return "Promise<\(T.self)>.fulfilled(\(value))" + } + } +} + +#if !SWIFT_PACKAGE +extension AnyPromise { + /// - Returns: A description of the state of this promise. + override open var description: String { + switch box.inspect() { + case .pending: + return "AnyPromise(…)" + case .resolved(let obj?): + return "AnyPromise(\(obj))" + case .resolved(nil): + return "AnyPromise(nil)" + } + } +} +#endif diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Deprecations.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Deprecations.swift new file mode 100644 index 000000000..ac4eb364b --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Deprecations.swift @@ -0,0 +1,93 @@ +import Dispatch + +@available(*, deprecated, message: "See `init(resolver:)`") +public func wrap(_ body: (@escaping (T?, Error?) -> Void) throws -> Void) -> Promise { + return Promise { seal in + try body(seal.resolve) + } +} + +@available(*, deprecated, message: "See `init(resolver:)`") +public func wrap(_ body: (@escaping (T, Error?) -> Void) throws -> Void) -> Promise { + return Promise { seal in + try body(seal.resolve) + } +} + +@available(*, deprecated, message: "See `init(resolver:)`") +public func wrap(_ body: (@escaping (Error?, T?) -> Void) throws -> Void) -> Promise { + return Promise { seal in + try body(seal.resolve) + } +} + +@available(*, deprecated, message: "See `init(resolver:)`") +public func wrap(_ body: (@escaping (Error?) -> Void) throws -> Void) -> Promise { + return Promise { seal in + try body(seal.resolve) + } +} + +@available(*, deprecated, message: "See `init(resolver:)`") +public func wrap(_ body: (@escaping (T) -> Void) throws -> Void) -> Promise { + return Promise { seal in + try body(seal.fulfill) + } +} + +public extension Promise { + @available(*, deprecated, message: "See `ensure`") + public func always(on q: DispatchQueue = .main, execute body: @escaping () -> Void) -> Promise { + return ensure(on: q, body) + } +} + +public extension Thenable { +#if PMKFullDeprecations + /// disabled due to ambiguity with the other `.flatMap` + @available(*, deprecated: 6.1, message: "See: `compactMap`") + func flatMap(on: DispatchQueue? = conf.Q.map, _ transform: @escaping(T) throws -> U?) -> Promise { + return compactMap(on: on, transform) + } +#endif +} + +public extension Thenable where T: Sequence { +#if PMKFullDeprecations + /// disabled due to ambiguity with the other `.map` + @available(*, deprecated, message: "See: `mapValues`") + func map(on: DispatchQueue? = conf.Q.map, _ transform: @escaping(T.Iterator.Element) throws -> U) -> Promise<[U]> { + return mapValues(on: on, transform) + } + + /// disabled due to ambiguity with the other `.flatMap` + @available(*, deprecated, message: "See: `flatMapValues`") + func flatMap(on: DispatchQueue? = conf.Q.map, _ transform: @escaping(T.Iterator.Element) throws -> U) -> Promise<[U.Iterator.Element]> { + return flatMapValues(on: on, transform) + } +#endif + + @available(*, deprecated, message: "See: `filterValues`") + func filter(on: DispatchQueue? = conf.Q.map, test: @escaping (T.Iterator.Element) -> Bool) -> Promise<[T.Iterator.Element]> { + return filterValues(on: on, test) + } +} + +public extension Thenable where T: Collection { + @available(*, deprecated, message: "See: `firstValue`") + var first: Promise { + return firstValue + } + + @available(*, deprecated, message: "See: `lastValue`") + var last: Promise { + return lastValue + } +} + +public extension Thenable where T: Sequence, T.Iterator.Element: Comparable { + @available(*, deprecated, message: "See: `sortedValues`") + func sorted(on: DispatchQueue? = conf.Q.map) -> Promise<[T.Iterator.Element]> { + return sortedValues(on: on) + } +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Error.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Error.swift new file mode 100644 index 000000000..7229e6f49 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Error.swift @@ -0,0 +1,103 @@ +import Foundation + +public enum PMKError: Error { + /** + The completionHandler with form `(T?, Error?)` was called with `(nil, nil)`. + This is invalid as per Cocoa/Apple calling conventions. + */ + case invalidCallingConvention + + /** + A handler returned its own promise. 99% of the time, this is likely a + programming error. It is also invalid per Promises/A+. + */ + case returnedSelf + + /** `when()`, `race()` etc. were called with invalid parameters, eg. an empty array. */ + case badInput + + /// The operation was cancelled + case cancelled + + /// `nil` was returned from `flatMap` + @available(*, deprecated, message: "See: `compactMap`") + case flatMap(Any, Any.Type) + + /// `nil` was returned from `compactMap` + case compactMap(Any, Any.Type) + + /** + The lastValue or firstValue of a sequence was requested but the sequence was empty. + + Also used if all values of this collection failed the test passed to `firstValue(where:)`. + */ + case emptySequence +} + +extension PMKError: CustomDebugStringConvertible { + public var debugDescription: String { + switch self { + case .flatMap(let obj, let type): + return "Could not `flatMap<\(type)>`: \(obj)" + case .compactMap(let obj, let type): + return "Could not `compactMap<\(type)>`: \(obj)" + case .invalidCallingConvention: + return "A closure was called with an invalid calling convention, probably (nil, nil)" + case .returnedSelf: + return "A promise handler returned itself" + case .badInput: + return "Bad input was provided to a PromiseKit function" + case .cancelled: + return "The asynchronous sequence was cancelled" + case .emptySequence: + return "The first or last element was requested for an empty sequence" + } + } +} + +extension PMKError: LocalizedError { + public var errorDescription: String? { + return debugDescription + } +} + + +//////////////////////////////////////////////////////////// Cancellation + +/// An error that may represent the cancelled condition +public protocol CancellableError: Error { + /// returns true if this Error represents a cancelled condition + var isCancelled: Bool { get } +} + +extension Error { + public var isCancelled: Bool { + do { + throw self + } catch PMKError.cancelled { + return true + } catch let error as CancellableError { + return error.isCancelled + } catch URLError.cancelled { + return true + } catch CocoaError.userCancelled { + return true + } catch { + #if os(macOS) || os(iOS) || os(tvOS) + let pair = { ($0.domain, $0.code) }(error as NSError) + return ("SKErrorDomain", 2) == pair + #else + return false + #endif + } + } +} + +/// Used by `catch` and `recover` +public enum CatchPolicy { + /// Indicates that `catch` or `recover` handle all error types including cancellable-errors. + case allErrors + + /// Indicates that `catch` or `recover` handle all error except cancellable-errors. + case allErrorsExceptCancellation +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Guarantee.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Guarantee.swift new file mode 100644 index 000000000..300759973 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Guarantee.swift @@ -0,0 +1,201 @@ +import class Foundation.Thread +import Dispatch + +/** + A `Guarantee` is a functional abstraction around an asynchronous operation that cannot error. + - See: `Thenable` +*/ +public class Guarantee: Thenable { + let box: Box + + fileprivate init(box: SealedBox) { + self.box = box + } + + /// Returns a `Guarantee` sealed with the provided value. + public static func value(_ value: T) -> Guarantee { + return .init(box: SealedBox(value: value)) + } + + /// Returns a pending `Guarantee` that can be resolved with the provided closure’s parameter. + public init(resolver body: (@escaping(T) -> Void) -> Void) { + box = EmptyBox() + body(box.seal) + } + + /// - See: `Thenable.pipe` + public func pipe(to: @escaping(Result) -> Void) { + pipe{ to(.fulfilled($0)) } + } + + func pipe(to: @escaping(T) -> Void) { + switch box.inspect() { + case .pending: + box.inspect { + switch $0 { + case .pending(let handlers): + handlers.append(to) + case .resolved(let value): + to(value) + } + } + case .resolved(let value): + to(value) + } + } + + /// - See: `Thenable.result` + public var result: Result? { + switch box.inspect() { + case .pending: + return nil + case .resolved(let value): + return .fulfilled(value) + } + } + + init(_: PMKUnambiguousInitializer) { + box = EmptyBox() + } + + /// Returns a tuple of a pending `Guarantee` and a function that resolves it. + public class func pending() -> (guarantee: Guarantee, resolve: (T) -> Void) { + return { ($0, $0.box.seal) }(Guarantee(.pending)) + } +} + +public extension Guarantee { + @discardableResult + func done(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(T) -> Void) -> Guarantee { + let rg = Guarantee(.pending) + pipe { (value: T) in + on.async(flags: flags) { + body(value) + rg.box.seal(()) + } + } + return rg + } + + func get(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping (T) -> Void) -> Guarantee { + return map(on: on, flags: flags) { + body($0) + return $0 + } + } + + func map(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(T) -> U) -> Guarantee { + let rg = Guarantee(.pending) + pipe { value in + on.async(flags: flags) { + rg.box.seal(body(value)) + } + } + return rg + } + + @discardableResult + func then(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(T) -> Guarantee) -> Guarantee { + let rg = Guarantee(.pending) + pipe { value in + on.async(flags: flags) { + body(value).pipe(to: rg.box.seal) + } + } + return rg + } + + public func asVoid() -> Guarantee { + return map(on: nil) { _ in } + } + + /** + Blocks this thread, so you know, don’t call this on a serial thread that + any part of your chain may use. Like the main thread for example. + */ + public func wait() -> T { + + if Thread.isMainThread { + print("PromiseKit: warning: `wait()` called on main thread!") + } + + var result = value + + if result == nil { + let group = DispatchGroup() + group.enter() + pipe { (foo: T) in result = foo; group.leave() } + group.wait() + } + + return result! + } +} + +public extension Guarantee where T: Sequence { + + /** + `Guarantee<[T]>` => `T` -> `Guarantee` => `Guaranetee<[U]>` + + firstly { + .value([1,2,3]) + }.thenMap { + .value($0 * 2) + }.done { + // $0 => [2,4,6] + } + */ + func thenMap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) -> Guarantee) -> Guarantee<[U]> { + return then(on: on, flags: flags) { + when(fulfilled: $0.map(transform)) + }.recover { + // if happens then is bug inside PromiseKit + fatalError(String(describing: $0)) + } + } +} + +#if swift(>=3.1) +public extension Guarantee where T == Void { + convenience init() { + self.init(box: SealedBox(value: Void())) + } +} +#endif + + +public extension DispatchQueue { + /** + Asynchronously executes the provided closure on a dispatch queue. + + DispatchQueue.global().async(.promise) { + md5(input) + }.done { md5 in + //… + } + + - Parameter body: The closure that resolves this promise. + - Returns: A new `Guarantee` resolved by the result of the provided closure. + - Note: There is no Promise/Thenable version of this due to Swift compiler ambiguity issues. + */ + @available(macOS 10.10, iOS 2.0, tvOS 10.0, watchOS 2.0, *) + final func async(_: PMKNamespacer, group: DispatchGroup? = nil, qos: DispatchQoS = .default, flags: DispatchWorkItemFlags = [], execute body: @escaping () -> T) -> Guarantee { + let rg = Guarantee(.pending) + async(group: group, qos: qos, flags: flags) { + rg.box.seal(body()) + } + return rg + } +} + + +#if os(Linux) +import func CoreFoundation._CFIsMainThread + +extension Thread { + // `isMainThread` is not implemented yet in swift-corelibs-foundation. + static var isMainThread: Bool { + return _CFIsMainThread() + } +} +#endif diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m new file mode 100644 index 000000000..700c1b37e --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m @@ -0,0 +1,77 @@ +#import + +struct PMKBlockLiteral { + void *isa; // initialized to &_NSConcreteStackBlock or &_NSConcreteGlobalBlock + int flags; + int reserved; + void (*invoke)(void *, ...); + struct block_descriptor { + unsigned long int reserved; // NULL + unsigned long int size; // sizeof(struct Block_literal_1) + // optional helper functions + void (*copy_helper)(void *dst, void *src); // IFF (1<<25) + void (*dispose_helper)(void *src); // IFF (1<<25) + // required ABI.2010.3.16 + const char *signature; // IFF (1<<30) + } *descriptor; + // imported variables +}; + +typedef NS_OPTIONS(NSUInteger, PMKBlockDescriptionFlags) { + PMKBlockDescriptionFlagsHasCopyDispose = (1 << 25), + PMKBlockDescriptionFlagsHasCtor = (1 << 26), // helpers have C++ code + PMKBlockDescriptionFlagsIsGlobal = (1 << 28), + PMKBlockDescriptionFlagsHasStret = (1 << 29), // IFF BLOCK_HAS_SIGNATURE + PMKBlockDescriptionFlagsHasSignature = (1 << 30) +}; + +// It appears 10.7 doesn't support quotes in method signatures. Remove them +// via @rabovik's method. See https://github.com/OliverLetterer/SLObjectiveCRuntimeAdditions/pull/2 +#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8 +NS_INLINE static const char * pmk_removeQuotesFromMethodSignature(const char *str){ + char *result = malloc(strlen(str) + 1); + BOOL skip = NO; + char *to = result; + char c; + while ((c = *str++)) { + if ('"' == c) { + skip = !skip; + continue; + } + if (skip) continue; + *to++ = c; + } + *to = '\0'; + return result; +} +#endif + +static NSMethodSignature *NSMethodSignatureForBlock(id block) { + if (!block) + return nil; + + struct PMKBlockLiteral *blockRef = (__bridge struct PMKBlockLiteral *)block; + PMKBlockDescriptionFlags flags = (PMKBlockDescriptionFlags)blockRef->flags; + + if (flags & PMKBlockDescriptionFlagsHasSignature) { + void *signatureLocation = blockRef->descriptor; + signatureLocation += sizeof(unsigned long int); + signatureLocation += sizeof(unsigned long int); + + if (flags & PMKBlockDescriptionFlagsHasCopyDispose) { + signatureLocation += sizeof(void(*)(void *dst, void *src)); + signatureLocation += sizeof(void (*)(void *src)); + } + + const char *signature = (*(const char **)signatureLocation); +#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8 + signature = pmk_removeQuotesFromMethodSignature(signature); + NSMethodSignature *nsSignature = [NSMethodSignature signatureWithObjCTypes:signature]; + free((void *)signature); + + return nsSignature; +#endif + return [NSMethodSignature signatureWithObjCTypes:signature]; + } + return 0; +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m new file mode 100644 index 000000000..1453a7d26 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m @@ -0,0 +1,120 @@ +#import "NSMethodSignatureForBlock.m" +#import +#import +#import "AnyPromise+Private.h" +#import +#import +#import + +#ifndef PMKLog +#define PMKLog NSLog +#endif + +@interface PMKArray : NSObject { +@public + id objs[3]; + NSUInteger count; +} @end + +@implementation PMKArray + +- (id)objectAtIndexedSubscript:(NSUInteger)idx { + if (count <= idx) { + // this check is necessary due to lack of checks in `pmk_safely_call_block` + return nil; + } + return objs[idx]; +} + +@end + +id __PMKArrayWithCount(NSUInteger count, ...) { + PMKArray *this = [PMKArray new]; + this->count = count; + va_list args; + va_start(args, count); + for (NSUInteger x = 0; x < count; ++x) + this->objs[x] = va_arg(args, id); + va_end(args); + return this; +} + + +static inline id _PMKCallVariadicBlock(id frock, id result) { + NSCAssert(frock, @""); + + NSMethodSignature *sig = NSMethodSignatureForBlock(frock); + const NSUInteger nargs = sig.numberOfArguments; + const char rtype = sig.methodReturnType[0]; + + #define call_block_with_rtype(type) ({^type{ \ + switch (nargs) { \ + case 1: \ + return ((type(^)(void))frock)(); \ + case 2: { \ + const id arg = [result class] == [PMKArray class] ? result[0] : result; \ + return ((type(^)(id))frock)(arg); \ + } \ + case 3: { \ + type (^block)(id, id) = frock; \ + return [result class] == [PMKArray class] \ + ? block(result[0], result[1]) \ + : block(result, nil); \ + } \ + case 4: { \ + type (^block)(id, id, id) = frock; \ + return [result class] == [PMKArray class] \ + ? block(result[0], result[1], result[2]) \ + : block(result, nil, nil); \ + } \ + default: \ + @throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"PromiseKit: The provided block’s argument count is unsupported." userInfo:nil]; \ + }}();}) + + switch (rtype) { + case 'v': + call_block_with_rtype(void); + return nil; + case '@': + return call_block_with_rtype(id) ?: nil; + case '*': { + char *str = call_block_with_rtype(char *); + return str ? @(str) : nil; + } + case 'c': return @(call_block_with_rtype(char)); + case 'i': return @(call_block_with_rtype(int)); + case 's': return @(call_block_with_rtype(short)); + case 'l': return @(call_block_with_rtype(long)); + case 'q': return @(call_block_with_rtype(long long)); + case 'C': return @(call_block_with_rtype(unsigned char)); + case 'I': return @(call_block_with_rtype(unsigned int)); + case 'S': return @(call_block_with_rtype(unsigned short)); + case 'L': return @(call_block_with_rtype(unsigned long)); + case 'Q': return @(call_block_with_rtype(unsigned long long)); + case 'f': return @(call_block_with_rtype(float)); + case 'd': return @(call_block_with_rtype(double)); + case 'B': return @(call_block_with_rtype(_Bool)); + case '^': + if (strcmp(sig.methodReturnType, "^v") == 0) { + call_block_with_rtype(void); + return nil; + } + // else fall through! + default: + @throw [NSException exceptionWithName:@"PromiseKit" reason:@"PromiseKit: Unsupported method signature." userInfo:nil]; + } +} + +static id PMKCallVariadicBlock(id frock, id result) { + @try { + return _PMKCallVariadicBlock(frock, result); + } @catch (id thrown) { + if ([thrown isKindOfClass:[NSString class]]) + return thrown; + if ([thrown isKindOfClass:[NSError class]]) + return thrown; + + // we don’t catch objc exceptions: they are meant to crash your app + @throw thrown; + } +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Promise.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Promise.swift new file mode 100644 index 000000000..c78ae8532 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Promise.swift @@ -0,0 +1,179 @@ +import class Foundation.Thread +import Dispatch + +/** + A `Promise` is a functional abstraction around a failable asynchronous operation. + - See: `Thenable` + */ +public class Promise: Thenable, CatchMixin { + let box: Box> + + fileprivate init(box: SealedBox>) { + self.box = box + } + + /** + Initialize a new fulfilled promise. + + We do not provide `init(value:)` because Swift is “greedy” + and would pick that initializer in cases where it should pick + one of the other more specific options leading to Promises with + `T` that is eg: `Error` or worse `(T->Void,Error->Void)` for + uses of our PMK < 4 pending initializer due to Swift trailing + closure syntax (nothing good comes without pain!). + + Though often easy to detect, sometimes these issues would be + hidden by other type inference leading to some nasty bugs in + production. + + In PMK5 we tried to work around this by making the pending + initializer take the form `Promise(.pending)` but this led to + bad migration errors for PMK4 users. Hence instead we quickly + released PMK6 and now only provide this initializer for making + sealed & fulfilled promises. + + Usage is still (usually) good: + + guard foo else { + return .value(bar) + } + */ + public class func value(_ value: T) -> Promise { + return Promise(box: SealedBox(value: .fulfilled(value))) + } + + /// Initialize a new rejected promise. + public init(error: Error) { + box = SealedBox(value: .rejected(error)) + } + + /// Initialize a new promise bound to the provided `Thenable`. + public init(_ bridge: U) where U.T == T { + box = EmptyBox() + bridge.pipe(to: box.seal) + } + + /// Initialize a new promise that can be resolved with the provided `Resolver`. + public init(resolver body: (Resolver) throws -> Void) { + box = EmptyBox() + let resolver = Resolver(box) + do { + try body(resolver) + } catch { + resolver.reject(error) + } + } + + /// - Returns: a tuple of a new pending promise and its `Resolver`. + public class func pending() -> (promise: Promise, resolver: Resolver) { + return { ($0, Resolver($0.box)) }(Promise(.pending)) + } + + /// - See: `Thenable.pipe` + public func pipe(to: @escaping(Result) -> Void) { + switch box.inspect() { + case .pending: + box.inspect { + switch $0 { + case .pending(let handlers): + handlers.append(to) + case .resolved(let value): + to(value) + } + } + case .resolved(let value): + to(value) + } + } + + /// - See: `Thenable.result` + public var result: Result? { + switch box.inspect() { + case .pending: + return nil + case .resolved(let result): + return result + } + } + + init(_: PMKUnambiguousInitializer) { + box = EmptyBox() + } +} + +public extension Promise { + /** + Blocks this thread, so—you know—don’t call this on a serial thread that + any part of your chain may use. Like the main thread for example. + */ + func wait() throws -> T { + + if Thread.isMainThread { + Swift.print("PromiseKit: warning: `wait()` called on main thread!") + } + + var result = self.result + + if result == nil { + let group = DispatchGroup() + group.enter() + pipe { result = $0; group.leave() } + group.wait() + } + + switch result! { + case .rejected(let error): + throw error + case .fulfilled(let value): + return value + } + } +} + +#if swift(>=3.1) +extension Promise where T == Void { + /// Initializes a new promise fulfilled with `Void` + public convenience init() { + self.init(box: SealedBox(value: .fulfilled(Void()))) + } +} +#endif + + +public extension DispatchQueue { + /** + Asynchronously executes the provided closure on a dispatch queue. + + DispatchQueue.global().async(.promise) { + try md5(input) + }.done { md5 in + //… + } + + - Parameter body: The closure that resolves this promise. + - Returns: A new `Promise` resolved by the result of the provided closure. + - Note: There is no Promise/Thenable version of this due to Swift compiler ambiguity issues. + */ + @available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) + final func async(_: PMKNamespacer, group: DispatchGroup? = nil, qos: DispatchQoS = .default, flags: DispatchWorkItemFlags = [], execute body: @escaping () throws -> T) -> Promise { + let promise = Promise(.pending) + async(group: group, qos: qos, flags: flags) { + do { + promise.box.seal(.fulfilled(try body())) + } catch { + promise.box.seal(.rejected(error)) + } + } + return promise + } +} + + +/// used by our extensions to provide unambiguous functions with the same name as the original function +public enum PMKNamespacer { + case promise +} + +enum PMKUnambiguousInitializer { + case pending +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/PromiseKit.h b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/PromiseKit.h new file mode 100644 index 000000000..2651530cb --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/PromiseKit.h @@ -0,0 +1,7 @@ +#import "fwd.h" +#import "AnyPromise.h" + +#import // `FOUNDATION_EXPORT` + +FOUNDATION_EXPORT double PromiseKitVersionNumber; +FOUNDATION_EXPORT const unsigned char PromiseKitVersionString[]; diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Resolver.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Resolver.swift new file mode 100644 index 000000000..ac58a7657 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Resolver.swift @@ -0,0 +1,85 @@ +/// An object for resolving promises +public class Resolver { + let box: Box> + + init(_ box: Box>) { + self.box = box + } + + deinit { + if case .pending = box.inspect() { + print("PromiseKit: warning: pending promise deallocated") + } + } +} + +public extension Resolver { + /// Fulfills the promise with the provided value + func fulfill(_ value: T) { + box.seal(.fulfilled(value)) + } + + /// Rejects the promise with the provided error + func reject(_ error: Error) { + box.seal(.rejected(error)) + } + + /// Resolves the promise with the provided result + public func resolve(_ result: Result) { + box.seal(result) + } + + /// Resolves the promise with the provided value or error + public func resolve(_ obj: T?, _ error: Error?) { + if let error = error { + reject(error) + } else if let obj = obj { + fulfill(obj) + } else { + reject(PMKError.invalidCallingConvention) + } + } + + /// Fulfills the promise with the provided value unless the provided error is non-nil + public func resolve(_ obj: T, _ error: Error?) { + if let error = error { + reject(error) + } else { + fulfill(obj) + } + } + + /// Resolves the promise, provided for non-conventional value-error ordered completion handlers. + public func resolve(_ error: Error?, _ obj: T?) { + resolve(obj, error) + } +} + +#if swift(>=3.1) +extension Resolver where T == Void { + /// Fulfills the promise unless error is non-nil + public func resolve(_ error: Error?) { + if let error = error { + reject(error) + } else { + fulfill(()) + } + } +} +#endif + +public enum Result { + case fulfilled(T) + case rejected(Error) +} + +public extension PromiseKit.Result { + var isFulfilled: Bool { + switch self { + case .fulfilled: + return true + case .rejected: + return false + } + } +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Thenable.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Thenable.swift new file mode 100644 index 000000000..776237207 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/Thenable.swift @@ -0,0 +1,424 @@ +import Dispatch + +/// Thenable represents an asynchronous operation that can be chained. +public protocol Thenable: class { + /// The type of the wrapped value + associatedtype T + + /// `pipe` is immediately executed when this `Thenable` is resolved + func pipe(to: @escaping(Result) -> Void) + + /// The resolved result or nil if pending. + var result: Result? { get } +} + +public extension Thenable { + /** + The provided closure executes when this promise resolves. + + This allows chaining promises. The promise returned by the provided closure is resolved before the promise returned by this closure resolves. + + - Parameter on: The queue to which the provided closure dispatches. + - Parameter body: The closure that executes when this promise fulfills. It must return a promise. + - Returns: A new promise that resolves when the promise returned from the provided closure resolves. For example: + + firstly { + URLSession.shared.dataTask(.promise, with: url1) + }.then { response in + transform(data: response.data) + }.done { transformation in + //… + } + */ + func then(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(T) throws -> U) -> Promise { + let rp = Promise(.pending) + pipe { + switch $0 { + case .fulfilled(let value): + on.async(flags: flags) { + do { + let rv = try body(value) + guard rv !== rp else { throw PMKError.returnedSelf } + rv.pipe(to: rp.box.seal) + } catch { + rp.box.seal(.rejected(error)) + } + } + case .rejected(let error): + rp.box.seal(.rejected(error)) + } + } + return rp + } + + /** + The provided closure is executed when this promise is resolved. + + This is like `then` but it requires the closure to return a non-promise. + + - Parameter on: The queue to which the provided closure dispatches. + - Parameter transform: The closure that is executed when this Promise is fulfilled. It must return a non-promise. + - Returns: A new promise that is resolved with the value returned from the provided closure. For example: + + firstly { + URLSession.shared.dataTask(.promise, with: url1) + }.map { response in + response.data.length + }.done { length in + //… + } + */ + func map(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T) throws -> U) -> Promise { + let rp = Promise(.pending) + pipe { + switch $0 { + case .fulfilled(let value): + on.async(flags: flags) { + do { + rp.box.seal(.fulfilled(try transform(value))) + } catch { + rp.box.seal(.rejected(error)) + } + } + case .rejected(let error): + rp.box.seal(.rejected(error)) + } + } + return rp + } + + /** + The provided closure is executed when this promise is resolved. + + In your closure return an `Optional`, if you return `nil` the resulting promise is rejected with `PMKError.compactMap`, otherwise the promise is fulfilled with the unwrapped value. + + firstly { + URLSession.shared.dataTask(.promise, with: url) + }.compactMap { + try JSONSerialization.jsonObject(with: $0.data) as? [String: String] + }.done { dictionary in + //… + }.catch { + // either `PMKError.compactMap` or a `JSONError` + } + */ + func compactMap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T) throws -> U?) -> Promise { + let rp = Promise(.pending) + pipe { + switch $0 { + case .fulfilled(let value): + on.async(flags: flags) { + do { + if let rv = try transform(value) { + rp.box.seal(.fulfilled(rv)) + } else { + throw PMKError.compactMap(value, U.self) + } + } catch { + rp.box.seal(.rejected(error)) + } + } + case .rejected(let error): + rp.box.seal(.rejected(error)) + } + } + return rp + } + + /** + The provided closure is executed when this promise is resolved. + + Equivalent to `map { x -> Void in`, but since we force the `Void` return Swift + is happier and gives you less hassle about your closure’s qualification. + + - Parameter on: The queue to which the provided closure dispatches. + - Parameter body: The closure that is executed when this Promise is fulfilled. + - Returns: A new promise fulfilled as `Void`. + + firstly { + URLSession.shared.dataTask(.promise, with: url) + }.done { response in + print(response.data) + } + */ + func done(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(T) throws -> Void) -> Promise { + let rp = Promise(.pending) + pipe { + switch $0 { + case .fulfilled(let value): + on.async(flags: flags) { + do { + try body(value) + rp.box.seal(.fulfilled(())) + } catch { + rp.box.seal(.rejected(error)) + } + } + case .rejected(let error): + rp.box.seal(.rejected(error)) + } + } + return rp + } + + /** + The provided closure is executed when this promise is resolved. + + This is like `done` but it returns the same value that the handler is fed. + `get` immutably accesses the fulfilled value; the returned Promise maintains that value. + + - Parameter on: The queue to which the provided closure dispatches. + - Parameter body: The closure that is executed when this Promise is fulfilled. + - Returns: A new promise that is resolved with the value that the handler is fed. For example: + + firstly { + .value(1) + }.get { foo in + print(foo, " is 1") + }.done { foo in + print(foo, " is 1") + }.done { foo in + print(foo, " is Void") + } + */ + func get(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping (T) throws -> Void) -> Promise { + return map(on: on, flags: flags) { + try body($0) + return $0 + } + } + + /** + The provided closure is executed with promise result. + + This is like `get` but provides the Result of the Promise so you can inspect the value of the chain at this point without causing any side effects. + + - Parameter on: The queue to which the provided closure dispatches. + - Parameter body: The closure that is executed with Result of Promise. + - Returns: A new promise that is resolved with the result that the handler is fed. For example: + + promise.tap{ print($0) }.then{ /*…*/ } + */ + func tap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(Result) -> Void) -> Promise { + return Promise { seal in + pipe { result in + on.async(flags: flags) { + body(result) + seal.resolve(result) + } + } + } + } + + /// - Returns: a new promise chained off this promise but with its value discarded. + func asVoid() -> Promise { + return map(on: nil) { _ in } + } +} + +public extension Thenable { + /** + - Returns: The error with which this promise was rejected; `nil` if this promise is not rejected. + */ + var error: Error? { + switch result { + case .none: + return nil + case .some(.fulfilled): + return nil + case .some(.rejected(let error)): + return error + } + } + + /** + - Returns: `true` if the promise has not yet resolved. + */ + var isPending: Bool { + return result == nil + } + + /** + - Returns: `true` if the promise has resolved. + */ + var isResolved: Bool { + return !isPending + } + + /** + - Returns: `true` if the promise was fulfilled. + */ + var isFulfilled: Bool { + return value != nil + } + + /** + - Returns: `true` if the promise was rejected. + */ + var isRejected: Bool { + return error != nil + } + + /** + - Returns: The value with which this promise was fulfilled or `nil` if this promise is pending or rejected. + */ + var value: T? { + switch result { + case .none: + return nil + case .some(.fulfilled(let value)): + return value + case .some(.rejected): + return nil + } + } +} + +public extension Thenable where T: Sequence { + /** + `Promise<[T]>` => `T` -> `U` => `Promise<[U]>` + + firstly { + .value([1,2,3]) + }.mapValues { integer in + integer * 2 + }.done { + // $0 => [2,4,6] + } + */ + func mapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) throws -> U) -> Promise<[U]> { + return map(on: on, flags: flags){ try $0.map(transform) } + } + + /** + `Promise<[T]>` => `T` -> `[U]` => `Promise<[U]>` + + firstly { + .value([1,2,3]) + }.flatMapValues { integer in + [integer, integer] + }.done { + // $0 => [1,1,2,2,3,3] + } + */ + func flatMapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) throws -> U) -> Promise<[U.Iterator.Element]> { + return map(on: on, flags: flags){ (foo: T) in + try foo.flatMap{ try transform($0) } + } + } + + /** + `Promise<[T]>` => `T` -> `U?` => `Promise<[U]>` + + firstly { + .value(["1","2","a","3"]) + }.compactMapValues { + Int($0) + }.done { + // $0 => [1,2,3] + } + */ + func compactMapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) throws -> U?) -> Promise<[U]> { + return map(on: on, flags: flags) { foo -> [U] in + #if !swift(>=3.3) || (swift(>=4) && !swift(>=4.1)) + return try foo.flatMap(transform) + #else + return try foo.compactMap(transform) + #endif + } + } + + /** + `Promise<[T]>` => `T` -> `Promise` => `Promise<[U]>` + + firstly { + .value([1,2,3]) + }.thenMap { integer in + .value(integer * 2) + }.done { + // $0 => [2,4,6] + } + */ + func thenMap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) throws -> U) -> Promise<[U.T]> { + return then(on: on, flags: flags) { + when(fulfilled: try $0.map(transform)) + } + } + + /** + `Promise<[T]>` => `T` -> `Promise<[U]>` => `Promise<[U]>` + + firstly { + .value([1,2,3]) + }.thenFlatMap { integer in + .value([integer, integer]) + }.done { + // $0 => [1,1,2,2,3,3] + } + */ + func thenFlatMap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) throws -> U) -> Promise<[U.T.Iterator.Element]> where U.T: Sequence { + return then(on: on, flags: flags) { + when(fulfilled: try $0.map(transform)) + }.map(on: nil) { + $0.flatMap{ $0 } + } + } + + /** + `Promise<[T]>` => `T` -> Bool => `Promise<[U]>` + + firstly { + .value([1,2,3]) + }.filterValues { + $0 > 1 + }.done { + // $0 => [2,3] + } + */ + func filterValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ isIncluded: @escaping (T.Iterator.Element) -> Bool) -> Promise<[T.Iterator.Element]> { + return map(on: on, flags: flags) { + $0.filter(isIncluded) + } + } +} + +public extension Thenable where T: Collection { + /// - Returns: a promise fulfilled with the first value of this `Collection` or, if empty, a promise rejected with PMKError.emptySequence. + var firstValue: Promise { + return map(on: nil) { aa in + if let a1 = aa.first { + return a1 + } else { + throw PMKError.emptySequence + } + } + } + + func firstValue(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, where test: @escaping (T.Iterator.Element) -> Bool) -> Promise { + return map(on: on, flags: flags) { + for x in $0 where test(x) { + return x + } + throw PMKError.emptySequence + } + } + + /// - Returns: a promise fulfilled with the last value of this `Collection` or, if empty, a promise rejected with PMKError.emptySequence. + var lastValue: Promise { + return map(on: nil) { aa in + if aa.isEmpty { + throw PMKError.emptySequence + } else { + let i = aa.index(aa.endIndex, offsetBy: -1) + return aa[i] + } + } + } +} + +public extension Thenable where T: Sequence, T.Iterator.Element: Comparable { + /// - Returns: a promise fulfilled with the sorted values of this `Sequence`. + func sortedValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil) -> Promise<[T.Iterator.Element]> { + return map(on: on, flags: flags){ $0.sorted() } + } +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/after.m b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/after.m new file mode 100644 index 000000000..25f9966fc --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/after.m @@ -0,0 +1,14 @@ +#import "AnyPromise.h" +@import Dispatch; +@import Foundation.NSDate; +@import Foundation.NSValue; + +/// @return A promise that fulfills after the specified duration. +AnyPromise *PMKAfter(NSTimeInterval duration) { + return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { + dispatch_time_t time = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(duration * NSEC_PER_SEC)); + dispatch_after(time, dispatch_get_global_queue(0, 0), ^{ + resolve(@(duration)); + }); + }]; +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/after.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/after.swift new file mode 100644 index 000000000..cb29bb8ff --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/after.swift @@ -0,0 +1,46 @@ +import struct Foundation.TimeInterval +import Dispatch + +/** + after(.seconds(2)).then { + //… + } + +- Returns: A guarantee that resolves after the specified duration. +*/ +public func after(seconds: TimeInterval) -> Guarantee { + let (rg, seal) = Guarantee.pending() + let when = DispatchTime.now() + seconds +#if swift(>=4.0) + q.asyncAfter(deadline: when) { seal(()) } +#else + q.asyncAfter(deadline: when, execute: seal) +#endif + return rg +} + +/** + after(seconds: 1.5).then { + //… + } + + - Returns: A guarantee that resolves after the specified duration. +*/ +public func after(_ interval: DispatchTimeInterval) -> Guarantee { + let (rg, seal) = Guarantee.pending() + let when = DispatchTime.now() + interval +#if swift(>=4.0) + q.asyncAfter(deadline: when) { seal(()) } +#else + q.asyncAfter(deadline: when, execute: seal) +#endif + return rg +} + +private var q: DispatchQueue { + if #available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) { + return DispatchQueue.global(qos: .default) + } else { + return DispatchQueue.global(priority: .default) + } +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/dispatch_promise.m b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/dispatch_promise.m new file mode 100644 index 000000000..ecb89f711 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/dispatch_promise.m @@ -0,0 +1,10 @@ +#import "AnyPromise.h" +@import Dispatch; + +AnyPromise *dispatch_promise_on(dispatch_queue_t queue, id block) { + return [AnyPromise promiseWithValue:nil].thenOn(queue, block); +} + +AnyPromise *dispatch_promise(id block) { + return dispatch_promise_on(dispatch_get_global_queue(0, 0), block); +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/firstly.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/firstly.swift new file mode 100644 index 000000000..a5b477da1 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/firstly.swift @@ -0,0 +1,39 @@ +import Dispatch + +/** + Judicious use of `firstly` *may* make chains more readable. + + Compare: + + URLSession.shared.dataTask(url: url1).then { + URLSession.shared.dataTask(url: url2) + }.then { + URLSession.shared.dataTask(url: url3) + } + + With: + + firstly { + URLSession.shared.dataTask(url: url1) + }.then { + URLSession.shared.dataTask(url: url2) + }.then { + URLSession.shared.dataTask(url: url3) + } + + - Note: the block you pass excecutes immediately on the current thread/queue. + */ +public func firstly(execute body: () throws -> U) -> Promise { + do { + let rp = Promise(.pending) + try body().pipe(to: rp.box.seal) + return rp + } catch { + return Promise(error: error) + } +} + +/// - See: firstly() +public func firstly(execute body: () -> Guarantee) -> Guarantee { + return body() +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/fwd.h b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/fwd.h new file mode 100644 index 000000000..480d1480e --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/fwd.h @@ -0,0 +1,165 @@ +#import +#import + +@class AnyPromise; +extern NSString * __nonnull const PMKErrorDomain; + +#define PMKFailingPromiseIndexKey @"PMKFailingPromiseIndexKey" +#define PMKJoinPromisesKey @"PMKJoinPromisesKey" + +#define PMKUnexpectedError 1l +#define PMKInvalidUsageError 3l +#define PMKAccessDeniedError 4l +#define PMKOperationFailed 8l +#define PMKTaskError 9l +#define PMKJoinError 10l + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + @return A new promise that resolves after the specified duration. + + @parameter duration The duration in seconds to wait before this promise is resolve. + + For example: + + PMKAfter(1).then(^{ + //… + }); +*/ +extern AnyPromise * __nonnull PMKAfter(NSTimeInterval duration) NS_REFINED_FOR_SWIFT; + + + +/** + `when` is a mechanism for waiting more than one asynchronous task and responding when they are all complete. + + `PMKWhen` accepts varied input. If an array is passed then when those promises fulfill, when’s promise fulfills with an array of fulfillment values. If a dictionary is passed then the same occurs, but when’s promise fulfills with a dictionary of fulfillments keyed as per the input. + + Interestingly, if a single promise is passed then when waits on that single promise, and if a single non-promise object is passed then when fulfills immediately with that object. If the array or dictionary that is passed contains objects that are not promises, then these objects are considered fulfilled promises. The reason we do this is to allow a pattern know as "abstracting away asynchronicity". + + If *any* of the provided promises reject, the returned promise is immediately rejected with that promise’s rejection. The error’s `userInfo` object is supplemented with `PMKFailingPromiseIndexKey`. + + For example: + + PMKWhen(@[promise1, promise2]).then(^(NSArray *results){ + //… + }); + + @warning *Important* In the event of rejection the other promises will continue to resolve and as per any other promise will either fulfill or reject. This is the right pattern for `getter` style asynchronous tasks, but often for `setter` tasks (eg. storing data on a server), you most likely will need to wait on all tasks and then act based on which have succeeded and which have failed. In such situations use `PMKJoin`. + + @param input The input upon which to wait before resolving this promise. + + @return A promise that is resolved with either: + + 1. An array of values from the provided array of promises. + 2. The value from the provided promise. + 3. The provided non-promise object. + + @see PMKJoin + +*/ +extern AnyPromise * __nonnull PMKWhen(id __nonnull input) NS_REFINED_FOR_SWIFT; + + + +/** + Creates a new promise that resolves only when all provided promises have resolved. + + Typically, you should use `PMKWhen`. + + For example: + + PMKJoin(@[promise1, promise2]).then(^(NSArray *resultingValues){ + //… + }).catch(^(NSError *error){ + assert(error.domain == PMKErrorDomain); + assert(error.code == PMKJoinError); + + NSArray *promises = error.userInfo[PMKJoinPromisesKey]; + for (AnyPromise *promise in promises) { + if (promise.rejected) { + //… + } + } + }); + + @param promises An array of promises. + + @return A promise that thens three parameters: + + 1) An array of mixed values and errors from the resolved input. + 2) An array of values from the promises that fulfilled. + 3) An array of errors from the promises that rejected or nil if all promises fulfilled. + + @see when +*/ +AnyPromise *__nonnull PMKJoin(NSArray * __nonnull promises) NS_REFINED_FOR_SWIFT; + + + +/** + Literally hangs this thread until the promise has resolved. + + Do not use hang… unless you are testing, playing or debugging. + + If you use it in production code I will literally and honestly cry like a child. + + @return The resolved value of the promise. + + @warning T SAFE. IT IS NOT SAFE. IT IS NOT SAFE. IT IS NOT SAFE. IT IS NO +*/ +extern id __nullable PMKHang(AnyPromise * __nonnull promise); + + + +/** + Executes the provided block on a background queue. + + dispatch_promise is a convenient way to start a promise chain where the + first step needs to run synchronously on a background queue. + + dispatch_promise(^{ + return md5(input); + }).then(^(NSString *md5){ + NSLog(@"md5: %@", md5); + }); + + @param block The block to be executed in the background. Returning an `NSError` will reject the promise, everything else (including void) fulfills the promise. + + @return A promise resolved with the return value of the provided block. + + @see dispatch_async +*/ +extern AnyPromise * __nonnull dispatch_promise(id __nonnull block) NS_SWIFT_UNAVAILABLE("Use our `DispatchQueue.async` override instead"); + + + +/** + Executes the provided block on the specified background queue. + + dispatch_promise_on(myDispatchQueue, ^{ + return md5(input); + }).then(^(NSString *md5){ + NSLog(@"md5: %@", md5); + }); + + @param block The block to be executed in the background. Returning an `NSError` will reject the promise, everything else (including void) fulfills the promise. + + @return A promise resolved with the return value of the provided block. + + @see dispatch_promise +*/ +extern AnyPromise * __nonnull dispatch_promise_on(dispatch_queue_t __nonnull queue, id __nonnull block) NS_SWIFT_UNAVAILABLE("Use our `DispatchQueue.async` override instead"); + +/** + Returns a new promise that resolves when the value of the first resolved promise in the provided array of promises. +*/ +extern AnyPromise * __nonnull PMKRace(NSArray * __nonnull promises) NS_REFINED_FOR_SWIFT; + +#ifdef __cplusplus +} // Extern C +#endif diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/hang.m b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/hang.m new file mode 100644 index 000000000..913339e51 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/hang.m @@ -0,0 +1,29 @@ +#import "AnyPromise.h" +#import "AnyPromise+Private.h" +@import CoreFoundation.CFRunLoop; + +/** + Suspends the active thread waiting on the provided promise. + + @return The value of the provided promise once resolved. + */ +id PMKHang(AnyPromise *promise) { + if (promise.pending) { + static CFRunLoopSourceContext context; + + CFRunLoopRef runLoop = CFRunLoopGetCurrent(); + CFRunLoopSourceRef runLoopSource = CFRunLoopSourceCreate(NULL, 0, &context); + CFRunLoopAddSource(runLoop, runLoopSource, kCFRunLoopDefaultMode); + + promise.ensure(^{ + CFRunLoopStop(runLoop); + }); + while (promise.pending) { + CFRunLoopRun(); + } + CFRunLoopRemoveSource(runLoop, runLoopSource, kCFRunLoopDefaultMode); + CFRelease(runLoopSource); + } + + return promise.value; +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/hang.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/hang.swift new file mode 100644 index 000000000..f974c2faf --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/hang.swift @@ -0,0 +1,51 @@ +import Foundation +import CoreFoundation + +/** + Runs the active run-loop until the provided promise resolves. + + This is for debug and is not a generally safe function to use in your applications. We mostly provide it for use in testing environments. + + Still if you like, study how it works (by reading the sources!) and use at your own risk. + + - Returns: The value of the resolved promise + - Throws: An error, should the promise be rejected + - See: `wait()` +*/ +public func hang(_ promise: Promise) throws -> T { +#if os(Linux) || os(Android) + // isMainThread is not yet implemented on Linux. + let runLoopModeRaw = RunLoopMode.defaultRunLoopMode.rawValue._bridgeToObjectiveC() + let runLoopMode: CFString = unsafeBitCast(runLoopModeRaw, to: CFString.self) +#else + guard Thread.isMainThread else { + // hang doesn't make sense on threads that aren't the main thread. + // use `.wait()` on those threads. + fatalError("Only call hang() on the main thread.") + } + let runLoopMode: CFRunLoopMode = CFRunLoopMode.defaultMode +#endif + + if promise.isPending { + var context = CFRunLoopSourceContext() + let runLoop = CFRunLoopGetCurrent() + let runLoopSource = CFRunLoopSourceCreate(nil, 0, &context) + CFRunLoopAddSource(runLoop, runLoopSource, runLoopMode) + + _ = promise.ensure { + CFRunLoopStop(runLoop) + } + + while promise.isPending { + CFRunLoopRun() + } + CFRunLoopRemoveSource(runLoop, runLoopSource, runLoopMode) + } + + switch promise.result! { + case .rejected(let error): + throw error + case .fulfilled(let value): + return value + } +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/join.m b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/join.m new file mode 100644 index 000000000..979f092df --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/join.m @@ -0,0 +1,54 @@ +@import Foundation.NSDictionary; +#import "AnyPromise+Private.h" +#import +@import Foundation.NSError; +@import Foundation.NSNull; +#import "PromiseKit.h" +#import + +/** + Waits on all provided promises. + + `PMKWhen` rejects as soon as one of the provided promises rejects. `PMKJoin` waits on all provided promises, then rejects if any of those promises rejects, otherwise it fulfills with values from the provided promises. + + - Returns: A new promise that resolves once all the provided promises resolve. +*/ +AnyPromise *PMKJoin(NSArray *promises) { + if (promises == nil) + return [AnyPromise promiseWithValue:[NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"PMKJoin(nil)"}]]; + + if (promises.count == 0) + return [AnyPromise promiseWithValue:promises]; + + return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { + NSPointerArray *results = NSPointerArrayMake(promises.count); + __block atomic_int countdown = promises.count; + __block BOOL rejected = NO; + + [promises enumerateObjectsUsingBlock:^(AnyPromise *promise, NSUInteger ii, BOOL *stop) { + [promise __pipe:^(id value) { + + if (IsError(value)) { + rejected = YES; + } + + //FIXME surely this isn't thread safe on multiple cores? + [results replacePointerAtIndex:ii withPointer:(__bridge void *)(value ?: [NSNull null])]; + + atomic_fetch_sub_explicit(&countdown, 1, memory_order_relaxed); + + if (countdown == 0) { + if (!rejected) { + resolve(results.allObjects); + } else { + id userInfo = @{PMKJoinPromisesKey: promises}; + id err = [NSError errorWithDomain:PMKErrorDomain code:PMKJoinError userInfo:userInfo]; + resolve(err); + } + } + }]; + + (void) stop; + }]; + }]; +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/race.m b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/race.m new file mode 100644 index 000000000..cab38ec19 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/race.m @@ -0,0 +1,9 @@ +#import "AnyPromise+Private.h" + +AnyPromise *PMKRace(NSArray *promises) { + return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { + for (AnyPromise *promise in promises) { + [promise __pipe:resolve]; + } + }]; +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/race.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/race.swift new file mode 100644 index 000000000..2b817de26 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/race.swift @@ -0,0 +1,57 @@ +@inline(__always) +private func _race(_ thenables: [U]) -> Promise { + let rp = Promise(.pending) + for thenable in thenables { + thenable.pipe(to: rp.box.seal) + } + return rp +} + +/** + Waits for one promise to resolve + + race(promise1, promise2, promise3).then { winner in + //… + } + + - Returns: The promise that resolves first + - Warning: If the first resolution is a rejection, the returned promise is rejected +*/ +public func race(_ thenables: U...) -> Promise { + return _race(thenables) +} + +/** + Waits for one promise to resolve + + race(promise1, promise2, promise3).then { winner in + //… + } + + - Returns: The promise that resolves first + - Warning: If the first resolution is a rejection, the returned promise is rejected + - Remark: If the provided array is empty the returned promise is rejected with PMKError.badInput +*/ +public func race(_ thenables: [U]) -> Promise { + guard !thenables.isEmpty else { + return Promise(error: PMKError.badInput) + } + return _race(thenables) +} + +/** + Waits for one guarantee to resolve + + race(promise1, promise2, promise3).then { winner in + //… + } + + - Returns: The guarantee that resolves first +*/ +public func race(_ guarantees: Guarantee...) -> Guarantee { + let rg = Guarantee(.pending) + for guarantee in guarantees { + guarantee.pipe(to: rg.box.seal) + } + return rg +} diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/when.m b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/when.m new file mode 100644 index 000000000..43e5feddc --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/when.m @@ -0,0 +1,107 @@ +@import Foundation.NSDictionary; +#import "AnyPromise+Private.h" +@import Foundation.NSProgress; +#import +@import Foundation.NSError; +@import Foundation.NSNull; +#import "PromiseKit.h" + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +// ^^ OSAtomicDecrement32 is deprecated on watchOS + + +// NSProgress resources: +// * https://robots.thoughtbot.com/asynchronous-nsprogress +// * http://oleb.net/blog/2014/03/nsprogress/ +// NSProgress! Beware! +// * https://github.com/AFNetworking/AFNetworking/issues/2261 + +/** + Wait for all promises in a set to resolve. + + @note If *any* of the provided promises reject, the returned promise is immediately rejected with that error. + @warning In the event of rejection the other promises will continue to resolve and, as per any other promise, will either fulfill or reject. This is the right pattern for `getter` style asynchronous tasks, but often for `setter` tasks (eg. storing data on a server), you most likely will need to wait on all tasks and then act based on which have succeeded and which have failed, in such situations use `when(resolved:)`. + @param promises The promises upon which to wait before the returned promise resolves. + @note PMKWhen provides NSProgress. + @return A new promise that resolves when all the provided promises fulfill or one of the provided promises rejects. +*/ +AnyPromise *PMKWhen(id promises) { + if (promises == nil) + return [AnyPromise promiseWithValue:[NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"PMKWhen(nil)"}]]; + + if ([promises isKindOfClass:[NSArray class]] || [promises isKindOfClass:[NSDictionary class]]) { + if ([promises count] == 0) + return [AnyPromise promiseWithValue:promises]; + } else if ([promises isKindOfClass:[AnyPromise class]]) { + promises = @[promises]; + } else { + return [AnyPromise promiseWithValue:promises]; + } + +#ifndef PMKDisableProgress + NSProgress *progress = [NSProgress progressWithTotalUnitCount:(int64_t)[promises count]]; + progress.pausable = NO; + progress.cancellable = NO; +#else + struct PMKProgress { + int completedUnitCount; + int totalUnitCount; + double fractionCompleted; + }; + __block struct PMKProgress progress; +#endif + + __block int32_t countdown = (int32_t)[promises count]; + BOOL const isdict = [promises isKindOfClass:[NSDictionary class]]; + + return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { + NSInteger index = 0; + + for (__strong id key in promises) { + AnyPromise *promise = isdict ? promises[key] : key; + if (!isdict) key = @(index); + + if (![promise isKindOfClass:[AnyPromise class]]) + promise = [AnyPromise promiseWithValue:promise]; + + [promise __pipe:^(id value){ + if (progress.fractionCompleted >= 1) + return; + + if (IsError(value)) { + progress.completedUnitCount = progress.totalUnitCount; + + NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:[(NSError *)value userInfo] ?: @{}]; + userInfo[PMKFailingPromiseIndexKey] = key; + [userInfo setObject:value forKey:NSUnderlyingErrorKey]; + id err = [[NSError alloc] initWithDomain:[value domain] code:[value code] userInfo:userInfo]; + resolve(err); + } + else if (OSAtomicDecrement32(&countdown) == 0) { + progress.completedUnitCount = progress.totalUnitCount; + + id results; + if (isdict) { + results = [NSMutableDictionary new]; + for (id key in promises) { + id promise = promises[key]; + results[key] = IsPromise(promise) ? ((AnyPromise *)promise).value : promise; + } + } else { + results = [NSMutableArray new]; + for (AnyPromise *promise in promises) { + id value = IsPromise(promise) ? (promise.value ?: [NSNull null]) : promise; + [results addObject:value]; + } + } + resolve(results); + } else { + progress.completedUnitCount++; + } + }]; + } + }]; +} + +#pragma GCC diagnostic pop diff --git a/Example/web3swiftBrowser/Pods/PromiseKit/Sources/when.swift b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/when.swift new file mode 100644 index 000000000..0913c64f3 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/PromiseKit/Sources/when.swift @@ -0,0 +1,262 @@ +import Foundation +import Dispatch + +private func _when(_ thenables: [U]) -> Promise { + var countdown = thenables.count + guard countdown > 0 else { + return .value(Void()) + } + + let rp = Promise(.pending) + +#if PMKDisableProgress || os(Linux) + var progress: (completedUnitCount: Int, totalUnitCount: Int) = (0, 0) +#else + let progress = Progress(totalUnitCount: Int64(thenables.count)) + progress.isCancellable = false + progress.isPausable = false +#endif + + let barrier = DispatchQueue(label: "org.promisekit.barrier.when", attributes: .concurrent) + + for promise in thenables { + promise.pipe { result in + barrier.sync(flags: .barrier) { + switch result { + case .rejected(let error): + if rp.isPending { + progress.completedUnitCount = progress.totalUnitCount + rp.box.seal(.rejected(error)) + } + case .fulfilled: + guard rp.isPending else { return } + progress.completedUnitCount += 1 + countdown -= 1 + if countdown == 0 { + rp.box.seal(.fulfilled(())) + } + } + } + } + } + + return rp +} + +/** + Wait for all promises in a set to fulfill. + + For example: + + when(fulfilled: promise1, promise2).then { results in + //… + }.catch { error in + switch error { + case URLError.notConnectedToInternet: + //… + case CLError.denied: + //… + } + } + + - Note: If *any* of the provided promises reject, the returned promise is immediately rejected with that error. + - Warning: In the event of rejection the other promises will continue to resolve and, as per any other promise, will either fulfill or reject. This is the right pattern for `getter` style asynchronous tasks, but often for `setter` tasks (eg. storing data on a server), you most likely will need to wait on all tasks and then act based on which have succeeded and which have failed, in such situations use `when(resolved:)`. + - Parameter promises: The promises upon which to wait before the returned promise resolves. + - Returns: A new promise that resolves when all the provided promises fulfill or one of the provided promises rejects. + - Note: `when` provides `NSProgress`. + - SeeAlso: `when(resolved:)` +*/ +public func when(fulfilled thenables: [U]) -> Promise<[U.T]> { + return _when(thenables).map(on: nil) { thenables.map{ $0.value! } } +} + +/// Wait for all promises in a set to fulfill. +public func when(fulfilled promises: U...) -> Promise where U.T == Void { + return _when(promises) +} + +/// Wait for all promises in a set to fulfill. +public func when(fulfilled promises: [U]) -> Promise where U.T == Void { + return _when(promises) +} + +/// Wait for all promises in a set to fulfill. +public func when(fulfilled pu: U, _ pv: V) -> Promise<(U.T, V.T)> { + return _when([pu.asVoid(), pv.asVoid()]).map(on: nil) { (pu.value!, pv.value!) } +} + +/// Wait for all promises in a set to fulfill. +public func when(fulfilled pu: U, _ pv: V, _ pw: W) -> Promise<(U.T, V.T, W.T)> { + return _when([pu.asVoid(), pv.asVoid(), pw.asVoid()]).map(on: nil) { (pu.value!, pv.value!, pw.value!) } +} + +/// Wait for all promises in a set to fulfill. +public func when(fulfilled pu: U, _ pv: V, _ pw: W, _ px: X) -> Promise<(U.T, V.T, W.T, X.T)> { + return _when([pu.asVoid(), pv.asVoid(), pw.asVoid(), px.asVoid()]).map(on: nil) { (pu.value!, pv.value!, pw.value!, px.value!) } +} + +/// Wait for all promises in a set to fulfill. +public func when(fulfilled pu: U, _ pv: V, _ pw: W, _ px: X, _ py: Y) -> Promise<(U.T, V.T, W.T, X.T, Y.T)> { + return _when([pu.asVoid(), pv.asVoid(), pw.asVoid(), px.asVoid(), py.asVoid()]).map(on: nil) { (pu.value!, pv.value!, pw.value!, px.value!, py.value!) } +} + +/** + Generate promises at a limited rate and wait for all to fulfill. + + For example: + + func downloadFile(url: URL) -> Promise { + // ... + } + + let urls: [URL] = /*…*/ + let urlGenerator = urls.makeIterator() + + let generator = AnyIterator> { + guard url = urlGenerator.next() else { + return nil + } + return downloadFile(url) + } + + when(generator, concurrently: 3).done { datas in + // ... + } + + No more than three downloads will occur simultaneously. + + - Note: The generator is called *serially* on a *background* queue. + - Warning: Refer to the warnings on `when(fulfilled:)` + - Parameter promiseGenerator: Generator of promises. + - Returns: A new promise that resolves when all the provided promises fulfill or one of the provided promises rejects. + - SeeAlso: `when(resolved:)` + */ + +public func when(fulfilled promiseIterator: It, concurrently: Int) -> Promise<[It.Element.T]> where It.Element: Thenable { + + guard concurrently > 0 else { + return Promise(error: PMKError.badInput) + } + + var generator = promiseIterator + var root = Promise<[It.Element.T]>.pending() + var pendingPromises = 0 + var promises: [It.Element] = [] + + let barrier = DispatchQueue(label: "org.promisekit.barrier.when", attributes: [.concurrent]) + + func dequeue() { + guard root.promise.isPending else { return } // don’t continue dequeueing if root has been rejected + + var shouldDequeue = false + barrier.sync { + shouldDequeue = pendingPromises < concurrently + } + guard shouldDequeue else { return } + + var index: Int! + var promise: It.Element! + + barrier.sync(flags: .barrier) { + guard let next = generator.next() else { return } + + promise = next + index = promises.count + + pendingPromises += 1 + promises.append(next) + } + + func testDone() { + barrier.sync { + if pendingPromises == 0 { + #if !swift(>=3.3) || (swift(>=4) && !swift(>=4.1)) + root.resolver.fulfill(promises.flatMap{ $0.value }) + #else + root.resolver.fulfill(promises.compactMap{ $0.value }) + #endif + } + } + } + + guard promise != nil else { + return testDone() + } + + promise.pipe { resolution in + barrier.sync(flags: .barrier) { + pendingPromises -= 1 + } + + switch resolution { + case .fulfilled: + dequeue() + testDone() + case .rejected(let error): + root.resolver.reject(error) + } + } + + dequeue() + } + + dequeue() + + return root.promise +} + +/** + Waits on all provided promises. + + `when(fulfilled:)` rejects as soon as one of the provided promises rejects. `when(resolved:)` waits on all provided promises whatever their result, and then provides an array of `Result` so you can individually inspect the results. As a consequence this function returns a `Guarantee`, ie. errors are lifted from the individual promises into the results array of the returned `Guarantee`. + + when(resolved: promise1, promise2, promise3).then { results in + for result in results where case .fulfilled(let value) { + //… + } + }.catch { error in + // invalid! Never rejects + } + + - Returns: A new promise that resolves once all the provided promises resolve. The array is ordered the same as the input, ie. the result order is *not* resolution order. + - Note: we do not provide tuple variants for `when(resolved:)` but will accept a pull-request + - Remark: Doesn't take Thenable due to protocol `associatedtype` paradox +*/ +public func when(resolved promises: Promise...) -> Guarantee<[Result]> { + return when(resolved: promises) +} + +/// - See: `when(resolved: Promise...)` +public func when(resolved promises: [Promise]) -> Guarantee<[Result]> { + guard !promises.isEmpty else { + return .value([]) + } + + var countdown = promises.count + let barrier = DispatchQueue(label: "org.promisekit.barrier.join", attributes: .concurrent) + + let rg = Guarantee<[Result]>(.pending) + for promise in promises { + promise.pipe { result in + barrier.sync(flags: .barrier) { + countdown -= 1 + } + barrier.sync { + if countdown == 0 { + rg.box.seal(promises.map{ $0.result! }) + } + } + } + } + return rg +} + +/// Waits on all provided Guarantees. +public func when(_ guarantees: Guarantee...) -> Guarantee { + return when(guarantees: guarantees) +} + +// Waits on all provided Guarantees. +public func when(guarantees: [Guarantee]) -> Guarantee { + return when(fulfilled: guarantees).recover{ _ in }.asVoid() +} diff --git a/Example/web3swiftExample/Pods/Result/LICENSE b/Example/web3swiftBrowser/Pods/SipHash/LICENSE.md similarity index 95% rename from Example/web3swiftExample/Pods/Result/LICENSE rename to Example/web3swiftBrowser/Pods/SipHash/LICENSE.md index 3026ee190..07595838a 100644 --- a/Example/web3swiftExample/Pods/Result/LICENSE +++ b/Example/web3swiftBrowser/Pods/SipHash/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Rob Rix +Copyright (c) 2016 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 @@ -18,4 +18,4 @@ 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. \ No newline at end of file +SOFTWARE. diff --git a/Example/web3swiftBrowser/Pods/SipHash/README.md b/Example/web3swiftBrowser/Pods/SipHash/README.md new file mode 100644 index 000000000..49fe93e0f --- /dev/null +++ b/Example/web3swiftBrowser/Pods/SipHash/README.md @@ -0,0 +1,161 @@ +# SipHash + +[![Swift 4.0](https://img.shields.io/badge/Swift-4-blue.svg)](https://swift.org) +[![License](https://img.shields.io/badge/licence-MIT-blue.svg)](https://github.com/attaswift/SipHash/blob/master/LICENSE.md) +[![Platform](https://img.shields.io/badge/platforms-macOS%20∙%20iOS%20∙%20watchOS%20∙%20tvOS%20∙%20Linux-blue.svg)](https://developer.apple.com/platforms/) + +[![Build Status](https://travis-ci.org/attaswift/SipHash.svg?branch=master)](https://travis-ci.org/attaswift/SipHash) +[![Code Coverage](https://codecov.io/github/attaswift/SipHash/coverage.svg?branch=master)](https://codecov.io/github/attaswift/SipHash?branch=master) + +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage) +[![CocoaPod Version](https://img.shields.io/cocoapods/v/SipHash.svg)](http://cocoapods.org/pods/SipHash) + +`SipHash` is a pure Swift implementation of the [SipHash] hashing algorithm designed by +Jean-Philippe Aumasson and Daniel J. Bernstein in 2012: + +[SipHash]: https://131002.net/siphash + +> SipHash is a family of pseudorandom functions (a.k.a. keyed hash functions) optimized for speed on short messages. +> +> Target applications include network traffic authentication and defense against hash-flooding DoS attacks. +> +> SipHash is secure, fast, and simple (for real): +> - SipHash is simpler and faster than previous cryptographic algorithms (e.g. MACs based on universal hashing) +> - SipHash is competitive in performance with insecure non-cryptographic algorithms (e.g. MurmurHash) +> +> -- [131002.net][SipHash] + +SipHash has a variety of flavors; this package implements the one called SipHash-2-4. + +Note that the Swift Standard Library [already includes an implementation][stdlib] of SipHash-2-4 and SipHash-1-3; +however, the APIs are currently private and not available for use outside of stdlib. This package provides an +independent implementation that's available for use in third-party code. + +[stdlib]: https://github.com/apple/swift/blob/master/stdlib/public/core/SipHash.swift.gyb + +The current release of SipHash requires Swift 4. + +## Sample Code + +```swift +import SipHash + +// `SipHashable` is like `Hashable`, but simpler. +struct Book: SipHashable { + let title: String + let pageCount: Int + + // You need to implement this method instead of `hashValue`. + func appendHashes(to hasher: inout SipHasher) { + // Simply append the fields you want to include in the hash. + hasher.append(title) + hasher.append(pageCount) + } + + static func ==(left: Book, right: Book) -> Bool { + return left.title == right.title && left.pageCount == right.pageCount + } +} + +// You can now use Books in sets or as dictionary keys. +let book = Book(title: "The Colour of Magic", pageCount: 206) +let books: Set = [book] + + +// If you prefer to do so, you may also create & use hashers directly. +var hasher = SipHasher() +hasher.add(book) +hasher.add(42) +// Finalizing the hasher extracts the hash value and invalidates it. +let hash = hasher.finalize() +``` + +## Why Would I Use SipHash? + +Writing a good implementation of `hashValue` is hard, even if we just need to combine the values of a couple of fields. +We need to come up with a deterministic function that blends the field values well, producing a fixed-width +result without too many collisions on typical inputs. But how many collisions are "too many"? Do we even know what +our "typical inputs" look like? For me, the answer to both of these questions is usually "I have absolutely no idea", +and I bet you have the same problem. + +Thus, verifying that our `hashValue` implementations work well is an exercise in frustration. + +We need to somehow check the properties of the hash function by looking at its behavior given various inputs. +It is easy enough to write tests for the requirement that equal values have equal `hashValues`. +But verifying that the hash has few collisions requires making some assumptions on the +statistical properties of "typical" inputs -- and even if we'd be somehow confident enough to do that, writing the code +to do it is way too complicated. + +Instead of rolling your own ad-hoc hash function, why not just use an algorithm designed specifically to blend data +into a hash? Using a standardized algorithm means we don't need to worry about collision behavior any more: if the +algorithm was designed well, we'll always have good results. + +The SipHash algorithm is a particularly good choice for hashing. It implements a 64-bit cryptographic +message-authentication code (MAC) with a 256-bit internal state initialized from a 128-bit secret key that's (typically) +randomly generated for each execution of the binary. +SipHash is designed to protect against hash collision attacks, while remaining simple to use and fast. +It is already used by Perl, Python, Ruby, Rust, and even Swift itself -- which is why the documentation of `Hashable` +explicitly warns that the value returned by `hashValue` may be different across executions. + +The standard library already implements SipHash, but the implementation is private. (It is technically available +for use, but it is not formally part of the stdlib API, and it is subject to change/removal across even point releases.) +I expect a refactored version of stdlib's SipHash will become available as public API in a future Swift release. +But while we're waiting for that, this package provides an alternative implementation that is available today. + +## Is this code full of bugs? + +Indubitably. Please report all bugs you find! + +The package has 100% unit test coverage. Unfortunately this doesn't tell you much about its reliability in practice. + +The test suite verifies that the package generates values that match the test vectors supplied by SipHash's original +authors, which makes me reasonably confident that this package implements SipHash correctly. +Obviously, your mileage may vary. + +## Reference docs + +[Nicely formatted reference docs][docs] are available courtesy of [Jazzy]. + +[docs]: https://attaswift.github.io/SipHash/ +[Jazzy]: https://github.com/realm/jazzy + +## Installation + +### CocoaPods + +If you use CocoaPods, you can start using `SipHash` by including it as a dependency in your `Podfile`: + +``` +pod 'SipHash', '~> 1.2' +``` + +### Carthage + +For Carthage, add the following line to your `Cartfile`: + +``` +github "attaswift/SipHash" ~> 1.2 +``` + +### Swift Package Manager + +For Swift Package Manager, add `SipHash` to the dependencies list inside your `Package.swift` file: + +``` +import PackageDescription + +let package = Package( + name: "MyPackage", + dependencies: [ + .Package(url: "https://github.com/attaswift/SipHash.git", from: "1.2.1") + ] +) +``` + +### Standalone Development + +If you don't use a dependency manager, you need to clone this repo somewhere near your project, and add a reference to `SipHash.xcodeproj` to your project's `xcworkspace`. You can put the clone of SipHash wherever you like on disk, but it is a good idea to set it up as a submodule of your app's top-level Git repository. + +To link your application binary with SipHash, just add `SipHash.framework` from the SipHash project to the Embedded Binaries section of your app target's General page in Xcode. As long as the SipHash project file is referenced in your workspace, this framework will be listed in the "Choose items to add" sheet that opens when you click on the "+" button of your target's Embedded Binaries list. + +There is no need to do any additional setup beyond adding the framework targets to Embedded Binaries. diff --git a/Example/web3swiftBrowser/Pods/SipHash/SipHash/Primitive Types.swift b/Example/web3swiftBrowser/Pods/SipHash/SipHash/Primitive Types.swift new file mode 100644 index 000000000..45824562a --- /dev/null +++ b/Example/web3swiftBrowser/Pods/SipHash/SipHash/Primitive Types.swift @@ -0,0 +1,171 @@ +// +// Primitive Types.swift +// SipHash +// +// Created by Károly Lőrentey on 2016-11-14. +// Copyright © 2016-2017 Károly Lőrentey. +// + +extension SipHasher { + //MARK: Appending buffer slices + + /// Add the contents of `slice` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ slice: Slice) { + self.append(UnsafeRawBufferPointer(rebasing: slice)) + } + + //MARK: Appending Integers + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: Bool) { + var data = value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: Int) { + var data = value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: UInt) { + var data = value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: Int64) { + var data = value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: UInt64) { + var data = value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: Int32) { + var data = value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: UInt32) { + var data = value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: Int16) { + var data = value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: UInt16) { + var data = value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: Int8) { + var data = value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: UInt8) { + var data = value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } +} + +extension SipHasher { + //MARK: Appending Floating Point Types + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: Float) { + var data = value.isZero ? 0.0 : value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: Double) { + var data = value.isZero ? 0.0 : value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + + #if arch(i386) || arch(x86_64) + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: Float80) { + var data = value.isZero ? 0.0 : value + // Float80 is 16 bytes wide but the last 6 are uninitialized. + let buffer = UnsafeRawBufferPointer(start: &data, count: 10) + append(buffer) + } + #endif +} + +#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) + import CoreGraphics + + extension SipHasher { + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: CGFloat) { + var data = value.isZero ? 0.0 : value + append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) + } + } +#endif + +extension SipHasher { + //MARK: Appending Optionals + + /// Add `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: Value?) { + if let value = value { + self.append(1 as UInt8) + self.append(value) + } + else { + self.append(0 as UInt8) + } + } +} diff --git a/Example/web3swiftBrowser/Pods/SipHash/SipHash/RandomUInt64.swift b/Example/web3swiftBrowser/Pods/SipHash/SipHash/RandomUInt64.swift new file mode 100644 index 000000000..d55eb0bdd --- /dev/null +++ b/Example/web3swiftBrowser/Pods/SipHash/SipHash/RandomUInt64.swift @@ -0,0 +1,39 @@ +// +// RandomUInt64.swift +// SipHash +// +// Created by Károly Lőrentey on 2016-11-14. +// Copyright © 2016-2017 Károly Lőrentey. +// + +#if os(iOS) || os(macOS) || os(watchOS) || os(tvOS) + import Darwin + + func randomUInt64() -> UInt64 { + return UInt64(arc4random()) << 32 | UInt64(arc4random()) + } +#elseif os(Linux) || os(FreeBSD) + import Glibc + + func randomUInt64() -> UInt64 { + var randomArray = [UInt8](repeating: 0, count: 8) + + let fd = open("/dev/urandom", O_RDONLY) + defer { + close(fd) + } + + let _ = read(fd, &randomArray, MemoryLayout.size * 8) + + var randomInt: UInt64 = 0 + for i in 0.. UInt64 { + fatalError("Unsupported platform") + } +#endif diff --git a/Example/web3swiftBrowser/Pods/SipHash/SipHash/SipHashable.swift b/Example/web3swiftBrowser/Pods/SipHash/SipHash/SipHashable.swift new file mode 100644 index 000000000..5811717c4 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/SipHash/SipHash/SipHashable.swift @@ -0,0 +1,65 @@ +// +// SipHashable.swift +// SipHash +// +// Created by Károly Lőrentey on 2016-11-14. +// Copyright © 2016-2017 Károly Lőrentey. +// + +/// A variant of `Hashable` that makes it simpler to generate good hash values. +/// +/// Instead of `hashValue`, you need to implement `addHashes`, adding +/// data that should contribute to the hash to the supplied hasher. +/// The hasher takes care of blending the supplied data together. +/// +/// Example implementation: +/// +/// ``` +/// struct Book: SipHashable { +/// var title: String +/// var pageCount: Int +/// +/// func appendHashes(to hasher: inout SipHasher) { +/// hasher.append(title) +/// hasher.append(pageCount) +/// } +/// +/// static func ==(left: Book, right: Book) -> Bool { +/// return left.title == right.title && left.pageCount == right.pageCount +/// } +/// } +/// ``` +public protocol SipHashable: Hashable { + /// Add components of `self` that should contribute to hashing to `hash`. + func appendHashes(to hasher: inout SipHasher) +} + +extension SipHashable { + /// The hash value, calculated using `addHashes`. + /// + /// Hash values are not guaranteed to be equal across different executions of your program. + /// Do not save hash values to use during a future execution. + public var hashValue: Int { + var hasher = SipHasher() + appendHashes(to: &hasher) + return hasher.finalize() + } +} + +extension SipHasher { + //MARK: Appending Hashable Values + + /// Add hashing components in `value` to this hash. This method simply calls `value.addHashes`. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: H) { + value.appendHashes(to: &self) + } + + /// Add the hash value of `value` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ value: H) { + append(value.hashValue) + } +} diff --git a/Example/web3swiftBrowser/Pods/SipHash/SipHash/SipHasher.swift b/Example/web3swiftBrowser/Pods/SipHash/SipHash/SipHasher.swift new file mode 100644 index 000000000..c1bfce62c --- /dev/null +++ b/Example/web3swiftBrowser/Pods/SipHash/SipHash/SipHasher.swift @@ -0,0 +1,197 @@ +// +// SipHasher.swift +// SipHash +// +// Created by Károly Lőrentey on 2016-03-08. +// Copyright © 2016-2017 Károly Lőrentey. + +private func rotateLeft(_ value: UInt64, by amount: UInt64) -> UInt64 { + return (value << amount) | (value >> (64 - amount)) +} + +/// An implementation of the [SipHash-2-4](https://131002.net/siphash) hashing algorithm, +/// suitable for use in projects outside the Swift standard library. +/// (The Swift stdlib already includes SipHash; unfortunately its API is not public.) +/// +/// SipHash was invented by Jean-Philippe Aumasson and Daniel J. Bernstein. +public struct SipHasher { + /// The number of compression rounds. + private static let c = 2 + /// The number of finalization rounds. + private static let d = 4 + + /// The default key, used by the default initializer. + /// Each process has a unique key, chosen randomly when the first instance of `SipHasher` is initialized. + static let key: (UInt64, UInt64) = (randomUInt64(), randomUInt64()) + + /// Word 0 of the internal state, initialized to ASCII encoding of "somepseu". + var v0: UInt64 = 0x736f6d6570736575 + /// Word 1 of the internal state, initialized to ASCII encoding of "dorandom". + var v1: UInt64 = 0x646f72616e646f6d + /// Word 2 of the internal state, initialized to ASCII encoding of "lygenera". + var v2: UInt64 = 0x6c7967656e657261 + /// Word 3 of the internal state, initialized to ASCII encoding of "tedbytes". + var v3: UInt64 = 0x7465646279746573 + + /// The current partial word, not yet mixed in with the internal state. + var pendingBytes: UInt64 = 0 + /// The number of bytes that are currently pending in `tailBytes`. Guaranteed to be between 0 and 7. + var pendingByteCount = 0 + /// The number of bytes collected so far, or -1 if the hash value has already been finalized. + var byteCount = 0 + + //MARK: Initializers + + /// Initialize a new instance with the default key, generated randomly the first time this initializer is called. + public init() { + self.init(k0: SipHasher.key.0, k1: SipHasher.key.1) + } + + /// Initialize a new instance with the specified key. + /// + /// - Parameter k0: The low 64 bits of the secret key. + /// - Parameter k1: The high 64 bits of the secret key. + public init(k0: UInt64, k1: UInt64) { + v0 ^= k0 + v1 ^= k1 + v2 ^= k0 + v3 ^= k1 + } + + private mutating func sipRound() { + v0 = v0 &+ v1 + v1 = rotateLeft(v1, by: 13) + v1 ^= v0 + v0 = rotateLeft(v0, by: 32) + v2 = v2 &+ v3 + v3 = rotateLeft(v3, by: 16) + v3 ^= v2 + v0 = v0 &+ v3 + v3 = rotateLeft(v3, by: 21) + v3 ^= v0 + v2 = v2 &+ v1 + v1 = rotateLeft(v1, by: 17) + v1 ^= v2 + v2 = rotateLeft(v2, by: 32) + } + + mutating func compressWord(_ m: UInt64) { + v3 ^= m + for _ in 0 ..< SipHasher.c { + sipRound() + } + v0 ^= m + } + + mutating func _finalize() -> UInt64 { + precondition(byteCount >= 0) + pendingBytes |= UInt64(byteCount) << 56 + byteCount = -1 + + compressWord(pendingBytes) + + v2 ^= 0xff + for _ in 0 ..< SipHasher.d { + sipRound() + } + + return v0 ^ v1 ^ v2 ^ v3 + } + + //MARK: Appending data + + /// Add all bytes in `buffer` to this hash. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func append(_ buffer: UnsafeRawBufferPointer) { + precondition(byteCount >= 0) + + // Use the first couple of bytes to complete the pending word. + var i = 0 + if pendingByteCount > 0 { + let readCount = min(buffer.count, 8 - pendingByteCount) + var m: UInt64 = 0 + switch readCount { + case 7: + m |= UInt64(buffer[6]) << 48 + fallthrough + case 6: + m |= UInt64(buffer[5]) << 40 + fallthrough + case 5: + m |= UInt64(buffer[4]) << 32 + fallthrough + case 4: + m |= UInt64(buffer[3]) << 24 + fallthrough + case 3: + m |= UInt64(buffer[2]) << 16 + fallthrough + case 2: + m |= UInt64(buffer[1]) << 8 + fallthrough + case 1: + m |= UInt64(buffer[0]) + default: + precondition(readCount == 0) + } + pendingBytes |= m << UInt64(pendingByteCount << 3) + pendingByteCount += readCount + i += readCount + + if pendingByteCount == 8 { + compressWord(pendingBytes) + pendingBytes = 0 + pendingByteCount = 0 + } + } + + let left = (buffer.count - i) & 7 + let end = (buffer.count - i) - left + while i < end { + var m: UInt64 = 0 + withUnsafeMutableBytes(of: &m) { p in + p.copyMemory(from: .init(rebasing: buffer[i ..< i + 8])) + } + compressWord(UInt64(littleEndian: m)) + i += 8 + } + + switch left { + case 7: + pendingBytes |= UInt64(buffer[i + 6]) << 48 + fallthrough + case 6: + pendingBytes |= UInt64(buffer[i + 5]) << 40 + fallthrough + case 5: + pendingBytes |= UInt64(buffer[i + 4]) << 32 + fallthrough + case 4: + pendingBytes |= UInt64(buffer[i + 3]) << 24 + fallthrough + case 3: + pendingBytes |= UInt64(buffer[i + 2]) << 16 + fallthrough + case 2: + pendingBytes |= UInt64(buffer[i + 1]) << 8 + fallthrough + case 1: + pendingBytes |= UInt64(buffer[i]) + default: + precondition(left == 0) + } + pendingByteCount = left + + byteCount += buffer.count + } + + //MARK: Finalization + + /// Finalize this hash and return the hash value. + /// + /// - Requires: `finalize()` hasn't been called on this instance yet. + public mutating func finalize() -> Int { + return Int(truncatingIfNeeded: _finalize()) + } +} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/RLP.swift b/Example/web3swiftBrowser/Pods/SwiftRLP/Classes/RLP.swift old mode 100755 new mode 100644 similarity index 70% rename from Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/RLP.swift rename to Example/web3swiftBrowser/Pods/SwiftRLP/Classes/RLP.swift index c9eb8323f..86c126dfc --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/RLP.swift +++ b/Example/web3swiftBrowser/Pods/SwiftRLP/Classes/RLP.swift @@ -1,22 +1,27 @@ // // RLP.swift -// web3swift +// SwiftRLP // -// Created by Alexander Vlasov on 09.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov on 04/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt -protocol ArrayType {} -extension Array : ArrayType {} +//protocol ArrayType {} +//extension Array : ArrayType {} -struct RLP { +public struct RLP { + enum Error: Swift.Error { + case encodingError + case decodingError + } + static var length56 = BigUInt(UInt(56)) static var lengthMax = (BigUInt(UInt(1)) << 256) - static func encode(_ element: AnyObject) -> Data? { + internal static func encode(_ element: AnyObject) -> Data? { if let string = element as? String { return encode(string) @@ -53,15 +58,6 @@ struct RLP { return encode(encoded) } -// internal static func encode(_ unstrippedData: Data) -> Data? { -// var startIndex = 0; -// for i in 0.. Data? { if (data.count == 1 && data.bytes[0] < UInt8(0x80)) { return data @@ -138,31 +134,17 @@ struct RLP { return encodedLength } - static func encode(_ elements: [Any]) -> Data? { - var encodedData = Data() - for el in elements { - let e = el as AnyObject - guard let encoded = encode(e) else {return nil} - encodedData.append(encoded) - } - guard var encodedLength = encodeLength(encodedData.count, offset: UInt8(0xc0)) else {return nil} - if (encodedLength != Data()) { - encodedLength.append(encodedData) - } - return encodedLength - } - - static func decode(_ raw: String) -> RLPItem? { + public static func decode(_ raw: String) -> RLPItem? { guard let rawData = Data.fromHex(raw) else {return nil} return decode(rawData) } - static func decode(_ raw: Data) -> RLPItem? { + public static func decode(_ raw: Data) -> RLPItem? { if raw.count == 0 { return RLPItem.noItem } var outputArray = [RLPItem]() - var bytesToParse = raw + var bytesToParse = Data(raw) while bytesToParse.count != 0 { let (of, dl, t) = decodeLength(bytesToParse) guard let offset = of, let dataLength = dl, let type = t else {return nil} @@ -187,26 +169,26 @@ struct RLP { guard let tail = try? slice(data: bytesToParse, start: offset + dataLength) else {return nil} bytesToParse = tail } - return RLPItem.init(content: .list(outputArray, 0)) + return RLPItem.init(content: .list(outputArray, 0, Data(raw))) } - enum UnderlyingType { - case empty - case data - case list - } - - struct RLPItem { + public struct RLPItem { + + enum UnderlyingType { + case empty + case data + case list + } - enum RLPContent { + public enum RLPContent { case noItem case data(Data) - indirect case list([RLPItem], Int) + indirect case list([RLPItem], Int, Data) } - var content: RLPContent + public var content: RLPContent - var isData: Bool { + public var isData: Bool { switch self.content { case .noItem: return false @@ -217,7 +199,7 @@ struct RLP { } } - var isList: Bool { + public var isList: Bool { switch self.content { case .noItem: return false @@ -227,54 +209,55 @@ struct RLP { return true } } - var count: Int? { + public var count: Int? { switch self.content { case .noItem: return nil case .data(_): return nil - case .list(let list, _): + case .list(let list, _, _): return list.count } } - var hasNext: Bool { - switch self.content { - case .noItem: - return false - case .data(_): - return false - case .list(let list, let counter): - return list.count > counter - } - } + // public var hasNext: Bool { + // switch self.content { + // case .noItem: + // return false + // case .data(_): + // return false + // case .list(let list, let counter, _): + // return list.count > counter + // } + // } - subscript(index: Int) -> RLPItem? { + public subscript(index: Int) -> RLPItem? { get { - guard self.hasNext else {return nil} - guard case .list(let list, _) = self.content else {return nil} + // guard self.hasNext else {return nil} + guard case .list(let list, _, _) = self.content else {return nil} let item = list[index] return item } } - var data: Data? { + public var data: Data? { return self.getData() } - func getData() -> Data? { + public func getData() -> Data? { if self.isList { - return nil + guard case .list(_, _, let rawContent) = self.content else {return nil} + return rawContent } guard case .data(let data) = self.content else {return nil} return data } - static var noItem: RLPItem { + public static var noItem: RLPItem { return RLPItem.init(content: .noItem) } } - internal static func decodeLength(_ input: Data) -> (offset: BigUInt?, length: BigUInt?, type: UnderlyingType?) { + internal static func decodeLength(_ input: Data) -> (offset: BigUInt?, length: BigUInt?, type: RLPItem.UnderlyingType?) { do { let length = BigUInt(input.count) if (length == BigUInt(0)) { @@ -306,20 +289,20 @@ struct RLP { } internal static func slice(data: Data, offset: BigUInt, length: BigUInt) throws -> Data { - if BigUInt(data.count) < offset + length {throw Web3Error.dataError} + if BigUInt(data.count) < offset + length {throw Error.encodingError} let slice = data[UInt64(offset) ..< UInt64(offset + length)] return Data(slice) } internal static func slice(data: Data, start: BigUInt) throws -> Data { - if BigUInt(data.count) < start {throw Web3Error.dataError} + if BigUInt(data.count) < start {throw Error.encodingError} let slice = data[UInt64(start) ..< UInt64(data.count)] return Data(slice) } internal static func toBigUInt(_ raw: Data) throws -> BigUInt { if raw.count == 0 { - throw Web3Error.dataError + throw Error.encodingError } else if raw.count == 1 { return BigUInt.init(raw) } else { @@ -329,4 +312,74 @@ struct RLP { } } +fileprivate extension String { + func stripHexPrefix() -> String { + if self.hasPrefix("0x") { + let indexStart = self.index(self.startIndex, offsetBy: 2) + return String(self[indexStart...]) + } + return self + } +} +fileprivate extension Array where Element == UInt8 { + init(hex: String) { + self = Array() + self.reserveCapacity(hex.unicodeScalars.underestimatedCount) + var buffer: UInt8? + var skip = hex.hasPrefix("0x") ? 2 : 0 + for char in hex.unicodeScalars.lazy { + guard skip == 0 else { + skip -= 1 + continue + } + guard char.value >= 48 && char.value <= 102 else { + removeAll() + return + } + let v: UInt8 + let c: UInt8 = UInt8(char.value) + switch c { + case let c where c <= 57: + v = c - 48 + case let c where c >= 65 && c <= 70: + v = c - 55 + case let c where c >= 97: + v = c - 87 + default: + removeAll() + return + } + if let b = buffer { + append(b << 4 | v) + buffer = nil + } else { + buffer = v + } + } + if let b = buffer { + append(b) + } + } +} + +fileprivate extension Data { + + static func fromHex(_ hex: String) -> Data? { + let string = hex.lowercased().stripHexPrefix() + let array = Array(hex: string) + if (array.count == 0) { + if (hex == "0x" || hex == "") { + return Data() + } else { + return nil + } + } + return Data(array) + } + + var bytes: Array { + return Array(self) + } + +} diff --git a/Example/web3swiftBrowser/Pods/SwiftRLP/LICENSE b/Example/web3swiftBrowser/Pods/SwiftRLP/LICENSE new file mode 100644 index 000000000..d49e6aa41 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/SwiftRLP/LICENSE @@ -0,0 +1,13 @@ +Copyright 2018 Alex Vlasov + +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/Example/web3swiftBrowser/Pods/SwiftRLP/SwiftRLP/SwiftRLP.h b/Example/web3swiftBrowser/Pods/SwiftRLP/SwiftRLP/SwiftRLP.h new file mode 100644 index 000000000..47bb05fc6 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/SwiftRLP/SwiftRLP/SwiftRLP.h @@ -0,0 +1,21 @@ +// +// SwiftRLP.h +// SwiftRLP +// +// Created by Alex Vlasov on 04/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// +#if TARGET_OS_IPHONE +#import +#else +#import +#endif +//! Project version number for SwiftRLP. +FOUNDATION_EXPORT double SwiftRLPVersionNumber; + +//! Project version string for SwiftRLP. +FOUNDATION_EXPORT const unsigned char SwiftRLPVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Example/web3swiftExample/Pods/Target Support Files/Result/Result-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-Info.plist similarity index 96% rename from Example/web3swiftExample/Pods/Target Support Files/Result/Result-Info.plist rename to Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-Info.plist index 3424ca661..90db36aa4 100644 --- a/Example/web3swiftExample/Pods/Target Support Files/Result/Result-Info.plist +++ b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.0.0 + 3.1.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-dummy.m b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-dummy.m new file mode 100755 index 000000000..7367f8606 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_BigInt : NSObject +@end +@implementation PodsDummy_BigInt +@end diff --git a/Example/web3swiftExample/Pods/Target Support Files/Result/Result-prefix.pch b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-prefix.pch old mode 100644 new mode 100755 similarity index 100% rename from Example/web3swiftExample/Pods/Target Support Files/Result/Result-prefix.pch rename to Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-prefix.pch diff --git a/Example/web3swiftExample/Pods/Target Support Files/Result/Result-umbrella.h b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-umbrella.h old mode 100644 new mode 100755 similarity index 64% rename from Example/web3swiftExample/Pods/Target Support Files/Result/Result-umbrella.h rename to Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-umbrella.h index 25f5eb129..e3d2506e1 --- a/Example/web3swiftExample/Pods/Target Support Files/Result/Result-umbrella.h +++ b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt-umbrella.h @@ -11,6 +11,6 @@ #endif -FOUNDATION_EXPORT double ResultVersionNumber; -FOUNDATION_EXPORT const unsigned char ResultVersionString[]; +FOUNDATION_EXPORT double BigIntVersionNumber; +FOUNDATION_EXPORT const unsigned char BigIntVersionString[]; diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt.modulemap b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt.modulemap new file mode 100755 index 000000000..48a38d1cb --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt.modulemap @@ -0,0 +1,6 @@ +framework module BigInt { + umbrella header "BigInt-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt.xcconfig new file mode 100755 index 000000000..1e6120d78 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/BigInt.xcconfig @@ -0,0 +1,11 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/BigInt +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "SipHash" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/BigInt +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/Info.plist old mode 100644 new mode 100755 similarity index 96% rename from Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-Info.plist rename to Example/web3swiftBrowser/Pods/Target Support Files/BigInt/Info.plist index 9fb50daad..b0b461e32 --- a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-Info.plist +++ b/Example/web3swiftBrowser/Pods/Target Support Files/BigInt/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.1.3 + 3.0.1 CFBundleSignature ???? CFBundleVersion diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-Info.plist new file mode 100644 index 000000000..3e3c2e3d8 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.13.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-dummy.m b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-dummy.m new file mode 100755 index 000000000..657061bc6 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_CryptoSwift : NSObject +@end +@implementation PodsDummy_CryptoSwift +@end diff --git a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-prefix.pch b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-prefix.pch old mode 100644 new mode 100755 similarity index 100% rename from Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-prefix.pch rename to Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-prefix.pch diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-umbrella.h b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-umbrella.h new file mode 100755 index 000000000..e93efa884 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift-umbrella.h @@ -0,0 +1,16 @@ +#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 CryptoSwiftVersionNumber; +FOUNDATION_EXPORT const unsigned char CryptoSwiftVersionString[]; + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift.modulemap b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift.modulemap new file mode 100755 index 000000000..f090f6a33 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift.modulemap @@ -0,0 +1,6 @@ +framework module CryptoSwift { + umbrella header "CryptoSwift-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift.xcconfig new file mode 100755 index 000000000..ef79591e4 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/CryptoSwift.xcconfig @@ -0,0 +1,14 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +GCC_UNROLL_LOOPS = YES +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/CryptoSwift +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_COMPILATION_MODE = wholemodule +SWIFT_DISABLE_SAFETY_CHECKS = YES +SWIFT_ENFORCE_EXCLUSIVE_ACCESS = compile-time +SWIFT_OPTIMIZATION_LEVEL = -O diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/Info.plist new file mode 100755 index 000000000..2cf03a7f7 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/CryptoSwift/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.8.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-Info.plist new file mode 100644 index 000000000..d60f138d9 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-dummy.m b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-dummy.m new file mode 100644 index 000000000..0e1336d81 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_EthereumABI : NSObject +@end +@implementation PodsDummy_EthereumABI +@end diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-prefix.pch b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-prefix.pch new file mode 100644 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-umbrella.h b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-umbrella.h new file mode 100644 index 000000000..d0c9e02c9 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "EthereumABI.h" + +FOUNDATION_EXPORT double EthereumABIVersionNumber; +FOUNDATION_EXPORT const unsigned char EthereumABIVersionString[]; + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI.modulemap b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI.modulemap new file mode 100644 index 000000000..4a8aaefc7 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI.modulemap @@ -0,0 +1,6 @@ +framework module EthereumABI { + umbrella header "EthereumABI-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI.xcconfig new file mode 100644 index 000000000..540f987ea --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumABI/EthereumABI.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI +DEFINES_MODULE = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "CryptoSwift" -framework "EthereumAddress" -framework "SipHash" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/EthereumABI +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-Info.plist new file mode 100644 index 000000000..2243fe6e2 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + 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/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-dummy.m b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-dummy.m new file mode 100644 index 000000000..3c6848b53 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_EthereumAddress : NSObject +@end +@implementation PodsDummy_EthereumAddress +@end diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-prefix.pch b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-prefix.pch new file mode 100644 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-umbrella.h b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-umbrella.h new file mode 100644 index 000000000..d19195a1e --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "EthereumAddress.h" + +FOUNDATION_EXPORT double EthereumAddressVersionNumber; +FOUNDATION_EXPORT const unsigned char EthereumAddressVersionString[]; + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress.modulemap b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress.modulemap new file mode 100644 index 000000000..8266d6b80 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress.modulemap @@ -0,0 +1,6 @@ +framework module EthereumAddress { + umbrella header "EthereumAddress-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress.xcconfig new file mode 100644 index 000000000..bcb308c16 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/EthereumAddress/EthereumAddress.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress +DEFINES_MODULE = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "CryptoSwift" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/EthereumAddress +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Info.plist new file mode 100755 index 000000000..2243fe6e2 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + 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/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-Info.plist new file mode 100644 index 000000000..2243fe6e2 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + 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/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-acknowledgements.markdown b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-acknowledgements.markdown new file mode 100755 index 000000000..91abb2f1f --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-acknowledgements.markdown @@ -0,0 +1,405 @@ +# 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. + + +## CryptoSwift + +Copyright (C) 2014-2017 Marcin Krzyżanowski +This software is provided 'as-is', without any express or implied warranty. + +In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +- This notice may not be removed or altered from any source or binary distribution. +- Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' + +## EthereumABI + +Copyright 2018 Alex Vlasov + +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. + + +## EthereumAddress + +Copyright 2018 Alex Vlasov + +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. + + +## PromiseKit + +Copyright 2016-present, Max Howell; mxcl@me.com + +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. + + +## SipHash + +The MIT License (MIT) + +Copyright (c) 2016 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. + + +## SwiftRLP + +Copyright 2018 Alex Vlasov + +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. + + +## WKBridge + +Copyright (c) 2017 lovesunstar@sina.com + +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. + + +## scrypt + +Copyright 2018 Alex Vlasov + +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. + + +## secp256k1_swift + +Copyright 2018 Alex Vlasov (bankexfoundation.org) + +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. + + +## web3swift + +Copyright (c) 2018 Aleksandr Vlasov, + + 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 2018 Aleksandr Vlasov + + 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/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-acknowledgements.plist b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-acknowledgements.plist new file mode 100755 index 000000000..96385880c --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-acknowledgements.plist @@ -0,0 +1,497 @@ + + + + + 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 + Copyright (C) 2014-2017 Marcin Krzyżanowski <marcin.krzyzanowski@gmail.com> +This software is provided 'as-is', without any express or implied warranty. + +In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +- This notice may not be removed or altered from any source or binary distribution. +- Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' + License + Attribution + Title + CryptoSwift + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + EthereumABI + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + EthereumAddress + Type + PSGroupSpecifier + + + FooterText + Copyright 2016-present, Max Howell; mxcl@me.com + +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 + PromiseKit + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2016 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 + SipHash + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + SwiftRLP + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2017 lovesunstar@sina.com <sunjiangting@imusics.net> + +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 + WKBridge + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + scrypt + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <av@bankexfoundation.org> (bankexfoundation.org) + +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 + Apache License 2.0 + Title + secp256k1_swift + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2018 Aleksandr Vlasov, <alex.m.vlasov@gmail.com> + + 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 2018 Aleksandr Vlasov + + 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 + Apache License 2.0 + Title + web3swift + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-dummy.m b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-dummy.m new file mode 100755 index 000000000..cac9f8cc7 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_web3swiftBrowser : NSObject +@end +@implementation PodsDummy_Pods_web3swiftBrowser +@end diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-frameworks.sh b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-frameworks.sh new file mode 100755 index 000000000..62e0a673e --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-frameworks.sh @@ -0,0 +1,183 @@ +#!/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="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# 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 "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --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" + if [ -r "$source" ]; then + # Copy the dSYM into a 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 .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --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[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.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. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + +# 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 +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # 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 + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + 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=1 +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/BigInt/BigInt.framework" + install_framework "${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/EthereumABI/EthereumABI.framework" + install_framework "${BUILT_PRODUCTS_DIR}/EthereumAddress/EthereumAddress.framework" + install_framework "${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework" + install_framework "${BUILT_PRODUCTS_DIR}/SipHash/SipHash.framework" + install_framework "${BUILT_PRODUCTS_DIR}/SwiftRLP/SwiftRLP.framework" + install_framework "${BUILT_PRODUCTS_DIR}/WKBridge/WKBridge.framework" + install_framework "${BUILT_PRODUCTS_DIR}/scrypt/scrypt.framework" + install_framework "${BUILT_PRODUCTS_DIR}/secp256k1_swift/secp256k1_swift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/web3swift/Web3swift.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/BigInt/BigInt.framework" + install_framework "${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/EthereumABI/EthereumABI.framework" + install_framework "${BUILT_PRODUCTS_DIR}/EthereumAddress/EthereumAddress.framework" + install_framework "${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework" + install_framework "${BUILT_PRODUCTS_DIR}/SipHash/SipHash.framework" + install_framework "${BUILT_PRODUCTS_DIR}/SwiftRLP/SwiftRLP.framework" + install_framework "${BUILT_PRODUCTS_DIR}/WKBridge/WKBridge.framework" + install_framework "${BUILT_PRODUCTS_DIR}/scrypt/scrypt.framework" + install_framework "${BUILT_PRODUCTS_DIR}/secp256k1_swift/secp256k1_swift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/web3swift/Web3swift.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-resources.sh b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-resources.sh new file mode 100755 index 000000000..a7df4405b --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-resources.sh @@ -0,0 +1,106 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# 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 .*.??????") + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-umbrella.h b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-umbrella.h new file mode 100755 index 000000000..25a92be05 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-umbrella.h @@ -0,0 +1,16 @@ +#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_web3swiftBrowserVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_web3swiftBrowserVersionString[]; + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.debug.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.debug.xcconfig new file mode 100755 index 000000000..80404eab6 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.debug.xcconfig @@ -0,0 +1,12 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP" "${PODS_CONFIGURATION_BUILD_DIR}/WKBridge" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift" "${PODS_CONFIGURATION_BUILD_DIR}/web3swift" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt/BigInt.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI/EthereumABI.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress/EthereumAddress.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash/SipHash.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP/SwiftRLP.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/WKBridge/WKBridge.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt/scrypt.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift/secp256k1_swift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/web3swift/Web3swift.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "CoreImage" -framework "CryptoSwift" -framework "EthereumABI" -framework "EthereumAddress" -framework "Foundation" -framework "PromiseKit" -framework "SipHash" -framework "SwiftRLP" -framework "UIKit" -framework "WKBridge" -framework "Web3swift" -framework "WebKit" -framework "scrypt" -framework "secp256k1_swift" +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 +SWIFT_INCLUDE_PATHS = $(PODS_TARGET_SRCROOT)/scrypt diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.modulemap b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.modulemap new file mode 100755 index 000000000..b61d45e24 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.modulemap @@ -0,0 +1,6 @@ +framework module Pods_web3swiftBrowser { + umbrella header "Pods-web3swiftBrowser-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.release.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.release.xcconfig new file mode 100755 index 000000000..80404eab6 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.release.xcconfig @@ -0,0 +1,12 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP" "${PODS_CONFIGURATION_BUILD_DIR}/WKBridge" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift" "${PODS_CONFIGURATION_BUILD_DIR}/web3swift" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt/BigInt.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI/EthereumABI.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress/EthereumAddress.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash/SipHash.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP/SwiftRLP.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/WKBridge/WKBridge.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt/scrypt.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift/secp256k1_swift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/web3swift/Web3swift.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "CoreImage" -framework "CryptoSwift" -framework "EthereumABI" -framework "EthereumAddress" -framework "Foundation" -framework "PromiseKit" -framework "SipHash" -framework "SwiftRLP" -framework "UIKit" -framework "WKBridge" -framework "Web3swift" -framework "WebKit" -framework "scrypt" -framework "secp256k1_swift" +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 +SWIFT_INCLUDE_PATHS = $(PODS_TARGET_SRCROOT)/scrypt diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/Info.plist new file mode 100755 index 000000000..eaa7c2e93 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 4.5.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-Info.plist new file mode 100644 index 000000000..0a3a4e6de --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 6.5.2 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m new file mode 100755 index 000000000..ce9245130 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_PromiseKit : NSObject +@end +@implementation PodsDummy_PromiseKit +@end diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch new file mode 100755 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h new file mode 100755 index 000000000..4a0b02de6 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h @@ -0,0 +1,26 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "fwd.h" +#import "AnyPromise.h" +#import "PromiseKit.h" +#import "NSURLSession+AnyPromise.h" +#import "NSTask+AnyPromise.h" +#import "NSNotificationCenter+AnyPromise.h" +#import "PMKFoundation.h" +#import "PMKUIKit.h" +#import "UIView+AnyPromise.h" +#import "UIViewController+AnyPromise.h" + +FOUNDATION_EXPORT double PromiseKitVersionNumber; +FOUNDATION_EXPORT const unsigned char PromiseKitVersionString[]; + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap new file mode 100755 index 000000000..2b26033e4 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap @@ -0,0 +1,6 @@ +framework module PromiseKit { + umbrella header "PromiseKit-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig new file mode 100755 index 000000000..1e507541f --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "UIKit" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -DPMKCocoaPods +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/PromiseKit +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/Info.plist new file mode 100755 index 000000000..2a9158a0b --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.2.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-Info.plist new file mode 100644 index 000000000..e433362ea --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.2.2 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-dummy.m b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-dummy.m new file mode 100755 index 000000000..798852997 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_SipHash : NSObject +@end +@implementation PodsDummy_SipHash +@end diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-prefix.pch b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-prefix.pch new file mode 100755 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-umbrella.h b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-umbrella.h new file mode 100755 index 000000000..65aec28d8 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash-umbrella.h @@ -0,0 +1,16 @@ +#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 SipHashVersionNumber; +FOUNDATION_EXPORT const unsigned char SipHashVersionString[]; + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash.modulemap b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash.modulemap new file mode 100755 index 000000000..067ad6b25 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash.modulemap @@ -0,0 +1,6 @@ +framework module SipHash { + umbrella header "SipHash-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftExample/Pods/Target Support Files/Result/Result.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash.xcconfig old mode 100644 new mode 100755 similarity index 75% rename from Example/web3swiftExample/Pods/Target Support Files/Result/Result.xcconfig rename to Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash.xcconfig index 4ca6b3d95..0707a3680 --- a/Example/web3swiftExample/Pods/Target Support Files/Result/Result.xcconfig +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SipHash/SipHash.xcconfig @@ -1,9 +1,9 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Result +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SipHash GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Result +PODS_TARGET_SRCROOT = ${PODS_ROOT}/SipHash PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-Info.plist new file mode 100644 index 000000000..2a9158a0b --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.2.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-dummy.m b/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-dummy.m new file mode 100644 index 000000000..a8649c909 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_SwiftRLP : NSObject +@end +@implementation PodsDummy_SwiftRLP +@end diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-prefix.pch b/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-prefix.pch new file mode 100644 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-umbrella.h b/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-umbrella.h new file mode 100644 index 000000000..c819e55b6 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "SwiftRLP.h" + +FOUNDATION_EXPORT double SwiftRLPVersionNumber; +FOUNDATION_EXPORT const unsigned char SwiftRLPVersionString[]; + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP.modulemap b/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP.modulemap new file mode 100644 index 000000000..81b05ab54 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP.modulemap @@ -0,0 +1,6 @@ +framework module SwiftRLP { + umbrella header "SwiftRLP-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP.xcconfig new file mode 100644 index 000000000..18c98691b --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/SwiftRLP/SwiftRLP.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP +DEFINES_MODULE = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "SipHash" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftRLP +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/Info.plist new file mode 100755 index 000000000..f7c6cd47e --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.2.4 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/ResourceBundle-WKBridge-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/ResourceBundle-WKBridge-Info.plist new file mode 100755 index 000000000..5bfad4f41 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/ResourceBundle-WKBridge-Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 0.2.4 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/ResourceBundle-WKBridge-WKBridge-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/ResourceBundle-WKBridge-WKBridge-Info.plist new file mode 100644 index 000000000..5bfad4f41 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/ResourceBundle-WKBridge-WKBridge-Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 0.2.4 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-Info.plist new file mode 100644 index 000000000..f7c6cd47e --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.2.4 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-dummy.m b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-dummy.m new file mode 100755 index 000000000..e61fe04b7 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_WKBridge : NSObject +@end +@implementation PodsDummy_WKBridge +@end diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-prefix.pch b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-prefix.pch new file mode 100755 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-umbrella.h b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-umbrella.h new file mode 100755 index 000000000..19513f264 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge-umbrella.h @@ -0,0 +1,16 @@ +#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 WKBridgeVersionNumber; +FOUNDATION_EXPORT const unsigned char WKBridgeVersionString[]; + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge.modulemap b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge.modulemap new file mode 100755 index 000000000..d64ecc2d9 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge.modulemap @@ -0,0 +1,6 @@ +framework module WKBridge { + umbrella header "WKBridge-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge.xcconfig new file mode 100755 index 000000000..cf70c379b --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/WKBridge/WKBridge.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/WKBridge +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "UIKit" -framework "WebKit" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/WKBridge +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-Info.plist new file mode 100644 index 000000000..0a12077e3 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-dummy.m b/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-dummy.m new file mode 100644 index 000000000..8976dcd72 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_scrypt : NSObject +@end +@implementation PodsDummy_scrypt +@end diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-prefix.pch b/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-prefix.pch new file mode 100644 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-umbrella.h b/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-umbrella.h new file mode 100644 index 000000000..5dccb1b3e --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "scrypt.h" + +FOUNDATION_EXPORT double scryptVersionNumber; +FOUNDATION_EXPORT const unsigned char scryptVersionString[]; + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt.modulemap b/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt.modulemap new file mode 100644 index 000000000..57d509dab --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt.modulemap @@ -0,0 +1,6 @@ +framework module scrypt { + umbrella header "scrypt-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt.xcconfig new file mode 100644 index 000000000..4e2add7a4 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/scrypt/scrypt.xcconfig @@ -0,0 +1,19 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/scrypt +DEFINES_MODULE = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +GCC_UNROLL_LOOPS = YES +OTHER_LDFLAGS = $(inherited) -framework "CryptoSwift" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/scrypt +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_COMPILATION_MODE = wholemodule +SWIFT_DISABLE_SAFETY_CHECKS = YES +SWIFT_ENFORCE_EXCLUSIVE_ACCESS = compile-time +SWIFT_INCLUDE_PATHS = $(PODS_TARGET_SRCROOT)/scrypt +SWIFT_OPTIMIZATION_LEVEL = -O +SWIFT_WHOLE_MODULE_OPTIMIZATION = YES diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-Info.plist new file mode 100644 index 000000000..10ad18b32 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.3 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-dummy.m b/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-dummy.m new file mode 100644 index 000000000..9b4e22d1b --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_secp256k1_swift : NSObject +@end +@implementation PodsDummy_secp256k1_swift +@end diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-prefix.pch b/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-prefix.pch new file mode 100644 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-umbrella.h b/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-umbrella.h similarity index 68% rename from Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-umbrella.h rename to Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-umbrella.h index 5fdc91610..0390c804f 100644 --- a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-umbrella.h +++ b/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-umbrella.h @@ -14,6 +14,6 @@ #import "secp256k1_ecdh.h" #import "secp256k1_recovery.h" -FOUNDATION_EXPORT double secp256k1_iosVersionNumber; -FOUNDATION_EXPORT const unsigned char secp256k1_iosVersionString[]; +FOUNDATION_EXPORT double secp256k1_swiftVersionNumber; +FOUNDATION_EXPORT const unsigned char secp256k1_swiftVersionString[]; diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.modulemap b/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.modulemap new file mode 100644 index 000000000..cab9baa1f --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.modulemap @@ -0,0 +1,6 @@ +framework module secp256k1_swift { + umbrella header "secp256k1_swift-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.xcconfig similarity index 80% rename from Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios.xcconfig rename to Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.xcconfig index de0e1ece3..f92f9e729 100644 --- a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios.xcconfig +++ b/Example/web3swiftBrowser/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.xcconfig @@ -1,11 +1,12 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_ios +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/secp256k1_ios/secp256k1_ios" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/secp256k1" OTHER_CFLAGS = -DHAVE_CONFIG_H=1 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-shorten-64-to-32 -Wno-conditional-uninitialized -Wno-unused-function -Wno-long-long -Wno-overlength-strings -O3 +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/secp256k1_ios +PODS_TARGET_SRCROOT = ${PODS_ROOT}/secp256k1_swift PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES SWIFT_INCLUDE_PATHS = ${PODS_ROOT} diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/Info.plist new file mode 100755 index 000000000..2e53934a4 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.2.12 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-Info.plist b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-Info.plist new file mode 100644 index 000000000..bdac57c6a --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.0.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-dummy.m b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-dummy.m new file mode 100755 index 000000000..ee2665c93 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_web3swift : NSObject +@end +@implementation PodsDummy_web3swift +@end diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-prefix.pch b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-prefix.pch new file mode 100755 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-umbrella.h b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-umbrella.h new file mode 100755 index 000000000..beae35792 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "web3swift.h" + +FOUNDATION_EXPORT double Web3swiftVersionNumber; +FOUNDATION_EXPORT const unsigned char Web3swiftVersionString[]; + diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift.modulemap b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift.modulemap new file mode 100755 index 000000000..7578aea84 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift.modulemap @@ -0,0 +1,6 @@ +framework module Web3swift { + umbrella header "web3swift-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift.xcconfig b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift.xcconfig new file mode 100755 index 000000000..18ba6469e --- /dev/null +++ b/Example/web3swiftBrowser/Pods/Target Support Files/web3swift/web3swift.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/web3swift +DEFINES_MODULE = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "CoreImage" -framework "CryptoSwift" -framework "EthereumABI" -framework "EthereumAddress" -framework "Foundation" -framework "PromiseKit" -framework "SipHash" -framework "SwiftRLP" -framework "UIKit" -framework "scrypt" -framework "secp256k1_swift" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../.. +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/web3swiftExample/Pods/secp256k1_ios/LICENSE b/Example/web3swiftBrowser/Pods/WKBridge/LICENSE old mode 100644 new mode 100755 similarity index 92% rename from Example/web3swiftExample/Pods/secp256k1_ios/LICENSE rename to Example/web3swiftBrowser/Pods/WKBridge/LICENSE index 64c3974ed..c6d2cf7e5 --- a/Example/web3swiftExample/Pods/secp256k1_ios/LICENSE +++ b/Example/web3swiftBrowser/Pods/WKBridge/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2017 shamatar +Copyright (c) 2017 lovesunstar@sina.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -16,4 +16,4 @@ 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. \ No newline at end of file +THE SOFTWARE. diff --git a/Example/web3swiftBrowser/Pods/WKBridge/README.md b/Example/web3swiftBrowser/Pods/WKBridge/README.md new file mode 100755 index 000000000..48e3abf15 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/WKBridge/README.md @@ -0,0 +1,88 @@ +# WKBridge + +[![CI Status](http://img.shields.io/travis/lovesunstar@sina.com/WKBridge.svg?style=flat)](https://travis-ci.org/lovesunstar@sina.com/WKBridge) +[![Version](https://img.shields.io/cocoapods/v/WKBridge.svg?style=flat)](http://cocoapods.org/pods/WKBridge) +[![License](https://img.shields.io/cocoapods/l/WKBridge.svg?style=flat)](http://cocoapods.org/pods/WKBridge) +[![Platform](https://img.shields.io/cocoapods/p/WKBridge.svg?style=flat)](http://cocoapods.org/pods/WKBridge) + +`WKScriptMessageHandler` greatly simplifies the message handler from javascript running in a webpage. WKScript provides a more efficiently way for both sending and receiving messages through `WKScriptMessageHandler`. + +## Features + +- [x] Send / Receive Messages +- [x] Bind Events In JavaScript +- [x] Callback Event + +## Usage + +#### Native Handle Event + +```swift +webView.bridge.register({ (parameters, completion) in + print("print - ", parameters?["message"] ?? "") +}, for: "print") + +webView.bridge.register({ (parameters, completion) in + print("print - ", parameters?["message"] ?? "") + completion(.success(["key": "value"])) +}, for: "some_event_need_callback") + +``` + +#### Native Call JS +```swift +webView.evaluateJavaScript("some_method();", completionHandler: { (results, error) in + print(results ?? "") +}) + +webView.bridge.evaluate("some_method()", completion: { (results, error) in + print(results ?? "") +}) +``` + +#### JS Send Event +```javascript +window.bridge.post('print', {message: 'Hello, world'}) +// Post Event With Callback +window.bridge.post('print', {message: 'Hello, world'}, (parameters, error) => { <# Handler Parameters Or Error #>}) +``` + +#### JS Register Native Event +```javascript +var unregisterHandler = window.bridge.on('login', (parameters)=> {console.log('User Did Login')}) +// To Remove Listener, call `unregisterHandler()`, Or Remove All Listener window.bridge.off('login') +``` + +#### Native Send Event To JS +```swift +webView.bridge.post(action: "login", parameters: nil) +``` + +You can include `wk.bridge.min.js` to your own html, or you can inject it to your html using `WKUserScript`. + +You can [Download](https://gist.github.com/lovesunstar/efec08f8d2655ad432ab9dcb7d172536) full source-code of `wk.bridge.min.js` + +## Example + +To run the example project, clone the repo, and run `pod install` from the Example directory first. + +## Requirements + +iOS 8.0 + + +## Installation + +WKBridge is available through [CocoaPods](http://cocoapods.org). To install +it, simply add the following line to your Podfile: + +```ruby +pod "WKBridge" +``` + +## Author + +lovesunstar@sina.com + +## License + +WKBridge is available under the MIT license. See the LICENSE file for more info. diff --git a/Example/web3swiftBrowser/Pods/WKBridge/WKBridge/Assets/wk.bridge.min.js b/Example/web3swiftBrowser/Pods/WKBridge/WKBridge/Assets/wk.bridge.min.js new file mode 100755 index 000000000..cb83398ec --- /dev/null +++ b/Example/web3swiftBrowser/Pods/WKBridge/WKBridge/Assets/wk.bridge.min.js @@ -0,0 +1,5 @@ +/* wk.bridge.min.js | v0.2 */ +(function(){if(window.isIOS){return}window.isIOS=function(){return navigator&&navigator.userAgent&&(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent))}}()); +(function(){if(window.bridge){return}window.bridge=function(){var callbacks=[],callbackID=0,registerHandlers=[];document.addEventListener("PacificDidReceiveNativeCallback",function(e){if(e.detail){var detail=e.detail;var id=isNaN(parseInt(detail.id))?-1:parseInt(detail.id);if(id!=-1){callbacks[id]&&callbacks[id](detail.parameters,detail.error);delete callbacks[id]}}},false);document.addEventListener("PacificDidReceiveNativeBroadcast",function(e){if(e.detail){var detail=e.detail;var name=detail.name;if(name!==undefined&®isterHandlers[name]){var namedListeners=registerHandlers[name];if(namedListeners instanceof Array){var parameters=detail.parameters;namedListeners.forEach(function(handler){handler(parameters)})}}}},false);return{"post":function(action,parameters,callback,print){var id=callbackID++;callbacks[id]=callback;if(window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.pacific){window.webkit.messageHandlers.pacific.postMessage({"action":action,"parameters":parameters,"callback":id,"print":print||0})}},"on":function(name,callback){var namedListeners=registerHandlers[name];if(!namedListeners){registerHandlers[name]=namedListeners=[]}namedListeners.push(callback);return function(){namedListeners[indexOf(namedListeners,callback)]=null}},"off":function(name){delete registerHandlers[name]}}}()}()); +/* window.bridge.post('test', {'key': 'value'}, (parameters, error)=>{ <# print parameters, error #> }); */ +/* var unregisterHandler = window.bridge.on('userDidLogin', (parameters) => { <# receive notify from native #> } ); Call unregisterHandler() when cancel a listen. */ diff --git a/Example/web3swiftBrowser/Pods/WKBridge/WKBridge/Classes/Bridge.swift b/Example/web3swiftBrowser/Pods/WKBridge/WKBridge/Classes/Bridge.swift new file mode 100755 index 000000000..c5dc19ac0 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/WKBridge/WKBridge/Classes/Bridge.swift @@ -0,0 +1,223 @@ +// +// Bridge.swift +// JSBridge +// +// Created by SunJiangting on 2017/5/27. +// Copyright © 2017 Samaritan. All rights reserved. +// + +import UIKit +import WebKit + +/// Bridge for WKWebView and JavaScript +open class Bridge: NSObject { + + static let name: String = "pacific" + + fileprivate static let callbackEventName = "PacificDidReceiveNativeCallback" + fileprivate static let postEventName = "PacificDidReceiveNativeBroadcast" + + fileprivate enum MessageKey { + static let action = "action" + static let parameters = "parameters" + static let callback = "callback" + static let printable = "print" + } + + public struct JSError { + public let code: Int + public let description: String + + public init(code: Int, description: String) { + self.code = code + self.description = description + } + } + + /// Used to callback to webpage whether a message from webpage was handled successful or encountered an error. + /// + /// - success: The result of message was successful + /// + /// - failure: Unable to handle the message, notify js with error by **Object Error** { code: Int, description: String} + /// + public enum Results { + + case success([String: Any]?) + + case failure(JSError) + } + + /// Bridge Callback to webpage + /// - Parameter results: Value pass to webpage + public typealias Callback = (_ results: Results) -> Void + + /// Closure when js send message to native + /// - Parameter parameters: js parameters + /// - Parameter callback: callback func + public typealias Handler = (_ parameters: [String: Any]?, _ callback: Callback) -> Void + + private(set) var handlers = [String: Handler]() + + fileprivate let configuration: WKWebViewConfiguration + fileprivate weak var webView: WKWebView? + + /// Print message body from webpage automatically. + public var printScriptMessageAutomatically = false + + deinit { + configuration.removeObserver(self, forKeyPath: #keyPath(WKWebViewConfiguration.userContentController)) + configuration.userContentController.removeScriptMessageHandler(forName: Bridge.name) + } + + fileprivate init(webView: WKWebView) { + self.webView = webView + self.configuration = webView.configuration + super.init() + configuration.addObserver(self, forKeyPath: #keyPath(WKWebViewConfiguration.userContentController), options: [.new, .old], context: nil) + configuration.userContentController.add(self, name: Bridge.name) + } + + /// Register to handle action + /// - Parameter handler: closure when handle message from webpage + /// - parameter action: name of action + /// + /// - SeeAlso: `Handler` + /// + /// ```javascript + /// // Post Event With Action Name + /// window.bridge.post('print', {message: 'Hello, world'}) + /// // Post Event With Callback + /// window.bridge.post('print', {message: 'Hello, world'}, (parameters, error) => { Handler Parameters Or Error}) + /// ``` + public func register(_ handler: @escaping Handler, for action: String) { + handlers[action] = handler + } + + /// Unregister an action + /// - Parameters action: name of action + public func unregister(for action: String) { + handlers[action] = nil + } + + /// send action to webpage + /// - Parameter action: action listened by js `window.bridge.on(**action**, handler)` + /// - Parameter parameters: parameters pass to js + /// + /// ```javascript + /// // listen native login action + /// window.bridge.on('login', (parameters)=> {console.log('User Did Login')}) + /// ``` + public func post(action: String, parameters: [String: Any]?) { + guard let webView = webView else { return } + webView.st_dispatchBridgeEvent(Bridge.postEventName, parameters: ["name": action], results: .success(parameters), completionHandler: nil) + } + + /// Evaluates the given JavaScript string. + /// - Parameter javaScriptString: The JavaScript string to evaluate. + /// - Parameter completion: A block to invoke when script evaluation completes or fails. + public func evaluate(_ javaScriptString: String, completion: ((Any?, Error?) -> Void)? = nil) { + guard let webView = webView else { return } + webView.evaluateJavaScript(javaScriptString, completionHandler: completion) + } + + open override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { + if let obj = object as? WKWebViewConfiguration, let kp = keyPath, obj == configuration && kp == #keyPath(WKWebViewConfiguration.userContentController) { + if let change = change { + if let oldContentController = change[.oldKey] as? WKUserContentController { + oldContentController.removeScriptMessageHandler(forName: Bridge.name) + } + if let newContentController = change[.newKey] as? WKUserContentController { + newContentController.add(self, name: Bridge.name) + } + } + } + } +} + +extension Bridge: WKScriptMessageHandler { + + /*! @abstract Invoked when a script message is received from a webpage. + @param userContentController The user content controller invoking the + delegate method. + @param message The script message received. + */ + public func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { + guard let body = message.body as? [String: Any], let name = body[MessageKey.action] as? String, let handler = handlers[name] else { + return + } + if (body[MessageKey.printable] as? NSNumber)?.boolValue ?? printScriptMessageAutomatically { + print(body) + } + if let callbackID = (body[MessageKey.callback] as? NSNumber) { + handler(body[MessageKey.parameters] as? [String: Any]) { (results) in + // Do Nothing + guard let webView = webView else { return } + webView.st_dispatchBridgeEvent(Bridge.callbackEventName, parameters: ["id": callbackID], results: results, completionHandler: nil) + } + } else { + handler(body[MessageKey.parameters] as? [String: Any]) { (results) in + // Do Nothing + } + } + } +} + +public extension WKWebView { + + private struct STPrivateStatic { + fileprivate static var bridgeKey = "STPrivateStatic.bridgeKey" + } + + /// Bridge for WKWebView and JavaScript. Initialize `lazy` + public var bridge: Bridge { + if let bridge = objc_getAssociatedObject(self, &STPrivateStatic.bridgeKey) as? Bridge { + return bridge + } + let bridge = Bridge(webView: self) + objc_setAssociatedObject(self, &STPrivateStatic.bridgeKey, bridge, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + return bridge + } + + /// Remove Bridge And Reset, All the handlers will be removed + public func removeBridge() { + if let bridge = objc_getAssociatedObject(self, &STPrivateStatic.bridgeKey) as? Bridge { + let userContentController = bridge.configuration.userContentController + userContentController.removeScriptMessageHandler(forName: Bridge.name) + } + objc_setAssociatedObject(self, &STPrivateStatic.bridgeKey, nil, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + } +} + +fileprivate extension WKWebView { + + fileprivate func st_dispatchBridgeEvent(_ eventName: String, + parameters: [String: Any], + results: Bridge.Results, + completionHandler: ((Any?, Error?) -> Void)? = nil) { + + var eventDetail: [String: Any] = parameters + switch results { + case .failure(let error): + eventDetail["error"] = ["code": error.code, "description": error.description] + case .success(let callbackParameters): + eventDetail["parameters"] = callbackParameters ?? [:] + } + let eventBody: [String: Any] = ["detail": eventDetail] + let jsString: String + if + let _data = try? JSONSerialization.data(withJSONObject: eventBody, options: JSONSerialization.WritingOptions()), + let eventString = String(data: _data, encoding: .utf8) { + + jsString = "(function() { var event = new CustomEvent('\(eventName)', \(eventString)); document.dispatchEvent(event)}());" + } else { + // 这块代码是为了兼容 有一部分不能被序列化的字段 + switch results { + case .success(_): + jsString = "(function() { var event = new CustomEvent('\(eventName)', {'detail': {'parameters': {}}}); document.dispatchEvent(event)}());" + case .failure(let error): + jsString = "(function() { var event = new CustomEvent('\(eventName)', {'detail': {'error': {'code': \(error.code), 'description': '\(error.description)'}}}); document.dispatchEvent(event)}());" + } + } + evaluateJavaScript(jsString, completionHandler: completionHandler) + } +} diff --git a/Example/web3swiftBrowser/Pods/scrypt/LICENSE b/Example/web3swiftBrowser/Pods/scrypt/LICENSE new file mode 100755 index 000000000..d49e6aa41 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/scrypt/LICENSE @@ -0,0 +1,13 @@ +Copyright 2018 Alex Vlasov + +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/Example/web3swiftBrowser/Pods/scrypt/scrypt/Cimpl.c b/Example/web3swiftBrowser/Pods/scrypt/scrypt/Cimpl.c new file mode 100644 index 000000000..fa2981d22 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/scrypt/scrypt/Cimpl.c @@ -0,0 +1,368 @@ +// Original work recognition + +/*- + * Copyright 2009 Colin Percival + * Copyright 2013 Alexander Peslyak + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. + * + * This file was originally written by Colin Percival as part of the Tarsnap + * online backup system. + */ + +// Cleanup and putting it all together + +// +// Cimpl.c +// scrypt +// +// Created by Alex Vlasov on 04.09.2018. +// Copyright © 2018 Alexander Vlasov. All rights reserved. +// + +#include +#include +#include +#include +#include + +#if SIZE_MAX > 0xffffffffULL +#define ARCH_BITS 64 +#else +#define ARCH_BITS 32 +#endif + +#define LOAD32_LE(SRC) load32_le(SRC) +static inline uint32_t +load32_le(const uint8_t src[4]) +{ +#ifdef NATIVE_LITTLE_ENDIAN + uint32_t w; + memcpy(&w, src, sizeof w); + return w; +#else + uint32_t w = (uint32_t) src[0]; + w |= (uint32_t) src[1] << 8; + w |= (uint32_t) src[2] << 16; + w |= (uint32_t) src[3] << 24; + return w; +#endif +} + +#define STORE32_LE(DST, W) store32_le((DST), (W)) +static inline void +store32_le(uint8_t dst[4], uint32_t w) +{ +#ifdef NATIVE_LITTLE_ENDIAN + memcpy(dst, &w, sizeof w); +#else + dst[0] = (uint8_t) w; w >>= 8; + dst[1] = (uint8_t) w; w >>= 8; + dst[2] = (uint8_t) w; w >>= 8; + dst[3] = (uint8_t) w; +#endif +} + +typedef union { + uint64_t d[8]; + uint32_t w[16]; +} escrypt_block_t; + +static inline void +blkcpy_64(escrypt_block_t *dest, const escrypt_block_t *src) +{ + int i; + +#if (ARCH_BITS == 32) + for (i = 0; i < 16; ++i) { + dest->w[i] = src->w[i]; + } +#else + for (i = 0; i < 8; ++i) { + dest->d[i] = src->d[i]; + } +#endif +} + +static inline void +blkxor_64(escrypt_block_t *dest, const escrypt_block_t *src) +{ + int i; + +#if (ARCH_BITS == 32) + for (i = 0; i < 16; ++i) { + dest->w[i] ^= src->w[i]; + } +#else + for (i = 0; i < 8; ++i) { + dest->d[i] ^= src->d[i]; + } +#endif +} + +static inline void +blkcpy(escrypt_block_t *dest, const escrypt_block_t *src, size_t len) +{ + size_t i, L; + +#if (ARCH_BITS == 32) + L = (len >> 2); + for (i = 0; i < L; ++i) { + dest->w[i] = src->w[i]; + } +#else + L = (len >> 3); + for (i = 0; i < L; ++i) { + dest->d[i] = src->d[i]; + } +#endif +} + +static inline void +blkxor(escrypt_block_t *dest, const escrypt_block_t *src, size_t len) +{ + size_t i, L; + +#if (ARCH_BITS == 32) + L = (len >> 2); + for (i = 0; i < L; ++i) { + dest->w[i] ^= src->w[i]; + } +#else + L = (len >> 3); + for (i = 0; i < L; ++i) { + dest->d[i] ^= src->d[i]; + } +#endif +} + +/** + * salsa20_8(B): + * Apply the salsa20/8 core to the provided block. + */ +static void +salsa20_8(uint32_t B[16]) +{ + escrypt_block_t X; + uint32_t *x = X.w; + size_t i; + + blkcpy_64(&X, (escrypt_block_t *) B); + for (i = 0; i < 8; i += 2) { +#define R(a, b) (((a) << (b)) | ((a) >> (32 - (b)))) + /* Operate on columns. */ + x[4] ^= R(x[0] + x[12], 7); + x[8] ^= R(x[4] + x[0], 9); + x[12] ^= R(x[8] + x[4], 13); + x[0] ^= R(x[12] + x[8], 18); + + x[9] ^= R(x[5] + x[1], 7); + x[13] ^= R(x[9] + x[5], 9); + x[1] ^= R(x[13] + x[9], 13); + x[5] ^= R(x[1] + x[13], 18); + + x[14] ^= R(x[10] + x[6], 7); + x[2] ^= R(x[14] + x[10], 9); + x[6] ^= R(x[2] + x[14], 13); + x[10] ^= R(x[6] + x[2], 18); + + x[3] ^= R(x[15] + x[11], 7); + x[7] ^= R(x[3] + x[15], 9); + x[11] ^= R(x[7] + x[3], 13); + x[15] ^= R(x[11] + x[7], 18); + + /* Operate on rows. */ + x[1] ^= R(x[0] + x[3], 7); + x[2] ^= R(x[1] + x[0], 9); + x[3] ^= R(x[2] + x[1], 13); + x[0] ^= R(x[3] + x[2], 18); + + x[6] ^= R(x[5] + x[4], 7); + x[7] ^= R(x[6] + x[5], 9); + x[4] ^= R(x[7] + x[6], 13); + x[5] ^= R(x[4] + x[7], 18); + + x[11] ^= R(x[10] + x[9], 7); + x[8] ^= R(x[11] + x[10], 9); + x[9] ^= R(x[8] + x[11], 13); + x[10] ^= R(x[9] + x[8], 18); + + x[12] ^= R(x[15] + x[14], 7); + x[13] ^= R(x[12] + x[15], 9); + x[14] ^= R(x[13] + x[12], 13); + x[15] ^= R(x[14] + x[13], 18); +#undef R + } + for (i = 0; i < 16; i++) { + B[i] += x[i]; + } +} + +/** + * blockmix_salsa8(Bin, Bout, X, r): + * Compute Bout = BlockMix_{salsa20/8, r}(Bin). The input Bin must be 128r + * bytes in length; the output Bout must also be the same size. The + * temporary space X must be 64 bytes. + */ +static void +blockmix_salsa8(const uint32_t *Bin, uint32_t *Bout, uint32_t *X, size_t r) +{ + size_t i; + + /* 1: X <-- B_{2r - 1} */ + blkcpy_64((escrypt_block_t *) X, + (escrypt_block_t *) &Bin[(2 * r - 1) * 16]); + + /* 2: for i = 0 to 2r - 1 do */ + for (i = 0; i < 2 * r; i += 2) { + /* 3: X <-- H(X \xor B_i) */ + blkxor_64((escrypt_block_t *) X, (escrypt_block_t *) &Bin[i * 16]); + salsa20_8(X); + + /* 4: Y_i <-- X */ + /* 6: B' <-- (Y_0, Y_2 ... Y_{2r-2}, Y_1, Y_3 ... Y_{2r-1}) */ + blkcpy_64((escrypt_block_t *) &Bout[i * 8], (escrypt_block_t *) X); + + /* 3: X <-- H(X \xor B_i) */ + blkxor_64((escrypt_block_t *) X, (escrypt_block_t *) &Bin[i * 16 + 16]); + salsa20_8(X); + + /* 4: Y_i <-- X */ + /* 6: B' <-- (Y_0, Y_2 ... Y_{2r-2}, Y_1, Y_3 ... Y_{2r-1}) */ + blkcpy_64((escrypt_block_t *) &Bout[i * 8 + r * 16], + (escrypt_block_t *) X); + } +} + +/** + * integerify(B, r): + * Return the result of parsing B_{2r-1} as a little-endian integer. + */ +static inline uint64_t +integerify(const void *B, size_t r) +{ + const uint32_t *X = (const uint32_t *) ((uintptr_t)(B) + (2 * r - 1) * 64); + + return (((uint64_t)(X[1]) << 32) + X[0]); +} + +/** + * smix(B, r, N, V, XY): + * Compute B = SMix_r(B, N). The input B must be 128r bytes in length; + * the temporary storage V must be 128rN bytes in length; the temporary + * storage XY must be 256r + 64 bytes in length. The value N must be a + * power of 2 greater than 1. The arrays B, V, and XY must be aligned to a + * multiple of 64 bytes. + */ +static void +smix(uint8_t *B, size_t r, uint64_t N, uint32_t *V, uint32_t *XY) +{ + uint32_t *X = XY; + uint32_t *Y = &XY[32 * r]; + uint32_t *Z = &XY[64 * r]; + uint64_t i; + uint64_t j; + size_t k; + + /* 1: X <-- B */ + for (k = 0; k < 32 * r; k++) { + X[k] = LOAD32_LE(&B[4 * k]); + } + /* 2: for i = 0 to N - 1 do */ + for (i = 0; i < N; i += 2) { + /* 3: V_i <-- X */ + blkcpy((escrypt_block_t *) &V[i * (32 * r)], (escrypt_block_t *) X, + 128 * r); + + /* 4: X <-- H(X) */ + blockmix_salsa8(X, Y, Z, r); + + /* 3: V_i <-- X */ + blkcpy((escrypt_block_t *) &V[(i + 1) * (32 * r)], + (escrypt_block_t *) Y, 128 * r); + + /* 4: X <-- H(X) */ + blockmix_salsa8(Y, X, Z, r); + } + + /* 6: for i = 0 to N - 1 do */ + for (i = 0; i < N; i += 2) { + /* 7: j <-- Integerify(X) mod N */ + j = integerify(X, r) & (N - 1); + + /* 8: X <-- H(X \xor V_j) */ + blkxor((escrypt_block_t *) X, (escrypt_block_t *) &V[j * (32 * r)], + 128 * r); + blockmix_salsa8(X, Y, Z, r); + + /* 7: j <-- Integerify(X) mod N */ + j = integerify(Y, r) & (N - 1); + + /* 8: X <-- H(X \xor V_j) */ + blkxor((escrypt_block_t *) Y, (escrypt_block_t *) &V[j * (32 * r)], + 128 * r); + blockmix_salsa8(Y, X, Z, r); + } + /* 10: B' <-- X */ + for (k = 0; k < 32 * r; k++) { + STORE32_LE(&B[4 * k], X[k]); + } +} + +int +partial_Scrypt(uint64_t N, uint32_t _r, uint32_t _p, uint8_t *B, size_t B_size, + uint8_t *memory, size_t memory_size) +{ + size_t V_size, XY_size, need; + uint32_t *V, *XY; + size_t r = _r, p = _p; + uint32_t i; + + /* Allocate memory. */ + V_size = (size_t) 128 * r * (size_t) N; + need = V_size; + if (need < V_size) { + return -1; + } + XY_size = (size_t) 256 * r + 64; + need += XY_size; + if (need < XY_size) { + return -1; + } + + if (memory_size < need) { + return -1; + } + + V = (uint32_t *) ((uint8_t *) memory); + XY = (uint32_t *) ((uint8_t *) V + V_size); + + /* 2: for i = 0 to p - 1 do */ + for (i = 0; i < p; i++) { + /* 3: B_i <-- MF(B_i, N) */ + smix(&B[(size_t) 128 * i * r], r, N, V, XY); + } + + /* Success! */ + return 0; +} diff --git a/Example/web3swiftBrowser/Pods/scrypt/scrypt/Cimpl.h b/Example/web3swiftBrowser/Pods/scrypt/scrypt/Cimpl.h new file mode 100644 index 000000000..423fc7b4c --- /dev/null +++ b/Example/web3swiftBrowser/Pods/scrypt/scrypt/Cimpl.h @@ -0,0 +1,51 @@ +// Original work recognition + +/*- + * Copyright 2009 Colin Percival + * Copyright 2013 Alexander Peslyak + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. + * + * This file was originally written by Colin Percival as part of the Tarsnap + * online backup system. + */ + +// Cleanup and putting it all together + +// +// Cimpl.h +// scrypt +// +// Created by Alex Vlasov on 04.09.2018. +// Copyright © 2018 Alexander Vlasov. All rights reserved. +// + +#ifndef SalsaCimpl_h +#define SalsaCimpl_h +#include + +int +partial_Scrypt(uint64_t N, uint32_t _r, uint32_t _p, uint8_t *B, size_t B_size, + uint8_t *memory, size_t memory_size); + +#endif /* SalsaCimpl_h */ diff --git a/Example/web3swiftBrowser/Pods/scrypt/scrypt/module.modulemap b/Example/web3swiftBrowser/Pods/scrypt/scrypt/module.modulemap new file mode 100644 index 000000000..b184302fb --- /dev/null +++ b/Example/web3swiftBrowser/Pods/scrypt/scrypt/module.modulemap @@ -0,0 +1,4 @@ +module scryptC { + header "Cimpl.h" + export * +} diff --git a/Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt.h b/Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt.h new file mode 100755 index 000000000..adf224c44 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt.h @@ -0,0 +1,23 @@ +// +// scrypt_cryptoswift.h +// scrypt-cryptoswift +// +// Created by Alexander Vlasov on 08.08.2018. +// Copyright © 2018 Alexander Vlasov. All rights reserved. +// + +#if TARGET_OS_IPHONE +#import +#else +#import +#endif + +//! Project version number for scrypt_cryptoswift. +FOUNDATION_EXPORT double scrypt_cryptoswiftVersionNumber; + +//! Project version string for scrypt_cryptoswift. +FOUNDATION_EXPORT const unsigned char scrypt_cryptoswiftVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt/BufferStorage.swift b/Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt/BufferStorage.swift new file mode 100755 index 000000000..eccae9865 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt/BufferStorage.swift @@ -0,0 +1,158 @@ +// +// BufferStorage.swift +// web3swift +// +// Created by Alexander Vlasov on 10.08.2018. +// Copyright © 2018 Bankex Foundation. All rights reserved. +// +import Foundation + +final class BufferStorage{ + + typealias Index = Int + typealias Indices = CountableRange + typealias Element = T + + struct refCountedPtr { + var ptr: UnsafeMutablePointer + var refCount: Int + } + + private var ptr: refCountedPtr + private let capacity: Int + + public var count : Int { + return self.capacity + } + + init(ptr: refCountedPtr, capacity: Int) { + self.ptr = refCountedPtr(ptr: ptr.ptr, refCount: 0) + self.capacity = capacity + } + + init(capacity: Int) { + let ptr = UnsafeMutablePointer.allocate(capacity: capacity) + self.ptr = refCountedPtr(ptr: ptr, refCount: 1) + self.capacity = capacity + } + + // copy with pointer being strong referenced + init(array: Array) { + self.capacity = array.count + let ptr = UnsafeMutablePointer.allocate(capacity: capacity) + self.ptr = refCountedPtr(ptr: ptr, refCount: 1) + for i in 0...allocate(capacity: capacity) + self.ptr = refCountedPtr(ptr: ptr, refCount: 1) + for i in 0.., count: Int) -> BufferStorage { + let storage = BufferStorage(capacity: buffer.capacity) + storage.ptr.ptr.initialize(from: buffer.ptr.ptr, count: count) + return storage + } + + func copy(to: BufferStorage, count: Int) { + precondition(to.capacity >= count) + to.ptr.ptr.initialize(from: self.ptr.ptr, count: count) + } + + // provide weak view + subscript(bounds: Range) -> BufferStorage { + precondition(bounds.lowerBound < self.capacity) + let shiftedPtr = self.ptr.ptr.advanced(by: bounds.lowerBound) + let reducedCapacity = bounds.count + return BufferStorage(ptr: refCountedPtr(ptr: shiftedPtr, refCount: 0), capacity: reducedCapacity) + } + + // provide weak view + subscript(bounds: CountablePartialRangeFrom) -> BufferStorage { + precondition(bounds.lowerBound < self.capacity) + let shiftedPtr = self.ptr.ptr.advanced(by: bounds.lowerBound) + let reducedCapacity = self.capacity - bounds.lowerBound + return BufferStorage(ptr: refCountedPtr(ptr: shiftedPtr, refCount: 0), capacity: reducedCapacity) + } + + subscript(_ at: Index) -> T { + get { + if at < self.capacity { + return self.ptr.ptr.advanced(by: at).pointee + } else { + preconditionFailure("Index beyond end of queue") + } + } + set (newValue) { + if at < self.capacity { + self.ptr.ptr.advanced(by: at).pointee = newValue + } else { + preconditionFailure("Index beyond end of queue") + } + } + } + + func replace(_ at: Index, with: T) { + if at < self.capacity { + self.ptr.ptr.advanced(by: at).pointee = with + } else { + preconditionFailure("Index beyond end of queue") + } + } + + func replaceSubrange(_ subrange: Range, with newElements: C) where C: Collection, C.Iterator.Element == T { + precondition(subrange.lowerBound >= 0, "Subrange lowerBound is negative") + precondition(subrange.upperBound < self.capacity, "Subrange upper bound is out of range") + for (offset, element) in newElements.enumerated() { + let at = subrange.lowerBound.advanced(by: offset) + self.ptr.ptr.advanced(by: at).pointee = element + } + } + + func replaceSubrange(_ subrange: Range, with newElements: BufferStorage) { + precondition(subrange.lowerBound >= 0, "Subrange lowerBound is negative") + precondition(subrange.upperBound <= self.capacity, "Subrange upper bound is out of range") + precondition(subrange.count <= newElements.capacity) + self.ptr.ptr.advanced(by: subrange.lowerBound).initialize(from: newElements.ptr.ptr, count: subrange.count) // copy assign + } + +// func replaceSubrange(_ subrange: CountableRange, with newElements: BufferStorage) { +// precondition(subrange.lowerBound >= 0, "Subrange lowerBound is negative") +// precondition(subrange.upperBound <= self.capacity, "Subrange upper bound is out of range") +// precondition(subrange.count <= newElements.capacity) +// self.ptr.ptr.advanced(by: subrange.lowerBound).initialize(from: newElements.ptr.ptr, count: subrange.count) // copy assign +// } + + func replaceSubrange(_ at: Index, with: T) { + if at < self.capacity { + self.ptr.ptr.advanced(by: at).pointee = with + } else { + preconditionFailure("Index beyond end of queue") + } + } + + func toArray() -> Array { + var result = Array() + result.reserveCapacity(self.count) + for i in 0 ..< self.count { + result.append(self.ptr.ptr.advanced(by: i).pointee) + } + return result + } + + deinit { + if self.ptr.refCount == 1 { +// print("Strong deinit") + self.ptr.ptr.deallocate() + } + } +} diff --git a/Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt/Salsa.swift b/Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt/Salsa.swift new file mode 100755 index 000000000..fbaec0986 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt/Salsa.swift @@ -0,0 +1,198 @@ +// +// Salsa.swift +// scrypt-cryptoswift +// +// Created by Alexander Vlasov on 08.08.2018. +// Copyright © 2018 Alexander Vlasov. All rights reserved. +// + +import Foundation + +extension Array where Element == UInt8 { + func cast() -> Array { + let tSize = MemoryLayout.size + let (numElements, remainder) = self.count.quotientAndRemainder(dividingBy: tSize) + precondition(remainder == 0) + var result = Array() + result.reserveCapacity(numElements) + self.withUnsafeBytes { (bytes) -> Void in + for i in 0 ..< numElements { + let t = bytes.load(fromByteOffset: i*tSize, as: T.self) + result.append(t) + } + } + return result + } +} + +extension Array where Element == UInt8 { + func castToUInt32LE() -> Array { + let tSize = 4 + let (numElements, remainder) = self.count.quotientAndRemainder(dividingBy: tSize) + precondition(remainder == 0) + var result = Array(repeating: 0, count: numElements) + self.withUnsafeBytes { (bytes) -> Void in + for i in 0 ..< numElements { + result[i] = bytes.load(fromByteOffset: i*tSize, as: UInt32.self).littleEndian + } + } + return result + } +} + +extension Array where Element == UInt32 { + func castToBytes() -> Array { + let numElements = self.count * 4 + var result = Array(repeating: 0, count: numElements) + self.withUnsafeBytes { (bytes) -> Void in + for i in 0 ..< numElements { + result[i] = bytes.load(fromByteOffset: i, as: UInt8.self) + } + } + return result + } +} + +struct Salsa { + private static func R(_ a: UInt32, _ b: UInt32) -> UInt32 { + return (a << b) | (a >> (32 - b)) + } + + static func salsa20(_ B: inout Array, rounds: Int) { + var x = B.castToUInt32LE() + salsa20(&x, rounds: rounds) + B = x.castToBytes() + } + + static func fastSalsa20(_ B: inout Array, rounds: Int) { + let x = B.castToUInt32LE() + let buffer = BufferStorage(array: x) + salsa20(buffer, rounds: rounds) + B = buffer.toArray().castToBytes() + } + + static func quarterround(_ B: inout Array) { + B[1] ^= R(B[0] &+ B[3], 7); + B[2] ^= R(B[1] &+ B[0], 9); + B[3] ^= R(B[2] &+ B[1], 13); + B[0] ^= R(B[3] &+ B[2], 18); + } + + @inline(__always) static func doubleround(_ x: inout Array) { + // column rounds + x[4] ^= R(x[0] &+ x[12], 7); + x[8] ^= R(x[4] &+ x[0], 9); + x[12] ^= R(x[8] &+ x[4], 13); + x[0] ^= R(x[12] &+ x[8], 18); + + x[9] ^= R(x[5] &+ x[1], 7); + x[13] ^= R(x[9] &+ x[5], 9); + x[1] ^= R(x[13] &+ x[9], 13); + x[5] ^= R(x[1] &+ x[13], 18); + + x[14] ^= R(x[10] &+ x[6], 7); + x[2] ^= R(x[14] &+ x[10], 9); + x[6] ^= R(x[2] &+ x[14], 13); + x[10] ^= R(x[6] &+ x[2], 18); + + x[3] ^= R(x[15] &+ x[11], 7); + x[7] ^= R(x[3] &+ x[15], 9); + x[11] ^= R(x[7] &+ x[3], 13); + x[15] ^= R(x[11] &+ x[7], 18); + + // row rounds + x[1] ^= R(x[0] &+ x[3], 7); + x[2] ^= R(x[1] &+ x[0], 9); + x[3] ^= R(x[2] &+ x[1], 13); + x[0] ^= R(x[3] &+ x[2], 18); + + x[6] ^= R(x[5] &+ x[4], 7); + x[7] ^= R(x[6] &+ x[5], 9); + x[4] ^= R(x[7] &+ x[6], 13); + x[5] ^= R(x[4] &+ x[7], 18); + + x[11] ^= R(x[10] &+ x[9], 7); + x[8] ^= R(x[11] &+ x[10], 9); + x[9] ^= R(x[8] &+ x[11], 13); + x[10] ^= R(x[9] &+ x[8], 18); + + x[12] ^= R(x[15] &+ x[14], 7); + x[13] ^= R(x[12] &+ x[15], 9); + x[14] ^= R(x[13] &+ x[12], 13); + x[15] ^= R(x[14] &+ x[13], 18); + } + + static func salsa20(_ B: inout Array, rounds: Int) { + var x = B + for _ in stride(from: 0, to: rounds, by: 2) { + doubleround(&x) + } + for i in 0 ..< 16 { + B[i] = B[i] &+ x[i] + } + } + + @inline(__always) static func doubleround(_ x: BufferStorage) { + // column rounds + x[4] ^= R(x[0] &+ x[12], 7); + x[8] ^= R(x[4] &+ x[0], 9); + x[12] ^= R(x[8] &+ x[4], 13); + x[0] ^= R(x[12] &+ x[8], 18); + + x[9] ^= R(x[5] &+ x[1], 7); + x[13] ^= R(x[9] &+ x[5], 9); + x[1] ^= R(x[13] &+ x[9], 13); + x[5] ^= R(x[1] &+ x[13], 18); + + x[14] ^= R(x[10] &+ x[6], 7); + x[2] ^= R(x[14] &+ x[10], 9); + x[6] ^= R(x[2] &+ x[14], 13); + x[10] ^= R(x[6] &+ x[2], 18); + + x[3] ^= R(x[15] &+ x[11], 7); + x[7] ^= R(x[3] &+ x[15], 9); + x[11] ^= R(x[7] &+ x[3], 13); + x[15] ^= R(x[11] &+ x[7], 18); + + // row rounds + x[1] ^= R(x[0] &+ x[3], 7); + x[2] ^= R(x[1] &+ x[0], 9); + x[3] ^= R(x[2] &+ x[1], 13); + x[0] ^= R(x[3] &+ x[2], 18); + + x[6] ^= R(x[5] &+ x[4], 7); + x[7] ^= R(x[6] &+ x[5], 9); + x[4] ^= R(x[7] &+ x[6], 13); + x[5] ^= R(x[4] &+ x[7], 18); + + x[11] ^= R(x[10] &+ x[9], 7); + x[8] ^= R(x[11] &+ x[10], 9); + x[9] ^= R(x[8] &+ x[11], 13); + x[10] ^= R(x[9] &+ x[8], 18); + + x[12] ^= R(x[15] &+ x[14], 7); + x[13] ^= R(x[12] &+ x[15], 9); + x[14] ^= R(x[13] &+ x[12], 13); + x[15] ^= R(x[14] &+ x[13], 18); + } + + static func salsa20(_ B: BufferStorage, rounds: Int) { + let x = BufferStorage.copy(buffer: B, count: B.count) + for _ in stride(from: 0, to: rounds, by: 2) { + doubleround(x) + } + for i in 0 ..< 16 { + B[i] = B[i] &+ x[i] + } + } + + static func salsa20(_ B: BufferStorage, rounds: Int, tmp: BufferStorage) { + B.copy(to: tmp, count: B.count) + for _ in stride(from: 0, to: rounds, by: 2) { + doubleround(tmp) + } + for i in 0 ..< 16 { + B[i] = B[i] &+ tmp[i] + } + } +} diff --git a/Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt/Scrypt.swift b/Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt/Scrypt.swift new file mode 100755 index 000000000..a7d17fb0c --- /dev/null +++ b/Example/web3swiftBrowser/Pods/scrypt/scrypt/scrypt/Scrypt.swift @@ -0,0 +1,230 @@ +// +// Scrypt.swift +// scrypt-cryptoswift +// +// Created by Alexander Vlasov on 08.08.2018. +// Copyright © 2018 Alexander Vlasov. All rights reserved. +// + +// https://www.ietf.org/rfc/rfc7914.txt +// +import CryptoSwift +import scryptC + +/// A key derivation function. +/// +/// Scrypt - Password-Based Key Derivation Function. Key stretching technique. +// Passphrase: Bytes string of characters to be hashed +// Salt: Bytes random salt +// CostFactor (N): Integer CPU/memory cost parameter +// BlockSizeFactor (r): Integer blocksize parameter (8 is commonly used) +// ParallelizationFactor (p): Integer Parallelization parameter. (1..232-1 * hLen/MFlen) +// DesiredKeyLen: + +public struct Scrypt { + public enum Error: Swift.Error { + case invalidInput + case derivedKeyTooLong + case pValueTooLarge + case nValueNotPowerOf2 + } + + private let salt: Array // S + private let password: Array + fileprivate let blocksize: Int // 128 * r + private let dkLen: Int + private let N: Int + private let r: Int + private let p: Int + + public init(password: Array, salt: Array, dkLen: Int, N: Int, r: Int, p: Int) throws { + precondition(dkLen > 0) + precondition(N > 0) + precondition(r > 0) + precondition(p > 0) + + let MFLen = Double(r)*128 + let hLen = Double(32) + + if N & (N-1) != 0 { + throw Error.nValueNotPowerOf2 + } + + if Double(p) > (pow(2, 32) - 1) * hLen / MFLen { + throw Error.pValueTooLarge + } + + if Double(dkLen) > (pow(2, 32) - 1) * hLen { + throw Error.derivedKeyTooLong + } + + self.blocksize = 128 * r + self.N = N + self.r = r + self.p = p + self.password = password + self.salt = salt + self.dkLen = dkLen + } + + public func calculate() throws -> Array { + return try calculateUsingC() + } + + public func calculateNatively() throws -> Array { + var kdf = try CryptoSwift.PKCS5.PBKDF2(password: password, salt: salt, iterations: 1, keyLength: blocksize*p, variant: .sha256) + var B = try kdf.calculate() + let v = BufferStorage(repeating: 0, count: 32*N*r) + let xy = BufferStorage(repeating: 0, count: 64*r) // 128*2*r bytes + // no parallelization here for now + for i in 0 ..< p { + Scrypt.smix(b: &B[(i*128*r)...], N: N, r: r, v: v, xy: xy) + } + kdf = try CryptoSwift.PKCS5.PBKDF2(password: self.password, salt: B, iterations: 1, keyLength: dkLen, variant: .sha256) + let ret = try kdf.calculate() + return Array(ret) + } + + public func calculateUsingC() throws -> Array { + var kdf = try CryptoSwift.PKCS5.PBKDF2(password: password, salt: salt, iterations: 1, keyLength: blocksize*p, variant: .sha256) + var B = try kdf.calculate() + + let extraMemoryLength = 128 * r * N + 256 * r + 64 + var extraMemory = [UInt8](repeating: 0, count: extraMemoryLength) + + let res = partial_Scrypt(UInt64(N), UInt32(r), UInt32(p), &B, B.count, &extraMemory, extraMemoryLength) + if res != 0 { + throw Error.derivedKeyTooLong + } + kdf = try CryptoSwift.PKCS5.PBKDF2(password: self.password, salt: B, iterations: 1, keyLength: dkLen, variant: .sha256) + let ret = try kdf.calculate() + return Array(ret) + } + +} + +extension Scrypt { + static func blockCopy(destination: BufferStorage, source: BufferStorage, n: Int) { + destination.replaceSubrange(0 ..< n, with: source) + } + + static func blockXOR(destination: BufferStorage, source: BufferStorage, n: Int) { + for i in 0 ..< n { + destination[i] ^= source[i] + } + } + + static func blockMix(tmp: BufferStorage, source: BufferStorage, destination: BufferStorage, r: Int) { + blockCopy(destination: tmp, source: source[((2*r-1)*16)...], n: 16) + for i in stride(from: 0, to: 2*r, by: 2) { + salsaXOR(tmp: tmp, source: source[(i*16)...], destination: destination[(i*8)...]) + salsaXOR(tmp: tmp, source: source[(i*16 + 16)...], destination: destination[(i*8 + r*16)...]) + } + } + + static func salsaXOR(tmp: BufferStorage, source: BufferStorage, destination: BufferStorage) { + blockXOR(destination: tmp, source: source, n: 16) + // reuse destination as a temporary memory + Salsa.salsa20(tmp, rounds: 8, tmp: destination) + blockCopy(destination: destination, source: tmp, n: 16) + } + + static func integerify(b : BufferStorage, r: Int) -> UInt64 { + let j = (2*r - 1) * 16 + return UInt64(b[j]) | (UInt64(b[j+1]) << 32) // LE + } + + @inline(__always) static func smix(b: inout ArraySlice, N: Int, r: Int, v: BufferStorage, xy: BufferStorage) { + let tmp = BufferStorage(repeating: 0, count: 16) + let x = xy + let y = xy[(32*r)...] + + var j = b.startIndex + for i in 0 ..< 32*r { + x[i] = UInt32(b[j]) | UInt32(b[j+1])<<8 | UInt32(b[j+2])<<16 | UInt32(b[j+3])<<24 // decode as LE Uint32 + j += 4 + } + for i in stride(from: 0, to: N, by: 2) { + Scrypt.blockCopy(destination: v[(i*(32*r))...], source: x, n: 32*r) + // blockMix starts with copy, so tmp can be garbage + Scrypt.blockMix(tmp: tmp, source: x, destination: y, r: r) + + Scrypt.blockCopy(destination: v[((i+1)*(32*r))...], source: y, n: 32*r) + // blockMix starts with copy, so tmp can be garbage + Scrypt.blockMix(tmp: tmp, source: y, destination: x, r: r) + } + + for _ in stride(from: 0, to: N, by: 2) { + var j = Int(Scrypt.integerify(b: x, r: r) & UInt64(N-1) ) + Scrypt.blockXOR(destination: x, source: v[(j*(32*r))...], n: 32*r) + // blockMix starts with copy, so tmp can be garbage + Scrypt.blockMix(tmp: tmp, source: x, destination: y, r: r) + + j = Int(Scrypt.integerify(b: y, r: r) & UInt64(N-1) ) + Scrypt.blockXOR(destination: y, source: v[(j*(32*r))...], n: 32*r) + // blockMix starts with copy, so tmp can be garbage + Scrypt.blockMix(tmp: tmp, source: y, destination: x, r: r) + } + j = b.startIndex + for i in 0 ..< 32*r { + let v = x[i] + b[j+0] = UInt8(v >> 0 & 0xff) + b[j+1] = UInt8(v >> 8 & 0xff) + b[j+2] = UInt8(v >> 16 & 0xff) + b[j+3] = UInt8(v >> 24 & 0xff) + j += 4 + } + } + + static func smix(b: inout ArraySlice, N: Int, r: Int, v: BufferStorage, x: BufferStorage, y: BufferStorage) { + let tmp = BufferStorage(repeating: 0, count: 16) + + var j = b.startIndex + for i in 0 ..< 32*r { + x[i] = UInt32(b[j]) | UInt32(b[j+1])<<8 | UInt32(b[j+2])<<16 | UInt32(b[j+3])<<24 // decode as LE Uint32 + j += 4 + } + for i in stride(from: 0, to: N, by: 2) { + Scrypt.blockCopy(destination: v[(i*(32*r))...], source: x, n: 32*r) + // blockMix starts with copy, so tmp can be garbage + Scrypt.blockMix(tmp: tmp, source: x, destination: y, r: r) + + Scrypt.blockCopy(destination: v[((i+1)*(32*r))...], source: y, n: 32*r) + // blockMix starts with copy, so tmp can be garbage + Scrypt.blockMix(tmp: tmp, source: y, destination: x, r: r) + } + + for _ in stride(from: 0, to: N, by: 2) { + var j = Int(Scrypt.integerify(b: x, r: r) & UInt64(N-1) ) + Scrypt.blockXOR(destination: x, source: v[(j*(32*r))...], n: 32*r) + // blockMix starts with copy, so tmp can be garbage + Scrypt.blockMix(tmp: tmp, source: x, destination: y, r: r) + + j = Int(Scrypt.integerify(b: y, r: r) & UInt64(N-1) ) + Scrypt.blockXOR(destination: y, source: v[(j*(32*r))...], n: 32*r) + // blockMix starts with copy, so tmp can be garbage + Scrypt.blockMix(tmp: tmp, source: y, destination: x, r: r) + } + j = b.startIndex + for i in 0 ..< 32*r { + let v = x[i] + b[j+0] = UInt8(v >> 0 & 0xff) + b[j+1] = UInt8(v >> 8 & 0xff) + b[j+2] = UInt8(v >> 16 & 0xff) + b[j+3] = UInt8(v >> 24 & 0xff) + j += 4 + } + } + + static func integerify(_ X: Array) -> UInt64 { + precondition(X.count >= 8) + let count = X.count + var result = UInt64(0) + var shift = 56 + for i in (count-8 ..< count).reversed() { + result |= UInt64(X[i]) << shift + shift -= 8 + } + return result + } +} diff --git a/Example/web3swiftExample/Pods/secp256k1_ios/secp256k1_ios/libsecp256k1-config.h b/Example/web3swiftBrowser/Pods/secp256k1_swift/Classes/libsecp256k1-config.h old mode 100644 new mode 100755 similarity index 100% rename from Example/web3swiftExample/Pods/secp256k1_ios/secp256k1_ios/libsecp256k1-config.h rename to Example/web3swiftBrowser/Pods/secp256k1_swift/Classes/libsecp256k1-config.h diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/LibSecp256k1Extension.swift b/Example/web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1.swift similarity index 68% rename from Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/LibSecp256k1Extension.swift rename to Example/web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1.swift index bf41816f3..80b97b4d8 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/LibSecp256k1Extension.swift +++ b/Example/web3swiftBrowser/Pods/secp256k1_swift/Classes/secp256k1.swift @@ -1,33 +1,33 @@ // -// LibSecp256k1Extension.swift -// web3swift-iOS +// secp256k1.swift +// secp256k1_swift // -// Created by Alexander Vlasov. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alexander Vlasov on 30.05.2018. +// Copyright © 2018 Alexander Vlasov. All rights reserved. // - import Foundation -import secp256k1_ios -import BigInt - - - +#if CARTHAGE +import libsecp256k1 +#endif public struct SECP256K1 { public struct UnmarshaledSignature{ - var v: UInt8 - var r = [UInt8](repeating: 0, count: 32) - var s = [UInt8](repeating: 0, count: 32) + public var v: UInt8 = 0 + public var r = Data(repeating: 0, count: 32) + public var s = Data(repeating: 0, count: 32) + + public init(v: UInt8, r: Data, s: Data) { + self.v = v + self.r = r + self.s = s + } } - - static var secp256k1_N = BigUInt("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141", radix: 16)! - static var secp256k1_halfN = secp256k1_N >> 2 } extension SECP256K1 { - static var context = secp256k1_context_create(UInt32(SECP256K1_CONTEXT_SIGN|SECP256K1_CONTEXT_VERIFY)) + static let context = secp256k1_context_create(UInt32(SECP256K1_CONTEXT_SIGN|SECP256K1_CONTEXT_VERIFY)) - static func signForRecovery(hash: Data, privateKey: Data, useExtraEntropy: Bool = false) -> (serializedSignature:Data?, rawSignature: Data?) { + public static func signForRecovery(hash: Data, privateKey: Data, useExtraEntropy: Bool = false) -> (serializedSignature:Data?, rawSignature: Data?) { if (hash.count != 32 || privateKey.count != 32) {return (nil, nil)} if !SECP256K1.verifyPrivateKey(privateKey: privateKey) { return (nil, nil) @@ -38,27 +38,24 @@ extension SECP256K1 { } guard let truePublicKey = SECP256K1.privateKeyToPublicKey(privateKey: privateKey) else {continue} guard let recoveredPublicKey = SECP256K1.recoverPublicKey(hash: hash, recoverableSignature: &recoverableSignature) else {continue} - if Data(toByteArray(truePublicKey.data)) != Data(toByteArray(recoveredPublicKey.data)) { -// print("Didn't recover correctly!") + if !SECP256K1.constantTimeComparison(Data(toByteArray(truePublicKey.data)), Data(toByteArray(recoveredPublicKey.data))) { continue } guard let serializedSignature = SECP256K1.serializeSignature(recoverableSignature: &recoverableSignature) else {continue} let rawSignature = Data(toByteArray(recoverableSignature)) return (serializedSignature, rawSignature) -// print("Signature required \(rounds) rounds") } - print("Signature required 1024 rounds and failed") return (nil, nil) } - static func privateToPublic(privateKey: Data, compressed: Bool = false) -> Data? { + public static func privateToPublic(privateKey: Data, compressed: Bool = false) -> Data? { if (privateKey.count != 32) {return nil} guard var publicKey = SECP256K1.privateKeyToPublicKey(privateKey: privateKey) else {return nil} guard let serializedKey = serializePublicKey(publicKey: &publicKey, compressed: compressed) else {return nil} return serializedKey } - static func combineSerializedPublicKeys(keys: [Data], outputCompressed: Bool = false) -> Data? { + public static func combineSerializedPublicKeys(keys: [Data], outputCompressed: Bool = false) -> Data? { let numToCombine = keys.count guard numToCombine >= 1 else { return nil} var storage = ContiguousArray() @@ -79,17 +76,9 @@ extension SECP256K1 { } let immutablePointer = UnsafePointer(arrayOfPointers) var publicKey: secp256k1_pubkey = secp256k1_pubkey() - -// let bufferPointer = UnsafeBufferPointer(start: immutablePointer, count: numToCombine) -// for (index, value) in bufferPointer.enumerated() { -// print("pointer value \(index): \(value!)") -// let val = value?.pointee -// print("value \(index): \(val!)") -// } -// let result = withUnsafeMutablePointer(to: &publicKey) { (pubKeyPtr: UnsafeMutablePointer) -> Int32 in - let res = secp256k1_ec_pubkey_combine(context!, pubKeyPtr, immutablePointer, numToCombine) - return res + let res = secp256k1_ec_pubkey_combine(context!, pubKeyPtr, immutablePointer, numToCombine) + return res } if result == 0 { return nil @@ -99,7 +88,7 @@ extension SECP256K1 { } - static func recoverPublicKey(hash: Data, recoverableSignature: inout secp256k1_ecdsa_recoverable_signature) -> secp256k1_pubkey? { + internal static func recoverPublicKey(hash: Data, recoverableSignature: inout secp256k1_ecdsa_recoverable_signature) -> secp256k1_pubkey? { guard hash.count == 32 else {return nil} var publicKey: secp256k1_pubkey = secp256k1_pubkey() let result = hash.withUnsafeBytes { (hashPointer:UnsafePointer) -> Int32 in @@ -117,7 +106,7 @@ extension SECP256K1 { return publicKey } - static func privateKeyToPublicKey(privateKey: Data) -> secp256k1_pubkey? { + internal static func privateKeyToPublicKey(privateKey: Data) -> secp256k1_pubkey? { if (privateKey.count != 32) {return nil} var publicKey = secp256k1_pubkey() let result = privateKey.withUnsafeBytes { (privateKeyPointer:UnsafePointer) -> Int32 in @@ -130,7 +119,7 @@ extension SECP256K1 { return publicKey } - static func serializePublicKey(publicKey: inout secp256k1_pubkey, compressed: Bool = false) -> Data? { + public static func serializePublicKey(publicKey: inout secp256k1_pubkey, compressed: Bool = false) -> Data? { var keyLength = compressed ? 33 : 65 var serializedPubkey = Data(repeating: 0x00, count: keyLength) let result = serializedPubkey.withUnsafeMutableBytes { (serializedPubkeyPointer:UnsafeMutablePointer) -> Int32 in @@ -152,7 +141,7 @@ extension SECP256K1 { return Data(serializedPubkey) } - static func parsePublicKey(serializedKey: Data) -> secp256k1_pubkey? { + internal static func parsePublicKey(serializedKey: Data) -> secp256k1_pubkey? { guard serializedKey.count == 33 || serializedKey.count == 65 else { return nil } @@ -161,22 +150,22 @@ extension SECP256K1 { let result = serializedKey.withUnsafeBytes { (serializedKeyPointer:UnsafePointer) -> Int32 in let res = secp256k1_ec_pubkey_parse(context!, UnsafeMutablePointer(&publicKey), serializedKeyPointer, keyLen) return res - } + } if result == 0 { return nil } return publicKey } - static func parseSignature(signature: Data) -> secp256k1_ecdsa_recoverable_signature? { - guard signature.count == 65 else {return nil} + public static func parseSignature(signature: Data) -> secp256k1_ecdsa_recoverable_signature? { + guard signature.count == 65 else {return nil} var recoverableSignature: secp256k1_ecdsa_recoverable_signature = secp256k1_ecdsa_recoverable_signature() let serializedSignature = Data(signature[0..<64]) let v = Int32(signature[64]) let result = serializedSignature.withUnsafeBytes{ (serPtr: UnsafePointer) -> Int32 in withUnsafeMutablePointer(to: &recoverableSignature, { (signaturePointer:UnsafeMutablePointer) -> Int32 in - let res = secp256k1_ecdsa_recoverable_signature_parse_compact(context!, signaturePointer, serPtr, v) - return res + let res = secp256k1_ecdsa_recoverable_signature_parse_compact(context!, signaturePointer, serPtr, v) + return res }) } if result == 0 { @@ -185,7 +174,7 @@ extension SECP256K1 { return recoverableSignature } - static func serializeSignature(recoverableSignature: inout secp256k1_ecdsa_recoverable_signature) -> Data? { + internal static func serializeSignature(recoverableSignature: inout secp256k1_ecdsa_recoverable_signature) -> Data? { var serializedSignature = Data(repeating: 0x00, count: 64) var v: Int32 = 0 let result = serializedSignature.withUnsafeMutableBytes { (serSignaturePointer:UnsafeMutablePointer) -> Int32 in @@ -209,7 +198,7 @@ extension SECP256K1 { return Data(serializedSignature) } - static func recoverableSign(hash: Data, privateKey: Data, useExtraEntropy: Bool = true) -> secp256k1_ecdsa_recoverable_signature? { + internal static func recoverableSign(hash: Data, privateKey: Data, useExtraEntropy: Bool = false) -> secp256k1_ecdsa_recoverable_signature? { if (hash.count != 32 || privateKey.count != 32) { return nil } @@ -217,24 +206,25 @@ extension SECP256K1 { return nil } var recoverableSignature: secp256k1_ecdsa_recoverable_signature = secp256k1_ecdsa_recoverable_signature(); - guard let extraEntropy = Data.randomBytes(length: 32) else {return nil} + guard let extraEntropy = SECP256K1.randomBytes(length: 32) else {return nil} let result = hash.withUnsafeBytes { (hashPointer:UnsafePointer) -> Int32 in privateKey.withUnsafeBytes { (privateKeyPointer:UnsafePointer) -> Int32 in extraEntropy.withUnsafeBytes { (extraEntropyPointer:UnsafePointer) -> Int32 in withUnsafeMutablePointer(to: &recoverableSignature, { (recSignaturePtr: UnsafeMutablePointer) -> Int32 in - let res = secp256k1_ecdsa_sign_recoverable(context!, recSignaturePtr, hashPointer, privateKeyPointer, nil, useExtraEntropy ? extraEntropyPointer : nil) - return res - }) + let res = secp256k1_ecdsa_sign_recoverable(context!, recSignaturePtr, hashPointer, privateKeyPointer, nil, useExtraEntropy ? extraEntropyPointer : nil) + return res + }) } } } if result == 0 { + print("Failed to sign!") return nil } return recoverableSignature } - static func recoverPublicKey(hash: Data, signature: Data, compressed: Bool = false) -> Data? { + public static func recoverPublicKey(hash: Data, signature: Data, compressed: Bool = false) -> Data? { guard hash.count == 32, signature.count == 65 else {return nil} guard var recoverableSignature = parseSignature(signature: signature) else {return nil} guard var publicKey = SECP256K1.recoverPublicKey(hash: hash, recoverableSignature: &recoverableSignature) else {return nil} @@ -242,14 +232,8 @@ extension SECP256K1 { return serializedKey } - static func recoverSender(hash: Data, signature: Data) -> EthereumAddress? { - guard let pubKey = SECP256K1.recoverPublicKey(hash:hash, signature:signature, compressed: false) else {return nil} - guard pubKey.count == 65 else {return nil} - let addressData = Data(pubKey.sha3(.keccak256)[12..<32]) - return EthereumAddress(addressData) - } - static func verifyPrivateKey(privateKey: Data) -> Bool { + public static func verifyPrivateKey(privateKey: Data) -> Bool { if (privateKey.count != 32) {return false} let result = privateKey.withUnsafeBytes { (privateKeyPointer:UnsafePointer) -> Int32 in let res = secp256k1_ec_seckey_verify(context!, privateKeyPointer) @@ -258,9 +242,12 @@ extension SECP256K1 { return result == 1 } - static func generatePrivateKey() -> Data? { + public static func generatePrivateKey() -> Data? { for _ in 0...1024 { - guard let keyData = Data.randomBytes(length: 32) else { + guard let keyData = SECP256K1.randomBytes(length: 32) else { + continue + } + guard SECP256K1.verifyPrivateKey(privateKey: keyData) else { continue } return keyData @@ -268,22 +255,15 @@ extension SECP256K1 { return nil } - static func unmarshalSignature(signatureData:Data) -> UnmarshaledSignature? { + public static func unmarshalSignature(signatureData:Data) -> UnmarshaledSignature? { if (signatureData.count != 65) {return nil} - let bytes = signatureData.bytes - let r = Array(bytes[0..<32]) - let s = Array(bytes[32..<64]) - var v = bytes[64] - if v >= 27 { - v = v - 27 - } - if v > 3 { - return nil - } + let v = signatureData[64] + let r = Data(signatureData[0..<32]) + let s = Data(signatureData[32..<64]) return UnmarshaledSignature(v: v, r: r, s: s) } - static func marshalSignature(v: UInt8, r: [UInt8], s: [UInt8]) -> Data? { + public static func marshalSignature(v: UInt8, r: [UInt8], s: [UInt8]) -> Data? { guard r.count == 32, s.count == 32 else {return nil} var completeSignature = Data(bytes: r) completeSignature.append(Data(bytes: s)) @@ -291,13 +271,47 @@ extension SECP256K1 { return completeSignature } - static func marshalSignature(v: Data, r: Data, s: Data) -> Data? { - guard r.count == 32, s.count == 32, v.count == 1 else {return nil} + public static func marshalSignature(v: Data, r: Data, s: Data) -> Data? { + guard r.count == 32, s.count == 32 else {return nil} var completeSignature = Data(r) completeSignature.append(s) completeSignature.append(v) return completeSignature } + + internal static func randomBytes(length: Int) -> Data? { + for _ in 0...1024 { + var data = Data(repeating: 0, count: length) + let result = data.withUnsafeMutableBytes { + (mutableBytes: UnsafeMutablePointer) -> Int32 in + SecRandomCopyBytes(kSecRandomDefault, 32, mutableBytes) + } + if result == errSecSuccess { + return data + } + } + return nil + } + + internal static func toByteArray(_ value: T) -> [UInt8] { + var value = value + return withUnsafeBytes(of: &value) { Array($0) } + } + + internal static func fromByteArray(_ value: [UInt8], _: T.Type) -> T { + return value.withUnsafeBytes { + $0.baseAddress!.load(as: T.self) + } + } + + internal static func constantTimeComparison(_ lhs: Data, _ rhs:Data) -> Bool { + guard lhs.count == rhs.count else {return false} + var difference = UInt8(0x00) + for i in 0.. (bankexfoundation.org) + +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/Example/web3swiftBrowser/Pods/secp256k1_swift/README.md b/Example/web3swiftBrowser/Pods/secp256k1_swift/README.md new file mode 100755 index 000000000..f677b5a81 --- /dev/null +++ b/Example/web3swiftBrowser/Pods/secp256k1_swift/README.md @@ -0,0 +1,8 @@ +# secp256k1_swift + +## Usage + +Add to the Podfile +``` +pod 'secp256k1_swift', '~> 1.0.0' +``` diff --git a/Example/web3swiftBrowser/web3swiftBrowser.xcodeproj/project.pbxproj b/Example/web3swiftBrowser/web3swiftBrowser.xcodeproj/project.pbxproj new file mode 100644 index 000000000..ddd8c0f91 --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser.xcodeproj/project.pbxproj @@ -0,0 +1,675 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 81BD7DDF21944880006F9D6D /* Web3Swift.js in Resources */ = {isa = PBXBuildFile; fileRef = 81BD7DDE21944880006F9D6D /* Web3Swift.js */; }; + 81BD7DE1219448B5006F9D6D /* Web3Swift.min.js in Resources */ = {isa = PBXBuildFile; fileRef = 81BD7DE0219448B5006F9D6D /* Web3Swift.min.js */; }; + 81E09B202002623A005DF51D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E09B1F2002623A005DF51D /* AppDelegate.swift */; }; + 81E09B222002623A005DF51D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E09B212002623A005DF51D /* ViewController.swift */; }; + 81E09B252002623A005DF51D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81E09B232002623A005DF51D /* Main.storyboard */; }; + 81E09B282002623A005DF51D /* web3swiftBrowser.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 81E09B262002623A005DF51D /* web3swiftBrowser.xcdatamodeld */; }; + 81E09B2A2002623A005DF51D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 81E09B292002623A005DF51D /* Assets.xcassets */; }; + 81E09B2D2002623A005DF51D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81E09B2B2002623A005DF51D /* LaunchScreen.storyboard */; }; + 81E09B382002623B005DF51D /* web3swiftBrowserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E09B372002623B005DF51D /* web3swiftBrowserTests.swift */; }; + 81E09B432002623B005DF51D /* web3swiftBrowserUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E09B422002623B005DF51D /* web3swiftBrowserUITests.swift */; }; + C2C40799AB45A254C5B8B694 /* Pods_web3swiftBrowser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D2B1946592C2F6161DF2A16 /* Pods_web3swiftBrowser.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 81E09B342002623B005DF51D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 81E09B142002623A005DF51D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 81E09B1B2002623A005DF51D; + remoteInfo = web3swiftBrowser; + }; + 81E09B3F2002623B005DF51D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 81E09B142002623A005DF51D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 81E09B1B2002623A005DF51D; + remoteInfo = web3swiftBrowser; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 2F89255F9B9DFBDF61D676C1 /* Pods-web3swiftBrowser.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-web3swiftBrowser.debug.xcconfig"; path = "Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.debug.xcconfig"; sourceTree = ""; }; + 3D2B1946592C2F6161DF2A16 /* Pods_web3swiftBrowser.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_web3swiftBrowser.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 81BD7DDE21944880006F9D6D /* Web3Swift.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = Web3Swift.js; sourceTree = ""; }; + 81BD7DE0219448B5006F9D6D /* Web3Swift.min.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = Web3Swift.min.js; sourceTree = ""; }; + 81E09B1C2002623A005DF51D /* web3swiftBrowser.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = web3swiftBrowser.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 81E09B1F2002623A005DF51D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 81E09B212002623A005DF51D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 81E09B242002623A005DF51D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 81E09B272002623A005DF51D /* web3swiftBrowser.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = web3swiftBrowser.xcdatamodel; sourceTree = ""; }; + 81E09B292002623A005DF51D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 81E09B2C2002623A005DF51D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 81E09B2E2002623A005DF51D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 81E09B332002623B005DF51D /* web3swiftBrowserTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = web3swiftBrowserTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 81E09B372002623B005DF51D /* web3swiftBrowserTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swiftBrowserTests.swift; sourceTree = ""; }; + 81E09B392002623B005DF51D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 81E09B3E2002623B005DF51D /* web3swiftBrowserUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = web3swiftBrowserUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 81E09B422002623B005DF51D /* web3swiftBrowserUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swiftBrowserUITests.swift; sourceTree = ""; }; + 81E09B442002623B005DF51D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + FE32BFE26D945D8D376882BB /* Pods-web3swiftBrowser.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-web3swiftBrowser.release.xcconfig"; path = "Pods/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 81E09B192002623A005DF51D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C2C40799AB45A254C5B8B694 /* Pods_web3swiftBrowser.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 81E09B302002623B005DF51D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 81E09B3B2002623B005DF51D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 781266D867FD7907798A4689 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 3D2B1946592C2F6161DF2A16 /* Pods_web3swiftBrowser.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 81E09B132002623A005DF51D = { + isa = PBXGroup; + children = ( + 81E09B1E2002623A005DF51D /* web3swiftBrowser */, + 81E09B362002623B005DF51D /* web3swiftBrowserTests */, + 81E09B412002623B005DF51D /* web3swiftBrowserUITests */, + 81E09B1D2002623A005DF51D /* Products */, + F77DEFCDCCAAB6607113C871 /* Pods */, + 781266D867FD7907798A4689 /* Frameworks */, + ); + sourceTree = ""; + }; + 81E09B1D2002623A005DF51D /* Products */ = { + isa = PBXGroup; + children = ( + 81E09B1C2002623A005DF51D /* web3swiftBrowser.app */, + 81E09B332002623B005DF51D /* web3swiftBrowserTests.xctest */, + 81E09B3E2002623B005DF51D /* web3swiftBrowserUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 81E09B1E2002623A005DF51D /* web3swiftBrowser */ = { + isa = PBXGroup; + children = ( + 81E09B1F2002623A005DF51D /* AppDelegate.swift */, + 81BD7DDE21944880006F9D6D /* Web3Swift.js */, + 81BD7DE0219448B5006F9D6D /* Web3Swift.min.js */, + 81E09B212002623A005DF51D /* ViewController.swift */, + 81E09B232002623A005DF51D /* Main.storyboard */, + 81E09B292002623A005DF51D /* Assets.xcassets */, + 81E09B2B2002623A005DF51D /* LaunchScreen.storyboard */, + 81E09B2E2002623A005DF51D /* Info.plist */, + 81E09B262002623A005DF51D /* web3swiftBrowser.xcdatamodeld */, + ); + path = web3swiftBrowser; + sourceTree = ""; + }; + 81E09B362002623B005DF51D /* web3swiftBrowserTests */ = { + isa = PBXGroup; + children = ( + 81E09B372002623B005DF51D /* web3swiftBrowserTests.swift */, + 81E09B392002623B005DF51D /* Info.plist */, + ); + path = web3swiftBrowserTests; + sourceTree = ""; + }; + 81E09B412002623B005DF51D /* web3swiftBrowserUITests */ = { + isa = PBXGroup; + children = ( + 81E09B422002623B005DF51D /* web3swiftBrowserUITests.swift */, + 81E09B442002623B005DF51D /* Info.plist */, + ); + path = web3swiftBrowserUITests; + sourceTree = ""; + }; + F77DEFCDCCAAB6607113C871 /* Pods */ = { + isa = PBXGroup; + children = ( + 2F89255F9B9DFBDF61D676C1 /* Pods-web3swiftBrowser.debug.xcconfig */, + FE32BFE26D945D8D376882BB /* Pods-web3swiftBrowser.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 81E09B1B2002623A005DF51D /* web3swiftBrowser */ = { + isa = PBXNativeTarget; + buildConfigurationList = 81E09B472002623B005DF51D /* Build configuration list for PBXNativeTarget "web3swiftBrowser" */; + buildPhases = ( + 9A11C03ACBB5B5900D5122FB /* [CP] Check Pods Manifest.lock */, + 81E09B182002623A005DF51D /* Sources */, + 81E09B192002623A005DF51D /* Frameworks */, + 81E09B1A2002623A005DF51D /* Resources */, + 062413EA48CB3776C65CDAF2 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = web3swiftBrowser; + productName = web3swiftBrowser; + productReference = 81E09B1C2002623A005DF51D /* web3swiftBrowser.app */; + productType = "com.apple.product-type.application"; + }; + 81E09B322002623B005DF51D /* web3swiftBrowserTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 81E09B4A2002623B005DF51D /* Build configuration list for PBXNativeTarget "web3swiftBrowserTests" */; + buildPhases = ( + 81E09B2F2002623B005DF51D /* Sources */, + 81E09B302002623B005DF51D /* Frameworks */, + 81E09B312002623B005DF51D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 81E09B352002623B005DF51D /* PBXTargetDependency */, + ); + name = web3swiftBrowserTests; + productName = web3swiftBrowserTests; + productReference = 81E09B332002623B005DF51D /* web3swiftBrowserTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 81E09B3D2002623B005DF51D /* web3swiftBrowserUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 81E09B4D2002623B005DF51D /* Build configuration list for PBXNativeTarget "web3swiftBrowserUITests" */; + buildPhases = ( + 81E09B3A2002623B005DF51D /* Sources */, + 81E09B3B2002623B005DF51D /* Frameworks */, + 81E09B3C2002623B005DF51D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 81E09B402002623B005DF51D /* PBXTargetDependency */, + ); + name = web3swiftBrowserUITests; + productName = web3swiftBrowserUITests; + productReference = 81E09B3E2002623B005DF51D /* web3swiftBrowserUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 81E09B142002623A005DF51D /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 0920; + ORGANIZATIONNAME = "Alexander Vlasov"; + TargetAttributes = { + 81E09B1B2002623A005DF51D = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + }; + 81E09B322002623B005DF51D = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + TestTargetID = 81E09B1B2002623A005DF51D; + }; + 81E09B3D2002623B005DF51D = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + TestTargetID = 81E09B1B2002623A005DF51D; + }; + }; + }; + buildConfigurationList = 81E09B172002623A005DF51D /* Build configuration list for PBXProject "web3swiftBrowser" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 81E09B132002623A005DF51D; + productRefGroup = 81E09B1D2002623A005DF51D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 81E09B1B2002623A005DF51D /* web3swiftBrowser */, + 81E09B322002623B005DF51D /* web3swiftBrowserTests */, + 81E09B3D2002623B005DF51D /* web3swiftBrowserUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 81E09B1A2002623A005DF51D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 81BD7DE1219448B5006F9D6D /* Web3Swift.min.js in Resources */, + 81E09B2D2002623A005DF51D /* LaunchScreen.storyboard in Resources */, + 81BD7DDF21944880006F9D6D /* Web3Swift.js in Resources */, + 81E09B2A2002623A005DF51D /* Assets.xcassets in Resources */, + 81E09B252002623A005DF51D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 81E09B312002623B005DF51D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 81E09B3C2002623B005DF51D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 062413EA48CB3776C65CDAF2 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/BigInt/BigInt.framework", + "${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework", + "${BUILT_PRODUCTS_DIR}/EthereumABI/EthereumABI.framework", + "${BUILT_PRODUCTS_DIR}/EthereumAddress/EthereumAddress.framework", + "${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework", + "${BUILT_PRODUCTS_DIR}/SipHash/SipHash.framework", + "${BUILT_PRODUCTS_DIR}/SwiftRLP/SwiftRLP.framework", + "${BUILT_PRODUCTS_DIR}/WKBridge/WKBridge.framework", + "${BUILT_PRODUCTS_DIR}/scrypt/scrypt.framework", + "${BUILT_PRODUCTS_DIR}/secp256k1_swift/secp256k1_swift.framework", + "${BUILT_PRODUCTS_DIR}/web3swift/Web3swift.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BigInt.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CryptoSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EthereumABI.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EthereumAddress.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PromiseKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SipHash.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftRLP.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WKBridge.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/scrypt.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/secp256k1_swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Web3swift.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-web3swiftBrowser/Pods-web3swiftBrowser-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 9A11C03ACBB5B5900D5122FB /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-web3swiftBrowser-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 */ + 81E09B182002623A005DF51D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 81E09B222002623A005DF51D /* ViewController.swift in Sources */, + 81E09B282002623A005DF51D /* web3swiftBrowser.xcdatamodeld in Sources */, + 81E09B202002623A005DF51D /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 81E09B2F2002623B005DF51D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 81E09B382002623B005DF51D /* web3swiftBrowserTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 81E09B3A2002623B005DF51D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 81E09B432002623B005DF51D /* web3swiftBrowserUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 81E09B352002623B005DF51D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 81E09B1B2002623A005DF51D /* web3swiftBrowser */; + targetProxy = 81E09B342002623B005DF51D /* PBXContainerItemProxy */; + }; + 81E09B402002623B005DF51D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 81E09B1B2002623A005DF51D /* web3swiftBrowser */; + targetProxy = 81E09B3F2002623B005DF51D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 81E09B232002623A005DF51D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 81E09B242002623A005DF51D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 81E09B2B2002623A005DF51D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 81E09B2C2002623A005DF51D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 81E09B452002623B005DF51D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = 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_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + 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; + CODE_SIGN_IDENTITY = "iPhone Developer"; + 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 = ( + "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 = 11.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 81E09B462002623B005DF51D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = 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_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + 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; + CODE_SIGN_IDENTITY = "iPhone Developer"; + 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_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 = 11.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 81E09B482002623B005DF51D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2F89255F9B9DFBDF61D676C1 /* Pods-web3swiftBrowser.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 62V9CKQN89; + INFOPLIST_FILE = web3swiftBrowser/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.thematter.web3swiftBrowser; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 81E09B492002623B005DF51D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FE32BFE26D945D8D376882BB /* Pods-web3swiftBrowser.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 62V9CKQN89; + INFOPLIST_FILE = web3swiftBrowser/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.thematter.web3swiftBrowser; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 81E09B4B2002623B005DF51D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 62V9CKQN89; + INFOPLIST_FILE = web3swiftBrowserTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.thematter.web3swiftBrowserTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/web3swiftBrowser.app/web3swiftBrowser"; + }; + name = Debug; + }; + 81E09B4C2002623B005DF51D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 62V9CKQN89; + INFOPLIST_FILE = web3swiftBrowserTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.thematter.web3swiftBrowserTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/web3swiftBrowser.app/web3swiftBrowser"; + }; + name = Release; + }; + 81E09B4E2002623B005DF51D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 62V9CKQN89; + INFOPLIST_FILE = web3swiftBrowserUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.thematter.web3swiftBrowserUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = web3swiftBrowser; + }; + name = Debug; + }; + 81E09B4F2002623B005DF51D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 62V9CKQN89; + INFOPLIST_FILE = web3swiftBrowserUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.thematter.web3swiftBrowserUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = web3swiftBrowser; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 81E09B172002623A005DF51D /* Build configuration list for PBXProject "web3swiftBrowser" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 81E09B452002623B005DF51D /* Debug */, + 81E09B462002623B005DF51D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 81E09B472002623B005DF51D /* Build configuration list for PBXNativeTarget "web3swiftBrowser" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 81E09B482002623B005DF51D /* Debug */, + 81E09B492002623B005DF51D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 81E09B4A2002623B005DF51D /* Build configuration list for PBXNativeTarget "web3swiftBrowserTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 81E09B4B2002623B005DF51D /* Debug */, + 81E09B4C2002623B005DF51D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 81E09B4D2002623B005DF51D /* Build configuration list for PBXNativeTarget "web3swiftBrowserUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 81E09B4E2002623B005DF51D /* Debug */, + 81E09B4F2002623B005DF51D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 81E09B262002623A005DF51D /* web3swiftBrowser.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 81E09B272002623A005DF51D /* web3swiftBrowser.xcdatamodel */, + ); + currentVersion = 81E09B272002623A005DF51D /* web3swiftBrowser.xcdatamodel */; + path = web3swiftBrowser.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = 81E09B142002623A005DF51D /* Project object */; +} diff --git a/Example/web3swiftBrowser/web3swiftBrowser.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/web3swiftBrowser/web3swiftBrowser.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100755 index 000000000..f2fbc3b33 --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/web3swiftBrowser/web3swiftBrowser.xcworkspace/contents.xcworkspacedata b/Example/web3swiftBrowser/web3swiftBrowser.xcworkspace/contents.xcworkspacedata new file mode 100755 index 000000000..a4aba43ca --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Example/web3swiftBrowser/web3swiftBrowser.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/web3swiftBrowser/web3swiftBrowser.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/web3swiftBrowser/web3swiftBrowser/AppDelegate.swift b/Example/web3swiftBrowser/web3swiftBrowser/AppDelegate.swift new file mode 100755 index 000000000..8530a695e --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser/AppDelegate.swift @@ -0,0 +1,93 @@ +// +// AppDelegate.swift +// web3swiftBrowser +// +// Created by Alexander Vlasov on 07.01.2018. +// Copyright © 2018 Alexander Vlasov. All rights reserved. +// + +import UIKit +import CoreData + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + // Saves changes in the application's managed object context before the application terminates. + self.saveContext() + } + + // MARK: - Core Data stack + + lazy var persistentContainer: NSPersistentContainer = { + /* + The persistent container for the application. This implementation + creates and returns a container, having loaded the store for the + application to it. This property is optional since there are legitimate + error conditions that could cause the creation of the store to fail. + */ + let container = NSPersistentContainer(name: "web3swiftBrowser") + container.loadPersistentStores(completionHandler: { (storeDescription, error) in + if let error = error as NSError? { + // Replace this implementation with code to handle the error appropriately. + // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + + /* + Typical reasons for an error here include: + * The parent directory does not exist, cannot be created, or disallows writing. + * The persistent store is not accessible, due to permissions or data protection when the device is locked. + * The device is out of space. + * The store could not be migrated to the current model version. + Check the error message to determine what the actual problem was. + */ + fatalError("Unresolved error \(error), \(error.userInfo)") + } + }) + return container + }() + + // MARK: - Core Data Saving support + + func saveContext () { + let context = persistentContainer.viewContext + if context.hasChanges { + do { + try context.save() + } catch { + // Replace this implementation with code to handle the error appropriately. + // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + let nserror = error as NSError + fatalError("Unresolved error \(nserror), \(nserror.userInfo)") + } + } + } + +} + diff --git a/Example/web3swiftBrowser/web3swiftBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/web3swiftBrowser/web3swiftBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100755 index 000000000..d8db8d65f --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Example/web3swiftBrowser/web3swiftBrowser/Base.lproj/LaunchScreen.storyboard b/Example/web3swiftBrowser/web3swiftBrowser/Base.lproj/LaunchScreen.storyboard new file mode 100755 index 000000000..f83f6fd58 --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/web3swiftBrowser/web3swiftBrowser/Base.lproj/Main.storyboard b/Example/web3swiftBrowser/web3swiftBrowser/Base.lproj/Main.storyboard new file mode 100755 index 000000000..7a564d1ec --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser/Base.lproj/Main.storyboard @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/web3swiftBrowser/web3swiftBrowser/Info.plist b/Example/web3swiftBrowser/web3swiftBrowser/Info.plist new file mode 100755 index 000000000..16be3b681 --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Example/web3swiftBrowser/web3swiftBrowser/ViewController.swift b/Example/web3swiftBrowser/web3swiftBrowser/ViewController.swift new file mode 100755 index 000000000..c932648eb --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser/ViewController.swift @@ -0,0 +1,164 @@ +// +// ViewController.swift +// web3swiftBrowser +// +// Created by Alexander Vlasov on 07.01.2018. +// Copyright © 2018 Alexander Vlasov. All rights reserved. +// + +import Foundation +import UIKit +import WebKit +import Web3swift +import WKBridge + +class BrowserViewController: UIViewController { + + enum Method: String { + case getAccounts + case signTransaction + case signMessage + case signPersonalMessage + case publishTransaction + case approveTransaction + } + + lazy var webView: WKWebView = { + let websiteDataTypes = NSSet(array: [WKWebsiteDataTypeDiskCache, WKWebsiteDataTypeMemoryCache]) + let date = NSDate(timeIntervalSince1970: 0) + + WKWebsiteDataStore.default().removeData(ofTypes: websiteDataTypes as! Set, modifiedSince: date as Date, completionHandler:{ }) + let webView = WKWebView( + frame: .zero, + configuration: self.config + ) + webView.allowsBackForwardNavigationGestures = true + webView.scrollView.isScrollEnabled = true + webView.navigationDelegate = self + webView.configuration.preferences.setValue(true, forKey: "developerExtrasEnabled") + return webView + }() + + lazy var config: WKWebViewConfiguration = { + let config = WKWebViewConfiguration() + + var js = "" + + if let filepath = Bundle.main.path(forResource: "Web3Swift.min", ofType: "js") { + do { + js += try String(contentsOfFile: filepath) + NSLog("Loaded web3swift.js") + } catch { + NSLog("Failed to load web.js") + } + } else { + NSLog("web3.js not found in bundle") + } + let userScript = WKUserScript(source: js, injectionTime: .atDocumentStart, forMainFrameOnly: false) + config.userContentController.addUserScript(userScript) + return config + }() + + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + webView.translatesAutoresizingMaskIntoConstraints = false + view.addSubview(webView) + + NSLayoutConstraint.activate([ + webView.topAnchor.constraint(equalTo: view.topAnchor), + webView.leadingAnchor.constraint(equalTo: view.leadingAnchor), + webView.trailingAnchor.constraint(equalTo: view.trailingAnchor), + webView.bottomAnchor.constraint(equalTo: view.bottomAnchor), + ]) + +// webView.load(URLRequest(url: URL(string: "https://plasma-testnet.thematter.io/")!)) + webView.load(URLRequest(url: URL(string: "https://instant.airswap.io")!)) + + do { + let userDir = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] + var keystoreManager = KeystoreManager.managerForPath(userDir + "/keystore") + var ks: EthereumKeystoreV3? + if (keystoreManager?.addresses?.count == 0) { + ks = try EthereumKeystoreV3(password: "web3swift") + let keydata = try JSONEncoder().encode(ks!.keystoreParams) + FileManager.default.createFile(atPath: userDir + "/keystore"+"/key.json", contents: keydata, attributes: nil) + keystoreManager = KeystoreManager.managerForPath(userDir + "/keystore") + } + guard let sender = keystoreManager?.addresses![0] else {return} + print(sender) + let web3 = Web3.InfuraRinkebyWeb3() + web3.addKeystoreManager(keystoreManager) + + self.webView.bridge.register({ (parameters, completion) in + let url = web3.provider.url.absoluteString + completion(.success(["rpcURL": url as Any])) + }, for: "getRPCurl") + + self.webView.bridge.register({ (parameters, completion) in + let allAccounts = web3.browserFunctions.getAccounts() + completion(.success(["accounts": allAccounts as Any])) + }, for: "eth_getAccounts") + + self.webView.bridge.register({ (parameters, completion) in + let coinbase = web3.browserFunctions.getCoinbase() + completion(.success(["coinbase": coinbase as Any])) + }, for: "eth_coinbase") + self.webView.bridge.register({ (parameters, completion) in + if parameters == nil { + completion(.failure(Bridge.JSError(code: 0, description: "No parameters provided"))) + return + } + let payload = parameters!["payload"] as? [String:Any] + if payload == nil { + completion(.failure(Bridge.JSError(code: 0, description: "No parameters provided"))) + return + } + let personalMessage = payload!["data"] as? String + let account = payload!["from"] as? String + if personalMessage == nil || account == nil { + completion(.failure(Bridge.JSError(code: 0, description: "Not enough parameters provided"))) + return + } + let result = web3.browserFunctions.personalSign(personalMessage!, account: account!) + if result == nil { + completion(.failure(Bridge.JSError(code: 0, description: "Account or data is invalid"))) + return + } + completion(.success(["signedMessage": result as Any])) + }, for: "eth_sign") + self.webView.bridge.register({ (parameters, completion) in + if parameters == nil { + completion(.failure(Bridge.JSError(code: 0, description: "No parameters provided"))) + return + } + let transaction = parameters!["transaction"] as? [String:Any] + if transaction == nil { + completion(.failure(Bridge.JSError(code: 0, description: "Not enough parameters provided"))) + return + } + let result = web3.browserFunctions.signTransaction(transaction!) + if result == nil { + completion(.failure(Bridge.JSError(code: 0, description: "Data is invalid"))) + return + } + completion(.success(["signedTransaction": result as Any])) + }, for: "eth_signTransaction") + } + catch{ + print(error) + } + } +} + +extension BrowserViewController: WKNavigationDelegate { + func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { + + } +} + +extension BrowserViewController: WKScriptMessageHandler { + func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { + NSLog("message \(message.body)") + } +} diff --git a/Example/web3swiftBrowser/web3swiftBrowser/Web3Swift.js b/Example/web3swiftBrowser/web3swiftBrowser/Web3Swift.js new file mode 100644 index 000000000..01a0419dd --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser/Web3Swift.js @@ -0,0 +1,68345 @@ +(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 0) { + window.web3.eth.defaultAccount = accs[0]; + } + })); + } + window.ethereum = engine; + } + }); +}()); + +//# sourceURL=/Users/alexvlasov/Blockchain/web3swift/web3swiftJSProxy/index.js +},{"./wk.bridge":424,"web3":407,"web3-provider-engine/zero.js":397}],2:[function(require,module,exports){ +module.exports = require('./register')().Promise + +},{"./register":4}],3:[function(require,module,exports){ +"use strict" + // global key for user preferred registration +var REGISTRATION_KEY = '@@any-promise/REGISTRATION', + // Prior registration (preferred or detected) + registered = null + +/** + * Registers the given implementation. An implementation must + * be registered prior to any call to `require("any-promise")`, + * typically on application load. + * + * If called with no arguments, will return registration in + * following priority: + * + * For Node.js: + * + * 1. Previous registration + * 2. global.Promise if node.js version >= 0.12 + * 3. Auto detected promise based on first sucessful require of + * known promise libraries. Note this is a last resort, as the + * loaded library is non-deterministic. node.js >= 0.12 will + * always use global.Promise over this priority list. + * 4. Throws error. + * + * For Browser: + * + * 1. Previous registration + * 2. window.Promise + * 3. Throws error. + * + * Options: + * + * Promise: Desired Promise constructor + * global: Boolean - Should the registration be cached in a global variable to + * allow cross dependency/bundle registration? (default true) + */ +module.exports = function(root, loadImplementation){ + return function register(implementation, opts){ + implementation = implementation || null + opts = opts || {} + // global registration unless explicitly {global: false} in options (default true) + var registerGlobal = opts.global !== false; + + // load any previous global registration + if(registered === null && registerGlobal){ + registered = root[REGISTRATION_KEY] || null + } + + if(registered !== null + && implementation !== null + && registered.implementation !== implementation){ + // Throw error if attempting to redefine implementation + throw new Error('any-promise already defined as "'+registered.implementation+ + '". You can only register an implementation before the first '+ + ' call to require("any-promise") and an implementation cannot be changed') + } + + if(registered === null){ + // use provided implementation + if(implementation !== null && typeof opts.Promise !== 'undefined'){ + registered = { + Promise: opts.Promise, + implementation: implementation + } + } else { + // require implementation if implementation is specified but not provided + registered = loadImplementation(implementation) + } + + if(registerGlobal){ + // register preference globally in case multiple installations + root[REGISTRATION_KEY] = registered + } + } + + return registered + } +} + +},{}],4:[function(require,module,exports){ +"use strict"; +module.exports = require('./loader')(window, loadImplementation) + +/** + * Browser specific loadImplementation. Always uses `window.Promise` + * + * To register a custom implementation, must register with `Promise` option. + */ +function loadImplementation(){ + if(typeof window.Promise === 'undefined'){ + throw new Error("any-promise browser requires a polyfill or explicit registration"+ + " e.g: require('any-promise/register/bluebird')") + } + return { + Promise: window.Promise, + implementation: 'window.Promise' + } +} + +},{"./loader":3}],5:[function(require,module,exports){ +var asn1 = exports; + +asn1.bignum = require('bn.js'); + +asn1.define = require('./asn1/api').define; +asn1.base = require('./asn1/base'); +asn1.constants = require('./asn1/constants'); +asn1.decoders = require('./asn1/decoders'); +asn1.encoders = require('./asn1/encoders'); + +},{"./asn1/api":6,"./asn1/base":8,"./asn1/constants":12,"./asn1/decoders":14,"./asn1/encoders":17,"bn.js":53}],6:[function(require,module,exports){ +var asn1 = require('../asn1'); +var inherits = require('inherits'); + +var api = exports; + +api.define = function define(name, body) { + return new Entity(name, body); +}; + +function Entity(name, body) { + this.name = name; + this.body = body; + + this.decoders = {}; + this.encoders = {}; +}; + +Entity.prototype._createNamed = function createNamed(base) { + var named; + try { + named = require('vm').runInThisContext( + '(function ' + this.name + '(entity) {\n' + + ' this._initNamed(entity);\n' + + '})' + ); + } catch (e) { + named = function (entity) { + this._initNamed(entity); + }; + } + inherits(named, base); + named.prototype._initNamed = function initnamed(entity) { + base.call(this, entity); + }; + + return new named(this); +}; + +Entity.prototype._getDecoder = function _getDecoder(enc) { + enc = enc || 'der'; + // Lazily create decoder + if (!this.decoders.hasOwnProperty(enc)) + this.decoders[enc] = this._createNamed(asn1.decoders[enc]); + return this.decoders[enc]; +}; + +Entity.prototype.decode = function decode(data, enc, options) { + return this._getDecoder(enc).decode(data, options); +}; + +Entity.prototype._getEncoder = function _getEncoder(enc) { + enc = enc || 'der'; + // Lazily create encoder + if (!this.encoders.hasOwnProperty(enc)) + this.encoders[enc] = this._createNamed(asn1.encoders[enc]); + return this.encoders[enc]; +}; + +Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) { + return this._getEncoder(enc).encode(data, reporter); +}; + +},{"../asn1":5,"inherits":180,"vm":334}],7:[function(require,module,exports){ +var inherits = require('inherits'); +var Reporter = require('../base').Reporter; +var Buffer = require('buffer').Buffer; + +function DecoderBuffer(base, options) { + Reporter.call(this, options); + if (!Buffer.isBuffer(base)) { + this.error('Input not Buffer'); + return; + } + + this.base = base; + this.offset = 0; + this.length = base.length; +} +inherits(DecoderBuffer, Reporter); +exports.DecoderBuffer = DecoderBuffer; + +DecoderBuffer.prototype.save = function save() { + return { offset: this.offset, reporter: Reporter.prototype.save.call(this) }; +}; + +DecoderBuffer.prototype.restore = function restore(save) { + // Return skipped data + var res = new DecoderBuffer(this.base); + res.offset = save.offset; + res.length = this.offset; + + this.offset = save.offset; + Reporter.prototype.restore.call(this, save.reporter); + + return res; +}; + +DecoderBuffer.prototype.isEmpty = function isEmpty() { + return this.offset === this.length; +}; + +DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) { + if (this.offset + 1 <= this.length) + return this.base.readUInt8(this.offset++, true); + else + return this.error(fail || 'DecoderBuffer overrun'); +} + +DecoderBuffer.prototype.skip = function skip(bytes, fail) { + if (!(this.offset + bytes <= this.length)) + return this.error(fail || 'DecoderBuffer overrun'); + + var res = new DecoderBuffer(this.base); + + // Share reporter state + res._reporterState = this._reporterState; + + res.offset = this.offset; + res.length = this.offset + bytes; + this.offset += bytes; + return res; +} + +DecoderBuffer.prototype.raw = function raw(save) { + return this.base.slice(save ? save.offset : this.offset, this.length); +} + +function EncoderBuffer(value, reporter) { + if (Array.isArray(value)) { + this.length = 0; + this.value = value.map(function(item) { + if (!(item instanceof EncoderBuffer)) + item = new EncoderBuffer(item, reporter); + this.length += item.length; + return item; + }, this); + } else if (typeof value === 'number') { + if (!(0 <= value && value <= 0xff)) + return reporter.error('non-byte EncoderBuffer value'); + this.value = value; + this.length = 1; + } else if (typeof value === 'string') { + this.value = value; + this.length = Buffer.byteLength(value); + } else if (Buffer.isBuffer(value)) { + this.value = value; + this.length = value.length; + } else { + return reporter.error('Unsupported type: ' + typeof value); + } +} +exports.EncoderBuffer = EncoderBuffer; + +EncoderBuffer.prototype.join = function join(out, offset) { + if (!out) + out = new Buffer(this.length); + if (!offset) + offset = 0; + + if (this.length === 0) + return out; + + if (Array.isArray(this.value)) { + this.value.forEach(function(item) { + item.join(out, offset); + offset += item.length; + }); + } else { + if (typeof this.value === 'number') + out[offset] = this.value; + else if (typeof this.value === 'string') + out.write(this.value, offset); + else if (Buffer.isBuffer(this.value)) + this.value.copy(out, offset); + offset += this.length; + } + + return out; +}; + +},{"../base":8,"buffer":84,"inherits":180}],8:[function(require,module,exports){ +var base = exports; + +base.Reporter = require('./reporter').Reporter; +base.DecoderBuffer = require('./buffer').DecoderBuffer; +base.EncoderBuffer = require('./buffer').EncoderBuffer; +base.Node = require('./node'); + +},{"./buffer":7,"./node":9,"./reporter":10}],9:[function(require,module,exports){ +var Reporter = require('../base').Reporter; +var EncoderBuffer = require('../base').EncoderBuffer; +var DecoderBuffer = require('../base').DecoderBuffer; +var assert = require('minimalistic-assert'); + +// Supported tags +var tags = [ + 'seq', 'seqof', 'set', 'setof', 'objid', 'bool', + 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc', + 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str', + 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr' +]; + +// Public methods list +var methods = [ + 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice', + 'any', 'contains' +].concat(tags); + +// Overrided methods list +var overrided = [ + '_peekTag', '_decodeTag', '_use', + '_decodeStr', '_decodeObjid', '_decodeTime', + '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList', + + '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime', + '_encodeNull', '_encodeInt', '_encodeBool' +]; + +function Node(enc, parent) { + var state = {}; + this._baseState = state; + + state.enc = enc; + + state.parent = parent || null; + state.children = null; + + // State + state.tag = null; + state.args = null; + state.reverseArgs = null; + state.choice = null; + state.optional = false; + state.any = false; + state.obj = false; + state.use = null; + state.useDecoder = null; + state.key = null; + state['default'] = null; + state.explicit = null; + state.implicit = null; + state.contains = null; + + // Should create new instance on each method + if (!state.parent) { + state.children = []; + this._wrap(); + } +} +module.exports = Node; + +var stateProps = [ + 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice', + 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit', + 'implicit', 'contains' +]; + +Node.prototype.clone = function clone() { + var state = this._baseState; + var cstate = {}; + stateProps.forEach(function(prop) { + cstate[prop] = state[prop]; + }); + var res = new this.constructor(cstate.parent); + res._baseState = cstate; + return res; +}; + +Node.prototype._wrap = function wrap() { + var state = this._baseState; + methods.forEach(function(method) { + this[method] = function _wrappedMethod() { + var clone = new this.constructor(this); + state.children.push(clone); + return clone[method].apply(clone, arguments); + }; + }, this); +}; + +Node.prototype._init = function init(body) { + var state = this._baseState; + + assert(state.parent === null); + body.call(this); + + // Filter children + state.children = state.children.filter(function(child) { + return child._baseState.parent === this; + }, this); + assert.equal(state.children.length, 1, 'Root node can have only one child'); +}; + +Node.prototype._useArgs = function useArgs(args) { + var state = this._baseState; + + // Filter children and args + var children = args.filter(function(arg) { + return arg instanceof this.constructor; + }, this); + args = args.filter(function(arg) { + return !(arg instanceof this.constructor); + }, this); + + if (children.length !== 0) { + assert(state.children === null); + state.children = children; + + // Replace parent to maintain backward link + children.forEach(function(child) { + child._baseState.parent = this; + }, this); + } + if (args.length !== 0) { + assert(state.args === null); + state.args = args; + state.reverseArgs = args.map(function(arg) { + if (typeof arg !== 'object' || arg.constructor !== Object) + return arg; + + var res = {}; + Object.keys(arg).forEach(function(key) { + if (key == (key | 0)) + key |= 0; + var value = arg[key]; + res[value] = key; + }); + return res; + }); + } +}; + +// +// Overrided methods +// + +overrided.forEach(function(method) { + Node.prototype[method] = function _overrided() { + var state = this._baseState; + throw new Error(method + ' not implemented for encoding: ' + state.enc); + }; +}); + +// +// Public methods +// + +tags.forEach(function(tag) { + Node.prototype[tag] = function _tagMethod() { + var state = this._baseState; + var args = Array.prototype.slice.call(arguments); + + assert(state.tag === null); + state.tag = tag; + + this._useArgs(args); + + return this; + }; +}); + +Node.prototype.use = function use(item) { + assert(item); + var state = this._baseState; + + assert(state.use === null); + state.use = item; + + return this; +}; + +Node.prototype.optional = function optional() { + var state = this._baseState; + + state.optional = true; + + return this; +}; + +Node.prototype.def = function def(val) { + var state = this._baseState; + + assert(state['default'] === null); + state['default'] = val; + state.optional = true; + + return this; +}; + +Node.prototype.explicit = function explicit(num) { + var state = this._baseState; + + assert(state.explicit === null && state.implicit === null); + state.explicit = num; + + return this; +}; + +Node.prototype.implicit = function implicit(num) { + var state = this._baseState; + + assert(state.explicit === null && state.implicit === null); + state.implicit = num; + + return this; +}; + +Node.prototype.obj = function obj() { + var state = this._baseState; + var args = Array.prototype.slice.call(arguments); + + state.obj = true; + + if (args.length !== 0) + this._useArgs(args); + + return this; +}; + +Node.prototype.key = function key(newKey) { + var state = this._baseState; + + assert(state.key === null); + state.key = newKey; + + return this; +}; + +Node.prototype.any = function any() { + var state = this._baseState; + + state.any = true; + + return this; +}; + +Node.prototype.choice = function choice(obj) { + var state = this._baseState; + + assert(state.choice === null); + state.choice = obj; + this._useArgs(Object.keys(obj).map(function(key) { + return obj[key]; + })); + + return this; +}; + +Node.prototype.contains = function contains(item) { + var state = this._baseState; + + assert(state.use === null); + state.contains = item; + + return this; +}; + +// +// Decoding +// + +Node.prototype._decode = function decode(input, options) { + var state = this._baseState; + + // Decode root node + if (state.parent === null) + return input.wrapResult(state.children[0]._decode(input, options)); + + var result = state['default']; + var present = true; + + var prevKey = null; + if (state.key !== null) + prevKey = input.enterKey(state.key); + + // Check if tag is there + if (state.optional) { + var tag = null; + if (state.explicit !== null) + tag = state.explicit; + else if (state.implicit !== null) + tag = state.implicit; + else if (state.tag !== null) + tag = state.tag; + + if (tag === null && !state.any) { + // Trial and Error + var save = input.save(); + try { + if (state.choice === null) + this._decodeGeneric(state.tag, input, options); + else + this._decodeChoice(input, options); + present = true; + } catch (e) { + present = false; + } + input.restore(save); + } else { + present = this._peekTag(input, tag, state.any); + + if (input.isError(present)) + return present; + } + } + + // Push object on stack + var prevObj; + if (state.obj && present) + prevObj = input.enterObject(); + + if (present) { + // Unwrap explicit values + if (state.explicit !== null) { + var explicit = this._decodeTag(input, state.explicit); + if (input.isError(explicit)) + return explicit; + input = explicit; + } + + var start = input.offset; + + // Unwrap implicit and normal values + if (state.use === null && state.choice === null) { + if (state.any) + var save = input.save(); + var body = this._decodeTag( + input, + state.implicit !== null ? state.implicit : state.tag, + state.any + ); + if (input.isError(body)) + return body; + + if (state.any) + result = input.raw(save); + else + input = body; + } + + if (options && options.track && state.tag !== null) + options.track(input.path(), start, input.length, 'tagged'); + + if (options && options.track && state.tag !== null) + options.track(input.path(), input.offset, input.length, 'content'); + + // Select proper method for tag + if (state.any) + result = result; + else if (state.choice === null) + result = this._decodeGeneric(state.tag, input, options); + else + result = this._decodeChoice(input, options); + + if (input.isError(result)) + return result; + + // Decode children + if (!state.any && state.choice === null && state.children !== null) { + state.children.forEach(function decodeChildren(child) { + // NOTE: We are ignoring errors here, to let parser continue with other + // parts of encoded data + child._decode(input, options); + }); + } + + // Decode contained/encoded by schema, only in bit or octet strings + if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) { + var data = new DecoderBuffer(result); + result = this._getUse(state.contains, input._reporterState.obj) + ._decode(data, options); + } + } + + // Pop object + if (state.obj && present) + result = input.leaveObject(prevObj); + + // Set key + if (state.key !== null && (result !== null || present === true)) + input.leaveKey(prevKey, state.key, result); + else if (prevKey !== null) + input.exitKey(prevKey); + + return result; +}; + +Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) { + var state = this._baseState; + + if (tag === 'seq' || tag === 'set') + return null; + if (tag === 'seqof' || tag === 'setof') + return this._decodeList(input, tag, state.args[0], options); + else if (/str$/.test(tag)) + return this._decodeStr(input, tag, options); + else if (tag === 'objid' && state.args) + return this._decodeObjid(input, state.args[0], state.args[1], options); + else if (tag === 'objid') + return this._decodeObjid(input, null, null, options); + else if (tag === 'gentime' || tag === 'utctime') + return this._decodeTime(input, tag, options); + else if (tag === 'null_') + return this._decodeNull(input, options); + else if (tag === 'bool') + return this._decodeBool(input, options); + else if (tag === 'objDesc') + return this._decodeStr(input, tag, options); + else if (tag === 'int' || tag === 'enum') + return this._decodeInt(input, state.args && state.args[0], options); + + if (state.use !== null) { + return this._getUse(state.use, input._reporterState.obj) + ._decode(input, options); + } else { + return input.error('unknown tag: ' + tag); + } +}; + +Node.prototype._getUse = function _getUse(entity, obj) { + + var state = this._baseState; + // Create altered use decoder if implicit is set + state.useDecoder = this._use(entity, obj); + assert(state.useDecoder._baseState.parent === null); + state.useDecoder = state.useDecoder._baseState.children[0]; + if (state.implicit !== state.useDecoder._baseState.implicit) { + state.useDecoder = state.useDecoder.clone(); + state.useDecoder._baseState.implicit = state.implicit; + } + return state.useDecoder; +}; + +Node.prototype._decodeChoice = function decodeChoice(input, options) { + var state = this._baseState; + var result = null; + var match = false; + + Object.keys(state.choice).some(function(key) { + var save = input.save(); + var node = state.choice[key]; + try { + var value = node._decode(input, options); + if (input.isError(value)) + return false; + + result = { type: key, value: value }; + match = true; + } catch (e) { + input.restore(save); + return false; + } + return true; + }, this); + + if (!match) + return input.error('Choice not matched'); + + return result; +}; + +// +// Encoding +// + +Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) { + return new EncoderBuffer(data, this.reporter); +}; + +Node.prototype._encode = function encode(data, reporter, parent) { + var state = this._baseState; + if (state['default'] !== null && state['default'] === data) + return; + + var result = this._encodeValue(data, reporter, parent); + if (result === undefined) + return; + + if (this._skipDefault(result, reporter, parent)) + return; + + return result; +}; + +Node.prototype._encodeValue = function encode(data, reporter, parent) { + var state = this._baseState; + + // Decode root node + if (state.parent === null) + return state.children[0]._encode(data, reporter || new Reporter()); + + var result = null; + + // Set reporter to share it with a child class + this.reporter = reporter; + + // Check if data is there + if (state.optional && data === undefined) { + if (state['default'] !== null) + data = state['default'] + else + return; + } + + // Encode children first + var content = null; + var primitive = false; + if (state.any) { + // Anything that was given is translated to buffer + result = this._createEncoderBuffer(data); + } else if (state.choice) { + result = this._encodeChoice(data, reporter); + } else if (state.contains) { + content = this._getUse(state.contains, parent)._encode(data, reporter); + primitive = true; + } else if (state.children) { + content = state.children.map(function(child) { + if (child._baseState.tag === 'null_') + return child._encode(null, reporter, data); + + if (child._baseState.key === null) + return reporter.error('Child should have a key'); + var prevKey = reporter.enterKey(child._baseState.key); + + if (typeof data !== 'object') + return reporter.error('Child expected, but input is not object'); + + var res = child._encode(data[child._baseState.key], reporter, data); + reporter.leaveKey(prevKey); + + return res; + }, this).filter(function(child) { + return child; + }); + content = this._createEncoderBuffer(content); + } else { + if (state.tag === 'seqof' || state.tag === 'setof') { + // TODO(indutny): this should be thrown on DSL level + if (!(state.args && state.args.length === 1)) + return reporter.error('Too many args for : ' + state.tag); + + if (!Array.isArray(data)) + return reporter.error('seqof/setof, but data is not Array'); + + var child = this.clone(); + child._baseState.implicit = null; + content = this._createEncoderBuffer(data.map(function(item) { + var state = this._baseState; + + return this._getUse(state.args[0], data)._encode(item, reporter); + }, child)); + } else if (state.use !== null) { + result = this._getUse(state.use, parent)._encode(data, reporter); + } else { + content = this._encodePrimitive(state.tag, data); + primitive = true; + } + } + + // Encode data itself + var result; + if (!state.any && state.choice === null) { + var tag = state.implicit !== null ? state.implicit : state.tag; + var cls = state.implicit === null ? 'universal' : 'context'; + + if (tag === null) { + if (state.use === null) + reporter.error('Tag could be omitted only for .use()'); + } else { + if (state.use === null) + result = this._encodeComposite(tag, primitive, cls, content); + } + } + + // Wrap in explicit + if (state.explicit !== null) + result = this._encodeComposite(state.explicit, false, 'context', result); + + return result; +}; + +Node.prototype._encodeChoice = function encodeChoice(data, reporter) { + var state = this._baseState; + + var node = state.choice[data.type]; + if (!node) { + assert( + false, + data.type + ' not found in ' + + JSON.stringify(Object.keys(state.choice))); + } + return node._encode(data.value, reporter); +}; + +Node.prototype._encodePrimitive = function encodePrimitive(tag, data) { + var state = this._baseState; + + if (/str$/.test(tag)) + return this._encodeStr(data, tag); + else if (tag === 'objid' && state.args) + return this._encodeObjid(data, state.reverseArgs[0], state.args[1]); + else if (tag === 'objid') + return this._encodeObjid(data, null, null); + else if (tag === 'gentime' || tag === 'utctime') + return this._encodeTime(data, tag); + else if (tag === 'null_') + return this._encodeNull(); + else if (tag === 'int' || tag === 'enum') + return this._encodeInt(data, state.args && state.reverseArgs[0]); + else if (tag === 'bool') + return this._encodeBool(data); + else if (tag === 'objDesc') + return this._encodeStr(data, tag); + else + throw new Error('Unsupported tag: ' + tag); +}; + +Node.prototype._isNumstr = function isNumstr(str) { + return /^[0-9 ]*$/.test(str); +}; + +Node.prototype._isPrintstr = function isPrintstr(str) { + return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str); +}; + +},{"../base":8,"minimalistic-assert":234}],10:[function(require,module,exports){ +var inherits = require('inherits'); + +function Reporter(options) { + this._reporterState = { + obj: null, + path: [], + options: options || {}, + errors: [] + }; +} +exports.Reporter = Reporter; + +Reporter.prototype.isError = function isError(obj) { + return obj instanceof ReporterError; +}; + +Reporter.prototype.save = function save() { + var state = this._reporterState; + + return { obj: state.obj, pathLen: state.path.length }; +}; + +Reporter.prototype.restore = function restore(data) { + var state = this._reporterState; + + state.obj = data.obj; + state.path = state.path.slice(0, data.pathLen); +}; + +Reporter.prototype.enterKey = function enterKey(key) { + return this._reporterState.path.push(key); +}; + +Reporter.prototype.exitKey = function exitKey(index) { + var state = this._reporterState; + + state.path = state.path.slice(0, index - 1); +}; + +Reporter.prototype.leaveKey = function leaveKey(index, key, value) { + var state = this._reporterState; + + this.exitKey(index); + if (state.obj !== null) + state.obj[key] = value; +}; + +Reporter.prototype.path = function path() { + return this._reporterState.path.join('/'); +}; + +Reporter.prototype.enterObject = function enterObject() { + var state = this._reporterState; + + var prev = state.obj; + state.obj = {}; + return prev; +}; + +Reporter.prototype.leaveObject = function leaveObject(prev) { + var state = this._reporterState; + + var now = state.obj; + state.obj = prev; + return now; +}; + +Reporter.prototype.error = function error(msg) { + var err; + var state = this._reporterState; + + var inherited = msg instanceof ReporterError; + if (inherited) { + err = msg; + } else { + err = new ReporterError(state.path.map(function(elem) { + return '[' + JSON.stringify(elem) + ']'; + }).join(''), msg.message || msg, msg.stack); + } + + if (!state.options.partial) + throw err; + + if (!inherited) + state.errors.push(err); + + return err; +}; + +Reporter.prototype.wrapResult = function wrapResult(result) { + var state = this._reporterState; + if (!state.options.partial) + return result; + + return { + result: this.isError(result) ? null : result, + errors: state.errors + }; +}; + +function ReporterError(path, msg) { + this.path = path; + this.rethrow(msg); +}; +inherits(ReporterError, Error); + +ReporterError.prototype.rethrow = function rethrow(msg) { + this.message = msg + ' at: ' + (this.path || '(shallow)'); + if (Error.captureStackTrace) + Error.captureStackTrace(this, ReporterError); + + if (!this.stack) { + try { + // IE only adds stack when thrown + throw new Error(this.message); + } catch (e) { + this.stack = e.stack; + } + } + return this; +}; + +},{"inherits":180}],11:[function(require,module,exports){ +var constants = require('../constants'); + +exports.tagClass = { + 0: 'universal', + 1: 'application', + 2: 'context', + 3: 'private' +}; +exports.tagClassByName = constants._reverse(exports.tagClass); + +exports.tag = { + 0x00: 'end', + 0x01: 'bool', + 0x02: 'int', + 0x03: 'bitstr', + 0x04: 'octstr', + 0x05: 'null_', + 0x06: 'objid', + 0x07: 'objDesc', + 0x08: 'external', + 0x09: 'real', + 0x0a: 'enum', + 0x0b: 'embed', + 0x0c: 'utf8str', + 0x0d: 'relativeOid', + 0x10: 'seq', + 0x11: 'set', + 0x12: 'numstr', + 0x13: 'printstr', + 0x14: 't61str', + 0x15: 'videostr', + 0x16: 'ia5str', + 0x17: 'utctime', + 0x18: 'gentime', + 0x19: 'graphstr', + 0x1a: 'iso646str', + 0x1b: 'genstr', + 0x1c: 'unistr', + 0x1d: 'charstr', + 0x1e: 'bmpstr' +}; +exports.tagByName = constants._reverse(exports.tag); + +},{"../constants":12}],12:[function(require,module,exports){ +var constants = exports; + +// Helper +constants._reverse = function reverse(map) { + var res = {}; + + Object.keys(map).forEach(function(key) { + // Convert key to integer if it is stringified + if ((key | 0) == key) + key = key | 0; + + var value = map[key]; + res[value] = key; + }); + + return res; +}; + +constants.der = require('./der'); + +},{"./der":11}],13:[function(require,module,exports){ +var inherits = require('inherits'); + +var asn1 = require('../../asn1'); +var base = asn1.base; +var bignum = asn1.bignum; + +// Import DER constants +var der = asn1.constants.der; + +function DERDecoder(entity) { + this.enc = 'der'; + this.name = entity.name; + this.entity = entity; + + // Construct base tree + this.tree = new DERNode(); + this.tree._init(entity.body); +}; +module.exports = DERDecoder; + +DERDecoder.prototype.decode = function decode(data, options) { + if (!(data instanceof base.DecoderBuffer)) + data = new base.DecoderBuffer(data, options); + + return this.tree._decode(data, options); +}; + +// Tree methods + +function DERNode(parent) { + base.Node.call(this, 'der', parent); +} +inherits(DERNode, base.Node); + +DERNode.prototype._peekTag = function peekTag(buffer, tag, any) { + if (buffer.isEmpty()) + return false; + + var state = buffer.save(); + var decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"'); + if (buffer.isError(decodedTag)) + return decodedTag; + + buffer.restore(state); + + return decodedTag.tag === tag || decodedTag.tagStr === tag || + (decodedTag.tagStr + 'of') === tag || any; +}; + +DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) { + var decodedTag = derDecodeTag(buffer, + 'Failed to decode tag of "' + tag + '"'); + if (buffer.isError(decodedTag)) + return decodedTag; + + var len = derDecodeLen(buffer, + decodedTag.primitive, + 'Failed to get length of "' + tag + '"'); + + // Failure + if (buffer.isError(len)) + return len; + + if (!any && + decodedTag.tag !== tag && + decodedTag.tagStr !== tag && + decodedTag.tagStr + 'of' !== tag) { + return buffer.error('Failed to match tag: "' + tag + '"'); + } + + if (decodedTag.primitive || len !== null) + return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); + + // Indefinite length... find END tag + var state = buffer.save(); + var res = this._skipUntilEnd( + buffer, + 'Failed to skip indefinite length body: "' + this.tag + '"'); + if (buffer.isError(res)) + return res; + + len = buffer.offset - state.offset; + buffer.restore(state); + return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); +}; + +DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) { + while (true) { + var tag = derDecodeTag(buffer, fail); + if (buffer.isError(tag)) + return tag; + var len = derDecodeLen(buffer, tag.primitive, fail); + if (buffer.isError(len)) + return len; + + var res; + if (tag.primitive || len !== null) + res = buffer.skip(len) + else + res = this._skipUntilEnd(buffer, fail); + + // Failure + if (buffer.isError(res)) + return res; + + if (tag.tagStr === 'end') + break; + } +}; + +DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder, + options) { + var result = []; + while (!buffer.isEmpty()) { + var possibleEnd = this._peekTag(buffer, 'end'); + if (buffer.isError(possibleEnd)) + return possibleEnd; + + var res = decoder.decode(buffer, 'der', options); + if (buffer.isError(res) && possibleEnd) + break; + result.push(res); + } + return result; +}; + +DERNode.prototype._decodeStr = function decodeStr(buffer, tag) { + if (tag === 'bitstr') { + var unused = buffer.readUInt8(); + if (buffer.isError(unused)) + return unused; + return { unused: unused, data: buffer.raw() }; + } else if (tag === 'bmpstr') { + var raw = buffer.raw(); + if (raw.length % 2 === 1) + return buffer.error('Decoding of string type: bmpstr length mismatch'); + + var str = ''; + for (var i = 0; i < raw.length / 2; i++) { + str += String.fromCharCode(raw.readUInt16BE(i * 2)); + } + return str; + } else if (tag === 'numstr') { + var numstr = buffer.raw().toString('ascii'); + if (!this._isNumstr(numstr)) { + return buffer.error('Decoding of string type: ' + + 'numstr unsupported characters'); + } + return numstr; + } else if (tag === 'octstr') { + return buffer.raw(); + } else if (tag === 'objDesc') { + return buffer.raw(); + } else if (tag === 'printstr') { + var printstr = buffer.raw().toString('ascii'); + if (!this._isPrintstr(printstr)) { + return buffer.error('Decoding of string type: ' + + 'printstr unsupported characters'); + } + return printstr; + } else if (/str$/.test(tag)) { + return buffer.raw().toString(); + } else { + return buffer.error('Decoding of string type: ' + tag + ' unsupported'); + } +}; + +DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) { + var result; + var identifiers = []; + var ident = 0; + while (!buffer.isEmpty()) { + var subident = buffer.readUInt8(); + ident <<= 7; + ident |= subident & 0x7f; + if ((subident & 0x80) === 0) { + identifiers.push(ident); + ident = 0; + } + } + if (subident & 0x80) + identifiers.push(ident); + + var first = (identifiers[0] / 40) | 0; + var second = identifiers[0] % 40; + + if (relative) + result = identifiers; + else + result = [first, second].concat(identifiers.slice(1)); + + if (values) { + var tmp = values[result.join(' ')]; + if (tmp === undefined) + tmp = values[result.join('.')]; + if (tmp !== undefined) + result = tmp; + } + + return result; +}; + +DERNode.prototype._decodeTime = function decodeTime(buffer, tag) { + var str = buffer.raw().toString(); + if (tag === 'gentime') { + var year = str.slice(0, 4) | 0; + var mon = str.slice(4, 6) | 0; + var day = str.slice(6, 8) | 0; + var hour = str.slice(8, 10) | 0; + var min = str.slice(10, 12) | 0; + var sec = str.slice(12, 14) | 0; + } else if (tag === 'utctime') { + var year = str.slice(0, 2) | 0; + var mon = str.slice(2, 4) | 0; + var day = str.slice(4, 6) | 0; + var hour = str.slice(6, 8) | 0; + var min = str.slice(8, 10) | 0; + var sec = str.slice(10, 12) | 0; + if (year < 70) + year = 2000 + year; + else + year = 1900 + year; + } else { + return buffer.error('Decoding ' + tag + ' time is not supported yet'); + } + + return Date.UTC(year, mon - 1, day, hour, min, sec, 0); +}; + +DERNode.prototype._decodeNull = function decodeNull(buffer) { + return null; +}; + +DERNode.prototype._decodeBool = function decodeBool(buffer) { + var res = buffer.readUInt8(); + if (buffer.isError(res)) + return res; + else + return res !== 0; +}; + +DERNode.prototype._decodeInt = function decodeInt(buffer, values) { + // Bigint, return as it is (assume big endian) + var raw = buffer.raw(); + var res = new bignum(raw); + + if (values) + res = values[res.toString(10)] || res; + + return res; +}; + +DERNode.prototype._use = function use(entity, obj) { + if (typeof entity === 'function') + entity = entity(obj); + return entity._getDecoder('der').tree; +}; + +// Utility methods + +function derDecodeTag(buf, fail) { + var tag = buf.readUInt8(fail); + if (buf.isError(tag)) + return tag; + + var cls = der.tagClass[tag >> 6]; + var primitive = (tag & 0x20) === 0; + + // Multi-octet tag - load + if ((tag & 0x1f) === 0x1f) { + var oct = tag; + tag = 0; + while ((oct & 0x80) === 0x80) { + oct = buf.readUInt8(fail); + if (buf.isError(oct)) + return oct; + + tag <<= 7; + tag |= oct & 0x7f; + } + } else { + tag &= 0x1f; + } + var tagStr = der.tag[tag]; + + return { + cls: cls, + primitive: primitive, + tag: tag, + tagStr: tagStr + }; +} + +function derDecodeLen(buf, primitive, fail) { + var len = buf.readUInt8(fail); + if (buf.isError(len)) + return len; + + // Indefinite form + if (!primitive && len === 0x80) + return null; + + // Definite form + if ((len & 0x80) === 0) { + // Short form + return len; + } + + // Long form + var num = len & 0x7f; + if (num > 4) + return buf.error('length octect is too long'); + + len = 0; + for (var i = 0; i < num; i++) { + len <<= 8; + var j = buf.readUInt8(fail); + if (buf.isError(j)) + return j; + len |= j; + } + + return len; +} + +},{"../../asn1":5,"inherits":180}],14:[function(require,module,exports){ +var decoders = exports; + +decoders.der = require('./der'); +decoders.pem = require('./pem'); + +},{"./der":13,"./pem":15}],15:[function(require,module,exports){ +var inherits = require('inherits'); +var Buffer = require('buffer').Buffer; + +var DERDecoder = require('./der'); + +function PEMDecoder(entity) { + DERDecoder.call(this, entity); + this.enc = 'pem'; +}; +inherits(PEMDecoder, DERDecoder); +module.exports = PEMDecoder; + +PEMDecoder.prototype.decode = function decode(data, options) { + var lines = data.toString().split(/[\r\n]+/g); + + var label = options.label.toUpperCase(); + + var re = /^-----(BEGIN|END) ([^-]+)-----$/; + var start = -1; + var end = -1; + for (var i = 0; i < lines.length; i++) { + var match = lines[i].match(re); + if (match === null) + continue; + + if (match[2] !== label) + continue; + + if (start === -1) { + if (match[1] !== 'BEGIN') + break; + start = i; + } else { + if (match[1] !== 'END') + break; + end = i; + break; + } + } + if (start === -1 || end === -1) + throw new Error('PEM section not found for: ' + label); + + var base64 = lines.slice(start + 1, end).join(''); + // Remove excessive symbols + base64.replace(/[^a-z0-9\+\/=]+/gi, ''); + + var input = new Buffer(base64, 'base64'); + return DERDecoder.prototype.decode.call(this, input, options); +}; + +},{"./der":13,"buffer":84,"inherits":180}],16:[function(require,module,exports){ +var inherits = require('inherits'); +var Buffer = require('buffer').Buffer; + +var asn1 = require('../../asn1'); +var base = asn1.base; + +// Import DER constants +var der = asn1.constants.der; + +function DEREncoder(entity) { + this.enc = 'der'; + this.name = entity.name; + this.entity = entity; + + // Construct base tree + this.tree = new DERNode(); + this.tree._init(entity.body); +}; +module.exports = DEREncoder; + +DEREncoder.prototype.encode = function encode(data, reporter) { + return this.tree._encode(data, reporter).join(); +}; + +// Tree methods + +function DERNode(parent) { + base.Node.call(this, 'der', parent); +} +inherits(DERNode, base.Node); + +DERNode.prototype._encodeComposite = function encodeComposite(tag, + primitive, + cls, + content) { + var encodedTag = encodeTag(tag, primitive, cls, this.reporter); + + // Short form + if (content.length < 0x80) { + var header = new Buffer(2); + header[0] = encodedTag; + header[1] = content.length; + return this._createEncoderBuffer([ header, content ]); + } + + // Long form + // Count octets required to store length + var lenOctets = 1; + for (var i = content.length; i >= 0x100; i >>= 8) + lenOctets++; + + var header = new Buffer(1 + 1 + lenOctets); + header[0] = encodedTag; + header[1] = 0x80 | lenOctets; + + for (var i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8) + header[i] = j & 0xff; + + return this._createEncoderBuffer([ header, content ]); +}; + +DERNode.prototype._encodeStr = function encodeStr(str, tag) { + if (tag === 'bitstr') { + return this._createEncoderBuffer([ str.unused | 0, str.data ]); + } else if (tag === 'bmpstr') { + var buf = new Buffer(str.length * 2); + for (var i = 0; i < str.length; i++) { + buf.writeUInt16BE(str.charCodeAt(i), i * 2); + } + return this._createEncoderBuffer(buf); + } else if (tag === 'numstr') { + if (!this._isNumstr(str)) { + return this.reporter.error('Encoding of string type: numstr supports ' + + 'only digits and space'); + } + return this._createEncoderBuffer(str); + } else if (tag === 'printstr') { + if (!this._isPrintstr(str)) { + return this.reporter.error('Encoding of string type: printstr supports ' + + 'only latin upper and lower case letters, ' + + 'digits, space, apostrophe, left and rigth ' + + 'parenthesis, plus sign, comma, hyphen, ' + + 'dot, slash, colon, equal sign, ' + + 'question mark'); + } + return this._createEncoderBuffer(str); + } else if (/str$/.test(tag)) { + return this._createEncoderBuffer(str); + } else if (tag === 'objDesc') { + return this._createEncoderBuffer(str); + } else { + return this.reporter.error('Encoding of string type: ' + tag + + ' unsupported'); + } +}; + +DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) { + if (typeof id === 'string') { + if (!values) + return this.reporter.error('string objid given, but no values map found'); + if (!values.hasOwnProperty(id)) + return this.reporter.error('objid not found in values map'); + id = values[id].split(/[\s\.]+/g); + for (var i = 0; i < id.length; i++) + id[i] |= 0; + } else if (Array.isArray(id)) { + id = id.slice(); + for (var i = 0; i < id.length; i++) + id[i] |= 0; + } + + if (!Array.isArray(id)) { + return this.reporter.error('objid() should be either array or string, ' + + 'got: ' + JSON.stringify(id)); + } + + if (!relative) { + if (id[1] >= 40) + return this.reporter.error('Second objid identifier OOB'); + id.splice(0, 2, id[0] * 40 + id[1]); + } + + // Count number of octets + var size = 0; + for (var i = 0; i < id.length; i++) { + var ident = id[i]; + for (size++; ident >= 0x80; ident >>= 7) + size++; + } + + var objid = new Buffer(size); + var offset = objid.length - 1; + for (var i = id.length - 1; i >= 0; i--) { + var ident = id[i]; + objid[offset--] = ident & 0x7f; + while ((ident >>= 7) > 0) + objid[offset--] = 0x80 | (ident & 0x7f); + } + + return this._createEncoderBuffer(objid); +}; + +function two(num) { + if (num < 10) + return '0' + num; + else + return num; +} + +DERNode.prototype._encodeTime = function encodeTime(time, tag) { + var str; + var date = new Date(time); + + if (tag === 'gentime') { + str = [ + two(date.getFullYear()), + two(date.getUTCMonth() + 1), + two(date.getUTCDate()), + two(date.getUTCHours()), + two(date.getUTCMinutes()), + two(date.getUTCSeconds()), + 'Z' + ].join(''); + } else if (tag === 'utctime') { + str = [ + two(date.getFullYear() % 100), + two(date.getUTCMonth() + 1), + two(date.getUTCDate()), + two(date.getUTCHours()), + two(date.getUTCMinutes()), + two(date.getUTCSeconds()), + 'Z' + ].join(''); + } else { + this.reporter.error('Encoding ' + tag + ' time is not supported yet'); + } + + return this._encodeStr(str, 'octstr'); +}; + +DERNode.prototype._encodeNull = function encodeNull() { + return this._createEncoderBuffer(''); +}; + +DERNode.prototype._encodeInt = function encodeInt(num, values) { + if (typeof num === 'string') { + if (!values) + return this.reporter.error('String int or enum given, but no values map'); + if (!values.hasOwnProperty(num)) { + return this.reporter.error('Values map doesn\'t contain: ' + + JSON.stringify(num)); + } + num = values[num]; + } + + // Bignum, assume big endian + if (typeof num !== 'number' && !Buffer.isBuffer(num)) { + var numArray = num.toArray(); + if (!num.sign && numArray[0] & 0x80) { + numArray.unshift(0); + } + num = new Buffer(numArray); + } + + if (Buffer.isBuffer(num)) { + var size = num.length; + if (num.length === 0) + size++; + + var out = new Buffer(size); + num.copy(out); + if (num.length === 0) + out[0] = 0 + return this._createEncoderBuffer(out); + } + + if (num < 0x80) + return this._createEncoderBuffer(num); + + if (num < 0x100) + return this._createEncoderBuffer([0, num]); + + var size = 1; + for (var i = num; i >= 0x100; i >>= 8) + size++; + + var out = new Array(size); + for (var i = out.length - 1; i >= 0; i--) { + out[i] = num & 0xff; + num >>= 8; + } + if(out[0] & 0x80) { + out.unshift(0); + } + + return this._createEncoderBuffer(new Buffer(out)); +}; + +DERNode.prototype._encodeBool = function encodeBool(value) { + return this._createEncoderBuffer(value ? 0xff : 0); +}; + +DERNode.prototype._use = function use(entity, obj) { + if (typeof entity === 'function') + entity = entity(obj); + return entity._getEncoder('der').tree; +}; + +DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) { + var state = this._baseState; + var i; + if (state['default'] === null) + return false; + + var data = dataBuffer.join(); + if (state.defaultBuffer === undefined) + state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join(); + + if (data.length !== state.defaultBuffer.length) + return false; + + for (i=0; i < data.length; i++) + if (data[i] !== state.defaultBuffer[i]) + return false; + + return true; +}; + +// Utility methods + +function encodeTag(tag, primitive, cls, reporter) { + var res; + + if (tag === 'seqof') + tag = 'seq'; + else if (tag === 'setof') + tag = 'set'; + + if (der.tagByName.hasOwnProperty(tag)) + res = der.tagByName[tag]; + else if (typeof tag === 'number' && (tag | 0) === tag) + res = tag; + else + return reporter.error('Unknown tag: ' + tag); + + if (res >= 0x1f) + return reporter.error('Multi-octet tag encoding unsupported'); + + if (!primitive) + res |= 0x20; + + res |= (der.tagClassByName[cls || 'universal'] << 6); + + return res; +} + +},{"../../asn1":5,"buffer":84,"inherits":180}],17:[function(require,module,exports){ +var encoders = exports; + +encoders.der = require('./der'); +encoders.pem = require('./pem'); + +},{"./der":16,"./pem":18}],18:[function(require,module,exports){ +var inherits = require('inherits'); + +var DEREncoder = require('./der'); + +function PEMEncoder(entity) { + DEREncoder.call(this, entity); + this.enc = 'pem'; +}; +inherits(PEMEncoder, DEREncoder); +module.exports = PEMEncoder; + +PEMEncoder.prototype.encode = function encode(data, options) { + var buf = DEREncoder.prototype.encode.call(this, data); + + var p = buf.toString('base64'); + var out = [ '-----BEGIN ' + options.label + '-----' ]; + for (var i = 0; i < p.length; i += 64) + out.push(p.slice(i, i + 64)); + out.push('-----END ' + options.label + '-----'); + return out.join('\n'); +}; + +},{"./der":16,"inherits":180}],19:[function(require,module,exports){ +(function (global){ +'use strict'; + +// compare and isBuffer taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js +// original notice: + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +function compare(a, b) { + if (a === b) { + return 0; + } + + var x = a.length; + var y = b.length; + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break; + } + } + + if (x < y) { + return -1; + } + if (y < x) { + return 1; + } + return 0; +} +function isBuffer(b) { + if (global.Buffer && typeof global.Buffer.isBuffer === 'function') { + return global.Buffer.isBuffer(b); + } + return !!(b != null && b._isBuffer); +} + +// based on node assert, original notice: + +// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 +// +// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! +// +// Originally from narwhal.js (http://narwhaljs.org) +// Copyright (c) 2009 Thomas Robinson <280north.com> +// +// 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 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. + +var util = require('util/'); +var hasOwn = Object.prototype.hasOwnProperty; +var pSlice = Array.prototype.slice; +var functionsHaveNames = (function () { + return function foo() {}.name === 'foo'; +}()); +function pToString (obj) { + return Object.prototype.toString.call(obj); +} +function isView(arrbuf) { + if (isBuffer(arrbuf)) { + return false; + } + if (typeof global.ArrayBuffer !== 'function') { + return false; + } + if (typeof ArrayBuffer.isView === 'function') { + return ArrayBuffer.isView(arrbuf); + } + if (!arrbuf) { + return false; + } + if (arrbuf instanceof DataView) { + return true; + } + if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) { + return true; + } + return false; +} +// 1. The assert module provides functions that throw +// AssertionError's when particular conditions are not met. The +// assert module must conform to the following interface. + +var assert = module.exports = ok; + +// 2. The AssertionError is defined in assert. +// new assert.AssertionError({ message: message, +// actual: actual, +// expected: expected }) + +var regex = /\s*function\s+([^\(\s]*)\s*/; +// based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js +function getName(func) { + if (!util.isFunction(func)) { + return; + } + if (functionsHaveNames) { + return func.name; + } + var str = func.toString(); + var match = str.match(regex); + return match && match[1]; +} +assert.AssertionError = function AssertionError(options) { + this.name = 'AssertionError'; + this.actual = options.actual; + this.expected = options.expected; + this.operator = options.operator; + if (options.message) { + this.message = options.message; + this.generatedMessage = false; + } else { + this.message = getMessage(this); + this.generatedMessage = true; + } + var stackStartFunction = options.stackStartFunction || fail; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, stackStartFunction); + } else { + // non v8 browsers so we can have a stacktrace + var err = new Error(); + if (err.stack) { + var out = err.stack; + + // try to strip useless frames + var fn_name = getName(stackStartFunction); + var idx = out.indexOf('\n' + fn_name); + if (idx >= 0) { + // once we have located the function frame + // we need to strip out everything before it (and its line) + var next_line = out.indexOf('\n', idx + 1); + out = out.substring(next_line + 1); + } + + this.stack = out; + } + } +}; + +// assert.AssertionError instanceof Error +util.inherits(assert.AssertionError, Error); + +function truncate(s, n) { + if (typeof s === 'string') { + return s.length < n ? s : s.slice(0, n); + } else { + return s; + } +} +function inspect(something) { + if (functionsHaveNames || !util.isFunction(something)) { + return util.inspect(something); + } + var rawname = getName(something); + var name = rawname ? ': ' + rawname : ''; + return '[Function' + name + ']'; +} +function getMessage(self) { + return truncate(inspect(self.actual), 128) + ' ' + + self.operator + ' ' + + truncate(inspect(self.expected), 128); +} + +// At present only the three keys mentioned above are used and +// understood by the spec. Implementations or sub modules can pass +// other keys to the AssertionError's constructor - they will be +// ignored. + +// 3. All of the following functions must throw an AssertionError +// when a corresponding condition is not met, with a message that +// may be undefined if not provided. All assertion methods provide +// both the actual and expected values to the assertion error for +// display purposes. + +function fail(actual, expected, message, operator, stackStartFunction) { + throw new assert.AssertionError({ + message: message, + actual: actual, + expected: expected, + operator: operator, + stackStartFunction: stackStartFunction + }); +} + +// EXTENSION! allows for well behaved errors defined elsewhere. +assert.fail = fail; + +// 4. Pure assertion tests whether a value is truthy, as determined +// by !!guard. +// assert.ok(guard, message_opt); +// This statement is equivalent to assert.equal(true, !!guard, +// message_opt);. To test strictly for the value true, use +// assert.strictEqual(true, guard, message_opt);. + +function ok(value, message) { + if (!value) fail(value, true, message, '==', assert.ok); +} +assert.ok = ok; + +// 5. The equality assertion tests shallow, coercive equality with +// ==. +// assert.equal(actual, expected, message_opt); + +assert.equal = function equal(actual, expected, message) { + if (actual != expected) fail(actual, expected, message, '==', assert.equal); +}; + +// 6. The non-equality assertion tests for whether two objects are not equal +// with != assert.notEqual(actual, expected, message_opt); + +assert.notEqual = function notEqual(actual, expected, message) { + if (actual == expected) { + fail(actual, expected, message, '!=', assert.notEqual); + } +}; + +// 7. The equivalence assertion tests a deep equality relation. +// assert.deepEqual(actual, expected, message_opt); + +assert.deepEqual = function deepEqual(actual, expected, message) { + if (!_deepEqual(actual, expected, false)) { + fail(actual, expected, message, 'deepEqual', assert.deepEqual); + } +}; + +assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) { + if (!_deepEqual(actual, expected, true)) { + fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual); + } +}; + +function _deepEqual(actual, expected, strict, memos) { + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + } else if (isBuffer(actual) && isBuffer(expected)) { + return compare(actual, expected) === 0; + + // 7.2. If the expected value is a Date object, the actual value is + // equivalent if it is also a Date object that refers to the same time. + } else if (util.isDate(actual) && util.isDate(expected)) { + return actual.getTime() === expected.getTime(); + + // 7.3 If the expected value is a RegExp object, the actual value is + // equivalent if it is also a RegExp object with the same source and + // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). + } else if (util.isRegExp(actual) && util.isRegExp(expected)) { + return actual.source === expected.source && + actual.global === expected.global && + actual.multiline === expected.multiline && + actual.lastIndex === expected.lastIndex && + actual.ignoreCase === expected.ignoreCase; + + // 7.4. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if ((actual === null || typeof actual !== 'object') && + (expected === null || typeof expected !== 'object')) { + return strict ? actual === expected : actual == expected; + + // If both values are instances of typed arrays, wrap their underlying + // ArrayBuffers in a Buffer each to increase performance + // This optimization requires the arrays to have the same type as checked by + // Object.prototype.toString (aka pToString). Never perform binary + // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their + // bit patterns are not identical. + } else if (isView(actual) && isView(expected) && + pToString(actual) === pToString(expected) && + !(actual instanceof Float32Array || + actual instanceof Float64Array)) { + return compare(new Uint8Array(actual.buffer), + new Uint8Array(expected.buffer)) === 0; + + // 7.5 For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else if (isBuffer(actual) !== isBuffer(expected)) { + return false; + } else { + memos = memos || {actual: [], expected: []}; + + var actualIndex = memos.actual.indexOf(actual); + if (actualIndex !== -1) { + if (actualIndex === memos.expected.indexOf(expected)) { + return true; + } + } + + memos.actual.push(actual); + memos.expected.push(expected); + + return objEquiv(actual, expected, strict, memos); + } +} + +function isArguments(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; +} + +function objEquiv(a, b, strict, actualVisitedObjects) { + if (a === null || a === undefined || b === null || b === undefined) + return false; + // if one is a primitive, the other must be same + if (util.isPrimitive(a) || util.isPrimitive(b)) + return a === b; + if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) + return false; + var aIsArgs = isArguments(a); + var bIsArgs = isArguments(b); + if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs)) + return false; + if (aIsArgs) { + a = pSlice.call(a); + b = pSlice.call(b); + return _deepEqual(a, b, strict); + } + var ka = objectKeys(a); + var kb = objectKeys(b); + var key, i; + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length !== kb.length) + return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] !== kb[i]) + return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects)) + return false; + } + return true; +} + +// 8. The non-equivalence assertion tests for any deep inequality. +// assert.notDeepEqual(actual, expected, message_opt); + +assert.notDeepEqual = function notDeepEqual(actual, expected, message) { + if (_deepEqual(actual, expected, false)) { + fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); + } +}; + +assert.notDeepStrictEqual = notDeepStrictEqual; +function notDeepStrictEqual(actual, expected, message) { + if (_deepEqual(actual, expected, true)) { + fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual); + } +} + + +// 9. The strict equality assertion tests strict equality, as determined by ===. +// assert.strictEqual(actual, expected, message_opt); + +assert.strictEqual = function strictEqual(actual, expected, message) { + if (actual !== expected) { + fail(actual, expected, message, '===', assert.strictEqual); + } +}; + +// 10. The strict non-equality assertion tests for strict inequality, as +// determined by !==. assert.notStrictEqual(actual, expected, message_opt); + +assert.notStrictEqual = function notStrictEqual(actual, expected, message) { + if (actual === expected) { + fail(actual, expected, message, '!==', assert.notStrictEqual); + } +}; + +function expectedException(actual, expected) { + if (!actual || !expected) { + return false; + } + + if (Object.prototype.toString.call(expected) == '[object RegExp]') { + return expected.test(actual); + } + + try { + if (actual instanceof expected) { + return true; + } + } catch (e) { + // Ignore. The instanceof check doesn't work for arrow functions. + } + + if (Error.isPrototypeOf(expected)) { + return false; + } + + return expected.call({}, actual) === true; +} + +function _tryBlock(block) { + var error; + try { + block(); + } catch (e) { + error = e; + } + return error; +} + +function _throws(shouldThrow, block, expected, message) { + var actual; + + if (typeof block !== 'function') { + throw new TypeError('"block" argument must be a function'); + } + + if (typeof expected === 'string') { + message = expected; + expected = null; + } + + actual = _tryBlock(block); + + message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + + (message ? ' ' + message : '.'); + + if (shouldThrow && !actual) { + fail(actual, expected, 'Missing expected exception' + message); + } + + var userProvidedMessage = typeof message === 'string'; + var isUnwantedException = !shouldThrow && util.isError(actual); + var isUnexpectedException = !shouldThrow && actual && !expected; + + if ((isUnwantedException && + userProvidedMessage && + expectedException(actual, expected)) || + isUnexpectedException) { + fail(actual, expected, 'Got unwanted exception' + message); + } + + if ((shouldThrow && actual && expected && + !expectedException(actual, expected)) || (!shouldThrow && actual)) { + throw actual; + } +} + +// 11. Expected to throw an error: +// assert.throws(block, Error_opt, message_opt); + +assert.throws = function(block, /*optional*/error, /*optional*/message) { + _throws(true, block, error, message); +}; + +// EXTENSION! This is annoying to write outside this module. +assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) { + _throws(false, block, error, message); +}; + +assert.ifError = function(err) { if (err) throw err; }; + +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + if (hasOwn.call(obj, key)) keys.push(key); + } + return keys; +}; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"util/":333}],20:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = asyncify; + +var _isObject = require('lodash/isObject'); + +var _isObject2 = _interopRequireDefault(_isObject); + +var _initialParams = require('./internal/initialParams'); + +var _initialParams2 = _interopRequireDefault(_initialParams); + +var _setImmediate = require('./internal/setImmediate'); + +var _setImmediate2 = _interopRequireDefault(_setImmediate); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Take a sync function and make it async, passing its return value to a + * callback. This is useful for plugging sync functions into a waterfall, + * series, or other async functions. Any arguments passed to the generated + * function will be passed to the wrapped function (except for the final + * callback argument). Errors thrown will be passed to the callback. + * + * If the function passed to `asyncify` returns a Promise, that promises's + * resolved/rejected state will be used to call the callback, rather than simply + * the synchronous return value. + * + * This also means you can asyncify ES2017 `async` functions. + * + * @name asyncify + * @static + * @memberOf module:Utils + * @method + * @alias wrapSync + * @category Util + * @param {Function} func - The synchronous function, or Promise-returning + * function to convert to an {@link AsyncFunction}. + * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be + * invoked with `(args..., callback)`. + * @example + * + * // passing a regular synchronous function + * async.waterfall([ + * async.apply(fs.readFile, filename, "utf8"), + * async.asyncify(JSON.parse), + * function (data, next) { + * // data is the result of parsing the text. + * // If there was a parsing error, it would have been caught. + * } + * ], callback); + * + * // passing a function returning a promise + * async.waterfall([ + * async.apply(fs.readFile, filename, "utf8"), + * async.asyncify(function (contents) { + * return db.model.create(contents); + * }), + * function (model, next) { + * // `model` is the instantiated model object. + * // If there was an error, this function would be skipped. + * } + * ], callback); + * + * // es2017 example, though `asyncify` is not needed if your JS environment + * // supports async functions out of the box + * var q = async.queue(async.asyncify(async function(file) { + * var intermediateStep = await processFile(file); + * return await somePromise(intermediateStep) + * })); + * + * q.push(files); + */ +function asyncify(func) { + return (0, _initialParams2.default)(function (args, callback) { + var result; + try { + result = func.apply(this, args); + } catch (e) { + return callback(e); + } + // if result is Promise object + if ((0, _isObject2.default)(result) && typeof result.then === 'function') { + result.then(function (value) { + invokeCallback(callback, null, value); + }, function (err) { + invokeCallback(callback, err.message ? err : new Error(err)); + }); + } else { + callback(null, result); + } + }); +} + +function invokeCallback(callback, error, value) { + try { + callback(error, value); + } catch (e) { + (0, _setImmediate2.default)(rethrow, e); + } +} + +function rethrow(error) { + throw error; +} +module.exports = exports['default']; +},{"./internal/initialParams":31,"./internal/setImmediate":37,"lodash/isObject":225}],21:[function(require,module,exports){ +(function (process,global){ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.async = global.async || {}))); +}(this, (function (exports) { 'use strict'; + +function slice(arrayLike, start) { + start = start|0; + var newLen = Math.max(arrayLike.length - start, 0); + var newArr = Array(newLen); + for(var idx = 0; idx < newLen; idx++) { + newArr[idx] = arrayLike[start + idx]; + } + return newArr; +} + +/** + * Creates a continuation function with some arguments already applied. + * + * Useful as a shorthand when combined with other control flow functions. Any + * arguments passed to the returned function are added to the arguments + * originally passed to apply. + * + * @name apply + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {Function} fn - The function you want to eventually apply all + * arguments to. Invokes with (arguments...). + * @param {...*} arguments... - Any number of arguments to automatically apply + * when the continuation is called. + * @returns {Function} the partially-applied function + * @example + * + * // using apply + * async.parallel([ + * async.apply(fs.writeFile, 'testfile1', 'test1'), + * async.apply(fs.writeFile, 'testfile2', 'test2') + * ]); + * + * + * // the same process without using apply + * async.parallel([ + * function(callback) { + * fs.writeFile('testfile1', 'test1', callback); + * }, + * function(callback) { + * fs.writeFile('testfile2', 'test2', callback); + * } + * ]); + * + * // It's possible to pass any number of additional arguments when calling the + * // continuation: + * + * node> var fn = async.apply(sys.puts, 'one'); + * node> fn('two', 'three'); + * one + * two + * three + */ +var apply = function(fn/*, ...args*/) { + var args = slice(arguments, 1); + return function(/*callArgs*/) { + var callArgs = slice(arguments); + return fn.apply(null, args.concat(callArgs)); + }; +}; + +var initialParams = function (fn) { + return function (/*...args, callback*/) { + var args = slice(arguments); + var callback = args.pop(); + fn.call(this, args, callback); + }; +}; + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +var hasSetImmediate = typeof setImmediate === 'function' && setImmediate; +var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; + +function fallback(fn) { + setTimeout(fn, 0); +} + +function wrap(defer) { + return function (fn/*, ...args*/) { + var args = slice(arguments, 1); + defer(function () { + fn.apply(null, args); + }); + }; +} + +var _defer; + +if (hasSetImmediate) { + _defer = setImmediate; +} else if (hasNextTick) { + _defer = process.nextTick; +} else { + _defer = fallback; +} + +var setImmediate$1 = wrap(_defer); + +/** + * Take a sync function and make it async, passing its return value to a + * callback. This is useful for plugging sync functions into a waterfall, + * series, or other async functions. Any arguments passed to the generated + * function will be passed to the wrapped function (except for the final + * callback argument). Errors thrown will be passed to the callback. + * + * If the function passed to `asyncify` returns a Promise, that promises's + * resolved/rejected state will be used to call the callback, rather than simply + * the synchronous return value. + * + * This also means you can asyncify ES2017 `async` functions. + * + * @name asyncify + * @static + * @memberOf module:Utils + * @method + * @alias wrapSync + * @category Util + * @param {Function} func - The synchronous function, or Promise-returning + * function to convert to an {@link AsyncFunction}. + * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be + * invoked with `(args..., callback)`. + * @example + * + * // passing a regular synchronous function + * async.waterfall([ + * async.apply(fs.readFile, filename, "utf8"), + * async.asyncify(JSON.parse), + * function (data, next) { + * // data is the result of parsing the text. + * // If there was a parsing error, it would have been caught. + * } + * ], callback); + * + * // passing a function returning a promise + * async.waterfall([ + * async.apply(fs.readFile, filename, "utf8"), + * async.asyncify(function (contents) { + * return db.model.create(contents); + * }), + * function (model, next) { + * // `model` is the instantiated model object. + * // If there was an error, this function would be skipped. + * } + * ], callback); + * + * // es2017 example, though `asyncify` is not needed if your JS environment + * // supports async functions out of the box + * var q = async.queue(async.asyncify(async function(file) { + * var intermediateStep = await processFile(file); + * return await somePromise(intermediateStep) + * })); + * + * q.push(files); + */ +function asyncify(func) { + return initialParams(function (args, callback) { + var result; + try { + result = func.apply(this, args); + } catch (e) { + return callback(e); + } + // if result is Promise object + if (isObject(result) && typeof result.then === 'function') { + result.then(function(value) { + invokeCallback(callback, null, value); + }, function(err) { + invokeCallback(callback, err.message ? err : new Error(err)); + }); + } else { + callback(null, result); + } + }); +} + +function invokeCallback(callback, error, value) { + try { + callback(error, value); + } catch (e) { + setImmediate$1(rethrow, e); + } +} + +function rethrow(error) { + throw error; +} + +var supportsSymbol = typeof Symbol === 'function'; + +function isAsync(fn) { + return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction'; +} + +function wrapAsync(asyncFn) { + return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn; +} + +function applyEach$1(eachfn) { + return function(fns/*, ...args*/) { + var args = slice(arguments, 1); + var go = initialParams(function(args, callback) { + var that = this; + return eachfn(fns, function (fn, cb) { + wrapAsync(fn).apply(that, args.concat(cb)); + }, callback); + }); + if (args.length) { + return go.apply(this, args); + } + else { + return go; + } + }; +} + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Built-in value references. */ +var Symbol$1 = root.Symbol; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag$1), + tag = value[symToStringTag$1]; + + try { + value[symToStringTag$1] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag$1] = tag; + } else { + delete value[symToStringTag$1]; + } + } + return result; +} + +/** Used for built-in method references. */ +var objectProto$1 = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString$1 = objectProto$1.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString$1.call(value); +} + +/** `Object#toString` result references. */ +var nullTag = '[object Null]'; +var undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]'; +var funcTag = '[object Function]'; +var genTag = '[object GeneratorFunction]'; +var proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +// A temporary value used to identify if the loop should be broken. +// See #1064, #1293 +var breakLoop = {}; + +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +function once(fn) { + return function () { + if (fn === null) return; + var callFn = fn; + fn = null; + callFn.apply(this, arguments); + }; +} + +var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator; + +var getIterator = function (coll) { + return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol](); +}; + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +/** Used for built-in method references. */ +var objectProto$3 = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty$2 = objectProto$3.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto$3.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty$2.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER$1 = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER$1 : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** `Object#toString` result references. */ +var argsTag$1 = '[object Arguments]'; +var arrayTag = '[object Array]'; +var boolTag = '[object Boolean]'; +var dateTag = '[object Date]'; +var errorTag = '[object Error]'; +var funcTag$1 = '[object Function]'; +var mapTag = '[object Map]'; +var numberTag = '[object Number]'; +var objectTag = '[object Object]'; +var regexpTag = '[object RegExp]'; +var setTag = '[object Set]'; +var stringTag = '[object String]'; +var weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]'; +var dataViewTag = '[object DataView]'; +var float32Tag = '[object Float32Array]'; +var float64Tag = '[object Float64Array]'; +var int8Tag = '[object Int8Array]'; +var int16Tag = '[object Int16Array]'; +var int32Tag = '[object Int32Array]'; +var uint8Tag = '[object Uint8Array]'; +var uint8ClampedTag = '[object Uint8ClampedArray]'; +var uint16Tag = '[object Uint16Array]'; +var uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag$1] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/** Detect free variable `exports`. */ +var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports$1 && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +/** Used for built-in method references. */ +var objectProto$2 = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty$1 = objectProto$2.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty$1.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +/** Used for built-in method references. */ +var objectProto$5 = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5; + + return value === proto; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +/** Used for built-in method references. */ +var objectProto$4 = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty$3 = objectProto$4.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty$3.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +function createArrayIterator(coll) { + var i = -1; + var len = coll.length; + return function next() { + return ++i < len ? {value: coll[i], key: i} : null; + } +} + +function createES2015Iterator(iterator) { + var i = -1; + return function next() { + var item = iterator.next(); + if (item.done) + return null; + i++; + return {value: item.value, key: i}; + } +} + +function createObjectIterator(obj) { + var okeys = keys(obj); + var i = -1; + var len = okeys.length; + return function next() { + var key = okeys[++i]; + return i < len ? {value: obj[key], key: key} : null; + }; +} + +function iterator(coll) { + if (isArrayLike(coll)) { + return createArrayIterator(coll); + } + + var iterator = getIterator(coll); + return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); +} + +function onlyOnce(fn) { + return function() { + if (fn === null) throw new Error("Callback was already called."); + var callFn = fn; + fn = null; + callFn.apply(this, arguments); + }; +} + +function _eachOfLimit(limit) { + return function (obj, iteratee, callback) { + callback = once(callback || noop); + if (limit <= 0 || !obj) { + return callback(null); + } + var nextElem = iterator(obj); + var done = false; + var running = 0; + + function iterateeCallback(err, value) { + running -= 1; + if (err) { + done = true; + callback(err); + } + else if (value === breakLoop || (done && running <= 0)) { + done = true; + return callback(null); + } + else { + replenish(); + } + } + + function replenish () { + while (running < limit && !done) { + var elem = nextElem(); + if (elem === null) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running += 1; + iteratee(elem.value, elem.key, onlyOnce(iterateeCallback)); + } + } + + replenish(); + }; +} + +/** + * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a + * time. + * + * @name eachOfLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.eachOf]{@link module:Collections.eachOf} + * @alias forEachOfLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each + * item in `coll`. The `key` is the item's key, or index in the case of an + * array. + * Invoked with (item, key, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ +function eachOfLimit(coll, limit, iteratee, callback) { + _eachOfLimit(limit)(coll, wrapAsync(iteratee), callback); +} + +function doLimit(fn, limit) { + return function (iterable, iteratee, callback) { + return fn(iterable, limit, iteratee, callback); + }; +} + +// eachOf implementation optimized for array-likes +function eachOfArrayLike(coll, iteratee, callback) { + callback = once(callback || noop); + var index = 0, + completed = 0, + length = coll.length; + if (length === 0) { + callback(null); + } + + function iteratorCallback(err, value) { + if (err) { + callback(err); + } else if ((++completed === length) || value === breakLoop) { + callback(null); + } + } + + for (; index < length; index++) { + iteratee(coll[index], index, onlyOnce(iteratorCallback)); + } +} + +// a generic version of eachOf which can handle array, object, and iterator cases. +var eachOfGeneric = doLimit(eachOfLimit, Infinity); + +/** + * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument + * to the iteratee. + * + * @name eachOf + * @static + * @memberOf module:Collections + * @method + * @alias forEachOf + * @category Collection + * @see [async.each]{@link module:Collections.each} + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - A function to apply to each + * item in `coll`. + * The `key` is the item's key, or index in the case of an array. + * Invoked with (item, key, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + * @example + * + * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; + * var configs = {}; + * + * async.forEachOf(obj, function (value, key, callback) { + * fs.readFile(__dirname + value, "utf8", function (err, data) { + * if (err) return callback(err); + * try { + * configs[key] = JSON.parse(data); + * } catch (e) { + * return callback(e); + * } + * callback(); + * }); + * }, function (err) { + * if (err) console.error(err.message); + * // configs is now a map of JSON data + * doSomethingWith(configs); + * }); + */ +var eachOf = function(coll, iteratee, callback) { + var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric; + eachOfImplementation(coll, wrapAsync(iteratee), callback); +}; + +function doParallel(fn) { + return function (obj, iteratee, callback) { + return fn(eachOf, obj, wrapAsync(iteratee), callback); + }; +} + +function _asyncMap(eachfn, arr, iteratee, callback) { + callback = callback || noop; + arr = arr || []; + var results = []; + var counter = 0; + var _iteratee = wrapAsync(iteratee); + + eachfn(arr, function (value, _, callback) { + var index = counter++; + _iteratee(value, function (err, v) { + results[index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); +} + +/** + * Produces a new collection of values by mapping each value in `coll` through + * the `iteratee` function. The `iteratee` is called with an item from `coll` + * and a callback for when it has finished processing. Each of these callback + * takes 2 arguments: an `error`, and the transformed item from `coll`. If + * `iteratee` passes an error to its callback, the main `callback` (for the + * `map` function) is immediately called with the error. + * + * Note, that since this function applies the `iteratee` to each item in + * parallel, there is no guarantee that the `iteratee` functions will complete + * in order. However, the results array will be in the same order as the + * original `coll`. + * + * If `map` is passed an Object, the results will be an Array. The results + * will roughly be in the order of the original Objects' keys (but this can + * vary across JavaScript engines). + * + * @name map + * @static + * @memberOf module:Collections + * @method + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with the transformed item. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Results is an Array of the + * transformed items from the `coll`. Invoked with (err, results). + * @example + * + * async.map(['file1','file2','file3'], fs.stat, function(err, results) { + * // results is now an array of stats for each file + * }); + */ +var map = doParallel(_asyncMap); + +/** + * Applies the provided arguments to each function in the array, calling + * `callback` after all functions have completed. If you only provide the first + * argument, `fns`, then it will return a function which lets you pass in the + * arguments as if it were a single function call. If more arguments are + * provided, `callback` is required while `args` is still optional. + * + * @name applyEach + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s + * to all call with the same arguments + * @param {...*} [args] - any number of separate arguments to pass to the + * function. + * @param {Function} [callback] - the final argument should be the callback, + * called when all functions have completed processing. + * @returns {Function} - If only the first argument, `fns`, is provided, it will + * return a function which lets you pass in the arguments as if it were a single + * function call. The signature is `(..args, callback)`. If invoked with any + * arguments, `callback` is required. + * @example + * + * async.applyEach([enableSearch, updateSchema], 'bucket', callback); + * + * // partial application example: + * async.each( + * buckets, + * async.applyEach([enableSearch, updateSchema]), + * callback + * ); + */ +var applyEach = applyEach$1(map); + +function doParallelLimit(fn) { + return function (obj, limit, iteratee, callback) { + return fn(_eachOfLimit(limit), obj, wrapAsync(iteratee), callback); + }; +} + +/** + * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time. + * + * @name mapLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.map]{@link module:Collections.map} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with the transformed item. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Results is an array of the + * transformed items from the `coll`. Invoked with (err, results). + */ +var mapLimit = doParallelLimit(_asyncMap); + +/** + * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time. + * + * @name mapSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.map]{@link module:Collections.map} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with the transformed item. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Results is an array of the + * transformed items from the `coll`. Invoked with (err, results). + */ +var mapSeries = doLimit(mapLimit, 1); + +/** + * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time. + * + * @name applyEachSeries + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.applyEach]{@link module:ControlFlow.applyEach} + * @category Control Flow + * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s to all + * call with the same arguments + * @param {...*} [args] - any number of separate arguments to pass to the + * function. + * @param {Function} [callback] - the final argument should be the callback, + * called when all functions have completed processing. + * @returns {Function} - If only the first argument is provided, it will return + * a function which lets you pass in the arguments as if it were a single + * function call. + */ +var applyEachSeries = applyEach$1(mapSeries); + +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); +} + +/** + * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on + * their requirements. Each function can optionally depend on other functions + * being completed first, and each function is run as soon as its requirements + * are satisfied. + * + * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence + * will stop. Further tasks will not execute (so any other functions depending + * on it will not run), and the main `callback` is immediately called with the + * error. + * + * {@link AsyncFunction}s also receive an object containing the results of functions which + * have completed so far as the first argument, if they have dependencies. If a + * task function has no dependencies, it will only be passed a callback. + * + * @name auto + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Object} tasks - An object. Each of its properties is either a + * function or an array of requirements, with the {@link AsyncFunction} itself the last item + * in the array. The object's key of a property serves as the name of the task + * defined by that property, i.e. can be used when specifying requirements for + * other tasks. The function receives one or two arguments: + * * a `results` object, containing the results of the previously executed + * functions, only passed if the task has any dependencies, + * * a `callback(err, result)` function, which must be called when finished, + * passing an `error` (which can be `null`) and the result of the function's + * execution. + * @param {number} [concurrency=Infinity] - An optional `integer` for + * determining the maximum number of tasks that can be run in parallel. By + * default, as many as possible. + * @param {Function} [callback] - An optional callback which is called when all + * the tasks have been completed. It receives the `err` argument if any `tasks` + * pass an error to their callback. Results are always returned; however, if an + * error occurs, no further `tasks` will be performed, and the results object + * will only contain partial results. Invoked with (err, results). + * @returns undefined + * @example + * + * async.auto({ + * // this function will just be passed a callback + * readData: async.apply(fs.readFile, 'data.txt', 'utf-8'), + * showData: ['readData', function(results, cb) { + * // results.readData is the file's contents + * // ... + * }] + * }, callback); + * + * async.auto({ + * get_data: function(callback) { + * console.log('in get_data'); + * // async code to get some data + * callback(null, 'data', 'converted to array'); + * }, + * make_folder: function(callback) { + * console.log('in make_folder'); + * // async code to create a directory to store a file in + * // this is run at the same time as getting the data + * callback(null, 'folder'); + * }, + * write_file: ['get_data', 'make_folder', function(results, callback) { + * console.log('in write_file', JSON.stringify(results)); + * // once there is some data and the directory exists, + * // write the data to a file in the directory + * callback(null, 'filename'); + * }], + * email_link: ['write_file', function(results, callback) { + * console.log('in email_link', JSON.stringify(results)); + * // once the file is written let's email a link to it... + * // results.write_file contains the filename returned by write_file. + * callback(null, {'file':results.write_file, 'email':'user@example.com'}); + * }] + * }, function(err, results) { + * console.log('err = ', err); + * console.log('results = ', results); + * }); + */ +var auto = function (tasks, concurrency, callback) { + if (typeof concurrency === 'function') { + // concurrency is optional, shift the args. + callback = concurrency; + concurrency = null; + } + callback = once(callback || noop); + var keys$$1 = keys(tasks); + var numTasks = keys$$1.length; + if (!numTasks) { + return callback(null); + } + if (!concurrency) { + concurrency = numTasks; + } + + var results = {}; + var runningTasks = 0; + var hasError = false; + + var listeners = Object.create(null); + + var readyTasks = []; + + // for cycle detection: + var readyToCheck = []; // tasks that have been identified as reachable + // without the possibility of returning to an ancestor task + var uncheckedDependencies = {}; + + baseForOwn(tasks, function (task, key) { + if (!isArray(task)) { + // no dependencies + enqueueTask(key, [task]); + readyToCheck.push(key); + return; + } + + var dependencies = task.slice(0, task.length - 1); + var remainingDependencies = dependencies.length; + if (remainingDependencies === 0) { + enqueueTask(key, task); + readyToCheck.push(key); + return; + } + uncheckedDependencies[key] = remainingDependencies; + + arrayEach(dependencies, function (dependencyName) { + if (!tasks[dependencyName]) { + throw new Error('async.auto task `' + key + + '` has a non-existent dependency `' + + dependencyName + '` in ' + + dependencies.join(', ')); + } + addListener(dependencyName, function () { + remainingDependencies--; + if (remainingDependencies === 0) { + enqueueTask(key, task); + } + }); + }); + }); + + checkForDeadlocks(); + processQueue(); + + function enqueueTask(key, task) { + readyTasks.push(function () { + runTask(key, task); + }); + } + + function processQueue() { + if (readyTasks.length === 0 && runningTasks === 0) { + return callback(null, results); + } + while(readyTasks.length && runningTasks < concurrency) { + var run = readyTasks.shift(); + run(); + } + + } + + function addListener(taskName, fn) { + var taskListeners = listeners[taskName]; + if (!taskListeners) { + taskListeners = listeners[taskName] = []; + } + + taskListeners.push(fn); + } + + function taskComplete(taskName) { + var taskListeners = listeners[taskName] || []; + arrayEach(taskListeners, function (fn) { + fn(); + }); + processQueue(); + } + + + function runTask(key, task) { + if (hasError) return; + + var taskCallback = onlyOnce(function(err, result) { + runningTasks--; + if (arguments.length > 2) { + result = slice(arguments, 1); + } + if (err) { + var safeResults = {}; + baseForOwn(results, function(val, rkey) { + safeResults[rkey] = val; + }); + safeResults[key] = result; + hasError = true; + listeners = Object.create(null); + + callback(err, safeResults); + } else { + results[key] = result; + taskComplete(key); + } + }); + + runningTasks++; + var taskFn = wrapAsync(task[task.length - 1]); + if (task.length > 1) { + taskFn(results, taskCallback); + } else { + taskFn(taskCallback); + } + } + + function checkForDeadlocks() { + // Kahn's algorithm + // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm + // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html + var currentTask; + var counter = 0; + while (readyToCheck.length) { + currentTask = readyToCheck.pop(); + counter++; + arrayEach(getDependents(currentTask), function (dependent) { + if (--uncheckedDependencies[dependent] === 0) { + readyToCheck.push(dependent); + } + }); + } + + if (counter !== numTasks) { + throw new Error( + 'async.auto cannot execute tasks due to a recursive dependency' + ); + } + } + + function getDependents(taskName) { + var result = []; + baseForOwn(tasks, function (task, key) { + if (isArray(task) && baseIndexOf(task, taskName, 0) >= 0) { + result.push(key); + } + }); + return result; + } +}; + +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined; +var symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ +function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +/** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ +function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff'; +var rsComboMarksRange = '\\u0300-\\u036f'; +var reComboHalfMarksRange = '\\ufe20-\\ufe2f'; +var rsComboSymbolsRange = '\\u20d0-\\u20ff'; +var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; +var rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/** Used to compose unicode character classes. */ +var rsAstralRange$1 = '\\ud800-\\udfff'; +var rsComboMarksRange$1 = '\\u0300-\\u036f'; +var reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f'; +var rsComboSymbolsRange$1 = '\\u20d0-\\u20ff'; +var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1; +var rsVarRange$1 = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange$1 + ']'; +var rsCombo = '[' + rsComboRange$1 + ']'; +var rsFitz = '\\ud83c[\\udffb-\\udfff]'; +var rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')'; +var rsNonAstral = '[^' + rsAstralRange$1 + ']'; +var rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}'; +var rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]'; +var rsZWJ$1 = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?'; +var rsOptVar = '[' + rsVarRange$1 + ']?'; +var rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*'; +var rsSeq = rsOptVar + reOptMod + rsOptJoin; +var rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** + * Removes leading and trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trim(' abc '); + * // => 'abc' + * + * _.trim('-_-abc-_-', '_-'); + * // => 'abc' + * + * _.map([' foo ', ' bar '], _.trim); + * // => ['foo', 'bar'] + */ +function trim(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrim, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + chrSymbols = stringToArray(chars), + start = charsStartIndex(strSymbols, chrSymbols), + end = charsEndIndex(strSymbols, chrSymbols) + 1; + + return castSlice(strSymbols, start, end).join(''); +} + +var FN_ARGS = /^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m; +var FN_ARG_SPLIT = /,/; +var FN_ARG = /(=.+)?(\s*)$/; +var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; + +function parseParams(func) { + func = func.toString().replace(STRIP_COMMENTS, ''); + func = func.match(FN_ARGS)[2].replace(' ', ''); + func = func ? func.split(FN_ARG_SPLIT) : []; + func = func.map(function (arg){ + return trim(arg.replace(FN_ARG, '')); + }); + return func; +} + +/** + * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent + * tasks are specified as parameters to the function, after the usual callback + * parameter, with the parameter names matching the names of the tasks it + * depends on. This can provide even more readable task graphs which can be + * easier to maintain. + * + * If a final callback is specified, the task results are similarly injected, + * specified as named parameters after the initial error parameter. + * + * The autoInject function is purely syntactic sugar and its semantics are + * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}. + * + * @name autoInject + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.auto]{@link module:ControlFlow.auto} + * @category Control Flow + * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of + * the form 'func([dependencies...], callback). The object's key of a property + * serves as the name of the task defined by that property, i.e. can be used + * when specifying requirements for other tasks. + * * The `callback` parameter is a `callback(err, result)` which must be called + * when finished, passing an `error` (which can be `null`) and the result of + * the function's execution. The remaining parameters name other tasks on + * which the task is dependent, and the results from those tasks are the + * arguments of those parameters. + * @param {Function} [callback] - An optional callback which is called when all + * the tasks have been completed. It receives the `err` argument if any `tasks` + * pass an error to their callback, and a `results` object with any completed + * task results, similar to `auto`. + * @example + * + * // The example from `auto` can be rewritten as follows: + * async.autoInject({ + * get_data: function(callback) { + * // async code to get some data + * callback(null, 'data', 'converted to array'); + * }, + * make_folder: function(callback) { + * // async code to create a directory to store a file in + * // this is run at the same time as getting the data + * callback(null, 'folder'); + * }, + * write_file: function(get_data, make_folder, callback) { + * // once there is some data and the directory exists, + * // write the data to a file in the directory + * callback(null, 'filename'); + * }, + * email_link: function(write_file, callback) { + * // once the file is written let's email a link to it... + * // write_file contains the filename returned by write_file. + * callback(null, {'file':write_file, 'email':'user@example.com'}); + * } + * }, function(err, results) { + * console.log('err = ', err); + * console.log('email_link = ', results.email_link); + * }); + * + * // If you are using a JS minifier that mangles parameter names, `autoInject` + * // will not work with plain functions, since the parameter names will be + * // collapsed to a single letter identifier. To work around this, you can + * // explicitly specify the names of the parameters your task function needs + * // in an array, similar to Angular.js dependency injection. + * + * // This still has an advantage over plain `auto`, since the results a task + * // depends on are still spread into arguments. + * async.autoInject({ + * //... + * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) { + * callback(null, 'filename'); + * }], + * email_link: ['write_file', function(write_file, callback) { + * callback(null, {'file':write_file, 'email':'user@example.com'}); + * }] + * //... + * }, function(err, results) { + * console.log('err = ', err); + * console.log('email_link = ', results.email_link); + * }); + */ +function autoInject(tasks, callback) { + var newTasks = {}; + + baseForOwn(tasks, function (taskFn, key) { + var params; + var fnIsAsync = isAsync(taskFn); + var hasNoDeps = + (!fnIsAsync && taskFn.length === 1) || + (fnIsAsync && taskFn.length === 0); + + if (isArray(taskFn)) { + params = taskFn.slice(0, -1); + taskFn = taskFn[taskFn.length - 1]; + + newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); + } else if (hasNoDeps) { + // no dependencies, use the function as-is + newTasks[key] = taskFn; + } else { + params = parseParams(taskFn); + if (taskFn.length === 0 && !fnIsAsync && params.length === 0) { + throw new Error("autoInject task functions require explicit parameters."); + } + + // remove callback param + if (!fnIsAsync) params.pop(); + + newTasks[key] = params.concat(newTask); + } + + function newTask(results, taskCb) { + var newArgs = arrayMap(params, function (name) { + return results[name]; + }); + newArgs.push(taskCb); + wrapAsync(taskFn).apply(null, newArgs); + } + }); + + auto(newTasks, callback); +} + +// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation +// used for queues. This implementation assumes that the node provided by the user can be modified +// to adjust the next and last properties. We implement only the minimal functionality +// for queue support. +function DLL() { + this.head = this.tail = null; + this.length = 0; +} + +function setInitial(dll, node) { + dll.length = 1; + dll.head = dll.tail = node; +} + +DLL.prototype.removeLink = function(node) { + if (node.prev) node.prev.next = node.next; + else this.head = node.next; + if (node.next) node.next.prev = node.prev; + else this.tail = node.prev; + + node.prev = node.next = null; + this.length -= 1; + return node; +}; + +DLL.prototype.empty = function () { + while(this.head) this.shift(); + return this; +}; + +DLL.prototype.insertAfter = function(node, newNode) { + newNode.prev = node; + newNode.next = node.next; + if (node.next) node.next.prev = newNode; + else this.tail = newNode; + node.next = newNode; + this.length += 1; +}; + +DLL.prototype.insertBefore = function(node, newNode) { + newNode.prev = node.prev; + newNode.next = node; + if (node.prev) node.prev.next = newNode; + else this.head = newNode; + node.prev = newNode; + this.length += 1; +}; + +DLL.prototype.unshift = function(node) { + if (this.head) this.insertBefore(this.head, node); + else setInitial(this, node); +}; + +DLL.prototype.push = function(node) { + if (this.tail) this.insertAfter(this.tail, node); + else setInitial(this, node); +}; + +DLL.prototype.shift = function() { + return this.head && this.removeLink(this.head); +}; + +DLL.prototype.pop = function() { + return this.tail && this.removeLink(this.tail); +}; + +DLL.prototype.toArray = function () { + var arr = Array(this.length); + var curr = this.head; + for(var idx = 0; idx < this.length; idx++) { + arr[idx] = curr.data; + curr = curr.next; + } + return arr; +}; + +DLL.prototype.remove = function (testFn) { + var curr = this.head; + while(!!curr) { + var next = curr.next; + if (testFn(curr)) { + this.removeLink(curr); + } + curr = next; + } + return this; +}; + +function queue(worker, concurrency, payload) { + if (concurrency == null) { + concurrency = 1; + } + else if(concurrency === 0) { + throw new Error('Concurrency must not be zero'); + } + + var _worker = wrapAsync(worker); + var numRunning = 0; + var workersList = []; + + var processingScheduled = false; + function _insert(data, insertAtFront, callback) { + if (callback != null && typeof callback !== 'function') { + throw new Error('task callback must be a function'); + } + q.started = true; + if (!isArray(data)) { + data = [data]; + } + if (data.length === 0 && q.idle()) { + // call drain immediately if there are no tasks + return setImmediate$1(function() { + q.drain(); + }); + } + + for (var i = 0, l = data.length; i < l; i++) { + var item = { + data: data[i], + callback: callback || noop + }; + + if (insertAtFront) { + q._tasks.unshift(item); + } else { + q._tasks.push(item); + } + } + + if (!processingScheduled) { + processingScheduled = true; + setImmediate$1(function() { + processingScheduled = false; + q.process(); + }); + } + } + + function _next(tasks) { + return function(err){ + numRunning -= 1; + + for (var i = 0, l = tasks.length; i < l; i++) { + var task = tasks[i]; + + var index = baseIndexOf(workersList, task, 0); + if (index === 0) { + workersList.shift(); + } else if (index > 0) { + workersList.splice(index, 1); + } + + task.callback.apply(task, arguments); + + if (err != null) { + q.error(err, task.data); + } + } + + if (numRunning <= (q.concurrency - q.buffer) ) { + q.unsaturated(); + } + + if (q.idle()) { + q.drain(); + } + q.process(); + }; + } + + var isProcessing = false; + var q = { + _tasks: new DLL(), + concurrency: concurrency, + payload: payload, + saturated: noop, + unsaturated:noop, + buffer: concurrency / 4, + empty: noop, + drain: noop, + error: noop, + started: false, + paused: false, + push: function (data, callback) { + _insert(data, false, callback); + }, + kill: function () { + q.drain = noop; + q._tasks.empty(); + }, + unshift: function (data, callback) { + _insert(data, true, callback); + }, + remove: function (testFn) { + q._tasks.remove(testFn); + }, + process: function () { + // Avoid trying to start too many processing operations. This can occur + // when callbacks resolve synchronously (#1267). + if (isProcessing) { + return; + } + isProcessing = true; + while(!q.paused && numRunning < q.concurrency && q._tasks.length){ + var tasks = [], data = []; + var l = q._tasks.length; + if (q.payload) l = Math.min(l, q.payload); + for (var i = 0; i < l; i++) { + var node = q._tasks.shift(); + tasks.push(node); + workersList.push(node); + data.push(node.data); + } + + numRunning += 1; + + if (q._tasks.length === 0) { + q.empty(); + } + + if (numRunning === q.concurrency) { + q.saturated(); + } + + var cb = onlyOnce(_next(tasks)); + _worker(data, cb); + } + isProcessing = false; + }, + length: function () { + return q._tasks.length; + }, + running: function () { + return numRunning; + }, + workersList: function () { + return workersList; + }, + idle: function() { + return q._tasks.length + numRunning === 0; + }, + pause: function () { + q.paused = true; + }, + resume: function () { + if (q.paused === false) { return; } + q.paused = false; + setImmediate$1(q.process); + } + }; + return q; +} + +/** + * A cargo of tasks for the worker function to complete. Cargo inherits all of + * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}. + * @typedef {Object} CargoObject + * @memberOf module:ControlFlow + * @property {Function} length - A function returning the number of items + * waiting to be processed. Invoke like `cargo.length()`. + * @property {number} payload - An `integer` for determining how many tasks + * should be process per round. This property can be changed after a `cargo` is + * created to alter the payload on-the-fly. + * @property {Function} push - Adds `task` to the `queue`. The callback is + * called once the `worker` has finished processing the task. Instead of a + * single task, an array of `tasks` can be submitted. The respective callback is + * used for every task in the list. Invoke like `cargo.push(task, [callback])`. + * @property {Function} saturated - A callback that is called when the + * `queue.length()` hits the concurrency and further tasks will be queued. + * @property {Function} empty - A callback that is called when the last item + * from the `queue` is given to a `worker`. + * @property {Function} drain - A callback that is called when the last item + * from the `queue` has returned from the `worker`. + * @property {Function} idle - a function returning false if there are items + * waiting or being processed, or true if not. Invoke like `cargo.idle()`. + * @property {Function} pause - a function that pauses the processing of tasks + * until `resume()` is called. Invoke like `cargo.pause()`. + * @property {Function} resume - a function that resumes the processing of + * queued tasks when the queue is paused. Invoke like `cargo.resume()`. + * @property {Function} kill - a function that removes the `drain` callback and + * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`. + */ + +/** + * Creates a `cargo` object with the specified payload. Tasks added to the + * cargo will be processed altogether (up to the `payload` limit). If the + * `worker` is in progress, the task is queued until it becomes available. Once + * the `worker` has completed some tasks, each callback of those tasks is + * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) + * for how `cargo` and `queue` work. + * + * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers + * at a time, cargo passes an array of tasks to a single worker, repeating + * when the worker is finished. + * + * @name cargo + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.queue]{@link module:ControlFlow.queue} + * @category Control Flow + * @param {AsyncFunction} worker - An asynchronous function for processing an array + * of queued tasks. Invoked with `(tasks, callback)`. + * @param {number} [payload=Infinity] - An optional `integer` for determining + * how many tasks should be processed per round; if omitted, the default is + * unlimited. + * @returns {module:ControlFlow.CargoObject} A cargo object to manage the tasks. Callbacks can + * attached as certain properties to listen for specific events during the + * lifecycle of the cargo and inner queue. + * @example + * + * // create a cargo object with payload 2 + * var cargo = async.cargo(function(tasks, callback) { + * for (var i=0; i true + */ +function identity(value) { + return value; +} + +function _createTester(check, getResult) { + return function(eachfn, arr, iteratee, cb) { + cb = cb || noop; + var testPassed = false; + var testResult; + eachfn(arr, function(value, _, callback) { + iteratee(value, function(err, result) { + if (err) { + callback(err); + } else if (check(result) && !testResult) { + testPassed = true; + testResult = getResult(true, value); + callback(null, breakLoop); + } else { + callback(); + } + }); + }, function(err) { + if (err) { + cb(err); + } else { + cb(null, testPassed ? testResult : getResult(false)); + } + }); + }; +} + +function _findGetResult(v, x) { + return x; +} + +/** + * Returns the first value in `coll` that passes an async truth test. The + * `iteratee` is applied in parallel, meaning the first iteratee to return + * `true` will fire the detect `callback` with that result. That means the + * result might not be the first item in the original `coll` (in terms of order) + * that passes the test. + + * If order within the original `coll` is important, then look at + * [`detectSeries`]{@link module:Collections.detectSeries}. + * + * @name detect + * @static + * @memberOf module:Collections + * @method + * @alias find + * @category Collections + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. + * The iteratee must complete with a boolean value as its result. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the `iteratee` functions have finished. + * Result will be the first item in the array that passes the truth test + * (iteratee) or the value `undefined` if none passed. Invoked with + * (err, result). + * @example + * + * async.detect(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, result) { + * // result now equals the first file in the list that exists + * }); + */ +var detect = doParallel(_createTester(identity, _findGetResult)); + +/** + * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a + * time. + * + * @name detectLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.detect]{@link module:Collections.detect} + * @alias findLimit + * @category Collections + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. + * The iteratee must complete with a boolean value as its result. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the `iteratee` functions have finished. + * Result will be the first item in the array that passes the truth test + * (iteratee) or the value `undefined` if none passed. Invoked with + * (err, result). + */ +var detectLimit = doParallelLimit(_createTester(identity, _findGetResult)); + +/** + * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. + * + * @name detectSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.detect]{@link module:Collections.detect} + * @alias findSeries + * @category Collections + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. + * The iteratee must complete with a boolean value as its result. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the `iteratee` functions have finished. + * Result will be the first item in the array that passes the truth test + * (iteratee) or the value `undefined` if none passed. Invoked with + * (err, result). + */ +var detectSeries = doLimit(detectLimit, 1); + +function consoleFunc(name) { + return function (fn/*, ...args*/) { + var args = slice(arguments, 1); + args.push(function (err/*, ...args*/) { + var args = slice(arguments, 1); + if (typeof console === 'object') { + if (err) { + if (console.error) { + console.error(err); + } + } else if (console[name]) { + arrayEach(args, function (x) { + console[name](x); + }); + } + } + }); + wrapAsync(fn).apply(null, args); + }; +} + +/** + * Logs the result of an [`async` function]{@link AsyncFunction} to the + * `console` using `console.dir` to display the properties of the resulting object. + * Only works in Node.js or in browsers that support `console.dir` and + * `console.error` (such as FF and Chrome). + * If multiple arguments are returned from the async function, + * `console.dir` is called on each argument in order. + * + * @name dir + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {AsyncFunction} function - The function you want to eventually apply + * all arguments to. + * @param {...*} arguments... - Any number of arguments to apply to the function. + * @example + * + * // in a module + * var hello = function(name, callback) { + * setTimeout(function() { + * callback(null, {hello: name}); + * }, 1000); + * }; + * + * // in the node repl + * node> async.dir(hello, 'world'); + * {hello: 'world'} + */ +var dir = consoleFunc('dir'); + +/** + * The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in + * the order of operations, the arguments `test` and `fn` are switched. + * + * Also a version of [`doWhilst`]{@link module:ControlFlow.doWhilst} with asynchronous `test` function. + * @name doDuring + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.during]{@link module:ControlFlow.during} + * @category Control Flow + * @param {AsyncFunction} fn - An async function which is called each time + * `test` passes. Invoked with (callback). + * @param {AsyncFunction} test - asynchronous truth test to perform before each + * execution of `fn`. Invoked with (...args, callback), where `...args` are the + * non-error args from the previous callback of `fn`. + * @param {Function} [callback] - A callback which is called after the test + * function has failed and repeated execution of `fn` has stopped. `callback` + * will be passed an error if one occurred, otherwise `null`. + */ +function doDuring(fn, test, callback) { + callback = onlyOnce(callback || noop); + var _fn = wrapAsync(fn); + var _test = wrapAsync(test); + + function next(err/*, ...args*/) { + if (err) return callback(err); + var args = slice(arguments, 1); + args.push(check); + _test.apply(this, args); + } + + function check(err, truth) { + if (err) return callback(err); + if (!truth) return callback(null); + _fn(next); + } + + check(null, true); + +} + +/** + * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in + * the order of operations, the arguments `test` and `iteratee` are switched. + * + * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. + * + * @name doWhilst + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.whilst]{@link module:ControlFlow.whilst} + * @category Control Flow + * @param {AsyncFunction} iteratee - A function which is called each time `test` + * passes. Invoked with (callback). + * @param {Function} test - synchronous truth test to perform after each + * execution of `iteratee`. Invoked with any non-error callback results of + * `iteratee`. + * @param {Function} [callback] - A callback which is called after the test + * function has failed and repeated execution of `iteratee` has stopped. + * `callback` will be passed an error and any arguments passed to the final + * `iteratee`'s callback. Invoked with (err, [results]); + */ +function doWhilst(iteratee, test, callback) { + callback = onlyOnce(callback || noop); + var _iteratee = wrapAsync(iteratee); + var next = function(err/*, ...args*/) { + if (err) return callback(err); + var args = slice(arguments, 1); + if (test.apply(this, args)) return _iteratee(next); + callback.apply(null, [null].concat(args)); + }; + _iteratee(next); +} + +/** + * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the + * argument ordering differs from `until`. + * + * @name doUntil + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.doWhilst]{@link module:ControlFlow.doWhilst} + * @category Control Flow + * @param {AsyncFunction} iteratee - An async function which is called each time + * `test` fails. Invoked with (callback). + * @param {Function} test - synchronous truth test to perform after each + * execution of `iteratee`. Invoked with any non-error callback results of + * `iteratee`. + * @param {Function} [callback] - A callback which is called after the test + * function has passed and repeated execution of `iteratee` has stopped. `callback` + * will be passed an error and any arguments passed to the final `iteratee`'s + * callback. Invoked with (err, [results]); + */ +function doUntil(iteratee, test, callback) { + doWhilst(iteratee, function() { + return !test.apply(this, arguments); + }, callback); +} + +/** + * Like [`whilst`]{@link module:ControlFlow.whilst}, except the `test` is an asynchronous function that + * is passed a callback in the form of `function (err, truth)`. If error is + * passed to `test` or `fn`, the main callback is immediately called with the + * value of the error. + * + * @name during + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.whilst]{@link module:ControlFlow.whilst} + * @category Control Flow + * @param {AsyncFunction} test - asynchronous truth test to perform before each + * execution of `fn`. Invoked with (callback). + * @param {AsyncFunction} fn - An async function which is called each time + * `test` passes. Invoked with (callback). + * @param {Function} [callback] - A callback which is called after the test + * function has failed and repeated execution of `fn` has stopped. `callback` + * will be passed an error, if one occurred, otherwise `null`. + * @example + * + * var count = 0; + * + * async.during( + * function (callback) { + * return callback(null, count < 5); + * }, + * function (callback) { + * count++; + * setTimeout(callback, 1000); + * }, + * function (err) { + * // 5 seconds have passed + * } + * ); + */ +function during(test, fn, callback) { + callback = onlyOnce(callback || noop); + var _fn = wrapAsync(fn); + var _test = wrapAsync(test); + + function next(err) { + if (err) return callback(err); + _test(check); + } + + function check(err, truth) { + if (err) return callback(err); + if (!truth) return callback(null); + _fn(next); + } + + _test(check); +} + +function _withoutIndex(iteratee) { + return function (value, index, callback) { + return iteratee(value, callback); + }; +} + +/** + * Applies the function `iteratee` to each item in `coll`, in parallel. + * The `iteratee` is called with an item from the list, and a callback for when + * it has finished. If the `iteratee` passes an error to its `callback`, the + * main `callback` (for the `each` function) is immediately called with the + * error. + * + * Note, that since this function applies `iteratee` to each item in parallel, + * there is no guarantee that the iteratee functions will complete in order. + * + * @name each + * @static + * @memberOf module:Collections + * @method + * @alias forEach + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to + * each item in `coll`. Invoked with (item, callback). + * The array index is not passed to the iteratee. + * If you need the index, use `eachOf`. + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + * @example + * + * // assuming openFiles is an array of file names and saveFile is a function + * // to save the modified contents of that file: + * + * async.each(openFiles, saveFile, function(err){ + * // if any of the saves produced an error, err would equal that error + * }); + * + * // assuming openFiles is an array of file names + * async.each(openFiles, function(file, callback) { + * + * // Perform operation on file here. + * console.log('Processing file ' + file); + * + * if( file.length > 32 ) { + * console.log('This file name is too long'); + * callback('File name too long'); + * } else { + * // Do work to process file here + * console.log('File processed'); + * callback(); + * } + * }, function(err) { + * // if any of the file processing produced an error, err would equal that error + * if( err ) { + * // One of the iterations produced an error. + * // All processing will now stop. + * console.log('A file failed to process'); + * } else { + * console.log('All files have been processed successfully'); + * } + * }); + */ +function eachLimit(coll, iteratee, callback) { + eachOf(coll, _withoutIndex(wrapAsync(iteratee)), callback); +} + +/** + * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. + * + * @name eachLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.each]{@link module:Collections.each} + * @alias forEachLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The array index is not passed to the iteratee. + * If you need the index, use `eachOfLimit`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ +function eachLimit$1(coll, limit, iteratee, callback) { + _eachOfLimit(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback); +} + +/** + * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. + * + * @name eachSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.each]{@link module:Collections.each} + * @alias forEachSeries + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each + * item in `coll`. + * The array index is not passed to the iteratee. + * If you need the index, use `eachOfSeries`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ +var eachSeries = doLimit(eachLimit$1, 1); + +/** + * Wrap an async function and ensure it calls its callback on a later tick of + * the event loop. If the function already calls its callback on a next tick, + * no extra deferral is added. This is useful for preventing stack overflows + * (`RangeError: Maximum call stack size exceeded`) and generally keeping + * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) + * contained. ES2017 `async` functions are returned as-is -- they are immune + * to Zalgo's corrupting influences, as they always resolve on a later tick. + * + * @name ensureAsync + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {AsyncFunction} fn - an async function, one that expects a node-style + * callback as its last argument. + * @returns {AsyncFunction} Returns a wrapped function with the exact same call + * signature as the function passed in. + * @example + * + * function sometimesAsync(arg, callback) { + * if (cache[arg]) { + * return callback(null, cache[arg]); // this would be synchronous!! + * } else { + * doSomeIO(arg, callback); // this IO would be asynchronous + * } + * } + * + * // this has a risk of stack overflows if many results are cached in a row + * async.mapSeries(args, sometimesAsync, done); + * + * // this will defer sometimesAsync's callback if necessary, + * // preventing stack overflows + * async.mapSeries(args, async.ensureAsync(sometimesAsync), done); + */ +function ensureAsync(fn) { + if (isAsync(fn)) return fn; + return initialParams(function (args, callback) { + var sync = true; + args.push(function () { + var innerArgs = arguments; + if (sync) { + setImmediate$1(function () { + callback.apply(null, innerArgs); + }); + } else { + callback.apply(null, innerArgs); + } + }); + fn.apply(this, args); + sync = false; + }); +} + +function notId(v) { + return !v; +} + +/** + * Returns `true` if every element in `coll` satisfies an async test. If any + * iteratee call returns `false`, the main `callback` is immediately called. + * + * @name every + * @static + * @memberOf module:Collections + * @method + * @alias all + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async truth test to apply to each item + * in the collection in parallel. + * The iteratee must complete with a boolean result value. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result will be either `true` or `false` + * depending on the values of the async tests. Invoked with (err, result). + * @example + * + * async.every(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, result) { + * // if result is true then every file exists + * }); + */ +var every = doParallel(_createTester(notId, notId)); + +/** + * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. + * + * @name everyLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.every]{@link module:Collections.every} + * @alias allLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async truth test to apply to each item + * in the collection in parallel. + * The iteratee must complete with a boolean result value. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result will be either `true` or `false` + * depending on the values of the async tests. Invoked with (err, result). + */ +var everyLimit = doParallelLimit(_createTester(notId, notId)); + +/** + * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. + * + * @name everySeries + * @static + * @memberOf module:Collections + * @method + * @see [async.every]{@link module:Collections.every} + * @alias allSeries + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async truth test to apply to each item + * in the collection in series. + * The iteratee must complete with a boolean result value. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result will be either `true` or `false` + * depending on the values of the async tests. Invoked with (err, result). + */ +var everySeries = doLimit(everyLimit, 1); + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +function filterArray(eachfn, arr, iteratee, callback) { + var truthValues = new Array(arr.length); + eachfn(arr, function (x, index, callback) { + iteratee(x, function (err, v) { + truthValues[index] = !!v; + callback(err); + }); + }, function (err) { + if (err) return callback(err); + var results = []; + for (var i = 0; i < arr.length; i++) { + if (truthValues[i]) results.push(arr[i]); + } + callback(null, results); + }); +} + +function filterGeneric(eachfn, coll, iteratee, callback) { + var results = []; + eachfn(coll, function (x, index, callback) { + iteratee(x, function (err, v) { + if (err) { + callback(err); + } else { + if (v) { + results.push({index: index, value: x}); + } + callback(); + } + }); + }, function (err) { + if (err) { + callback(err); + } else { + callback(null, arrayMap(results.sort(function (a, b) { + return a.index - b.index; + }), baseProperty('value'))); + } + }); +} + +function _filter(eachfn, coll, iteratee, callback) { + var filter = isArrayLike(coll) ? filterArray : filterGeneric; + filter(eachfn, coll, wrapAsync(iteratee), callback || noop); +} + +/** + * Returns a new array of all the values in `coll` which pass an async truth + * test. This operation is performed in parallel, but the results array will be + * in the same order as the original. + * + * @name filter + * @static + * @memberOf module:Collections + * @method + * @alias select + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The `iteratee` is passed a `callback(err, truthValue)`, which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + * @example + * + * async.filter(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, results) { + * // results now equals an array of the existing files + * }); + */ +var filter = doParallel(_filter); + +/** + * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a + * time. + * + * @name filterLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.filter]{@link module:Collections.filter} + * @alias selectLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The `iteratee` is passed a `callback(err, truthValue)`, which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + */ +var filterLimit = doParallelLimit(_filter); + +/** + * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. + * + * @name filterSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.filter]{@link module:Collections.filter} + * @alias selectSeries + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The `iteratee` is passed a `callback(err, truthValue)`, which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results) + */ +var filterSeries = doLimit(filterLimit, 1); + +/** + * Calls the asynchronous function `fn` with a callback parameter that allows it + * to call itself again, in series, indefinitely. + + * If an error is passed to the callback then `errback` is called with the + * error, and execution stops, otherwise it will never be called. + * + * @name forever + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {AsyncFunction} fn - an async function to call repeatedly. + * Invoked with (next). + * @param {Function} [errback] - when `fn` passes an error to it's callback, + * this function will be called, and execution stops. Invoked with (err). + * @example + * + * async.forever( + * function(next) { + * // next is suitable for passing to things that need a callback(err [, whatever]); + * // it will result in this function being called again. + * }, + * function(err) { + * // if next is called with a value in its first parameter, it will appear + * // in here as 'err', and execution will stop. + * } + * ); + */ +function forever(fn, errback) { + var done = onlyOnce(errback || noop); + var task = wrapAsync(ensureAsync(fn)); + + function next(err) { + if (err) return done(err); + task(next); + } + next(); +} + +/** + * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time. + * + * @name groupByLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.groupBy]{@link module:Collections.groupBy} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with a `key` to group the value under. + * Invoked with (value, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Result is an `Object` whoses + * properties are arrays of values which returned the corresponding key. + */ +var groupByLimit = function(coll, limit, iteratee, callback) { + callback = callback || noop; + var _iteratee = wrapAsync(iteratee); + mapLimit(coll, limit, function(val, callback) { + _iteratee(val, function(err, key) { + if (err) return callback(err); + return callback(null, {key: key, val: val}); + }); + }, function(err, mapResults) { + var result = {}; + // from MDN, handle object having an `hasOwnProperty` prop + var hasOwnProperty = Object.prototype.hasOwnProperty; + + for (var i = 0; i < mapResults.length; i++) { + if (mapResults[i]) { + var key = mapResults[i].key; + var val = mapResults[i].val; + + if (hasOwnProperty.call(result, key)) { + result[key].push(val); + } else { + result[key] = [val]; + } + } + } + + return callback(err, result); + }); +}; + +/** + * Returns a new object, where each value corresponds to an array of items, from + * `coll`, that returned the corresponding key. That is, the keys of the object + * correspond to the values passed to the `iteratee` callback. + * + * Note: Since this function applies the `iteratee` to each item in parallel, + * there is no guarantee that the `iteratee` functions will complete in order. + * However, the values for each key in the `result` will be in the same order as + * the original `coll`. For Objects, the values will roughly be in the order of + * the original Objects' keys (but this can vary across JavaScript engines). + * + * @name groupBy + * @static + * @memberOf module:Collections + * @method + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with a `key` to group the value under. + * Invoked with (value, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Result is an `Object` whoses + * properties are arrays of values which returned the corresponding key. + * @example + * + * async.groupBy(['userId1', 'userId2', 'userId3'], function(userId, callback) { + * db.findById(userId, function(err, user) { + * if (err) return callback(err); + * return callback(null, user.age); + * }); + * }, function(err, result) { + * // result is object containing the userIds grouped by age + * // e.g. { 30: ['userId1', 'userId3'], 42: ['userId2']}; + * }); + */ +var groupBy = doLimit(groupByLimit, Infinity); + +/** + * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time. + * + * @name groupBySeries + * @static + * @memberOf module:Collections + * @method + * @see [async.groupBy]{@link module:Collections.groupBy} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with a `key` to group the value under. + * Invoked with (value, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Result is an `Object` whoses + * properties are arrays of values which returned the corresponding key. + */ +var groupBySeries = doLimit(groupByLimit, 1); + +/** + * Logs the result of an `async` function to the `console`. Only works in + * Node.js or in browsers that support `console.log` and `console.error` (such + * as FF and Chrome). If multiple arguments are returned from the async + * function, `console.log` is called on each argument in order. + * + * @name log + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {AsyncFunction} function - The function you want to eventually apply + * all arguments to. + * @param {...*} arguments... - Any number of arguments to apply to the function. + * @example + * + * // in a module + * var hello = function(name, callback) { + * setTimeout(function() { + * callback(null, 'hello ' + name); + * }, 1000); + * }; + * + * // in the node repl + * node> async.log(hello, 'world'); + * 'hello world' + */ +var log = consoleFunc('log'); + +/** + * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a + * time. + * + * @name mapValuesLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.mapValues]{@link module:Collections.mapValues} + * @category Collection + * @param {Object} obj - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - A function to apply to each value and key + * in `coll`. + * The iteratee should complete with the transformed value as its result. + * Invoked with (value, key, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. `result` is a new object consisting + * of each key from `obj`, with each transformed value on the right-hand side. + * Invoked with (err, result). + */ +function mapValuesLimit(obj, limit, iteratee, callback) { + callback = once(callback || noop); + var newObj = {}; + var _iteratee = wrapAsync(iteratee); + eachOfLimit(obj, limit, function(val, key, next) { + _iteratee(val, key, function (err, result) { + if (err) return next(err); + newObj[key] = result; + next(); + }); + }, function (err) { + callback(err, newObj); + }); +} + +/** + * A relative of [`map`]{@link module:Collections.map}, designed for use with objects. + * + * Produces a new Object by mapping each value of `obj` through the `iteratee` + * function. The `iteratee` is called each `value` and `key` from `obj` and a + * callback for when it has finished processing. Each of these callbacks takes + * two arguments: an `error`, and the transformed item from `obj`. If `iteratee` + * passes an error to its callback, the main `callback` (for the `mapValues` + * function) is immediately called with the error. + * + * Note, the order of the keys in the result is not guaranteed. The keys will + * be roughly in the order they complete, (but this is very engine-specific) + * + * @name mapValues + * @static + * @memberOf module:Collections + * @method + * @category Collection + * @param {Object} obj - A collection to iterate over. + * @param {AsyncFunction} iteratee - A function to apply to each value and key + * in `coll`. + * The iteratee should complete with the transformed value as its result. + * Invoked with (value, key, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. `result` is a new object consisting + * of each key from `obj`, with each transformed value on the right-hand side. + * Invoked with (err, result). + * @example + * + * async.mapValues({ + * f1: 'file1', + * f2: 'file2', + * f3: 'file3' + * }, function (file, key, callback) { + * fs.stat(file, callback); + * }, function(err, result) { + * // result is now a map of stats for each file, e.g. + * // { + * // f1: [stats for file1], + * // f2: [stats for file2], + * // f3: [stats for file3] + * // } + * }); + */ + +var mapValues = doLimit(mapValuesLimit, Infinity); + +/** + * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time. + * + * @name mapValuesSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.mapValues]{@link module:Collections.mapValues} + * @category Collection + * @param {Object} obj - A collection to iterate over. + * @param {AsyncFunction} iteratee - A function to apply to each value and key + * in `coll`. + * The iteratee should complete with the transformed value as its result. + * Invoked with (value, key, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. `result` is a new object consisting + * of each key from `obj`, with each transformed value on the right-hand side. + * Invoked with (err, result). + */ +var mapValuesSeries = doLimit(mapValuesLimit, 1); + +function has(obj, key) { + return key in obj; +} + +/** + * Caches the results of an async function. When creating a hash to store + * function results against, the callback is omitted from the hash and an + * optional hash function can be used. + * + * If no hash function is specified, the first argument is used as a hash key, + * which may work reasonably if it is a string or a data type that converts to a + * distinct string. Note that objects and arrays will not behave reasonably. + * Neither will cases where the other arguments are significant. In such cases, + * specify your own hash function. + * + * The cache of results is exposed as the `memo` property of the function + * returned by `memoize`. + * + * @name memoize + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {AsyncFunction} fn - The async function to proxy and cache results from. + * @param {Function} hasher - An optional function for generating a custom hash + * for storing results. It has all the arguments applied to it apart from the + * callback, and must be synchronous. + * @returns {AsyncFunction} a memoized version of `fn` + * @example + * + * var slow_fn = function(name, callback) { + * // do something + * callback(null, result); + * }; + * var fn = async.memoize(slow_fn); + * + * // fn can now be used as if it were slow_fn + * fn('some name', function() { + * // callback + * }); + */ +function memoize(fn, hasher) { + var memo = Object.create(null); + var queues = Object.create(null); + hasher = hasher || identity; + var _fn = wrapAsync(fn); + var memoized = initialParams(function memoized(args, callback) { + var key = hasher.apply(null, args); + if (has(memo, key)) { + setImmediate$1(function() { + callback.apply(null, memo[key]); + }); + } else if (has(queues, key)) { + queues[key].push(callback); + } else { + queues[key] = [callback]; + _fn.apply(null, args.concat(function(/*args*/) { + var args = slice(arguments); + memo[key] = args; + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, args); + } + })); + } + }); + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; +} + +/** + * Calls `callback` on a later loop around the event loop. In Node.js this just + * calls `process.nextTicl`. In the browser it will use `setImmediate` if + * available, otherwise `setTimeout(callback, 0)`, which means other higher + * priority events may precede the execution of `callback`. + * + * This is used internally for browser-compatibility purposes. + * + * @name nextTick + * @static + * @memberOf module:Utils + * @method + * @see [async.setImmediate]{@link module:Utils.setImmediate} + * @category Util + * @param {Function} callback - The function to call on a later loop around + * the event loop. Invoked with (args...). + * @param {...*} args... - any number of additional arguments to pass to the + * callback on the next tick. + * @example + * + * var call_order = []; + * async.nextTick(function() { + * call_order.push('two'); + * // call_order now equals ['one','two'] + * }); + * call_order.push('one'); + * + * async.setImmediate(function (a, b, c) { + * // a, b, and c equal 1, 2, and 3 + * }, 1, 2, 3); + */ +var _defer$1; + +if (hasNextTick) { + _defer$1 = process.nextTick; +} else if (hasSetImmediate) { + _defer$1 = setImmediate; +} else { + _defer$1 = fallback; +} + +var nextTick = wrap(_defer$1); + +function _parallel(eachfn, tasks, callback) { + callback = callback || noop; + var results = isArrayLike(tasks) ? [] : {}; + + eachfn(tasks, function (task, key, callback) { + wrapAsync(task)(function (err, result) { + if (arguments.length > 2) { + result = slice(arguments, 1); + } + results[key] = result; + callback(err); + }); + }, function (err) { + callback(err, results); + }); +} + +/** + * Run the `tasks` collection of functions in parallel, without waiting until + * the previous function has completed. If any of the functions pass an error to + * its callback, the main `callback` is immediately called with the value of the + * error. Once the `tasks` have completed, the results are passed to the final + * `callback` as an array. + * + * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about + * parallel execution of code. If your tasks do not use any timers or perform + * any I/O, they will actually be executed in series. Any synchronous setup + * sections for each task will happen one after the other. JavaScript remains + * single-threaded. + * + * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the + * execution of other tasks when a task fails. + * + * It is also possible to use an object instead of an array. Each property will + * be run as a function and the results will be passed to the final `callback` + * as an object instead of an array. This can be a more readable way of handling + * results from {@link async.parallel}. + * + * @name parallel + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array|Iterable|Object} tasks - A collection of + * [async functions]{@link AsyncFunction} to run. + * Each async function can complete with any number of optional `result` values. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed successfully. This function gets a results array + * (or object) containing all the result arguments passed to the task callbacks. + * Invoked with (err, results). + * + * @example + * async.parallel([ + * function(callback) { + * setTimeout(function() { + * callback(null, 'one'); + * }, 200); + * }, + * function(callback) { + * setTimeout(function() { + * callback(null, 'two'); + * }, 100); + * } + * ], + * // optional callback + * function(err, results) { + * // the results array will equal ['one','two'] even though + * // the second function had a shorter timeout. + * }); + * + * // an example using an object instead of an array + * async.parallel({ + * one: function(callback) { + * setTimeout(function() { + * callback(null, 1); + * }, 200); + * }, + * two: function(callback) { + * setTimeout(function() { + * callback(null, 2); + * }, 100); + * } + * }, function(err, results) { + * // results is now equals to: {one: 1, two: 2} + * }); + */ +function parallelLimit(tasks, callback) { + _parallel(eachOf, tasks, callback); +} + +/** + * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a + * time. + * + * @name parallelLimit + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.parallel]{@link module:ControlFlow.parallel} + * @category Control Flow + * @param {Array|Iterable|Object} tasks - A collection of + * [async functions]{@link AsyncFunction} to run. + * Each async function can complete with any number of optional `result` values. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed successfully. This function gets a results array + * (or object) containing all the result arguments passed to the task callbacks. + * Invoked with (err, results). + */ +function parallelLimit$1(tasks, limit, callback) { + _parallel(_eachOfLimit(limit), tasks, callback); +} + +/** + * A queue of tasks for the worker function to complete. + * @typedef {Object} QueueObject + * @memberOf module:ControlFlow + * @property {Function} length - a function returning the number of items + * waiting to be processed. Invoke with `queue.length()`. + * @property {boolean} started - a boolean indicating whether or not any + * items have been pushed and processed by the queue. + * @property {Function} running - a function returning the number of items + * currently being processed. Invoke with `queue.running()`. + * @property {Function} workersList - a function returning the array of items + * currently being processed. Invoke with `queue.workersList()`. + * @property {Function} idle - a function returning false if there are items + * waiting or being processed, or true if not. Invoke with `queue.idle()`. + * @property {number} concurrency - an integer for determining how many `worker` + * functions should be run in parallel. This property can be changed after a + * `queue` is created to alter the concurrency on-the-fly. + * @property {Function} push - add a new task to the `queue`. Calls `callback` + * once the `worker` has finished processing the task. Instead of a single task, + * a `tasks` array can be submitted. The respective callback is used for every + * task in the list. Invoke with `queue.push(task, [callback])`, + * @property {Function} unshift - add a new task to the front of the `queue`. + * Invoke with `queue.unshift(task, [callback])`. + * @property {Function} remove - remove items from the queue that match a test + * function. The test function will be passed an object with a `data` property, + * and a `priority` property, if this is a + * [priorityQueue]{@link module:ControlFlow.priorityQueue} object. + * Invoked with `queue.remove(testFn)`, where `testFn` is of the form + * `function ({data, priority}) {}` and returns a Boolean. + * @property {Function} saturated - a callback that is called when the number of + * running workers hits the `concurrency` limit, and further tasks will be + * queued. + * @property {Function} unsaturated - a callback that is called when the number + * of running workers is less than the `concurrency` & `buffer` limits, and + * further tasks will not be queued. + * @property {number} buffer - A minimum threshold buffer in order to say that + * the `queue` is `unsaturated`. + * @property {Function} empty - a callback that is called when the last item + * from the `queue` is given to a `worker`. + * @property {Function} drain - a callback that is called when the last item + * from the `queue` has returned from the `worker`. + * @property {Function} error - a callback that is called when a task errors. + * Has the signature `function(error, task)`. + * @property {boolean} paused - a boolean for determining whether the queue is + * in a paused state. + * @property {Function} pause - a function that pauses the processing of tasks + * until `resume()` is called. Invoke with `queue.pause()`. + * @property {Function} resume - a function that resumes the processing of + * queued tasks when the queue is paused. Invoke with `queue.resume()`. + * @property {Function} kill - a function that removes the `drain` callback and + * empties remaining tasks from the queue forcing it to go idle. No more tasks + * should be pushed to the queue after calling this function. Invoke with `queue.kill()`. + */ + +/** + * Creates a `queue` object with the specified `concurrency`. Tasks added to the + * `queue` are processed in parallel (up to the `concurrency` limit). If all + * `worker`s are in progress, the task is queued until one becomes available. + * Once a `worker` completes a `task`, that `task`'s callback is called. + * + * @name queue + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {AsyncFunction} worker - An async function for processing a queued task. + * If you want to handle errors from an individual task, pass a callback to + * `q.push()`. Invoked with (task, callback). + * @param {number} [concurrency=1] - An `integer` for determining how many + * `worker` functions should be run in parallel. If omitted, the concurrency + * defaults to `1`. If the concurrency is `0`, an error is thrown. + * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can + * attached as certain properties to listen for specific events during the + * lifecycle of the queue. + * @example + * + * // create a queue object with concurrency 2 + * var q = async.queue(function(task, callback) { + * console.log('hello ' + task.name); + * callback(); + * }, 2); + * + * // assign a callback + * q.drain = function() { + * console.log('all items have been processed'); + * }; + * + * // add some items to the queue + * q.push({name: 'foo'}, function(err) { + * console.log('finished processing foo'); + * }); + * q.push({name: 'bar'}, function (err) { + * console.log('finished processing bar'); + * }); + * + * // add some items to the queue (batch-wise) + * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) { + * console.log('finished processing item'); + * }); + * + * // add some items to the front of the queue + * q.unshift({name: 'bar'}, function (err) { + * console.log('finished processing bar'); + * }); + */ +var queue$1 = function (worker, concurrency) { + var _worker = wrapAsync(worker); + return queue(function (items, cb) { + _worker(items[0], cb); + }, concurrency, 1); +}; + +/** + * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and + * completed in ascending priority order. + * + * @name priorityQueue + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.queue]{@link module:ControlFlow.queue} + * @category Control Flow + * @param {AsyncFunction} worker - An async function for processing a queued task. + * If you want to handle errors from an individual task, pass a callback to + * `q.push()`. + * Invoked with (task, callback). + * @param {number} concurrency - An `integer` for determining how many `worker` + * functions should be run in parallel. If omitted, the concurrency defaults to + * `1`. If the concurrency is `0`, an error is thrown. + * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two + * differences between `queue` and `priorityQueue` objects: + * * `push(task, priority, [callback])` - `priority` should be a number. If an + * array of `tasks` is given, all tasks will be assigned the same priority. + * * The `unshift` method was removed. + */ +var priorityQueue = function(worker, concurrency) { + // Start with a normal queue + var q = queue$1(worker, concurrency); + + // Override push to accept second parameter representing priority + q.push = function(data, priority, callback) { + if (callback == null) callback = noop; + if (typeof callback !== 'function') { + throw new Error('task callback must be a function'); + } + q.started = true; + if (!isArray(data)) { + data = [data]; + } + if (data.length === 0) { + // call drain immediately if there are no tasks + return setImmediate$1(function() { + q.drain(); + }); + } + + priority = priority || 0; + var nextNode = q._tasks.head; + while (nextNode && priority >= nextNode.priority) { + nextNode = nextNode.next; + } + + for (var i = 0, l = data.length; i < l; i++) { + var item = { + data: data[i], + priority: priority, + callback: callback + }; + + if (nextNode) { + q._tasks.insertBefore(nextNode, item); + } else { + q._tasks.push(item); + } + } + setImmediate$1(q.process); + }; + + // Remove unshift function + delete q.unshift; + + return q; +}; + +/** + * Runs the `tasks` array of functions in parallel, without waiting until the + * previous function has completed. Once any of the `tasks` complete or pass an + * error to its callback, the main `callback` is immediately called. It's + * equivalent to `Promise.race()`. + * + * @name race + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction} + * to run. Each function can complete with an optional `result` value. + * @param {Function} callback - A callback to run once any of the functions have + * completed. This function gets an error or result from the first function that + * completed. Invoked with (err, result). + * @returns undefined + * @example + * + * async.race([ + * function(callback) { + * setTimeout(function() { + * callback(null, 'one'); + * }, 200); + * }, + * function(callback) { + * setTimeout(function() { + * callback(null, 'two'); + * }, 100); + * } + * ], + * // main callback + * function(err, result) { + * // the result will be equal to 'two' as it finishes earlier + * }); + */ +function race(tasks, callback) { + callback = once(callback || noop); + if (!isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions')); + if (!tasks.length) return callback(); + for (var i = 0, l = tasks.length; i < l; i++) { + wrapAsync(tasks[i])(callback); + } +} + +/** + * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. + * + * @name reduceRight + * @static + * @memberOf module:Collections + * @method + * @see [async.reduce]{@link module:Collections.reduce} + * @alias foldr + * @category Collection + * @param {Array} array - A collection to iterate over. + * @param {*} memo - The initial state of the reduction. + * @param {AsyncFunction} iteratee - A function applied to each item in the + * array to produce the next step in the reduction. + * The `iteratee` should complete with the next state of the reduction. + * If the iteratee complete with an error, the reduction is stopped and the + * main `callback` is immediately called with the error. + * Invoked with (memo, item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result is the reduced value. Invoked with + * (err, result). + */ +function reduceRight (array, memo, iteratee, callback) { + var reversed = slice(array).reverse(); + reduce(reversed, memo, iteratee, callback); +} + +/** + * Wraps the async function in another function that always completes with a + * result object, even when it errors. + * + * The result object has either the property `error` or `value`. + * + * @name reflect + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {AsyncFunction} fn - The async function you want to wrap + * @returns {Function} - A function that always passes null to it's callback as + * the error. The second argument to the callback will be an `object` with + * either an `error` or a `value` property. + * @example + * + * async.parallel([ + * async.reflect(function(callback) { + * // do some stuff ... + * callback(null, 'one'); + * }), + * async.reflect(function(callback) { + * // do some more stuff but error ... + * callback('bad stuff happened'); + * }), + * async.reflect(function(callback) { + * // do some more stuff ... + * callback(null, 'two'); + * }) + * ], + * // optional callback + * function(err, results) { + * // values + * // results[0].value = 'one' + * // results[1].error = 'bad stuff happened' + * // results[2].value = 'two' + * }); + */ +function reflect(fn) { + var _fn = wrapAsync(fn); + return initialParams(function reflectOn(args, reflectCallback) { + args.push(function callback(error, cbArg) { + if (error) { + reflectCallback(null, { error: error }); + } else { + var value; + if (arguments.length <= 2) { + value = cbArg; + } else { + value = slice(arguments, 1); + } + reflectCallback(null, { value: value }); + } + }); + + return _fn.apply(this, args); + }); +} + +/** + * A helper function that wraps an array or an object of functions with `reflect`. + * + * @name reflectAll + * @static + * @memberOf module:Utils + * @method + * @see [async.reflect]{@link module:Utils.reflect} + * @category Util + * @param {Array|Object|Iterable} tasks - The collection of + * [async functions]{@link AsyncFunction} to wrap in `async.reflect`. + * @returns {Array} Returns an array of async functions, each wrapped in + * `async.reflect` + * @example + * + * let tasks = [ + * function(callback) { + * setTimeout(function() { + * callback(null, 'one'); + * }, 200); + * }, + * function(callback) { + * // do some more stuff but error ... + * callback(new Error('bad stuff happened')); + * }, + * function(callback) { + * setTimeout(function() { + * callback(null, 'two'); + * }, 100); + * } + * ]; + * + * async.parallel(async.reflectAll(tasks), + * // optional callback + * function(err, results) { + * // values + * // results[0].value = 'one' + * // results[1].error = Error('bad stuff happened') + * // results[2].value = 'two' + * }); + * + * // an example using an object instead of an array + * let tasks = { + * one: function(callback) { + * setTimeout(function() { + * callback(null, 'one'); + * }, 200); + * }, + * two: function(callback) { + * callback('two'); + * }, + * three: function(callback) { + * setTimeout(function() { + * callback(null, 'three'); + * }, 100); + * } + * }; + * + * async.parallel(async.reflectAll(tasks), + * // optional callback + * function(err, results) { + * // values + * // results.one.value = 'one' + * // results.two.error = 'two' + * // results.three.value = 'three' + * }); + */ +function reflectAll(tasks) { + var results; + if (isArray(tasks)) { + results = arrayMap(tasks, reflect); + } else { + results = {}; + baseForOwn(tasks, function(task, key) { + results[key] = reflect.call(this, task); + }); + } + return results; +} + +function reject$1(eachfn, arr, iteratee, callback) { + _filter(eachfn, arr, function(value, cb) { + iteratee(value, function(err, v) { + cb(err, !v); + }); + }, callback); +} + +/** + * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test. + * + * @name reject + * @static + * @memberOf module:Collections + * @method + * @see [async.filter]{@link module:Collections.filter} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {Function} iteratee - An async truth test to apply to each item in + * `coll`. + * The should complete with a boolean value as its `result`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + * @example + * + * async.reject(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, results) { + * // results now equals an array of missing files + * createFiles(results); + * }); + */ +var reject = doParallel(reject$1); + +/** + * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a + * time. + * + * @name rejectLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.reject]{@link module:Collections.reject} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - An async truth test to apply to each item in + * `coll`. + * The should complete with a boolean value as its `result`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + */ +var rejectLimit = doParallelLimit(reject$1); + +/** + * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time. + * + * @name rejectSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.reject]{@link module:Collections.reject} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {Function} iteratee - An async truth test to apply to each item in + * `coll`. + * The should complete with a boolean value as its `result`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + */ +var rejectSeries = doLimit(rejectLimit, 1); + +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant$1(value) { + return function() { + return value; + }; +} + +/** + * Attempts to get a successful response from `task` no more than `times` times + * before returning an error. If the task is successful, the `callback` will be + * passed the result of the successful task. If all attempts fail, the callback + * will be passed the error and result (if any) of the final attempt. + * + * @name retry + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @see [async.retryable]{@link module:ControlFlow.retryable} + * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an + * object with `times` and `interval` or a number. + * * `times` - The number of attempts to make before giving up. The default + * is `5`. + * * `interval` - The time to wait between retries, in milliseconds. The + * default is `0`. The interval may also be specified as a function of the + * retry count (see example). + * * `errorFilter` - An optional synchronous function that is invoked on + * erroneous result. If it returns `true` the retry attempts will continue; + * if the function returns `false` the retry flow is aborted with the current + * attempt's error and result being returned to the final callback. + * Invoked with (err). + * * If `opts` is a number, the number specifies the number of times to retry, + * with the default interval of `0`. + * @param {AsyncFunction} task - An async function to retry. + * Invoked with (callback). + * @param {Function} [callback] - An optional callback which is called when the + * task has succeeded, or after the final failed attempt. It receives the `err` + * and `result` arguments of the last attempt at completing the `task`. Invoked + * with (err, results). + * + * @example + * + * // The `retry` function can be used as a stand-alone control flow by passing + * // a callback, as shown below: + * + * // try calling apiMethod 3 times + * async.retry(3, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod 3 times, waiting 200 ms between each retry + * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod 10 times with exponential backoff + * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds) + * async.retry({ + * times: 10, + * interval: function(retryCount) { + * return 50 * Math.pow(2, retryCount); + * } + * }, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod the default 5 times no delay between each retry + * async.retry(apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod only when error condition satisfies, all other + * // errors will abort the retry control flow and return to final callback + * async.retry({ + * errorFilter: function(err) { + * return err.message === 'Temporary error'; // only retry on a specific error + * } + * }, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // to retry individual methods that are not as reliable within other + * // control flow functions, use the `retryable` wrapper: + * async.auto({ + * users: api.getUsers.bind(api), + * payments: async.retryable(3, api.getPayments.bind(api)) + * }, function(err, results) { + * // do something with the results + * }); + * + */ +function retry(opts, task, callback) { + var DEFAULT_TIMES = 5; + var DEFAULT_INTERVAL = 0; + + var options = { + times: DEFAULT_TIMES, + intervalFunc: constant$1(DEFAULT_INTERVAL) + }; + + function parseTimes(acc, t) { + if (typeof t === 'object') { + acc.times = +t.times || DEFAULT_TIMES; + + acc.intervalFunc = typeof t.interval === 'function' ? + t.interval : + constant$1(+t.interval || DEFAULT_INTERVAL); + + acc.errorFilter = t.errorFilter; + } else if (typeof t === 'number' || typeof t === 'string') { + acc.times = +t || DEFAULT_TIMES; + } else { + throw new Error("Invalid arguments for async.retry"); + } + } + + if (arguments.length < 3 && typeof opts === 'function') { + callback = task || noop; + task = opts; + } else { + parseTimes(options, opts); + callback = callback || noop; + } + + if (typeof task !== 'function') { + throw new Error("Invalid arguments for async.retry"); + } + + var _task = wrapAsync(task); + + var attempt = 1; + function retryAttempt() { + _task(function(err) { + if (err && attempt++ < options.times && + (typeof options.errorFilter != 'function' || + options.errorFilter(err))) { + setTimeout(retryAttempt, options.intervalFunc(attempt)); + } else { + callback.apply(null, arguments); + } + }); + } + + retryAttempt(); +} + +/** + * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method + * wraps a task and makes it retryable, rather than immediately calling it + * with retries. + * + * @name retryable + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.retry]{@link module:ControlFlow.retry} + * @category Control Flow + * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional + * options, exactly the same as from `retry` + * @param {AsyncFunction} task - the asynchronous function to wrap. + * This function will be passed any arguments passed to the returned wrapper. + * Invoked with (...args, callback). + * @returns {AsyncFunction} The wrapped function, which when invoked, will + * retry on an error, based on the parameters specified in `opts`. + * This function will accept the same parameters as `task`. + * @example + * + * async.auto({ + * dep1: async.retryable(3, getFromFlakyService), + * process: ["dep1", async.retryable(3, function (results, cb) { + * maybeProcessData(results.dep1, cb); + * })] + * }, callback); + */ +var retryable = function (opts, task) { + if (!task) { + task = opts; + opts = null; + } + var _task = wrapAsync(task); + return initialParams(function (args, callback) { + function taskFn(cb) { + _task.apply(null, args.concat(cb)); + } + + if (opts) retry(opts, taskFn, callback); + else retry(taskFn, callback); + + }); +}; + +/** + * Run the functions in the `tasks` collection in series, each one running once + * the previous function has completed. If any functions in the series pass an + * error to its callback, no more functions are run, and `callback` is + * immediately called with the value of the error. Otherwise, `callback` + * receives an array of results when `tasks` have completed. + * + * It is also possible to use an object instead of an array. Each property will + * be run as a function, and the results will be passed to the final `callback` + * as an object instead of an array. This can be a more readable way of handling + * results from {@link async.series}. + * + * **Note** that while many implementations preserve the order of object + * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) + * explicitly states that + * + * > The mechanics and order of enumerating the properties is not specified. + * + * So if you rely on the order in which your series of functions are executed, + * and want this to work on all platforms, consider using an array. + * + * @name series + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array|Iterable|Object} tasks - A collection containing + * [async functions]{@link AsyncFunction} to run in series. + * Each function can complete with any number of optional `result` values. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed. This function gets a results array (or object) + * containing all the result arguments passed to the `task` callbacks. Invoked + * with (err, result). + * @example + * async.series([ + * function(callback) { + * // do some stuff ... + * callback(null, 'one'); + * }, + * function(callback) { + * // do some more stuff ... + * callback(null, 'two'); + * } + * ], + * // optional callback + * function(err, results) { + * // results is now equal to ['one', 'two'] + * }); + * + * async.series({ + * one: function(callback) { + * setTimeout(function() { + * callback(null, 1); + * }, 200); + * }, + * two: function(callback){ + * setTimeout(function() { + * callback(null, 2); + * }, 100); + * } + * }, function(err, results) { + * // results is now equal to: {one: 1, two: 2} + * }); + */ +function series(tasks, callback) { + _parallel(eachOfSeries, tasks, callback); +} + +/** + * Returns `true` if at least one element in the `coll` satisfies an async test. + * If any iteratee call returns `true`, the main `callback` is immediately + * called. + * + * @name some + * @static + * @memberOf module:Collections + * @method + * @alias any + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async truth test to apply to each item + * in the collections in parallel. + * The iteratee should complete with a boolean `result` value. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the iteratee functions have finished. + * Result will be either `true` or `false` depending on the values of the async + * tests. Invoked with (err, result). + * @example + * + * async.some(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, result) { + * // if result is true then at least one of the files exists + * }); + */ +var some = doParallel(_createTester(Boolean, identity)); + +/** + * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. + * + * @name someLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.some]{@link module:Collections.some} + * @alias anyLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async truth test to apply to each item + * in the collections in parallel. + * The iteratee should complete with a boolean `result` value. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the iteratee functions have finished. + * Result will be either `true` or `false` depending on the values of the async + * tests. Invoked with (err, result). + */ +var someLimit = doParallelLimit(_createTester(Boolean, identity)); + +/** + * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. + * + * @name someSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.some]{@link module:Collections.some} + * @alias anySeries + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async truth test to apply to each item + * in the collections in series. + * The iteratee should complete with a boolean `result` value. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the iteratee functions have finished. + * Result will be either `true` or `false` depending on the values of the async + * tests. Invoked with (err, result). + */ +var someSeries = doLimit(someLimit, 1); + +/** + * Sorts a list by the results of running each `coll` value through an async + * `iteratee`. + * + * @name sortBy + * @static + * @memberOf module:Collections + * @method + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with a value to use as the sort criteria as + * its `result`. + * Invoked with (item, callback). + * @param {Function} callback - A callback which is called after all the + * `iteratee` functions have finished, or an error occurs. Results is the items + * from the original `coll` sorted by the values returned by the `iteratee` + * calls. Invoked with (err, results). + * @example + * + * async.sortBy(['file1','file2','file3'], function(file, callback) { + * fs.stat(file, function(err, stats) { + * callback(err, stats.mtime); + * }); + * }, function(err, results) { + * // results is now the original array of files sorted by + * // modified date + * }); + * + * // By modifying the callback parameter the + * // sorting order can be influenced: + * + * // ascending order + * async.sortBy([1,9,3,5], function(x, callback) { + * callback(null, x); + * }, function(err,result) { + * // result callback + * }); + * + * // descending order + * async.sortBy([1,9,3,5], function(x, callback) { + * callback(null, x*-1); //<- x*-1 instead of x, turns the order around + * }, function(err,result) { + * // result callback + * }); + */ +function sortBy (coll, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + map(coll, function (x, callback) { + _iteratee(x, function (err, criteria) { + if (err) return callback(err); + callback(null, {value: x, criteria: criteria}); + }); + }, function (err, results) { + if (err) return callback(err); + callback(null, arrayMap(results.sort(comparator), baseProperty('value'))); + }); + + function comparator(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + } +} + +/** + * Sets a time limit on an asynchronous function. If the function does not call + * its callback within the specified milliseconds, it will be called with a + * timeout error. The code property for the error object will be `'ETIMEDOUT'`. + * + * @name timeout + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {AsyncFunction} asyncFn - The async function to limit in time. + * @param {number} milliseconds - The specified time limit. + * @param {*} [info] - Any variable you want attached (`string`, `object`, etc) + * to timeout Error for more information.. + * @returns {AsyncFunction} Returns a wrapped function that can be used with any + * of the control flow functions. + * Invoke this function with the same parameters as you would `asyncFunc`. + * @example + * + * function myFunction(foo, callback) { + * doAsyncTask(foo, function(err, data) { + * // handle errors + * if (err) return callback(err); + * + * // do some stuff ... + * + * // return processed data + * return callback(null, data); + * }); + * } + * + * var wrapped = async.timeout(myFunction, 1000); + * + * // call `wrapped` as you would `myFunction` + * wrapped({ bar: 'bar' }, function(err, data) { + * // if `myFunction` takes < 1000 ms to execute, `err` + * // and `data` will have their expected values + * + * // else `err` will be an Error with the code 'ETIMEDOUT' + * }); + */ +function timeout(asyncFn, milliseconds, info) { + var fn = wrapAsync(asyncFn); + + return initialParams(function (args, callback) { + var timedOut = false; + var timer; + + function timeoutCallback() { + var name = asyncFn.name || 'anonymous'; + var error = new Error('Callback function "' + name + '" timed out.'); + error.code = 'ETIMEDOUT'; + if (info) { + error.info = info; + } + timedOut = true; + callback(error); + } + + args.push(function () { + if (!timedOut) { + callback.apply(null, arguments); + clearTimeout(timer); + } + }); + + // setup timer and call original function + timer = setTimeout(timeoutCallback, milliseconds); + fn.apply(null, args); + }); +} + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil; +var nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +/** + * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a + * time. + * + * @name timesLimit + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.times]{@link module:ControlFlow.times} + * @category Control Flow + * @param {number} count - The number of times to run the function. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - The async function to call `n` times. + * Invoked with the iteration index and a callback: (n, next). + * @param {Function} callback - see [async.map]{@link module:Collections.map}. + */ +function timeLimit(count, limit, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + mapLimit(baseRange(0, count, 1), limit, _iteratee, callback); +} + +/** + * Calls the `iteratee` function `n` times, and accumulates results in the same + * manner you would use with [map]{@link module:Collections.map}. + * + * @name times + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.map]{@link module:Collections.map} + * @category Control Flow + * @param {number} n - The number of times to run the function. + * @param {AsyncFunction} iteratee - The async function to call `n` times. + * Invoked with the iteration index and a callback: (n, next). + * @param {Function} callback - see {@link module:Collections.map}. + * @example + * + * // Pretend this is some complicated async factory + * var createUser = function(id, callback) { + * callback(null, { + * id: 'user' + id + * }); + * }; + * + * // generate 5 users + * async.times(5, function(n, next) { + * createUser(n, function(err, user) { + * next(err, user); + * }); + * }, function(err, users) { + * // we should now have 5 users + * }); + */ +var times = doLimit(timeLimit, Infinity); + +/** + * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time. + * + * @name timesSeries + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.times]{@link module:ControlFlow.times} + * @category Control Flow + * @param {number} n - The number of times to run the function. + * @param {AsyncFunction} iteratee - The async function to call `n` times. + * Invoked with the iteration index and a callback: (n, next). + * @param {Function} callback - see {@link module:Collections.map}. + */ +var timesSeries = doLimit(timeLimit, 1); + +/** + * A relative of `reduce`. Takes an Object or Array, and iterates over each + * element in series, each step potentially mutating an `accumulator` value. + * The type of the accumulator defaults to the type of collection passed in. + * + * @name transform + * @static + * @memberOf module:Collections + * @method + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {*} [accumulator] - The initial state of the transform. If omitted, + * it will default to an empty Object or Array, depending on the type of `coll` + * @param {AsyncFunction} iteratee - A function applied to each item in the + * collection that potentially modifies the accumulator. + * Invoked with (accumulator, item, key, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result is the transformed accumulator. + * Invoked with (err, result). + * @example + * + * async.transform([1,2,3], function(acc, item, index, callback) { + * // pointless async: + * process.nextTick(function() { + * acc.push(item * 2) + * callback(null) + * }); + * }, function(err, result) { + * // result is now equal to [2, 4, 6] + * }); + * + * @example + * + * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) { + * setImmediate(function () { + * obj[key] = val * 2; + * callback(); + * }) + * }, function (err, result) { + * // result is equal to {a: 2, b: 4, c: 6} + * }) + */ +function transform (coll, accumulator, iteratee, callback) { + if (arguments.length <= 3) { + callback = iteratee; + iteratee = accumulator; + accumulator = isArray(coll) ? [] : {}; + } + callback = once(callback || noop); + var _iteratee = wrapAsync(iteratee); + + eachOf(coll, function(v, k, cb) { + _iteratee(accumulator, v, k, cb); + }, function(err) { + callback(err, accumulator); + }); +} + +/** + * It runs each task in series but stops whenever any of the functions were + * successful. If one of the tasks were successful, the `callback` will be + * passed the result of the successful task. If all tasks fail, the callback + * will be passed the error and result (if any) of the final attempt. + * + * @name tryEach + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array|Iterable|Object} tasks - A collection containing functions to + * run, each function is passed a `callback(err, result)` it must call on + * completion with an error `err` (which can be `null`) and an optional `result` + * value. + * @param {Function} [callback] - An optional callback which is called when one + * of the tasks has succeeded, or all have failed. It receives the `err` and + * `result` arguments of the last attempt at completing the `task`. Invoked with + * (err, results). + * @example + * async.tryEach([ + * function getDataFromFirstWebsite(callback) { + * // Try getting the data from the first website + * callback(err, data); + * }, + * function getDataFromSecondWebsite(callback) { + * // First website failed, + * // Try getting the data from the backup website + * callback(err, data); + * } + * ], + * // optional callback + * function(err, results) { + * Now do something with the data. + * }); + * + */ +function tryEach(tasks, callback) { + var error = null; + var result; + callback = callback || noop; + eachSeries(tasks, function(task, callback) { + wrapAsync(task)(function (err, res/*, ...args*/) { + if (arguments.length > 2) { + result = slice(arguments, 1); + } else { + result = res; + } + error = err; + callback(!err); + }); + }, function () { + callback(error, result); + }); +} + +/** + * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original, + * unmemoized form. Handy for testing. + * + * @name unmemoize + * @static + * @memberOf module:Utils + * @method + * @see [async.memoize]{@link module:Utils.memoize} + * @category Util + * @param {AsyncFunction} fn - the memoized function + * @returns {AsyncFunction} a function that calls the original unmemoized function + */ +function unmemoize(fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; +} + +/** + * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when + * stopped, or an error occurs. + * + * @name whilst + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Function} test - synchronous truth test to perform before each + * execution of `iteratee`. Invoked with (). + * @param {AsyncFunction} iteratee - An async function which is called each time + * `test` passes. Invoked with (callback). + * @param {Function} [callback] - A callback which is called after the test + * function has failed and repeated execution of `iteratee` has stopped. `callback` + * will be passed an error and any arguments passed to the final `iteratee`'s + * callback. Invoked with (err, [results]); + * @returns undefined + * @example + * + * var count = 0; + * async.whilst( + * function() { return count < 5; }, + * function(callback) { + * count++; + * setTimeout(function() { + * callback(null, count); + * }, 1000); + * }, + * function (err, n) { + * // 5 seconds have passed, n = 5 + * } + * ); + */ +function whilst(test, iteratee, callback) { + callback = onlyOnce(callback || noop); + var _iteratee = wrapAsync(iteratee); + if (!test()) return callback(null); + var next = function(err/*, ...args*/) { + if (err) return callback(err); + if (test()) return _iteratee(next); + var args = slice(arguments, 1); + callback.apply(null, [null].concat(args)); + }; + _iteratee(next); +} + +/** + * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when + * stopped, or an error occurs. `callback` will be passed an error and any + * arguments passed to the final `iteratee`'s callback. + * + * The inverse of [whilst]{@link module:ControlFlow.whilst}. + * + * @name until + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.whilst]{@link module:ControlFlow.whilst} + * @category Control Flow + * @param {Function} test - synchronous truth test to perform before each + * execution of `iteratee`. Invoked with (). + * @param {AsyncFunction} iteratee - An async function which is called each time + * `test` fails. Invoked with (callback). + * @param {Function} [callback] - A callback which is called after the test + * function has passed and repeated execution of `iteratee` has stopped. `callback` + * will be passed an error and any arguments passed to the final `iteratee`'s + * callback. Invoked with (err, [results]); + */ +function until(test, iteratee, callback) { + whilst(function() { + return !test.apply(this, arguments); + }, iteratee, callback); +} + +/** + * Runs the `tasks` array of functions in series, each passing their results to + * the next in the array. However, if any of the `tasks` pass an error to their + * own callback, the next function is not executed, and the main `callback` is + * immediately called with the error. + * + * @name waterfall + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array} tasks - An array of [async functions]{@link AsyncFunction} + * to run. + * Each function should complete with any number of `result` values. + * The `result` values will be passed as arguments, in order, to the next task. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed. This will be passed the results of the last task's + * callback. Invoked with (err, [results]). + * @returns undefined + * @example + * + * async.waterfall([ + * function(callback) { + * callback(null, 'one', 'two'); + * }, + * function(arg1, arg2, callback) { + * // arg1 now equals 'one' and arg2 now equals 'two' + * callback(null, 'three'); + * }, + * function(arg1, callback) { + * // arg1 now equals 'three' + * callback(null, 'done'); + * } + * ], function (err, result) { + * // result now equals 'done' + * }); + * + * // Or, with named functions: + * async.waterfall([ + * myFirstFunction, + * mySecondFunction, + * myLastFunction, + * ], function (err, result) { + * // result now equals 'done' + * }); + * function myFirstFunction(callback) { + * callback(null, 'one', 'two'); + * } + * function mySecondFunction(arg1, arg2, callback) { + * // arg1 now equals 'one' and arg2 now equals 'two' + * callback(null, 'three'); + * } + * function myLastFunction(arg1, callback) { + * // arg1 now equals 'three' + * callback(null, 'done'); + * } + */ +var waterfall = function(tasks, callback) { + callback = once(callback || noop); + if (!isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions')); + if (!tasks.length) return callback(); + var taskIndex = 0; + + function nextTask(args) { + var task = wrapAsync(tasks[taskIndex++]); + args.push(onlyOnce(next)); + task.apply(null, args); + } + + function next(err/*, ...args*/) { + if (err || taskIndex === tasks.length) { + return callback.apply(null, arguments); + } + nextTask(slice(arguments, 1)); + } + + nextTask([]); +}; + +/** + * An "async function" in the context of Async is an asynchronous function with + * a variable number of parameters, with the final parameter being a callback. + * (`function (arg1, arg2, ..., callback) {}`) + * The final callback is of the form `callback(err, results...)`, which must be + * called once the function is completed. The callback should be called with a + * Error as its first argument to signal that an error occurred. + * Otherwise, if no error occurred, it should be called with `null` as the first + * argument, and any additional `result` arguments that may apply, to signal + * successful completion. + * The callback must be called exactly once, ideally on a later tick of the + * JavaScript event loop. + * + * This type of function is also referred to as a "Node-style async function", + * or a "continuation passing-style function" (CPS). Most of the methods of this + * library are themselves CPS/Node-style async functions, or functions that + * return CPS/Node-style async functions. + * + * Wherever we accept a Node-style async function, we also directly accept an + * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}. + * In this case, the `async` function will not be passed a final callback + * argument, and any thrown error will be used as the `err` argument of the + * implicit callback, and the return value will be used as the `result` value. + * (i.e. a `rejected` of the returned Promise becomes the `err` callback + * argument, and a `resolved` value becomes the `result`.) + * + * Note, due to JavaScript limitations, we can only detect native `async` + * functions and not transpilied implementations. + * Your environment must have `async`/`await` support for this to work. + * (e.g. Node > v7.6, or a recent version of a modern browser). + * If you are using `async` functions through a transpiler (e.g. Babel), you + * must still wrap the function with [asyncify]{@link module:Utils.asyncify}, + * because the `async function` will be compiled to an ordinary function that + * returns a promise. + * + * @typedef {Function} AsyncFunction + * @static + */ + +/** + * Async is a utility module which provides straight-forward, powerful functions + * for working with asynchronous JavaScript. Although originally designed for + * use with [Node.js](http://nodejs.org) and installable via + * `npm install --save async`, it can also be used directly in the browser. + * @module async + * @see AsyncFunction + */ + + +/** + * A collection of `async` functions for manipulating collections, such as + * arrays and objects. + * @module Collections + */ + +/** + * A collection of `async` functions for controlling the flow through a script. + * @module ControlFlow + */ + +/** + * A collection of `async` utility functions. + * @module Utils + */ + +var index = { + apply: apply, + applyEach: applyEach, + applyEachSeries: applyEachSeries, + asyncify: asyncify, + auto: auto, + autoInject: autoInject, + cargo: cargo, + compose: compose, + concat: concat, + concatLimit: concatLimit, + concatSeries: concatSeries, + constant: constant, + detect: detect, + detectLimit: detectLimit, + detectSeries: detectSeries, + dir: dir, + doDuring: doDuring, + doUntil: doUntil, + doWhilst: doWhilst, + during: during, + each: eachLimit, + eachLimit: eachLimit$1, + eachOf: eachOf, + eachOfLimit: eachOfLimit, + eachOfSeries: eachOfSeries, + eachSeries: eachSeries, + ensureAsync: ensureAsync, + every: every, + everyLimit: everyLimit, + everySeries: everySeries, + filter: filter, + filterLimit: filterLimit, + filterSeries: filterSeries, + forever: forever, + groupBy: groupBy, + groupByLimit: groupByLimit, + groupBySeries: groupBySeries, + log: log, + map: map, + mapLimit: mapLimit, + mapSeries: mapSeries, + mapValues: mapValues, + mapValuesLimit: mapValuesLimit, + mapValuesSeries: mapValuesSeries, + memoize: memoize, + nextTick: nextTick, + parallel: parallelLimit, + parallelLimit: parallelLimit$1, + priorityQueue: priorityQueue, + queue: queue$1, + race: race, + reduce: reduce, + reduceRight: reduceRight, + reflect: reflect, + reflectAll: reflectAll, + reject: reject, + rejectLimit: rejectLimit, + rejectSeries: rejectSeries, + retry: retry, + retryable: retryable, + seq: seq, + series: series, + setImmediate: setImmediate$1, + some: some, + someLimit: someLimit, + someSeries: someSeries, + sortBy: sortBy, + timeout: timeout, + times: times, + timesLimit: timeLimit, + timesSeries: timesSeries, + transform: transform, + tryEach: tryEach, + unmemoize: unmemoize, + until: until, + waterfall: waterfall, + whilst: whilst, + + // aliases + all: every, + allLimit: everyLimit, + allSeries: everySeries, + any: some, + anyLimit: someLimit, + anySeries: someSeries, + find: detect, + findLimit: detectLimit, + findSeries: detectSeries, + forEach: eachLimit, + forEachSeries: eachSeries, + forEachLimit: eachLimit$1, + forEachOf: eachOf, + forEachOfSeries: eachOfSeries, + forEachOfLimit: eachOfLimit, + inject: reduce, + foldl: reduce, + foldr: reduceRight, + select: filter, + selectLimit: filterLimit, + selectSeries: filterSeries, + wrapSync: asyncify +}; + +exports['default'] = index; +exports.apply = apply; +exports.applyEach = applyEach; +exports.applyEachSeries = applyEachSeries; +exports.asyncify = asyncify; +exports.auto = auto; +exports.autoInject = autoInject; +exports.cargo = cargo; +exports.compose = compose; +exports.concat = concat; +exports.concatLimit = concatLimit; +exports.concatSeries = concatSeries; +exports.constant = constant; +exports.detect = detect; +exports.detectLimit = detectLimit; +exports.detectSeries = detectSeries; +exports.dir = dir; +exports.doDuring = doDuring; +exports.doUntil = doUntil; +exports.doWhilst = doWhilst; +exports.during = during; +exports.each = eachLimit; +exports.eachLimit = eachLimit$1; +exports.eachOf = eachOf; +exports.eachOfLimit = eachOfLimit; +exports.eachOfSeries = eachOfSeries; +exports.eachSeries = eachSeries; +exports.ensureAsync = ensureAsync; +exports.every = every; +exports.everyLimit = everyLimit; +exports.everySeries = everySeries; +exports.filter = filter; +exports.filterLimit = filterLimit; +exports.filterSeries = filterSeries; +exports.forever = forever; +exports.groupBy = groupBy; +exports.groupByLimit = groupByLimit; +exports.groupBySeries = groupBySeries; +exports.log = log; +exports.map = map; +exports.mapLimit = mapLimit; +exports.mapSeries = mapSeries; +exports.mapValues = mapValues; +exports.mapValuesLimit = mapValuesLimit; +exports.mapValuesSeries = mapValuesSeries; +exports.memoize = memoize; +exports.nextTick = nextTick; +exports.parallel = parallelLimit; +exports.parallelLimit = parallelLimit$1; +exports.priorityQueue = priorityQueue; +exports.queue = queue$1; +exports.race = race; +exports.reduce = reduce; +exports.reduceRight = reduceRight; +exports.reflect = reflect; +exports.reflectAll = reflectAll; +exports.reject = reject; +exports.rejectLimit = rejectLimit; +exports.rejectSeries = rejectSeries; +exports.retry = retry; +exports.retryable = retryable; +exports.seq = seq; +exports.series = series; +exports.setImmediate = setImmediate$1; +exports.some = some; +exports.someLimit = someLimit; +exports.someSeries = someSeries; +exports.sortBy = sortBy; +exports.timeout = timeout; +exports.times = times; +exports.timesLimit = timeLimit; +exports.timesSeries = timesSeries; +exports.transform = transform; +exports.tryEach = tryEach; +exports.unmemoize = unmemoize; +exports.until = until; +exports.waterfall = waterfall; +exports.whilst = whilst; +exports.all = every; +exports.allLimit = everyLimit; +exports.allSeries = everySeries; +exports.any = some; +exports.anyLimit = someLimit; +exports.anySeries = someSeries; +exports.find = detect; +exports.findLimit = detectLimit; +exports.findSeries = detectSeries; +exports.forEach = eachLimit; +exports.forEachSeries = eachSeries; +exports.forEachLimit = eachLimit$1; +exports.forEachOf = eachOf; +exports.forEachOfSeries = eachOfSeries; +exports.forEachOfLimit = eachOfLimit; +exports.inject = reduce; +exports.foldl = reduce; +exports.foldr = reduceRight; +exports.select = filter; +exports.selectLimit = filterLimit; +exports.selectSeries = filterSeries; +exports.wrapSync = asyncify; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"_process":257}],22:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = eachLimit; + +var _eachOfLimit = require('./internal/eachOfLimit'); + +var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); + +var _withoutIndex = require('./internal/withoutIndex'); + +var _withoutIndex2 = _interopRequireDefault(_withoutIndex); + +var _wrapAsync = require('./internal/wrapAsync'); + +var _wrapAsync2 = _interopRequireDefault(_wrapAsync); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. + * + * @name eachLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.each]{@link module:Collections.each} + * @alias forEachLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The array index is not passed to the iteratee. + * If you need the index, use `eachOfLimit`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ +function eachLimit(coll, limit, iteratee, callback) { + (0, _eachOfLimit2.default)(limit)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); +} +module.exports = exports['default']; +},{"./internal/eachOfLimit":29,"./internal/withoutIndex":39,"./internal/wrapAsync":40}],23:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (coll, iteratee, callback) { + var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric; + eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback); +}; + +var _isArrayLike = require('lodash/isArrayLike'); + +var _isArrayLike2 = _interopRequireDefault(_isArrayLike); + +var _breakLoop = require('./internal/breakLoop'); + +var _breakLoop2 = _interopRequireDefault(_breakLoop); + +var _eachOfLimit = require('./eachOfLimit'); + +var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); + +var _doLimit = require('./internal/doLimit'); + +var _doLimit2 = _interopRequireDefault(_doLimit); + +var _noop = require('lodash/noop'); + +var _noop2 = _interopRequireDefault(_noop); + +var _once = require('./internal/once'); + +var _once2 = _interopRequireDefault(_once); + +var _onlyOnce = require('./internal/onlyOnce'); + +var _onlyOnce2 = _interopRequireDefault(_onlyOnce); + +var _wrapAsync = require('./internal/wrapAsync'); + +var _wrapAsync2 = _interopRequireDefault(_wrapAsync); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// eachOf implementation optimized for array-likes +function eachOfArrayLike(coll, iteratee, callback) { + callback = (0, _once2.default)(callback || _noop2.default); + var index = 0, + completed = 0, + length = coll.length; + if (length === 0) { + callback(null); + } + + function iteratorCallback(err, value) { + if (err) { + callback(err); + } else if (++completed === length || value === _breakLoop2.default) { + callback(null); + } + } + + for (; index < length; index++) { + iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback)); + } +} + +// a generic version of eachOf which can handle array, object, and iterator cases. +var eachOfGeneric = (0, _doLimit2.default)(_eachOfLimit2.default, Infinity); + +/** + * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument + * to the iteratee. + * + * @name eachOf + * @static + * @memberOf module:Collections + * @method + * @alias forEachOf + * @category Collection + * @see [async.each]{@link module:Collections.each} + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - A function to apply to each + * item in `coll`. + * The `key` is the item's key, or index in the case of an array. + * Invoked with (item, key, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + * @example + * + * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; + * var configs = {}; + * + * async.forEachOf(obj, function (value, key, callback) { + * fs.readFile(__dirname + value, "utf8", function (err, data) { + * if (err) return callback(err); + * try { + * configs[key] = JSON.parse(data); + * } catch (e) { + * return callback(e); + * } + * callback(); + * }); + * }, function (err) { + * if (err) console.error(err.message); + * // configs is now a map of JSON data + * doSomethingWith(configs); + * }); + */ +module.exports = exports['default']; +},{"./eachOfLimit":24,"./internal/breakLoop":26,"./internal/doLimit":27,"./internal/once":34,"./internal/onlyOnce":35,"./internal/wrapAsync":40,"lodash/isArrayLike":221,"lodash/noop":229}],24:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = eachOfLimit; + +var _eachOfLimit2 = require('./internal/eachOfLimit'); + +var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2); + +var _wrapAsync = require('./internal/wrapAsync'); + +var _wrapAsync2 = _interopRequireDefault(_wrapAsync); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a + * time. + * + * @name eachOfLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.eachOf]{@link module:Collections.eachOf} + * @alias forEachOfLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each + * item in `coll`. The `key` is the item's key, or index in the case of an + * array. + * Invoked with (item, key, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ +function eachOfLimit(coll, limit, iteratee, callback) { + (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback); +} +module.exports = exports['default']; +},{"./internal/eachOfLimit":29,"./internal/wrapAsync":40}],25:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _eachLimit = require('./eachLimit'); + +var _eachLimit2 = _interopRequireDefault(_eachLimit); + +var _doLimit = require('./internal/doLimit'); + +var _doLimit2 = _interopRequireDefault(_doLimit); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. + * + * @name eachSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.each]{@link module:Collections.each} + * @alias forEachSeries + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each + * item in `coll`. + * The array index is not passed to the iteratee. + * If you need the index, use `eachOfSeries`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ +exports.default = (0, _doLimit2.default)(_eachLimit2.default, 1); +module.exports = exports['default']; +},{"./eachLimit":22,"./internal/doLimit":27}],26:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +// A temporary value used to identify if the loop should be broken. +// See #1064, #1293 +exports.default = {}; +module.exports = exports["default"]; +},{}],27:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = doLimit; +function doLimit(fn, limit) { + return function (iterable, iteratee, callback) { + return fn(iterable, limit, iteratee, callback); + }; +} +module.exports = exports["default"]; +},{}],28:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = doParallel; + +var _eachOf = require('../eachOf'); + +var _eachOf2 = _interopRequireDefault(_eachOf); + +var _wrapAsync = require('./wrapAsync'); + +var _wrapAsync2 = _interopRequireDefault(_wrapAsync); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function doParallel(fn) { + return function (obj, iteratee, callback) { + return fn(_eachOf2.default, obj, (0, _wrapAsync2.default)(iteratee), callback); + }; +} +module.exports = exports['default']; +},{"../eachOf":23,"./wrapAsync":40}],29:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _eachOfLimit; + +var _noop = require('lodash/noop'); + +var _noop2 = _interopRequireDefault(_noop); + +var _once = require('./once'); + +var _once2 = _interopRequireDefault(_once); + +var _iterator = require('./iterator'); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _onlyOnce = require('./onlyOnce'); + +var _onlyOnce2 = _interopRequireDefault(_onlyOnce); + +var _breakLoop = require('./breakLoop'); + +var _breakLoop2 = _interopRequireDefault(_breakLoop); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _eachOfLimit(limit) { + return function (obj, iteratee, callback) { + callback = (0, _once2.default)(callback || _noop2.default); + if (limit <= 0 || !obj) { + return callback(null); + } + var nextElem = (0, _iterator2.default)(obj); + var done = false; + var running = 0; + + function iterateeCallback(err, value) { + running -= 1; + if (err) { + done = true; + callback(err); + } else if (value === _breakLoop2.default || done && running <= 0) { + done = true; + return callback(null); + } else { + replenish(); + } + } + + function replenish() { + while (running < limit && !done) { + var elem = nextElem(); + if (elem === null) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running += 1; + iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback)); + } + } + + replenish(); + }; +} +module.exports = exports['default']; +},{"./breakLoop":26,"./iterator":32,"./once":34,"./onlyOnce":35,"lodash/noop":229}],30:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (coll) { + return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol](); +}; + +var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator; + +module.exports = exports['default']; +},{}],31:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (fn) { + return function () /*...args, callback*/{ + var args = (0, _slice2.default)(arguments); + var callback = args.pop(); + fn.call(this, args, callback); + }; +}; + +var _slice = require('./slice'); + +var _slice2 = _interopRequireDefault(_slice); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = exports['default']; +},{"./slice":38}],32:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = iterator; + +var _isArrayLike = require('lodash/isArrayLike'); + +var _isArrayLike2 = _interopRequireDefault(_isArrayLike); + +var _getIterator = require('./getIterator'); + +var _getIterator2 = _interopRequireDefault(_getIterator); + +var _keys = require('lodash/keys'); + +var _keys2 = _interopRequireDefault(_keys); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function createArrayIterator(coll) { + var i = -1; + var len = coll.length; + return function next() { + return ++i < len ? { value: coll[i], key: i } : null; + }; +} + +function createES2015Iterator(iterator) { + var i = -1; + return function next() { + var item = iterator.next(); + if (item.done) return null; + i++; + return { value: item.value, key: i }; + }; +} + +function createObjectIterator(obj) { + var okeys = (0, _keys2.default)(obj); + var i = -1; + var len = okeys.length; + return function next() { + var key = okeys[++i]; + return i < len ? { value: obj[key], key: key } : null; + }; +} + +function iterator(coll) { + if ((0, _isArrayLike2.default)(coll)) { + return createArrayIterator(coll); + } + + var iterator = (0, _getIterator2.default)(coll); + return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); +} +module.exports = exports['default']; +},{"./getIterator":30,"lodash/isArrayLike":221,"lodash/keys":228}],33:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _asyncMap; + +var _noop = require('lodash/noop'); + +var _noop2 = _interopRequireDefault(_noop); + +var _wrapAsync = require('./wrapAsync'); + +var _wrapAsync2 = _interopRequireDefault(_wrapAsync); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _asyncMap(eachfn, arr, iteratee, callback) { + callback = callback || _noop2.default; + arr = arr || []; + var results = []; + var counter = 0; + var _iteratee = (0, _wrapAsync2.default)(iteratee); + + eachfn(arr, function (value, _, callback) { + var index = counter++; + _iteratee(value, function (err, v) { + results[index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); +} +module.exports = exports['default']; +},{"./wrapAsync":40,"lodash/noop":229}],34:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = once; +function once(fn) { + return function () { + if (fn === null) return; + var callFn = fn; + fn = null; + callFn.apply(this, arguments); + }; +} +module.exports = exports["default"]; +},{}],35:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = onlyOnce; +function onlyOnce(fn) { + return function () { + if (fn === null) throw new Error("Callback was already called."); + var callFn = fn; + fn = null; + callFn.apply(this, arguments); + }; +} +module.exports = exports["default"]; +},{}],36:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _parallel; + +var _noop = require('lodash/noop'); + +var _noop2 = _interopRequireDefault(_noop); + +var _isArrayLike = require('lodash/isArrayLike'); + +var _isArrayLike2 = _interopRequireDefault(_isArrayLike); + +var _slice = require('./slice'); + +var _slice2 = _interopRequireDefault(_slice); + +var _wrapAsync = require('./wrapAsync'); + +var _wrapAsync2 = _interopRequireDefault(_wrapAsync); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _parallel(eachfn, tasks, callback) { + callback = callback || _noop2.default; + var results = (0, _isArrayLike2.default)(tasks) ? [] : {}; + + eachfn(tasks, function (task, key, callback) { + (0, _wrapAsync2.default)(task)(function (err, result) { + if (arguments.length > 2) { + result = (0, _slice2.default)(arguments, 1); + } + results[key] = result; + callback(err); + }); + }, function (err) { + callback(err, results); + }); +} +module.exports = exports['default']; +},{"./slice":38,"./wrapAsync":40,"lodash/isArrayLike":221,"lodash/noop":229}],37:[function(require,module,exports){ +(function (process){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasNextTick = exports.hasSetImmediate = undefined; +exports.fallback = fallback; +exports.wrap = wrap; + +var _slice = require('./slice'); + +var _slice2 = _interopRequireDefault(_slice); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate; +var hasNextTick = exports.hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; + +function fallback(fn) { + setTimeout(fn, 0); +} + +function wrap(defer) { + return function (fn /*, ...args*/) { + var args = (0, _slice2.default)(arguments, 1); + defer(function () { + fn.apply(null, args); + }); + }; +} + +var _defer; + +if (hasSetImmediate) { + _defer = setImmediate; +} else if (hasNextTick) { + _defer = process.nextTick; +} else { + _defer = fallback; +} + +exports.default = wrap(_defer); +}).call(this,require('_process')) +},{"./slice":38,"_process":257}],38:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = slice; +function slice(arrayLike, start) { + start = start | 0; + var newLen = Math.max(arrayLike.length - start, 0); + var newArr = Array(newLen); + for (var idx = 0; idx < newLen; idx++) { + newArr[idx] = arrayLike[start + idx]; + } + return newArr; +} +module.exports = exports["default"]; +},{}],39:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _withoutIndex; +function _withoutIndex(iteratee) { + return function (value, index, callback) { + return iteratee(value, callback); + }; +} +module.exports = exports["default"]; +},{}],40:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isAsync = undefined; + +var _asyncify = require('../asyncify'); + +var _asyncify2 = _interopRequireDefault(_asyncify); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var supportsSymbol = typeof Symbol === 'function'; + +function isAsync(fn) { + return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction'; +} + +function wrapAsync(asyncFn) { + return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn; +} + +exports.default = wrapAsync; +exports.isAsync = isAsync; +},{"../asyncify":20}],41:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _doParallel = require('./internal/doParallel'); + +var _doParallel2 = _interopRequireDefault(_doParallel); + +var _map = require('./internal/map'); + +var _map2 = _interopRequireDefault(_map); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Produces a new collection of values by mapping each value in `coll` through + * the `iteratee` function. The `iteratee` is called with an item from `coll` + * and a callback for when it has finished processing. Each of these callback + * takes 2 arguments: an `error`, and the transformed item from `coll`. If + * `iteratee` passes an error to its callback, the main `callback` (for the + * `map` function) is immediately called with the error. + * + * Note, that since this function applies the `iteratee` to each item in + * parallel, there is no guarantee that the `iteratee` functions will complete + * in order. However, the results array will be in the same order as the + * original `coll`. + * + * If `map` is passed an Object, the results will be an Array. The results + * will roughly be in the order of the original Objects' keys (but this can + * vary across JavaScript engines). + * + * @name map + * @static + * @memberOf module:Collections + * @method + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with the transformed item. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Results is an Array of the + * transformed items from the `coll`. Invoked with (err, results). + * @example + * + * async.map(['file1','file2','file3'], fs.stat, function(err, results) { + * // results is now an array of stats for each file + * }); + */ +exports.default = (0, _doParallel2.default)(_map2.default); +module.exports = exports['default']; +},{"./internal/doParallel":28,"./internal/map":33}],42:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = parallelLimit; + +var _eachOf = require('./eachOf'); + +var _eachOf2 = _interopRequireDefault(_eachOf); + +var _parallel = require('./internal/parallel'); + +var _parallel2 = _interopRequireDefault(_parallel); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Run the `tasks` collection of functions in parallel, without waiting until + * the previous function has completed. If any of the functions pass an error to + * its callback, the main `callback` is immediately called with the value of the + * error. Once the `tasks` have completed, the results are passed to the final + * `callback` as an array. + * + * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about + * parallel execution of code. If your tasks do not use any timers or perform + * any I/O, they will actually be executed in series. Any synchronous setup + * sections for each task will happen one after the other. JavaScript remains + * single-threaded. + * + * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the + * execution of other tasks when a task fails. + * + * It is also possible to use an object instead of an array. Each property will + * be run as a function and the results will be passed to the final `callback` + * as an object instead of an array. This can be a more readable way of handling + * results from {@link async.parallel}. + * + * @name parallel + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array|Iterable|Object} tasks - A collection of + * [async functions]{@link AsyncFunction} to run. + * Each async function can complete with any number of optional `result` values. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed successfully. This function gets a results array + * (or object) containing all the result arguments passed to the task callbacks. + * Invoked with (err, results). + * + * @example + * async.parallel([ + * function(callback) { + * setTimeout(function() { + * callback(null, 'one'); + * }, 200); + * }, + * function(callback) { + * setTimeout(function() { + * callback(null, 'two'); + * }, 100); + * } + * ], + * // optional callback + * function(err, results) { + * // the results array will equal ['one','two'] even though + * // the second function had a shorter timeout. + * }); + * + * // an example using an object instead of an array + * async.parallel({ + * one: function(callback) { + * setTimeout(function() { + * callback(null, 1); + * }, 200); + * }, + * two: function(callback) { + * setTimeout(function() { + * callback(null, 2); + * }, 100); + * } + * }, function(err, results) { + * // results is now equals to: {one: 1, two: 2} + * }); + */ +function parallelLimit(tasks, callback) { + (0, _parallel2.default)(_eachOf2.default, tasks, callback); +} +module.exports = exports['default']; +},{"./eachOf":23,"./internal/parallel":36}],43:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = retry; + +var _noop = require('lodash/noop'); + +var _noop2 = _interopRequireDefault(_noop); + +var _constant = require('lodash/constant'); + +var _constant2 = _interopRequireDefault(_constant); + +var _wrapAsync = require('./internal/wrapAsync'); + +var _wrapAsync2 = _interopRequireDefault(_wrapAsync); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Attempts to get a successful response from `task` no more than `times` times + * before returning an error. If the task is successful, the `callback` will be + * passed the result of the successful task. If all attempts fail, the callback + * will be passed the error and result (if any) of the final attempt. + * + * @name retry + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @see [async.retryable]{@link module:ControlFlow.retryable} + * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an + * object with `times` and `interval` or a number. + * * `times` - The number of attempts to make before giving up. The default + * is `5`. + * * `interval` - The time to wait between retries, in milliseconds. The + * default is `0`. The interval may also be specified as a function of the + * retry count (see example). + * * `errorFilter` - An optional synchronous function that is invoked on + * erroneous result. If it returns `true` the retry attempts will continue; + * if the function returns `false` the retry flow is aborted with the current + * attempt's error and result being returned to the final callback. + * Invoked with (err). + * * If `opts` is a number, the number specifies the number of times to retry, + * with the default interval of `0`. + * @param {AsyncFunction} task - An async function to retry. + * Invoked with (callback). + * @param {Function} [callback] - An optional callback which is called when the + * task has succeeded, or after the final failed attempt. It receives the `err` + * and `result` arguments of the last attempt at completing the `task`. Invoked + * with (err, results). + * + * @example + * + * // The `retry` function can be used as a stand-alone control flow by passing + * // a callback, as shown below: + * + * // try calling apiMethod 3 times + * async.retry(3, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod 3 times, waiting 200 ms between each retry + * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod 10 times with exponential backoff + * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds) + * async.retry({ + * times: 10, + * interval: function(retryCount) { + * return 50 * Math.pow(2, retryCount); + * } + * }, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod the default 5 times no delay between each retry + * async.retry(apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod only when error condition satisfies, all other + * // errors will abort the retry control flow and return to final callback + * async.retry({ + * errorFilter: function(err) { + * return err.message === 'Temporary error'; // only retry on a specific error + * } + * }, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // to retry individual methods that are not as reliable within other + * // control flow functions, use the `retryable` wrapper: + * async.auto({ + * users: api.getUsers.bind(api), + * payments: async.retryable(3, api.getPayments.bind(api)) + * }, function(err, results) { + * // do something with the results + * }); + * + */ +function retry(opts, task, callback) { + var DEFAULT_TIMES = 5; + var DEFAULT_INTERVAL = 0; + + var options = { + times: DEFAULT_TIMES, + intervalFunc: (0, _constant2.default)(DEFAULT_INTERVAL) + }; + + function parseTimes(acc, t) { + if (typeof t === 'object') { + acc.times = +t.times || DEFAULT_TIMES; + + acc.intervalFunc = typeof t.interval === 'function' ? t.interval : (0, _constant2.default)(+t.interval || DEFAULT_INTERVAL); + + acc.errorFilter = t.errorFilter; + } else if (typeof t === 'number' || typeof t === 'string') { + acc.times = +t || DEFAULT_TIMES; + } else { + throw new Error("Invalid arguments for async.retry"); + } + } + + if (arguments.length < 3 && typeof opts === 'function') { + callback = task || _noop2.default; + task = opts; + } else { + parseTimes(options, opts); + callback = callback || _noop2.default; + } + + if (typeof task !== 'function') { + throw new Error("Invalid arguments for async.retry"); + } + + var _task = (0, _wrapAsync2.default)(task); + + var attempt = 1; + function retryAttempt() { + _task(function (err) { + if (err && attempt++ < options.times && (typeof options.errorFilter != 'function' || options.errorFilter(err))) { + setTimeout(retryAttempt, options.intervalFunc(attempt)); + } else { + callback.apply(null, arguments); + } + }); + } + + retryAttempt(); +} +module.exports = exports['default']; +},{"./internal/wrapAsync":40,"lodash/constant":218,"lodash/noop":229}],44:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (tasks, callback) { + callback = (0, _once2.default)(callback || _noop2.default); + if (!(0, _isArray2.default)(tasks)) return callback(new Error('First argument to waterfall must be an array of functions')); + if (!tasks.length) return callback(); + var taskIndex = 0; + + function nextTask(args) { + var task = (0, _wrapAsync2.default)(tasks[taskIndex++]); + args.push((0, _onlyOnce2.default)(next)); + task.apply(null, args); + } + + function next(err /*, ...args*/) { + if (err || taskIndex === tasks.length) { + return callback.apply(null, arguments); + } + nextTask((0, _slice2.default)(arguments, 1)); + } + + nextTask([]); +}; + +var _isArray = require('lodash/isArray'); + +var _isArray2 = _interopRequireDefault(_isArray); + +var _noop = require('lodash/noop'); + +var _noop2 = _interopRequireDefault(_noop); + +var _once = require('./internal/once'); + +var _once2 = _interopRequireDefault(_once); + +var _slice = require('./internal/slice'); + +var _slice2 = _interopRequireDefault(_slice); + +var _onlyOnce = require('./internal/onlyOnce'); + +var _onlyOnce2 = _interopRequireDefault(_onlyOnce); + +var _wrapAsync = require('./internal/wrapAsync'); + +var _wrapAsync2 = _interopRequireDefault(_wrapAsync); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = exports['default']; + +/** + * Runs the `tasks` array of functions in series, each passing their results to + * the next in the array. However, if any of the `tasks` pass an error to their + * own callback, the next function is not executed, and the main `callback` is + * immediately called with the error. + * + * @name waterfall + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array} tasks - An array of [async functions]{@link AsyncFunction} + * to run. + * Each function should complete with any number of `result` values. + * The `result` values will be passed as arguments, in order, to the next task. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed. This will be passed the results of the last task's + * callback. Invoked with (err, [results]). + * @returns undefined + * @example + * + * async.waterfall([ + * function(callback) { + * callback(null, 'one', 'two'); + * }, + * function(arg1, arg2, callback) { + * // arg1 now equals 'one' and arg2 now equals 'two' + * callback(null, 'three'); + * }, + * function(arg1, callback) { + * // arg1 now equals 'three' + * callback(null, 'done'); + * } + * ], function (err, result) { + * // result now equals 'done' + * }); + * + * // Or, with named functions: + * async.waterfall([ + * myFirstFunction, + * mySecondFunction, + * myLastFunction, + * ], function (err, result) { + * // result now equals 'done' + * }); + * function myFirstFunction(callback) { + * callback(null, 'one', 'two'); + * } + * function mySecondFunction(arg1, arg2, callback) { + * // arg1 now equals 'one' and arg2 now equals 'two' + * callback(null, 'three'); + * } + * function myLastFunction(arg1, callback) { + * // arg1 now equals 'three' + * callback(null, 'done'); + * } + */ +},{"./internal/once":34,"./internal/onlyOnce":35,"./internal/slice":38,"./internal/wrapAsync":40,"lodash/isArray":220,"lodash/noop":229}],45:[function(require,module,exports){ +// Copyright (c) 2012 Mathieu Turcotte +// Licensed under the MIT license. + +var Backoff = require('./lib/backoff'); +var ExponentialBackoffStrategy = require('./lib/strategy/exponential'); +var FibonacciBackoffStrategy = require('./lib/strategy/fibonacci'); +var FunctionCall = require('./lib/function_call.js'); + +module.exports.Backoff = Backoff; +module.exports.FunctionCall = FunctionCall; +module.exports.FibonacciStrategy = FibonacciBackoffStrategy; +module.exports.ExponentialStrategy = ExponentialBackoffStrategy; + +// Constructs a Fibonacci backoff. +module.exports.fibonacci = function(options) { + return new Backoff(new FibonacciBackoffStrategy(options)); +}; + +// Constructs an exponential backoff. +module.exports.exponential = function(options) { + return new Backoff(new ExponentialBackoffStrategy(options)); +}; + +// Constructs a FunctionCall for the given function and arguments. +module.exports.call = function(fn, vargs, callback) { + var args = Array.prototype.slice.call(arguments); + fn = args[0]; + vargs = args.slice(1, args.length - 1); + callback = args[args.length - 1]; + return new FunctionCall(fn, vargs, callback); +}; + +},{"./lib/backoff":46,"./lib/function_call.js":47,"./lib/strategy/exponential":48,"./lib/strategy/fibonacci":49}],46:[function(require,module,exports){ +// Copyright (c) 2012 Mathieu Turcotte +// Licensed under the MIT license. + +var events = require('events'); +var precond = require('precond'); +var util = require('util'); + +// A class to hold the state of a backoff operation. Accepts a backoff strategy +// to generate the backoff delays. +function Backoff(backoffStrategy) { + events.EventEmitter.call(this); + + this.backoffStrategy_ = backoffStrategy; + this.maxNumberOfRetry_ = -1; + this.backoffNumber_ = 0; + this.backoffDelay_ = 0; + this.timeoutID_ = -1; + + this.handlers = { + backoff: this.onBackoff_.bind(this) + }; +} +util.inherits(Backoff, events.EventEmitter); + +// Sets a limit, greater than 0, on the maximum number of backoffs. A 'fail' +// event will be emitted when the limit is reached. +Backoff.prototype.failAfter = function(maxNumberOfRetry) { + precond.checkArgument(maxNumberOfRetry > 0, + 'Expected a maximum number of retry greater than 0 but got %s.', + maxNumberOfRetry); + + this.maxNumberOfRetry_ = maxNumberOfRetry; +}; + +// Starts a backoff operation. Accepts an optional parameter to let the +// listeners know why the backoff operation was started. +Backoff.prototype.backoff = function(err) { + precond.checkState(this.timeoutID_ === -1, 'Backoff in progress.'); + + if (this.backoffNumber_ === this.maxNumberOfRetry_) { + this.emit('fail', err); + this.reset(); + } else { + this.backoffDelay_ = this.backoffStrategy_.next(); + this.timeoutID_ = setTimeout(this.handlers.backoff, this.backoffDelay_); + this.emit('backoff', this.backoffNumber_, this.backoffDelay_, err); + } +}; + +// Handles the backoff timeout completion. +Backoff.prototype.onBackoff_ = function() { + this.timeoutID_ = -1; + this.emit('ready', this.backoffNumber_, this.backoffDelay_); + this.backoffNumber_++; +}; + +// Stops any backoff operation and resets the backoff delay to its inital value. +Backoff.prototype.reset = function() { + this.backoffNumber_ = 0; + this.backoffStrategy_.reset(); + clearTimeout(this.timeoutID_); + this.timeoutID_ = -1; +}; + +module.exports = Backoff; + +},{"events":157,"precond":253,"util":333}],47:[function(require,module,exports){ +// Copyright (c) 2012 Mathieu Turcotte +// Licensed under the MIT license. + +var events = require('events'); +var precond = require('precond'); +var util = require('util'); + +var Backoff = require('./backoff'); +var FibonacciBackoffStrategy = require('./strategy/fibonacci'); + +// Wraps a function to be called in a backoff loop. +function FunctionCall(fn, args, callback) { + events.EventEmitter.call(this); + + precond.checkIsFunction(fn, 'Expected fn to be a function.'); + precond.checkIsArray(args, 'Expected args to be an array.'); + precond.checkIsFunction(callback, 'Expected callback to be a function.'); + + this.function_ = fn; + this.arguments_ = args; + this.callback_ = callback; + this.lastResult_ = []; + this.numRetries_ = 0; + + this.backoff_ = null; + this.strategy_ = null; + this.failAfter_ = -1; + this.retryPredicate_ = FunctionCall.DEFAULT_RETRY_PREDICATE_; + + this.state_ = FunctionCall.State_.PENDING; +} +util.inherits(FunctionCall, events.EventEmitter); + +// States in which the call can be. +FunctionCall.State_ = { + // Call isn't started yet. + PENDING: 0, + // Call is in progress. + RUNNING: 1, + // Call completed successfully which means that either the wrapped function + // returned successfully or the maximal number of backoffs was reached. + COMPLETED: 2, + // The call was aborted. + ABORTED: 3 +}; + +// The default retry predicate which considers any error as retriable. +FunctionCall.DEFAULT_RETRY_PREDICATE_ = function(err) { + return true; +}; + +// Checks whether the call is pending. +FunctionCall.prototype.isPending = function() { + return this.state_ == FunctionCall.State_.PENDING; +}; + +// Checks whether the call is in progress. +FunctionCall.prototype.isRunning = function() { + return this.state_ == FunctionCall.State_.RUNNING; +}; + +// Checks whether the call is completed. +FunctionCall.prototype.isCompleted = function() { + return this.state_ == FunctionCall.State_.COMPLETED; +}; + +// Checks whether the call is aborted. +FunctionCall.prototype.isAborted = function() { + return this.state_ == FunctionCall.State_.ABORTED; +}; + +// Sets the backoff strategy to use. Can only be called before the call is +// started otherwise an exception will be thrown. +FunctionCall.prototype.setStrategy = function(strategy) { + precond.checkState(this.isPending(), 'FunctionCall in progress.'); + this.strategy_ = strategy; + return this; // Return this for chaining. +}; + +// Sets the predicate which will be used to determine whether the errors +// returned from the wrapped function should be retried or not, e.g. a +// network error would be retriable while a type error would stop the +// function call. +FunctionCall.prototype.retryIf = function(retryPredicate) { + precond.checkState(this.isPending(), 'FunctionCall in progress.'); + this.retryPredicate_ = retryPredicate; + return this; +}; + +// Returns all intermediary results returned by the wrapped function since +// the initial call. +FunctionCall.prototype.getLastResult = function() { + return this.lastResult_.concat(); +}; + +// Returns the number of times the wrapped function call was retried. +FunctionCall.prototype.getNumRetries = function() { + return this.numRetries_; +}; + +// Sets the backoff limit. +FunctionCall.prototype.failAfter = function(maxNumberOfRetry) { + precond.checkState(this.isPending(), 'FunctionCall in progress.'); + this.failAfter_ = maxNumberOfRetry; + return this; // Return this for chaining. +}; + +// Aborts the call. +FunctionCall.prototype.abort = function() { + if (this.isCompleted() || this.isAborted()) { + return; + } + + if (this.isRunning()) { + this.backoff_.reset(); + } + + this.state_ = FunctionCall.State_.ABORTED; + this.lastResult_ = [new Error('Backoff aborted.')]; + this.emit('abort'); + this.doCallback_(); +}; + +// Initiates the call to the wrapped function. Accepts an optional factory +// function used to create the backoff instance; used when testing. +FunctionCall.prototype.start = function(backoffFactory) { + precond.checkState(!this.isAborted(), 'FunctionCall is aborted.'); + precond.checkState(this.isPending(), 'FunctionCall already started.'); + + var strategy = this.strategy_ || new FibonacciBackoffStrategy(); + + this.backoff_ = backoffFactory ? + backoffFactory(strategy) : + new Backoff(strategy); + + this.backoff_.on('ready', this.doCall_.bind(this, true /* isRetry */)); + this.backoff_.on('fail', this.doCallback_.bind(this)); + this.backoff_.on('backoff', this.handleBackoff_.bind(this)); + + if (this.failAfter_ > 0) { + this.backoff_.failAfter(this.failAfter_); + } + + this.state_ = FunctionCall.State_.RUNNING; + this.doCall_(false /* isRetry */); +}; + +// Calls the wrapped function. +FunctionCall.prototype.doCall_ = function(isRetry) { + if (isRetry) { + this.numRetries_++; + } + var eventArgs = ['call'].concat(this.arguments_); + events.EventEmitter.prototype.emit.apply(this, eventArgs); + var callback = this.handleFunctionCallback_.bind(this); + this.function_.apply(null, this.arguments_.concat(callback)); +}; + +// Calls the wrapped function's callback with the last result returned by the +// wrapped function. +FunctionCall.prototype.doCallback_ = function() { + this.callback_.apply(null, this.lastResult_); +}; + +// Handles wrapped function's completion. This method acts as a replacement +// for the original callback function. +FunctionCall.prototype.handleFunctionCallback_ = function() { + if (this.isAborted()) { + return; + } + + var args = Array.prototype.slice.call(arguments); + this.lastResult_ = args; // Save last callback arguments. + events.EventEmitter.prototype.emit.apply(this, ['callback'].concat(args)); + + var err = args[0]; + if (err && this.retryPredicate_(err)) { + this.backoff_.backoff(err); + } else { + this.state_ = FunctionCall.State_.COMPLETED; + this.doCallback_(); + } +}; + +// Handles the backoff event by reemitting it. +FunctionCall.prototype.handleBackoff_ = function(number, delay, err) { + this.emit('backoff', number, delay, err); +}; + +module.exports = FunctionCall; + +},{"./backoff":46,"./strategy/fibonacci":49,"events":157,"precond":253,"util":333}],48:[function(require,module,exports){ +// Copyright (c) 2012 Mathieu Turcotte +// Licensed under the MIT license. + +var util = require('util'); +var precond = require('precond'); + +var BackoffStrategy = require('./strategy'); + +// Exponential backoff strategy. +function ExponentialBackoffStrategy(options) { + BackoffStrategy.call(this, options); + this.backoffDelay_ = 0; + this.nextBackoffDelay_ = this.getInitialDelay(); + this.factor_ = ExponentialBackoffStrategy.DEFAULT_FACTOR; + + if (options && options.factor !== undefined) { + precond.checkArgument(options.factor > 1, + 'Exponential factor should be greater than 1 but got %s.', + options.factor); + this.factor_ = options.factor; + } +} +util.inherits(ExponentialBackoffStrategy, BackoffStrategy); + +// Default multiplication factor used to compute the next backoff delay from +// the current one. The value can be overridden by passing a custom factor as +// part of the options. +ExponentialBackoffStrategy.DEFAULT_FACTOR = 2; + +ExponentialBackoffStrategy.prototype.next_ = function() { + this.backoffDelay_ = Math.min(this.nextBackoffDelay_, this.getMaxDelay()); + this.nextBackoffDelay_ = this.backoffDelay_ * this.factor_; + return this.backoffDelay_; +}; + +ExponentialBackoffStrategy.prototype.reset_ = function() { + this.backoffDelay_ = 0; + this.nextBackoffDelay_ = this.getInitialDelay(); +}; + +module.exports = ExponentialBackoffStrategy; + +},{"./strategy":50,"precond":253,"util":333}],49:[function(require,module,exports){ +// Copyright (c) 2012 Mathieu Turcotte +// Licensed under the MIT license. + +var util = require('util'); + +var BackoffStrategy = require('./strategy'); + +// Fibonacci backoff strategy. +function FibonacciBackoffStrategy(options) { + BackoffStrategy.call(this, options); + this.backoffDelay_ = 0; + this.nextBackoffDelay_ = this.getInitialDelay(); +} +util.inherits(FibonacciBackoffStrategy, BackoffStrategy); + +FibonacciBackoffStrategy.prototype.next_ = function() { + var backoffDelay = Math.min(this.nextBackoffDelay_, this.getMaxDelay()); + this.nextBackoffDelay_ += this.backoffDelay_; + this.backoffDelay_ = backoffDelay; + return backoffDelay; +}; + +FibonacciBackoffStrategy.prototype.reset_ = function() { + this.nextBackoffDelay_ = this.getInitialDelay(); + this.backoffDelay_ = 0; +}; + +module.exports = FibonacciBackoffStrategy; + +},{"./strategy":50,"util":333}],50:[function(require,module,exports){ +// Copyright (c) 2012 Mathieu Turcotte +// Licensed under the MIT license. + +var events = require('events'); +var util = require('util'); + +function isDef(value) { + return value !== undefined && value !== null; +} + +// Abstract class defining the skeleton for the backoff strategies. Accepts an +// object holding the options for the backoff strategy: +// +// * `randomisationFactor`: The randomisation factor which must be between 0 +// and 1 where 1 equates to a randomization factor of 100% and 0 to no +// randomization. +// * `initialDelay`: The backoff initial delay in milliseconds. +// * `maxDelay`: The backoff maximal delay in milliseconds. +function BackoffStrategy(options) { + options = options || {}; + + if (isDef(options.initialDelay) && options.initialDelay < 1) { + throw new Error('The initial timeout must be greater than 0.'); + } else if (isDef(options.maxDelay) && options.maxDelay < 1) { + throw new Error('The maximal timeout must be greater than 0.'); + } + + this.initialDelay_ = options.initialDelay || 100; + this.maxDelay_ = options.maxDelay || 10000; + + if (this.maxDelay_ <= this.initialDelay_) { + throw new Error('The maximal backoff delay must be ' + + 'greater than the initial backoff delay.'); + } + + if (isDef(options.randomisationFactor) && + (options.randomisationFactor < 0 || options.randomisationFactor > 1)) { + throw new Error('The randomisation factor must be between 0 and 1.'); + } + + this.randomisationFactor_ = options.randomisationFactor || 0; +} + +// Gets the maximal backoff delay. +BackoffStrategy.prototype.getMaxDelay = function() { + return this.maxDelay_; +}; + +// Gets the initial backoff delay. +BackoffStrategy.prototype.getInitialDelay = function() { + return this.initialDelay_; +}; + +// Template method that computes and returns the next backoff delay in +// milliseconds. +BackoffStrategy.prototype.next = function() { + var backoffDelay = this.next_(); + var randomisationMultiple = 1 + Math.random() * this.randomisationFactor_; + var randomizedDelay = Math.round(backoffDelay * randomisationMultiple); + return randomizedDelay; +}; + +// Computes and returns the next backoff delay. Intended to be overridden by +// subclasses. +BackoffStrategy.prototype.next_ = function() { + throw new Error('BackoffStrategy.next_() unimplemented.'); +}; + +// Template method that resets the backoff delay to its initial value. +BackoffStrategy.prototype.reset = function() { + this.reset_(); +}; + +// Resets the backoff delay to its initial value. Intended to be overridden by +// subclasses. +BackoffStrategy.prototype.reset_ = function() { + throw new Error('BackoffStrategy.reset_() unimplemented.'); +}; + +module.exports = BackoffStrategy; + +},{"events":157,"util":333}],51:[function(require,module,exports){ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function placeHoldersCount (b64) { + var len = b64.length + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0 +} + +function byteLength (b64) { + // base64 is 4/3 + up to two characters of the original data + return (b64.length * 3 / 4) - placeHoldersCount(b64) +} + +function toByteArray (b64) { + var i, l, tmp, placeHolders, arr + var len = b64.length + placeHolders = placeHoldersCount(b64) + + arr = new Arr((len * 3 / 4) - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? len - 4 : len + + var L = 0 + + for (i = 0; i < l; i += 4) { + tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] + arr[L++] = (tmp >> 16) & 0xFF + arr[L++] = (tmp >> 8) & 0xFF + arr[L++] = tmp & 0xFF + } + + if (placeHolders === 2) { + tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[L++] = tmp & 0xFF + } else if (placeHolders === 1) { + tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[L++] = (tmp >> 8) & 0xFF + arr[L++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var output = '' + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + output += lookup[tmp >> 2] + output += lookup[(tmp << 4) & 0x3F] + output += '==' + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + (uint8[len - 1]) + output += lookup[tmp >> 10] + output += lookup[(tmp >> 4) & 0x3F] + output += lookup[(tmp << 2) & 0x3F] + output += '=' + } + + parts.push(output) + + return parts.join('') +} + +},{}],52:[function(require,module,exports){ +// Reference https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki +// Format: 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S] +// NOTE: SIGHASH byte ignored AND restricted, truncate before use + +var Buffer = require('safe-buffer').Buffer + +function check (buffer) { + if (buffer.length < 8) return false + if (buffer.length > 72) return false + if (buffer[0] !== 0x30) return false + if (buffer[1] !== buffer.length - 2) return false + if (buffer[2] !== 0x02) return false + + var lenR = buffer[3] + if (lenR === 0) return false + if (5 + lenR >= buffer.length) return false + if (buffer[4 + lenR] !== 0x02) return false + + var lenS = buffer[5 + lenR] + if (lenS === 0) return false + if ((6 + lenR + lenS) !== buffer.length) return false + + if (buffer[4] & 0x80) return false + if (lenR > 1 && (buffer[4] === 0x00) && !(buffer[5] & 0x80)) return false + + if (buffer[lenR + 6] & 0x80) return false + if (lenS > 1 && (buffer[lenR + 6] === 0x00) && !(buffer[lenR + 7] & 0x80)) return false + return true +} + +function decode (buffer) { + if (buffer.length < 8) throw new Error('DER sequence length is too short') + if (buffer.length > 72) throw new Error('DER sequence length is too long') + if (buffer[0] !== 0x30) throw new Error('Expected DER sequence') + if (buffer[1] !== buffer.length - 2) throw new Error('DER sequence length is invalid') + if (buffer[2] !== 0x02) throw new Error('Expected DER integer') + + var lenR = buffer[3] + if (lenR === 0) throw new Error('R length is zero') + if (5 + lenR >= buffer.length) throw new Error('R length is too long') + if (buffer[4 + lenR] !== 0x02) throw new Error('Expected DER integer (2)') + + var lenS = buffer[5 + lenR] + if (lenS === 0) throw new Error('S length is zero') + if ((6 + lenR + lenS) !== buffer.length) throw new Error('S length is invalid') + + if (buffer[4] & 0x80) throw new Error('R value is negative') + if (lenR > 1 && (buffer[4] === 0x00) && !(buffer[5] & 0x80)) throw new Error('R value excessively padded') + + if (buffer[lenR + 6] & 0x80) throw new Error('S value is negative') + if (lenS > 1 && (buffer[lenR + 6] === 0x00) && !(buffer[lenR + 7] & 0x80)) throw new Error('S value excessively padded') + + // non-BIP66 - extract R, S values + return { + r: buffer.slice(4, 4 + lenR), + s: buffer.slice(6 + lenR) + } +} + +/* + * Expects r and s to be positive DER integers. + * + * The DER format uses the most significant bit as a sign bit (& 0x80). + * If the significant bit is set AND the integer is positive, a 0x00 is prepended. + * + * Examples: + * + * 0 => 0x00 + * 1 => 0x01 + * -1 => 0xff + * 127 => 0x7f + * -127 => 0x81 + * 128 => 0x0080 + * -128 => 0x80 + * 255 => 0x00ff + * -255 => 0xff01 + * 16300 => 0x3fac + * -16300 => 0xc054 + * 62300 => 0x00f35c + * -62300 => 0xff0ca4 +*/ +function encode (r, s) { + var lenR = r.length + var lenS = s.length + if (lenR === 0) throw new Error('R length is zero') + if (lenS === 0) throw new Error('S length is zero') + if (lenR > 33) throw new Error('R length is too long') + if (lenS > 33) throw new Error('S length is too long') + if (r[0] & 0x80) throw new Error('R value is negative') + if (s[0] & 0x80) throw new Error('S value is negative') + if (lenR > 1 && (r[0] === 0x00) && !(r[1] & 0x80)) throw new Error('R value excessively padded') + if (lenS > 1 && (s[0] === 0x00) && !(s[1] & 0x80)) throw new Error('S value excessively padded') + + var signature = Buffer.allocUnsafe(6 + lenR + lenS) + + // 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S] + signature[0] = 0x30 + signature[1] = signature.length - 2 + signature[2] = 0x02 + signature[3] = r.length + r.copy(signature, 4) + signature[4 + lenR] = 0x02 + signature[5 + lenR] = s.length + s.copy(signature, 6 + lenR) + + return signature +} + +module.exports = { + check: check, + decode: decode, + encode: encode +} + +},{"safe-buffer":290}],53:[function(require,module,exports){ +(function (module, exports) { + 'use strict'; + + // Utils + function assert (val, msg) { + if (!val) throw new Error(msg || 'Assertion failed'); + } + + // Could use `inherits` module, but don't want to move from single file + // architecture yet. + function inherits (ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + + // BN + + function BN (number, base, endian) { + if (BN.isBN(number)) { + return number; + } + + this.negative = 0; + this.words = null; + this.length = 0; + + // Reduction context + this.red = null; + + if (number !== null) { + if (base === 'le' || base === 'be') { + endian = base; + base = 10; + } + + this._init(number || 0, base || 10, endian || 'be'); + } + } + if (typeof module === 'object') { + module.exports = BN; + } else { + exports.BN = BN; + } + + BN.BN = BN; + BN.wordSize = 26; + + var Buffer; + try { + Buffer = require('buffer').Buffer; + } catch (e) { + } + + BN.isBN = function isBN (num) { + if (num instanceof BN) { + return true; + } + + return num !== null && typeof num === 'object' && + num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); + }; + + BN.max = function max (left, right) { + if (left.cmp(right) > 0) return left; + return right; + }; + + BN.min = function min (left, right) { + if (left.cmp(right) < 0) return left; + return right; + }; + + BN.prototype._init = function init (number, base, endian) { + if (typeof number === 'number') { + return this._initNumber(number, base, endian); + } + + if (typeof number === 'object') { + return this._initArray(number, base, endian); + } + + if (base === 'hex') { + base = 16; + } + assert(base === (base | 0) && base >= 2 && base <= 36); + + number = number.toString().replace(/\s+/g, ''); + var start = 0; + if (number[0] === '-') { + start++; + } + + if (base === 16) { + this._parseHex(number, start); + } else { + this._parseBase(number, base, start); + } + + if (number[0] === '-') { + this.negative = 1; + } + + this.strip(); + + if (endian !== 'le') return; + + this._initArray(this.toArray(), base, endian); + }; + + BN.prototype._initNumber = function _initNumber (number, base, endian) { + if (number < 0) { + this.negative = 1; + number = -number; + } + if (number < 0x4000000) { + this.words = [ number & 0x3ffffff ]; + this.length = 1; + } else if (number < 0x10000000000000) { + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff + ]; + this.length = 2; + } else { + assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff, + 1 + ]; + this.length = 3; + } + + if (endian !== 'le') return; + + // Reverse the bytes + this._initArray(this.toArray(), base, endian); + }; + + BN.prototype._initArray = function _initArray (number, base, endian) { + // Perhaps a Uint8Array + assert(typeof number.length === 'number'); + if (number.length <= 0) { + this.words = [ 0 ]; + this.length = 1; + return this; + } + + this.length = Math.ceil(number.length / 3); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + var j, w; + var off = 0; + if (endian === 'be') { + for (i = number.length - 1, j = 0; i >= 0; i -= 3) { + w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } else if (endian === 'le') { + for (i = 0, j = 0; i < number.length; i += 3) { + w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } + return this.strip(); + }; + + function parseHex (str, start, end) { + var r = 0; + var len = Math.min(str.length, end); + for (var i = start; i < len; i++) { + var c = str.charCodeAt(i) - 48; + + r <<= 4; + + // 'a' - 'f' + if (c >= 49 && c <= 54) { + r |= c - 49 + 0xa; + + // 'A' - 'F' + } else if (c >= 17 && c <= 22) { + r |= c - 17 + 0xa; + + // '0' - '9' + } else { + r |= c & 0xf; + } + } + return r; + } + + BN.prototype._parseHex = function _parseHex (number, start) { + // Create possibly bigger array to ensure that it fits the number + this.length = Math.ceil((number.length - start) / 6); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + var j, w; + // Scan 24-bit chunks and add them to the number + var off = 0; + for (i = number.length - 6, j = 0; i >= start; i -= 6) { + w = parseHex(number, i, i + 6); + this.words[j] |= (w << off) & 0x3ffffff; + // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb + this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + if (i + 6 !== start) { + w = parseHex(number, start, i + 6); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; + } + this.strip(); + }; + + function parseBase (str, start, end, mul) { + var r = 0; + var len = Math.min(str.length, end); + for (var i = start; i < len; i++) { + var c = str.charCodeAt(i) - 48; + + r *= mul; + + // 'a' + if (c >= 49) { + r += c - 49 + 0xa; + + // 'A' + } else if (c >= 17) { + r += c - 17 + 0xa; + + // '0' - '9' + } else { + r += c; + } + } + return r; + } + + BN.prototype._parseBase = function _parseBase (number, base, start) { + // Initialize as zero + this.words = [ 0 ]; + this.length = 1; + + // Find length of limb in base + for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { + limbLen++; + } + limbLen--; + limbPow = (limbPow / base) | 0; + + var total = number.length - start; + var mod = total % limbLen; + var end = Math.min(total, total - mod) + start; + + var word = 0; + for (var i = start; i < end; i += limbLen) { + word = parseBase(number, i, i + limbLen, base); + + this.imuln(limbPow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + + if (mod !== 0) { + var pow = 1; + word = parseBase(number, i, number.length, base); + + for (i = 0; i < mod; i++) { + pow *= base; + } + + this.imuln(pow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + }; + + BN.prototype.copy = function copy (dest) { + dest.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + dest.words[i] = this.words[i]; + } + dest.length = this.length; + dest.negative = this.negative; + dest.red = this.red; + }; + + BN.prototype.clone = function clone () { + var r = new BN(null); + this.copy(r); + return r; + }; + + BN.prototype._expand = function _expand (size) { + while (this.length < size) { + this.words[this.length++] = 0; + } + return this; + }; + + // Remove leading `0` from `this` + BN.prototype.strip = function strip () { + while (this.length > 1 && this.words[this.length - 1] === 0) { + this.length--; + } + return this._normSign(); + }; + + BN.prototype._normSign = function _normSign () { + // -0 = 0 + if (this.length === 1 && this.words[0] === 0) { + this.negative = 0; + } + return this; + }; + + BN.prototype.inspect = function inspect () { + return (this.red ? ''; + }; + + /* + + var zeros = []; + var groupSizes = []; + var groupBases = []; + + var s = ''; + var i = -1; + while (++i < BN.wordSize) { + zeros[i] = s; + s += '0'; + } + groupSizes[0] = 0; + groupSizes[1] = 0; + groupBases[0] = 0; + groupBases[1] = 0; + var base = 2 - 1; + while (++base < 36 + 1) { + var groupSize = 0; + var groupBase = 1; + while (groupBase < (1 << BN.wordSize) / base) { + groupBase *= base; + groupSize += 1; + } + groupSizes[base] = groupSize; + groupBases[base] = groupBase; + } + + */ + + var zeros = [ + '', + '0', + '00', + '000', + '0000', + '00000', + '000000', + '0000000', + '00000000', + '000000000', + '0000000000', + '00000000000', + '000000000000', + '0000000000000', + '00000000000000', + '000000000000000', + '0000000000000000', + '00000000000000000', + '000000000000000000', + '0000000000000000000', + '00000000000000000000', + '000000000000000000000', + '0000000000000000000000', + '00000000000000000000000', + '000000000000000000000000', + '0000000000000000000000000' + ]; + + var groupSizes = [ + 0, 0, + 25, 16, 12, 11, 10, 9, 8, + 8, 7, 7, 7, 7, 6, 6, + 6, 6, 6, 6, 6, 5, 5, + 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5 + ]; + + var groupBases = [ + 0, 0, + 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, + 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, + 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, + 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, + 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 + ]; + + BN.prototype.toString = function toString (base, padding) { + base = base || 10; + padding = padding | 0 || 1; + + var out; + if (base === 16 || base === 'hex') { + out = ''; + var off = 0; + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = this.words[i]; + var word = (((w << off) | carry) & 0xffffff).toString(16); + carry = (w >>> (24 - off)) & 0xffffff; + if (carry !== 0 || i !== this.length - 1) { + out = zeros[6 - word.length] + word + out; + } else { + out = word + out; + } + off += 2; + if (off >= 26) { + off -= 26; + i--; + } + } + if (carry !== 0) { + out = carry.toString(16) + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + if (base === (base | 0) && base >= 2 && base <= 36) { + // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); + var groupSize = groupSizes[base]; + // var groupBase = Math.pow(base, groupSize); + var groupBase = groupBases[base]; + out = ''; + var c = this.clone(); + c.negative = 0; + while (!c.isZero()) { + var r = c.modn(groupBase).toString(base); + c = c.idivn(groupBase); + + if (!c.isZero()) { + out = zeros[groupSize - r.length] + r + out; + } else { + out = r + out; + } + } + if (this.isZero()) { + out = '0' + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + assert(false, 'Base should be between 2 and 36'); + }; + + BN.prototype.toNumber = function toNumber () { + var ret = this.words[0]; + if (this.length === 2) { + ret += this.words[1] * 0x4000000; + } else if (this.length === 3 && this.words[2] === 0x01) { + // NOTE: at this stage it is known that the top bit is set + ret += 0x10000000000000 + (this.words[1] * 0x4000000); + } else if (this.length > 2) { + assert(false, 'Number can only safely store up to 53 bits'); + } + return (this.negative !== 0) ? -ret : ret; + }; + + BN.prototype.toJSON = function toJSON () { + return this.toString(16); + }; + + BN.prototype.toBuffer = function toBuffer (endian, length) { + assert(typeof Buffer !== 'undefined'); + return this.toArrayLike(Buffer, endian, length); + }; + + BN.prototype.toArray = function toArray (endian, length) { + return this.toArrayLike(Array, endian, length); + }; + + BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { + var byteLength = this.byteLength(); + var reqLength = length || Math.max(1, byteLength); + assert(byteLength <= reqLength, 'byte array longer than desired length'); + assert(reqLength > 0, 'Requested array length <= 0'); + + this.strip(); + var littleEndian = endian === 'le'; + var res = new ArrayType(reqLength); + + var b, i; + var q = this.clone(); + if (!littleEndian) { + // Assume big-endian + for (i = 0; i < reqLength - byteLength; i++) { + res[i] = 0; + } + + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); + + res[reqLength - i - 1] = b; + } + } else { + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); + + res[i] = b; + } + + for (; i < reqLength; i++) { + res[i] = 0; + } + } + + return res; + }; + + if (Math.clz32) { + BN.prototype._countBits = function _countBits (w) { + return 32 - Math.clz32(w); + }; + } else { + BN.prototype._countBits = function _countBits (w) { + var t = w; + var r = 0; + if (t >= 0x1000) { + r += 13; + t >>>= 13; + } + if (t >= 0x40) { + r += 7; + t >>>= 7; + } + if (t >= 0x8) { + r += 4; + t >>>= 4; + } + if (t >= 0x02) { + r += 2; + t >>>= 2; + } + return r + t; + }; + } + + BN.prototype._zeroBits = function _zeroBits (w) { + // Short-cut + if (w === 0) return 26; + + var t = w; + var r = 0; + if ((t & 0x1fff) === 0) { + r += 13; + t >>>= 13; + } + if ((t & 0x7f) === 0) { + r += 7; + t >>>= 7; + } + if ((t & 0xf) === 0) { + r += 4; + t >>>= 4; + } + if ((t & 0x3) === 0) { + r += 2; + t >>>= 2; + } + if ((t & 0x1) === 0) { + r++; + } + return r; + }; + + // Return number of used bits in a BN + BN.prototype.bitLength = function bitLength () { + var w = this.words[this.length - 1]; + var hi = this._countBits(w); + return (this.length - 1) * 26 + hi; + }; + + function toBitArray (num) { + var w = new Array(num.bitLength()); + + for (var bit = 0; bit < w.length; bit++) { + var off = (bit / 26) | 0; + var wbit = bit % 26; + + w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; + } + + return w; + } + + // Number of trailing zero bits + BN.prototype.zeroBits = function zeroBits () { + if (this.isZero()) return 0; + + var r = 0; + for (var i = 0; i < this.length; i++) { + var b = this._zeroBits(this.words[i]); + r += b; + if (b !== 26) break; + } + return r; + }; + + BN.prototype.byteLength = function byteLength () { + return Math.ceil(this.bitLength() / 8); + }; + + BN.prototype.toTwos = function toTwos (width) { + if (this.negative !== 0) { + return this.abs().inotn(width).iaddn(1); + } + return this.clone(); + }; + + BN.prototype.fromTwos = function fromTwos (width) { + if (this.testn(width - 1)) { + return this.notn(width).iaddn(1).ineg(); + } + return this.clone(); + }; + + BN.prototype.isNeg = function isNeg () { + return this.negative !== 0; + }; + + // Return negative clone of `this` + BN.prototype.neg = function neg () { + return this.clone().ineg(); + }; + + BN.prototype.ineg = function ineg () { + if (!this.isZero()) { + this.negative ^= 1; + } + + return this; + }; + + // Or `num` with `this` in-place + BN.prototype.iuor = function iuor (num) { + while (this.length < num.length) { + this.words[this.length++] = 0; + } + + for (var i = 0; i < num.length; i++) { + this.words[i] = this.words[i] | num.words[i]; + } + + return this.strip(); + }; + + BN.prototype.ior = function ior (num) { + assert((this.negative | num.negative) === 0); + return this.iuor(num); + }; + + // Or `num` with `this` + BN.prototype.or = function or (num) { + if (this.length > num.length) return this.clone().ior(num); + return num.clone().ior(this); + }; + + BN.prototype.uor = function uor (num) { + if (this.length > num.length) return this.clone().iuor(num); + return num.clone().iuor(this); + }; + + // And `num` with `this` in-place + BN.prototype.iuand = function iuand (num) { + // b = min-length(num, this) + var b; + if (this.length > num.length) { + b = num; + } else { + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = this.words[i] & num.words[i]; + } + + this.length = b.length; + + return this.strip(); + }; + + BN.prototype.iand = function iand (num) { + assert((this.negative | num.negative) === 0); + return this.iuand(num); + }; + + // And `num` with `this` + BN.prototype.and = function and (num) { + if (this.length > num.length) return this.clone().iand(num); + return num.clone().iand(this); + }; + + BN.prototype.uand = function uand (num) { + if (this.length > num.length) return this.clone().iuand(num); + return num.clone().iuand(this); + }; + + // Xor `num` with `this` in-place + BN.prototype.iuxor = function iuxor (num) { + // a.length > b.length + var a; + var b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = a.words[i] ^ b.words[i]; + } + + if (this !== a) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = a.length; + + return this.strip(); + }; + + BN.prototype.ixor = function ixor (num) { + assert((this.negative | num.negative) === 0); + return this.iuxor(num); + }; + + // Xor `num` with `this` + BN.prototype.xor = function xor (num) { + if (this.length > num.length) return this.clone().ixor(num); + return num.clone().ixor(this); + }; + + BN.prototype.uxor = function uxor (num) { + if (this.length > num.length) return this.clone().iuxor(num); + return num.clone().iuxor(this); + }; + + // Not ``this`` with ``width`` bitwidth + BN.prototype.inotn = function inotn (width) { + assert(typeof width === 'number' && width >= 0); + + var bytesNeeded = Math.ceil(width / 26) | 0; + var bitsLeft = width % 26; + + // Extend the buffer with leading zeroes + this._expand(bytesNeeded); + + if (bitsLeft > 0) { + bytesNeeded--; + } + + // Handle complete words + for (var i = 0; i < bytesNeeded; i++) { + this.words[i] = ~this.words[i] & 0x3ffffff; + } + + // Handle the residue + if (bitsLeft > 0) { + this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); + } + + // And remove leading zeroes + return this.strip(); + }; + + BN.prototype.notn = function notn (width) { + return this.clone().inotn(width); + }; + + // Set `bit` of `this` + BN.prototype.setn = function setn (bit, val) { + assert(typeof bit === 'number' && bit >= 0); + + var off = (bit / 26) | 0; + var wbit = bit % 26; + + this._expand(off + 1); + + if (val) { + this.words[off] = this.words[off] | (1 << wbit); + } else { + this.words[off] = this.words[off] & ~(1 << wbit); + } + + return this.strip(); + }; + + // Add `num` to `this` in-place + BN.prototype.iadd = function iadd (num) { + var r; + + // negative + positive + if (this.negative !== 0 && num.negative === 0) { + this.negative = 0; + r = this.isub(num); + this.negative ^= 1; + return this._normSign(); + + // positive + negative + } else if (this.negative === 0 && num.negative !== 0) { + num.negative = 0; + r = this.isub(num); + num.negative = 1; + return r._normSign(); + } + + // a.length > b.length + var a, b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) + (b.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + + this.length = a.length; + if (carry !== 0) { + this.words[this.length] = carry; + this.length++; + // Copy the rest of the words + } else if (a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + return this; + }; + + // Add `num` to `this` + BN.prototype.add = function add (num) { + var res; + if (num.negative !== 0 && this.negative === 0) { + num.negative = 0; + res = this.sub(num); + num.negative ^= 1; + return res; + } else if (num.negative === 0 && this.negative !== 0) { + this.negative = 0; + res = num.sub(this); + this.negative = 1; + return res; + } + + if (this.length > num.length) return this.clone().iadd(num); + + return num.clone().iadd(this); + }; + + // Subtract `num` from `this` in-place + BN.prototype.isub = function isub (num) { + // this - (-num) = this + num + if (num.negative !== 0) { + num.negative = 0; + var r = this.iadd(num); + num.negative = 1; + return r._normSign(); + + // -this - num = -(this + num) + } else if (this.negative !== 0) { + this.negative = 0; + this.iadd(num); + this.negative = 1; + return this._normSign(); + } + + // At this point both numbers are positive + var cmp = this.cmp(num); + + // Optimization - zeroify + if (cmp === 0) { + this.negative = 0; + this.length = 1; + this.words[0] = 0; + return this; + } + + // a > b + var a, b; + if (cmp > 0) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) - (b.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + + // Copy rest of the words + if (carry === 0 && i < a.length && a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = Math.max(this.length, i); + + if (a !== this) { + this.negative = 1; + } + + return this.strip(); + }; + + // Subtract `num` from `this` + BN.prototype.sub = function sub (num) { + return this.clone().isub(num); + }; + + function smallMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + var len = (self.length + num.length) | 0; + out.length = len; + len = (len - 1) | 0; + + // Peel one iteration (compiler can't do it, because of code complexity) + var a = self.words[0] | 0; + var b = num.words[0] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + var carry = (r / 0x4000000) | 0; + out.words[0] = lo; + + for (var k = 1; k < len; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = carry >>> 26; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = (k - j) | 0; + a = self.words[i] | 0; + b = num.words[j] | 0; + r = a * b + rword; + ncarry += (r / 0x4000000) | 0; + rword = r & 0x3ffffff; + } + out.words[k] = rword | 0; + carry = ncarry | 0; + } + if (carry !== 0) { + out.words[k] = carry | 0; + } else { + out.length--; + } + + return out.strip(); + } + + // TODO(indutny): it may be reasonable to omit it for users who don't need + // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit + // multiplication (like elliptic secp256k1). + var comb10MulTo = function comb10MulTo (self, num, out) { + var a = self.words; + var b = num.words; + var o = out.words; + var c = 0; + var lo; + var mid; + var hi; + var a0 = a[0] | 0; + var al0 = a0 & 0x1fff; + var ah0 = a0 >>> 13; + var a1 = a[1] | 0; + var al1 = a1 & 0x1fff; + var ah1 = a1 >>> 13; + var a2 = a[2] | 0; + var al2 = a2 & 0x1fff; + var ah2 = a2 >>> 13; + var a3 = a[3] | 0; + var al3 = a3 & 0x1fff; + var ah3 = a3 >>> 13; + var a4 = a[4] | 0; + var al4 = a4 & 0x1fff; + var ah4 = a4 >>> 13; + var a5 = a[5] | 0; + var al5 = a5 & 0x1fff; + var ah5 = a5 >>> 13; + var a6 = a[6] | 0; + var al6 = a6 & 0x1fff; + var ah6 = a6 >>> 13; + var a7 = a[7] | 0; + var al7 = a7 & 0x1fff; + var ah7 = a7 >>> 13; + var a8 = a[8] | 0; + var al8 = a8 & 0x1fff; + var ah8 = a8 >>> 13; + var a9 = a[9] | 0; + var al9 = a9 & 0x1fff; + var ah9 = a9 >>> 13; + var b0 = b[0] | 0; + var bl0 = b0 & 0x1fff; + var bh0 = b0 >>> 13; + var b1 = b[1] | 0; + var bl1 = b1 & 0x1fff; + var bh1 = b1 >>> 13; + var b2 = b[2] | 0; + var bl2 = b2 & 0x1fff; + var bh2 = b2 >>> 13; + var b3 = b[3] | 0; + var bl3 = b3 & 0x1fff; + var bh3 = b3 >>> 13; + var b4 = b[4] | 0; + var bl4 = b4 & 0x1fff; + var bh4 = b4 >>> 13; + var b5 = b[5] | 0; + var bl5 = b5 & 0x1fff; + var bh5 = b5 >>> 13; + var b6 = b[6] | 0; + var bl6 = b6 & 0x1fff; + var bh6 = b6 >>> 13; + var b7 = b[7] | 0; + var bl7 = b7 & 0x1fff; + var bh7 = b7 >>> 13; + var b8 = b[8] | 0; + var bl8 = b8 & 0x1fff; + var bh8 = b8 >>> 13; + var b9 = b[9] | 0; + var bl9 = b9 & 0x1fff; + var bh9 = b9 >>> 13; + + out.negative = self.negative ^ num.negative; + out.length = 19; + /* k = 0 */ + lo = Math.imul(al0, bl0); + mid = Math.imul(al0, bh0); + mid = (mid + Math.imul(ah0, bl0)) | 0; + hi = Math.imul(ah0, bh0); + var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; + w0 &= 0x3ffffff; + /* k = 1 */ + lo = Math.imul(al1, bl0); + mid = Math.imul(al1, bh0); + mid = (mid + Math.imul(ah1, bl0)) | 0; + hi = Math.imul(ah1, bh0); + lo = (lo + Math.imul(al0, bl1)) | 0; + mid = (mid + Math.imul(al0, bh1)) | 0; + mid = (mid + Math.imul(ah0, bl1)) | 0; + hi = (hi + Math.imul(ah0, bh1)) | 0; + var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; + w1 &= 0x3ffffff; + /* k = 2 */ + lo = Math.imul(al2, bl0); + mid = Math.imul(al2, bh0); + mid = (mid + Math.imul(ah2, bl0)) | 0; + hi = Math.imul(ah2, bh0); + lo = (lo + Math.imul(al1, bl1)) | 0; + mid = (mid + Math.imul(al1, bh1)) | 0; + mid = (mid + Math.imul(ah1, bl1)) | 0; + hi = (hi + Math.imul(ah1, bh1)) | 0; + lo = (lo + Math.imul(al0, bl2)) | 0; + mid = (mid + Math.imul(al0, bh2)) | 0; + mid = (mid + Math.imul(ah0, bl2)) | 0; + hi = (hi + Math.imul(ah0, bh2)) | 0; + var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; + w2 &= 0x3ffffff; + /* k = 3 */ + lo = Math.imul(al3, bl0); + mid = Math.imul(al3, bh0); + mid = (mid + Math.imul(ah3, bl0)) | 0; + hi = Math.imul(ah3, bh0); + lo = (lo + Math.imul(al2, bl1)) | 0; + mid = (mid + Math.imul(al2, bh1)) | 0; + mid = (mid + Math.imul(ah2, bl1)) | 0; + hi = (hi + Math.imul(ah2, bh1)) | 0; + lo = (lo + Math.imul(al1, bl2)) | 0; + mid = (mid + Math.imul(al1, bh2)) | 0; + mid = (mid + Math.imul(ah1, bl2)) | 0; + hi = (hi + Math.imul(ah1, bh2)) | 0; + lo = (lo + Math.imul(al0, bl3)) | 0; + mid = (mid + Math.imul(al0, bh3)) | 0; + mid = (mid + Math.imul(ah0, bl3)) | 0; + hi = (hi + Math.imul(ah0, bh3)) | 0; + var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; + w3 &= 0x3ffffff; + /* k = 4 */ + lo = Math.imul(al4, bl0); + mid = Math.imul(al4, bh0); + mid = (mid + Math.imul(ah4, bl0)) | 0; + hi = Math.imul(ah4, bh0); + lo = (lo + Math.imul(al3, bl1)) | 0; + mid = (mid + Math.imul(al3, bh1)) | 0; + mid = (mid + Math.imul(ah3, bl1)) | 0; + hi = (hi + Math.imul(ah3, bh1)) | 0; + lo = (lo + Math.imul(al2, bl2)) | 0; + mid = (mid + Math.imul(al2, bh2)) | 0; + mid = (mid + Math.imul(ah2, bl2)) | 0; + hi = (hi + Math.imul(ah2, bh2)) | 0; + lo = (lo + Math.imul(al1, bl3)) | 0; + mid = (mid + Math.imul(al1, bh3)) | 0; + mid = (mid + Math.imul(ah1, bl3)) | 0; + hi = (hi + Math.imul(ah1, bh3)) | 0; + lo = (lo + Math.imul(al0, bl4)) | 0; + mid = (mid + Math.imul(al0, bh4)) | 0; + mid = (mid + Math.imul(ah0, bl4)) | 0; + hi = (hi + Math.imul(ah0, bh4)) | 0; + var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; + w4 &= 0x3ffffff; + /* k = 5 */ + lo = Math.imul(al5, bl0); + mid = Math.imul(al5, bh0); + mid = (mid + Math.imul(ah5, bl0)) | 0; + hi = Math.imul(ah5, bh0); + lo = (lo + Math.imul(al4, bl1)) | 0; + mid = (mid + Math.imul(al4, bh1)) | 0; + mid = (mid + Math.imul(ah4, bl1)) | 0; + hi = (hi + Math.imul(ah4, bh1)) | 0; + lo = (lo + Math.imul(al3, bl2)) | 0; + mid = (mid + Math.imul(al3, bh2)) | 0; + mid = (mid + Math.imul(ah3, bl2)) | 0; + hi = (hi + Math.imul(ah3, bh2)) | 0; + lo = (lo + Math.imul(al2, bl3)) | 0; + mid = (mid + Math.imul(al2, bh3)) | 0; + mid = (mid + Math.imul(ah2, bl3)) | 0; + hi = (hi + Math.imul(ah2, bh3)) | 0; + lo = (lo + Math.imul(al1, bl4)) | 0; + mid = (mid + Math.imul(al1, bh4)) | 0; + mid = (mid + Math.imul(ah1, bl4)) | 0; + hi = (hi + Math.imul(ah1, bh4)) | 0; + lo = (lo + Math.imul(al0, bl5)) | 0; + mid = (mid + Math.imul(al0, bh5)) | 0; + mid = (mid + Math.imul(ah0, bl5)) | 0; + hi = (hi + Math.imul(ah0, bh5)) | 0; + var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; + w5 &= 0x3ffffff; + /* k = 6 */ + lo = Math.imul(al6, bl0); + mid = Math.imul(al6, bh0); + mid = (mid + Math.imul(ah6, bl0)) | 0; + hi = Math.imul(ah6, bh0); + lo = (lo + Math.imul(al5, bl1)) | 0; + mid = (mid + Math.imul(al5, bh1)) | 0; + mid = (mid + Math.imul(ah5, bl1)) | 0; + hi = (hi + Math.imul(ah5, bh1)) | 0; + lo = (lo + Math.imul(al4, bl2)) | 0; + mid = (mid + Math.imul(al4, bh2)) | 0; + mid = (mid + Math.imul(ah4, bl2)) | 0; + hi = (hi + Math.imul(ah4, bh2)) | 0; + lo = (lo + Math.imul(al3, bl3)) | 0; + mid = (mid + Math.imul(al3, bh3)) | 0; + mid = (mid + Math.imul(ah3, bl3)) | 0; + hi = (hi + Math.imul(ah3, bh3)) | 0; + lo = (lo + Math.imul(al2, bl4)) | 0; + mid = (mid + Math.imul(al2, bh4)) | 0; + mid = (mid + Math.imul(ah2, bl4)) | 0; + hi = (hi + Math.imul(ah2, bh4)) | 0; + lo = (lo + Math.imul(al1, bl5)) | 0; + mid = (mid + Math.imul(al1, bh5)) | 0; + mid = (mid + Math.imul(ah1, bl5)) | 0; + hi = (hi + Math.imul(ah1, bh5)) | 0; + lo = (lo + Math.imul(al0, bl6)) | 0; + mid = (mid + Math.imul(al0, bh6)) | 0; + mid = (mid + Math.imul(ah0, bl6)) | 0; + hi = (hi + Math.imul(ah0, bh6)) | 0; + var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; + w6 &= 0x3ffffff; + /* k = 7 */ + lo = Math.imul(al7, bl0); + mid = Math.imul(al7, bh0); + mid = (mid + Math.imul(ah7, bl0)) | 0; + hi = Math.imul(ah7, bh0); + lo = (lo + Math.imul(al6, bl1)) | 0; + mid = (mid + Math.imul(al6, bh1)) | 0; + mid = (mid + Math.imul(ah6, bl1)) | 0; + hi = (hi + Math.imul(ah6, bh1)) | 0; + lo = (lo + Math.imul(al5, bl2)) | 0; + mid = (mid + Math.imul(al5, bh2)) | 0; + mid = (mid + Math.imul(ah5, bl2)) | 0; + hi = (hi + Math.imul(ah5, bh2)) | 0; + lo = (lo + Math.imul(al4, bl3)) | 0; + mid = (mid + Math.imul(al4, bh3)) | 0; + mid = (mid + Math.imul(ah4, bl3)) | 0; + hi = (hi + Math.imul(ah4, bh3)) | 0; + lo = (lo + Math.imul(al3, bl4)) | 0; + mid = (mid + Math.imul(al3, bh4)) | 0; + mid = (mid + Math.imul(ah3, bl4)) | 0; + hi = (hi + Math.imul(ah3, bh4)) | 0; + lo = (lo + Math.imul(al2, bl5)) | 0; + mid = (mid + Math.imul(al2, bh5)) | 0; + mid = (mid + Math.imul(ah2, bl5)) | 0; + hi = (hi + Math.imul(ah2, bh5)) | 0; + lo = (lo + Math.imul(al1, bl6)) | 0; + mid = (mid + Math.imul(al1, bh6)) | 0; + mid = (mid + Math.imul(ah1, bl6)) | 0; + hi = (hi + Math.imul(ah1, bh6)) | 0; + lo = (lo + Math.imul(al0, bl7)) | 0; + mid = (mid + Math.imul(al0, bh7)) | 0; + mid = (mid + Math.imul(ah0, bl7)) | 0; + hi = (hi + Math.imul(ah0, bh7)) | 0; + var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; + w7 &= 0x3ffffff; + /* k = 8 */ + lo = Math.imul(al8, bl0); + mid = Math.imul(al8, bh0); + mid = (mid + Math.imul(ah8, bl0)) | 0; + hi = Math.imul(ah8, bh0); + lo = (lo + Math.imul(al7, bl1)) | 0; + mid = (mid + Math.imul(al7, bh1)) | 0; + mid = (mid + Math.imul(ah7, bl1)) | 0; + hi = (hi + Math.imul(ah7, bh1)) | 0; + lo = (lo + Math.imul(al6, bl2)) | 0; + mid = (mid + Math.imul(al6, bh2)) | 0; + mid = (mid + Math.imul(ah6, bl2)) | 0; + hi = (hi + Math.imul(ah6, bh2)) | 0; + lo = (lo + Math.imul(al5, bl3)) | 0; + mid = (mid + Math.imul(al5, bh3)) | 0; + mid = (mid + Math.imul(ah5, bl3)) | 0; + hi = (hi + Math.imul(ah5, bh3)) | 0; + lo = (lo + Math.imul(al4, bl4)) | 0; + mid = (mid + Math.imul(al4, bh4)) | 0; + mid = (mid + Math.imul(ah4, bl4)) | 0; + hi = (hi + Math.imul(ah4, bh4)) | 0; + lo = (lo + Math.imul(al3, bl5)) | 0; + mid = (mid + Math.imul(al3, bh5)) | 0; + mid = (mid + Math.imul(ah3, bl5)) | 0; + hi = (hi + Math.imul(ah3, bh5)) | 0; + lo = (lo + Math.imul(al2, bl6)) | 0; + mid = (mid + Math.imul(al2, bh6)) | 0; + mid = (mid + Math.imul(ah2, bl6)) | 0; + hi = (hi + Math.imul(ah2, bh6)) | 0; + lo = (lo + Math.imul(al1, bl7)) | 0; + mid = (mid + Math.imul(al1, bh7)) | 0; + mid = (mid + Math.imul(ah1, bl7)) | 0; + hi = (hi + Math.imul(ah1, bh7)) | 0; + lo = (lo + Math.imul(al0, bl8)) | 0; + mid = (mid + Math.imul(al0, bh8)) | 0; + mid = (mid + Math.imul(ah0, bl8)) | 0; + hi = (hi + Math.imul(ah0, bh8)) | 0; + var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; + w8 &= 0x3ffffff; + /* k = 9 */ + lo = Math.imul(al9, bl0); + mid = Math.imul(al9, bh0); + mid = (mid + Math.imul(ah9, bl0)) | 0; + hi = Math.imul(ah9, bh0); + lo = (lo + Math.imul(al8, bl1)) | 0; + mid = (mid + Math.imul(al8, bh1)) | 0; + mid = (mid + Math.imul(ah8, bl1)) | 0; + hi = (hi + Math.imul(ah8, bh1)) | 0; + lo = (lo + Math.imul(al7, bl2)) | 0; + mid = (mid + Math.imul(al7, bh2)) | 0; + mid = (mid + Math.imul(ah7, bl2)) | 0; + hi = (hi + Math.imul(ah7, bh2)) | 0; + lo = (lo + Math.imul(al6, bl3)) | 0; + mid = (mid + Math.imul(al6, bh3)) | 0; + mid = (mid + Math.imul(ah6, bl3)) | 0; + hi = (hi + Math.imul(ah6, bh3)) | 0; + lo = (lo + Math.imul(al5, bl4)) | 0; + mid = (mid + Math.imul(al5, bh4)) | 0; + mid = (mid + Math.imul(ah5, bl4)) | 0; + hi = (hi + Math.imul(ah5, bh4)) | 0; + lo = (lo + Math.imul(al4, bl5)) | 0; + mid = (mid + Math.imul(al4, bh5)) | 0; + mid = (mid + Math.imul(ah4, bl5)) | 0; + hi = (hi + Math.imul(ah4, bh5)) | 0; + lo = (lo + Math.imul(al3, bl6)) | 0; + mid = (mid + Math.imul(al3, bh6)) | 0; + mid = (mid + Math.imul(ah3, bl6)) | 0; + hi = (hi + Math.imul(ah3, bh6)) | 0; + lo = (lo + Math.imul(al2, bl7)) | 0; + mid = (mid + Math.imul(al2, bh7)) | 0; + mid = (mid + Math.imul(ah2, bl7)) | 0; + hi = (hi + Math.imul(ah2, bh7)) | 0; + lo = (lo + Math.imul(al1, bl8)) | 0; + mid = (mid + Math.imul(al1, bh8)) | 0; + mid = (mid + Math.imul(ah1, bl8)) | 0; + hi = (hi + Math.imul(ah1, bh8)) | 0; + lo = (lo + Math.imul(al0, bl9)) | 0; + mid = (mid + Math.imul(al0, bh9)) | 0; + mid = (mid + Math.imul(ah0, bl9)) | 0; + hi = (hi + Math.imul(ah0, bh9)) | 0; + var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; + w9 &= 0x3ffffff; + /* k = 10 */ + lo = Math.imul(al9, bl1); + mid = Math.imul(al9, bh1); + mid = (mid + Math.imul(ah9, bl1)) | 0; + hi = Math.imul(ah9, bh1); + lo = (lo + Math.imul(al8, bl2)) | 0; + mid = (mid + Math.imul(al8, bh2)) | 0; + mid = (mid + Math.imul(ah8, bl2)) | 0; + hi = (hi + Math.imul(ah8, bh2)) | 0; + lo = (lo + Math.imul(al7, bl3)) | 0; + mid = (mid + Math.imul(al7, bh3)) | 0; + mid = (mid + Math.imul(ah7, bl3)) | 0; + hi = (hi + Math.imul(ah7, bh3)) | 0; + lo = (lo + Math.imul(al6, bl4)) | 0; + mid = (mid + Math.imul(al6, bh4)) | 0; + mid = (mid + Math.imul(ah6, bl4)) | 0; + hi = (hi + Math.imul(ah6, bh4)) | 0; + lo = (lo + Math.imul(al5, bl5)) | 0; + mid = (mid + Math.imul(al5, bh5)) | 0; + mid = (mid + Math.imul(ah5, bl5)) | 0; + hi = (hi + Math.imul(ah5, bh5)) | 0; + lo = (lo + Math.imul(al4, bl6)) | 0; + mid = (mid + Math.imul(al4, bh6)) | 0; + mid = (mid + Math.imul(ah4, bl6)) | 0; + hi = (hi + Math.imul(ah4, bh6)) | 0; + lo = (lo + Math.imul(al3, bl7)) | 0; + mid = (mid + Math.imul(al3, bh7)) | 0; + mid = (mid + Math.imul(ah3, bl7)) | 0; + hi = (hi + Math.imul(ah3, bh7)) | 0; + lo = (lo + Math.imul(al2, bl8)) | 0; + mid = (mid + Math.imul(al2, bh8)) | 0; + mid = (mid + Math.imul(ah2, bl8)) | 0; + hi = (hi + Math.imul(ah2, bh8)) | 0; + lo = (lo + Math.imul(al1, bl9)) | 0; + mid = (mid + Math.imul(al1, bh9)) | 0; + mid = (mid + Math.imul(ah1, bl9)) | 0; + hi = (hi + Math.imul(ah1, bh9)) | 0; + var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; + w10 &= 0x3ffffff; + /* k = 11 */ + lo = Math.imul(al9, bl2); + mid = Math.imul(al9, bh2); + mid = (mid + Math.imul(ah9, bl2)) | 0; + hi = Math.imul(ah9, bh2); + lo = (lo + Math.imul(al8, bl3)) | 0; + mid = (mid + Math.imul(al8, bh3)) | 0; + mid = (mid + Math.imul(ah8, bl3)) | 0; + hi = (hi + Math.imul(ah8, bh3)) | 0; + lo = (lo + Math.imul(al7, bl4)) | 0; + mid = (mid + Math.imul(al7, bh4)) | 0; + mid = (mid + Math.imul(ah7, bl4)) | 0; + hi = (hi + Math.imul(ah7, bh4)) | 0; + lo = (lo + Math.imul(al6, bl5)) | 0; + mid = (mid + Math.imul(al6, bh5)) | 0; + mid = (mid + Math.imul(ah6, bl5)) | 0; + hi = (hi + Math.imul(ah6, bh5)) | 0; + lo = (lo + Math.imul(al5, bl6)) | 0; + mid = (mid + Math.imul(al5, bh6)) | 0; + mid = (mid + Math.imul(ah5, bl6)) | 0; + hi = (hi + Math.imul(ah5, bh6)) | 0; + lo = (lo + Math.imul(al4, bl7)) | 0; + mid = (mid + Math.imul(al4, bh7)) | 0; + mid = (mid + Math.imul(ah4, bl7)) | 0; + hi = (hi + Math.imul(ah4, bh7)) | 0; + lo = (lo + Math.imul(al3, bl8)) | 0; + mid = (mid + Math.imul(al3, bh8)) | 0; + mid = (mid + Math.imul(ah3, bl8)) | 0; + hi = (hi + Math.imul(ah3, bh8)) | 0; + lo = (lo + Math.imul(al2, bl9)) | 0; + mid = (mid + Math.imul(al2, bh9)) | 0; + mid = (mid + Math.imul(ah2, bl9)) | 0; + hi = (hi + Math.imul(ah2, bh9)) | 0; + var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; + w11 &= 0x3ffffff; + /* k = 12 */ + lo = Math.imul(al9, bl3); + mid = Math.imul(al9, bh3); + mid = (mid + Math.imul(ah9, bl3)) | 0; + hi = Math.imul(ah9, bh3); + lo = (lo + Math.imul(al8, bl4)) | 0; + mid = (mid + Math.imul(al8, bh4)) | 0; + mid = (mid + Math.imul(ah8, bl4)) | 0; + hi = (hi + Math.imul(ah8, bh4)) | 0; + lo = (lo + Math.imul(al7, bl5)) | 0; + mid = (mid + Math.imul(al7, bh5)) | 0; + mid = (mid + Math.imul(ah7, bl5)) | 0; + hi = (hi + Math.imul(ah7, bh5)) | 0; + lo = (lo + Math.imul(al6, bl6)) | 0; + mid = (mid + Math.imul(al6, bh6)) | 0; + mid = (mid + Math.imul(ah6, bl6)) | 0; + hi = (hi + Math.imul(ah6, bh6)) | 0; + lo = (lo + Math.imul(al5, bl7)) | 0; + mid = (mid + Math.imul(al5, bh7)) | 0; + mid = (mid + Math.imul(ah5, bl7)) | 0; + hi = (hi + Math.imul(ah5, bh7)) | 0; + lo = (lo + Math.imul(al4, bl8)) | 0; + mid = (mid + Math.imul(al4, bh8)) | 0; + mid = (mid + Math.imul(ah4, bl8)) | 0; + hi = (hi + Math.imul(ah4, bh8)) | 0; + lo = (lo + Math.imul(al3, bl9)) | 0; + mid = (mid + Math.imul(al3, bh9)) | 0; + mid = (mid + Math.imul(ah3, bl9)) | 0; + hi = (hi + Math.imul(ah3, bh9)) | 0; + var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; + w12 &= 0x3ffffff; + /* k = 13 */ + lo = Math.imul(al9, bl4); + mid = Math.imul(al9, bh4); + mid = (mid + Math.imul(ah9, bl4)) | 0; + hi = Math.imul(ah9, bh4); + lo = (lo + Math.imul(al8, bl5)) | 0; + mid = (mid + Math.imul(al8, bh5)) | 0; + mid = (mid + Math.imul(ah8, bl5)) | 0; + hi = (hi + Math.imul(ah8, bh5)) | 0; + lo = (lo + Math.imul(al7, bl6)) | 0; + mid = (mid + Math.imul(al7, bh6)) | 0; + mid = (mid + Math.imul(ah7, bl6)) | 0; + hi = (hi + Math.imul(ah7, bh6)) | 0; + lo = (lo + Math.imul(al6, bl7)) | 0; + mid = (mid + Math.imul(al6, bh7)) | 0; + mid = (mid + Math.imul(ah6, bl7)) | 0; + hi = (hi + Math.imul(ah6, bh7)) | 0; + lo = (lo + Math.imul(al5, bl8)) | 0; + mid = (mid + Math.imul(al5, bh8)) | 0; + mid = (mid + Math.imul(ah5, bl8)) | 0; + hi = (hi + Math.imul(ah5, bh8)) | 0; + lo = (lo + Math.imul(al4, bl9)) | 0; + mid = (mid + Math.imul(al4, bh9)) | 0; + mid = (mid + Math.imul(ah4, bl9)) | 0; + hi = (hi + Math.imul(ah4, bh9)) | 0; + var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; + w13 &= 0x3ffffff; + /* k = 14 */ + lo = Math.imul(al9, bl5); + mid = Math.imul(al9, bh5); + mid = (mid + Math.imul(ah9, bl5)) | 0; + hi = Math.imul(ah9, bh5); + lo = (lo + Math.imul(al8, bl6)) | 0; + mid = (mid + Math.imul(al8, bh6)) | 0; + mid = (mid + Math.imul(ah8, bl6)) | 0; + hi = (hi + Math.imul(ah8, bh6)) | 0; + lo = (lo + Math.imul(al7, bl7)) | 0; + mid = (mid + Math.imul(al7, bh7)) | 0; + mid = (mid + Math.imul(ah7, bl7)) | 0; + hi = (hi + Math.imul(ah7, bh7)) | 0; + lo = (lo + Math.imul(al6, bl8)) | 0; + mid = (mid + Math.imul(al6, bh8)) | 0; + mid = (mid + Math.imul(ah6, bl8)) | 0; + hi = (hi + Math.imul(ah6, bh8)) | 0; + lo = (lo + Math.imul(al5, bl9)) | 0; + mid = (mid + Math.imul(al5, bh9)) | 0; + mid = (mid + Math.imul(ah5, bl9)) | 0; + hi = (hi + Math.imul(ah5, bh9)) | 0; + var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; + w14 &= 0x3ffffff; + /* k = 15 */ + lo = Math.imul(al9, bl6); + mid = Math.imul(al9, bh6); + mid = (mid + Math.imul(ah9, bl6)) | 0; + hi = Math.imul(ah9, bh6); + lo = (lo + Math.imul(al8, bl7)) | 0; + mid = (mid + Math.imul(al8, bh7)) | 0; + mid = (mid + Math.imul(ah8, bl7)) | 0; + hi = (hi + Math.imul(ah8, bh7)) | 0; + lo = (lo + Math.imul(al7, bl8)) | 0; + mid = (mid + Math.imul(al7, bh8)) | 0; + mid = (mid + Math.imul(ah7, bl8)) | 0; + hi = (hi + Math.imul(ah7, bh8)) | 0; + lo = (lo + Math.imul(al6, bl9)) | 0; + mid = (mid + Math.imul(al6, bh9)) | 0; + mid = (mid + Math.imul(ah6, bl9)) | 0; + hi = (hi + Math.imul(ah6, bh9)) | 0; + var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; + w15 &= 0x3ffffff; + /* k = 16 */ + lo = Math.imul(al9, bl7); + mid = Math.imul(al9, bh7); + mid = (mid + Math.imul(ah9, bl7)) | 0; + hi = Math.imul(ah9, bh7); + lo = (lo + Math.imul(al8, bl8)) | 0; + mid = (mid + Math.imul(al8, bh8)) | 0; + mid = (mid + Math.imul(ah8, bl8)) | 0; + hi = (hi + Math.imul(ah8, bh8)) | 0; + lo = (lo + Math.imul(al7, bl9)) | 0; + mid = (mid + Math.imul(al7, bh9)) | 0; + mid = (mid + Math.imul(ah7, bl9)) | 0; + hi = (hi + Math.imul(ah7, bh9)) | 0; + var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; + w16 &= 0x3ffffff; + /* k = 17 */ + lo = Math.imul(al9, bl8); + mid = Math.imul(al9, bh8); + mid = (mid + Math.imul(ah9, bl8)) | 0; + hi = Math.imul(ah9, bh8); + lo = (lo + Math.imul(al8, bl9)) | 0; + mid = (mid + Math.imul(al8, bh9)) | 0; + mid = (mid + Math.imul(ah8, bl9)) | 0; + hi = (hi + Math.imul(ah8, bh9)) | 0; + var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; + w17 &= 0x3ffffff; + /* k = 18 */ + lo = Math.imul(al9, bl9); + mid = Math.imul(al9, bh9); + mid = (mid + Math.imul(ah9, bl9)) | 0; + hi = Math.imul(ah9, bh9); + var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; + w18 &= 0x3ffffff; + o[0] = w0; + o[1] = w1; + o[2] = w2; + o[3] = w3; + o[4] = w4; + o[5] = w5; + o[6] = w6; + o[7] = w7; + o[8] = w8; + o[9] = w9; + o[10] = w10; + o[11] = w11; + o[12] = w12; + o[13] = w13; + o[14] = w14; + o[15] = w15; + o[16] = w16; + o[17] = w17; + o[18] = w18; + if (c !== 0) { + o[19] = c; + out.length++; + } + return out; + }; + + // Polyfill comb + if (!Math.imul) { + comb10MulTo = smallMulTo; + } + + function bigMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + out.length = self.length + num.length; + + var carry = 0; + var hncarry = 0; + for (var k = 0; k < out.length - 1; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = hncarry; + hncarry = 0; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = k - j; + var a = self.words[i] | 0; + var b = num.words[j] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; + lo = (lo + rword) | 0; + rword = lo & 0x3ffffff; + ncarry = (ncarry + (lo >>> 26)) | 0; + + hncarry += ncarry >>> 26; + ncarry &= 0x3ffffff; + } + out.words[k] = rword; + carry = ncarry; + ncarry = hncarry; + } + if (carry !== 0) { + out.words[k] = carry; + } else { + out.length--; + } + + return out.strip(); + } + + function jumboMulTo (self, num, out) { + var fftm = new FFTM(); + return fftm.mulp(self, num, out); + } + + BN.prototype.mulTo = function mulTo (num, out) { + var res; + var len = this.length + num.length; + if (this.length === 10 && num.length === 10) { + res = comb10MulTo(this, num, out); + } else if (len < 63) { + res = smallMulTo(this, num, out); + } else if (len < 1024) { + res = bigMulTo(this, num, out); + } else { + res = jumboMulTo(this, num, out); + } + + return res; + }; + + // Cooley-Tukey algorithm for FFT + // slightly revisited to rely on looping instead of recursion + + function FFTM (x, y) { + this.x = x; + this.y = y; + } + + FFTM.prototype.makeRBT = function makeRBT (N) { + var t = new Array(N); + var l = BN.prototype._countBits(N) - 1; + for (var i = 0; i < N; i++) { + t[i] = this.revBin(i, l, N); + } + + return t; + }; + + // Returns binary-reversed representation of `x` + FFTM.prototype.revBin = function revBin (x, l, N) { + if (x === 0 || x === N - 1) return x; + + var rb = 0; + for (var i = 0; i < l; i++) { + rb |= (x & 1) << (l - i - 1); + x >>= 1; + } + + return rb; + }; + + // Performs "tweedling" phase, therefore 'emulating' + // behaviour of the recursive algorithm + FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { + for (var i = 0; i < N; i++) { + rtws[i] = rws[rbt[i]]; + itws[i] = iws[rbt[i]]; + } + }; + + FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { + this.permute(rbt, rws, iws, rtws, itws, N); + + for (var s = 1; s < N; s <<= 1) { + var l = s << 1; + + var rtwdf = Math.cos(2 * Math.PI / l); + var itwdf = Math.sin(2 * Math.PI / l); + + for (var p = 0; p < N; p += l) { + var rtwdf_ = rtwdf; + var itwdf_ = itwdf; + + for (var j = 0; j < s; j++) { + var re = rtws[p + j]; + var ie = itws[p + j]; + + var ro = rtws[p + j + s]; + var io = itws[p + j + s]; + + var rx = rtwdf_ * ro - itwdf_ * io; + + io = rtwdf_ * io + itwdf_ * ro; + ro = rx; + + rtws[p + j] = re + ro; + itws[p + j] = ie + io; + + rtws[p + j + s] = re - ro; + itws[p + j + s] = ie - io; + + /* jshint maxdepth : false */ + if (j !== l) { + rx = rtwdf * rtwdf_ - itwdf * itwdf_; + + itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; + rtwdf_ = rx; + } + } + } + } + }; + + FFTM.prototype.guessLen13b = function guessLen13b (n, m) { + var N = Math.max(m, n) | 1; + var odd = N & 1; + var i = 0; + for (N = N / 2 | 0; N; N = N >>> 1) { + i++; + } + + return 1 << i + 1 + odd; + }; + + FFTM.prototype.conjugate = function conjugate (rws, iws, N) { + if (N <= 1) return; + + for (var i = 0; i < N / 2; i++) { + var t = rws[i]; + + rws[i] = rws[N - i - 1]; + rws[N - i - 1] = t; + + t = iws[i]; + + iws[i] = -iws[N - i - 1]; + iws[N - i - 1] = -t; + } + }; + + FFTM.prototype.normalize13b = function normalize13b (ws, N) { + var carry = 0; + for (var i = 0; i < N / 2; i++) { + var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + + Math.round(ws[2 * i] / N) + + carry; + + ws[i] = w & 0x3ffffff; + + if (w < 0x4000000) { + carry = 0; + } else { + carry = w / 0x4000000 | 0; + } + } + + return ws; + }; + + FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { + var carry = 0; + for (var i = 0; i < len; i++) { + carry = carry + (ws[i] | 0); + + rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; + rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; + } + + // Pad with zeroes + for (i = 2 * len; i < N; ++i) { + rws[i] = 0; + } + + assert(carry === 0); + assert((carry & ~0x1fff) === 0); + }; + + FFTM.prototype.stub = function stub (N) { + var ph = new Array(N); + for (var i = 0; i < N; i++) { + ph[i] = 0; + } + + return ph; + }; + + FFTM.prototype.mulp = function mulp (x, y, out) { + var N = 2 * this.guessLen13b(x.length, y.length); + + var rbt = this.makeRBT(N); + + var _ = this.stub(N); + + var rws = new Array(N); + var rwst = new Array(N); + var iwst = new Array(N); + + var nrws = new Array(N); + var nrwst = new Array(N); + var niwst = new Array(N); + + var rmws = out.words; + rmws.length = N; + + this.convert13b(x.words, x.length, rws, N); + this.convert13b(y.words, y.length, nrws, N); + + this.transform(rws, _, rwst, iwst, N, rbt); + this.transform(nrws, _, nrwst, niwst, N, rbt); + + for (var i = 0; i < N; i++) { + var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; + iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; + rwst[i] = rx; + } + + this.conjugate(rwst, iwst, N); + this.transform(rwst, iwst, rmws, _, N, rbt); + this.conjugate(rmws, _, N); + this.normalize13b(rmws, N); + + out.negative = x.negative ^ y.negative; + out.length = x.length + y.length; + return out.strip(); + }; + + // Multiply `this` by `num` + BN.prototype.mul = function mul (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return this.mulTo(num, out); + }; + + // Multiply employing FFT + BN.prototype.mulf = function mulf (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return jumboMulTo(this, num, out); + }; + + // In-place Multiplication + BN.prototype.imul = function imul (num) { + return this.clone().mulTo(num, this); + }; + + BN.prototype.imuln = function imuln (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + + // Carry + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = (this.words[i] | 0) * num; + var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); + carry >>= 26; + carry += (w / 0x4000000) | 0; + // NOTE: lo is 27bit maximum + carry += lo >>> 26; + this.words[i] = lo & 0x3ffffff; + } + + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + + return this; + }; + + BN.prototype.muln = function muln (num) { + return this.clone().imuln(num); + }; + + // `this` * `this` + BN.prototype.sqr = function sqr () { + return this.mul(this); + }; + + // `this` * `this` in-place + BN.prototype.isqr = function isqr () { + return this.imul(this.clone()); + }; + + // Math.pow(`this`, `num`) + BN.prototype.pow = function pow (num) { + var w = toBitArray(num); + if (w.length === 0) return new BN(1); + + // Skip leading zeroes + var res = this; + for (var i = 0; i < w.length; i++, res = res.sqr()) { + if (w[i] !== 0) break; + } + + if (++i < w.length) { + for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { + if (w[i] === 0) continue; + + res = res.mul(q); + } + } + + return res; + }; + + // Shift-left in-place + BN.prototype.iushln = function iushln (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); + var i; + + if (r !== 0) { + var carry = 0; + + for (i = 0; i < this.length; i++) { + var newCarry = this.words[i] & carryMask; + var c = ((this.words[i] | 0) - newCarry) << r; + this.words[i] = c | carry; + carry = newCarry >>> (26 - r); + } + + if (carry) { + this.words[i] = carry; + this.length++; + } + } + + if (s !== 0) { + for (i = this.length - 1; i >= 0; i--) { + this.words[i + s] = this.words[i]; + } + + for (i = 0; i < s; i++) { + this.words[i] = 0; + } + + this.length += s; + } + + return this.strip(); + }; + + BN.prototype.ishln = function ishln (bits) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushln(bits); + }; + + // Shift-right in-place + // NOTE: `hint` is a lowest bit before trailing zeroes + // NOTE: if `extended` is present - it will be filled with destroyed bits + BN.prototype.iushrn = function iushrn (bits, hint, extended) { + assert(typeof bits === 'number' && bits >= 0); + var h; + if (hint) { + h = (hint - (hint % 26)) / 26; + } else { + h = 0; + } + + var r = bits % 26; + var s = Math.min((bits - r) / 26, this.length); + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + var maskedWords = extended; + + h -= s; + h = Math.max(0, h); + + // Extended mode, copy masked part + if (maskedWords) { + for (var i = 0; i < s; i++) { + maskedWords.words[i] = this.words[i]; + } + maskedWords.length = s; + } + + if (s === 0) { + // No-op, we should not move anything at all + } else if (this.length > s) { + this.length -= s; + for (i = 0; i < this.length; i++) { + this.words[i] = this.words[i + s]; + } + } else { + this.words[0] = 0; + this.length = 1; + } + + var carry = 0; + for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { + var word = this.words[i] | 0; + this.words[i] = (carry << (26 - r)) | (word >>> r); + carry = word & mask; + } + + // Push carried bits as a mask + if (maskedWords && carry !== 0) { + maskedWords.words[maskedWords.length++] = carry; + } + + if (this.length === 0) { + this.words[0] = 0; + this.length = 1; + } + + return this.strip(); + }; + + BN.prototype.ishrn = function ishrn (bits, hint, extended) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushrn(bits, hint, extended); + }; + + // Shift-left + BN.prototype.shln = function shln (bits) { + return this.clone().ishln(bits); + }; + + BN.prototype.ushln = function ushln (bits) { + return this.clone().iushln(bits); + }; + + // Shift-right + BN.prototype.shrn = function shrn (bits) { + return this.clone().ishrn(bits); + }; + + BN.prototype.ushrn = function ushrn (bits) { + return this.clone().iushrn(bits); + }; + + // Test if n bit is set + BN.prototype.testn = function testn (bit) { + assert(typeof bit === 'number' && bit >= 0); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) return false; + + // Check bit and return + var w = this.words[s]; + + return !!(w & q); + }; + + // Return only lowers bits of number (in-place) + BN.prototype.imaskn = function imaskn (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + + assert(this.negative === 0, 'imaskn works only with positive numbers'); + + if (this.length <= s) { + return this; + } + + if (r !== 0) { + s++; + } + this.length = Math.min(s, this.length); + + if (r !== 0) { + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + this.words[this.length - 1] &= mask; + } + + return this.strip(); + }; + + // Return only lowers bits of number + BN.prototype.maskn = function maskn (bits) { + return this.clone().imaskn(bits); + }; + + // Add plain number `num` to `this` + BN.prototype.iaddn = function iaddn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.isubn(-num); + + // Possible sign change + if (this.negative !== 0) { + if (this.length === 1 && (this.words[0] | 0) < num) { + this.words[0] = num - (this.words[0] | 0); + this.negative = 0; + return this; + } + + this.negative = 0; + this.isubn(num); + this.negative = 1; + return this; + } + + // Add without checks + return this._iaddn(num); + }; + + BN.prototype._iaddn = function _iaddn (num) { + this.words[0] += num; + + // Carry + for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { + this.words[i] -= 0x4000000; + if (i === this.length - 1) { + this.words[i + 1] = 1; + } else { + this.words[i + 1]++; + } + } + this.length = Math.max(this.length, i + 1); + + return this; + }; + + // Subtract plain number `num` from `this` + BN.prototype.isubn = function isubn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.iaddn(-num); + + if (this.negative !== 0) { + this.negative = 0; + this.iaddn(num); + this.negative = 1; + return this; + } + + this.words[0] -= num; + + if (this.length === 1 && this.words[0] < 0) { + this.words[0] = -this.words[0]; + this.negative = 1; + } else { + // Carry + for (var i = 0; i < this.length && this.words[i] < 0; i++) { + this.words[i] += 0x4000000; + this.words[i + 1] -= 1; + } + } + + return this.strip(); + }; + + BN.prototype.addn = function addn (num) { + return this.clone().iaddn(num); + }; + + BN.prototype.subn = function subn (num) { + return this.clone().isubn(num); + }; + + BN.prototype.iabs = function iabs () { + this.negative = 0; + + return this; + }; + + BN.prototype.abs = function abs () { + return this.clone().iabs(); + }; + + BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { + var len = num.length + shift; + var i; + + this._expand(len); + + var w; + var carry = 0; + for (i = 0; i < num.length; i++) { + w = (this.words[i + shift] | 0) + carry; + var right = (num.words[i] | 0) * mul; + w -= right & 0x3ffffff; + carry = (w >> 26) - ((right / 0x4000000) | 0); + this.words[i + shift] = w & 0x3ffffff; + } + for (; i < this.length - shift; i++) { + w = (this.words[i + shift] | 0) + carry; + carry = w >> 26; + this.words[i + shift] = w & 0x3ffffff; + } + + if (carry === 0) return this.strip(); + + // Subtraction overflow + assert(carry === -1); + carry = 0; + for (i = 0; i < this.length; i++) { + w = -(this.words[i] | 0) + carry; + carry = w >> 26; + this.words[i] = w & 0x3ffffff; + } + this.negative = 1; + + return this.strip(); + }; + + BN.prototype._wordDiv = function _wordDiv (num, mode) { + var shift = this.length - num.length; + + var a = this.clone(); + var b = num; + + // Normalize + var bhi = b.words[b.length - 1] | 0; + var bhiBits = this._countBits(bhi); + shift = 26 - bhiBits; + if (shift !== 0) { + b = b.ushln(shift); + a.iushln(shift); + bhi = b.words[b.length - 1] | 0; + } + + // Initialize quotient + var m = a.length - b.length; + var q; + + if (mode !== 'mod') { + q = new BN(null); + q.length = m + 1; + q.words = new Array(q.length); + for (var i = 0; i < q.length; i++) { + q.words[i] = 0; + } + } + + var diff = a.clone()._ishlnsubmul(b, 1, m); + if (diff.negative === 0) { + a = diff; + if (q) { + q.words[m] = 1; + } + } + + for (var j = m - 1; j >= 0; j--) { + var qj = (a.words[b.length + j] | 0) * 0x4000000 + + (a.words[b.length + j - 1] | 0); + + // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max + // (0x7ffffff) + qj = Math.min((qj / bhi) | 0, 0x3ffffff); + + a._ishlnsubmul(b, qj, j); + while (a.negative !== 0) { + qj--; + a.negative = 0; + a._ishlnsubmul(b, 1, j); + if (!a.isZero()) { + a.negative ^= 1; + } + } + if (q) { + q.words[j] = qj; + } + } + if (q) { + q.strip(); + } + a.strip(); + + // Denormalize + if (mode !== 'div' && shift !== 0) { + a.iushrn(shift); + } + + return { + div: q || null, + mod: a + }; + }; + + // NOTE: 1) `mode` can be set to `mod` to request mod only, + // to `div` to request div only, or be absent to + // request both div & mod + // 2) `positive` is true if unsigned mod is requested + BN.prototype.divmod = function divmod (num, mode, positive) { + assert(!num.isZero()); + + if (this.isZero()) { + return { + div: new BN(0), + mod: new BN(0) + }; + } + + var div, mod, res; + if (this.negative !== 0 && num.negative === 0) { + res = this.neg().divmod(num, mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.iadd(num); + } + } + + return { + div: div, + mod: mod + }; + } + + if (this.negative === 0 && num.negative !== 0) { + res = this.divmod(num.neg(), mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + return { + div: div, + mod: res.mod + }; + } + + if ((this.negative & num.negative) !== 0) { + res = this.neg().divmod(num.neg(), mode); + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.isub(num); + } + } + + return { + div: res.div, + mod: mod + }; + } + + // Both numbers are positive at this point + + // Strip both numbers to approximate shift value + if (num.length > this.length || this.cmp(num) < 0) { + return { + div: new BN(0), + mod: this + }; + } + + // Very short reduction + if (num.length === 1) { + if (mode === 'div') { + return { + div: this.divn(num.words[0]), + mod: null + }; + } + + if (mode === 'mod') { + return { + div: null, + mod: new BN(this.modn(num.words[0])) + }; + } + + return { + div: this.divn(num.words[0]), + mod: new BN(this.modn(num.words[0])) + }; + } + + return this._wordDiv(num, mode); + }; + + // Find `this` / `num` + BN.prototype.div = function div (num) { + return this.divmod(num, 'div', false).div; + }; + + // Find `this` % `num` + BN.prototype.mod = function mod (num) { + return this.divmod(num, 'mod', false).mod; + }; + + BN.prototype.umod = function umod (num) { + return this.divmod(num, 'mod', true).mod; + }; + + // Find Round(`this` / `num`) + BN.prototype.divRound = function divRound (num) { + var dm = this.divmod(num); + + // Fast case - exact division + if (dm.mod.isZero()) return dm.div; + + var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; + + var half = num.ushrn(1); + var r2 = num.andln(1); + var cmp = mod.cmp(half); + + // Round down + if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; + + // Round up + return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); + }; + + BN.prototype.modn = function modn (num) { + assert(num <= 0x3ffffff); + var p = (1 << 26) % num; + + var acc = 0; + for (var i = this.length - 1; i >= 0; i--) { + acc = (p * acc + (this.words[i] | 0)) % num; + } + + return acc; + }; + + // In-place division by number + BN.prototype.idivn = function idivn (num) { + assert(num <= 0x3ffffff); + + var carry = 0; + for (var i = this.length - 1; i >= 0; i--) { + var w = (this.words[i] | 0) + carry * 0x4000000; + this.words[i] = (w / num) | 0; + carry = w % num; + } + + return this.strip(); + }; + + BN.prototype.divn = function divn (num) { + return this.clone().idivn(num); + }; + + BN.prototype.egcd = function egcd (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var x = this; + var y = p.clone(); + + if (x.negative !== 0) { + x = x.umod(p); + } else { + x = x.clone(); + } + + // A * x + B * y = x + var A = new BN(1); + var B = new BN(0); + + // C * x + D * y = y + var C = new BN(0); + var D = new BN(1); + + var g = 0; + + while (x.isEven() && y.isEven()) { + x.iushrn(1); + y.iushrn(1); + ++g; + } + + var yp = y.clone(); + var xp = x.clone(); + + while (!x.isZero()) { + for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + x.iushrn(i); + while (i-- > 0) { + if (A.isOdd() || B.isOdd()) { + A.iadd(yp); + B.isub(xp); + } + + A.iushrn(1); + B.iushrn(1); + } + } + + for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + y.iushrn(j); + while (j-- > 0) { + if (C.isOdd() || D.isOdd()) { + C.iadd(yp); + D.isub(xp); + } + + C.iushrn(1); + D.iushrn(1); + } + } + + if (x.cmp(y) >= 0) { + x.isub(y); + A.isub(C); + B.isub(D); + } else { + y.isub(x); + C.isub(A); + D.isub(B); + } + } + + return { + a: C, + b: D, + gcd: y.iushln(g) + }; + }; + + // This is reduced incarnation of the binary EEA + // above, designated to invert members of the + // _prime_ fields F(p) at a maximal speed + BN.prototype._invmp = function _invmp (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var a = this; + var b = p.clone(); + + if (a.negative !== 0) { + a = a.umod(p); + } else { + a = a.clone(); + } + + var x1 = new BN(1); + var x2 = new BN(0); + + var delta = b.clone(); + + while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { + for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + a.iushrn(i); + while (i-- > 0) { + if (x1.isOdd()) { + x1.iadd(delta); + } + + x1.iushrn(1); + } + } + + for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + b.iushrn(j); + while (j-- > 0) { + if (x2.isOdd()) { + x2.iadd(delta); + } + + x2.iushrn(1); + } + } + + if (a.cmp(b) >= 0) { + a.isub(b); + x1.isub(x2); + } else { + b.isub(a); + x2.isub(x1); + } + } + + var res; + if (a.cmpn(1) === 0) { + res = x1; + } else { + res = x2; + } + + if (res.cmpn(0) < 0) { + res.iadd(p); + } + + return res; + }; + + BN.prototype.gcd = function gcd (num) { + if (this.isZero()) return num.abs(); + if (num.isZero()) return this.abs(); + + var a = this.clone(); + var b = num.clone(); + a.negative = 0; + b.negative = 0; + + // Remove common factor of two + for (var shift = 0; a.isEven() && b.isEven(); shift++) { + a.iushrn(1); + b.iushrn(1); + } + + do { + while (a.isEven()) { + a.iushrn(1); + } + while (b.isEven()) { + b.iushrn(1); + } + + var r = a.cmp(b); + if (r < 0) { + // Swap `a` and `b` to make `a` always bigger than `b` + var t = a; + a = b; + b = t; + } else if (r === 0 || b.cmpn(1) === 0) { + break; + } + + a.isub(b); + } while (true); + + return b.iushln(shift); + }; + + // Invert number in the field F(num) + BN.prototype.invm = function invm (num) { + return this.egcd(num).a.umod(num); + }; + + BN.prototype.isEven = function isEven () { + return (this.words[0] & 1) === 0; + }; + + BN.prototype.isOdd = function isOdd () { + return (this.words[0] & 1) === 1; + }; + + // And first word and num + BN.prototype.andln = function andln (num) { + return this.words[0] & num; + }; + + // Increment at the bit position in-line + BN.prototype.bincn = function bincn (bit) { + assert(typeof bit === 'number'); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) { + this._expand(s + 1); + this.words[s] |= q; + return this; + } + + // Add bit and propagate, if needed + var carry = q; + for (var i = s; carry !== 0 && i < this.length; i++) { + var w = this.words[i] | 0; + w += carry; + carry = w >>> 26; + w &= 0x3ffffff; + this.words[i] = w; + } + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + return this; + }; + + BN.prototype.isZero = function isZero () { + return this.length === 1 && this.words[0] === 0; + }; + + BN.prototype.cmpn = function cmpn (num) { + var negative = num < 0; + + if (this.negative !== 0 && !negative) return -1; + if (this.negative === 0 && negative) return 1; + + this.strip(); + + var res; + if (this.length > 1) { + res = 1; + } else { + if (negative) { + num = -num; + } + + assert(num <= 0x3ffffff, 'Number is too big'); + + var w = this.words[0] | 0; + res = w === num ? 0 : w < num ? -1 : 1; + } + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Compare two numbers and return: + // 1 - if `this` > `num` + // 0 - if `this` == `num` + // -1 - if `this` < `num` + BN.prototype.cmp = function cmp (num) { + if (this.negative !== 0 && num.negative === 0) return -1; + if (this.negative === 0 && num.negative !== 0) return 1; + + var res = this.ucmp(num); + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Unsigned comparison + BN.prototype.ucmp = function ucmp (num) { + // At this point both numbers have the same sign + if (this.length > num.length) return 1; + if (this.length < num.length) return -1; + + var res = 0; + for (var i = this.length - 1; i >= 0; i--) { + var a = this.words[i] | 0; + var b = num.words[i] | 0; + + if (a === b) continue; + if (a < b) { + res = -1; + } else if (a > b) { + res = 1; + } + break; + } + return res; + }; + + BN.prototype.gtn = function gtn (num) { + return this.cmpn(num) === 1; + }; + + BN.prototype.gt = function gt (num) { + return this.cmp(num) === 1; + }; + + BN.prototype.gten = function gten (num) { + return this.cmpn(num) >= 0; + }; + + BN.prototype.gte = function gte (num) { + return this.cmp(num) >= 0; + }; + + BN.prototype.ltn = function ltn (num) { + return this.cmpn(num) === -1; + }; + + BN.prototype.lt = function lt (num) { + return this.cmp(num) === -1; + }; + + BN.prototype.lten = function lten (num) { + return this.cmpn(num) <= 0; + }; + + BN.prototype.lte = function lte (num) { + return this.cmp(num) <= 0; + }; + + BN.prototype.eqn = function eqn (num) { + return this.cmpn(num) === 0; + }; + + BN.prototype.eq = function eq (num) { + return this.cmp(num) === 0; + }; + + // + // A reduce context, could be using montgomery or something better, depending + // on the `m` itself. + // + BN.red = function red (num) { + return new Red(num); + }; + + BN.prototype.toRed = function toRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + assert(this.negative === 0, 'red works only with positives'); + return ctx.convertTo(this)._forceRed(ctx); + }; + + BN.prototype.fromRed = function fromRed () { + assert(this.red, 'fromRed works only with numbers in reduction context'); + return this.red.convertFrom(this); + }; + + BN.prototype._forceRed = function _forceRed (ctx) { + this.red = ctx; + return this; + }; + + BN.prototype.forceRed = function forceRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + return this._forceRed(ctx); + }; + + BN.prototype.redAdd = function redAdd (num) { + assert(this.red, 'redAdd works only with red numbers'); + return this.red.add(this, num); + }; + + BN.prototype.redIAdd = function redIAdd (num) { + assert(this.red, 'redIAdd works only with red numbers'); + return this.red.iadd(this, num); + }; + + BN.prototype.redSub = function redSub (num) { + assert(this.red, 'redSub works only with red numbers'); + return this.red.sub(this, num); + }; + + BN.prototype.redISub = function redISub (num) { + assert(this.red, 'redISub works only with red numbers'); + return this.red.isub(this, num); + }; + + BN.prototype.redShl = function redShl (num) { + assert(this.red, 'redShl works only with red numbers'); + return this.red.shl(this, num); + }; + + BN.prototype.redMul = function redMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.mul(this, num); + }; + + BN.prototype.redIMul = function redIMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.imul(this, num); + }; + + BN.prototype.redSqr = function redSqr () { + assert(this.red, 'redSqr works only with red numbers'); + this.red._verify1(this); + return this.red.sqr(this); + }; + + BN.prototype.redISqr = function redISqr () { + assert(this.red, 'redISqr works only with red numbers'); + this.red._verify1(this); + return this.red.isqr(this); + }; + + // Square root over p + BN.prototype.redSqrt = function redSqrt () { + assert(this.red, 'redSqrt works only with red numbers'); + this.red._verify1(this); + return this.red.sqrt(this); + }; + + BN.prototype.redInvm = function redInvm () { + assert(this.red, 'redInvm works only with red numbers'); + this.red._verify1(this); + return this.red.invm(this); + }; + + // Return negative clone of `this` % `red modulo` + BN.prototype.redNeg = function redNeg () { + assert(this.red, 'redNeg works only with red numbers'); + this.red._verify1(this); + return this.red.neg(this); + }; + + BN.prototype.redPow = function redPow (num) { + assert(this.red && !num.red, 'redPow(normalNum)'); + this.red._verify1(this); + return this.red.pow(this, num); + }; + + // Prime numbers with efficient reduction + var primes = { + k256: null, + p224: null, + p192: null, + p25519: null + }; + + // Pseudo-Mersenne prime + function MPrime (name, p) { + // P = 2 ^ N - K + this.name = name; + this.p = new BN(p, 16); + this.n = this.p.bitLength(); + this.k = new BN(1).iushln(this.n).isub(this.p); + + this.tmp = this._tmp(); + } + + MPrime.prototype._tmp = function _tmp () { + var tmp = new BN(null); + tmp.words = new Array(Math.ceil(this.n / 13)); + return tmp; + }; + + MPrime.prototype.ireduce = function ireduce (num) { + // Assumes that `num` is less than `P^2` + // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) + var r = num; + var rlen; + + do { + this.split(r, this.tmp); + r = this.imulK(r); + r = r.iadd(this.tmp); + rlen = r.bitLength(); + } while (rlen > this.n); + + var cmp = rlen < this.n ? -1 : r.ucmp(this.p); + if (cmp === 0) { + r.words[0] = 0; + r.length = 1; + } else if (cmp > 0) { + r.isub(this.p); + } else { + r.strip(); + } + + return r; + }; + + MPrime.prototype.split = function split (input, out) { + input.iushrn(this.n, 0, out); + }; + + MPrime.prototype.imulK = function imulK (num) { + return num.imul(this.k); + }; + + function K256 () { + MPrime.call( + this, + 'k256', + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); + } + inherits(K256, MPrime); + + K256.prototype.split = function split (input, output) { + // 256 = 9 * 26 + 22 + var mask = 0x3fffff; + + var outLen = Math.min(input.length, 9); + for (var i = 0; i < outLen; i++) { + output.words[i] = input.words[i]; + } + output.length = outLen; + + if (input.length <= 9) { + input.words[0] = 0; + input.length = 1; + return; + } + + // Shift by 9 limbs + var prev = input.words[9]; + output.words[output.length++] = prev & mask; + + for (i = 10; i < input.length; i++) { + var next = input.words[i] | 0; + input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); + prev = next; + } + prev >>>= 22; + input.words[i - 10] = prev; + if (prev === 0 && input.length > 10) { + input.length -= 10; + } else { + input.length -= 9; + } + }; + + K256.prototype.imulK = function imulK (num) { + // K = 0x1000003d1 = [ 0x40, 0x3d1 ] + num.words[num.length] = 0; + num.words[num.length + 1] = 0; + num.length += 2; + + // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 + var lo = 0; + for (var i = 0; i < num.length; i++) { + var w = num.words[i] | 0; + lo += w * 0x3d1; + num.words[i] = lo & 0x3ffffff; + lo = w * 0x40 + ((lo / 0x4000000) | 0); + } + + // Fast length reduction + if (num.words[num.length - 1] === 0) { + num.length--; + if (num.words[num.length - 1] === 0) { + num.length--; + } + } + return num; + }; + + function P224 () { + MPrime.call( + this, + 'p224', + 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); + } + inherits(P224, MPrime); + + function P192 () { + MPrime.call( + this, + 'p192', + 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); + } + inherits(P192, MPrime); + + function P25519 () { + // 2 ^ 255 - 19 + MPrime.call( + this, + '25519', + '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); + } + inherits(P25519, MPrime); + + P25519.prototype.imulK = function imulK (num) { + // K = 0x13 + var carry = 0; + for (var i = 0; i < num.length; i++) { + var hi = (num.words[i] | 0) * 0x13 + carry; + var lo = hi & 0x3ffffff; + hi >>>= 26; + + num.words[i] = lo; + carry = hi; + } + if (carry !== 0) { + num.words[num.length++] = carry; + } + return num; + }; + + // Exported mostly for testing purposes, use plain name instead + BN._prime = function prime (name) { + // Cached version of prime + if (primes[name]) return primes[name]; + + var prime; + if (name === 'k256') { + prime = new K256(); + } else if (name === 'p224') { + prime = new P224(); + } else if (name === 'p192') { + prime = new P192(); + } else if (name === 'p25519') { + prime = new P25519(); + } else { + throw new Error('Unknown prime ' + name); + } + primes[name] = prime; + + return prime; + }; + + // + // Base reduction engine + // + function Red (m) { + if (typeof m === 'string') { + var prime = BN._prime(m); + this.m = prime.p; + this.prime = prime; + } else { + assert(m.gtn(1), 'modulus must be greater than 1'); + this.m = m; + this.prime = null; + } + } + + Red.prototype._verify1 = function _verify1 (a) { + assert(a.negative === 0, 'red works only with positives'); + assert(a.red, 'red works only with red numbers'); + }; + + Red.prototype._verify2 = function _verify2 (a, b) { + assert((a.negative | b.negative) === 0, 'red works only with positives'); + assert(a.red && a.red === b.red, + 'red works only with red numbers'); + }; + + Red.prototype.imod = function imod (a) { + if (this.prime) return this.prime.ireduce(a)._forceRed(this); + return a.umod(this.m)._forceRed(this); + }; + + Red.prototype.neg = function neg (a) { + if (a.isZero()) { + return a.clone(); + } + + return this.m.sub(a)._forceRed(this); + }; + + Red.prototype.add = function add (a, b) { + this._verify2(a, b); + + var res = a.add(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.iadd = function iadd (a, b) { + this._verify2(a, b); + + var res = a.iadd(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res; + }; + + Red.prototype.sub = function sub (a, b) { + this._verify2(a, b); + + var res = a.sub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.isub = function isub (a, b) { + this._verify2(a, b); + + var res = a.isub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res; + }; + + Red.prototype.shl = function shl (a, num) { + this._verify1(a); + return this.imod(a.ushln(num)); + }; + + Red.prototype.imul = function imul (a, b) { + this._verify2(a, b); + return this.imod(a.imul(b)); + }; + + Red.prototype.mul = function mul (a, b) { + this._verify2(a, b); + return this.imod(a.mul(b)); + }; + + Red.prototype.isqr = function isqr (a) { + return this.imul(a, a.clone()); + }; + + Red.prototype.sqr = function sqr (a) { + return this.mul(a, a); + }; + + Red.prototype.sqrt = function sqrt (a) { + if (a.isZero()) return a.clone(); + + var mod3 = this.m.andln(3); + assert(mod3 % 2 === 1); + + // Fast case + if (mod3 === 3) { + var pow = this.m.add(new BN(1)).iushrn(2); + return this.pow(a, pow); + } + + // Tonelli-Shanks algorithm (Totally unoptimized and slow) + // + // Find Q and S, that Q * 2 ^ S = (P - 1) + var q = this.m.subn(1); + var s = 0; + while (!q.isZero() && q.andln(1) === 0) { + s++; + q.iushrn(1); + } + assert(!q.isZero()); + + var one = new BN(1).toRed(this); + var nOne = one.redNeg(); + + // Find quadratic non-residue + // NOTE: Max is such because of generalized Riemann hypothesis. + var lpow = this.m.subn(1).iushrn(1); + var z = this.m.bitLength(); + z = new BN(2 * z * z).toRed(this); + + while (this.pow(z, lpow).cmp(nOne) !== 0) { + z.redIAdd(nOne); + } + + var c = this.pow(z, q); + var r = this.pow(a, q.addn(1).iushrn(1)); + var t = this.pow(a, q); + var m = s; + while (t.cmp(one) !== 0) { + var tmp = t; + for (var i = 0; tmp.cmp(one) !== 0; i++) { + tmp = tmp.redSqr(); + } + assert(i < m); + var b = this.pow(c, new BN(1).iushln(m - i - 1)); + + r = r.redMul(b); + c = b.redSqr(); + t = t.redMul(c); + m = i; + } + + return r; + }; + + Red.prototype.invm = function invm (a) { + var inv = a._invmp(this.m); + if (inv.negative !== 0) { + inv.negative = 0; + return this.imod(inv).redNeg(); + } else { + return this.imod(inv); + } + }; + + Red.prototype.pow = function pow (a, num) { + if (num.isZero()) return new BN(1).toRed(this); + if (num.cmpn(1) === 0) return a.clone(); + + var windowSize = 4; + var wnd = new Array(1 << windowSize); + wnd[0] = new BN(1).toRed(this); + wnd[1] = a; + for (var i = 2; i < wnd.length; i++) { + wnd[i] = this.mul(wnd[i - 1], a); + } + + var res = wnd[0]; + var current = 0; + var currentLen = 0; + var start = num.bitLength() % 26; + if (start === 0) { + start = 26; + } + + for (i = num.length - 1; i >= 0; i--) { + var word = num.words[i]; + for (var j = start - 1; j >= 0; j--) { + var bit = (word >> j) & 1; + if (res !== wnd[0]) { + res = this.sqr(res); + } + + if (bit === 0 && current === 0) { + currentLen = 0; + continue; + } + + current <<= 1; + current |= bit; + currentLen++; + if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; + + res = this.mul(res, wnd[current]); + currentLen = 0; + current = 0; + } + start = 26; + } + + return res; + }; + + Red.prototype.convertTo = function convertTo (num) { + var r = num.umod(this.m); + + return r === num ? r.clone() : r; + }; + + Red.prototype.convertFrom = function convertFrom (num) { + var res = num.clone(); + res.red = null; + return res; + }; + + // + // Montgomery method engine + // + + BN.mont = function mont (num) { + return new Mont(num); + }; + + function Mont (m) { + Red.call(this, m); + + this.shift = this.m.bitLength(); + if (this.shift % 26 !== 0) { + this.shift += 26 - (this.shift % 26); + } + + this.r = new BN(1).iushln(this.shift); + this.r2 = this.imod(this.r.sqr()); + this.rinv = this.r._invmp(this.m); + + this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); + this.minv = this.minv.umod(this.r); + this.minv = this.r.sub(this.minv); + } + inherits(Mont, Red); + + Mont.prototype.convertTo = function convertTo (num) { + return this.imod(num.ushln(this.shift)); + }; + + Mont.prototype.convertFrom = function convertFrom (num) { + var r = this.imod(num.mul(this.rinv)); + r.red = null; + return r; + }; + + Mont.prototype.imul = function imul (a, b) { + if (a.isZero() || b.isZero()) { + a.words[0] = 0; + a.length = 1; + return a; + } + + var t = a.imul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.mul = function mul (a, b) { + if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); + + var t = a.mul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.invm = function invm (a) { + // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R + var res = this.imod(a._invmp(this.m).mul(this.r2)); + return res._forceRed(this); + }; +})(typeof module === 'undefined' || module, this); + +},{"buffer":55}],54:[function(require,module,exports){ +var r; + +module.exports = function rand(len) { + if (!r) + r = new Rand(null); + + return r.generate(len); +}; + +function Rand(rand) { + this.rand = rand; +} +module.exports.Rand = Rand; + +Rand.prototype.generate = function generate(len) { + return this._rand(len); +}; + +// Emulate crypto API using randy +Rand.prototype._rand = function _rand(n) { + if (this.rand.getBytes) + return this.rand.getBytes(n); + + var res = new Uint8Array(n); + for (var i = 0; i < res.length; i++) + res[i] = this.rand.getByte(); + return res; +}; + +if (typeof self === 'object') { + if (self.crypto && self.crypto.getRandomValues) { + // Modern browsers + Rand.prototype._rand = function _rand(n) { + var arr = new Uint8Array(n); + self.crypto.getRandomValues(arr); + return arr; + }; + } else if (self.msCrypto && self.msCrypto.getRandomValues) { + // IE + Rand.prototype._rand = function _rand(n) { + var arr = new Uint8Array(n); + self.msCrypto.getRandomValues(arr); + return arr; + }; + + // Safari's WebWorkers do not have `crypto` + } else if (typeof window === 'object') { + // Old junk + Rand.prototype._rand = function() { + throw new Error('Not implemented yet'); + }; + } +} else { + // Node.js or Web worker with no crypto support + try { + var crypto = require('crypto'); + if (typeof crypto.randomBytes !== 'function') + throw new Error('Not supported'); + + Rand.prototype._rand = function _rand(n) { + return crypto.randomBytes(n); + }; + } catch (e) { + } +} + +},{"crypto":55}],55:[function(require,module,exports){ + +},{}],56:[function(require,module,exports){ +// based on the aes implimentation in triple sec +// https://github.com/keybase/triplesec +// which is in turn based on the one from crypto-js +// https://code.google.com/p/crypto-js/ + +var Buffer = require('safe-buffer').Buffer + +function asUInt32Array (buf) { + if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf) + + var len = (buf.length / 4) | 0 + var out = new Array(len) + + for (var i = 0; i < len; i++) { + out[i] = buf.readUInt32BE(i * 4) + } + + return out +} + +function scrubVec (v) { + for (var i = 0; i < v.length; v++) { + v[i] = 0 + } +} + +function cryptBlock (M, keySchedule, SUB_MIX, SBOX, nRounds) { + var SUB_MIX0 = SUB_MIX[0] + var SUB_MIX1 = SUB_MIX[1] + var SUB_MIX2 = SUB_MIX[2] + var SUB_MIX3 = SUB_MIX[3] + + var s0 = M[0] ^ keySchedule[0] + var s1 = M[1] ^ keySchedule[1] + var s2 = M[2] ^ keySchedule[2] + var s3 = M[3] ^ keySchedule[3] + var t0, t1, t2, t3 + var ksRow = 4 + + for (var round = 1; round < nRounds; round++) { + t0 = SUB_MIX0[s0 >>> 24] ^ SUB_MIX1[(s1 >>> 16) & 0xff] ^ SUB_MIX2[(s2 >>> 8) & 0xff] ^ SUB_MIX3[s3 & 0xff] ^ keySchedule[ksRow++] + t1 = SUB_MIX0[s1 >>> 24] ^ SUB_MIX1[(s2 >>> 16) & 0xff] ^ SUB_MIX2[(s3 >>> 8) & 0xff] ^ SUB_MIX3[s0 & 0xff] ^ keySchedule[ksRow++] + t2 = SUB_MIX0[s2 >>> 24] ^ SUB_MIX1[(s3 >>> 16) & 0xff] ^ SUB_MIX2[(s0 >>> 8) & 0xff] ^ SUB_MIX3[s1 & 0xff] ^ keySchedule[ksRow++] + t3 = SUB_MIX0[s3 >>> 24] ^ SUB_MIX1[(s0 >>> 16) & 0xff] ^ SUB_MIX2[(s1 >>> 8) & 0xff] ^ SUB_MIX3[s2 & 0xff] ^ keySchedule[ksRow++] + s0 = t0 + s1 = t1 + s2 = t2 + s3 = t3 + } + + t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++] + t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++] + t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++] + t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++] + t0 = t0 >>> 0 + t1 = t1 >>> 0 + t2 = t2 >>> 0 + t3 = t3 >>> 0 + + return [t0, t1, t2, t3] +} + +// AES constants +var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36] +var G = (function () { + // Compute double table + var d = new Array(256) + for (var j = 0; j < 256; j++) { + if (j < 128) { + d[j] = j << 1 + } else { + d[j] = (j << 1) ^ 0x11b + } + } + + var SBOX = [] + var INV_SBOX = [] + var SUB_MIX = [[], [], [], []] + var INV_SUB_MIX = [[], [], [], []] + + // Walk GF(2^8) + var x = 0 + var xi = 0 + for (var i = 0; i < 256; ++i) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4) + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63 + SBOX[x] = sx + INV_SBOX[sx] = x + + // Compute multiplication + var x2 = d[x] + var x4 = d[x2] + var x8 = d[x4] + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100) + SUB_MIX[0][x] = (t << 24) | (t >>> 8) + SUB_MIX[1][x] = (t << 16) | (t >>> 16) + SUB_MIX[2][x] = (t << 8) | (t >>> 24) + SUB_MIX[3][x] = t + + // Compute inv sub bytes, inv mix columns tables + t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100) + INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8) + INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16) + INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24) + INV_SUB_MIX[3][sx] = t + + if (x === 0) { + x = xi = 1 + } else { + x = x2 ^ d[d[d[x8 ^ x2]]] + xi ^= d[d[xi]] + } + } + + return { + SBOX: SBOX, + INV_SBOX: INV_SBOX, + SUB_MIX: SUB_MIX, + INV_SUB_MIX: INV_SUB_MIX + } +})() + +function AES (key) { + this._key = asUInt32Array(key) + this._reset() +} + +AES.blockSize = 4 * 4 +AES.keySize = 256 / 8 +AES.prototype.blockSize = AES.blockSize +AES.prototype.keySize = AES.keySize +AES.prototype._reset = function () { + var keyWords = this._key + var keySize = keyWords.length + var nRounds = keySize + 6 + var ksRows = (nRounds + 1) * 4 + + var keySchedule = [] + for (var k = 0; k < keySize; k++) { + keySchedule[k] = keyWords[k] + } + + for (k = keySize; k < ksRows; k++) { + var t = keySchedule[k - 1] + + if (k % keySize === 0) { + t = (t << 8) | (t >>> 24) + t = + (G.SBOX[t >>> 24] << 24) | + (G.SBOX[(t >>> 16) & 0xff] << 16) | + (G.SBOX[(t >>> 8) & 0xff] << 8) | + (G.SBOX[t & 0xff]) + + t ^= RCON[(k / keySize) | 0] << 24 + } else if (keySize > 6 && k % keySize === 4) { + t = + (G.SBOX[t >>> 24] << 24) | + (G.SBOX[(t >>> 16) & 0xff] << 16) | + (G.SBOX[(t >>> 8) & 0xff] << 8) | + (G.SBOX[t & 0xff]) + } + + keySchedule[k] = keySchedule[k - keySize] ^ t + } + + var invKeySchedule = [] + for (var ik = 0; ik < ksRows; ik++) { + var ksR = ksRows - ik + var tt = keySchedule[ksR - (ik % 4 ? 0 : 4)] + + if (ik < 4 || ksR <= 4) { + invKeySchedule[ik] = tt + } else { + invKeySchedule[ik] = + G.INV_SUB_MIX[0][G.SBOX[tt >>> 24]] ^ + G.INV_SUB_MIX[1][G.SBOX[(tt >>> 16) & 0xff]] ^ + G.INV_SUB_MIX[2][G.SBOX[(tt >>> 8) & 0xff]] ^ + G.INV_SUB_MIX[3][G.SBOX[tt & 0xff]] + } + } + + this._nRounds = nRounds + this._keySchedule = keySchedule + this._invKeySchedule = invKeySchedule +} + +AES.prototype.encryptBlockRaw = function (M) { + M = asUInt32Array(M) + return cryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds) +} + +AES.prototype.encryptBlock = function (M) { + var out = this.encryptBlockRaw(M) + var buf = Buffer.allocUnsafe(16) + buf.writeUInt32BE(out[0], 0) + buf.writeUInt32BE(out[1], 4) + buf.writeUInt32BE(out[2], 8) + buf.writeUInt32BE(out[3], 12) + return buf +} + +AES.prototype.decryptBlock = function (M) { + M = asUInt32Array(M) + + // swap + var m1 = M[1] + M[1] = M[3] + M[3] = m1 + + var out = cryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds) + var buf = Buffer.allocUnsafe(16) + buf.writeUInt32BE(out[0], 0) + buf.writeUInt32BE(out[3], 4) + buf.writeUInt32BE(out[2], 8) + buf.writeUInt32BE(out[1], 12) + return buf +} + +AES.prototype.scrub = function () { + scrubVec(this._keySchedule) + scrubVec(this._invKeySchedule) + scrubVec(this._key) +} + +module.exports.AES = AES + +},{"safe-buffer":290}],57:[function(require,module,exports){ +var aes = require('./aes') +var Buffer = require('safe-buffer').Buffer +var Transform = require('cipher-base') +var inherits = require('inherits') +var GHASH = require('./ghash') +var xor = require('buffer-xor') +var incr32 = require('./incr32') + +function xorTest (a, b) { + var out = 0 + if (a.length !== b.length) out++ + + var len = Math.min(a.length, b.length) + for (var i = 0; i < len; ++i) { + out += (a[i] ^ b[i]) + } + + return out +} + +function calcIv (self, iv, ck) { + if (iv.length === 12) { + self._finID = Buffer.concat([iv, Buffer.from([0, 0, 0, 1])]) + return Buffer.concat([iv, Buffer.from([0, 0, 0, 2])]) + } + var ghash = new GHASH(ck) + var len = iv.length + var toPad = len % 16 + ghash.update(iv) + if (toPad) { + toPad = 16 - toPad + ghash.update(Buffer.alloc(toPad, 0)) + } + ghash.update(Buffer.alloc(8, 0)) + var ivBits = len * 8 + var tail = Buffer.alloc(8) + tail.writeUIntBE(ivBits, 0, 8) + ghash.update(tail) + self._finID = ghash.state + var out = Buffer.from(self._finID) + incr32(out) + return out +} +function StreamCipher (mode, key, iv, decrypt) { + Transform.call(this) + + var h = Buffer.alloc(4, 0) + + this._cipher = new aes.AES(key) + var ck = this._cipher.encryptBlock(h) + this._ghash = new GHASH(ck) + iv = calcIv(this, iv, ck) + + this._prev = Buffer.from(iv) + this._cache = Buffer.allocUnsafe(0) + this._secCache = Buffer.allocUnsafe(0) + this._decrypt = decrypt + this._alen = 0 + this._len = 0 + this._mode = mode + + this._authTag = null + this._called = false +} + +inherits(StreamCipher, Transform) + +StreamCipher.prototype._update = function (chunk) { + if (!this._called && this._alen) { + var rump = 16 - (this._alen % 16) + if (rump < 16) { + rump = Buffer.alloc(rump, 0) + this._ghash.update(rump) + } + } + + this._called = true + var out = this._mode.encrypt(this, chunk) + if (this._decrypt) { + this._ghash.update(chunk) + } else { + this._ghash.update(out) + } + this._len += chunk.length + return out +} + +StreamCipher.prototype._final = function () { + if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data') + + var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID)) + if (this._decrypt && xorTest(tag, this._authTag)) throw new Error('Unsupported state or unable to authenticate data') + + this._authTag = tag + this._cipher.scrub() +} + +StreamCipher.prototype.getAuthTag = function getAuthTag () { + if (this._decrypt || !Buffer.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state') + + return this._authTag +} + +StreamCipher.prototype.setAuthTag = function setAuthTag (tag) { + if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state') + + this._authTag = tag +} + +StreamCipher.prototype.setAAD = function setAAD (buf) { + if (this._called) throw new Error('Attempting to set AAD in unsupported state') + + this._ghash.update(buf) + this._alen += buf.length +} + +module.exports = StreamCipher + +},{"./aes":56,"./ghash":61,"./incr32":62,"buffer-xor":83,"cipher-base":86,"inherits":180,"safe-buffer":290}],58:[function(require,module,exports){ +var ciphers = require('./encrypter') +var deciphers = require('./decrypter') +var modes = require('./modes/list.json') + +function getCiphers () { + return Object.keys(modes) +} + +exports.createCipher = exports.Cipher = ciphers.createCipher +exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv +exports.createDecipher = exports.Decipher = deciphers.createDecipher +exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv +exports.listCiphers = exports.getCiphers = getCiphers + +},{"./decrypter":59,"./encrypter":60,"./modes/list.json":70}],59:[function(require,module,exports){ +var AuthCipher = require('./authCipher') +var Buffer = require('safe-buffer').Buffer +var MODES = require('./modes') +var StreamCipher = require('./streamCipher') +var Transform = require('cipher-base') +var aes = require('./aes') +var ebtk = require('evp_bytestokey') +var inherits = require('inherits') + +function Decipher (mode, key, iv) { + Transform.call(this) + + this._cache = new Splitter() + this._last = void 0 + this._cipher = new aes.AES(key) + this._prev = Buffer.from(iv) + this._mode = mode + this._autopadding = true +} + +inherits(Decipher, Transform) + +Decipher.prototype._update = function (data) { + this._cache.add(data) + var chunk + var thing + var out = [] + while ((chunk = this._cache.get(this._autopadding))) { + thing = this._mode.decrypt(this, chunk) + out.push(thing) + } + return Buffer.concat(out) +} + +Decipher.prototype._final = function () { + var chunk = this._cache.flush() + if (this._autopadding) { + return unpad(this._mode.decrypt(this, chunk)) + } else if (chunk) { + throw new Error('data not multiple of block length') + } +} + +Decipher.prototype.setAutoPadding = function (setTo) { + this._autopadding = !!setTo + return this +} + +function Splitter () { + this.cache = Buffer.allocUnsafe(0) +} + +Splitter.prototype.add = function (data) { + this.cache = Buffer.concat([this.cache, data]) +} + +Splitter.prototype.get = function (autoPadding) { + var out + if (autoPadding) { + if (this.cache.length > 16) { + out = this.cache.slice(0, 16) + this.cache = this.cache.slice(16) + return out + } + } else { + if (this.cache.length >= 16) { + out = this.cache.slice(0, 16) + this.cache = this.cache.slice(16) + return out + } + } + + return null +} + +Splitter.prototype.flush = function () { + if (this.cache.length) return this.cache +} + +function unpad (last) { + var padded = last[15] + var i = -1 + while (++i < padded) { + if (last[(i + (16 - padded))] !== padded) { + throw new Error('unable to decrypt data') + } + } + if (padded === 16) return + + return last.slice(0, 16 - padded) +} + +function createDecipheriv (suite, password, iv) { + var config = MODES[suite.toLowerCase()] + if (!config) throw new TypeError('invalid suite type') + + if (typeof iv === 'string') iv = Buffer.from(iv) + if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length) + + if (typeof password === 'string') password = Buffer.from(password) + if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length) + + if (config.type === 'stream') { + return new StreamCipher(config.module, password, iv, true) + } else if (config.type === 'auth') { + return new AuthCipher(config.module, password, iv, true) + } + + return new Decipher(config.module, password, iv) +} + +function createDecipher (suite, password) { + var config = MODES[suite.toLowerCase()] + if (!config) throw new TypeError('invalid suite type') + + var keys = ebtk(password, false, config.key, config.iv) + return createDecipheriv(suite, keys.key, keys.iv) +} + +exports.createDecipher = createDecipher +exports.createDecipheriv = createDecipheriv + +},{"./aes":56,"./authCipher":57,"./modes":69,"./streamCipher":72,"cipher-base":86,"evp_bytestokey":158,"inherits":180,"safe-buffer":290}],60:[function(require,module,exports){ +var MODES = require('./modes') +var AuthCipher = require('./authCipher') +var Buffer = require('safe-buffer').Buffer +var StreamCipher = require('./streamCipher') +var Transform = require('cipher-base') +var aes = require('./aes') +var ebtk = require('evp_bytestokey') +var inherits = require('inherits') + +function Cipher (mode, key, iv) { + Transform.call(this) + + this._cache = new Splitter() + this._cipher = new aes.AES(key) + this._prev = Buffer.from(iv) + this._mode = mode + this._autopadding = true +} + +inherits(Cipher, Transform) + +Cipher.prototype._update = function (data) { + this._cache.add(data) + var chunk + var thing + var out = [] + + while ((chunk = this._cache.get())) { + thing = this._mode.encrypt(this, chunk) + out.push(thing) + } + + return Buffer.concat(out) +} + +var PADDING = Buffer.alloc(16, 0x10) + +Cipher.prototype._final = function () { + var chunk = this._cache.flush() + if (this._autopadding) { + chunk = this._mode.encrypt(this, chunk) + this._cipher.scrub() + return chunk + } + + if (!chunk.equals(PADDING)) { + this._cipher.scrub() + throw new Error('data not multiple of block length') + } +} + +Cipher.prototype.setAutoPadding = function (setTo) { + this._autopadding = !!setTo + return this +} + +function Splitter () { + this.cache = Buffer.allocUnsafe(0) +} + +Splitter.prototype.add = function (data) { + this.cache = Buffer.concat([this.cache, data]) +} + +Splitter.prototype.get = function () { + if (this.cache.length > 15) { + var out = this.cache.slice(0, 16) + this.cache = this.cache.slice(16) + return out + } + return null +} + +Splitter.prototype.flush = function () { + var len = 16 - this.cache.length + var padBuff = Buffer.allocUnsafe(len) + + var i = -1 + while (++i < len) { + padBuff.writeUInt8(len, i) + } + + return Buffer.concat([this.cache, padBuff]) +} + +function createCipheriv (suite, password, iv) { + var config = MODES[suite.toLowerCase()] + if (!config) throw new TypeError('invalid suite type') + + if (typeof password === 'string') password = Buffer.from(password) + if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length) + + if (typeof iv === 'string') iv = Buffer.from(iv) + if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length) + + if (config.type === 'stream') { + return new StreamCipher(config.module, password, iv) + } else if (config.type === 'auth') { + return new AuthCipher(config.module, password, iv) + } + + return new Cipher(config.module, password, iv) +} + +function createCipher (suite, password) { + var config = MODES[suite.toLowerCase()] + if (!config) throw new TypeError('invalid suite type') + + var keys = ebtk(password, false, config.key, config.iv) + return createCipheriv(suite, keys.key, keys.iv) +} + +exports.createCipheriv = createCipheriv +exports.createCipher = createCipher + +},{"./aes":56,"./authCipher":57,"./modes":69,"./streamCipher":72,"cipher-base":86,"evp_bytestokey":158,"inherits":180,"safe-buffer":290}],61:[function(require,module,exports){ +var Buffer = require('safe-buffer').Buffer +var ZEROES = Buffer.alloc(16, 0) + +function toArray (buf) { + return [ + buf.readUInt32BE(0), + buf.readUInt32BE(4), + buf.readUInt32BE(8), + buf.readUInt32BE(12) + ] +} + +function fromArray (out) { + var buf = Buffer.allocUnsafe(16) + buf.writeUInt32BE(out[0] >>> 0, 0) + buf.writeUInt32BE(out[1] >>> 0, 4) + buf.writeUInt32BE(out[2] >>> 0, 8) + buf.writeUInt32BE(out[3] >>> 0, 12) + return buf +} + +function GHASH (key) { + this.h = key + this.state = Buffer.alloc(16, 0) + this.cache = Buffer.allocUnsafe(0) +} + +// from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html +// by Juho Vähä-Herttua +GHASH.prototype.ghash = function (block) { + var i = -1 + while (++i < block.length) { + this.state[i] ^= block[i] + } + this._multiply() +} + +GHASH.prototype._multiply = function () { + var Vi = toArray(this.h) + var Zi = [0, 0, 0, 0] + var j, xi, lsbVi + var i = -1 + while (++i < 128) { + xi = (this.state[~~(i / 8)] & (1 << (7 - (i % 8)))) !== 0 + if (xi) { + // Z_i+1 = Z_i ^ V_i + Zi[0] ^= Vi[0] + Zi[1] ^= Vi[1] + Zi[2] ^= Vi[2] + Zi[3] ^= Vi[3] + } + + // Store the value of LSB(V_i) + lsbVi = (Vi[3] & 1) !== 0 + + // V_i+1 = V_i >> 1 + for (j = 3; j > 0; j--) { + Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31) + } + Vi[0] = Vi[0] >>> 1 + + // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R + if (lsbVi) { + Vi[0] = Vi[0] ^ (0xe1 << 24) + } + } + this.state = fromArray(Zi) +} + +GHASH.prototype.update = function (buf) { + this.cache = Buffer.concat([this.cache, buf]) + var chunk + while (this.cache.length >= 16) { + chunk = this.cache.slice(0, 16) + this.cache = this.cache.slice(16) + this.ghash(chunk) + } +} + +GHASH.prototype.final = function (abl, bl) { + if (this.cache.length) { + this.ghash(Buffer.concat([this.cache, ZEROES], 16)) + } + + this.ghash(fromArray([0, abl, 0, bl])) + return this.state +} + +module.exports = GHASH + +},{"safe-buffer":290}],62:[function(require,module,exports){ +function incr32 (iv) { + var len = iv.length + var item + while (len--) { + item = iv.readUInt8(len) + if (item === 255) { + iv.writeUInt8(0, len) + } else { + item++ + iv.writeUInt8(item, len) + break + } + } +} +module.exports = incr32 + +},{}],63:[function(require,module,exports){ +var xor = require('buffer-xor') + +exports.encrypt = function (self, block) { + var data = xor(block, self._prev) + + self._prev = self._cipher.encryptBlock(data) + return self._prev +} + +exports.decrypt = function (self, block) { + var pad = self._prev + + self._prev = block + var out = self._cipher.decryptBlock(block) + + return xor(out, pad) +} + +},{"buffer-xor":83}],64:[function(require,module,exports){ +var Buffer = require('safe-buffer').Buffer +var xor = require('buffer-xor') + +function encryptStart (self, data, decrypt) { + var len = data.length + var out = xor(data, self._cache) + self._cache = self._cache.slice(len) + self._prev = Buffer.concat([self._prev, decrypt ? data : out]) + return out +} + +exports.encrypt = function (self, data, decrypt) { + var out = Buffer.allocUnsafe(0) + var len + + while (data.length) { + if (self._cache.length === 0) { + self._cache = self._cipher.encryptBlock(self._prev) + self._prev = Buffer.allocUnsafe(0) + } + + if (self._cache.length <= data.length) { + len = self._cache.length + out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)]) + data = data.slice(len) + } else { + out = Buffer.concat([out, encryptStart(self, data, decrypt)]) + break + } + } + + return out +} + +},{"buffer-xor":83,"safe-buffer":290}],65:[function(require,module,exports){ +var Buffer = require('safe-buffer').Buffer + +function encryptByte (self, byteParam, decrypt) { + var pad + var i = -1 + var len = 8 + var out = 0 + var bit, value + while (++i < len) { + pad = self._cipher.encryptBlock(self._prev) + bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0 + value = pad[0] ^ bit + out += ((value & 0x80) >> (i % 8)) + self._prev = shiftIn(self._prev, decrypt ? bit : value) + } + return out +} + +function shiftIn (buffer, value) { + var len = buffer.length + var i = -1 + var out = Buffer.allocUnsafe(buffer.length) + buffer = Buffer.concat([buffer, Buffer.from([value])]) + + while (++i < len) { + out[i] = buffer[i] << 1 | buffer[i + 1] >> (7) + } + + return out +} + +exports.encrypt = function (self, chunk, decrypt) { + var len = chunk.length + var out = Buffer.allocUnsafe(len) + var i = -1 + + while (++i < len) { + out[i] = encryptByte(self, chunk[i], decrypt) + } + + return out +} + +},{"safe-buffer":290}],66:[function(require,module,exports){ +var Buffer = require('safe-buffer').Buffer + +function encryptByte (self, byteParam, decrypt) { + var pad = self._cipher.encryptBlock(self._prev) + var out = pad[0] ^ byteParam + + self._prev = Buffer.concat([ + self._prev.slice(1), + Buffer.from([decrypt ? byteParam : out]) + ]) + + return out +} + +exports.encrypt = function (self, chunk, decrypt) { + var len = chunk.length + var out = Buffer.allocUnsafe(len) + var i = -1 + + while (++i < len) { + out[i] = encryptByte(self, chunk[i], decrypt) + } + + return out +} + +},{"safe-buffer":290}],67:[function(require,module,exports){ +var xor = require('buffer-xor') +var Buffer = require('safe-buffer').Buffer +var incr32 = require('../incr32') + +function getBlock (self) { + var out = self._cipher.encryptBlockRaw(self._prev) + incr32(self._prev) + return out +} + +var blockSize = 16 +exports.encrypt = function (self, chunk) { + var chunkNum = Math.ceil(chunk.length / blockSize) + var start = self._cache.length + self._cache = Buffer.concat([ + self._cache, + Buffer.allocUnsafe(chunkNum * blockSize) + ]) + for (var i = 0; i < chunkNum; i++) { + var out = getBlock(self) + var offset = start + i * blockSize + self._cache.writeUInt32BE(out[0], offset + 0) + self._cache.writeUInt32BE(out[1], offset + 4) + self._cache.writeUInt32BE(out[2], offset + 8) + self._cache.writeUInt32BE(out[3], offset + 12) + } + var pad = self._cache.slice(0, chunk.length) + self._cache = self._cache.slice(chunk.length) + return xor(chunk, pad) +} + +},{"../incr32":62,"buffer-xor":83,"safe-buffer":290}],68:[function(require,module,exports){ +exports.encrypt = function (self, block) { + return self._cipher.encryptBlock(block) +} + +exports.decrypt = function (self, block) { + return self._cipher.decryptBlock(block) +} + +},{}],69:[function(require,module,exports){ +var modeModules = { + ECB: require('./ecb'), + CBC: require('./cbc'), + CFB: require('./cfb'), + CFB8: require('./cfb8'), + CFB1: require('./cfb1'), + OFB: require('./ofb'), + CTR: require('./ctr'), + GCM: require('./ctr') +} + +var modes = require('./list.json') + +for (var key in modes) { + modes[key].module = modeModules[modes[key].mode] +} + +module.exports = modes + +},{"./cbc":63,"./cfb":64,"./cfb1":65,"./cfb8":66,"./ctr":67,"./ecb":68,"./list.json":70,"./ofb":71}],70:[function(require,module,exports){ +module.exports={ + "aes-128-ecb": { + "cipher": "AES", + "key": 128, + "iv": 0, + "mode": "ECB", + "type": "block" + }, + "aes-192-ecb": { + "cipher": "AES", + "key": 192, + "iv": 0, + "mode": "ECB", + "type": "block" + }, + "aes-256-ecb": { + "cipher": "AES", + "key": 256, + "iv": 0, + "mode": "ECB", + "type": "block" + }, + "aes-128-cbc": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "CBC", + "type": "block" + }, + "aes-192-cbc": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "CBC", + "type": "block" + }, + "aes-256-cbc": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "CBC", + "type": "block" + }, + "aes128": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "CBC", + "type": "block" + }, + "aes192": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "CBC", + "type": "block" + }, + "aes256": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "CBC", + "type": "block" + }, + "aes-128-cfb": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "CFB", + "type": "stream" + }, + "aes-192-cfb": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "CFB", + "type": "stream" + }, + "aes-256-cfb": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "CFB", + "type": "stream" + }, + "aes-128-cfb8": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "CFB8", + "type": "stream" + }, + "aes-192-cfb8": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "CFB8", + "type": "stream" + }, + "aes-256-cfb8": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "CFB8", + "type": "stream" + }, + "aes-128-cfb1": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "CFB1", + "type": "stream" + }, + "aes-192-cfb1": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "CFB1", + "type": "stream" + }, + "aes-256-cfb1": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "CFB1", + "type": "stream" + }, + "aes-128-ofb": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "OFB", + "type": "stream" + }, + "aes-192-ofb": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "OFB", + "type": "stream" + }, + "aes-256-ofb": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "OFB", + "type": "stream" + }, + "aes-128-ctr": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "CTR", + "type": "stream" + }, + "aes-192-ctr": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "CTR", + "type": "stream" + }, + "aes-256-ctr": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "CTR", + "type": "stream" + }, + "aes-128-gcm": { + "cipher": "AES", + "key": 128, + "iv": 12, + "mode": "GCM", + "type": "auth" + }, + "aes-192-gcm": { + "cipher": "AES", + "key": 192, + "iv": 12, + "mode": "GCM", + "type": "auth" + }, + "aes-256-gcm": { + "cipher": "AES", + "key": 256, + "iv": 12, + "mode": "GCM", + "type": "auth" + } +} + +},{}],71:[function(require,module,exports){ +(function (Buffer){ +var xor = require('buffer-xor') + +function getBlock (self) { + self._prev = self._cipher.encryptBlock(self._prev) + return self._prev +} + +exports.encrypt = function (self, chunk) { + while (self._cache.length < chunk.length) { + self._cache = Buffer.concat([self._cache, getBlock(self)]) + } + + var pad = self._cache.slice(0, chunk.length) + self._cache = self._cache.slice(chunk.length) + return xor(chunk, pad) +} + +}).call(this,require("buffer").Buffer) +},{"buffer":84,"buffer-xor":83}],72:[function(require,module,exports){ +var aes = require('./aes') +var Buffer = require('safe-buffer').Buffer +var Transform = require('cipher-base') +var inherits = require('inherits') + +function StreamCipher (mode, key, iv, decrypt) { + Transform.call(this) + + this._cipher = new aes.AES(key) + this._prev = Buffer.from(iv) + this._cache = Buffer.allocUnsafe(0) + this._secCache = Buffer.allocUnsafe(0) + this._decrypt = decrypt + this._mode = mode +} + +inherits(StreamCipher, Transform) + +StreamCipher.prototype._update = function (chunk) { + return this._mode.encrypt(this, chunk, this._decrypt) +} + +StreamCipher.prototype._final = function () { + this._cipher.scrub() +} + +module.exports = StreamCipher + +},{"./aes":56,"cipher-base":86,"inherits":180,"safe-buffer":290}],73:[function(require,module,exports){ +var ebtk = require('evp_bytestokey') +var aes = require('browserify-aes/browser') +var DES = require('browserify-des') +var desModes = require('browserify-des/modes') +var aesModes = require('browserify-aes/modes') +function createCipher (suite, password) { + var keyLen, ivLen + suite = suite.toLowerCase() + if (aesModes[suite]) { + keyLen = aesModes[suite].key + ivLen = aesModes[suite].iv + } else if (desModes[suite]) { + keyLen = desModes[suite].key * 8 + ivLen = desModes[suite].iv + } else { + throw new TypeError('invalid suite type') + } + var keys = ebtk(password, false, keyLen, ivLen) + return createCipheriv(suite, keys.key, keys.iv) +} +function createDecipher (suite, password) { + var keyLen, ivLen + suite = suite.toLowerCase() + if (aesModes[suite]) { + keyLen = aesModes[suite].key + ivLen = aesModes[suite].iv + } else if (desModes[suite]) { + keyLen = desModes[suite].key * 8 + ivLen = desModes[suite].iv + } else { + throw new TypeError('invalid suite type') + } + var keys = ebtk(password, false, keyLen, ivLen) + return createDecipheriv(suite, keys.key, keys.iv) +} + +function createCipheriv (suite, key, iv) { + suite = suite.toLowerCase() + if (aesModes[suite]) { + return aes.createCipheriv(suite, key, iv) + } else if (desModes[suite]) { + return new DES({ + key: key, + iv: iv, + mode: suite + }) + } else { + throw new TypeError('invalid suite type') + } +} +function createDecipheriv (suite, key, iv) { + suite = suite.toLowerCase() + if (aesModes[suite]) { + return aes.createDecipheriv(suite, key, iv) + } else if (desModes[suite]) { + return new DES({ + key: key, + iv: iv, + mode: suite, + decrypt: true + }) + } else { + throw new TypeError('invalid suite type') + } +} +exports.createCipher = exports.Cipher = createCipher +exports.createCipheriv = exports.Cipheriv = createCipheriv +exports.createDecipher = exports.Decipher = createDecipher +exports.createDecipheriv = exports.Decipheriv = createDecipheriv +function getCiphers () { + return Object.keys(desModes).concat(aes.getCiphers()) +} +exports.listCiphers = exports.getCiphers = getCiphers + +},{"browserify-aes/browser":58,"browserify-aes/modes":69,"browserify-des":74,"browserify-des/modes":75,"evp_bytestokey":158}],74:[function(require,module,exports){ +(function (Buffer){ +var CipherBase = require('cipher-base') +var des = require('des.js') +var inherits = require('inherits') + +var modes = { + 'des-ede3-cbc': des.CBC.instantiate(des.EDE), + 'des-ede3': des.EDE, + 'des-ede-cbc': des.CBC.instantiate(des.EDE), + 'des-ede': des.EDE, + 'des-cbc': des.CBC.instantiate(des.DES), + 'des-ecb': des.DES +} +modes.des = modes['des-cbc'] +modes.des3 = modes['des-ede3-cbc'] +module.exports = DES +inherits(DES, CipherBase) +function DES (opts) { + CipherBase.call(this) + var modeName = opts.mode.toLowerCase() + var mode = modes[modeName] + var type + if (opts.decrypt) { + type = 'decrypt' + } else { + type = 'encrypt' + } + var key = opts.key + if (modeName === 'des-ede' || modeName === 'des-ede-cbc') { + key = Buffer.concat([key, key.slice(0, 8)]) + } + var iv = opts.iv + this._des = mode.create({ + key: key, + iv: iv, + type: type + }) +} +DES.prototype._update = function (data) { + return new Buffer(this._des.update(data)) +} +DES.prototype._final = function () { + return new Buffer(this._des.final()) +} + +}).call(this,require("buffer").Buffer) +},{"buffer":84,"cipher-base":86,"des.js":99,"inherits":180}],75:[function(require,module,exports){ +exports['des-ecb'] = { + key: 8, + iv: 0 +} +exports['des-cbc'] = exports.des = { + key: 8, + iv: 8 +} +exports['des-ede3-cbc'] = exports.des3 = { + key: 24, + iv: 8 +} +exports['des-ede3'] = { + key: 24, + iv: 0 +} +exports['des-ede-cbc'] = { + key: 16, + iv: 8 +} +exports['des-ede'] = { + key: 16, + iv: 0 +} + +},{}],76:[function(require,module,exports){ +(function (Buffer){ +var bn = require('bn.js'); +var randomBytes = require('randombytes'); +module.exports = crt; +function blind(priv) { + var r = getr(priv); + var blinder = r.toRed(bn.mont(priv.modulus)) + .redPow(new bn(priv.publicExponent)).fromRed(); + return { + blinder: blinder, + unblinder:r.invm(priv.modulus) + }; +} +function crt(msg, priv) { + var blinds = blind(priv); + var len = priv.modulus.byteLength(); + var mod = bn.mont(priv.modulus); + var blinded = new bn(msg).mul(blinds.blinder).umod(priv.modulus); + var c1 = blinded.toRed(bn.mont(priv.prime1)); + var c2 = blinded.toRed(bn.mont(priv.prime2)); + var qinv = priv.coefficient; + var p = priv.prime1; + var q = priv.prime2; + var m1 = c1.redPow(priv.exponent1); + var m2 = c2.redPow(priv.exponent2); + m1 = m1.fromRed(); + m2 = m2.fromRed(); + var h = m1.isub(m2).imul(qinv).umod(p); + h.imul(q); + m2.iadd(h); + return new Buffer(m2.imul(blinds.unblinder).umod(priv.modulus).toArray(false, len)); +} +crt.getr = getr; +function getr(priv) { + var len = priv.modulus.byteLength(); + var r = new bn(randomBytes(len)); + while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2)) { + r = new bn(randomBytes(len)); + } + return r; +} + +}).call(this,require("buffer").Buffer) +},{"bn.js":53,"buffer":84,"randombytes":270}],77:[function(require,module,exports){ +module.exports = require('./browser/algorithms.json') + +},{"./browser/algorithms.json":78}],78:[function(require,module,exports){ +module.exports={ + "sha224WithRSAEncryption": { + "sign": "rsa", + "hash": "sha224", + "id": "302d300d06096086480165030402040500041c" + }, + "RSA-SHA224": { + "sign": "ecdsa/rsa", + "hash": "sha224", + "id": "302d300d06096086480165030402040500041c" + }, + "sha256WithRSAEncryption": { + "sign": "rsa", + "hash": "sha256", + "id": "3031300d060960864801650304020105000420" + }, + "RSA-SHA256": { + "sign": "ecdsa/rsa", + "hash": "sha256", + "id": "3031300d060960864801650304020105000420" + }, + "sha384WithRSAEncryption": { + "sign": "rsa", + "hash": "sha384", + "id": "3041300d060960864801650304020205000430" + }, + "RSA-SHA384": { + "sign": "ecdsa/rsa", + "hash": "sha384", + "id": "3041300d060960864801650304020205000430" + }, + "sha512WithRSAEncryption": { + "sign": "rsa", + "hash": "sha512", + "id": "3051300d060960864801650304020305000440" + }, + "RSA-SHA512": { + "sign": "ecdsa/rsa", + "hash": "sha512", + "id": "3051300d060960864801650304020305000440" + }, + "RSA-SHA1": { + "sign": "rsa", + "hash": "sha1", + "id": "3021300906052b0e03021a05000414" + }, + "ecdsa-with-SHA1": { + "sign": "ecdsa", + "hash": "sha1", + "id": "" + }, + "sha256": { + "sign": "ecdsa", + "hash": "sha256", + "id": "" + }, + "sha224": { + "sign": "ecdsa", + "hash": "sha224", + "id": "" + }, + "sha384": { + "sign": "ecdsa", + "hash": "sha384", + "id": "" + }, + "sha512": { + "sign": "ecdsa", + "hash": "sha512", + "id": "" + }, + "DSA-SHA": { + "sign": "dsa", + "hash": "sha1", + "id": "" + }, + "DSA-SHA1": { + "sign": "dsa", + "hash": "sha1", + "id": "" + }, + "DSA": { + "sign": "dsa", + "hash": "sha1", + "id": "" + }, + "DSA-WITH-SHA224": { + "sign": "dsa", + "hash": "sha224", + "id": "" + }, + "DSA-SHA224": { + "sign": "dsa", + "hash": "sha224", + "id": "" + }, + "DSA-WITH-SHA256": { + "sign": "dsa", + "hash": "sha256", + "id": "" + }, + "DSA-SHA256": { + "sign": "dsa", + "hash": "sha256", + "id": "" + }, + "DSA-WITH-SHA384": { + "sign": "dsa", + "hash": "sha384", + "id": "" + }, + "DSA-SHA384": { + "sign": "dsa", + "hash": "sha384", + "id": "" + }, + "DSA-WITH-SHA512": { + "sign": "dsa", + "hash": "sha512", + "id": "" + }, + "DSA-SHA512": { + "sign": "dsa", + "hash": "sha512", + "id": "" + }, + "DSA-RIPEMD160": { + "sign": "dsa", + "hash": "rmd160", + "id": "" + }, + "ripemd160WithRSA": { + "sign": "rsa", + "hash": "rmd160", + "id": "3021300906052b2403020105000414" + }, + "RSA-RIPEMD160": { + "sign": "rsa", + "hash": "rmd160", + "id": "3021300906052b2403020105000414" + }, + "md5WithRSAEncryption": { + "sign": "rsa", + "hash": "md5", + "id": "3020300c06082a864886f70d020505000410" + }, + "RSA-MD5": { + "sign": "rsa", + "hash": "md5", + "id": "3020300c06082a864886f70d020505000410" + } +} + +},{}],79:[function(require,module,exports){ +module.exports={ + "1.3.132.0.10": "secp256k1", + "1.3.132.0.33": "p224", + "1.2.840.10045.3.1.1": "p192", + "1.2.840.10045.3.1.7": "p256", + "1.3.132.0.34": "p384", + "1.3.132.0.35": "p521" +} + +},{}],80:[function(require,module,exports){ +(function (Buffer){ +var createHash = require('create-hash') +var stream = require('stream') +var inherits = require('inherits') +var sign = require('./sign') +var verify = require('./verify') + +var algorithms = require('./algorithms.json') +Object.keys(algorithms).forEach(function (key) { + algorithms[key].id = new Buffer(algorithms[key].id, 'hex') + algorithms[key.toLowerCase()] = algorithms[key] +}) + +function Sign (algorithm) { + stream.Writable.call(this) + + var data = algorithms[algorithm] + if (!data) throw new Error('Unknown message digest') + + this._hashType = data.hash + this._hash = createHash(data.hash) + this._tag = data.id + this._signType = data.sign +} +inherits(Sign, stream.Writable) + +Sign.prototype._write = function _write (data, _, done) { + this._hash.update(data) + done() +} + +Sign.prototype.update = function update (data, enc) { + if (typeof data === 'string') data = new Buffer(data, enc) + + this._hash.update(data) + return this +} + +Sign.prototype.sign = function signMethod (key, enc) { + this.end() + var hash = this._hash.digest() + var sig = sign(hash, key, this._hashType, this._signType, this._tag) + + return enc ? sig.toString(enc) : sig +} + +function Verify (algorithm) { + stream.Writable.call(this) + + var data = algorithms[algorithm] + if (!data) throw new Error('Unknown message digest') + + this._hash = createHash(data.hash) + this._tag = data.id + this._signType = data.sign +} +inherits(Verify, stream.Writable) + +Verify.prototype._write = function _write (data, _, done) { + this._hash.update(data) + done() +} + +Verify.prototype.update = function update (data, enc) { + if (typeof data === 'string') data = new Buffer(data, enc) + + this._hash.update(data) + return this +} + +Verify.prototype.verify = function verifyMethod (key, sig, enc) { + if (typeof sig === 'string') sig = new Buffer(sig, enc) + + this.end() + var hash = this._hash.digest() + return verify(sig, hash, key, this._signType, this._tag) +} + +function createSign (algorithm) { + return new Sign(algorithm) +} + +function createVerify (algorithm) { + return new Verify(algorithm) +} + +module.exports = { + Sign: createSign, + Verify: createVerify, + createSign: createSign, + createVerify: createVerify +} + +}).call(this,require("buffer").Buffer) +},{"./algorithms.json":78,"./sign":81,"./verify":82,"buffer":84,"create-hash":91,"inherits":180,"stream":311}],81:[function(require,module,exports){ +(function (Buffer){ +// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js +var createHmac = require('create-hmac') +var crt = require('browserify-rsa') +var EC = require('elliptic').ec +var BN = require('bn.js') +var parseKeys = require('parse-asn1') +var curves = require('./curves.json') + +function sign (hash, key, hashType, signType, tag) { + var priv = parseKeys(key) + if (priv.curve) { + // rsa keys can be interpreted as ecdsa ones in openssl + if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type') + return ecSign(hash, priv) + } else if (priv.type === 'dsa') { + if (signType !== 'dsa') throw new Error('wrong private key type') + return dsaSign(hash, priv, hashType) + } else { + if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type') + } + hash = Buffer.concat([tag, hash]) + var len = priv.modulus.byteLength() + var pad = [ 0, 1 ] + while (hash.length + pad.length + 1 < len) pad.push(0xff) + pad.push(0x00) + var i = -1 + while (++i < hash.length) pad.push(hash[i]) + + var out = crt(pad, priv) + return out +} + +function ecSign (hash, priv) { + var curveId = curves[priv.curve.join('.')] + if (!curveId) throw new Error('unknown curve ' + priv.curve.join('.')) + + var curve = new EC(curveId) + var key = curve.keyFromPrivate(priv.privateKey) + var out = key.sign(hash) + + return new Buffer(out.toDER()) +} + +function dsaSign (hash, priv, algo) { + var x = priv.params.priv_key + var p = priv.params.p + var q = priv.params.q + var g = priv.params.g + var r = new BN(0) + var k + var H = bits2int(hash, q).mod(q) + var s = false + var kv = getKey(x, q, hash, algo) + while (s === false) { + k = makeKey(q, kv, algo) + r = makeR(g, k, p, q) + s = k.invm(q).imul(H.add(x.mul(r))).mod(q) + if (s.cmpn(0) === 0) { + s = false + r = new BN(0) + } + } + return toDER(r, s) +} + +function toDER (r, s) { + r = r.toArray() + s = s.toArray() + + // Pad values + if (r[0] & 0x80) r = [ 0 ].concat(r) + if (s[0] & 0x80) s = [ 0 ].concat(s) + + var total = r.length + s.length + 4 + var res = [ 0x30, total, 0x02, r.length ] + res = res.concat(r, [ 0x02, s.length ], s) + return new Buffer(res) +} + +function getKey (x, q, hash, algo) { + x = new Buffer(x.toArray()) + if (x.length < q.byteLength()) { + var zeros = new Buffer(q.byteLength() - x.length) + zeros.fill(0) + x = Buffer.concat([ zeros, x ]) + } + var hlen = hash.length + var hbits = bits2octets(hash, q) + var v = new Buffer(hlen) + v.fill(1) + var k = new Buffer(hlen) + k.fill(0) + k = createHmac(algo, k).update(v).update(new Buffer([ 0 ])).update(x).update(hbits).digest() + v = createHmac(algo, k).update(v).digest() + k = createHmac(algo, k).update(v).update(new Buffer([ 1 ])).update(x).update(hbits).digest() + v = createHmac(algo, k).update(v).digest() + return { k: k, v: v } +} + +function bits2int (obits, q) { + var bits = new BN(obits) + var shift = (obits.length << 3) - q.bitLength() + if (shift > 0) bits.ishrn(shift) + return bits +} + +function bits2octets (bits, q) { + bits = bits2int(bits, q) + bits = bits.mod(q) + var out = new Buffer(bits.toArray()) + if (out.length < q.byteLength()) { + var zeros = new Buffer(q.byteLength() - out.length) + zeros.fill(0) + out = Buffer.concat([ zeros, out ]) + } + return out +} + +function makeKey (q, kv, algo) { + var t + var k + + do { + t = new Buffer(0) + + while (t.length * 8 < q.bitLength()) { + kv.v = createHmac(algo, kv.k).update(kv.v).digest() + t = Buffer.concat([ t, kv.v ]) + } + + k = bits2int(t, q) + kv.k = createHmac(algo, kv.k).update(kv.v).update(new Buffer([ 0 ])).digest() + kv.v = createHmac(algo, kv.k).update(kv.v).digest() + } while (k.cmp(q) !== -1) + + return k +} + +function makeR (g, k, p, q) { + return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q) +} + +module.exports = sign +module.exports.getKey = getKey +module.exports.makeKey = makeKey + +}).call(this,require("buffer").Buffer) +},{"./curves.json":79,"bn.js":53,"browserify-rsa":76,"buffer":84,"create-hmac":94,"elliptic":109,"parse-asn1":245}],82:[function(require,module,exports){ +(function (Buffer){ +// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js +var BN = require('bn.js') +var EC = require('elliptic').ec +var parseKeys = require('parse-asn1') +var curves = require('./curves.json') + +function verify (sig, hash, key, signType, tag) { + var pub = parseKeys(key) + if (pub.type === 'ec') { + // rsa keys can be interpreted as ecdsa ones in openssl + if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type') + return ecVerify(sig, hash, pub) + } else if (pub.type === 'dsa') { + if (signType !== 'dsa') throw new Error('wrong public key type') + return dsaVerify(sig, hash, pub) + } else { + if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type') + } + hash = Buffer.concat([tag, hash]) + var len = pub.modulus.byteLength() + var pad = [ 1 ] + var padNum = 0 + while (hash.length + pad.length + 2 < len) { + pad.push(0xff) + padNum++ + } + pad.push(0x00) + var i = -1 + while (++i < hash.length) { + pad.push(hash[i]) + } + pad = new Buffer(pad) + var red = BN.mont(pub.modulus) + sig = new BN(sig).toRed(red) + + sig = sig.redPow(new BN(pub.publicExponent)) + sig = new Buffer(sig.fromRed().toArray()) + var out = padNum < 8 ? 1 : 0 + len = Math.min(sig.length, pad.length) + if (sig.length !== pad.length) out = 1 + + i = -1 + while (++i < len) out |= sig[i] ^ pad[i] + return out === 0 +} + +function ecVerify (sig, hash, pub) { + var curveId = curves[pub.data.algorithm.curve.join('.')] + if (!curveId) throw new Error('unknown curve ' + pub.data.algorithm.curve.join('.')) + + var curve = new EC(curveId) + var pubkey = pub.data.subjectPrivateKey.data + + return curve.verify(hash, sig, pubkey) +} + +function dsaVerify (sig, hash, pub) { + var p = pub.data.p + var q = pub.data.q + var g = pub.data.g + var y = pub.data.pub_key + var unpacked = parseKeys.signature.decode(sig, 'der') + var s = unpacked.s + var r = unpacked.r + checkValue(s, q) + checkValue(r, q) + var montp = BN.mont(p) + var w = s.invm(q) + var v = g.toRed(montp) + .redPow(new BN(hash).mul(w).mod(q)) + .fromRed() + .mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed()) + .mod(p) + .mod(q) + return v.cmp(r) === 0 +} + +function checkValue (b, q) { + if (b.cmpn(0) <= 0) throw new Error('invalid sig') + if (b.cmp(q) >= q) throw new Error('invalid sig') +} + +module.exports = verify + +}).call(this,require("buffer").Buffer) +},{"./curves.json":79,"bn.js":53,"buffer":84,"elliptic":109,"parse-asn1":245}],83:[function(require,module,exports){ +(function (Buffer){ +module.exports = function xor (a, b) { + var length = Math.min(a.length, b.length) + var buffer = new Buffer(length) + + for (var i = 0; i < length; ++i) { + buffer[i] = a[i] ^ b[i] + } + + return buffer +} + +}).call(this,require("buffer").Buffer) +},{"buffer":84}],84:[function(require,module,exports){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +var K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1) + arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} + return arr.foo() === 42 + } catch (e) { + return false + } +} + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('Invalid typed array length') + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length) + buf.__proto__ = Buffer.prototype + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error( + 'If encoding is specified then the first argument must be a string' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 +if (typeof Symbol !== 'undefined' && Symbol.species && + Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false + }) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + return fromObject(value) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Buffer.prototype.__proto__ = Uint8Array.prototype +Buffer.__proto__ = Uint8Array + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + var length = byteLength(string, encoding) | 0 + var buf = createBuffer(length) + + var actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + var buf = createBuffer(length) + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds') + } + + var buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + buf.__proto__ = Buffer.prototype + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + var buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj) { + if (isArrayBufferView(obj) || 'length' in obj) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } + } + + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (isArrayBufferView(string) || isArrayBuffer(string)) { + return string.byteLength + } + if (typeof string !== 'string') { + string = '' + string + } + + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!Buffer.isBuffer(target)) { + throw new TypeError('Argument must be a Buffer') + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + newBuf.__proto__ = Buffer.prototype + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + var i + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if (code < 256) { + val = code + } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : new Buffer(val, encoding) + var len = bytes.length + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffers from another context (i.e. an iframe) do not pass the `instanceof` check +// but they should be treated as valid. See: https://github.com/feross/buffer/issues/166 +function isArrayBuffer (obj) { + return obj instanceof ArrayBuffer || + (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' && + typeof obj.byteLength === 'number') +} + +// Node 0.10 supports `ArrayBuffer` but lacks `ArrayBuffer.isView` +function isArrayBufferView (obj) { + return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj) +} + +function numberIsNaN (obj) { + return obj !== obj // eslint-disable-line no-self-compare +} + +},{"base64-js":51,"ieee754":178}],85:[function(require,module,exports){ +module.exports = { + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Unordered Collection", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" +} + +},{}],86:[function(require,module,exports){ +var Buffer = require('safe-buffer').Buffer +var Transform = require('stream').Transform +var StringDecoder = require('string_decoder').StringDecoder +var inherits = require('inherits') + +function CipherBase (hashMode) { + Transform.call(this) + this.hashMode = typeof hashMode === 'string' + if (this.hashMode) { + this[hashMode] = this._finalOrDigest + } else { + this.final = this._finalOrDigest + } + if (this._final) { + this.__final = this._final + this._final = null + } + this._decoder = null + this._encoding = null +} +inherits(CipherBase, Transform) + +CipherBase.prototype.update = function (data, inputEnc, outputEnc) { + if (typeof data === 'string') { + data = Buffer.from(data, inputEnc) + } + + var outData = this._update(data) + if (this.hashMode) return this + + if (outputEnc) { + outData = this._toString(outData, outputEnc) + } + + return outData +} + +CipherBase.prototype.setAutoPadding = function () {} +CipherBase.prototype.getAuthTag = function () { + throw new Error('trying to get auth tag in unsupported state') +} + +CipherBase.prototype.setAuthTag = function () { + throw new Error('trying to set auth tag in unsupported state') +} + +CipherBase.prototype.setAAD = function () { + throw new Error('trying to set aad in unsupported state') +} + +CipherBase.prototype._transform = function (data, _, next) { + var err + try { + if (this.hashMode) { + this._update(data) + } else { + this.push(this._update(data)) + } + } catch (e) { + err = e + } finally { + next(err) + } +} +CipherBase.prototype._flush = function (done) { + var err + try { + this.push(this.__final()) + } catch (e) { + err = e + } + + done(err) +} +CipherBase.prototype._finalOrDigest = function (outputEnc) { + var outData = this.__final() || Buffer.alloc(0) + if (outputEnc) { + outData = this._toString(outData, outputEnc, true) + } + return outData +} + +CipherBase.prototype._toString = function (value, enc, fin) { + if (!this._decoder) { + this._decoder = new StringDecoder(enc) + this._encoding = enc + } + + if (this._encoding !== enc) throw new Error('can\'t switch encodings') + + var out = this._decoder.write(value) + if (fin) { + out += this._decoder.end() + } + + return out +} + +module.exports = CipherBase + +},{"inherits":180,"safe-buffer":290,"stream":311,"string_decoder":317}],87:[function(require,module,exports){ +(function (Buffer){ +var clone = (function() { +'use strict'; + +function _instanceof(obj, type) { + return type != null && obj instanceof type; +} + +var nativeMap; +try { + nativeMap = Map; +} catch(_) { + // maybe a reference error because no `Map`. Give it a dummy value that no + // value will ever be an instanceof. + nativeMap = function() {}; +} + +var nativeSet; +try { + nativeSet = Set; +} catch(_) { + nativeSet = function() {}; +} + +var nativePromise; +try { + nativePromise = Promise; +} catch(_) { + nativePromise = function() {}; +} + +/** + * Clones (copies) an Object using deep copying. + * + * This function supports circular references by default, but if you are certain + * there are no circular references in your object, you can save some CPU time + * by calling clone(obj, false). + * + * Caution: if `circular` is false and `parent` contains circular references, + * your program may enter an infinite loop and crash. + * + * @param `parent` - the object to be cloned + * @param `circular` - set to true if the object to be cloned may contain + * circular references. (optional - true by default) + * @param `depth` - set to a number if the object is only to be cloned to + * a particular depth. (optional - defaults to Infinity) + * @param `prototype` - sets the prototype to be used when cloning an object. + * (optional - defaults to parent prototype). + * @param `includeNonEnumerable` - set to true if the non-enumerable properties + * should be cloned as well. Non-enumerable properties on the prototype + * chain will be ignored. (optional - false by default) +*/ +function clone(parent, circular, depth, prototype, includeNonEnumerable) { + if (typeof circular === 'object') { + depth = circular.depth; + prototype = circular.prototype; + includeNonEnumerable = circular.includeNonEnumerable; + circular = circular.circular; + } + // maintain two arrays for circular references, where corresponding parents + // and children have the same index + var allParents = []; + var allChildren = []; + + var useBuffer = typeof Buffer != 'undefined'; + + if (typeof circular == 'undefined') + circular = true; + + if (typeof depth == 'undefined') + depth = Infinity; + + // recurse this function so we don't reset allParents and allChildren + function _clone(parent, depth) { + // cloning null always returns null + if (parent === null) + return null; + + if (depth === 0) + return parent; + + var child; + var proto; + if (typeof parent != 'object') { + return parent; + } + + if (_instanceof(parent, nativeMap)) { + child = new nativeMap(); + } else if (_instanceof(parent, nativeSet)) { + child = new nativeSet(); + } else if (_instanceof(parent, nativePromise)) { + child = new nativePromise(function (resolve, reject) { + parent.then(function(value) { + resolve(_clone(value, depth - 1)); + }, function(err) { + reject(_clone(err, depth - 1)); + }); + }); + } else if (clone.__isArray(parent)) { + child = []; + } else if (clone.__isRegExp(parent)) { + child = new RegExp(parent.source, __getRegExpFlags(parent)); + if (parent.lastIndex) child.lastIndex = parent.lastIndex; + } else if (clone.__isDate(parent)) { + child = new Date(parent.getTime()); + } else if (useBuffer && Buffer.isBuffer(parent)) { + if (Buffer.allocUnsafe) { + // Node.js >= 4.5.0 + child = Buffer.allocUnsafe(parent.length); + } else { + // Older Node.js versions + child = new Buffer(parent.length); + } + parent.copy(child); + return child; + } else if (_instanceof(parent, Error)) { + child = Object.create(parent); + } else { + if (typeof prototype == 'undefined') { + proto = Object.getPrototypeOf(parent); + child = Object.create(proto); + } + else { + child = Object.create(prototype); + proto = prototype; + } + } + + if (circular) { + var index = allParents.indexOf(parent); + + if (index != -1) { + return allChildren[index]; + } + allParents.push(parent); + allChildren.push(child); + } + + if (_instanceof(parent, nativeMap)) { + parent.forEach(function(value, key) { + var keyChild = _clone(key, depth - 1); + var valueChild = _clone(value, depth - 1); + child.set(keyChild, valueChild); + }); + } + if (_instanceof(parent, nativeSet)) { + parent.forEach(function(value) { + var entryChild = _clone(value, depth - 1); + child.add(entryChild); + }); + } + + for (var i in parent) { + var attrs; + if (proto) { + attrs = Object.getOwnPropertyDescriptor(proto, i); + } + + if (attrs && attrs.set == null) { + continue; + } + child[i] = _clone(parent[i], depth - 1); + } + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(parent); + for (var i = 0; i < symbols.length; i++) { + // Don't need to worry about cloning a symbol because it is a primitive, + // like a number or string. + var symbol = symbols[i]; + var descriptor = Object.getOwnPropertyDescriptor(parent, symbol); + if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { + continue; + } + child[symbol] = _clone(parent[symbol], depth - 1); + if (!descriptor.enumerable) { + Object.defineProperty(child, symbol, { + enumerable: false + }); + } + } + } + + if (includeNonEnumerable) { + var allPropertyNames = Object.getOwnPropertyNames(parent); + for (var i = 0; i < allPropertyNames.length; i++) { + var propertyName = allPropertyNames[i]; + var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName); + if (descriptor && descriptor.enumerable) { + continue; + } + child[propertyName] = _clone(parent[propertyName], depth - 1); + Object.defineProperty(child, propertyName, { + enumerable: false + }); + } + } + + return child; + } + + return _clone(parent, depth); +} + +/** + * Simple flat clone using prototype, accepts only objects, usefull for property + * override on FLAT configuration object (no nested props). + * + * USE WITH CAUTION! This may not behave as you wish if you do not know how this + * works. + */ +clone.clonePrototype = function clonePrototype(parent) { + if (parent === null) + return null; + + var c = function () {}; + c.prototype = parent; + return new c(); +}; + +// private utility functions + +function __objToStr(o) { + return Object.prototype.toString.call(o); +} +clone.__objToStr = __objToStr; + +function __isDate(o) { + return typeof o === 'object' && __objToStr(o) === '[object Date]'; +} +clone.__isDate = __isDate; + +function __isArray(o) { + return typeof o === 'object' && __objToStr(o) === '[object Array]'; +} +clone.__isArray = __isArray; + +function __isRegExp(o) { + return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; +} +clone.__isRegExp = __isRegExp; + +function __getRegExpFlags(re) { + var flags = ''; + if (re.global) flags += 'g'; + if (re.ignoreCase) flags += 'i'; + if (re.multiline) flags += 'm'; + return flags; +} +clone.__getRegExpFlags = __getRegExpFlags; + +return clone; +})(); + +if (typeof module === 'object' && module.exports) { + module.exports = clone; +} + +}).call(this,require("buffer").Buffer) +},{"buffer":84}],88:[function(require,module,exports){ +/* jshint node: true */ +(function () { + "use strict"; + + function CookieAccessInfo(domain, path, secure, script) { + if (this instanceof CookieAccessInfo) { + this.domain = domain || undefined; + this.path = path || "/"; + this.secure = !!secure; + this.script = !!script; + return this; + } + return new CookieAccessInfo(domain, path, secure, script); + } + CookieAccessInfo.All = Object.freeze(Object.create(null)); + exports.CookieAccessInfo = CookieAccessInfo; + + function Cookie(cookiestr, request_domain, request_path) { + if (cookiestr instanceof Cookie) { + return cookiestr; + } + if (this instanceof Cookie) { + this.name = null; + this.value = null; + this.expiration_date = Infinity; + this.path = String(request_path || "/"); + this.explicit_path = false; + this.domain = request_domain || null; + this.explicit_domain = false; + this.secure = false; //how to define default? + this.noscript = false; //httponly + if (cookiestr) { + this.parse(cookiestr, request_domain, request_path); + } + return this; + } + return new Cookie(cookiestr, request_domain, request_path); + } + exports.Cookie = Cookie; + + Cookie.prototype.toString = function toString() { + var str = [this.name + "=" + this.value]; + if (this.expiration_date !== Infinity) { + str.push("expires=" + (new Date(this.expiration_date)).toGMTString()); + } + if (this.domain) { + str.push("domain=" + this.domain); + } + if (this.path) { + str.push("path=" + this.path); + } + if (this.secure) { + str.push("secure"); + } + if (this.noscript) { + str.push("httponly"); + } + return str.join("; "); + }; + + Cookie.prototype.toValueString = function toValueString() { + return this.name + "=" + this.value; + }; + + var cookie_str_splitter = /[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g; + Cookie.prototype.parse = function parse(str, request_domain, request_path) { + if (this instanceof Cookie) { + var parts = str.split(";").filter(function (value) { + return !!value; + }); + var i; + + var pair = parts[0].match(/([^=]+)=([\s\S]*)/); + if (!pair) { + console.warn("Invalid cookie header encountered. Header: '"+str+"'"); + return; + } + + var key = pair[1]; + var value = pair[2]; + if ( typeof key !== 'string' || key.length === 0 || typeof value !== 'string' ) { + console.warn("Unable to extract values from cookie header. Cookie: '"+str+"'"); + return; + } + + this.name = key; + this.value = value; + + for (i = 1; i < parts.length; i += 1) { + pair = parts[i].match(/([^=]+)(?:=([\s\S]*))?/); + key = pair[1].trim().toLowerCase(); + value = pair[2]; + switch (key) { + case "httponly": + this.noscript = true; + break; + case "expires": + this.expiration_date = value ? + Number(Date.parse(value)) : + Infinity; + break; + case "path": + this.path = value ? + value.trim() : + ""; + this.explicit_path = true; + break; + case "domain": + this.domain = value ? + value.trim() : + ""; + this.explicit_domain = !!this.domain; + break; + case "secure": + this.secure = true; + break; + } + } + + if (!this.explicit_path) { + this.path = request_path || "/"; + } + if (!this.explicit_domain) { + this.domain = request_domain; + } + + return this; + } + return new Cookie().parse(str, request_domain, request_path); + }; + + Cookie.prototype.matches = function matches(access_info) { + if (access_info === CookieAccessInfo.All) { + return true; + } + if (this.noscript && access_info.script || + this.secure && !access_info.secure || + !this.collidesWith(access_info)) { + return false; + } + return true; + }; + + Cookie.prototype.collidesWith = function collidesWith(access_info) { + if ((this.path && !access_info.path) || (this.domain && !access_info.domain)) { + return false; + } + if (this.path && access_info.path.indexOf(this.path) !== 0) { + return false; + } + if (this.explicit_path && access_info.path.indexOf( this.path ) !== 0) { + return false; + } + var access_domain = access_info.domain && access_info.domain.replace(/^[\.]/,''); + var cookie_domain = this.domain && this.domain.replace(/^[\.]/,''); + if (cookie_domain === access_domain) { + return true; + } + if (cookie_domain) { + if (!this.explicit_domain) { + return false; // we already checked if the domains were exactly the same + } + var wildcard = access_domain.indexOf(cookie_domain); + if (wildcard === -1 || wildcard !== access_domain.length - cookie_domain.length) { + return false; + } + return true; + } + return true; + }; + + function CookieJar() { + var cookies, cookies_list, collidable_cookie; + if (this instanceof CookieJar) { + cookies = Object.create(null); //name: [Cookie] + + this.setCookie = function setCookie(cookie, request_domain, request_path) { + var remove, i; + cookie = new Cookie(cookie, request_domain, request_path); + //Delete the cookie if the set is past the current time + remove = cookie.expiration_date <= Date.now(); + if (cookies[cookie.name] !== undefined) { + cookies_list = cookies[cookie.name]; + for (i = 0; i < cookies_list.length; i += 1) { + collidable_cookie = cookies_list[i]; + if (collidable_cookie.collidesWith(cookie)) { + if (remove) { + cookies_list.splice(i, 1); + if (cookies_list.length === 0) { + delete cookies[cookie.name]; + } + return false; + } + cookies_list[i] = cookie; + return cookie; + } + } + if (remove) { + return false; + } + cookies_list.push(cookie); + return cookie; + } + if (remove) { + return false; + } + cookies[cookie.name] = [cookie]; + return cookies[cookie.name]; + }; + //returns a cookie + this.getCookie = function getCookie(cookie_name, access_info) { + var cookie, i; + cookies_list = cookies[cookie_name]; + if (!cookies_list) { + return; + } + for (i = 0; i < cookies_list.length; i += 1) { + cookie = cookies_list[i]; + if (cookie.expiration_date <= Date.now()) { + if (cookies_list.length === 0) { + delete cookies[cookie.name]; + } + continue; + } + + if (cookie.matches(access_info)) { + return cookie; + } + } + }; + //returns a list of cookies + this.getCookies = function getCookies(access_info) { + var matches = [], cookie_name, cookie; + for (cookie_name in cookies) { + cookie = this.getCookie(cookie_name, access_info); + if (cookie) { + matches.push(cookie); + } + } + matches.toString = function toString() { + return matches.join(":"); + }; + matches.toValueString = function toValueString() { + return matches.map(function (c) { + return c.toValueString(); + }).join(';'); + }; + return matches; + }; + + return this; + } + return new CookieJar(); + } + exports.CookieJar = CookieJar; + + //returns list of cookies that were set correctly. Cookies that are expired and removed are not returned. + CookieJar.prototype.setCookies = function setCookies(cookies, request_domain, request_path) { + cookies = Array.isArray(cookies) ? + cookies : + cookies.split(cookie_str_splitter); + var successful = [], + i, + cookie; + cookies = cookies.map(function(item){ + return new Cookie(item, request_domain, request_path); + }); + for (i = 0; i < cookies.length; i += 1) { + cookie = cookies[i]; + if (this.setCookie(cookie, request_domain, request_path)) { + successful.push(cookie); + } + } + return successful; + }; +}()); + +},{}],89:[function(require,module,exports){ +(function (Buffer){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + +}).call(this,{"isBuffer":require("../../is-buffer/index.js")}) +},{"../../is-buffer/index.js":181}],90:[function(require,module,exports){ +(function (Buffer){ +var elliptic = require('elliptic'); +var BN = require('bn.js'); + +module.exports = function createECDH(curve) { + return new ECDH(curve); +}; + +var aliases = { + secp256k1: { + name: 'secp256k1', + byteLength: 32 + }, + secp224r1: { + name: 'p224', + byteLength: 28 + }, + prime256v1: { + name: 'p256', + byteLength: 32 + }, + prime192v1: { + name: 'p192', + byteLength: 24 + }, + ed25519: { + name: 'ed25519', + byteLength: 32 + }, + secp384r1: { + name: 'p384', + byteLength: 48 + }, + secp521r1: { + name: 'p521', + byteLength: 66 + } +}; + +aliases.p224 = aliases.secp224r1; +aliases.p256 = aliases.secp256r1 = aliases.prime256v1; +aliases.p192 = aliases.secp192r1 = aliases.prime192v1; +aliases.p384 = aliases.secp384r1; +aliases.p521 = aliases.secp521r1; + +function ECDH(curve) { + this.curveType = aliases[curve]; + if (!this.curveType ) { + this.curveType = { + name: curve + }; + } + this.curve = new elliptic.ec(this.curveType.name); + this.keys = void 0; +} + +ECDH.prototype.generateKeys = function (enc, format) { + this.keys = this.curve.genKeyPair(); + return this.getPublicKey(enc, format); +}; + +ECDH.prototype.computeSecret = function (other, inenc, enc) { + inenc = inenc || 'utf8'; + if (!Buffer.isBuffer(other)) { + other = new Buffer(other, inenc); + } + var otherPub = this.curve.keyFromPublic(other).getPublic(); + var out = otherPub.mul(this.keys.getPrivate()).getX(); + return formatReturnValue(out, enc, this.curveType.byteLength); +}; + +ECDH.prototype.getPublicKey = function (enc, format) { + var key = this.keys.getPublic(format === 'compressed', true); + if (format === 'hybrid') { + if (key[key.length - 1] % 2) { + key[0] = 7; + } else { + key [0] = 6; + } + } + return formatReturnValue(key, enc); +}; + +ECDH.prototype.getPrivateKey = function (enc) { + return formatReturnValue(this.keys.getPrivate(), enc); +}; + +ECDH.prototype.setPublicKey = function (pub, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(pub)) { + pub = new Buffer(pub, enc); + } + this.keys._importPublic(pub); + return this; +}; + +ECDH.prototype.setPrivateKey = function (priv, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(priv)) { + priv = new Buffer(priv, enc); + } + var _priv = new BN(priv); + _priv = _priv.toString(16); + this.keys._importPrivate(_priv); + return this; +}; + +function formatReturnValue(bn, enc, len) { + if (!Array.isArray(bn)) { + bn = bn.toArray(); + } + var buf = new Buffer(bn); + if (len && buf.length < len) { + var zeros = new Buffer(len - buf.length); + zeros.fill(0); + buf = Buffer.concat([zeros, buf]); + } + if (!enc) { + return buf; + } else { + return buf.toString(enc); + } +} + +}).call(this,require("buffer").Buffer) +},{"bn.js":53,"buffer":84,"elliptic":109}],91:[function(require,module,exports){ +(function (Buffer){ +'use strict' +var inherits = require('inherits') +var md5 = require('./md5') +var RIPEMD160 = require('ripemd160') +var sha = require('sha.js') + +var Base = require('cipher-base') + +function HashNoConstructor (hash) { + Base.call(this, 'digest') + + this._hash = hash + this.buffers = [] +} + +inherits(HashNoConstructor, Base) + +HashNoConstructor.prototype._update = function (data) { + this.buffers.push(data) +} + +HashNoConstructor.prototype._final = function () { + var buf = Buffer.concat(this.buffers) + var r = this._hash(buf) + this.buffers = null + + return r +} + +function Hash (hash) { + Base.call(this, 'digest') + + this._hash = hash +} + +inherits(Hash, Base) + +Hash.prototype._update = function (data) { + this._hash.update(data) +} + +Hash.prototype._final = function () { + return this._hash.digest() +} + +module.exports = function createHash (alg) { + alg = alg.toLowerCase() + if (alg === 'md5') return new HashNoConstructor(md5) + if (alg === 'rmd160' || alg === 'ripemd160') return new Hash(new RIPEMD160()) + + return new Hash(sha(alg)) +} + +}).call(this,require("buffer").Buffer) +},{"./md5":93,"buffer":84,"cipher-base":86,"inherits":180,"ripemd160":288,"sha.js":304}],92:[function(require,module,exports){ +(function (Buffer){ +'use strict' +var intSize = 4 +var zeroBuffer = new Buffer(intSize) +zeroBuffer.fill(0) + +var charSize = 8 +var hashSize = 16 + +function toArray (buf) { + if ((buf.length % intSize) !== 0) { + var len = buf.length + (intSize - (buf.length % intSize)) + buf = Buffer.concat([buf, zeroBuffer], len) + } + + var arr = new Array(buf.length >>> 2) + for (var i = 0, j = 0; i < buf.length; i += intSize, j++) { + arr[j] = buf.readInt32LE(i) + } + + return arr +} + +module.exports = function hash (buf, fn) { + var arr = fn(toArray(buf), buf.length * charSize) + buf = new Buffer(hashSize) + for (var i = 0; i < arr.length; i++) { + buf.writeInt32LE(arr[i], i << 2, true) + } + return buf +} + +}).call(this,require("buffer").Buffer) +},{"buffer":84}],93:[function(require,module,exports){ +'use strict' +/* + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +var makeHash = require('./make-hash') + +/* + * Calculate the MD5 of an array of little-endian words, and a bit length + */ +function core_md5 (x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << ((len) % 32) + x[(((len + 64) >>> 9) << 4) + 14] = len + + var a = 1732584193 + var b = -271733879 + var c = -1732584194 + var d = 271733878 + + for (var i = 0; i < x.length; i += 16) { + var olda = a + var oldb = b + var oldc = c + var oldd = d + + a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936) + d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586) + c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819) + b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330) + a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897) + d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426) + c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341) + b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983) + a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416) + d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417) + c = md5_ff(c, d, a, b, x[i + 10], 17, -42063) + b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162) + a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682) + d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101) + c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290) + b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329) + + a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510) + d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632) + c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713) + b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302) + a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691) + d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083) + c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335) + b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848) + a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438) + d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690) + c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961) + b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501) + a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467) + d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784) + c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473) + b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734) + + a = md5_hh(a, b, c, d, x[i + 5], 4, -378558) + d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463) + c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562) + b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556) + a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060) + d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353) + c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632) + b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640) + a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174) + d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222) + c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979) + b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189) + a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487) + d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835) + c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520) + b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651) + + a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844) + d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415) + c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905) + b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055) + a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571) + d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606) + c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523) + b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799) + a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359) + d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744) + c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380) + b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649) + a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070) + d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379) + c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259) + b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551) + + a = safe_add(a, olda) + b = safe_add(b, oldb) + c = safe_add(c, oldc) + d = safe_add(d, oldd) + } + + return [a, b, c, d] +} + +/* + * These functions implement the four basic operations the algorithm uses. + */ +function md5_cmn (q, a, b, x, s, t) { + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b) +} + +function md5_ff (a, b, c, d, x, s, t) { + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t) +} + +function md5_gg (a, b, c, d, x, s, t) { + return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t) +} + +function md5_hh (a, b, c, d, x, s, t) { + return md5_cmn(b ^ c ^ d, a, b, x, s, t) +} + +function md5_ii (a, b, c, d, x, s, t) { + return md5_cmn(c ^ (b | (~d)), a, b, x, s, t) +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add (x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF) + var msw = (x >> 16) + (y >> 16) + (lsw >> 16) + return (msw << 16) | (lsw & 0xFFFF) +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function bit_rol (num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)) +} + +module.exports = function md5 (buf) { + return makeHash(buf, core_md5) +} + +},{"./make-hash":92}],94:[function(require,module,exports){ +'use strict' +var inherits = require('inherits') +var Legacy = require('./legacy') +var Base = require('cipher-base') +var Buffer = require('safe-buffer').Buffer +var md5 = require('create-hash/md5') +var RIPEMD160 = require('ripemd160') + +var sha = require('sha.js') + +var ZEROS = Buffer.alloc(128) + +function Hmac (alg, key) { + Base.call(this, 'digest') + if (typeof key === 'string') { + key = Buffer.from(key) + } + + var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64 + + this._alg = alg + this._key = key + if (key.length > blocksize) { + var hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg) + key = hash.update(key).digest() + } else if (key.length < blocksize) { + key = Buffer.concat([key, ZEROS], blocksize) + } + + var ipad = this._ipad = Buffer.allocUnsafe(blocksize) + var opad = this._opad = Buffer.allocUnsafe(blocksize) + + for (var i = 0; i < blocksize; i++) { + ipad[i] = key[i] ^ 0x36 + opad[i] = key[i] ^ 0x5C + } + this._hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg) + this._hash.update(ipad) +} + +inherits(Hmac, Base) + +Hmac.prototype._update = function (data) { + this._hash.update(data) +} + +Hmac.prototype._final = function () { + var h = this._hash.digest() + var hash = this._alg === 'rmd160' ? new RIPEMD160() : sha(this._alg) + return hash.update(this._opad).update(h).digest() +} + +module.exports = function createHmac (alg, key) { + alg = alg.toLowerCase() + if (alg === 'rmd160' || alg === 'ripemd160') { + return new Hmac('rmd160', key) + } + if (alg === 'md5') { + return new Legacy(md5, key) + } + return new Hmac(alg, key) +} + +},{"./legacy":95,"cipher-base":86,"create-hash/md5":93,"inherits":180,"ripemd160":288,"safe-buffer":290,"sha.js":304}],95:[function(require,module,exports){ +'use strict' +var inherits = require('inherits') +var Buffer = require('safe-buffer').Buffer + +var Base = require('cipher-base') + +var ZEROS = Buffer.alloc(128) +var blocksize = 64 + +function Hmac (alg, key) { + Base.call(this, 'digest') + if (typeof key === 'string') { + key = Buffer.from(key) + } + + this._alg = alg + this._key = key + + if (key.length > blocksize) { + key = alg(key) + } else if (key.length < blocksize) { + key = Buffer.concat([key, ZEROS], blocksize) + } + + var ipad = this._ipad = Buffer.allocUnsafe(blocksize) + var opad = this._opad = Buffer.allocUnsafe(blocksize) + + for (var i = 0; i < blocksize; i++) { + ipad[i] = key[i] ^ 0x36 + opad[i] = key[i] ^ 0x5C + } + + this._hash = [ipad] +} + +inherits(Hmac, Base) + +Hmac.prototype._update = function (data) { + this._hash.push(data) +} + +Hmac.prototype._final = function () { + var h = this._alg(Buffer.concat(this._hash)) + return this._alg(Buffer.concat([this._opad, h])) +} +module.exports = Hmac + +},{"cipher-base":86,"inherits":180,"safe-buffer":290}],96:[function(require,module,exports){ +var __root__ = (function (root) { +function F() { this.fetch = false; } +F.prototype = root; +return new F(); +})(typeof self !== 'undefined' ? self : this); +(function(self) { + +(function(self) { + + if (self.fetch) { + return + } + + var support = { + searchParams: 'URLSearchParams' in self, + iterable: 'Symbol' in self && 'iterator' in Symbol, + blob: 'FileReader' in self && 'Blob' in self && (function() { + try { + new Blob(); + return true + } catch(e) { + return false + } + })(), + formData: 'FormData' in self, + arrayBuffer: 'ArrayBuffer' in self + }; + + if (support.arrayBuffer) { + var viewClasses = [ + '[object Int8Array]', + '[object Uint8Array]', + '[object Uint8ClampedArray]', + '[object Int16Array]', + '[object Uint16Array]', + '[object Int32Array]', + '[object Uint32Array]', + '[object Float32Array]', + '[object Float64Array]' + ]; + + var isDataView = function(obj) { + return obj && DataView.prototype.isPrototypeOf(obj) + }; + + var isArrayBufferView = ArrayBuffer.isView || function(obj) { + return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1 + }; + } + + function normalizeName(name) { + if (typeof name !== 'string') { + name = String(name); + } + if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) { + throw new TypeError('Invalid character in header field name') + } + return name.toLowerCase() + } + + function normalizeValue(value) { + if (typeof value !== 'string') { + value = String(value); + } + return value + } + + // Build a destructive iterator for the value list + function iteratorFor(items) { + var iterator = { + next: function() { + var value = items.shift(); + return {done: value === undefined, value: value} + } + }; + + if (support.iterable) { + iterator[Symbol.iterator] = function() { + return iterator + }; + } + + return iterator + } + + function Headers(headers) { + this.map = {}; + + if (headers instanceof Headers) { + headers.forEach(function(value, name) { + this.append(name, value); + }, this); + } else if (Array.isArray(headers)) { + headers.forEach(function(header) { + this.append(header[0], header[1]); + }, this); + } else if (headers) { + Object.getOwnPropertyNames(headers).forEach(function(name) { + this.append(name, headers[name]); + }, this); + } + } + + Headers.prototype.append = function(name, value) { + name = normalizeName(name); + value = normalizeValue(value); + var oldValue = this.map[name]; + this.map[name] = oldValue ? oldValue+','+value : value; + }; + + Headers.prototype['delete'] = function(name) { + delete this.map[normalizeName(name)]; + }; + + Headers.prototype.get = function(name) { + name = normalizeName(name); + return this.has(name) ? this.map[name] : null + }; + + Headers.prototype.has = function(name) { + return this.map.hasOwnProperty(normalizeName(name)) + }; + + Headers.prototype.set = function(name, value) { + this.map[normalizeName(name)] = normalizeValue(value); + }; + + Headers.prototype.forEach = function(callback, thisArg) { + for (var name in this.map) { + if (this.map.hasOwnProperty(name)) { + callback.call(thisArg, this.map[name], name, this); + } + } + }; + + Headers.prototype.keys = function() { + var items = []; + this.forEach(function(value, name) { items.push(name); }); + return iteratorFor(items) + }; + + Headers.prototype.values = function() { + var items = []; + this.forEach(function(value) { items.push(value); }); + return iteratorFor(items) + }; + + Headers.prototype.entries = function() { + var items = []; + this.forEach(function(value, name) { items.push([name, value]); }); + return iteratorFor(items) + }; + + if (support.iterable) { + Headers.prototype[Symbol.iterator] = Headers.prototype.entries; + } + + function consumed(body) { + if (body.bodyUsed) { + return Promise.reject(new TypeError('Already read')) + } + body.bodyUsed = true; + } + + function fileReaderReady(reader) { + return new Promise(function(resolve, reject) { + reader.onload = function() { + resolve(reader.result); + }; + reader.onerror = function() { + reject(reader.error); + }; + }) + } + + function readBlobAsArrayBuffer(blob) { + var reader = new FileReader(); + var promise = fileReaderReady(reader); + reader.readAsArrayBuffer(blob); + return promise + } + + function readBlobAsText(blob) { + var reader = new FileReader(); + var promise = fileReaderReady(reader); + reader.readAsText(blob); + return promise + } + + function readArrayBufferAsText(buf) { + var view = new Uint8Array(buf); + var chars = new Array(view.length); + + for (var i = 0; i < view.length; i++) { + chars[i] = String.fromCharCode(view[i]); + } + return chars.join('') + } + + function bufferClone(buf) { + if (buf.slice) { + return buf.slice(0) + } else { + var view = new Uint8Array(buf.byteLength); + view.set(new Uint8Array(buf)); + return view.buffer + } + } + + function Body() { + this.bodyUsed = false; + + this._initBody = function(body) { + this._bodyInit = body; + if (!body) { + this._bodyText = ''; + } else if (typeof body === 'string') { + this._bodyText = body; + } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { + this._bodyBlob = body; + } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { + this._bodyFormData = body; + } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { + this._bodyText = body.toString(); + } else if (support.arrayBuffer && support.blob && isDataView(body)) { + this._bodyArrayBuffer = bufferClone(body.buffer); + // IE 10-11 can't handle a DataView body. + this._bodyInit = new Blob([this._bodyArrayBuffer]); + } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { + this._bodyArrayBuffer = bufferClone(body); + } else { + throw new Error('unsupported BodyInit type') + } + + if (!this.headers.get('content-type')) { + if (typeof body === 'string') { + this.headers.set('content-type', 'text/plain;charset=UTF-8'); + } else if (this._bodyBlob && this._bodyBlob.type) { + this.headers.set('content-type', this._bodyBlob.type); + } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { + this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); + } + } + }; + + if (support.blob) { + this.blob = function() { + var rejected = consumed(this); + if (rejected) { + return rejected + } + + if (this._bodyBlob) { + return Promise.resolve(this._bodyBlob) + } else if (this._bodyArrayBuffer) { + return Promise.resolve(new Blob([this._bodyArrayBuffer])) + } else if (this._bodyFormData) { + throw new Error('could not read FormData body as blob') + } else { + return Promise.resolve(new Blob([this._bodyText])) + } + }; + + this.arrayBuffer = function() { + if (this._bodyArrayBuffer) { + return consumed(this) || Promise.resolve(this._bodyArrayBuffer) + } else { + return this.blob().then(readBlobAsArrayBuffer) + } + }; + } + + this.text = function() { + var rejected = consumed(this); + if (rejected) { + return rejected + } + + if (this._bodyBlob) { + return readBlobAsText(this._bodyBlob) + } else if (this._bodyArrayBuffer) { + return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) + } else if (this._bodyFormData) { + throw new Error('could not read FormData body as text') + } else { + return Promise.resolve(this._bodyText) + } + }; + + if (support.formData) { + this.formData = function() { + return this.text().then(decode) + }; + } + + this.json = function() { + return this.text().then(JSON.parse) + }; + + return this + } + + // HTTP methods whose capitalization should be normalized + var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']; + + function normalizeMethod(method) { + var upcased = method.toUpperCase(); + return (methods.indexOf(upcased) > -1) ? upcased : method + } + + function Request(input, options) { + options = options || {}; + var body = options.body; + + if (input instanceof Request) { + if (input.bodyUsed) { + throw new TypeError('Already read') + } + this.url = input.url; + this.credentials = input.credentials; + if (!options.headers) { + this.headers = new Headers(input.headers); + } + this.method = input.method; + this.mode = input.mode; + if (!body && input._bodyInit != null) { + body = input._bodyInit; + input.bodyUsed = true; + } + } else { + this.url = String(input); + } + + this.credentials = options.credentials || this.credentials || 'omit'; + if (options.headers || !this.headers) { + this.headers = new Headers(options.headers); + } + this.method = normalizeMethod(options.method || this.method || 'GET'); + this.mode = options.mode || this.mode || null; + this.referrer = null; + + if ((this.method === 'GET' || this.method === 'HEAD') && body) { + throw new TypeError('Body not allowed for GET or HEAD requests') + } + this._initBody(body); + } + + Request.prototype.clone = function() { + return new Request(this, { body: this._bodyInit }) + }; + + function decode(body) { + var form = new FormData(); + body.trim().split('&').forEach(function(bytes) { + if (bytes) { + var split = bytes.split('='); + var name = split.shift().replace(/\+/g, ' '); + var value = split.join('=').replace(/\+/g, ' '); + form.append(decodeURIComponent(name), decodeURIComponent(value)); + } + }); + return form + } + + function parseHeaders(rawHeaders) { + var headers = new Headers(); + // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space + // https://tools.ietf.org/html/rfc7230#section-3.2 + var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' '); + preProcessedHeaders.split(/\r?\n/).forEach(function(line) { + var parts = line.split(':'); + var key = parts.shift().trim(); + if (key) { + var value = parts.join(':').trim(); + headers.append(key, value); + } + }); + return headers + } + + Body.call(Request.prototype); + + function Response(bodyInit, options) { + if (!options) { + options = {}; + } + + this.type = 'default'; + this.status = options.status === undefined ? 200 : options.status; + this.ok = this.status >= 200 && this.status < 300; + this.statusText = 'statusText' in options ? options.statusText : 'OK'; + this.headers = new Headers(options.headers); + this.url = options.url || ''; + this._initBody(bodyInit); + } + + Body.call(Response.prototype); + + Response.prototype.clone = function() { + return new Response(this._bodyInit, { + status: this.status, + statusText: this.statusText, + headers: new Headers(this.headers), + url: this.url + }) + }; + + Response.error = function() { + var response = new Response(null, {status: 0, statusText: ''}); + response.type = 'error'; + return response + }; + + var redirectStatuses = [301, 302, 303, 307, 308]; + + Response.redirect = function(url, status) { + if (redirectStatuses.indexOf(status) === -1) { + throw new RangeError('Invalid status code') + } + + return new Response(null, {status: status, headers: {location: url}}) + }; + + self.Headers = Headers; + self.Request = Request; + self.Response = Response; + + self.fetch = function(input, init) { + return new Promise(function(resolve, reject) { + var request = new Request(input, init); + var xhr = new XMLHttpRequest(); + + xhr.onload = function() { + var options = { + status: xhr.status, + statusText: xhr.statusText, + headers: parseHeaders(xhr.getAllResponseHeaders() || '') + }; + options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL'); + var body = 'response' in xhr ? xhr.response : xhr.responseText; + resolve(new Response(body, options)); + }; + + xhr.onerror = function() { + reject(new TypeError('Network request failed')); + }; + + xhr.ontimeout = function() { + reject(new TypeError('Network request failed')); + }; + + xhr.open(request.method, request.url, true); + + if (request.credentials === 'include') { + xhr.withCredentials = true; + } else if (request.credentials === 'omit') { + xhr.withCredentials = false; + } + + if ('responseType' in xhr && support.blob) { + xhr.responseType = 'blob'; + } + + request.headers.forEach(function(value, name) { + xhr.setRequestHeader(name, value); + }); + + xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit); + }) + }; + self.fetch.polyfill = true; +})(typeof self !== 'undefined' ? self : this); +}).call(__root__, void(0)); +var fetch = __root__.fetch; +var Response = fetch.Response = __root__.Response; +var Request = fetch.Request = __root__.Request; +var Headers = fetch.Headers = __root__.Headers; +if (typeof module === 'object' && module.exports) { +module.exports = fetch; +// Needed for TypeScript consumers without esModuleInterop. +module.exports.default = fetch; +} + +},{}],97:[function(require,module,exports){ +'use strict' + +exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes') +exports.createHash = exports.Hash = require('create-hash') +exports.createHmac = exports.Hmac = require('create-hmac') + +var algos = require('browserify-sign/algos') +var algoKeys = Object.keys(algos) +var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys) +exports.getHashes = function () { + return hashes +} + +var p = require('pbkdf2') +exports.pbkdf2 = p.pbkdf2 +exports.pbkdf2Sync = p.pbkdf2Sync + +var aes = require('browserify-cipher') + +exports.Cipher = aes.Cipher +exports.createCipher = aes.createCipher +exports.Cipheriv = aes.Cipheriv +exports.createCipheriv = aes.createCipheriv +exports.Decipher = aes.Decipher +exports.createDecipher = aes.createDecipher +exports.Decipheriv = aes.Decipheriv +exports.createDecipheriv = aes.createDecipheriv +exports.getCiphers = aes.getCiphers +exports.listCiphers = aes.listCiphers + +var dh = require('diffie-hellman') + +exports.DiffieHellmanGroup = dh.DiffieHellmanGroup +exports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup +exports.getDiffieHellman = dh.getDiffieHellman +exports.createDiffieHellman = dh.createDiffieHellman +exports.DiffieHellman = dh.DiffieHellman + +var sign = require('browserify-sign') + +exports.createSign = sign.createSign +exports.Sign = sign.Sign +exports.createVerify = sign.createVerify +exports.Verify = sign.Verify + +exports.createECDH = require('create-ecdh') + +var publicEncrypt = require('public-encrypt') + +exports.publicEncrypt = publicEncrypt.publicEncrypt +exports.privateEncrypt = publicEncrypt.privateEncrypt +exports.publicDecrypt = publicEncrypt.publicDecrypt +exports.privateDecrypt = publicEncrypt.privateDecrypt + +// the least I can do is make error messages for the rest of the node.js/crypto api. +// ;[ +// 'createCredentials' +// ].forEach(function (name) { +// exports[name] = function () { +// throw new Error([ +// 'sorry, ' + name + ' is not implemented yet', +// 'we accept pull requests', +// 'https://github.com/crypto-browserify/crypto-browserify' +// ].join('\n')) +// } +// }) + +var rf = require('randomfill') + +exports.randomFill = rf.randomFill +exports.randomFillSync = rf.randomFillSync + +exports.createCredentials = function () { + throw new Error([ + 'sorry, createCredentials is not implemented yet', + 'we accept pull requests', + 'https://github.com/crypto-browserify/crypto-browserify' + ].join('\n')) +} + +exports.constants = { + 'DH_CHECK_P_NOT_SAFE_PRIME': 2, + 'DH_CHECK_P_NOT_PRIME': 1, + 'DH_UNABLE_TO_CHECK_GENERATOR': 4, + 'DH_NOT_SUITABLE_GENERATOR': 8, + 'NPN_ENABLED': 1, + 'ALPN_ENABLED': 1, + 'RSA_PKCS1_PADDING': 1, + 'RSA_SSLV23_PADDING': 2, + 'RSA_NO_PADDING': 3, + 'RSA_PKCS1_OAEP_PADDING': 4, + 'RSA_X931_PADDING': 5, + 'RSA_PKCS1_PSS_PADDING': 6, + 'POINT_CONVERSION_COMPRESSED': 2, + 'POINT_CONVERSION_UNCOMPRESSED': 4, + 'POINT_CONVERSION_HYBRID': 6 +} + +},{"browserify-cipher":73,"browserify-sign":80,"browserify-sign/algos":77,"create-ecdh":90,"create-hash":91,"create-hmac":94,"diffie-hellman":105,"pbkdf2":247,"public-encrypt":259,"randombytes":270,"randomfill":271}],98:[function(require,module,exports){ +'use strict'; +var token = '%[a-f0-9]{2}'; +var singleMatcher = new RegExp(token, 'gi'); +var multiMatcher = new RegExp('(' + token + ')+', 'gi'); + +function decodeComponents(components, split) { + try { + // Try to decode the entire string first + return decodeURIComponent(components.join('')); + } catch (err) { + // Do nothing + } + + if (components.length === 1) { + return components; + } + + split = split || 1; + + // Split the array in 2 parts + var left = components.slice(0, split); + var right = components.slice(split); + + return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right)); +} + +function decode(input) { + try { + return decodeURIComponent(input); + } catch (err) { + var tokens = input.match(singleMatcher); + + for (var i = 1; i < tokens.length; i++) { + input = decodeComponents(tokens, i).join(''); + + tokens = input.match(singleMatcher); + } + + return input; + } +} + +function customDecodeURIComponent(input) { + // Keep track of all the replacements and prefill the map with the `BOM` + var replaceMap = { + '%FE%FF': '\uFFFD\uFFFD', + '%FF%FE': '\uFFFD\uFFFD' + }; + + var match = multiMatcher.exec(input); + while (match) { + try { + // Decode as big chunks as possible + replaceMap[match[0]] = decodeURIComponent(match[0]); + } catch (err) { + var result = decode(match[0]); + + if (result !== match[0]) { + replaceMap[match[0]] = result; + } + } + + match = multiMatcher.exec(input); + } + + // Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else + replaceMap['%C2'] = '\uFFFD'; + + var entries = Object.keys(replaceMap); + + for (var i = 0; i < entries.length; i++) { + // Replace all decoded components + var key = entries[i]; + input = input.replace(new RegExp(key, 'g'), replaceMap[key]); + } + + return input; +} + +module.exports = function (encodedURI) { + if (typeof encodedURI !== 'string') { + throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`'); + } + + try { + encodedURI = encodedURI.replace(/\+/g, ' '); + + // Try the built in decoder first + return decodeURIComponent(encodedURI); + } catch (err) { + // Fallback to a more advanced decoder + return customDecodeURIComponent(encodedURI); + } +}; + +},{}],99:[function(require,module,exports){ +'use strict'; + +exports.utils = require('./des/utils'); +exports.Cipher = require('./des/cipher'); +exports.DES = require('./des/des'); +exports.CBC = require('./des/cbc'); +exports.EDE = require('./des/ede'); + +},{"./des/cbc":100,"./des/cipher":101,"./des/des":102,"./des/ede":103,"./des/utils":104}],100:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); +var inherits = require('inherits'); + +var proto = {}; + +function CBCState(iv) { + assert.equal(iv.length, 8, 'Invalid IV length'); + + this.iv = new Array(8); + for (var i = 0; i < this.iv.length; i++) + this.iv[i] = iv[i]; +} + +function instantiate(Base) { + function CBC(options) { + Base.call(this, options); + this._cbcInit(); + } + inherits(CBC, Base); + + var keys = Object.keys(proto); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + CBC.prototype[key] = proto[key]; + } + + CBC.create = function create(options) { + return new CBC(options); + }; + + return CBC; +} + +exports.instantiate = instantiate; + +proto._cbcInit = function _cbcInit() { + var state = new CBCState(this.options.iv); + this._cbcState = state; +}; + +proto._update = function _update(inp, inOff, out, outOff) { + var state = this._cbcState; + var superProto = this.constructor.super_.prototype; + + var iv = state.iv; + if (this.type === 'encrypt') { + for (var i = 0; i < this.blockSize; i++) + iv[i] ^= inp[inOff + i]; + + superProto._update.call(this, iv, 0, out, outOff); + + for (var i = 0; i < this.blockSize; i++) + iv[i] = out[outOff + i]; + } else { + superProto._update.call(this, inp, inOff, out, outOff); + + for (var i = 0; i < this.blockSize; i++) + out[outOff + i] ^= iv[i]; + + for (var i = 0; i < this.blockSize; i++) + iv[i] = inp[inOff + i]; + } +}; + +},{"inherits":180,"minimalistic-assert":234}],101:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); + +function Cipher(options) { + this.options = options; + + this.type = this.options.type; + this.blockSize = 8; + this._init(); + + this.buffer = new Array(this.blockSize); + this.bufferOff = 0; +} +module.exports = Cipher; + +Cipher.prototype._init = function _init() { + // Might be overrided +}; + +Cipher.prototype.update = function update(data) { + if (data.length === 0) + return []; + + if (this.type === 'decrypt') + return this._updateDecrypt(data); + else + return this._updateEncrypt(data); +}; + +Cipher.prototype._buffer = function _buffer(data, off) { + // Append data to buffer + var min = Math.min(this.buffer.length - this.bufferOff, data.length - off); + for (var i = 0; i < min; i++) + this.buffer[this.bufferOff + i] = data[off + i]; + this.bufferOff += min; + + // Shift next + return min; +}; + +Cipher.prototype._flushBuffer = function _flushBuffer(out, off) { + this._update(this.buffer, 0, out, off); + this.bufferOff = 0; + return this.blockSize; +}; + +Cipher.prototype._updateEncrypt = function _updateEncrypt(data) { + var inputOff = 0; + var outputOff = 0; + + var count = ((this.bufferOff + data.length) / this.blockSize) | 0; + var out = new Array(count * this.blockSize); + + if (this.bufferOff !== 0) { + inputOff += this._buffer(data, inputOff); + + if (this.bufferOff === this.buffer.length) + outputOff += this._flushBuffer(out, outputOff); + } + + // Write blocks + var max = data.length - ((data.length - inputOff) % this.blockSize); + for (; inputOff < max; inputOff += this.blockSize) { + this._update(data, inputOff, out, outputOff); + outputOff += this.blockSize; + } + + // Queue rest + for (; inputOff < data.length; inputOff++, this.bufferOff++) + this.buffer[this.bufferOff] = data[inputOff]; + + return out; +}; + +Cipher.prototype._updateDecrypt = function _updateDecrypt(data) { + var inputOff = 0; + var outputOff = 0; + + var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1; + var out = new Array(count * this.blockSize); + + // TODO(indutny): optimize it, this is far from optimal + for (; count > 0; count--) { + inputOff += this._buffer(data, inputOff); + outputOff += this._flushBuffer(out, outputOff); + } + + // Buffer rest of the input + inputOff += this._buffer(data, inputOff); + + return out; +}; + +Cipher.prototype.final = function final(buffer) { + var first; + if (buffer) + first = this.update(buffer); + + var last; + if (this.type === 'encrypt') + last = this._finalEncrypt(); + else + last = this._finalDecrypt(); + + if (first) + return first.concat(last); + else + return last; +}; + +Cipher.prototype._pad = function _pad(buffer, off) { + if (off === 0) + return false; + + while (off < buffer.length) + buffer[off++] = 0; + + return true; +}; + +Cipher.prototype._finalEncrypt = function _finalEncrypt() { + if (!this._pad(this.buffer, this.bufferOff)) + return []; + + var out = new Array(this.blockSize); + this._update(this.buffer, 0, out, 0); + return out; +}; + +Cipher.prototype._unpad = function _unpad(buffer) { + return buffer; +}; + +Cipher.prototype._finalDecrypt = function _finalDecrypt() { + assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt'); + var out = new Array(this.blockSize); + this._flushBuffer(out, 0); + + return this._unpad(out); +}; + +},{"minimalistic-assert":234}],102:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); +var inherits = require('inherits'); + +var des = require('../des'); +var utils = des.utils; +var Cipher = des.Cipher; + +function DESState() { + this.tmp = new Array(2); + this.keys = null; +} + +function DES(options) { + Cipher.call(this, options); + + var state = new DESState(); + this._desState = state; + + this.deriveKeys(state, options.key); +} +inherits(DES, Cipher); +module.exports = DES; + +DES.create = function create(options) { + return new DES(options); +}; + +var shiftTable = [ + 1, 1, 2, 2, 2, 2, 2, 2, + 1, 2, 2, 2, 2, 2, 2, 1 +]; + +DES.prototype.deriveKeys = function deriveKeys(state, key) { + state.keys = new Array(16 * 2); + + assert.equal(key.length, this.blockSize, 'Invalid key length'); + + var kL = utils.readUInt32BE(key, 0); + var kR = utils.readUInt32BE(key, 4); + + utils.pc1(kL, kR, state.tmp, 0); + kL = state.tmp[0]; + kR = state.tmp[1]; + for (var i = 0; i < state.keys.length; i += 2) { + var shift = shiftTable[i >>> 1]; + kL = utils.r28shl(kL, shift); + kR = utils.r28shl(kR, shift); + utils.pc2(kL, kR, state.keys, i); + } +}; + +DES.prototype._update = function _update(inp, inOff, out, outOff) { + var state = this._desState; + + var l = utils.readUInt32BE(inp, inOff); + var r = utils.readUInt32BE(inp, inOff + 4); + + // Initial Permutation + utils.ip(l, r, state.tmp, 0); + l = state.tmp[0]; + r = state.tmp[1]; + + if (this.type === 'encrypt') + this._encrypt(state, l, r, state.tmp, 0); + else + this._decrypt(state, l, r, state.tmp, 0); + + l = state.tmp[0]; + r = state.tmp[1]; + + utils.writeUInt32BE(out, l, outOff); + utils.writeUInt32BE(out, r, outOff + 4); +}; + +DES.prototype._pad = function _pad(buffer, off) { + var value = buffer.length - off; + for (var i = off; i < buffer.length; i++) + buffer[i] = value; + + return true; +}; + +DES.prototype._unpad = function _unpad(buffer) { + var pad = buffer[buffer.length - 1]; + for (var i = buffer.length - pad; i < buffer.length; i++) + assert.equal(buffer[i], pad); + + return buffer.slice(0, buffer.length - pad); +}; + +DES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) { + var l = lStart; + var r = rStart; + + // Apply f() x16 times + for (var i = 0; i < state.keys.length; i += 2) { + var keyL = state.keys[i]; + var keyR = state.keys[i + 1]; + + // f(r, k) + utils.expand(r, state.tmp, 0); + + keyL ^= state.tmp[0]; + keyR ^= state.tmp[1]; + var s = utils.substitute(keyL, keyR); + var f = utils.permute(s); + + var t = r; + r = (l ^ f) >>> 0; + l = t; + } + + // Reverse Initial Permutation + utils.rip(r, l, out, off); +}; + +DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) { + var l = rStart; + var r = lStart; + + // Apply f() x16 times + for (var i = state.keys.length - 2; i >= 0; i -= 2) { + var keyL = state.keys[i]; + var keyR = state.keys[i + 1]; + + // f(r, k) + utils.expand(l, state.tmp, 0); + + keyL ^= state.tmp[0]; + keyR ^= state.tmp[1]; + var s = utils.substitute(keyL, keyR); + var f = utils.permute(s); + + var t = l; + l = (r ^ f) >>> 0; + r = t; + } + + // Reverse Initial Permutation + utils.rip(l, r, out, off); +}; + +},{"../des":99,"inherits":180,"minimalistic-assert":234}],103:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); +var inherits = require('inherits'); + +var des = require('../des'); +var Cipher = des.Cipher; +var DES = des.DES; + +function EDEState(type, key) { + assert.equal(key.length, 24, 'Invalid key length'); + + var k1 = key.slice(0, 8); + var k2 = key.slice(8, 16); + var k3 = key.slice(16, 24); + + if (type === 'encrypt') { + this.ciphers = [ + DES.create({ type: 'encrypt', key: k1 }), + DES.create({ type: 'decrypt', key: k2 }), + DES.create({ type: 'encrypt', key: k3 }) + ]; + } else { + this.ciphers = [ + DES.create({ type: 'decrypt', key: k3 }), + DES.create({ type: 'encrypt', key: k2 }), + DES.create({ type: 'decrypt', key: k1 }) + ]; + } +} + +function EDE(options) { + Cipher.call(this, options); + + var state = new EDEState(this.type, this.options.key); + this._edeState = state; +} +inherits(EDE, Cipher); + +module.exports = EDE; + +EDE.create = function create(options) { + return new EDE(options); +}; + +EDE.prototype._update = function _update(inp, inOff, out, outOff) { + var state = this._edeState; + + state.ciphers[0]._update(inp, inOff, out, outOff); + state.ciphers[1]._update(out, outOff, out, outOff); + state.ciphers[2]._update(out, outOff, out, outOff); +}; + +EDE.prototype._pad = DES.prototype._pad; +EDE.prototype._unpad = DES.prototype._unpad; + +},{"../des":99,"inherits":180,"minimalistic-assert":234}],104:[function(require,module,exports){ +'use strict'; + +exports.readUInt32BE = function readUInt32BE(bytes, off) { + var res = (bytes[0 + off] << 24) | + (bytes[1 + off] << 16) | + (bytes[2 + off] << 8) | + bytes[3 + off]; + return res >>> 0; +}; + +exports.writeUInt32BE = function writeUInt32BE(bytes, value, off) { + bytes[0 + off] = value >>> 24; + bytes[1 + off] = (value >>> 16) & 0xff; + bytes[2 + off] = (value >>> 8) & 0xff; + bytes[3 + off] = value & 0xff; +}; + +exports.ip = function ip(inL, inR, out, off) { + var outL = 0; + var outR = 0; + + for (var i = 6; i >= 0; i -= 2) { + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inR >>> (j + i)) & 1; + } + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inL >>> (j + i)) & 1; + } + } + + for (var i = 6; i >= 0; i -= 2) { + for (var j = 1; j <= 25; j += 8) { + outR <<= 1; + outR |= (inR >>> (j + i)) & 1; + } + for (var j = 1; j <= 25; j += 8) { + outR <<= 1; + outR |= (inL >>> (j + i)) & 1; + } + } + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +exports.rip = function rip(inL, inR, out, off) { + var outL = 0; + var outR = 0; + + for (var i = 0; i < 4; i++) { + for (var j = 24; j >= 0; j -= 8) { + outL <<= 1; + outL |= (inR >>> (j + i)) & 1; + outL <<= 1; + outL |= (inL >>> (j + i)) & 1; + } + } + for (var i = 4; i < 8; i++) { + for (var j = 24; j >= 0; j -= 8) { + outR <<= 1; + outR |= (inR >>> (j + i)) & 1; + outR <<= 1; + outR |= (inL >>> (j + i)) & 1; + } + } + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +exports.pc1 = function pc1(inL, inR, out, off) { + var outL = 0; + var outR = 0; + + // 7, 15, 23, 31, 39, 47, 55, 63 + // 6, 14, 22, 30, 39, 47, 55, 63 + // 5, 13, 21, 29, 39, 47, 55, 63 + // 4, 12, 20, 28 + for (var i = 7; i >= 5; i--) { + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inR >> (j + i)) & 1; + } + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inL >> (j + i)) & 1; + } + } + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inR >> (j + i)) & 1; + } + + // 1, 9, 17, 25, 33, 41, 49, 57 + // 2, 10, 18, 26, 34, 42, 50, 58 + // 3, 11, 19, 27, 35, 43, 51, 59 + // 36, 44, 52, 60 + for (var i = 1; i <= 3; i++) { + for (var j = 0; j <= 24; j += 8) { + outR <<= 1; + outR |= (inR >> (j + i)) & 1; + } + for (var j = 0; j <= 24; j += 8) { + outR <<= 1; + outR |= (inL >> (j + i)) & 1; + } + } + for (var j = 0; j <= 24; j += 8) { + outR <<= 1; + outR |= (inL >> (j + i)) & 1; + } + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +exports.r28shl = function r28shl(num, shift) { + return ((num << shift) & 0xfffffff) | (num >>> (28 - shift)); +}; + +var pc2table = [ + // inL => outL + 14, 11, 17, 4, 27, 23, 25, 0, + 13, 22, 7, 18, 5, 9, 16, 24, + 2, 20, 12, 21, 1, 8, 15, 26, + + // inR => outR + 15, 4, 25, 19, 9, 1, 26, 16, + 5, 11, 23, 8, 12, 7, 17, 0, + 22, 3, 10, 14, 6, 20, 27, 24 +]; + +exports.pc2 = function pc2(inL, inR, out, off) { + var outL = 0; + var outR = 0; + + var len = pc2table.length >>> 1; + for (var i = 0; i < len; i++) { + outL <<= 1; + outL |= (inL >>> pc2table[i]) & 0x1; + } + for (var i = len; i < pc2table.length; i++) { + outR <<= 1; + outR |= (inR >>> pc2table[i]) & 0x1; + } + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +exports.expand = function expand(r, out, off) { + var outL = 0; + var outR = 0; + + outL = ((r & 1) << 5) | (r >>> 27); + for (var i = 23; i >= 15; i -= 4) { + outL <<= 6; + outL |= (r >>> i) & 0x3f; + } + for (var i = 11; i >= 3; i -= 4) { + outR |= (r >>> i) & 0x3f; + outR <<= 6; + } + outR |= ((r & 0x1f) << 1) | (r >>> 31); + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +var sTable = [ + 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1, + 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8, + 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7, + 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13, + + 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14, + 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5, + 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2, + 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9, + + 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10, + 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1, + 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7, + 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12, + + 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3, + 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9, + 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8, + 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14, + + 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1, + 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6, + 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13, + 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3, + + 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5, + 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8, + 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10, + 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13, + + 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10, + 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6, + 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7, + 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12, + + 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4, + 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2, + 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13, + 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11 +]; + +exports.substitute = function substitute(inL, inR) { + var out = 0; + for (var i = 0; i < 4; i++) { + var b = (inL >>> (18 - i * 6)) & 0x3f; + var sb = sTable[i * 0x40 + b]; + + out <<= 4; + out |= sb; + } + for (var i = 0; i < 4; i++) { + var b = (inR >>> (18 - i * 6)) & 0x3f; + var sb = sTable[4 * 0x40 + i * 0x40 + b]; + + out <<= 4; + out |= sb; + } + return out >>> 0; +}; + +var permuteTable = [ + 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22, + 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7 +]; + +exports.permute = function permute(num) { + var out = 0; + for (var i = 0; i < permuteTable.length; i++) { + out <<= 1; + out |= (num >>> permuteTable[i]) & 0x1; + } + return out >>> 0; +}; + +exports.padSplit = function padSplit(num, size, group) { + var str = num.toString(2); + while (str.length < size) + str = '0' + str; + + var out = []; + for (var i = 0; i < size; i += group) + out.push(str.slice(i, i + group)); + return out.join(' '); +}; + +},{}],105:[function(require,module,exports){ +(function (Buffer){ +var generatePrime = require('./lib/generatePrime') +var primes = require('./lib/primes.json') + +var DH = require('./lib/dh') + +function getDiffieHellman (mod) { + var prime = new Buffer(primes[mod].prime, 'hex') + var gen = new Buffer(primes[mod].gen, 'hex') + + return new DH(prime, gen) +} + +var ENCODINGS = { + 'binary': true, 'hex': true, 'base64': true +} + +function createDiffieHellman (prime, enc, generator, genc) { + if (Buffer.isBuffer(enc) || ENCODINGS[enc] === undefined) { + return createDiffieHellman(prime, 'binary', enc, generator) + } + + enc = enc || 'binary' + genc = genc || 'binary' + generator = generator || new Buffer([2]) + + if (!Buffer.isBuffer(generator)) { + generator = new Buffer(generator, genc) + } + + if (typeof prime === 'number') { + return new DH(generatePrime(prime, generator), generator, true) + } + + if (!Buffer.isBuffer(prime)) { + prime = new Buffer(prime, enc) + } + + return new DH(prime, generator, true) +} + +exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman +exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman + +}).call(this,require("buffer").Buffer) +},{"./lib/dh":106,"./lib/generatePrime":107,"./lib/primes.json":108,"buffer":84}],106:[function(require,module,exports){ +(function (Buffer){ +var BN = require('bn.js'); +var MillerRabin = require('miller-rabin'); +var millerRabin = new MillerRabin(); +var TWENTYFOUR = new BN(24); +var ELEVEN = new BN(11); +var TEN = new BN(10); +var THREE = new BN(3); +var SEVEN = new BN(7); +var primes = require('./generatePrime'); +var randomBytes = require('randombytes'); +module.exports = DH; + +function setPublicKey(pub, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(pub)) { + pub = new Buffer(pub, enc); + } + this._pub = new BN(pub); + return this; +} + +function setPrivateKey(priv, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(priv)) { + priv = new Buffer(priv, enc); + } + this._priv = new BN(priv); + return this; +} + +var primeCache = {}; +function checkPrime(prime, generator) { + var gen = generator.toString('hex'); + var hex = [gen, prime.toString(16)].join('_'); + if (hex in primeCache) { + return primeCache[hex]; + } + var error = 0; + + if (prime.isEven() || + !primes.simpleSieve || + !primes.fermatTest(prime) || + !millerRabin.test(prime)) { + //not a prime so +1 + error += 1; + + if (gen === '02' || gen === '05') { + // we'd be able to check the generator + // it would fail so +8 + error += 8; + } else { + //we wouldn't be able to test the generator + // so +4 + error += 4; + } + primeCache[hex] = error; + return error; + } + if (!millerRabin.test(prime.shrn(1))) { + //not a safe prime + error += 2; + } + var rem; + switch (gen) { + case '02': + if (prime.mod(TWENTYFOUR).cmp(ELEVEN)) { + // unsuidable generator + error += 8; + } + break; + case '05': + rem = prime.mod(TEN); + if (rem.cmp(THREE) && rem.cmp(SEVEN)) { + // prime mod 10 needs to equal 3 or 7 + error += 8; + } + break; + default: + error += 4; + } + primeCache[hex] = error; + return error; +} + +function DH(prime, generator, malleable) { + this.setGenerator(generator); + this.__prime = new BN(prime); + this._prime = BN.mont(this.__prime); + this._primeLen = prime.length; + this._pub = undefined; + this._priv = undefined; + this._primeCode = undefined; + if (malleable) { + this.setPublicKey = setPublicKey; + this.setPrivateKey = setPrivateKey; + } else { + this._primeCode = 8; + } +} +Object.defineProperty(DH.prototype, 'verifyError', { + enumerable: true, + get: function () { + if (typeof this._primeCode !== 'number') { + this._primeCode = checkPrime(this.__prime, this.__gen); + } + return this._primeCode; + } +}); +DH.prototype.generateKeys = function () { + if (!this._priv) { + this._priv = new BN(randomBytes(this._primeLen)); + } + this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed(); + return this.getPublicKey(); +}; + +DH.prototype.computeSecret = function (other) { + other = new BN(other); + other = other.toRed(this._prime); + var secret = other.redPow(this._priv).fromRed(); + var out = new Buffer(secret.toArray()); + var prime = this.getPrime(); + if (out.length < prime.length) { + var front = new Buffer(prime.length - out.length); + front.fill(0); + out = Buffer.concat([front, out]); + } + return out; +}; + +DH.prototype.getPublicKey = function getPublicKey(enc) { + return formatReturnValue(this._pub, enc); +}; + +DH.prototype.getPrivateKey = function getPrivateKey(enc) { + return formatReturnValue(this._priv, enc); +}; + +DH.prototype.getPrime = function (enc) { + return formatReturnValue(this.__prime, enc); +}; + +DH.prototype.getGenerator = function (enc) { + return formatReturnValue(this._gen, enc); +}; + +DH.prototype.setGenerator = function (gen, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(gen)) { + gen = new Buffer(gen, enc); + } + this.__gen = gen; + this._gen = new BN(gen); + return this; +}; + +function formatReturnValue(bn, enc) { + var buf = new Buffer(bn.toArray()); + if (!enc) { + return buf; + } else { + return buf.toString(enc); + } +} + +}).call(this,require("buffer").Buffer) +},{"./generatePrime":107,"bn.js":53,"buffer":84,"miller-rabin":233,"randombytes":270}],107:[function(require,module,exports){ +var randomBytes = require('randombytes'); +module.exports = findPrime; +findPrime.simpleSieve = simpleSieve; +findPrime.fermatTest = fermatTest; +var BN = require('bn.js'); +var TWENTYFOUR = new BN(24); +var MillerRabin = require('miller-rabin'); +var millerRabin = new MillerRabin(); +var ONE = new BN(1); +var TWO = new BN(2); +var FIVE = new BN(5); +var SIXTEEN = new BN(16); +var EIGHT = new BN(8); +var TEN = new BN(10); +var THREE = new BN(3); +var SEVEN = new BN(7); +var ELEVEN = new BN(11); +var FOUR = new BN(4); +var TWELVE = new BN(12); +var primes = null; + +function _getPrimes() { + if (primes !== null) + return primes; + + var limit = 0x100000; + var res = []; + res[0] = 2; + for (var i = 1, k = 3; k < limit; k += 2) { + var sqrt = Math.ceil(Math.sqrt(k)); + for (var j = 0; j < i && res[j] <= sqrt; j++) + if (k % res[j] === 0) + break; + + if (i !== j && res[j] <= sqrt) + continue; + + res[i++] = k; + } + primes = res; + return res; +} + +function simpleSieve(p) { + var primes = _getPrimes(); + + for (var i = 0; i < primes.length; i++) + if (p.modn(primes[i]) === 0) { + if (p.cmpn(primes[i]) === 0) { + return true; + } else { + return false; + } + } + + return true; +} + +function fermatTest(p) { + var red = BN.mont(p); + return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0; +} + +function findPrime(bits, gen) { + if (bits < 16) { + // this is what openssl does + if (gen === 2 || gen === 5) { + return new BN([0x8c, 0x7b]); + } else { + return new BN([0x8c, 0x27]); + } + } + gen = new BN(gen); + + var num, n2; + + while (true) { + num = new BN(randomBytes(Math.ceil(bits / 8))); + while (num.bitLength() > bits) { + num.ishrn(1); + } + if (num.isEven()) { + num.iadd(ONE); + } + if (!num.testn(1)) { + num.iadd(TWO); + } + if (!gen.cmp(TWO)) { + while (num.mod(TWENTYFOUR).cmp(ELEVEN)) { + num.iadd(FOUR); + } + } else if (!gen.cmp(FIVE)) { + while (num.mod(TEN).cmp(THREE)) { + num.iadd(FOUR); + } + } + n2 = num.shrn(1); + if (simpleSieve(n2) && simpleSieve(num) && + fermatTest(n2) && fermatTest(num) && + millerRabin.test(n2) && millerRabin.test(num)) { + return num; + } + } + +} + +},{"bn.js":53,"miller-rabin":233,"randombytes":270}],108:[function(require,module,exports){ +module.exports={ + "modp1": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff" + }, + "modp2": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff" + }, + "modp5": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff" + }, + "modp14": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff" + }, + "modp15": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff" + }, + "modp16": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff" + }, + "modp17": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff" + }, + "modp18": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff" + } +} +},{}],109:[function(require,module,exports){ +'use strict'; + +var elliptic = exports; + +elliptic.version = require('../package.json').version; +elliptic.utils = require('./elliptic/utils'); +elliptic.rand = require('brorand'); +elliptic.curve = require('./elliptic/curve'); +elliptic.curves = require('./elliptic/curves'); + +// Protocols +elliptic.ec = require('./elliptic/ec'); +elliptic.eddsa = require('./elliptic/eddsa'); + +},{"../package.json":124,"./elliptic/curve":112,"./elliptic/curves":115,"./elliptic/ec":116,"./elliptic/eddsa":119,"./elliptic/utils":123,"brorand":54}],110:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var getNAF = utils.getNAF; +var getJSF = utils.getJSF; +var assert = utils.assert; + +function BaseCurve(type, conf) { + this.type = type; + this.p = new BN(conf.p, 16); + + // Use Montgomery, when there is no fast reduction for the prime + this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p); + + // Useful for many curves + this.zero = new BN(0).toRed(this.red); + this.one = new BN(1).toRed(this.red); + this.two = new BN(2).toRed(this.red); + + // Curve configuration, optional + this.n = conf.n && new BN(conf.n, 16); + this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed); + + // Temporary arrays + this._wnafT1 = new Array(4); + this._wnafT2 = new Array(4); + this._wnafT3 = new Array(4); + this._wnafT4 = new Array(4); + + // Generalized Greg Maxwell's trick + var adjustCount = this.n && this.p.div(this.n); + if (!adjustCount || adjustCount.cmpn(100) > 0) { + this.redN = null; + } else { + this._maxwellTrick = true; + this.redN = this.n.toRed(this.red); + } +} +module.exports = BaseCurve; + +BaseCurve.prototype.point = function point() { + throw new Error('Not implemented'); +}; + +BaseCurve.prototype.validate = function validate() { + throw new Error('Not implemented'); +}; + +BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) { + assert(p.precomputed); + var doubles = p._getDoubles(); + + var naf = getNAF(k, 1); + var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1); + I /= 3; + + // Translate into more windowed form + var repr = []; + for (var j = 0; j < naf.length; j += doubles.step) { + var nafW = 0; + for (var k = j + doubles.step - 1; k >= j; k--) + nafW = (nafW << 1) + naf[k]; + repr.push(nafW); + } + + var a = this.jpoint(null, null, null); + var b = this.jpoint(null, null, null); + for (var i = I; i > 0; i--) { + for (var j = 0; j < repr.length; j++) { + var nafW = repr[j]; + if (nafW === i) + b = b.mixedAdd(doubles.points[j]); + else if (nafW === -i) + b = b.mixedAdd(doubles.points[j].neg()); + } + a = a.add(b); + } + return a.toP(); +}; + +BaseCurve.prototype._wnafMul = function _wnafMul(p, k) { + var w = 4; + + // Precompute window + var nafPoints = p._getNAFPoints(w); + w = nafPoints.wnd; + var wnd = nafPoints.points; + + // Get NAF form + var naf = getNAF(k, w); + + // Add `this`*(N+1) for every w-NAF index + var acc = this.jpoint(null, null, null); + for (var i = naf.length - 1; i >= 0; i--) { + // Count zeroes + for (var k = 0; i >= 0 && naf[i] === 0; i--) + k++; + if (i >= 0) + k++; + acc = acc.dblp(k); + + if (i < 0) + break; + var z = naf[i]; + assert(z !== 0); + if (p.type === 'affine') { + // J +- P + if (z > 0) + acc = acc.mixedAdd(wnd[(z - 1) >> 1]); + else + acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg()); + } else { + // J +- J + if (z > 0) + acc = acc.add(wnd[(z - 1) >> 1]); + else + acc = acc.add(wnd[(-z - 1) >> 1].neg()); + } + } + return p.type === 'affine' ? acc.toP() : acc; +}; + +BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, + points, + coeffs, + len, + jacobianResult) { + var wndWidth = this._wnafT1; + var wnd = this._wnafT2; + var naf = this._wnafT3; + + // Fill all arrays + var max = 0; + for (var i = 0; i < len; i++) { + var p = points[i]; + var nafPoints = p._getNAFPoints(defW); + wndWidth[i] = nafPoints.wnd; + wnd[i] = nafPoints.points; + } + + // Comb small window NAFs + for (var i = len - 1; i >= 1; i -= 2) { + var a = i - 1; + var b = i; + if (wndWidth[a] !== 1 || wndWidth[b] !== 1) { + naf[a] = getNAF(coeffs[a], wndWidth[a]); + naf[b] = getNAF(coeffs[b], wndWidth[b]); + max = Math.max(naf[a].length, max); + max = Math.max(naf[b].length, max); + continue; + } + + var comb = [ + points[a], /* 1 */ + null, /* 3 */ + null, /* 5 */ + points[b] /* 7 */ + ]; + + // Try to avoid Projective points, if possible + if (points[a].y.cmp(points[b].y) === 0) { + comb[1] = points[a].add(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].add(points[b].neg()); + } else { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } + + var index = [ + -3, /* -1 -1 */ + -1, /* -1 0 */ + -5, /* -1 1 */ + -7, /* 0 -1 */ + 0, /* 0 0 */ + 7, /* 0 1 */ + 5, /* 1 -1 */ + 1, /* 1 0 */ + 3 /* 1 1 */ + ]; + + var jsf = getJSF(coeffs[a], coeffs[b]); + max = Math.max(jsf[0].length, max); + naf[a] = new Array(max); + naf[b] = new Array(max); + for (var j = 0; j < max; j++) { + var ja = jsf[0][j] | 0; + var jb = jsf[1][j] | 0; + + naf[a][j] = index[(ja + 1) * 3 + (jb + 1)]; + naf[b][j] = 0; + wnd[a] = comb; + } + } + + var acc = this.jpoint(null, null, null); + var tmp = this._wnafT4; + for (var i = max; i >= 0; i--) { + var k = 0; + + while (i >= 0) { + var zero = true; + for (var j = 0; j < len; j++) { + tmp[j] = naf[j][i] | 0; + if (tmp[j] !== 0) + zero = false; + } + if (!zero) + break; + k++; + i--; + } + if (i >= 0) + k++; + acc = acc.dblp(k); + if (i < 0) + break; + + for (var j = 0; j < len; j++) { + var z = tmp[j]; + var p; + if (z === 0) + continue; + else if (z > 0) + p = wnd[j][(z - 1) >> 1]; + else if (z < 0) + p = wnd[j][(-z - 1) >> 1].neg(); + + if (p.type === 'affine') + acc = acc.mixedAdd(p); + else + acc = acc.add(p); + } + } + // Zeroify references + for (var i = 0; i < len; i++) + wnd[i] = null; + + if (jacobianResult) + return acc; + else + return acc.toP(); +}; + +function BasePoint(curve, type) { + this.curve = curve; + this.type = type; + this.precomputed = null; +} +BaseCurve.BasePoint = BasePoint; + +BasePoint.prototype.eq = function eq(/*other*/) { + throw new Error('Not implemented'); +}; + +BasePoint.prototype.validate = function validate() { + return this.curve.validate(this); +}; + +BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) { + bytes = utils.toArray(bytes, enc); + + var len = this.p.byteLength(); + + // uncompressed, hybrid-odd, hybrid-even + if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && + bytes.length - 1 === 2 * len) { + if (bytes[0] === 0x06) + assert(bytes[bytes.length - 1] % 2 === 0); + else if (bytes[0] === 0x07) + assert(bytes[bytes.length - 1] % 2 === 1); + + var res = this.point(bytes.slice(1, 1 + len), + bytes.slice(1 + len, 1 + 2 * len)); + + return res; + } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && + bytes.length - 1 === len) { + return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03); + } + throw new Error('Unknown point format'); +}; + +BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) { + return this.encode(enc, true); +}; + +BasePoint.prototype._encode = function _encode(compact) { + var len = this.curve.p.byteLength(); + var x = this.getX().toArray('be', len); + + if (compact) + return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x); + + return [ 0x04 ].concat(x, this.getY().toArray('be', len)) ; +}; + +BasePoint.prototype.encode = function encode(enc, compact) { + return utils.encode(this._encode(compact), enc); +}; + +BasePoint.prototype.precompute = function precompute(power) { + if (this.precomputed) + return this; + + var precomputed = { + doubles: null, + naf: null, + beta: null + }; + precomputed.naf = this._getNAFPoints(8); + precomputed.doubles = this._getDoubles(4, power); + precomputed.beta = this._getBeta(); + this.precomputed = precomputed; + + return this; +}; + +BasePoint.prototype._hasDoubles = function _hasDoubles(k) { + if (!this.precomputed) + return false; + + var doubles = this.precomputed.doubles; + if (!doubles) + return false; + + return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step); +}; + +BasePoint.prototype._getDoubles = function _getDoubles(step, power) { + if (this.precomputed && this.precomputed.doubles) + return this.precomputed.doubles; + + var doubles = [ this ]; + var acc = this; + for (var i = 0; i < power; i += step) { + for (var j = 0; j < step; j++) + acc = acc.dbl(); + doubles.push(acc); + } + return { + step: step, + points: doubles + }; +}; + +BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) { + if (this.precomputed && this.precomputed.naf) + return this.precomputed.naf; + + var res = [ this ]; + var max = (1 << wnd) - 1; + var dbl = max === 1 ? null : this.dbl(); + for (var i = 1; i < max; i++) + res[i] = res[i - 1].add(dbl); + return { + wnd: wnd, + points: res + }; +}; + +BasePoint.prototype._getBeta = function _getBeta() { + return null; +}; + +BasePoint.prototype.dblp = function dblp(k) { + var r = this; + for (var i = 0; i < k; i++) + r = r.dbl(); + return r; +}; + +},{"../../elliptic":109,"bn.js":53}],111:[function(require,module,exports){ +'use strict'; + +var curve = require('../curve'); +var elliptic = require('../../elliptic'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = curve.base; + +var assert = elliptic.utils.assert; + +function EdwardsCurve(conf) { + // NOTE: Important as we are creating point in Base.call() + this.twisted = (conf.a | 0) !== 1; + this.mOneA = this.twisted && (conf.a | 0) === -1; + this.extended = this.mOneA; + + Base.call(this, 'edwards', conf); + + this.a = new BN(conf.a, 16).umod(this.red.m); + this.a = this.a.toRed(this.red); + this.c = new BN(conf.c, 16).toRed(this.red); + this.c2 = this.c.redSqr(); + this.d = new BN(conf.d, 16).toRed(this.red); + this.dd = this.d.redAdd(this.d); + + assert(!this.twisted || this.c.fromRed().cmpn(1) === 0); + this.oneC = (conf.c | 0) === 1; +} +inherits(EdwardsCurve, Base); +module.exports = EdwardsCurve; + +EdwardsCurve.prototype._mulA = function _mulA(num) { + if (this.mOneA) + return num.redNeg(); + else + return this.a.redMul(num); +}; + +EdwardsCurve.prototype._mulC = function _mulC(num) { + if (this.oneC) + return num; + else + return this.c.redMul(num); +}; + +// Just for compatibility with Short curve +EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) { + return this.point(x, y, z, t); +}; + +EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new BN(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var x2 = x.redSqr(); + var rhs = this.c2.redSub(this.a.redMul(x2)); + var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2)); + + var y2 = rhs.redMul(lhs.redInvm()); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); +}; + +EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) { + y = new BN(y, 16); + if (!y.red) + y = y.toRed(this.red); + + // x^2 = (y^2 - 1) / (d y^2 + 1) + var y2 = y.redSqr(); + var lhs = y2.redSub(this.one); + var rhs = y2.redMul(this.d).redAdd(this.one); + var x2 = lhs.redMul(rhs.redInvm()); + + if (x2.cmp(this.zero) === 0) { + if (odd) + throw new Error('invalid point'); + else + return this.point(this.zero, y); + } + + var x = x2.redSqrt(); + if (x.redSqr().redSub(x2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + if (x.isOdd() !== odd) + x = x.redNeg(); + + return this.point(x, y); +}; + +EdwardsCurve.prototype.validate = function validate(point) { + if (point.isInfinity()) + return true; + + // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2) + point.normalize(); + + var x2 = point.x.redSqr(); + var y2 = point.y.redSqr(); + var lhs = x2.redMul(this.a).redAdd(y2); + var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2))); + + return lhs.cmp(rhs) === 0; +}; + +function Point(curve, x, y, z, t) { + Base.BasePoint.call(this, curve, 'projective'); + if (x === null && y === null && z === null) { + this.x = this.curve.zero; + this.y = this.curve.one; + this.z = this.curve.one; + this.t = this.curve.zero; + this.zOne = true; + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + this.z = z ? new BN(z, 16) : this.curve.one; + this.t = t && new BN(t, 16); + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + if (this.t && !this.t.red) + this.t = this.t.toRed(this.curve.red); + this.zOne = this.z === this.curve.one; + + // Use extended coordinates + if (this.curve.extended && !this.t) { + this.t = this.x.redMul(this.y); + if (!this.zOne) + this.t = this.t.redMul(this.z.redInvm()); + } + } +} +inherits(Point, Base.BasePoint); + +EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) { + return Point.fromJSON(this, obj); +}; + +EdwardsCurve.prototype.point = function point(x, y, z, t) { + return new Point(this, x, y, z, t); +}; + +Point.fromJSON = function fromJSON(curve, obj) { + return new Point(curve, obj[0], obj[1], obj[2]); +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.x.cmpn(0) === 0 && + this.y.cmp(this.z) === 0; +}; + +Point.prototype._extDbl = function _extDbl() { + // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html + // #doubling-dbl-2008-hwcd + // 4M + 4S + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = 2 * Z1^2 + var c = this.z.redSqr(); + c = c.redIAdd(c); + // D = a * A + var d = this.curve._mulA(a); + // E = (X1 + Y1)^2 - A - B + var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b); + // G = D + B + var g = d.redAdd(b); + // F = G - C + var f = g.redSub(c); + // H = D - B + var h = d.redSub(b); + // X3 = E * F + var nx = e.redMul(f); + // Y3 = G * H + var ny = g.redMul(h); + // T3 = E * H + var nt = e.redMul(h); + // Z3 = F * G + var nz = f.redMul(g); + return this.curve.point(nx, ny, nz, nt); +}; + +Point.prototype._projDbl = function _projDbl() { + // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html + // #doubling-dbl-2008-bbjlp + // #doubling-dbl-2007-bl + // and others + // Generally 3M + 4S or 2M + 4S + + // B = (X1 + Y1)^2 + var b = this.x.redAdd(this.y).redSqr(); + // C = X1^2 + var c = this.x.redSqr(); + // D = Y1^2 + var d = this.y.redSqr(); + + var nx; + var ny; + var nz; + if (this.curve.twisted) { + // E = a * C + var e = this.curve._mulA(c); + // F = E + D + var f = e.redAdd(d); + if (this.zOne) { + // X3 = (B - C - D) * (F - 2) + nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)); + // Y3 = F * (E - D) + ny = f.redMul(e.redSub(d)); + // Z3 = F^2 - 2 * F + nz = f.redSqr().redSub(f).redSub(f); + } else { + // H = Z1^2 + var h = this.z.redSqr(); + // J = F - 2 * H + var j = f.redSub(h).redISub(h); + // X3 = (B-C-D)*J + nx = b.redSub(c).redISub(d).redMul(j); + // Y3 = F * (E - D) + ny = f.redMul(e.redSub(d)); + // Z3 = F * J + nz = f.redMul(j); + } + } else { + // E = C + D + var e = c.redAdd(d); + // H = (c * Z1)^2 + var h = this.curve._mulC(this.c.redMul(this.z)).redSqr(); + // J = E - 2 * H + var j = e.redSub(h).redSub(h); + // X3 = c * (B - E) * J + nx = this.curve._mulC(b.redISub(e)).redMul(j); + // Y3 = c * E * (C - D) + ny = this.curve._mulC(e).redMul(c.redISub(d)); + // Z3 = E * J + nz = e.redMul(j); + } + return this.curve.point(nx, ny, nz); +}; + +Point.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + // Double in extended coordinates + if (this.curve.extended) + return this._extDbl(); + else + return this._projDbl(); +}; + +Point.prototype._extAdd = function _extAdd(p) { + // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html + // #addition-add-2008-hwcd-3 + // 8M + + // A = (Y1 - X1) * (Y2 - X2) + var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x)); + // B = (Y1 + X1) * (Y2 + X2) + var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)); + // C = T1 * k * T2 + var c = this.t.redMul(this.curve.dd).redMul(p.t); + // D = Z1 * 2 * Z2 + var d = this.z.redMul(p.z.redAdd(p.z)); + // E = B - A + var e = b.redSub(a); + // F = D - C + var f = d.redSub(c); + // G = D + C + var g = d.redAdd(c); + // H = B + A + var h = b.redAdd(a); + // X3 = E * F + var nx = e.redMul(f); + // Y3 = G * H + var ny = g.redMul(h); + // T3 = E * H + var nt = e.redMul(h); + // Z3 = F * G + var nz = f.redMul(g); + return this.curve.point(nx, ny, nz, nt); +}; + +Point.prototype._projAdd = function _projAdd(p) { + // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html + // #addition-add-2008-bbjlp + // #addition-add-2007-bl + // 10M + 1S + + // A = Z1 * Z2 + var a = this.z.redMul(p.z); + // B = A^2 + var b = a.redSqr(); + // C = X1 * X2 + var c = this.x.redMul(p.x); + // D = Y1 * Y2 + var d = this.y.redMul(p.y); + // E = d * C * D + var e = this.curve.d.redMul(c).redMul(d); + // F = B - E + var f = b.redSub(e); + // G = B + E + var g = b.redAdd(e); + // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D) + var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d); + var nx = a.redMul(f).redMul(tmp); + var ny; + var nz; + if (this.curve.twisted) { + // Y3 = A * G * (D - a * C) + ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c))); + // Z3 = F * G + nz = f.redMul(g); + } else { + // Y3 = A * G * (D - C) + ny = a.redMul(g).redMul(d.redSub(c)); + // Z3 = c * F * G + nz = this.curve._mulC(f).redMul(g); + } + return this.curve.point(nx, ny, nz); +}; + +Point.prototype.add = function add(p) { + if (this.isInfinity()) + return p; + if (p.isInfinity()) + return this; + + if (this.curve.extended) + return this._extAdd(p); + else + return this._projAdd(p); +}; + +Point.prototype.mul = function mul(k) { + if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else + return this.curve._wnafMul(this, k); +}; + +Point.prototype.mulAdd = function mulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true); +}; + +Point.prototype.normalize = function normalize() { + if (this.zOne) + return this; + + // Normalize coordinates + var zi = this.z.redInvm(); + this.x = this.x.redMul(zi); + this.y = this.y.redMul(zi); + if (this.t) + this.t = this.t.redMul(zi); + this.z = this.curve.one; + this.zOne = true; + return this; +}; + +Point.prototype.neg = function neg() { + return this.curve.point(this.x.redNeg(), + this.y, + this.z, + this.t && this.t.redNeg()); +}; + +Point.prototype.getX = function getX() { + this.normalize(); + return this.x.fromRed(); +}; + +Point.prototype.getY = function getY() { + this.normalize(); + return this.y.fromRed(); +}; + +Point.prototype.eq = function eq(other) { + return this === other || + this.getX().cmp(other.getX()) === 0 && + this.getY().cmp(other.getY()) === 0; +}; + +Point.prototype.eqXToP = function eqXToP(x) { + var rx = x.toRed(this.curve.red).redMul(this.z); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(this.z); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } + return false; +}; + +// Compatibility with BaseCurve +Point.prototype.toP = Point.prototype.normalize; +Point.prototype.mixedAdd = Point.prototype.add; + +},{"../../elliptic":109,"../curve":112,"bn.js":53,"inherits":180}],112:[function(require,module,exports){ +'use strict'; + +var curve = exports; + +curve.base = require('./base'); +curve.short = require('./short'); +curve.mont = require('./mont'); +curve.edwards = require('./edwards'); + +},{"./base":110,"./edwards":111,"./mont":113,"./short":114}],113:[function(require,module,exports){ +'use strict'; + +var curve = require('../curve'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = curve.base; + +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; + +function MontCurve(conf) { + Base.call(this, 'mont', conf); + + this.a = new BN(conf.a, 16).toRed(this.red); + this.b = new BN(conf.b, 16).toRed(this.red); + this.i4 = new BN(4).toRed(this.red).redInvm(); + this.two = new BN(2).toRed(this.red); + this.a24 = this.i4.redMul(this.a.redAdd(this.two)); +} +inherits(MontCurve, Base); +module.exports = MontCurve; + +MontCurve.prototype.validate = function validate(point) { + var x = point.normalize().x; + var x2 = x.redSqr(); + var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x); + var y = rhs.redSqrt(); + + return y.redSqr().cmp(rhs) === 0; +}; + +function Point(curve, x, z) { + Base.BasePoint.call(this, curve, 'projective'); + if (x === null && z === null) { + this.x = this.curve.one; + this.z = this.curve.zero; + } else { + this.x = new BN(x, 16); + this.z = new BN(z, 16); + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + } +} +inherits(Point, Base.BasePoint); + +MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) { + return this.point(utils.toArray(bytes, enc), 1); +}; + +MontCurve.prototype.point = function point(x, z) { + return new Point(this, x, z); +}; + +MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) { + return Point.fromJSON(this, obj); +}; + +Point.prototype.precompute = function precompute() { + // No-op +}; + +Point.prototype._encode = function _encode() { + return this.getX().toArray('be', this.curve.p.byteLength()); +}; + +Point.fromJSON = function fromJSON(curve, obj) { + return new Point(curve, obj[0], obj[1] || curve.one); +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.z.cmpn(0) === 0; +}; + +Point.prototype.dbl = function dbl() { + // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3 + // 2M + 2S + 4A + + // A = X1 + Z1 + var a = this.x.redAdd(this.z); + // AA = A^2 + var aa = a.redSqr(); + // B = X1 - Z1 + var b = this.x.redSub(this.z); + // BB = B^2 + var bb = b.redSqr(); + // C = AA - BB + var c = aa.redSub(bb); + // X3 = AA * BB + var nx = aa.redMul(bb); + // Z3 = C * (BB + A24 * C) + var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c))); + return this.curve.point(nx, nz); +}; + +Point.prototype.add = function add() { + throw new Error('Not supported on Montgomery curve'); +}; + +Point.prototype.diffAdd = function diffAdd(p, diff) { + // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3 + // 4M + 2S + 6A + + // A = X2 + Z2 + var a = this.x.redAdd(this.z); + // B = X2 - Z2 + var b = this.x.redSub(this.z); + // C = X3 + Z3 + var c = p.x.redAdd(p.z); + // D = X3 - Z3 + var d = p.x.redSub(p.z); + // DA = D * A + var da = d.redMul(a); + // CB = C * B + var cb = c.redMul(b); + // X5 = Z1 * (DA + CB)^2 + var nx = diff.z.redMul(da.redAdd(cb).redSqr()); + // Z5 = X1 * (DA - CB)^2 + var nz = diff.x.redMul(da.redISub(cb).redSqr()); + return this.curve.point(nx, nz); +}; + +Point.prototype.mul = function mul(k) { + var t = k.clone(); + var a = this; // (N / 2) * Q + Q + var b = this.curve.point(null, null); // (N / 2) * Q + var c = this; // Q + + for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1)) + bits.push(t.andln(1)); + + for (var i = bits.length - 1; i >= 0; i--) { + if (bits[i] === 0) { + // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q + a = a.diffAdd(b, c); + // N * Q = 2 * ((N / 2) * Q + Q)) + b = b.dbl(); + } else { + // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q) + b = a.diffAdd(b, c); + // N * Q + Q = 2 * ((N / 2) * Q + Q) + a = a.dbl(); + } + } + return b; +}; + +Point.prototype.mulAdd = function mulAdd() { + throw new Error('Not supported on Montgomery curve'); +}; + +Point.prototype.jumlAdd = function jumlAdd() { + throw new Error('Not supported on Montgomery curve'); +}; + +Point.prototype.eq = function eq(other) { + return this.getX().cmp(other.getX()) === 0; +}; + +Point.prototype.normalize = function normalize() { + this.x = this.x.redMul(this.z.redInvm()); + this.z = this.curve.one; + return this; +}; + +Point.prototype.getX = function getX() { + // Normalize coordinates + this.normalize(); + + return this.x.fromRed(); +}; + +},{"../../elliptic":109,"../curve":112,"bn.js":53,"inherits":180}],114:[function(require,module,exports){ +'use strict'; + +var curve = require('../curve'); +var elliptic = require('../../elliptic'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = curve.base; + +var assert = elliptic.utils.assert; + +function ShortCurve(conf) { + Base.call(this, 'short', conf); + + this.a = new BN(conf.a, 16).toRed(this.red); + this.b = new BN(conf.b, 16).toRed(this.red); + this.tinv = this.two.redInvm(); + + this.zeroA = this.a.fromRed().cmpn(0) === 0; + this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0; + + // If the curve is endomorphic, precalculate beta and lambda + this.endo = this._getEndomorphism(conf); + this._endoWnafT1 = new Array(4); + this._endoWnafT2 = new Array(4); +} +inherits(ShortCurve, Base); +module.exports = ShortCurve; + +ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) { + // No efficient endomorphism + if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1) + return; + + // Compute beta and lambda, that lambda * P = (beta * Px; Py) + var beta; + var lambda; + if (conf.beta) { + beta = new BN(conf.beta, 16).toRed(this.red); + } else { + var betas = this._getEndoRoots(this.p); + // Choose the smallest beta + beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1]; + beta = beta.toRed(this.red); + } + if (conf.lambda) { + lambda = new BN(conf.lambda, 16); + } else { + // Choose the lambda that is matching selected beta + var lambdas = this._getEndoRoots(this.n); + if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) { + lambda = lambdas[0]; + } else { + lambda = lambdas[1]; + assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0); + } + } + + // Get basis vectors, used for balanced length-two representation + var basis; + if (conf.basis) { + basis = conf.basis.map(function(vec) { + return { + a: new BN(vec.a, 16), + b: new BN(vec.b, 16) + }; + }); + } else { + basis = this._getEndoBasis(lambda); + } + + return { + beta: beta, + lambda: lambda, + basis: basis + }; +}; + +ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) { + // Find roots of for x^2 + x + 1 in F + // Root = (-1 +- Sqrt(-3)) / 2 + // + var red = num === this.p ? this.red : BN.mont(num); + var tinv = new BN(2).toRed(red).redInvm(); + var ntinv = tinv.redNeg(); + + var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv); + + var l1 = ntinv.redAdd(s).fromRed(); + var l2 = ntinv.redSub(s).fromRed(); + return [ l1, l2 ]; +}; + +ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) { + // aprxSqrt >= sqrt(this.n) + var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)); + + // 3.74 + // Run EGCD, until r(L + 1) < aprxSqrt + var u = lambda; + var v = this.n.clone(); + var x1 = new BN(1); + var y1 = new BN(0); + var x2 = new BN(0); + var y2 = new BN(1); + + // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n) + var a0; + var b0; + // First vector + var a1; + var b1; + // Second vector + var a2; + var b2; + + var prevR; + var i = 0; + var r; + var x; + while (u.cmpn(0) !== 0) { + var q = v.div(u); + r = v.sub(q.mul(u)); + x = x2.sub(q.mul(x1)); + var y = y2.sub(q.mul(y1)); + + if (!a1 && r.cmp(aprxSqrt) < 0) { + a0 = prevR.neg(); + b0 = x1; + a1 = r.neg(); + b1 = x; + } else if (a1 && ++i === 2) { + break; + } + prevR = r; + + v = u; + u = r; + x2 = x1; + x1 = x; + y2 = y1; + y1 = y; + } + a2 = r.neg(); + b2 = x; + + var len1 = a1.sqr().add(b1.sqr()); + var len2 = a2.sqr().add(b2.sqr()); + if (len2.cmp(len1) >= 0) { + a2 = a0; + b2 = b0; + } + + // Normalize signs + if (a1.negative) { + a1 = a1.neg(); + b1 = b1.neg(); + } + if (a2.negative) { + a2 = a2.neg(); + b2 = b2.neg(); + } + + return [ + { a: a1, b: b1 }, + { a: a2, b: b2 } + ]; +}; + +ShortCurve.prototype._endoSplit = function _endoSplit(k) { + var basis = this.endo.basis; + var v1 = basis[0]; + var v2 = basis[1]; + + var c1 = v2.b.mul(k).divRound(this.n); + var c2 = v1.b.neg().mul(k).divRound(this.n); + + var p1 = c1.mul(v1.a); + var p2 = c2.mul(v2.a); + var q1 = c1.mul(v1.b); + var q2 = c2.mul(v2.b); + + // Calculate answer + var k1 = k.sub(p1).sub(p2); + var k2 = q1.add(q2).neg(); + return { k1: k1, k2: k2 }; +}; + +ShortCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new BN(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + // XXX Is there any way to tell if the number is odd without converting it + // to non-red form? + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); +}; + +ShortCurve.prototype.validate = function validate(point) { + if (point.inf) + return true; + + var x = point.x; + var y = point.y; + + var ax = this.a.redMul(x); + var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); + return y.redSqr().redISub(rhs).cmpn(0) === 0; +}; + +ShortCurve.prototype._endoWnafMulAdd = + function _endoWnafMulAdd(points, coeffs, jacobianResult) { + var npoints = this._endoWnafT1; + var ncoeffs = this._endoWnafT2; + for (var i = 0; i < points.length; i++) { + var split = this._endoSplit(coeffs[i]); + var p = points[i]; + var beta = p._getBeta(); + + if (split.k1.negative) { + split.k1.ineg(); + p = p.neg(true); + } + if (split.k2.negative) { + split.k2.ineg(); + beta = beta.neg(true); + } + + npoints[i * 2] = p; + npoints[i * 2 + 1] = beta; + ncoeffs[i * 2] = split.k1; + ncoeffs[i * 2 + 1] = split.k2; + } + var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); + + // Clean-up references to points and coefficients + for (var j = 0; j < i * 2; j++) { + npoints[j] = null; + ncoeffs[j] = null; + } + return res; +}; + +function Point(curve, x, y, isRed) { + Base.BasePoint.call(this, curve, 'affine'); + if (x === null && y === null) { + this.x = null; + this.y = null; + this.inf = true; + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + // Force redgomery representation when loading from JSON + if (isRed) { + this.x.forceRed(this.curve.red); + this.y.forceRed(this.curve.red); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + this.inf = false; + } +} +inherits(Point, Base.BasePoint); + +ShortCurve.prototype.point = function point(x, y, isRed) { + return new Point(this, x, y, isRed); +}; + +ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) { + return Point.fromJSON(this, obj, red); +}; + +Point.prototype._getBeta = function _getBeta() { + if (!this.curve.endo) + return; + + var pre = this.precomputed; + if (pre && pre.beta) + return pre.beta; + + var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); + if (pre) { + var curve = this.curve; + var endoMul = function(p) { + return curve.point(p.x.redMul(curve.endo.beta), p.y); + }; + pre.beta = beta; + beta.precomputed = { + beta: null, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(endoMul) + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(endoMul) + } + }; + } + return beta; +}; + +Point.prototype.toJSON = function toJSON() { + if (!this.precomputed) + return [ this.x, this.y ]; + + return [ this.x, this.y, this.precomputed && { + doubles: this.precomputed.doubles && { + step: this.precomputed.doubles.step, + points: this.precomputed.doubles.points.slice(1) + }, + naf: this.precomputed.naf && { + wnd: this.precomputed.naf.wnd, + points: this.precomputed.naf.points.slice(1) + } + } ]; +}; + +Point.fromJSON = function fromJSON(curve, obj, red) { + if (typeof obj === 'string') + obj = JSON.parse(obj); + var res = curve.point(obj[0], obj[1], red); + if (!obj[2]) + return res; + + function obj2point(obj) { + return curve.point(obj[0], obj[1], red); + } + + var pre = obj[2]; + res.precomputed = { + beta: null, + doubles: pre.doubles && { + step: pre.doubles.step, + points: [ res ].concat(pre.doubles.points.map(obj2point)) + }, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: [ res ].concat(pre.naf.points.map(obj2point)) + } + }; + return res; +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + return this.inf; +}; + +Point.prototype.add = function add(p) { + // O + P = P + if (this.inf) + return p; + + // P + O = P + if (p.inf) + return this; + + // P + P = 2P + if (this.eq(p)) + return this.dbl(); + + // P + (-P) = O + if (this.neg().eq(p)) + return this.curve.point(null, null); + + // P + Q = O + if (this.x.cmp(p.x) === 0) + return this.curve.point(null, null); + + var c = this.y.redSub(p.y); + if (c.cmpn(0) !== 0) + c = c.redMul(this.x.redSub(p.x).redInvm()); + var nx = c.redSqr().redISub(this.x).redISub(p.x); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.dbl = function dbl() { + if (this.inf) + return this; + + // 2P = O + var ys1 = this.y.redAdd(this.y); + if (ys1.cmpn(0) === 0) + return this.curve.point(null, null); + + var a = this.curve.a; + + var x2 = this.x.redSqr(); + var dyinv = ys1.redInvm(); + var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv); + + var nx = c.redSqr().redISub(this.x.redAdd(this.x)); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.getX = function getX() { + return this.x.fromRed(); +}; + +Point.prototype.getY = function getY() { + return this.y.fromRed(); +}; + +Point.prototype.mul = function mul(k) { + k = new BN(k, 16); + + if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else if (this.curve.endo) + return this.curve._endoWnafMulAdd([ this ], [ k ]); + else + return this.curve._wnafMul(this, k); +}; + +Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs, true); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2, true); +}; + +Point.prototype.eq = function eq(p) { + return this === p || + this.inf === p.inf && + (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0); +}; + +Point.prototype.neg = function neg(_precompute) { + if (this.inf) + return this; + + var res = this.curve.point(this.x, this.y.redNeg()); + if (_precompute && this.precomputed) { + var pre = this.precomputed; + var negate = function(p) { + return p.neg(); + }; + res.precomputed = { + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(negate) + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(negate) + } + }; + } + return res; +}; + +Point.prototype.toJ = function toJ() { + if (this.inf) + return this.curve.jpoint(null, null, null); + + var res = this.curve.jpoint(this.x, this.y, this.curve.one); + return res; +}; + +function JPoint(curve, x, y, z) { + Base.BasePoint.call(this, curve, 'jacobian'); + if (x === null && y === null && z === null) { + this.x = this.curve.one; + this.y = this.curve.one; + this.z = new BN(0); + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + this.z = new BN(z, 16); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + + this.zOne = this.z === this.curve.one; +} +inherits(JPoint, Base.BasePoint); + +ShortCurve.prototype.jpoint = function jpoint(x, y, z) { + return new JPoint(this, x, y, z); +}; + +JPoint.prototype.toP = function toP() { + if (this.isInfinity()) + return this.curve.point(null, null); + + var zinv = this.z.redInvm(); + var zinv2 = zinv.redSqr(); + var ax = this.x.redMul(zinv2); + var ay = this.y.redMul(zinv2).redMul(zinv); + + return this.curve.point(ax, ay); +}; + +JPoint.prototype.neg = function neg() { + return this.curve.jpoint(this.x, this.y.redNeg(), this.z); +}; + +JPoint.prototype.add = function add(p) { + // O + P = P + if (this.isInfinity()) + return p; + + // P + O = P + if (p.isInfinity()) + return this; + + // 12M + 4S + 7A + var pz2 = p.z.redSqr(); + var z2 = this.z.redSqr(); + var u1 = this.x.redMul(pz2); + var u2 = p.x.redMul(z2); + var s1 = this.y.redMul(pz2.redMul(p.z)); + var s2 = p.y.redMul(z2.redMul(this.z)); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(p.z).redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mixedAdd = function mixedAdd(p) { + // O + P = P + if (this.isInfinity()) + return p.toJ(); + + // P + O = P + if (p.isInfinity()) + return this; + + // 8M + 3S + 7A + var z2 = this.z.redSqr(); + var u1 = this.x; + var u2 = p.x.redMul(z2); + var s1 = this.y; + var s2 = p.y.redMul(z2).redMul(this.z); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.dblp = function dblp(pow) { + if (pow === 0) + return this; + if (this.isInfinity()) + return this; + if (!pow) + return this.dbl(); + + if (this.curve.zeroA || this.curve.threeA) { + var r = this; + for (var i = 0; i < pow; i++) + r = r.dbl(); + return r; + } + + // 1M + 2S + 1A + N * (4S + 5M + 8A) + // N = 1 => 6M + 6S + 9A + var a = this.curve.a; + var tinv = this.curve.tinv; + + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + // Reuse results + var jyd = jy.redAdd(jy); + for (var i = 0; i < pow; i++) { + var jx2 = jx.redSqr(); + var jyd2 = jyd.redSqr(); + var jyd4 = jyd2.redSqr(); + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var t1 = jx.redMul(jyd2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + var dny = c.redMul(t2); + dny = dny.redIAdd(dny).redISub(jyd4); + var nz = jyd.redMul(jz); + if (i + 1 < pow) + jz4 = jz4.redMul(jyd4); + + jx = nx; + jz = nz; + jyd = dny; + } + + return this.curve.jpoint(jx, jyd.redMul(tinv), jz); +}; + +JPoint.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + if (this.curve.zeroA) + return this._zeroDbl(); + else if (this.curve.threeA) + return this._threeDbl(); + else + return this._dbl(); +}; + +JPoint.prototype._zeroDbl = function _zeroDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 14A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // T = M ^ 2 - 2*S + var t = m.redSqr().redISub(s).redISub(s); + + // 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2*Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-dbl-2009-l + // 2M + 5S + 13A + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = B^2 + var c = b.redSqr(); + // D = 2 * ((X1 + B)^2 - A - C) + var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); + d = d.redIAdd(d); + // E = 3 * A + var e = a.redAdd(a).redIAdd(a); + // F = E^2 + var f = e.redSqr(); + + // 8 * C + var c8 = c.redIAdd(c); + c8 = c8.redIAdd(c8); + c8 = c8.redIAdd(c8); + + // X3 = F - 2 * D + nx = f.redISub(d).redISub(d); + // Y3 = E * (D - X3) - 8 * C + ny = e.redMul(d.redISub(nx)).redISub(c8); + // Z3 = 2 * Y1 * Z1 + nz = this.y.redMul(this.z); + nz = nz.redIAdd(nz); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._threeDbl = function _threeDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 15A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a + var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a); + // T = M^2 - 2 * S + var t = m.redSqr().redISub(s).redISub(s); + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2 * Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b + // 3M + 5S + + // delta = Z1^2 + var delta = this.z.redSqr(); + // gamma = Y1^2 + var gamma = this.y.redSqr(); + // beta = X1 * gamma + var beta = this.x.redMul(gamma); + // alpha = 3 * (X1 - delta) * (X1 + delta) + var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); + alpha = alpha.redAdd(alpha).redIAdd(alpha); + // X3 = alpha^2 - 8 * beta + var beta4 = beta.redIAdd(beta); + beta4 = beta4.redIAdd(beta4); + var beta8 = beta4.redAdd(beta4); + nx = alpha.redSqr().redISub(beta8); + // Z3 = (Y1 + Z1)^2 - gamma - delta + nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); + // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2 + var ggamma8 = gamma.redSqr(); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._dbl = function _dbl() { + var a = this.curve.a; + + // 4M + 6S + 10A + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + var jx2 = jx.redSqr(); + var jy2 = jy.redSqr(); + + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var jxd4 = jx.redAdd(jx); + jxd4 = jxd4.redIAdd(jxd4); + var t1 = jxd4.redMul(jy2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + + var jyd8 = jy2.redSqr(); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + var ny = c.redMul(t2).redISub(jyd8); + var nz = jy.redAdd(jy).redMul(jz); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.trpl = function trpl() { + if (!this.curve.zeroA) + return this.dbl().add(this); + + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl + // 5M + 10S + ... + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // ZZ = Z1^2 + var zz = this.z.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // M = 3 * XX + a * ZZ2; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // MM = M^2 + var mm = m.redSqr(); + // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM + var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + e = e.redIAdd(e); + e = e.redAdd(e).redIAdd(e); + e = e.redISub(mm); + // EE = E^2 + var ee = e.redSqr(); + // T = 16*YYYY + var t = yyyy.redIAdd(yyyy); + t = t.redIAdd(t); + t = t.redIAdd(t); + t = t.redIAdd(t); + // U = (M + E)^2 - MM - EE - T + var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t); + // X3 = 4 * (X1 * EE - 4 * YY * U) + var yyu4 = yy.redMul(u); + yyu4 = yyu4.redIAdd(yyu4); + yyu4 = yyu4.redIAdd(yyu4); + var nx = this.x.redMul(ee).redISub(yyu4); + nx = nx.redIAdd(nx); + nx = nx.redIAdd(nx); + // Y3 = 8 * Y1 * (U * (T - U) - E * EE) + var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + // Z3 = (Z1 + E)^2 - ZZ - EE + var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mul = function mul(k, kbase) { + k = new BN(k, kbase); + + return this.curve._wnafMul(this, k); +}; + +JPoint.prototype.eq = function eq(p) { + if (p.type === 'affine') + return this.eq(p.toJ()); + + if (this === p) + return true; + + // x1 * z2^2 == x2 * z1^2 + var z2 = this.z.redSqr(); + var pz2 = p.z.redSqr(); + if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0) + return false; + + // y1 * z2^3 == y2 * z1^3 + var z3 = z2.redMul(this.z); + var pz3 = pz2.redMul(p.z); + return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; +}; + +JPoint.prototype.eqXToP = function eqXToP(x) { + var zs = this.z.redSqr(); + var rx = x.toRed(this.curve.red).redMul(zs); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(zs); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } + return false; +}; + +JPoint.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +JPoint.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.z.cmpn(0) === 0; +}; + +},{"../../elliptic":109,"../curve":112,"bn.js":53,"inherits":180}],115:[function(require,module,exports){ +'use strict'; + +var curves = exports; + +var hash = require('hash.js'); +var elliptic = require('../elliptic'); + +var assert = elliptic.utils.assert; + +function PresetCurve(options) { + if (options.type === 'short') + this.curve = new elliptic.curve.short(options); + else if (options.type === 'edwards') + this.curve = new elliptic.curve.edwards(options); + else + this.curve = new elliptic.curve.mont(options); + this.g = this.curve.g; + this.n = this.curve.n; + this.hash = options.hash; + + assert(this.g.validate(), 'Invalid curve'); + assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); +} +curves.PresetCurve = PresetCurve; + +function defineCurve(name, options) { + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + get: function() { + var curve = new PresetCurve(options); + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + value: curve + }); + return curve; + } + }); +} + +defineCurve('p192', { + type: 'short', + prime: 'p192', + p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', + b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', + n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', + hash: hash.sha256, + gRed: false, + g: [ + '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', + '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811' + ] +}); + +defineCurve('p224', { + type: 'short', + prime: 'p224', + p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', + b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', + n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', + hash: hash.sha256, + gRed: false, + g: [ + 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', + 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34' + ] +}); + +defineCurve('p256', { + type: 'short', + prime: null, + p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', + a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', + b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', + n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', + hash: hash.sha256, + gRed: false, + g: [ + '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5' + ] +}); + +defineCurve('p384', { + type: 'short', + prime: null, + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'fffffffe ffffffff 00000000 00000000 ffffffff', + a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'fffffffe ffffffff 00000000 00000000 fffffffc', + b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' + + '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', + n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' + + 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', + hash: hash.sha384, + gRed: false, + g: [ + 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' + + '5502f25d bf55296c 3a545e38 72760ab7', + '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' + + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f' + ] +}); + +defineCurve('p521', { + type: 'short', + prime: null, + p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff', + a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff fffffffc', + b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' + + '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' + + '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', + n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' + + 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', + hash: hash.sha512, + gRed: false, + g: [ + '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' + + '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' + + 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', + '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' + + '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' + + '3fad0761 353c7086 a272c240 88be9476 9fd16650' + ] +}); + +defineCurve('curve25519', { + type: 'mont', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '76d06', + b: '1', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash.sha256, + gRed: false, + g: [ + '9' + ] +}); + +defineCurve('ed25519', { + type: 'edwards', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '-1', + c: '1', + // -121665 * (121666^(-1)) (mod P) + d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash.sha256, + gRed: false, + g: [ + '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', + + // 4/5 + '6666666666666666666666666666666666666666666666666666666666666658' + ] +}); + +var pre; +try { + pre = require('./precomputed/secp256k1'); +} catch (e) { + pre = undefined; +} + +defineCurve('secp256k1', { + type: 'short', + prime: 'k256', + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', + a: '0', + b: '7', + n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', + h: '1', + hash: hash.sha256, + + // Precomputed endomorphism + beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', + lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', + basis: [ + { + a: '3086d221a7d46bcde86c90e49284eb15', + b: '-e4437ed6010e88286f547fa90abfe4c3' + }, + { + a: '114ca50f7a8e2f3f657c1108d9d44cfd8', + b: '3086d221a7d46bcde86c90e49284eb15' + } + ], + + gRed: false, + g: [ + '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', + '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', + pre + ] +}); + +},{"../elliptic":109,"./precomputed/secp256k1":122,"hash.js":162}],116:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var HmacDRBG = require('hmac-drbg'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; + +var KeyPair = require('./key'); +var Signature = require('./signature'); + +function EC(options) { + if (!(this instanceof EC)) + return new EC(options); + + // Shortcut `elliptic.ec(curve-name)` + if (typeof options === 'string') { + assert(elliptic.curves.hasOwnProperty(options), 'Unknown curve ' + options); + + options = elliptic.curves[options]; + } + + // Shortcut for `elliptic.ec(elliptic.curves.curveName)` + if (options instanceof elliptic.curves.PresetCurve) + options = { curve: options }; + + this.curve = options.curve.curve; + this.n = this.curve.n; + this.nh = this.n.ushrn(1); + this.g = this.curve.g; + + // Point on curve + this.g = options.curve.g; + this.g.precompute(options.curve.n.bitLength() + 1); + + // Hash for function for DRBG + this.hash = options.hash || options.curve.hash; +} +module.exports = EC; + +EC.prototype.keyPair = function keyPair(options) { + return new KeyPair(this, options); +}; + +EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { + return KeyPair.fromPrivate(this, priv, enc); +}; + +EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { + return KeyPair.fromPublic(this, pub, enc); +}; + +EC.prototype.genKeyPair = function genKeyPair(options) { + if (!options) + options = {}; + + // Instantiate Hmac_DRBG + var drbg = new HmacDRBG({ + hash: this.hash, + pers: options.pers, + persEnc: options.persEnc || 'utf8', + entropy: options.entropy || elliptic.rand(this.hash.hmacStrength), + entropyEnc: options.entropy && options.entropyEnc || 'utf8', + nonce: this.n.toArray() + }); + + var bytes = this.n.byteLength(); + var ns2 = this.n.sub(new BN(2)); + do { + var priv = new BN(drbg.generate(bytes)); + if (priv.cmp(ns2) > 0) + continue; + + priv.iaddn(1); + return this.keyFromPrivate(priv); + } while (true); +}; + +EC.prototype._truncateToN = function truncateToN(msg, truncOnly) { + var delta = msg.byteLength() * 8 - this.n.bitLength(); + if (delta > 0) + msg = msg.ushrn(delta); + if (!truncOnly && msg.cmp(this.n) >= 0) + return msg.sub(this.n); + else + return msg; +}; + +EC.prototype.sign = function sign(msg, key, enc, options) { + if (typeof enc === 'object') { + options = enc; + enc = null; + } + if (!options) + options = {}; + + key = this.keyFromPrivate(key, enc); + msg = this._truncateToN(new BN(msg, 16)); + + // Zero-extend key to provide enough entropy + var bytes = this.n.byteLength(); + var bkey = key.getPrivate().toArray('be', bytes); + + // Zero-extend nonce to have the same byte size as N + var nonce = msg.toArray('be', bytes); + + // Instantiate Hmac_DRBG + var drbg = new HmacDRBG({ + hash: this.hash, + entropy: bkey, + nonce: nonce, + pers: options.pers, + persEnc: options.persEnc || 'utf8' + }); + + // Number of bytes to generate + var ns1 = this.n.sub(new BN(1)); + + for (var iter = 0; true; iter++) { + var k = options.k ? + options.k(iter) : + new BN(drbg.generate(this.n.byteLength())); + k = this._truncateToN(k, true); + if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) + continue; + + var kp = this.g.mul(k); + if (kp.isInfinity()) + continue; + + var kpX = kp.getX(); + var r = kpX.umod(this.n); + if (r.cmpn(0) === 0) + continue; + + var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); + s = s.umod(this.n); + if (s.cmpn(0) === 0) + continue; + + var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | + (kpX.cmp(r) !== 0 ? 2 : 0); + + // Use complement of `s`, if it is > `n / 2` + if (options.canonical && s.cmp(this.nh) > 0) { + s = this.n.sub(s); + recoveryParam ^= 1; + } + + return new Signature({ r: r, s: s, recoveryParam: recoveryParam }); + } +}; + +EC.prototype.verify = function verify(msg, signature, key, enc) { + msg = this._truncateToN(new BN(msg, 16)); + key = this.keyFromPublic(key, enc); + signature = new Signature(signature, 'hex'); + + // Perform primitive values validation + var r = signature.r; + var s = signature.s; + if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) + return false; + if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) + return false; + + // Validate signature + var sinv = s.invm(this.n); + var u1 = sinv.mul(msg).umod(this.n); + var u2 = sinv.mul(r).umod(this.n); + + if (!this.curve._maxwellTrick) { + var p = this.g.mulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + return p.getX().umod(this.n).cmp(r) === 0; + } + + // NOTE: Greg Maxwell's trick, inspired by: + // https://git.io/vad3K + + var p = this.g.jmulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + // Compare `p.x` of Jacobian point with `r`, + // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the + // inverse of `p.z^2` + return p.eqXToP(r); +}; + +EC.prototype.recoverPubKey = function(msg, signature, j, enc) { + assert((3 & j) === j, 'The recovery param is more than two bits'); + signature = new Signature(signature, enc); + + var n = this.n; + var e = new BN(msg); + var r = signature.r; + var s = signature.s; + + // A set LSB signifies that the y-coordinate is odd + var isYOdd = j & 1; + var isSecondKey = j >> 1; + if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) + throw new Error('Unable to find sencond key candinate'); + + // 1.1. Let x = r + jn. + if (isSecondKey) + r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); + else + r = this.curve.pointFromX(r, isYOdd); + + var rInv = signature.r.invm(n); + var s1 = n.sub(e).mul(rInv).umod(n); + var s2 = s.mul(rInv).umod(n); + + // 1.6.1 Compute Q = r^-1 (sR - eG) + // Q = r^-1 (sR + -eG) + return this.g.mulAdd(s1, r, s2); +}; + +EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { + signature = new Signature(signature, enc); + if (signature.recoveryParam !== null) + return signature.recoveryParam; + + for (var i = 0; i < 4; i++) { + var Qprime; + try { + Qprime = this.recoverPubKey(e, signature, i); + } catch (e) { + continue; + } + + if (Qprime.eq(Q)) + return i; + } + throw new Error('Unable to find valid recovery factor'); +}; + +},{"../../elliptic":109,"./key":117,"./signature":118,"bn.js":53,"hmac-drbg":174}],117:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; + +function KeyPair(ec, options) { + this.ec = ec; + this.priv = null; + this.pub = null; + + // KeyPair(ec, { priv: ..., pub: ... }) + if (options.priv) + this._importPrivate(options.priv, options.privEnc); + if (options.pub) + this._importPublic(options.pub, options.pubEnc); +} +module.exports = KeyPair; + +KeyPair.fromPublic = function fromPublic(ec, pub, enc) { + if (pub instanceof KeyPair) + return pub; + + return new KeyPair(ec, { + pub: pub, + pubEnc: enc + }); +}; + +KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { + if (priv instanceof KeyPair) + return priv; + + return new KeyPair(ec, { + priv: priv, + privEnc: enc + }); +}; + +KeyPair.prototype.validate = function validate() { + var pub = this.getPublic(); + + if (pub.isInfinity()) + return { result: false, reason: 'Invalid public key' }; + if (!pub.validate()) + return { result: false, reason: 'Public key is not a point' }; + if (!pub.mul(this.ec.curve.n).isInfinity()) + return { result: false, reason: 'Public key * N != O' }; + + return { result: true, reason: null }; +}; + +KeyPair.prototype.getPublic = function getPublic(compact, enc) { + // compact is optional argument + if (typeof compact === 'string') { + enc = compact; + compact = null; + } + + if (!this.pub) + this.pub = this.ec.g.mul(this.priv); + + if (!enc) + return this.pub; + + return this.pub.encode(enc, compact); +}; + +KeyPair.prototype.getPrivate = function getPrivate(enc) { + if (enc === 'hex') + return this.priv.toString(16, 2); + else + return this.priv; +}; + +KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { + this.priv = new BN(key, enc || 16); + + // Ensure that the priv won't be bigger than n, otherwise we may fail + // in fixed multiplication method + this.priv = this.priv.umod(this.ec.curve.n); +}; + +KeyPair.prototype._importPublic = function _importPublic(key, enc) { + if (key.x || key.y) { + // Montgomery points only have an `x` coordinate. + // Weierstrass/Edwards points on the other hand have both `x` and + // `y` coordinates. + if (this.ec.curve.type === 'mont') { + assert(key.x, 'Need x coordinate'); + } else if (this.ec.curve.type === 'short' || + this.ec.curve.type === 'edwards') { + assert(key.x && key.y, 'Need both x and y coordinate'); + } + this.pub = this.ec.curve.point(key.x, key.y); + return; + } + this.pub = this.ec.curve.decodePoint(key, enc); +}; + +// ECDH +KeyPair.prototype.derive = function derive(pub) { + return pub.mul(this.priv).getX(); +}; + +// ECDSA +KeyPair.prototype.sign = function sign(msg, enc, options) { + return this.ec.sign(msg, this, enc, options); +}; + +KeyPair.prototype.verify = function verify(msg, signature) { + return this.ec.verify(msg, signature, this); +}; + +KeyPair.prototype.inspect = function inspect() { + return ''; +}; + +},{"../../elliptic":109,"bn.js":53}],118:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); + +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; + +function Signature(options, enc) { + if (options instanceof Signature) + return options; + + if (this._importDER(options, enc)) + return; + + assert(options.r && options.s, 'Signature without r or s'); + this.r = new BN(options.r, 16); + this.s = new BN(options.s, 16); + if (options.recoveryParam === undefined) + this.recoveryParam = null; + else + this.recoveryParam = options.recoveryParam; +} +module.exports = Signature; + +function Position() { + this.place = 0; +} + +function getLength(buf, p) { + var initial = buf[p.place++]; + if (!(initial & 0x80)) { + return initial; + } + var octetLen = initial & 0xf; + var val = 0; + for (var i = 0, off = p.place; i < octetLen; i++, off++) { + val <<= 8; + val |= buf[off]; + } + p.place = off; + return val; +} + +function rmPadding(buf) { + var i = 0; + var len = buf.length - 1; + while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) { + i++; + } + if (i === 0) { + return buf; + } + return buf.slice(i); +} + +Signature.prototype._importDER = function _importDER(data, enc) { + data = utils.toArray(data, enc); + var p = new Position(); + if (data[p.place++] !== 0x30) { + return false; + } + var len = getLength(data, p); + if ((len + p.place) !== data.length) { + return false; + } + if (data[p.place++] !== 0x02) { + return false; + } + var rlen = getLength(data, p); + var r = data.slice(p.place, rlen + p.place); + p.place += rlen; + if (data[p.place++] !== 0x02) { + return false; + } + var slen = getLength(data, p); + if (data.length !== slen + p.place) { + return false; + } + var s = data.slice(p.place, slen + p.place); + if (r[0] === 0 && (r[1] & 0x80)) { + r = r.slice(1); + } + if (s[0] === 0 && (s[1] & 0x80)) { + s = s.slice(1); + } + + this.r = new BN(r); + this.s = new BN(s); + this.recoveryParam = null; + + return true; +}; + +function constructLength(arr, len) { + if (len < 0x80) { + arr.push(len); + return; + } + var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); + arr.push(octets | 0x80); + while (--octets) { + arr.push((len >>> (octets << 3)) & 0xff); + } + arr.push(len); +} + +Signature.prototype.toDER = function toDER(enc) { + var r = this.r.toArray(); + var s = this.s.toArray(); + + // Pad values + if (r[0] & 0x80) + r = [ 0 ].concat(r); + // Pad values + if (s[0] & 0x80) + s = [ 0 ].concat(s); + + r = rmPadding(r); + s = rmPadding(s); + + while (!s[0] && !(s[1] & 0x80)) { + s = s.slice(1); + } + var arr = [ 0x02 ]; + constructLength(arr, r.length); + arr = arr.concat(r); + arr.push(0x02); + constructLength(arr, s.length); + var backHalf = arr.concat(s); + var res = [ 0x30 ]; + constructLength(res, backHalf.length); + res = res.concat(backHalf); + return utils.encode(res, enc); +}; + +},{"../../elliptic":109,"bn.js":53}],119:[function(require,module,exports){ +'use strict'; + +var hash = require('hash.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; +var parseBytes = utils.parseBytes; +var KeyPair = require('./key'); +var Signature = require('./signature'); + +function EDDSA(curve) { + assert(curve === 'ed25519', 'only tested with ed25519 so far'); + + if (!(this instanceof EDDSA)) + return new EDDSA(curve); + + var curve = elliptic.curves[curve].curve; + this.curve = curve; + this.g = curve.g; + this.g.precompute(curve.n.bitLength() + 1); + + this.pointClass = curve.point().constructor; + this.encodingLength = Math.ceil(curve.n.bitLength() / 8); + this.hash = hash.sha512; +} + +module.exports = EDDSA; + +/** +* @param {Array|String} message - message bytes +* @param {Array|String|KeyPair} secret - secret bytes or a keypair +* @returns {Signature} - signature +*/ +EDDSA.prototype.sign = function sign(message, secret) { + message = parseBytes(message); + var key = this.keyFromSecret(secret); + var r = this.hashInt(key.messagePrefix(), message); + var R = this.g.mul(r); + var Rencoded = this.encodePoint(R); + var s_ = this.hashInt(Rencoded, key.pubBytes(), message) + .mul(key.priv()); + var S = r.add(s_).umod(this.curve.n); + return this.makeSignature({ R: R, S: S, Rencoded: Rencoded }); +}; + +/** +* @param {Array} message - message bytes +* @param {Array|String|Signature} sig - sig bytes +* @param {Array|String|Point|KeyPair} pub - public key +* @returns {Boolean} - true if public key matches sig of message +*/ +EDDSA.prototype.verify = function verify(message, sig, pub) { + message = parseBytes(message); + sig = this.makeSignature(sig); + var key = this.keyFromPublic(pub); + var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message); + var SG = this.g.mul(sig.S()); + var RplusAh = sig.R().add(key.pub().mul(h)); + return RplusAh.eq(SG); +}; + +EDDSA.prototype.hashInt = function hashInt() { + var hash = this.hash(); + for (var i = 0; i < arguments.length; i++) + hash.update(arguments[i]); + return utils.intFromLE(hash.digest()).umod(this.curve.n); +}; + +EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) { + return KeyPair.fromPublic(this, pub); +}; + +EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) { + return KeyPair.fromSecret(this, secret); +}; + +EDDSA.prototype.makeSignature = function makeSignature(sig) { + if (sig instanceof Signature) + return sig; + return new Signature(this, sig); +}; + +/** +* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2 +* +* EDDSA defines methods for encoding and decoding points and integers. These are +* helper convenience methods, that pass along to utility functions implied +* parameters. +* +*/ +EDDSA.prototype.encodePoint = function encodePoint(point) { + var enc = point.getY().toArray('le', this.encodingLength); + enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0; + return enc; +}; + +EDDSA.prototype.decodePoint = function decodePoint(bytes) { + bytes = utils.parseBytes(bytes); + + var lastIx = bytes.length - 1; + var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80); + var xIsOdd = (bytes[lastIx] & 0x80) !== 0; + + var y = utils.intFromLE(normed); + return this.curve.pointFromY(y, xIsOdd); +}; + +EDDSA.prototype.encodeInt = function encodeInt(num) { + return num.toArray('le', this.encodingLength); +}; + +EDDSA.prototype.decodeInt = function decodeInt(bytes) { + return utils.intFromLE(bytes); +}; + +EDDSA.prototype.isPoint = function isPoint(val) { + return val instanceof this.pointClass; +}; + +},{"../../elliptic":109,"./key":120,"./signature":121,"hash.js":162}],120:[function(require,module,exports){ +'use strict'; + +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; +var parseBytes = utils.parseBytes; +var cachedProperty = utils.cachedProperty; + +/** +* @param {EDDSA} eddsa - instance +* @param {Object} params - public/private key parameters +* +* @param {Array} [params.secret] - secret seed bytes +* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms) +* @param {Array} [params.pub] - public key point encoded as bytes +* +*/ +function KeyPair(eddsa, params) { + this.eddsa = eddsa; + this._secret = parseBytes(params.secret); + if (eddsa.isPoint(params.pub)) + this._pub = params.pub; + else + this._pubBytes = parseBytes(params.pub); +} + +KeyPair.fromPublic = function fromPublic(eddsa, pub) { + if (pub instanceof KeyPair) + return pub; + return new KeyPair(eddsa, { pub: pub }); +}; + +KeyPair.fromSecret = function fromSecret(eddsa, secret) { + if (secret instanceof KeyPair) + return secret; + return new KeyPair(eddsa, { secret: secret }); +}; + +KeyPair.prototype.secret = function secret() { + return this._secret; +}; + +cachedProperty(KeyPair, 'pubBytes', function pubBytes() { + return this.eddsa.encodePoint(this.pub()); +}); + +cachedProperty(KeyPair, 'pub', function pub() { + if (this._pubBytes) + return this.eddsa.decodePoint(this._pubBytes); + return this.eddsa.g.mul(this.priv()); +}); + +cachedProperty(KeyPair, 'privBytes', function privBytes() { + var eddsa = this.eddsa; + var hash = this.hash(); + var lastIx = eddsa.encodingLength - 1; + + var a = hash.slice(0, eddsa.encodingLength); + a[0] &= 248; + a[lastIx] &= 127; + a[lastIx] |= 64; + + return a; +}); + +cachedProperty(KeyPair, 'priv', function priv() { + return this.eddsa.decodeInt(this.privBytes()); +}); + +cachedProperty(KeyPair, 'hash', function hash() { + return this.eddsa.hash().update(this.secret()).digest(); +}); + +cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() { + return this.hash().slice(this.eddsa.encodingLength); +}); + +KeyPair.prototype.sign = function sign(message) { + assert(this._secret, 'KeyPair can only verify'); + return this.eddsa.sign(message, this); +}; + +KeyPair.prototype.verify = function verify(message, sig) { + return this.eddsa.verify(message, sig, this); +}; + +KeyPair.prototype.getSecret = function getSecret(enc) { + assert(this._secret, 'KeyPair is public only'); + return utils.encode(this.secret(), enc); +}; + +KeyPair.prototype.getPublic = function getPublic(enc) { + return utils.encode(this.pubBytes(), enc); +}; + +module.exports = KeyPair; + +},{"../../elliptic":109}],121:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; +var cachedProperty = utils.cachedProperty; +var parseBytes = utils.parseBytes; + +/** +* @param {EDDSA} eddsa - eddsa instance +* @param {Array|Object} sig - +* @param {Array|Point} [sig.R] - R point as Point or bytes +* @param {Array|bn} [sig.S] - S scalar as bn or bytes +* @param {Array} [sig.Rencoded] - R point encoded +* @param {Array} [sig.Sencoded] - S scalar encoded +*/ +function Signature(eddsa, sig) { + this.eddsa = eddsa; + + if (typeof sig !== 'object') + sig = parseBytes(sig); + + if (Array.isArray(sig)) { + sig = { + R: sig.slice(0, eddsa.encodingLength), + S: sig.slice(eddsa.encodingLength) + }; + } + + assert(sig.R && sig.S, 'Signature without R or S'); + + if (eddsa.isPoint(sig.R)) + this._R = sig.R; + if (sig.S instanceof BN) + this._S = sig.S; + + this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded; + this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded; +} + +cachedProperty(Signature, 'S', function S() { + return this.eddsa.decodeInt(this.Sencoded()); +}); + +cachedProperty(Signature, 'R', function R() { + return this.eddsa.decodePoint(this.Rencoded()); +}); + +cachedProperty(Signature, 'Rencoded', function Rencoded() { + return this.eddsa.encodePoint(this.R()); +}); + +cachedProperty(Signature, 'Sencoded', function Sencoded() { + return this.eddsa.encodeInt(this.S()); +}); + +Signature.prototype.toBytes = function toBytes() { + return this.Rencoded().concat(this.Sencoded()); +}; + +Signature.prototype.toHex = function toHex() { + return utils.encode(this.toBytes(), 'hex').toUpperCase(); +}; + +module.exports = Signature; + +},{"../../elliptic":109,"bn.js":53}],122:[function(require,module,exports){ +module.exports = { + doubles: { + step: 4, + points: [ + [ + 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a', + 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821' + ], + [ + '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508', + '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf' + ], + [ + '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739', + 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695' + ], + [ + '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640', + '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9' + ], + [ + '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c', + '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36' + ], + [ + '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda', + '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f' + ], + [ + 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa', + '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999' + ], + [ + '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0', + 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09' + ], + [ + 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d', + '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d' + ], + [ + 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d', + 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088' + ], + [ + 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1', + '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d' + ], + [ + '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0', + '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8' + ], + [ + '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047', + '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a' + ], + [ + '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862', + '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453' + ], + [ + '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7', + '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160' + ], + [ + '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd', + '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0' + ], + [ + '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83', + '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6' + ], + [ + '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a', + '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589' + ], + [ + '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8', + 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17' + ], + [ + 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d', + '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda' + ], + [ + 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725', + '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd' + ], + [ + '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754', + '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2' + ], + [ + '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c', + '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6' + ], + [ + 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6', + '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f' + ], + [ + '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39', + 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01' + ], + [ + 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891', + '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3' + ], + [ + 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b', + 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f' + ], + [ + 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03', + '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7' + ], + [ + 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d', + 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78' + ], + [ + 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070', + '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1' + ], + [ + '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4', + 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150' + ], + [ + '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da', + '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82' + ], + [ + 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11', + '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc' + ], + [ + '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e', + 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b' + ], + [ + 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41', + '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51' + ], + [ + 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef', + '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45' + ], + [ + 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8', + 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120' + ], + [ + '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d', + '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84' + ], + [ + '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96', + '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d' + ], + [ + '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd', + 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d' + ], + [ + '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5', + '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8' + ], + [ + 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266', + '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8' + ], + [ + '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71', + '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac' + ], + [ + '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac', + 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f' + ], + [ + '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751', + '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962' + ], + [ + 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e', + '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907' + ], + [ + '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241', + 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec' + ], + [ + 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3', + 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d' + ], + [ + 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f', + '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414' + ], + [ + '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19', + 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd' + ], + [ + '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be', + 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0' + ], + [ + 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9', + '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811' + ], + [ + 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2', + '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1' + ], + [ + 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13', + '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c' + ], + [ + '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c', + 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73' + ], + [ + '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba', + '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd' + ], + [ + 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151', + 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405' + ], + [ + '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073', + 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589' + ], + [ + '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458', + '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e' + ], + [ + '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b', + '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27' + ], + [ + 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366', + 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1' + ], + [ + '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa', + '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482' + ], + [ + '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0', + '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945' + ], + [ + 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787', + '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573' + ], + [ + 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e', + 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82' + ] + ] + }, + naf: { + wnd: 7, + points: [ + [ + 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9', + '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672' + ], + [ + '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4', + 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6' + ], + [ + '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc', + '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da' + ], + [ + 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe', + 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37' + ], + [ + '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb', + 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b' + ], + [ + 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8', + 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81' + ], + [ + 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e', + '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58' + ], + [ + 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34', + '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77' + ], + [ + '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c', + '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a' + ], + [ + '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5', + '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c' + ], + [ + '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f', + '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67' + ], + [ + '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714', + '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402' + ], + [ + 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729', + 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55' + ], + [ + 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db', + '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482' + ], + [ + '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4', + 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82' + ], + [ + '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5', + 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396' + ], + [ + '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479', + '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49' + ], + [ + '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d', + '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf' + ], + [ + '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f', + '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a' + ], + [ + '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb', + 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7' + ], + [ + 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9', + 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933' + ], + [ + '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963', + '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a' + ], + [ + '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74', + '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6' + ], + [ + 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530', + 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37' + ], + [ + '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b', + '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e' + ], + [ + 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247', + 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6' + ], + [ + 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1', + 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476' + ], + [ + '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120', + '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40' + ], + [ + '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435', + '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61' + ], + [ + '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18', + '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683' + ], + [ + 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8', + '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5' + ], + [ + '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb', + '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b' + ], + [ + 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f', + '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417' + ], + [ + '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143', + 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868' + ], + [ + '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba', + 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a' + ], + [ + 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45', + 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6' + ], + [ + '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a', + '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996' + ], + [ + '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e', + 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e' + ], + [ + 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8', + 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d' + ], + [ + '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c', + '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2' + ], + [ + '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519', + 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e' + ], + [ + '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab', + '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437' + ], + [ + '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca', + 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311' + ], + [ + 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf', + '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4' + ], + [ + '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610', + '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575' + ], + [ + '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4', + 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d' + ], + [ + '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c', + 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d' + ], + [ + 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940', + 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629' + ], + [ + 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980', + 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06' + ], + [ + '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3', + '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374' + ], + [ + '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf', + '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee' + ], + [ + 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63', + '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1' + ], + [ + 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448', + 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b' + ], + [ + '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf', + '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661' + ], + [ + '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5', + '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6' + ], + [ + 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6', + '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e' + ], + [ + '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5', + '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d' + ], + [ + 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99', + 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc' + ], + [ + '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51', + 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4' + ], + [ + '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5', + '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c' + ], + [ + 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5', + '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b' + ], + [ + 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997', + '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913' + ], + [ + '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881', + '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154' + ], + [ + '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5', + '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865' + ], + [ + '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66', + 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc' + ], + [ + '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726', + 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224' + ], + [ + '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede', + '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e' + ], + [ + '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94', + '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6' + ], + [ + '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31', + '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511' + ], + [ + '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51', + 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b' + ], + [ + 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252', + 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2' + ], + [ + '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5', + 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c' + ], + [ + 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b', + '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3' + ], + [ + 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4', + '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d' + ], + [ + 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f', + '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700' + ], + [ + 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889', + '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4' + ], + [ + '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246', + 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196' + ], + [ + '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984', + '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4' + ], + [ + '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a', + 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257' + ], + [ + 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030', + 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13' + ], + [ + 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197', + '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096' + ], + [ + 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593', + 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38' + ], + [ + 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef', + '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f' + ], + [ + '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38', + '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448' + ], + [ + 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a', + '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a' + ], + [ + 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111', + '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4' + ], + [ + '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502', + '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437' + ], + [ + '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea', + 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7' + ], + [ + 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26', + '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d' + ], + [ + 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986', + '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a' + ], + [ + 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e', + '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54' + ], + [ + '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4', + '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77' + ], + [ + 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda', + 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517' + ], + [ + '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859', + 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10' + ], + [ + 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f', + 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125' + ], + [ + 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c', + '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e' + ], + [ + '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942', + 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1' + ], + [ + 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a', + '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2' + ], + [ + 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80', + '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423' + ], + [ + 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d', + '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8' + ], + [ + '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1', + 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758' + ], + [ + '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63', + 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375' + ], + [ + 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352', + '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d' + ], + [ + '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193', + 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec' + ], + [ + '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00', + '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0' + ], + [ + '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58', + 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c' + ], + [ + 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7', + 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4' + ], + [ + '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8', + 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f' + ], + [ + '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e', + '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649' + ], + [ + '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d', + 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826' + ], + [ + '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b', + '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5' + ], + [ + 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f', + 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87' + ], + [ + '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6', + '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b' + ], + [ + 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297', + '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc' + ], + [ + '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a', + '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c' + ], + [ + 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c', + 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f' + ], + [ + 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52', + '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a' + ], + [ + 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb', + 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46' + ], + [ + '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065', + 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f' + ], + [ + '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917', + '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03' + ], + [ + '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9', + 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08' + ], + [ + '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3', + '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8' + ], + [ + '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57', + '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373' + ], + [ + '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66', + 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3' + ], + [ + '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8', + '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8' + ], + [ + '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721', + '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1' + ], + [ + '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180', + '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9' + ] + ] + } +}; + +},{}],123:[function(require,module,exports){ +'use strict'; + +var utils = exports; +var BN = require('bn.js'); +var minAssert = require('minimalistic-assert'); +var minUtils = require('minimalistic-crypto-utils'); + +utils.assert = minAssert; +utils.toArray = minUtils.toArray; +utils.zero2 = minUtils.zero2; +utils.toHex = minUtils.toHex; +utils.encode = minUtils.encode; + +// Represent num in a w-NAF form +function getNAF(num, w) { + var naf = []; + var ws = 1 << (w + 1); + var k = num.clone(); + while (k.cmpn(1) >= 0) { + var z; + if (k.isOdd()) { + var mod = k.andln(ws - 1); + if (mod > (ws >> 1) - 1) + z = (ws >> 1) - mod; + else + z = mod; + k.isubn(z); + } else { + z = 0; + } + naf.push(z); + + // Optimization, shift by word if possible + var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1; + for (var i = 1; i < shift; i++) + naf.push(0); + k.iushrn(shift); + } + + return naf; +} +utils.getNAF = getNAF; + +// Represent k1, k2 in a Joint Sparse Form +function getJSF(k1, k2) { + var jsf = [ + [], + [] + ]; + + k1 = k1.clone(); + k2 = k2.clone(); + var d1 = 0; + var d2 = 0; + while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { + + // First phase + var m14 = (k1.andln(3) + d1) & 3; + var m24 = (k2.andln(3) + d2) & 3; + if (m14 === 3) + m14 = -1; + if (m24 === 3) + m24 = -1; + var u1; + if ((m14 & 1) === 0) { + u1 = 0; + } else { + var m8 = (k1.andln(7) + d1) & 7; + if ((m8 === 3 || m8 === 5) && m24 === 2) + u1 = -m14; + else + u1 = m14; + } + jsf[0].push(u1); + + var u2; + if ((m24 & 1) === 0) { + u2 = 0; + } else { + var m8 = (k2.andln(7) + d2) & 7; + if ((m8 === 3 || m8 === 5) && m14 === 2) + u2 = -m24; + else + u2 = m24; + } + jsf[1].push(u2); + + // Second phase + if (2 * d1 === u1 + 1) + d1 = 1 - d1; + if (2 * d2 === u2 + 1) + d2 = 1 - d2; + k1.iushrn(1); + k2.iushrn(1); + } + + return jsf; +} +utils.getJSF = getJSF; + +function cachedProperty(obj, name, computer) { + var key = '_' + name; + obj.prototype[name] = function cachedProperty() { + return this[key] !== undefined ? this[key] : + this[key] = computer.call(this); + }; +} +utils.cachedProperty = cachedProperty; + +function parseBytes(bytes) { + return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') : + bytes; +} +utils.parseBytes = parseBytes; + +function intFromLE(bytes) { + return new BN(bytes, 'hex', 'le'); +} +utils.intFromLE = intFromLE; + + +},{"bn.js":53,"minimalistic-assert":234,"minimalistic-crypto-utils":235}],124:[function(require,module,exports){ +module.exports={ + "_from": "elliptic@^6.0.0", + "_id": "elliptic@6.4.0", + "_inBundle": false, + "_integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "_location": "/elliptic", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "elliptic@^6.0.0", + "name": "elliptic", + "escapedName": "elliptic", + "rawSpec": "^6.0.0", + "saveSpec": null, + "fetchSpec": "^6.0.0" + }, + "_requiredBy": [ + "/browserify-sign", + "/create-ecdh" + ], + "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "_shasum": "cac9af8762c85836187003c8dfe193e5e2eae5df", + "_spec": "elliptic@^6.0.0", + "_where": "/Users/alexvlasov/Blockchain/web3swift_jsproxy/node_modules/browserify-sign", + "author": { + "name": "Fedor Indutny", + "email": "fedor@indutny.com" + }, + "bugs": { + "url": "https://github.com/indutny/elliptic/issues" + }, + "bundleDependencies": false, + "dependencies": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + }, + "deprecated": false, + "description": "EC cryptography", + "devDependencies": { + "brfs": "^1.4.3", + "coveralls": "^2.11.3", + "grunt": "^0.4.5", + "grunt-browserify": "^5.0.0", + "grunt-cli": "^1.2.0", + "grunt-contrib-connect": "^1.0.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-uglify": "^1.0.1", + "grunt-mocha-istanbul": "^3.0.1", + "grunt-saucelabs": "^8.6.2", + "istanbul": "^0.4.2", + "jscs": "^2.9.0", + "jshint": "^2.6.0", + "mocha": "^2.1.0" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/indutny/elliptic", + "keywords": [ + "EC", + "Elliptic", + "curve", + "Cryptography" + ], + "license": "MIT", + "main": "lib/elliptic.js", + "name": "elliptic", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/indutny/elliptic.git" + }, + "scripts": { + "jscs": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + "jshint": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + "lint": "npm run jscs && npm run jshint", + "test": "npm run lint && npm run unit", + "unit": "istanbul test _mocha --reporter=spec test/index.js", + "version": "grunt dist && git add dist/" + }, + "version": "6.4.0" +} + +},{}],125:[function(require,module,exports){ +'use strict' + +const ethjsUtil = require('ethjs-util') + +module.exports = { + incrementHexNumber, + formatHex, +} + +function incrementHexNumber(hexNum) { + return formatHex(ethjsUtil.intToHex((parseInt(hexNum, 16) + 1))) +} + +function formatHex (hexNum) { + let stripped = ethjsUtil.stripHexPrefix(hexNum) + while (stripped[0] === '0') { + stripped = stripped.substr(1) + } + return `0x${stripped}` +} + +},{"ethjs-util":155}],126:[function(require,module,exports){ +// const EthQuery = require('ethjs-query') +const EthQuery = require('eth-query') +const EventEmitter = require('events') +const pify = require('pify') +const hexUtils = require('./hexUtils') +const incrementHexNumber = hexUtils.incrementHexNumber +const sec = 1000 +const min = 60 * sec + +class RpcBlockTracker extends EventEmitter { + + constructor(opts = {}) { + super() + if (!opts.provider) throw new Error('RpcBlockTracker - no provider specified.') + this._provider = opts.provider + this._query = new EthQuery(opts.provider) + // config + this._pollingInterval = opts.pollingInterval || 4 * sec + this._syncingTimeout = opts.syncingTimeout || 1 * min + // state + this._trackingBlock = null + this._trackingBlockTimestamp = null + this._currentBlock = null + this._isRunning = false + // bind methods for cleaner syntax later + this._performSync = this._performSync.bind(this) + this._handleNewBlockNotification = this._handleNewBlockNotification.bind(this) + } + + getTrackingBlock () { + return this._trackingBlock + } + + getCurrentBlock () { + return this._currentBlock + } + + async awaitCurrentBlock () { + // return if available + if (this._currentBlock) return this._currentBlock + // wait for "sync" event + await new Promise(resolve => this.once('latest', resolve)) + // return newly set current block + return this._currentBlock + } + + async start (opts = {}) { + // abort if already started + if (this._isRunning) return + this._isRunning = true + // if this._currentBlock + if (opts.fromBlock) { + // use specified start point + await this._setTrackingBlock(await this._fetchBlockByNumber(opts.fromBlock)) + } else { + // or query for latest + await this._setTrackingBlock(await this._fetchLatestBlock()) + } + if (this._provider.on) { + await this._initSubscription() + } else { + this._performSync() + .catch((err) => { + if (err) console.error(err) + }) + } + } + + async stop () { + this._isRunning = false + if (this._provider.on) { + await this._removeSubscription() + } + } + + // + // private + // + + async _setTrackingBlock (newBlock) { + if (this._trackingBlock && (this._trackingBlock.hash === newBlock.hash)) return + // check for large timestamp lapse + const previous = this._trackingBlockTimestamp + const now = Date.now() + // check for desynchronization (computer sleep or no internet) + if (previous && (now - previous) > this._syncingTimeout) { + this._trackingBlockTimestamp = null + await this._warpToLatest() + } else { + this._trackingBlock = newBlock + this._trackingBlockTimestamp = now + this.emit('block', newBlock) + } + } + + async _setCurrentBlock (newBlock) { + if (this._currentBlock && (this._currentBlock.hash === newBlock.hash)) return + const oldBlock = this._currentBlock + this._currentBlock = newBlock + this.emit('latest', newBlock) + this.emit('sync', { newBlock, oldBlock }) + } + + async _warpToLatest() { + // set latest as tracking block + await this._setTrackingBlock(await this._fetchLatestBlock()) + } + + async _pollForNextBlock () { + setTimeout(() => this._performSync(), this._pollingInterval) + } + + async _performSync () { + if (!this._isRunning) return + const trackingBlock = this.getTrackingBlock() + if (!trackingBlock) throw new Error('RpcBlockTracker - tracking block is missing') + const nextNumber = incrementHexNumber(trackingBlock.number) + try { + + const newBlock = await this._fetchBlockByNumber(nextNumber) + if (newBlock) { + // set as new tracking block + await this._setTrackingBlock(newBlock) + // ask for next block + this._performSync() + } else { + // set tracking block as current block + await this._setCurrentBlock(trackingBlock) + // setup poll for next block + this._pollForNextBlock() + } + + } catch (err) { + + // hotfix for https://github.com/ethereumjs/testrpc/issues/290 + if (err.message.includes('index out of range') || + err.message.includes("Couldn't find block by reference")) { + // set tracking block as current block + await this._setCurrentBlock(trackingBlock) + // setup poll for next block + this._pollForNextBlock() + } else { + console.error(err) + this._pollForNextBlock() + } + + } + } + + async _handleNewBlockNotification(err, notification) { + if (notification.id != this._subscriptionId) + return // this notification isn't for us + + if (err) { + this.emit('error', err) + await this._removeSubscription() + } + + await this._setTrackingBlock(await this._fetchBlockByNumber(notification.result.number)) + } + + async _initSubscription() { + this._provider.on('data', this._handleNewBlockNotification) + + let result = await pify(this._provider.sendAsync || this._provider.send)({ + jsonrpc: '2.0', + id: new Date().getTime(), + method: 'eth_subscribe', + params: [ + 'newHeads' + ], + }) + + this._subscriptionId = result.result + } + + async _removeSubscription() { + if (!this._subscriptionId) throw new Error("Not subscribed.") + + this._provider.removeListener('data', this._handleNewBlockNotification) + + await pify(this._provider.sendAsync || this._provider.send)({ + jsonrpc: '2.0', + id: new Date().getTime(), + method: 'eth_unsubscribe', + params: [ + this._subscriptionId + ], + }) + + delete this._subscriptionId + } + + _fetchLatestBlock () { + return pify(this._query.getBlockByNumber).call(this._query, 'latest', true) + } + + _fetchBlockByNumber (hexNumber) { + const cleanHex = hexUtils.formatHex(hexNumber) + return pify(this._query.getBlockByNumber).call(this._query, cleanHex, true) + } + +} + +module.exports = RpcBlockTracker + + // ├─ difficulty: 0x2892ddca + // ├─ extraData: 0xd983010507846765746887676f312e372e348777696e646f7773 + // ├─ gasLimit: 0x47e7c4 + // ├─ gasUsed: 0x6384 + // ├─ hash: 0xf60903687b1559b9c80f2d935b4c4f468ad95c3076928c432ec34f2ef3d4eec9 + // ├─ logsBloom: 0x00000000000000000000000000000000000000000000000000000000000020000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000 + // ├─ miner: 0x01711853335f857442ef6f349b2467c531731318 + // ├─ mixHash: 0xf0d9bec999600eec92e8e4da8fc1182e357468c9ed2f849aa17e0e900412b352 + // ├─ nonce: 0xd556d5a5504198e4 + // ├─ number: 0x72ac8 + // ├─ parentHash: 0xf5239c3ce1085194521435a5052494c02bbb1002b019684dcf368490ea6208e5 + // ├─ receiptsRoot: 0x78c6f8236094b392bcc43b47b0dc1ce93ecd2875bfb5e4e4c3431e5af698ff99 + // ├─ sha3Uncles: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347 + // ├─ size: 0x2ad + // ├─ stateRoot: 0x0554f145c481df2fa02ecd2da17071672740c3aa948c896f1465e6772f741ac6 + // ├─ timestamp: 0x58955844 + // ├─ totalDifficulty: 0x751d0dfa03c1 + // ├─ transactions + // │ └─ 0 + // │ ├─ blockHash: 0xf60903687b1559b9c80f2d935b4c4f468ad95c3076928c432ec34f2ef3d4eec9 + // │ ├─ blockNumber: 0x72ac8 + // │ ├─ from: 0x201354729f8d0f8b64e9a0c353c672c6a66b3857 + // │ ├─ gas: 0x15f90 + // │ ├─ gasPrice: 0x4a817c800 + // │ ├─ hash: 0xd5a15d7c2449150db4f74f42a6ca0702150a24c46c5b406a7e1b3e44908ef44d + // │ ├─ input: 0xe1fa8e849bc10d87fb03c6b0603b05a3e29043c7e0b7c927119576a4bec457e96c7d7cde + // │ ├─ nonce: 0x323e + // │ ├─ to: 0xd10e3be2bc8f959bc8c41cf65f60de721cf89adf + // │ ├─ transactionIndex: 0x0 + // │ ├─ value: 0x0 + // │ ├─ v: 0x29 + // │ ├─ r: 0xf35f8ab241e6bb3ccaffd21b268dbfc7fcb5df1c1fb83ee5306207e4a1a3e954 + // │ └─ s: 0x1610cdac2782c91065fd43584cd8974f7f3b4e6d46a2aafe7b101788285bf3f2 + // ├─ transactionsRoot: 0xb090c32d840dec1e9752719f21bbae4a73e58333aecb89bc3b8ed559fb2712a3 + // └─ uncles + +},{"./hexUtils":125,"eth-query":135,"events":157,"pify":252}],127:[function(require,module,exports){ +(function (Buffer){ +var sha3 = require('js-sha3').keccak_256 +var uts46 = require('idna-uts46-hx') + +function namehash (inputName) { + // Reject empty names: + var node = '' + for (var i = 0; i < 32; i++) { + node += '00' + } + + name = normalize(inputName) + + if (name) { + var labels = name.split('.') + + for(var i = labels.length - 1; i >= 0; i--) { + var labelSha = sha3(labels[i]) + node = sha3(new Buffer(node + labelSha, 'hex')) + } + } + + return '0x' + node +} + +function normalize(name) { + return name ? uts46.toUnicode(name, {useStd3ASCII: true, transitional: false}) : name +} + +exports.hash = namehash +exports.normalize = normalize + +}).call(this,require("buffer").Buffer) +},{"buffer":84,"idna-uts46-hx":177,"js-sha3":128}],128:[function(require,module,exports){ +(function (process,global){ +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.5.7 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2016 + * @license MIT + */ +/*jslint bitwise: true */ +(function () { + 'use strict'; + + var root = typeof window === 'object' ? window : {}; + var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node; + if (NODE_JS) { + root = global; + } + var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports; + var HEX_CHARS = '0123456789abcdef'.split(''); + var SHAKE_PADDING = [31, 7936, 2031616, 520093696]; + var KECCAK_PADDING = [1, 256, 65536, 16777216]; + var PADDING = [6, 1536, 393216, 100663296]; + var SHIFT = [0, 8, 16, 24]; + var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, + 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, + 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, + 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, + 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]; + var BITS = [224, 256, 384, 512]; + var SHAKE_BITS = [128, 256]; + var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array']; + + var createOutputMethod = function (bits, padding, outputType) { + return function (message) { + return new Keccak(bits, padding, bits).update(message)[outputType](); + }; + }; + + var createShakeOutputMethod = function (bits, padding, outputType) { + return function (message, outputBits) { + return new Keccak(bits, padding, outputBits).update(message)[outputType](); + }; + }; + + var createMethod = function (bits, padding) { + var method = createOutputMethod(bits, padding, 'hex'); + method.create = function () { + return new Keccak(bits, padding, bits); + }; + method.update = function (message) { + return method.create().update(message); + }; + for (var i = 0; i < OUTPUT_TYPES.length; ++i) { + var type = OUTPUT_TYPES[i]; + method[type] = createOutputMethod(bits, padding, type); + } + return method; + }; + + var createShakeMethod = function (bits, padding) { + var method = createShakeOutputMethod(bits, padding, 'hex'); + method.create = function (outputBits) { + return new Keccak(bits, padding, outputBits); + }; + method.update = function (message, outputBits) { + return method.create(outputBits).update(message); + }; + for (var i = 0; i < OUTPUT_TYPES.length; ++i) { + var type = OUTPUT_TYPES[i]; + method[type] = createShakeOutputMethod(bits, padding, type); + } + return method; + }; + + var algorithms = [ + {name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod}, + {name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod}, + {name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod} + ]; + + var methods = {}, methodNames = []; + + for (var i = 0; i < algorithms.length; ++i) { + var algorithm = algorithms[i]; + var bits = algorithm.bits; + for (var j = 0; j < bits.length; ++j) { + var methodName = algorithm.name +'_' + bits[j]; + methodNames.push(methodName); + methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding); + } + } + + function Keccak(bits, padding, outputBits) { + this.blocks = []; + this.s = []; + this.padding = padding; + this.outputBits = outputBits; + this.reset = true; + this.block = 0; + this.start = 0; + this.blockCount = (1600 - (bits << 1)) >> 5; + this.byteCount = this.blockCount << 2; + this.outputBlocks = outputBits >> 5; + this.extraBytes = (outputBits & 31) >> 3; + + for (var i = 0; i < 50; ++i) { + this.s[i] = 0; + } + } + + Keccak.prototype.update = function (message) { + var notString = typeof message !== 'string'; + if (notString && message.constructor === ArrayBuffer) { + message = new Uint8Array(message); + } + var length = message.length, blocks = this.blocks, byteCount = this.byteCount, + blockCount = this.blockCount, index = 0, s = this.s, i, code; + + while (index < length) { + if (this.reset) { + this.reset = false; + blocks[0] = this.block; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + if (notString) { + for (i = this.start; index < length && i < byteCount; ++index) { + blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; + } + } else { + for (i = this.start; index < length && i < byteCount; ++index) { + code = message.charCodeAt(index); + if (code < 0x80) { + blocks[i >> 2] |= code << SHIFT[i++ & 3]; + } else if (code < 0x800) { + blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else if (code < 0xd800 || code >= 0xe000) { + blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); + blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } + } + } + this.lastByteIndex = i; + if (i >= byteCount) { + this.start = i - byteCount; + this.block = blocks[blockCount]; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + this.reset = true; + } else { + this.start = i; + } + } + return this; + }; + + Keccak.prototype.finalize = function () { + var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s; + blocks[i >> 2] |= this.padding[i & 3]; + if (this.lastByteIndex === this.byteCount) { + blocks[0] = blocks[blockCount]; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + blocks[blockCount - 1] |= 0x80000000; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + }; + + Keccak.prototype.toString = Keccak.prototype.hex = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var hex = '', block; + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + block = s[i]; + hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] + + HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] + + HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] + + HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F]; + } + if (j % blockCount === 0) { + f(s); + i = 0; + } + } + if (extraBytes) { + block = s[i]; + if (extraBytes > 0) { + hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F]; + } + if (extraBytes > 1) { + hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F]; + } + if (extraBytes > 2) { + hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F]; + } + } + return hex; + }; + + Keccak.prototype.arrayBuffer = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var bytes = this.outputBits >> 3; + var buffer; + if (extraBytes) { + buffer = new ArrayBuffer((outputBlocks + 1) << 2); + } else { + buffer = new ArrayBuffer(bytes); + } + var array = new Uint32Array(buffer); + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + array[j] = s[i]; + } + if (j % blockCount === 0) { + f(s); + } + } + if (extraBytes) { + array[i] = s[i]; + buffer = buffer.slice(0, bytes); + } + return buffer; + }; + + Keccak.prototype.buffer = Keccak.prototype.arrayBuffer; + + Keccak.prototype.digest = Keccak.prototype.array = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var array = [], offset, block; + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + offset = j << 2; + block = s[i]; + array[offset] = block & 0xFF; + array[offset + 1] = (block >> 8) & 0xFF; + array[offset + 2] = (block >> 16) & 0xFF; + array[offset + 3] = (block >> 24) & 0xFF; + } + if (j % blockCount === 0) { + f(s); + } + } + if (extraBytes) { + offset = j << 2; + block = s[i]; + if (extraBytes > 0) { + array[offset] = block & 0xFF; + } + if (extraBytes > 1) { + array[offset + 1] = (block >> 8) & 0xFF; + } + if (extraBytes > 2) { + array[offset + 2] = (block >> 16) & 0xFF; + } + } + return array; + }; + + var f = function (s) { + var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, + b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, + b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, + b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49; + for (n = 0; n < 48; n += 2) { + c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]; + c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]; + c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]; + c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]; + c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]; + c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]; + c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]; + c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]; + c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]; + c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]; + + h = c8 ^ ((c2 << 1) | (c3 >>> 31)); + l = c9 ^ ((c3 << 1) | (c2 >>> 31)); + s[0] ^= h; + s[1] ^= l; + s[10] ^= h; + s[11] ^= l; + s[20] ^= h; + s[21] ^= l; + s[30] ^= h; + s[31] ^= l; + s[40] ^= h; + s[41] ^= l; + h = c0 ^ ((c4 << 1) | (c5 >>> 31)); + l = c1 ^ ((c5 << 1) | (c4 >>> 31)); + s[2] ^= h; + s[3] ^= l; + s[12] ^= h; + s[13] ^= l; + s[22] ^= h; + s[23] ^= l; + s[32] ^= h; + s[33] ^= l; + s[42] ^= h; + s[43] ^= l; + h = c2 ^ ((c6 << 1) | (c7 >>> 31)); + l = c3 ^ ((c7 << 1) | (c6 >>> 31)); + s[4] ^= h; + s[5] ^= l; + s[14] ^= h; + s[15] ^= l; + s[24] ^= h; + s[25] ^= l; + s[34] ^= h; + s[35] ^= l; + s[44] ^= h; + s[45] ^= l; + h = c4 ^ ((c8 << 1) | (c9 >>> 31)); + l = c5 ^ ((c9 << 1) | (c8 >>> 31)); + s[6] ^= h; + s[7] ^= l; + s[16] ^= h; + s[17] ^= l; + s[26] ^= h; + s[27] ^= l; + s[36] ^= h; + s[37] ^= l; + s[46] ^= h; + s[47] ^= l; + h = c6 ^ ((c0 << 1) | (c1 >>> 31)); + l = c7 ^ ((c1 << 1) | (c0 >>> 31)); + s[8] ^= h; + s[9] ^= l; + s[18] ^= h; + s[19] ^= l; + s[28] ^= h; + s[29] ^= l; + s[38] ^= h; + s[39] ^= l; + s[48] ^= h; + s[49] ^= l; + + b0 = s[0]; + b1 = s[1]; + b32 = (s[11] << 4) | (s[10] >>> 28); + b33 = (s[10] << 4) | (s[11] >>> 28); + b14 = (s[20] << 3) | (s[21] >>> 29); + b15 = (s[21] << 3) | (s[20] >>> 29); + b46 = (s[31] << 9) | (s[30] >>> 23); + b47 = (s[30] << 9) | (s[31] >>> 23); + b28 = (s[40] << 18) | (s[41] >>> 14); + b29 = (s[41] << 18) | (s[40] >>> 14); + b20 = (s[2] << 1) | (s[3] >>> 31); + b21 = (s[3] << 1) | (s[2] >>> 31); + b2 = (s[13] << 12) | (s[12] >>> 20); + b3 = (s[12] << 12) | (s[13] >>> 20); + b34 = (s[22] << 10) | (s[23] >>> 22); + b35 = (s[23] << 10) | (s[22] >>> 22); + b16 = (s[33] << 13) | (s[32] >>> 19); + b17 = (s[32] << 13) | (s[33] >>> 19); + b48 = (s[42] << 2) | (s[43] >>> 30); + b49 = (s[43] << 2) | (s[42] >>> 30); + b40 = (s[5] << 30) | (s[4] >>> 2); + b41 = (s[4] << 30) | (s[5] >>> 2); + b22 = (s[14] << 6) | (s[15] >>> 26); + b23 = (s[15] << 6) | (s[14] >>> 26); + b4 = (s[25] << 11) | (s[24] >>> 21); + b5 = (s[24] << 11) | (s[25] >>> 21); + b36 = (s[34] << 15) | (s[35] >>> 17); + b37 = (s[35] << 15) | (s[34] >>> 17); + b18 = (s[45] << 29) | (s[44] >>> 3); + b19 = (s[44] << 29) | (s[45] >>> 3); + b10 = (s[6] << 28) | (s[7] >>> 4); + b11 = (s[7] << 28) | (s[6] >>> 4); + b42 = (s[17] << 23) | (s[16] >>> 9); + b43 = (s[16] << 23) | (s[17] >>> 9); + b24 = (s[26] << 25) | (s[27] >>> 7); + b25 = (s[27] << 25) | (s[26] >>> 7); + b6 = (s[36] << 21) | (s[37] >>> 11); + b7 = (s[37] << 21) | (s[36] >>> 11); + b38 = (s[47] << 24) | (s[46] >>> 8); + b39 = (s[46] << 24) | (s[47] >>> 8); + b30 = (s[8] << 27) | (s[9] >>> 5); + b31 = (s[9] << 27) | (s[8] >>> 5); + b12 = (s[18] << 20) | (s[19] >>> 12); + b13 = (s[19] << 20) | (s[18] >>> 12); + b44 = (s[29] << 7) | (s[28] >>> 25); + b45 = (s[28] << 7) | (s[29] >>> 25); + b26 = (s[38] << 8) | (s[39] >>> 24); + b27 = (s[39] << 8) | (s[38] >>> 24); + b8 = (s[48] << 14) | (s[49] >>> 18); + b9 = (s[49] << 14) | (s[48] >>> 18); + + s[0] = b0 ^ (~b2 & b4); + s[1] = b1 ^ (~b3 & b5); + s[10] = b10 ^ (~b12 & b14); + s[11] = b11 ^ (~b13 & b15); + s[20] = b20 ^ (~b22 & b24); + s[21] = b21 ^ (~b23 & b25); + s[30] = b30 ^ (~b32 & b34); + s[31] = b31 ^ (~b33 & b35); + s[40] = b40 ^ (~b42 & b44); + s[41] = b41 ^ (~b43 & b45); + s[2] = b2 ^ (~b4 & b6); + s[3] = b3 ^ (~b5 & b7); + s[12] = b12 ^ (~b14 & b16); + s[13] = b13 ^ (~b15 & b17); + s[22] = b22 ^ (~b24 & b26); + s[23] = b23 ^ (~b25 & b27); + s[32] = b32 ^ (~b34 & b36); + s[33] = b33 ^ (~b35 & b37); + s[42] = b42 ^ (~b44 & b46); + s[43] = b43 ^ (~b45 & b47); + s[4] = b4 ^ (~b6 & b8); + s[5] = b5 ^ (~b7 & b9); + s[14] = b14 ^ (~b16 & b18); + s[15] = b15 ^ (~b17 & b19); + s[24] = b24 ^ (~b26 & b28); + s[25] = b25 ^ (~b27 & b29); + s[34] = b34 ^ (~b36 & b38); + s[35] = b35 ^ (~b37 & b39); + s[44] = b44 ^ (~b46 & b48); + s[45] = b45 ^ (~b47 & b49); + s[6] = b6 ^ (~b8 & b0); + s[7] = b7 ^ (~b9 & b1); + s[16] = b16 ^ (~b18 & b10); + s[17] = b17 ^ (~b19 & b11); + s[26] = b26 ^ (~b28 & b20); + s[27] = b27 ^ (~b29 & b21); + s[36] = b36 ^ (~b38 & b30); + s[37] = b37 ^ (~b39 & b31); + s[46] = b46 ^ (~b48 & b40); + s[47] = b47 ^ (~b49 & b41); + s[8] = b8 ^ (~b0 & b2); + s[9] = b9 ^ (~b1 & b3); + s[18] = b18 ^ (~b10 & b12); + s[19] = b19 ^ (~b11 & b13); + s[28] = b28 ^ (~b20 & b22); + s[29] = b29 ^ (~b21 & b23); + s[38] = b38 ^ (~b30 & b32); + s[39] = b39 ^ (~b31 & b33); + s[48] = b48 ^ (~b40 & b42); + s[49] = b49 ^ (~b41 & b43); + + s[0] ^= RC[n]; + s[1] ^= RC[n + 1]; + } + }; + + if (COMMON_JS) { + module.exports = methods; + } else { + for (var i = 0; i < methodNames.length; ++i) { + root[methodNames[i]] = methods[methodNames[i]]; + } + } +})(); + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"_process":257}],129:[function(require,module,exports){ +const RpcEngine = require('json-rpc-engine') +const providerFromEngine = require('eth-json-rpc-middleware/providerFromEngine') +const createInfuraMiddleware = require('./index') + + +module.exports = createProvider + +function createProvider(opts){ + const engine = new RpcEngine() + engine.push(createInfuraMiddleware(opts)) + return providerFromEngine(engine) +} + +},{"./index":130,"eth-json-rpc-middleware/providerFromEngine":131,"json-rpc-engine":188}],130:[function(require,module,exports){ +const createAsyncMiddleware = require('json-rpc-engine/src/createAsyncMiddleware') +const JsonRpcError = require('json-rpc-error') +const fetch = require('cross-fetch') + +const POST_METHODS = ['eth_call', 'eth_estimateGas', 'eth_sendRawTransaction'] +const RETRIABLE_ERRORS = [ + // ignore server overload errors + 'Gateway timeout', + 'ETIMEDOUT', + 'ECONNRESET', + // ignore server sent html error pages + // or truncated json responses + 'SyntaxError', +] + +module.exports = createInfuraMiddleware +module.exports.fetchConfigFromReq = fetchConfigFromReq + +function createInfuraMiddleware(opts = {}) { + const network = opts.network || 'mainnet' + const maxAttempts = opts.maxAttempts || 5 + // validate options + if (!maxAttempts) throw new Error(`Invalid value for 'maxAttempts': "${maxAttempts}" (${typeof maxAttempts})`) + + return createAsyncMiddleware(async (req, res, next) => { + // retry MAX_ATTEMPTS times, if error matches filter + for (let attempt = 1; attempt <= maxAttempts; attempt++) { + try { + // attempt request + await performFetch(network, req, res) + // request was succesful + break + } catch (err) { + // an error was caught while performing the request + // if not retriable, resolve with the encountered error + if (!isRetriableError(err)) { + // abort with error + throw err + } + // if no more attempts remaining, throw an error + const remainingAttempts = maxAttempts - attempt + if (!remainingAttempts) { + const errMsg = `InfuraProvider - cannot complete request. All retries exhausted.\nOriginal Error:\n${err.toString()}\n\n` + const retriesExhaustedErr = new Error(errMsg) + throw retriesExhaustedErr + } + // otherwise, ignore error and retry again after timeout + await timeout(1000) + } + } + // request was handled correctly, end + }) +} + +function timeout(length) { + return new Promise((resolve) => { + setTimeout(resolve, length) + }) +} + +function isRetriableError(err) { + const errMessage = err.toString() + return RETRIABLE_ERRORS.some(phrase => errMessage.includes(phrase)) +} + +async function performFetch(network, req, res){ + const { fetchUrl, fetchParams } = fetchConfigFromReq({ network, req }) + const response = await fetch(fetchUrl, fetchParams) + const rawData = await response.text() + // handle errors + if (!response.ok) { + switch (response.status) { + case 405: + throw new JsonRpcError.MethodNotFound() + + case 418: + throw createRatelimitError() + + case 503: + case 504: + throw createTimeoutError() + + default: + throw createInternalError(rawData) + } + } + + // special case for now + if (req.method === 'eth_getBlockByNumber' && rawData === 'Not Found') { + res.result = null + return + } + + // parse JSON + const data = JSON.parse(rawData) + + // finally return result + res.result = data.result + res.error = data.error +} + +function fetchConfigFromReq({ network, req }) { + const cleanReq = normalizeReq(req) + const { method, params } = cleanReq + + const fetchParams = {} + let fetchUrl = `https://api.infura.io/v1/jsonrpc/${network}` + const isPostMethod = POST_METHODS.includes(method) + if (isPostMethod) { + fetchParams.method = 'POST' + fetchParams.headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + }, + fetchParams.body = JSON.stringify(cleanReq) + } else { + fetchParams.method = 'GET' + const paramsString = encodeURIComponent(JSON.stringify(params)) + fetchUrl += `/${method}?params=${paramsString}` + } + + return { fetchUrl, fetchParams } +} + +// strips out extra keys that could be rejected by strict nodes like parity +function normalizeReq(req) { + return { + id: req.id, + jsonrpc: req.jsonrpc, + method: req.method, + params: req.params, + } +} + +function createRatelimitError () { + let msg = `Request is being rate limited.` + return createInternalError(msg) +} + +function createTimeoutError () { + let msg = `Gateway timeout. The request took too long to process. ` + msg += `This can happen when querying logs over too wide a block range.` + return createInternalError(msg) +} + +function createInternalError (msg) { + const err = new Error(msg) + return new JsonRpcError.InternalError(err) +} + +},{"cross-fetch":96,"json-rpc-engine/src/createAsyncMiddleware":187,"json-rpc-error":189}],131:[function(require,module,exports){ +module.exports = providerFromEngine + +function providerFromEngine (engine) { + const provider = { sendAsync: engine.handle.bind(engine) } + return provider +} + +},{}],132:[function(require,module,exports){ +var generate = function generate(num, fn) { + var a = []; + for (var i = 0; i < num; ++i) { + a.push(fn(i)); + }return a; +}; + +var replicate = function replicate(num, val) { + return generate(num, function () { + return val; + }); +}; + +var concat = function concat(a, b) { + return a.concat(b); +}; + +var flatten = function flatten(a) { + var r = []; + for (var j = 0, J = a.length; j < J; ++j) { + for (var i = 0, I = a[j].length; i < I; ++i) { + r.push(a[j][i]); + } + }return r; +}; + +var chunksOf = function chunksOf(n, a) { + var b = []; + for (var i = 0, l = a.length; i < l; i += n) { + b.push(a.slice(i, i + n)); + }return b; +}; + +module.exports = { + generate: generate, + replicate: replicate, + concat: concat, + flatten: flatten, + chunksOf: chunksOf +}; +},{}],133:[function(require,module,exports){ +var A = require("./array.js"); + +var at = function at(bytes, index) { + return parseInt(bytes.slice(index * 2 + 2, index * 2 + 4), 16); +}; + +var random = function random(bytes) { + var rnd = void 0; + if (typeof window !== "undefined" && window.crypto && window.crypto.getRandomValues) rnd = window.crypto.getRandomValues(new Uint8Array(bytes));else if (typeof require !== "undefined") rnd = require("c" + "rypto").randomBytes(bytes);else throw "Safe random numbers not available."; + var hex = "0x"; + for (var i = 0; i < bytes; ++i) { + hex += ("00" + rnd[i].toString(16)).slice(-2); + }return hex; +}; + +var length = function length(a) { + return (a.length - 2) / 2; +}; + +var flatten = function flatten(a) { + return "0x" + a.reduce(function (r, s) { + return r + s.slice(2); + }, ""); +}; + +var slice = function slice(i, j, bs) { + return "0x" + bs.slice(i * 2 + 2, j * 2 + 2); +}; + +var reverse = function reverse(hex) { + var rev = "0x"; + for (var i = 0, l = length(hex); i < l; ++i) { + rev += hex.slice((l - i) * 2, (l - i + 1) * 2); + } + return rev; +}; + +var pad = function pad(l, hex) { + return hex.length === l * 2 + 2 ? hex : pad(l, "0x" + "0" + hex.slice(2)); +}; + +var padRight = function padRight(l, hex) { + return hex.length === l * 2 + 2 ? hex : padRight(l, hex + "0"); +}; + +var toArray = function toArray(hex) { + var arr = []; + for (var i = 2, l = hex.length; i < l; i += 2) { + arr.push(parseInt(hex.slice(i, i + 2), 16)); + }return arr; +}; + +var fromArray = function fromArray(arr) { + var hex = "0x"; + for (var i = 0, l = arr.length; i < l; ++i) { + var b = arr[i]; + hex += (b < 16 ? "0" : "") + b.toString(16); + } + return hex; +}; + +var toUint8Array = function toUint8Array(hex) { + return new Uint8Array(toArray(hex)); +}; + +var fromUint8Array = function fromUint8Array(arr) { + return fromArray([].slice.call(arr, 0)); +}; + +var fromNumber = function fromNumber(num) { + var hex = num.toString(16); + return hex.length % 2 === 0 ? "0x" + hex : "0x0" + hex; +}; + +var toNumber = function toNumber(hex) { + return parseInt(hex.slice(2), 16); +}; + +var concat = function concat(a, b) { + return a.concat(b.slice(2)); +}; + +var fromNat = function fromNat(bn) { + return bn === "0x0" ? "0x" : bn.length % 2 === 0 ? bn : "0x0" + bn.slice(2); +}; + +var toNat = function toNat(bn) { + return bn[2] === "0" ? "0x" + bn.slice(3) : bn; +}; + +var fromAscii = function fromAscii(ascii) { + var hex = "0x"; + for (var i = 0; i < ascii.length; ++i) { + hex += ("00" + ascii.charCodeAt(i).toString(16)).slice(-2); + }return hex; +}; + +var toAscii = function toAscii(hex) { + var ascii = ""; + for (var i = 2; i < hex.length; i += 2) { + ascii += String.fromCharCode(parseInt(hex.slice(i, i + 2), 16)); + }return ascii; +}; + +// From https://gist.github.com/pascaldekloe/62546103a1576803dade9269ccf76330 +var fromString = function fromString(s) { + var makeByte = function makeByte(uint8) { + var b = uint8.toString(16); + return b.length < 2 ? "0" + b : b; + }; + var bytes = "0x"; + for (var ci = 0; ci != s.length; ci++) { + var c = s.charCodeAt(ci); + if (c < 128) { + bytes += makeByte(c); + continue; + } + if (c < 2048) { + bytes += makeByte(c >> 6 | 192); + } else { + if (c > 0xd7ff && c < 0xdc00) { + if (++ci == s.length) return null; + var c2 = s.charCodeAt(ci); + if (c2 < 0xdc00 || c2 > 0xdfff) return null; + c = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff); + bytes += makeByte(c >> 18 | 240); + bytes += makeByte(c >> 12 & 63 | 128); + } else { + // c <= 0xffff + bytes += makeByte(c >> 12 | 224); + } + bytes += makeByte(c >> 6 & 63 | 128); + } + bytes += makeByte(c & 63 | 128); + } + return bytes; +}; + +var toString = function toString(bytes) { + var s = ''; + var i = 0; + var l = length(bytes); + while (i < l) { + var c = at(bytes, i++); + if (c > 127) { + if (c > 191 && c < 224) { + if (i >= l) return null; + c = (c & 31) << 6 | at(bytes, i) & 63; + } else if (c > 223 && c < 240) { + if (i + 1 >= l) return null; + c = (c & 15) << 12 | (at(bytes, i) & 63) << 6 | at(bytes, ++i) & 63; + } else if (c > 239 && c < 248) { + if (i + 2 >= l) return null; + c = (c & 7) << 18 | (at(bytes, i) & 63) << 12 | (at(bytes, ++i) & 63) << 6 | at(bytes, ++i) & 63; + } else return null; + ++i; + } + if (c <= 0xffff) s += String.fromCharCode(c);else if (c <= 0x10ffff) { + c -= 0x10000; + s += String.fromCharCode(c >> 10 | 0xd800); + s += String.fromCharCode(c & 0x3FF | 0xdc00); + } else return null; + } + return s; +}; + +module.exports = { + random: random, + length: length, + concat: concat, + flatten: flatten, + slice: slice, + reverse: reverse, + pad: pad, + padRight: padRight, + fromAscii: fromAscii, + toAscii: toAscii, + fromString: fromString, + toString: toString, + fromNumber: fromNumber, + toNumber: toNumber, + fromNat: fromNat, + toNat: toNat, + fromArray: fromArray, + toArray: toArray, + fromUint8Array: fromUint8Array, + toUint8Array: toUint8Array +}; +},{"./array.js":132}],134:[function(require,module,exports){ +// This was ported from https://github.com/emn178/js-sha3, with some minor +// modifications and pruning. It is licensed under MIT: +// +// Copyright 2015-2016 Chen, Yi-Cyuan +// +// 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. + +var HEX_CHARS = '0123456789abcdef'.split(''); +var KECCAK_PADDING = [1, 256, 65536, 16777216]; +var SHIFT = [0, 8, 16, 24]; +var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]; + +var Keccak = function Keccak(bits) { + return { + blocks: [], + reset: true, + block: 0, + start: 0, + blockCount: 1600 - (bits << 1) >> 5, + outputBlocks: bits >> 5, + s: function (s) { + return [].concat(s, s, s, s, s); + }([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) + }; +}; + +var update = function update(state, message) { + var length = message.length, + blocks = state.blocks, + byteCount = state.blockCount << 2, + blockCount = state.blockCount, + outputBlocks = state.outputBlocks, + s = state.s, + index = 0, + i, + code; + + // update + while (index < length) { + if (state.reset) { + state.reset = false; + blocks[0] = state.block; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + if (typeof message !== "string") { + for (i = state.start; index < length && i < byteCount; ++index) { + blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; + } + } else { + for (i = state.start; index < length && i < byteCount; ++index) { + code = message.charCodeAt(index); + if (code < 0x80) { + blocks[i >> 2] |= code << SHIFT[i++ & 3]; + } else if (code < 0x800) { + blocks[i >> 2] |= (0xc0 | code >> 6) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3]; + } else if (code < 0xd800 || code >= 0xe000) { + blocks[i >> 2] |= (0xe0 | code >> 12) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3]; + } else { + code = 0x10000 + ((code & 0x3ff) << 10 | message.charCodeAt(++index) & 0x3ff); + blocks[i >> 2] |= (0xf0 | code >> 18) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | code >> 12 & 0x3f) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3]; + } + } + } + state.lastByteIndex = i; + if (i >= byteCount) { + state.start = i - byteCount; + state.block = blocks[blockCount]; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + state.reset = true; + } else { + state.start = i; + } + } + + // finalize + i = state.lastByteIndex; + blocks[i >> 2] |= KECCAK_PADDING[i & 3]; + if (state.lastByteIndex === byteCount) { + blocks[0] = blocks[blockCount]; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + blocks[blockCount - 1] |= 0x80000000; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + + // toString + var hex = '', + i = 0, + j = 0, + block; + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + block = s[i]; + hex += HEX_CHARS[block >> 4 & 0x0F] + HEX_CHARS[block & 0x0F] + HEX_CHARS[block >> 12 & 0x0F] + HEX_CHARS[block >> 8 & 0x0F] + HEX_CHARS[block >> 20 & 0x0F] + HEX_CHARS[block >> 16 & 0x0F] + HEX_CHARS[block >> 28 & 0x0F] + HEX_CHARS[block >> 24 & 0x0F]; + } + if (j % blockCount === 0) { + f(s); + i = 0; + } + } + return "0x" + hex; +}; + +var f = function f(s) { + var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49; + + for (n = 0; n < 48; n += 2) { + c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]; + c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]; + c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]; + c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]; + c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]; + c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]; + c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]; + c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]; + c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]; + c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]; + + h = c8 ^ (c2 << 1 | c3 >>> 31); + l = c9 ^ (c3 << 1 | c2 >>> 31); + s[0] ^= h; + s[1] ^= l; + s[10] ^= h; + s[11] ^= l; + s[20] ^= h; + s[21] ^= l; + s[30] ^= h; + s[31] ^= l; + s[40] ^= h; + s[41] ^= l; + h = c0 ^ (c4 << 1 | c5 >>> 31); + l = c1 ^ (c5 << 1 | c4 >>> 31); + s[2] ^= h; + s[3] ^= l; + s[12] ^= h; + s[13] ^= l; + s[22] ^= h; + s[23] ^= l; + s[32] ^= h; + s[33] ^= l; + s[42] ^= h; + s[43] ^= l; + h = c2 ^ (c6 << 1 | c7 >>> 31); + l = c3 ^ (c7 << 1 | c6 >>> 31); + s[4] ^= h; + s[5] ^= l; + s[14] ^= h; + s[15] ^= l; + s[24] ^= h; + s[25] ^= l; + s[34] ^= h; + s[35] ^= l; + s[44] ^= h; + s[45] ^= l; + h = c4 ^ (c8 << 1 | c9 >>> 31); + l = c5 ^ (c9 << 1 | c8 >>> 31); + s[6] ^= h; + s[7] ^= l; + s[16] ^= h; + s[17] ^= l; + s[26] ^= h; + s[27] ^= l; + s[36] ^= h; + s[37] ^= l; + s[46] ^= h; + s[47] ^= l; + h = c6 ^ (c0 << 1 | c1 >>> 31); + l = c7 ^ (c1 << 1 | c0 >>> 31); + s[8] ^= h; + s[9] ^= l; + s[18] ^= h; + s[19] ^= l; + s[28] ^= h; + s[29] ^= l; + s[38] ^= h; + s[39] ^= l; + s[48] ^= h; + s[49] ^= l; + + b0 = s[0]; + b1 = s[1]; + b32 = s[11] << 4 | s[10] >>> 28; + b33 = s[10] << 4 | s[11] >>> 28; + b14 = s[20] << 3 | s[21] >>> 29; + b15 = s[21] << 3 | s[20] >>> 29; + b46 = s[31] << 9 | s[30] >>> 23; + b47 = s[30] << 9 | s[31] >>> 23; + b28 = s[40] << 18 | s[41] >>> 14; + b29 = s[41] << 18 | s[40] >>> 14; + b20 = s[2] << 1 | s[3] >>> 31; + b21 = s[3] << 1 | s[2] >>> 31; + b2 = s[13] << 12 | s[12] >>> 20; + b3 = s[12] << 12 | s[13] >>> 20; + b34 = s[22] << 10 | s[23] >>> 22; + b35 = s[23] << 10 | s[22] >>> 22; + b16 = s[33] << 13 | s[32] >>> 19; + b17 = s[32] << 13 | s[33] >>> 19; + b48 = s[42] << 2 | s[43] >>> 30; + b49 = s[43] << 2 | s[42] >>> 30; + b40 = s[5] << 30 | s[4] >>> 2; + b41 = s[4] << 30 | s[5] >>> 2; + b22 = s[14] << 6 | s[15] >>> 26; + b23 = s[15] << 6 | s[14] >>> 26; + b4 = s[25] << 11 | s[24] >>> 21; + b5 = s[24] << 11 | s[25] >>> 21; + b36 = s[34] << 15 | s[35] >>> 17; + b37 = s[35] << 15 | s[34] >>> 17; + b18 = s[45] << 29 | s[44] >>> 3; + b19 = s[44] << 29 | s[45] >>> 3; + b10 = s[6] << 28 | s[7] >>> 4; + b11 = s[7] << 28 | s[6] >>> 4; + b42 = s[17] << 23 | s[16] >>> 9; + b43 = s[16] << 23 | s[17] >>> 9; + b24 = s[26] << 25 | s[27] >>> 7; + b25 = s[27] << 25 | s[26] >>> 7; + b6 = s[36] << 21 | s[37] >>> 11; + b7 = s[37] << 21 | s[36] >>> 11; + b38 = s[47] << 24 | s[46] >>> 8; + b39 = s[46] << 24 | s[47] >>> 8; + b30 = s[8] << 27 | s[9] >>> 5; + b31 = s[9] << 27 | s[8] >>> 5; + b12 = s[18] << 20 | s[19] >>> 12; + b13 = s[19] << 20 | s[18] >>> 12; + b44 = s[29] << 7 | s[28] >>> 25; + b45 = s[28] << 7 | s[29] >>> 25; + b26 = s[38] << 8 | s[39] >>> 24; + b27 = s[39] << 8 | s[38] >>> 24; + b8 = s[48] << 14 | s[49] >>> 18; + b9 = s[49] << 14 | s[48] >>> 18; + + s[0] = b0 ^ ~b2 & b4; + s[1] = b1 ^ ~b3 & b5; + s[10] = b10 ^ ~b12 & b14; + s[11] = b11 ^ ~b13 & b15; + s[20] = b20 ^ ~b22 & b24; + s[21] = b21 ^ ~b23 & b25; + s[30] = b30 ^ ~b32 & b34; + s[31] = b31 ^ ~b33 & b35; + s[40] = b40 ^ ~b42 & b44; + s[41] = b41 ^ ~b43 & b45; + s[2] = b2 ^ ~b4 & b6; + s[3] = b3 ^ ~b5 & b7; + s[12] = b12 ^ ~b14 & b16; + s[13] = b13 ^ ~b15 & b17; + s[22] = b22 ^ ~b24 & b26; + s[23] = b23 ^ ~b25 & b27; + s[32] = b32 ^ ~b34 & b36; + s[33] = b33 ^ ~b35 & b37; + s[42] = b42 ^ ~b44 & b46; + s[43] = b43 ^ ~b45 & b47; + s[4] = b4 ^ ~b6 & b8; + s[5] = b5 ^ ~b7 & b9; + s[14] = b14 ^ ~b16 & b18; + s[15] = b15 ^ ~b17 & b19; + s[24] = b24 ^ ~b26 & b28; + s[25] = b25 ^ ~b27 & b29; + s[34] = b34 ^ ~b36 & b38; + s[35] = b35 ^ ~b37 & b39; + s[44] = b44 ^ ~b46 & b48; + s[45] = b45 ^ ~b47 & b49; + s[6] = b6 ^ ~b8 & b0; + s[7] = b7 ^ ~b9 & b1; + s[16] = b16 ^ ~b18 & b10; + s[17] = b17 ^ ~b19 & b11; + s[26] = b26 ^ ~b28 & b20; + s[27] = b27 ^ ~b29 & b21; + s[36] = b36 ^ ~b38 & b30; + s[37] = b37 ^ ~b39 & b31; + s[46] = b46 ^ ~b48 & b40; + s[47] = b47 ^ ~b49 & b41; + s[8] = b8 ^ ~b0 & b2; + s[9] = b9 ^ ~b1 & b3; + s[18] = b18 ^ ~b10 & b12; + s[19] = b19 ^ ~b11 & b13; + s[28] = b28 ^ ~b20 & b22; + s[29] = b29 ^ ~b21 & b23; + s[38] = b38 ^ ~b30 & b32; + s[39] = b39 ^ ~b31 & b33; + s[48] = b48 ^ ~b40 & b42; + s[49] = b49 ^ ~b41 & b43; + + s[0] ^= RC[n]; + s[1] ^= RC[n + 1]; + } +}; + +var keccak = function keccak(bits) { + return function (str) { + var msg; + if (str.slice(0, 2) === "0x") { + msg = []; + for (var i = 2, l = str.length; i < l; i += 2) { + msg.push(parseInt(str.slice(i, i + 2), 16)); + } + } else { + msg = str; + } + return update(Keccak(bits, bits), msg); + }; +}; + +module.exports = { + keccak256: keccak(256), + keccak512: keccak(512), + keccak256s: keccak(256), + keccak512s: keccak(512) +}; +},{}],135:[function(require,module,exports){ +const extend = require('xtend') +const createRandomId = require('json-rpc-random-id')() + +module.exports = EthQuery + + +function EthQuery(provider){ + const self = this + self.currentProvider = provider +} + +// +// base queries +// + +// default block +EthQuery.prototype.getBalance = generateFnWithDefaultBlockFor(2, 'eth_getBalance') +EthQuery.prototype.getCode = generateFnWithDefaultBlockFor(2, 'eth_getCode') +EthQuery.prototype.getTransactionCount = generateFnWithDefaultBlockFor(2, 'eth_getTransactionCount') +EthQuery.prototype.getStorageAt = generateFnWithDefaultBlockFor(3, 'eth_getStorageAt') +EthQuery.prototype.call = generateFnWithDefaultBlockFor(2, 'eth_call') +// standard +EthQuery.prototype.protocolVersion = generateFnFor('eth_protocolVersion') +EthQuery.prototype.syncing = generateFnFor('eth_syncing') +EthQuery.prototype.coinbase = generateFnFor('eth_coinbase') +EthQuery.prototype.mining = generateFnFor('eth_mining') +EthQuery.prototype.hashrate = generateFnFor('eth_hashrate') +EthQuery.prototype.gasPrice = generateFnFor('eth_gasPrice') +EthQuery.prototype.accounts = generateFnFor('eth_accounts') +EthQuery.prototype.blockNumber = generateFnFor('eth_blockNumber') +EthQuery.prototype.getBlockTransactionCountByHash = generateFnFor('eth_getBlockTransactionCountByHash') +EthQuery.prototype.getBlockTransactionCountByNumber = generateFnFor('eth_getBlockTransactionCountByNumber') +EthQuery.prototype.getUncleCountByBlockHash = generateFnFor('eth_getUncleCountByBlockHash') +EthQuery.prototype.getUncleCountByBlockNumber = generateFnFor('eth_getUncleCountByBlockNumber') +EthQuery.prototype.sign = generateFnFor('eth_sign') +EthQuery.prototype.sendTransaction = generateFnFor('eth_sendTransaction') +EthQuery.prototype.sendRawTransaction = generateFnFor('eth_sendRawTransaction') +EthQuery.prototype.estimateGas = generateFnFor('eth_estimateGas') +EthQuery.prototype.getBlockByHash = generateFnFor('eth_getBlockByHash') +EthQuery.prototype.getBlockByNumber = generateFnFor('eth_getBlockByNumber') +EthQuery.prototype.getTransactionByHash = generateFnFor('eth_getTransactionByHash') +EthQuery.prototype.getTransactionByBlockHashAndIndex = generateFnFor('eth_getTransactionByBlockHashAndIndex') +EthQuery.prototype.getTransactionByBlockNumberAndIndex = generateFnFor('eth_getTransactionByBlockNumberAndIndex') +EthQuery.prototype.getTransactionReceipt = generateFnFor('eth_getTransactionReceipt') +EthQuery.prototype.getUncleByBlockHashAndIndex = generateFnFor('eth_getUncleByBlockHashAndIndex') +EthQuery.prototype.getUncleByBlockNumberAndIndex = generateFnFor('eth_getUncleByBlockNumberAndIndex') +EthQuery.prototype.getCompilers = generateFnFor('eth_getCompilers') +EthQuery.prototype.compileLLL = generateFnFor('eth_compileLLL') +EthQuery.prototype.compileSolidity = generateFnFor('eth_compileSolidity') +EthQuery.prototype.compileSerpent = generateFnFor('eth_compileSerpent') +EthQuery.prototype.newFilter = generateFnFor('eth_newFilter') +EthQuery.prototype.newBlockFilter = generateFnFor('eth_newBlockFilter') +EthQuery.prototype.newPendingTransactionFilter = generateFnFor('eth_newPendingTransactionFilter') +EthQuery.prototype.uninstallFilter = generateFnFor('eth_uninstallFilter') +EthQuery.prototype.getFilterChanges = generateFnFor('eth_getFilterChanges') +EthQuery.prototype.getFilterLogs = generateFnFor('eth_getFilterLogs') +EthQuery.prototype.getLogs = generateFnFor('eth_getLogs') +EthQuery.prototype.getWork = generateFnFor('eth_getWork') +EthQuery.prototype.submitWork = generateFnFor('eth_submitWork') +EthQuery.prototype.submitHashrate = generateFnFor('eth_submitHashrate') + +// network level + +EthQuery.prototype.sendAsync = function(opts, cb){ + const self = this + self.currentProvider.sendAsync(createPayload(opts), function(err, response){ + if (!err && response.error) err = new Error('EthQuery - RPC Error - '+response.error.message) + if (err) return cb(err) + cb(null, response.result) + }) +} + +// util + +function generateFnFor(methodName){ + return function(){ + const self = this + var args = [].slice.call(arguments) + var cb = args.pop() + self.sendAsync({ + method: methodName, + params: args, + }, cb) + } +} + +function generateFnWithDefaultBlockFor(argCount, methodName){ + return function(){ + const self = this + var args = [].slice.call(arguments) + var cb = args.pop() + // set optional default block param + if (args.length < argCount) args.push('latest') + self.sendAsync({ + method: methodName, + params: args, + }, cb) + } +} + +function createPayload(data){ + return extend({ + // defaults + id: createRandomId(), + jsonrpc: '2.0', + params: [], + // user-specified + }, data) +} + +},{"json-rpc-random-id":191,"xtend":423}],136:[function(require,module,exports){ +const ethUtil = require('ethereumjs-util') +const ethAbi = require('ethereumjs-abi') + +module.exports = { + + concatSig: function (v, r, s) { + const rSig = ethUtil.fromSigned(r) + const sSig = ethUtil.fromSigned(s) + const vSig = ethUtil.bufferToInt(v) + const rStr = padWithZeroes(ethUtil.toUnsigned(rSig).toString('hex'), 64) + const sStr = padWithZeroes(ethUtil.toUnsigned(sSig).toString('hex'), 64) + const vStr = ethUtil.stripHexPrefix(ethUtil.intToHex(vSig)) + return ethUtil.addHexPrefix(rStr.concat(sStr, vStr)).toString('hex') + }, + + normalize: function (input) { + if (!input) return + + if (typeof input === 'number') { + const buffer = ethUtil.toBuffer(input) + input = ethUtil.bufferToHex(buffer) + } + + if (typeof input !== 'string') { + var msg = 'eth-sig-util.normalize() requires hex string or integer input.' + msg += ' received ' + (typeof input) + ': ' + input + throw new Error(msg) + } + + return ethUtil.addHexPrefix(input.toLowerCase()) + }, + + personalSign: function (privateKey, msgParams) { + var message = ethUtil.toBuffer(msgParams.data) + var msgHash = ethUtil.hashPersonalMessage(message) + var sig = ethUtil.ecsign(msgHash, privateKey) + var serialized = ethUtil.bufferToHex(this.concatSig(sig.v, sig.r, sig.s)) + return serialized + }, + + recoverPersonalSignature: function (msgParams) { + const publicKey = getPublicKeyFor(msgParams) + const sender = ethUtil.publicToAddress(publicKey) + const senderHex = ethUtil.bufferToHex(sender) + return senderHex + }, + + extractPublicKey: function (msgParams) { + const publicKey = getPublicKeyFor(msgParams) + return '0x' + publicKey.toString('hex') + }, + + typedSignatureHash: function (typedData) { + const hashBuffer = typedSignatureHash(typedData) + return ethUtil.bufferToHex(hashBuffer) + }, + + signTypedData: function (privateKey, msgParams) { + const msgHash = typedSignatureHash(msgParams.data) + const sig = ethUtil.ecsign(msgHash, privateKey) + return ethUtil.bufferToHex(this.concatSig(sig.v, sig.r, sig.s)) + }, + + recoverTypedSignature: function (msgParams) { + const msgHash = typedSignatureHash(msgParams.data) + const publicKey = recoverPublicKey(msgHash, msgParams.sig) + const sender = ethUtil.publicToAddress(publicKey) + return ethUtil.bufferToHex(sender) + } + +} + +/** + * @param typedData - Array of data along with types, as per EIP712. + * @returns Buffer + */ +function typedSignatureHash(typedData) { + const error = new Error('Expect argument to be non-empty array') + if (typeof typedData !== 'object' || !typedData.length) throw error + + const data = typedData.map(function (e) { + return e.type === 'bytes' ? ethUtil.toBuffer(e.value) : e.value + }) + const types = typedData.map(function (e) { return e.type }) + const schema = typedData.map(function (e) { + if (!e.name) throw error + return e.type + ' ' + e.name + }) + + return ethAbi.soliditySHA3( + ['bytes32', 'bytes32'], + [ + ethAbi.soliditySHA3(new Array(typedData.length).fill('string'), schema), + ethAbi.soliditySHA3(types, data) + ] + ) +} + +function recoverPublicKey(hash, sig) { + const signature = ethUtil.toBuffer(sig) + const sigParams = ethUtil.fromRpcSig(signature) + return ethUtil.ecrecover(hash, sigParams.v, sigParams.r, sigParams.s) +} + +function getPublicKeyFor (msgParams) { + const message = ethUtil.toBuffer(msgParams.data) + const msgHash = ethUtil.hashPersonalMessage(message) + return recoverPublicKey(msgHash, msgParams.sig) +} + + +function padWithZeroes (number, length) { + var myString = '' + number + while (myString.length < length) { + myString = '0' + myString + } + return myString +} + +},{"ethereumjs-abi":138,"ethereumjs-util":141}],137:[function(require,module,exports){ +module.exports={ + "genesisGasLimit": { + "v": 5000, + "d": "Gas limit of the Genesis block." + }, + "genesisDifficulty": { + "v": 17179869184, + "d": "Difficulty of the Genesis block." + }, + "genesisNonce": { + "v": "0x0000000000000042", + "d": "the geneis nonce" + }, + "genesisExtraData": { + "v": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa", + "d": "extra data " + }, + "genesisHash": { + "v": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3", + "d": "genesis hash" + }, + "genesisStateRoot": { + "v": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544", + "d": "the genesis state root" + }, + "minGasLimit": { + "v": 5000, + "d": "Minimum the gas limit may ever be." + }, + "gasLimitBoundDivisor": { + "v": 1024, + "d": "The bound divisor of the gas limit, used in update calculations." + }, + "minimumDifficulty": { + "v": 131072, + "d": "The minimum that the difficulty may ever be." + }, + "difficultyBoundDivisor": { + "v": 2048, + "d": "The bound divisor of the difficulty, used in the update calculations." + }, + "durationLimit": { + "v": 13, + "d": "The decision boundary on the blocktime duration used to determine whether difficulty should go up or not." + }, + "maximumExtraDataSize": { + "v": 32, + "d": "Maximum size extra data may be after Genesis." + }, + "epochDuration": { + "v": 30000, + "d": "Duration between proof-of-work epochs." + }, + "stackLimit": { + "v": 1024, + "d": "Maximum size of VM stack allowed." + }, + "callCreateDepth": { + "v": 1024, + "d": "Maximum depth of call/create stack." + }, + + "tierStepGas": { + "v": [0, 2, 3, 5, 8, 10, 20], + "d": "Once per operation, for a selection of them." + }, + "expGas": { + "v": 10, + "d": "Once per EXP instuction." + }, + "expByteGas": { + "v": 10, + "d": "Times ceil(log256(exponent)) for the EXP instruction." + }, + + "sha3Gas": { + "v": 30, + "d": "Once per SHA3 operation." + }, + "sha3WordGas": { + "v": 6, + "d": "Once per word of the SHA3 operation's data." + }, + "sloadGas": { + "v": 50, + "d": "Once per SLOAD operation." + }, + "sstoreSetGas": { + "v": 20000, + "d": "Once per SSTORE operation if the zeroness changes from zero." + }, + "sstoreResetGas": { + "v": 5000, + "d": "Once per SSTORE operation if the zeroness does not change from zero." + }, + "sstoreRefundGas": { + "v": 15000, + "d": "Once per SSTORE operation if the zeroness changes to zero." + }, + "jumpdestGas": { + "v": 1, + "d": "Refunded gas, once per SSTORE operation if the zeroness changes to zero." + }, + + "logGas": { + "v": 375, + "d": "Per LOG* operation." + }, + "logDataGas": { + "v": 8, + "d": "Per byte in a LOG* operation's data." + }, + "logTopicGas": { + "v": 375, + "d": "Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas." + }, + + "createGas": { + "v": 32000, + "d": "Once per CREATE operation & contract-creation transaction." + }, + + "callGas": { + "v": 40, + "d": "Once per CALL operation & message call transaction." + }, + "callStipend": { + "v": 2300, + "d": "Free gas given at beginning of call." + }, + "callValueTransferGas": { + "v": 9000, + "d": "Paid for CALL when the value transfor is non-zero." + }, + "callNewAccountGas": { + "v": 25000, + "d": "Paid for CALL when the destination address didn't exist prior." + }, + + "suicideRefundGas": { + "v": 24000, + "d": "Refunded following a suicide operation." + }, + + "memoryGas": { + "v": 3, + "d": "Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL." + }, + "quadCoeffDiv": { + "v": 512, + "d": "Divisor for the quadratic particle of the memory cost equation." + }, + + "createDataGas": { + "v": 200, + "d": "" + }, + "txGas": { + "v": 21000, + "d": "Per transaction. NOTE: Not payable on data of calls between transactions." + }, + "txCreation": { + "v": 32000, + "d": "the cost of creating a contract via tx" + }, + "txDataZeroGas": { + "v": 4, + "d": "Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions." + }, + "txDataNonZeroGas": { + "v": 68, + "d": "Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions." + }, + + "copyGas": { + "v": 3, + "d": "Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added." + }, + + "ecrecoverGas": { + "v": 3000, + "d": "" + }, + "sha256Gas": { + "v": 60, + "d": "" + }, + "sha256WordGas": { + "v": 12, + "d": "" + }, + "ripemd160Gas": { + "v": 600, + "d": "" + }, + "ripemd160WordGas": { + "v": 120, + "d": "" + }, + "identityGas": { + "v": 15, + "d": "" + }, + "identityWordGas": { + "v": 3, + "d": "" + }, + "minerReward": { + "v": "5000000000000000000", + "d": "the amount a miner get rewarded for mining a block" + }, + "ommerReward": { + "v": "625000000000000000", + "d": "The amount of wei a miner of an uncle block gets for being inculded in the blockchain" + }, + "niblingReward": { + "v": "156250000000000000", + "d": "the amount a miner gets for inculding a uncle" + }, + "homeSteadForkNumber": { + "v": 1150000, + "d": "the block that the Homestead fork started at" + }, + "homesteadRepriceForkNumber": { + "v": 2463000, + "d": "the block that the Homestead Reprice (EIP150) fork started at" + }, + "timebombPeriod": { + "v": 100000, + "d": "Exponential difficulty timebomb period" + }, + "freeBlockPeriod": { + "v": 2 + } +} + +},{}],138:[function(require,module,exports){ +module.exports = require('./lib/index.js') + +},{"./lib/index.js":139}],139:[function(require,module,exports){ +(function (Buffer){ +const utils = require('ethereumjs-util') +const BN = require('bn.js') + +var ABI = function () { +} + +// Convert from short to canonical names +// FIXME: optimise or make this nicer? +function elementaryName (name) { + if (name.startsWith('int[')) { + return 'int256' + name.slice(3) + } else if (name === 'int') { + return 'int256' + } else if (name.startsWith('uint[')) { + return 'uint256' + name.slice(4) + } else if (name === 'uint') { + return 'uint256' + } else if (name.startsWith('fixed[')) { + return 'fixed128x128' + name.slice(5) + } else if (name === 'fixed') { + return 'fixed128x128' + } else if (name.startsWith('ufixed[')) { + return 'ufixed128x128' + name.slice(6) + } else if (name === 'ufixed') { + return 'ufixed128x128' + } + return name +} + +ABI.eventID = function (name, types) { + // FIXME: use node.js util.format? + var sig = name + '(' + types.map(elementaryName).join(',') + ')' + return utils.sha3(new Buffer(sig)) +} + +ABI.methodID = function (name, types) { + return ABI.eventID(name, types).slice(0, 4) +} + +// Parse N from type +function parseTypeN (type) { + return parseInt(/^\D+(\d+)$/.exec(type)[1], 10) +} + +// Parse N,M from typex +function parseTypeNxM (type) { + var tmp = /^\D+(\d+)x(\d+)$/.exec(type) + return [ parseInt(tmp[1], 10), parseInt(tmp[2], 10) ] +} + +// Parse N in type[] where "type" can itself be an array type. +function parseTypeArray (type) { + var tmp = type.match(/(.*)\[(.*?)\]$/) + if (tmp) { + return tmp[2] === '' ? 'dynamic' : parseInt(tmp[2], 10) + } + return null +} + +function parseNumber (arg) { + var type = typeof arg + if (type === 'string') { + if (utils.isHexPrefixed(arg)) { + return new BN(utils.stripHexPrefix(arg), 16) + } else { + return new BN(arg, 10) + } + } else if (type === 'number') { + return new BN(arg) + } else if (arg.toArray) { + // assume this is a BN for the moment, replace with BN.isBN soon + return arg + } else { + throw new Error('Argument is not a number') + } +} + +// someMethod(bytes,uint) +// someMethod(bytes,uint):(boolean) +function parseSignature (sig) { + var tmp = /^(\w+)\((.+)\)$/.exec(sig) + if (tmp.length !== 3) { + throw new Error('Invalid method signature') + } + + var args = /^(.+)\):\((.+)$/.exec(tmp[2]) + + if (args !== null && args.length === 3) { + return { + method: tmp[1], + args: args[1].split(','), + retargs: args[2].split(',') + } + } else { + return { + method: tmp[1], + args: tmp[2].split(',') + } + } +} + +// Encodes a single item (can be dynamic array) +// @returns: Buffer +function encodeSingle (type, arg) { + var size, num, ret, i + + if (type === 'address') { + return encodeSingle('uint160', parseNumber(arg)) + } else if (type === 'bool') { + return encodeSingle('uint8', arg ? 1 : 0) + } else if (type === 'string') { + return encodeSingle('bytes', new Buffer(arg, 'utf8')) + } else if (isArray(type)) { + // this part handles fixed-length ([2]) and variable length ([]) arrays + // NOTE: we catch here all calls to arrays, that simplifies the rest + if (typeof arg.length === 'undefined') { + throw new Error('Not an array?') + } + size = parseTypeArray(type) + if (size !== 'dynamic' && size !== 0 && arg.length > size) { + throw new Error('Elements exceed array size: ' + size) + } + ret = [] + type = type.slice(0, type.lastIndexOf('[')) + if (typeof arg === 'string') { + arg = JSON.parse(arg) + } + for (i in arg) { + ret.push(encodeSingle(type, arg[i])) + } + if (size === 'dynamic') { + var length = encodeSingle('uint256', arg.length) + ret.unshift(length) + } + return Buffer.concat(ret) + } else if (type === 'bytes') { + arg = new Buffer(arg) + + ret = Buffer.concat([ encodeSingle('uint256', arg.length), arg ]) + + if ((arg.length % 32) !== 0) { + ret = Buffer.concat([ ret, utils.zeros(32 - (arg.length % 32)) ]) + } + + return ret + } else if (type.startsWith('bytes')) { + size = parseTypeN(type) + if (size < 1 || size > 32) { + throw new Error('Invalid bytes width: ' + size) + } + + return utils.setLengthRight(arg, 32) + } else if (type.startsWith('uint')) { + size = parseTypeN(type) + if ((size % 8) || (size < 8) || (size > 256)) { + throw new Error('Invalid uint width: ' + size) + } + + num = parseNumber(arg) + if (num.bitLength() > size) { + throw new Error('Supplied uint exceeds width: ' + size + ' vs ' + num.bitLength()) + } + + if (num < 0) { + throw new Error('Supplied uint is negative') + } + + return num.toArrayLike(Buffer, 'be', 32) + } else if (type.startsWith('int')) { + size = parseTypeN(type) + if ((size % 8) || (size < 8) || (size > 256)) { + throw new Error('Invalid int width: ' + size) + } + + num = parseNumber(arg) + if (num.bitLength() > size) { + throw new Error('Supplied int exceeds width: ' + size + ' vs ' + num.bitLength()) + } + + return num.toTwos(256).toArrayLike(Buffer, 'be', 32) + } else if (type.startsWith('ufixed')) { + size = parseTypeNxM(type) + + num = parseNumber(arg) + + if (num < 0) { + throw new Error('Supplied ufixed is negative') + } + + return encodeSingle('uint256', num.mul(new BN(2).pow(new BN(size[1])))) + } else if (type.startsWith('fixed')) { + size = parseTypeNxM(type) + + return encodeSingle('int256', parseNumber(arg).mul(new BN(2).pow(new BN(size[1])))) + } + + throw new Error('Unsupported or invalid type: ' + type) +} + +// Decodes a single item (can be dynamic array) +// @returns: array +// FIXME: this method will need a lot of attention at checking limits and validation +function decodeSingle (parsedType, data, offset) { + if (typeof parsedType === 'string') { + parsedType = parseType(parsedType) + } + var size, num, ret, i + + if (parsedType.name === 'address') { + return decodeSingle(parsedType.rawType, data, offset).toArrayLike(Buffer, 'be', 20).toString('hex') + } else if (parsedType.name === 'bool') { + return decodeSingle(parsedType.rawType, data, offset).toString() === new BN(1).toString() + } else if (parsedType.name === 'string') { + var bytes = decodeSingle(parsedType.rawType, data, offset) + return new Buffer(bytes, 'utf8').toString() + } else if (parsedType.isArray) { + // this part handles fixed-length arrays ([2]) and variable length ([]) arrays + // NOTE: we catch here all calls to arrays, that simplifies the rest + ret = [] + size = parsedType.size + + if (parsedType.size === 'dynamic') { + offset = decodeSingle('uint256', data, offset).toNumber() + size = decodeSingle('uint256', data, offset).toNumber() + offset = offset + 32 + } + for (i = 0; i < size; i++) { + var decoded = decodeSingle(parsedType.subArray, data, offset) + ret.push(decoded) + offset += parsedType.subArray.memoryUsage + } + return ret + } else if (parsedType.name === 'bytes') { + offset = decodeSingle('uint256', data, offset).toNumber() + size = decodeSingle('uint256', data, offset).toNumber() + return data.slice(offset + 32, offset + 32 + size) + } else if (parsedType.name.startsWith('bytes')) { + return data.slice(offset, offset + parsedType.size) + } else if (parsedType.name.startsWith('uint')) { + num = new BN(data.slice(offset, offset + 32), 16, 'be') + if (num.bitLength() > parsedType.size) { + throw new Error('Decoded int exceeds width: ' + parsedType.size + ' vs ' + num.bitLength()) + } + return num + } else if (parsedType.name.startsWith('int')) { + num = new BN(data.slice(offset, offset + 32), 16, 'be').fromTwos(256) + if (num.bitLength() > parsedType.size) { + throw new Error('Decoded uint exceeds width: ' + parsedType.size + ' vs ' + num.bitLength()) + } + + return num + } else if (parsedType.name.startsWith('ufixed')) { + size = new BN(2).pow(new BN(parsedType.size[1])) + num = decodeSingle('uint256', data, offset) + if (!num.mod(size).isZero()) { + throw new Error('Decimals not supported yet') + } + return num.div(size) + } else if (parsedType.name.startsWith('fixed')) { + size = new BN(2).pow(new BN(parsedType.size[1])) + num = decodeSingle('int256', data, offset) + if (!num.mod(size).isZero()) { + throw new Error('Decimals not supported yet') + } + return num.div(size) + } + throw new Error('Unsupported or invalid type: ' + parsedType.name) +} + +// Parse the given type +// @returns: {} containing the type itself, memory usage and (including size and subArray if applicable) +function parseType (type) { + var size + var ret + if (isArray(type)) { + size = parseTypeArray(type) + var subArray = type.slice(0, type.lastIndexOf('[')) + subArray = parseType(subArray) + ret = { + isArray: true, + name: type, + size: size, + memoryUsage: size === 'dynamic' ? 32 : subArray.memoryUsage * size, + subArray: subArray + } + return ret + } else { + var rawType + switch (type) { + case 'address': + rawType = 'uint160' + break + case 'bool': + rawType = 'uint8' + break + case 'string': + rawType = 'bytes' + break + } + ret = { + rawType: rawType, + name: type, + memoryUsage: 32 + } + + if (type.startsWith('bytes') && type !== 'bytes' || type.startsWith('uint') || type.startsWith('int')) { + ret.size = parseTypeN(type) + } else if (type.startsWith('ufixed') || type.startsWith('fixed')) { + ret.size = parseTypeNxM(type) + } + + if (type.startsWith('bytes') && type !== 'bytes' && (ret.size < 1 || ret.size > 32)) { + throw new Error('Invalid bytes width: ' + ret.size) + } + if ((type.startsWith('uint') || type.startsWith('int')) && (ret.size % 8 || ret.size < 8 || ret.size > 256)) { + throw new Error('Invalid int/uint width: ' + ret.size) + } + return ret + } +} + +// Is a type dynamic? +function isDynamic (type) { + // FIXME: handle all types? I don't think anything is missing now + return (type === 'string') || (type === 'bytes') || (parseTypeArray(type) === 'dynamic') +} + +// Is a type an array? +function isArray (type) { + return type.lastIndexOf(']') === type.length - 1 +} + +// Encode a method/event with arguments +// @types an array of string type names +// @args an array of the appropriate values +ABI.rawEncode = function (types, values) { + var output = [] + var data = [] + + var headLength = 0 + + types.forEach(function (type) { + if (isArray(type)) { + var size = parseTypeArray(type) + + if (size !== 'dynamic') { + headLength += 32 * size + } else { + headLength += 32 + } + } else { + headLength += 32 + } + }) + + for (var i = 0; i < types.length; i++) { + var type = elementaryName(types[i]) + var value = values[i] + var cur = encodeSingle(type, value) + + // Use the head/tail method for storing dynamic data + if (isDynamic(type)) { + output.push(encodeSingle('uint256', headLength)) + data.push(cur) + headLength += cur.length + } else { + output.push(cur) + } + } + + return Buffer.concat(output.concat(data)) +} + +ABI.rawDecode = function (types, data) { + var ret = [] + data = new Buffer(data) + var offset = 0 + for (var i = 0; i < types.length; i++) { + var type = elementaryName(types[i]) + var parsed = parseType(type, data, offset) + var decoded = decodeSingle(parsed, data, offset) + offset += parsed.memoryUsage + ret.push(decoded) + } + return ret +} + +ABI.simpleEncode = function (method) { + var args = Array.prototype.slice.call(arguments).slice(1) + var sig = parseSignature(method) + + // FIXME: validate/convert arguments + if (args.length !== sig.args.length) { + throw new Error('Argument count mismatch') + } + + return Buffer.concat([ ABI.methodID(sig.method, sig.args), ABI.rawEncode(sig.args, args) ]) +} + +ABI.simpleDecode = function (method, data) { + var sig = parseSignature(method) + + // FIXME: validate/convert arguments + if (!sig.retargs) { + throw new Error('No return values in method') + } + + return ABI.rawDecode(sig.retargs, data) +} + +function stringify (type, value) { + if (type.startsWith('address') || type.startsWith('bytes')) { + return '0x' + value.toString('hex') + } else { + return value.toString() + } +} + +ABI.stringify = function (types, values) { + var ret = [] + + for (var i in types) { + var type = types[i] + var value = values[i] + + // if it is an array type, concat the items + if (/^[^\[]+\[.*\]$/.test(type)) { + value = value.map(function (item) { + return stringify(type, item) + }).join(', ') + } else { + value = stringify(type, value) + } + + ret.push(value) + } + + return ret +} + +ABI.solidityPack = function (types, values) { + if (types.length !== values.length) { + throw new Error('Number of types are not matching the values') + } + + var size, num + var ret = [] + + for (var i = 0; i < types.length; i++) { + var type = elementaryName(types[i]) + var value = values[i] + + if (type === 'bytes') { + ret.push(value) + } else if (type === 'string') { + ret.push(new Buffer(value, 'utf8')) + } else if (type === 'bool') { + ret.push(new Buffer(value ? '01' : '00', 'hex')) + } else if (type === 'address') { + ret.push(utils.setLengthLeft(value, 20)) + } else if (type.startsWith('bytes')) { + size = parseTypeN(type) + if (size < 1 || size > 32) { + throw new Error('Invalid bytes width: ' + size) + } + + ret.push(utils.setLengthRight(value, size)) + } else if (type.startsWith('uint')) { + size = parseTypeN(type) + if ((size % 8) || (size < 8) || (size > 256)) { + throw new Error('Invalid uint width: ' + size) + } + + num = parseNumber(value) + if (num.bitLength() > size) { + throw new Error('Supplied uint exceeds width: ' + size + ' vs ' + num.bitLength()) + } + + ret.push(num.toArrayLike(Buffer, 'be', size / 8)) + } else if (type.startsWith('int')) { + size = parseTypeN(type) + if ((size % 8) || (size < 8) || (size > 256)) { + throw new Error('Invalid int width: ' + size) + } + + num = parseNumber(value) + if (num.bitLength() > size) { + throw new Error('Supplied int exceeds width: ' + size + ' vs ' + num.bitLength()) + } + + ret.push(num.toTwos(size).toArrayLike(Buffer, 'be', size / 8)) + } else { + // FIXME: support all other types + throw new Error('Unsupported or invalid type: ' + type) + } + } + + return Buffer.concat(ret) +} + +ABI.soliditySHA3 = function (types, values) { + return utils.sha3(ABI.solidityPack(types, values)) +} + +ABI.soliditySHA256 = function (types, values) { + return utils.sha256(ABI.solidityPack(types, values)) +} + +ABI.solidityRIPEMD160 = function (types, values) { + return utils.ripemd160(ABI.solidityPack(types, values), true) +} + +// Serpent's users are familiar with this encoding +// - s: string +// - b: bytes +// - b: bytes +// - i: int256 +// - a: int256[] + +function isNumeric (c) { + // FIXME: is this correct? Seems to work + return (c >= '0') && (c <= '9') +} + +// For a "documentation" refer to https://github.com/ethereum/serpent/blob/develop/preprocess.cpp +ABI.fromSerpent = function (sig) { + var ret = [] + for (var i = 0; i < sig.length; i++) { + var type = sig[i] + if (type === 's') { + ret.push('bytes') + } else if (type === 'b') { + var tmp = 'bytes' + var j = i + 1 + while ((j < sig.length) && isNumeric(sig[j])) { + tmp += sig[j] - '0' + j++ + } + i = j - 1 + ret.push(tmp) + } else if (type === 'i') { + ret.push('int256') + } else if (type === 'a') { + ret.push('int256[]') + } else { + throw new Error('Unsupported or invalid type: ' + type) + } + } + return ret +} + +ABI.toSerpent = function (types) { + var ret = [] + for (var i = 0; i < types.length; i++) { + var type = types[i] + if (type === 'bytes') { + ret.push('s') + } else if (type.startsWith('bytes')) { + ret.push('b' + parseTypeN(type)) + } else if (type === 'int256') { + ret.push('i') + } else if (type === 'int256[]') { + ret.push('a') + } else { + throw new Error('Unsupported or invalid type: ' + type) + } + } + return ret.join('') +} + +module.exports = ABI + +}).call(this,require("buffer").Buffer) +},{"bn.js":53,"buffer":84,"ethereumjs-util":141}],140:[function(require,module,exports){ +(function (Buffer){ +'use strict'; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var ethUtil = require('ethereumjs-util'); +var fees = require('ethereum-common/params.json'); +var BN = ethUtil.BN; + +// secp256k1n/2 +var N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16); + +/** + * Creates a new transaction object. + * + * @example + * var rawTx = { + * nonce: '00', + * gasPrice: '09184e72a000', + * gasLimit: '2710', + * to: '0000000000000000000000000000000000000000', + * value: '00', + * data: '7f7465737432000000000000000000000000000000000000000000000000000000600057', + * v: '1c', + * r: '5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab', + * s: '5bd428537f05f9830e93792f90ea6a3e2d1ee84952dd96edbae9f658f831ab13' + * }; + * var tx = new Transaction(rawTx); + * + * @class + * @param {Buffer | Array | Object} data a transaction can be initiailized with either a buffer containing the RLP serialized transaction or an array of buffers relating to each of the tx Properties, listed in order below in the exmple. + * + * Or lastly an Object containing the Properties of the transaction like in the Usage example. + * + * For Object and Arrays each of the elements can either be a Buffer, a hex-prefixed (0x) String , Number, or an object with a toBuffer method such as Bignum + * + * @property {Buffer} raw The raw rlp encoded transaction + * @param {Buffer} data.nonce nonce number + * @param {Buffer} data.gasLimit transaction gas limit + * @param {Buffer} data.gasPrice transaction gas price + * @param {Buffer} data.to to the to address + * @param {Buffer} data.value the amount of ether sent + * @param {Buffer} data.data this will contain the data of the message or the init of a contract + * @param {Buffer} data.v EC signature parameter + * @param {Buffer} data.r EC signature parameter + * @param {Buffer} data.s EC recovery ID + * @param {Number} data.chainId EIP 155 chainId - mainnet: 1, ropsten: 3 + * */ + +var Transaction = function () { + function Transaction(data) { + _classCallCheck(this, Transaction); + + data = data || {}; + // Define Properties + var fields = [{ + name: 'nonce', + length: 32, + allowLess: true, + default: new Buffer([]) + }, { + name: 'gasPrice', + length: 32, + allowLess: true, + default: new Buffer([]) + }, { + name: 'gasLimit', + alias: 'gas', + length: 32, + allowLess: true, + default: new Buffer([]) + }, { + name: 'to', + allowZero: true, + length: 20, + default: new Buffer([]) + }, { + name: 'value', + length: 32, + allowLess: true, + default: new Buffer([]) + }, { + name: 'data', + alias: 'input', + allowZero: true, + default: new Buffer([]) + }, { + name: 'v', + allowZero: true, + default: new Buffer([0x1c]) + }, { + name: 'r', + length: 32, + allowZero: true, + allowLess: true, + default: new Buffer([]) + }, { + name: 's', + length: 32, + allowZero: true, + allowLess: true, + default: new Buffer([]) + }]; + + /** + * Returns the rlp encoding of the transaction + * @method serialize + * @return {Buffer} + * @memberof Transaction + * @name serialize + */ + // attached serialize + ethUtil.defineProperties(this, fields, data); + + /** + * @property {Buffer} from (read only) sender address of this transaction, mathematically derived from other parameters. + * @name from + * @memberof Transaction + */ + Object.defineProperty(this, 'from', { + enumerable: true, + configurable: true, + get: this.getSenderAddress.bind(this) + }); + + // calculate chainId from signature + var sigV = ethUtil.bufferToInt(this.v); + var chainId = Math.floor((sigV - 35) / 2); + if (chainId < 0) chainId = 0; + + // set chainId + this._chainId = chainId || data.chainId || 0; + this._homestead = true; + } + + /** + * If the tx's `to` is to the creation address + * @return {Boolean} + */ + + + Transaction.prototype.toCreationAddress = function toCreationAddress() { + return this.to.toString('hex') === ''; + }; + + /** + * Computes a sha3-256 hash of the serialized tx + * @param {Boolean} [includeSignature=true] whether or not to inculde the signature + * @return {Buffer} + */ + + + Transaction.prototype.hash = function hash(includeSignature) { + if (includeSignature === undefined) includeSignature = true; + + // EIP155 spec: + // when computing the hash of a transaction for purposes of signing or recovering, + // instead of hashing only the first six elements (ie. nonce, gasprice, startgas, to, value, data), + // hash nine elements, with v replaced by CHAIN_ID, r = 0 and s = 0 + + var items = void 0; + if (includeSignature) { + items = this.raw; + } else { + if (this._chainId > 0) { + var raw = this.raw.slice(); + this.v = this._chainId; + this.r = 0; + this.s = 0; + items = this.raw; + this.raw = raw; + } else { + items = this.raw.slice(0, 6); + } + } + + // create hash + return ethUtil.rlphash(items); + }; + + /** + * returns the public key of the sender + * @return {Buffer} + */ + + + Transaction.prototype.getChainId = function getChainId() { + return this._chainId; + }; + + /** + * returns the sender's address + * @return {Buffer} + */ + + + Transaction.prototype.getSenderAddress = function getSenderAddress() { + if (this._from) { + return this._from; + } + var pubkey = this.getSenderPublicKey(); + this._from = ethUtil.publicToAddress(pubkey); + return this._from; + }; + + /** + * returns the public key of the sender + * @return {Buffer} + */ + + + Transaction.prototype.getSenderPublicKey = function getSenderPublicKey() { + if (!this._senderPubKey || !this._senderPubKey.length) { + if (!this.verifySignature()) throw new Error('Invalid Signature'); + } + return this._senderPubKey; + }; + + /** + * Determines if the signature is valid + * @return {Boolean} + */ + + + Transaction.prototype.verifySignature = function verifySignature() { + var msgHash = this.hash(false); + // All transaction signatures whose s-value is greater than secp256k1n/2 are considered invalid. + if (this._homestead && new BN(this.s).cmp(N_DIV_2) === 1) { + return false; + } + + try { + var v = ethUtil.bufferToInt(this.v); + if (this._chainId > 0) { + v -= this._chainId * 2 + 8; + } + this._senderPubKey = ethUtil.ecrecover(msgHash, v, this.r, this.s); + } catch (e) { + return false; + } + + return !!this._senderPubKey; + }; + + /** + * sign a transaction with a given a private key + * @param {Buffer} privateKey + */ + + + Transaction.prototype.sign = function sign(privateKey) { + var msgHash = this.hash(false); + var sig = ethUtil.ecsign(msgHash, privateKey); + if (this._chainId > 0) { + sig.v += this._chainId * 2 + 8; + } + Object.assign(this, sig); + }; + + /** + * The amount of gas paid for the data in this tx + * @return {BN} + */ + + + Transaction.prototype.getDataFee = function getDataFee() { + var data = this.raw[5]; + var cost = new BN(0); + for (var i = 0; i < data.length; i++) { + data[i] === 0 ? cost.iaddn(fees.txDataZeroGas.v) : cost.iaddn(fees.txDataNonZeroGas.v); + } + return cost; + }; + + /** + * the minimum amount of gas the tx must have (DataFee + TxFee + Creation Fee) + * @return {BN} + */ + + + Transaction.prototype.getBaseFee = function getBaseFee() { + var fee = this.getDataFee().iaddn(fees.txGas.v); + if (this._homestead && this.toCreationAddress()) { + fee.iaddn(fees.txCreation.v); + } + return fee; + }; + + /** + * the up front amount that an account must have for this transaction to be valid + * @return {BN} + */ + + + Transaction.prototype.getUpfrontCost = function getUpfrontCost() { + return new BN(this.gasLimit).imul(new BN(this.gasPrice)).iadd(new BN(this.value)); + }; + + /** + * validates the signature and checks to see if it has enough gas + * @param {Boolean} [stringError=false] whether to return a string with a dscription of why the validation failed or return a Bloolean + * @return {Boolean|String} + */ + + + Transaction.prototype.validate = function validate(stringError) { + var errors = []; + if (!this.verifySignature()) { + errors.push('Invalid Signature'); + } + + if (this.getBaseFee().cmp(new BN(this.gasLimit)) > 0) { + errors.push(['gas limit is too low. Need at least ' + this.getBaseFee()]); + } + + if (stringError === undefined || stringError === false) { + return errors.length === 0; + } else { + return errors.join(' '); + } + }; + + return Transaction; +}(); + +module.exports = Transaction; +}).call(this,require("buffer").Buffer) +},{"buffer":84,"ethereum-common/params.json":137,"ethereumjs-util":141}],141:[function(require,module,exports){ +'use strict'; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var createKeccakHash = require('keccak'); +var secp256k1 = require('secp256k1'); +var assert = require('assert'); +var rlp = require('rlp'); +var BN = require('bn.js'); +var createHash = require('create-hash'); +var Buffer = require('safe-buffer').Buffer; +Object.assign(exports, require('ethjs-util')); + +/** + * the max integer that this VM can handle (a ```BN```) + * @var {BN} MAX_INTEGER + */ +exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16); + +/** + * 2^256 (a ```BN```) + * @var {BN} TWO_POW256 + */ +exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16); + +/** + * Keccak-256 hash of null (a ```String```) + * @var {String} KECCAK256_NULL_S + */ +exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'; +exports.SHA3_NULL_S = exports.KECCAK256_NULL_S; + +/** + * Keccak-256 hash of null (a ```Buffer```) + * @var {Buffer} KECCAK256_NULL + */ +exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex'); +exports.SHA3_NULL = exports.KECCAK256_NULL; + +/** + * Keccak-256 of an RLP of an empty array (a ```String```) + * @var {String} KECCAK256_RLP_ARRAY_S + */ +exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347'; +exports.SHA3_RLP_ARRAY_S = exports.KECCAK256_RLP_ARRAY_S; + +/** + * Keccak-256 of an RLP of an empty array (a ```Buffer```) + * @var {Buffer} KECCAK256_RLP_ARRAY + */ +exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex'); +exports.SHA3_RLP_ARRAY = exports.KECCAK256_RLP_ARRAY; + +/** + * Keccak-256 hash of the RLP of null (a ```String```) + * @var {String} KECCAK256_RLP_S + */ +exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421'; +exports.SHA3_RLP_S = exports.KECCAK256_RLP_S; + +/** + * Keccak-256 hash of the RLP of null (a ```Buffer```) + * @var {Buffer} KECCAK256_RLP + */ +exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex'); +exports.SHA3_RLP = exports.KECCAK256_RLP; + +/** + * [`BN`](https://github.com/indutny/bn.js) + * @var {Function} + */ +exports.BN = BN; + +/** + * [`rlp`](https://github.com/ethereumjs/rlp) + * @var {Function} + */ +exports.rlp = rlp; + +/** + * [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node/) + * @var {Object} + */ +exports.secp256k1 = secp256k1; + +/** + * Returns a buffer filled with 0s + * @method zeros + * @param {Number} bytes the number of bytes the buffer should be + * @return {Buffer} + */ +exports.zeros = function (bytes) { + return Buffer.allocUnsafe(bytes).fill(0); +}; + +/** + * Returns a zero address + * @method zeroAddress + * @return {String} + */ +exports.zeroAddress = function () { + var addressLength = 20; + var zeroAddress = exports.zeros(addressLength); + return exports.bufferToHex(zeroAddress); +}; + +/** + * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes. + * Or it truncates the beginning if it exceeds. + * @method lsetLength + * @param {Buffer|Array} msg the value to pad + * @param {Number} length the number of bytes the output should be + * @param {Boolean} [right=false] whether to start padding form the left or right + * @return {Buffer|Array} + */ +exports.setLengthLeft = exports.setLength = function (msg, length, right) { + var buf = exports.zeros(length); + msg = exports.toBuffer(msg); + if (right) { + if (msg.length < length) { + msg.copy(buf); + return buf; + } + return msg.slice(0, length); + } else { + if (msg.length < length) { + msg.copy(buf, length - msg.length); + return buf; + } + return msg.slice(-length); + } +}; + +/** + * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes. + * Or it truncates the beginning if it exceeds. + * @param {Buffer|Array} msg the value to pad + * @param {Number} length the number of bytes the output should be + * @return {Buffer|Array} + */ +exports.setLengthRight = function (msg, length) { + return exports.setLength(msg, length, true); +}; + +/** + * Trims leading zeros from a `Buffer` or an `Array` + * @param {Buffer|Array|String} a + * @return {Buffer|Array|String} + */ +exports.unpad = exports.stripZeros = function (a) { + a = exports.stripHexPrefix(a); + var first = a[0]; + while (a.length > 0 && first.toString() === '0') { + a = a.slice(1); + first = a[0]; + } + return a; +}; +/** + * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method. + * @param {*} v the value + */ +exports.toBuffer = function (v) { + if (!Buffer.isBuffer(v)) { + if (Array.isArray(v)) { + v = Buffer.from(v); + } else if (typeof v === 'string') { + if (exports.isHexString(v)) { + v = Buffer.from(exports.padToEven(exports.stripHexPrefix(v)), 'hex'); + } else { + v = Buffer.from(v); + } + } else if (typeof v === 'number') { + v = exports.intToBuffer(v); + } else if (v === null || v === undefined) { + v = Buffer.allocUnsafe(0); + } else if (BN.isBN(v)) { + v = v.toArrayLike(Buffer); + } else if (v.toArray) { + // converts a BN to a Buffer + v = Buffer.from(v.toArray()); + } else { + throw new Error('invalid type'); + } + } + return v; +}; + +/** + * Converts a `Buffer` to a `Number` + * @param {Buffer} buf + * @return {Number} + * @throws If the input number exceeds 53 bits. + */ +exports.bufferToInt = function (buf) { + return new BN(exports.toBuffer(buf)).toNumber(); +}; + +/** + * Converts a `Buffer` into a hex `String` + * @param {Buffer} buf + * @return {String} + */ +exports.bufferToHex = function (buf) { + buf = exports.toBuffer(buf); + return '0x' + buf.toString('hex'); +}; + +/** + * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers. + * @param {Buffer} num + * @return {BN} + */ +exports.fromSigned = function (num) { + return new BN(num).fromTwos(256); +}; + +/** + * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers. + * @param {BN} num + * @return {Buffer} + */ +exports.toUnsigned = function (num) { + return Buffer.from(num.toTwos(256).toArray()); +}; + +/** + * Creates Keccak hash of the input + * @param {Buffer|Array|String|Number} a the input data + * @param {Number} [bits=256] the Keccak width + * @return {Buffer} + */ +exports.keccak = function (a, bits) { + a = exports.toBuffer(a); + if (!bits) bits = 256; + + return createKeccakHash('keccak' + bits).update(a).digest(); +}; + +/** + * Creates Keccak-256 hash of the input, alias for keccak(a, 256) + * @param {Buffer|Array|String|Number} a the input data + * @return {Buffer} + */ +exports.keccak256 = function (a) { + return exports.keccak(a); +}; + +/** + * Creates SHA-3 (Keccak) hash of the input [OBSOLETE] + * @param {Buffer|Array|String|Number} a the input data + * @param {Number} [bits=256] the SHA-3 width + * @return {Buffer} + */ +exports.sha3 = exports.keccak; + +/** + * Creates SHA256 hash of the input + * @param {Buffer|Array|String|Number} a the input data + * @return {Buffer} + */ +exports.sha256 = function (a) { + a = exports.toBuffer(a); + return createHash('sha256').update(a).digest(); +}; + +/** + * Creates RIPEMD160 hash of the input + * @param {Buffer|Array|String|Number} a the input data + * @param {Boolean} padded whether it should be padded to 256 bits or not + * @return {Buffer} + */ +exports.ripemd160 = function (a, padded) { + a = exports.toBuffer(a); + var hash = createHash('rmd160').update(a).digest(); + if (padded === true) { + return exports.setLength(hash, 32); + } else { + return hash; + } +}; + +/** + * Creates SHA-3 hash of the RLP encoded version of the input + * @param {Buffer|Array|String|Number} a the input data + * @return {Buffer} + */ +exports.rlphash = function (a) { + return exports.keccak(rlp.encode(a)); +}; + +/** + * Checks if the private key satisfies the rules of the curve secp256k1. + * @param {Buffer} privateKey + * @return {Boolean} + */ +exports.isValidPrivate = function (privateKey) { + return secp256k1.privateKeyVerify(privateKey); +}; + +/** + * Checks if the public key satisfies the rules of the curve secp256k1 + * and the requirements of Ethereum. + * @param {Buffer} publicKey The two points of an uncompressed key, unless sanitize is enabled + * @param {Boolean} [sanitize=false] Accept public keys in other formats + * @return {Boolean} + */ +exports.isValidPublic = function (publicKey, sanitize) { + if (publicKey.length === 64) { + // Convert to SEC1 for secp256k1 + return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey])); + } + + if (!sanitize) { + return false; + } + + return secp256k1.publicKeyVerify(publicKey); +}; + +/** + * Returns the ethereum address of a given public key. + * Accepts "Ethereum public keys" and SEC1 encoded keys. + * @param {Buffer} pubKey The two points of an uncompressed key, unless sanitize is enabled + * @param {Boolean} [sanitize=false] Accept public keys in other formats + * @return {Buffer} + */ +exports.pubToAddress = exports.publicToAddress = function (pubKey, sanitize) { + pubKey = exports.toBuffer(pubKey); + if (sanitize && pubKey.length !== 64) { + pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1); + } + assert(pubKey.length === 64); + // Only take the lower 160bits of the hash + return exports.keccak(pubKey).slice(-20); +}; + +/** + * Returns the ethereum public key of a given private key + * @param {Buffer} privateKey A private key must be 256 bits wide + * @return {Buffer} + */ +var privateToPublic = exports.privateToPublic = function (privateKey) { + privateKey = exports.toBuffer(privateKey); + // skip the type flag and use the X, Y points + return secp256k1.publicKeyCreate(privateKey, false).slice(1); +}; + +/** + * Converts a public key to the Ethereum format. + * @param {Buffer} publicKey + * @return {Buffer} + */ +exports.importPublic = function (publicKey) { + publicKey = exports.toBuffer(publicKey); + if (publicKey.length !== 64) { + publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1); + } + return publicKey; +}; + +/** + * ECDSA sign + * @param {Buffer} msgHash + * @param {Buffer} privateKey + * @return {Object} + */ +exports.ecsign = function (msgHash, privateKey) { + var sig = secp256k1.sign(msgHash, privateKey); + + var ret = {}; + ret.r = sig.signature.slice(0, 32); + ret.s = sig.signature.slice(32, 64); + ret.v = sig.recovery + 27; + return ret; +}; + +/** + * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call. + * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign` + * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key + * used to produce the signature. + * @param message + * @returns {Buffer} hash + */ +exports.hashPersonalMessage = function (message) { + var prefix = exports.toBuffer('\x19Ethereum Signed Message:\n' + message.length.toString()); + return exports.keccak(Buffer.concat([prefix, message])); +}; + +/** + * ECDSA public key recovery from signature + * @param {Buffer} msgHash + * @param {Number} v + * @param {Buffer} r + * @param {Buffer} s + * @return {Buffer} publicKey + */ +exports.ecrecover = function (msgHash, v, r, s) { + var signature = Buffer.concat([exports.setLength(r, 32), exports.setLength(s, 32)], 64); + var recovery = v - 27; + if (recovery !== 0 && recovery !== 1) { + throw new Error('Invalid signature v value'); + } + var senderPubKey = secp256k1.recover(msgHash, signature, recovery); + return secp256k1.publicKeyConvert(senderPubKey, false).slice(1); +}; + +/** + * Convert signature parameters into the format of `eth_sign` RPC method + * @param {Number} v + * @param {Buffer} r + * @param {Buffer} s + * @return {String} sig + */ +exports.toRpcSig = function (v, r, s) { + // NOTE: with potential introduction of chainId this might need to be updated + if (v !== 27 && v !== 28) { + throw new Error('Invalid recovery id'); + } + + // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin + // FIXME: this might change in the future - https://github.com/ethereum/go-ethereum/issues/2053 + return exports.bufferToHex(Buffer.concat([exports.setLengthLeft(r, 32), exports.setLengthLeft(s, 32), exports.toBuffer(v - 27)])); +}; + +/** + * Convert signature format of the `eth_sign` RPC method to signature parameters + * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053 + * @param {String} sig + * @return {Object} + */ +exports.fromRpcSig = function (sig) { + sig = exports.toBuffer(sig); + + // NOTE: with potential introduction of chainId this might need to be updated + if (sig.length !== 65) { + throw new Error('Invalid signature length'); + } + + var v = sig[64]; + // support both versions of `eth_sign` responses + if (v < 27) { + v += 27; + } + + return { + v: v, + r: sig.slice(0, 32), + s: sig.slice(32, 64) + }; +}; + +/** + * Returns the ethereum address of a given private key + * @param {Buffer} privateKey A private key must be 256 bits wide + * @return {Buffer} + */ +exports.privateToAddress = function (privateKey) { + return exports.publicToAddress(privateToPublic(privateKey)); +}; + +/** + * Checks if the address is a valid. Accepts checksummed addresses too + * @param {String} address + * @return {Boolean} + */ +exports.isValidAddress = function (address) { + return (/^0x[0-9a-fA-F]{40}$/.test(address) + ); +}; + +/** + * Checks if a given address is a zero address + * @method isZeroAddress + * @param {String} address + * @return {Boolean} + */ +exports.isZeroAddress = function (address) { + var zeroAddress = exports.zeroAddress(); + return zeroAddress === exports.addHexPrefix(address); +}; + +/** + * Returns a checksummed address + * @param {String} address + * @return {String} + */ +exports.toChecksumAddress = function (address) { + address = exports.stripHexPrefix(address).toLowerCase(); + var hash = exports.keccak(address).toString('hex'); + var ret = '0x'; + + for (var i = 0; i < address.length; i++) { + if (parseInt(hash[i], 16) >= 8) { + ret += address[i].toUpperCase(); + } else { + ret += address[i]; + } + } + + return ret; +}; + +/** + * Checks if the address is a valid checksummed address + * @param {Buffer} address + * @return {Boolean} + */ +exports.isValidChecksumAddress = function (address) { + return exports.isValidAddress(address) && exports.toChecksumAddress(address) === address; +}; + +/** + * Generates an address of a newly created contract + * @param {Buffer} from the address which is creating this new address + * @param {Buffer} nonce the nonce of the from account + * @return {Buffer} + */ +exports.generateAddress = function (from, nonce) { + from = exports.toBuffer(from); + nonce = new BN(nonce); + + if (nonce.isZero()) { + // in RLP we want to encode null in the case of zero nonce + // read the RLP documentation for an answer if you dare + nonce = null; + } else { + nonce = Buffer.from(nonce.toArray()); + } + + // Only take the lower 160bits of the hash + return exports.rlphash([from, nonce]).slice(-20); +}; + +/** + * Returns true if the supplied address belongs to a precompiled account (Byzantium) + * @param {Buffer|String} address + * @return {Boolean} + */ +exports.isPrecompiled = function (address) { + var a = exports.unpad(address); + return a.length === 1 && a[0] >= 1 && a[0] <= 8; +}; + +/** + * Adds "0x" to a given `String` if it does not already start with "0x" + * @param {String} str + * @return {String} + */ +exports.addHexPrefix = function (str) { + if (typeof str !== 'string') { + return str; + } + + return exports.isHexPrefixed(str) ? str : '0x' + str; +}; + +/** + * Validate ECDSA signature + * @method isValidSignature + * @param {Buffer} v + * @param {Buffer} r + * @param {Buffer} s + * @param {Boolean} [homestead=true] + * @return {Boolean} + */ + +exports.isValidSignature = function (v, r, s, homestead) { + var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16); + var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16); + + if (r.length !== 32 || s.length !== 32) { + return false; + } + + if (v !== 27 && v !== 28) { + return false; + } + + r = new BN(r); + s = new BN(s); + + if (r.isZero() || r.gt(SECP256K1_N) || s.isZero() || s.gt(SECP256K1_N)) { + return false; + } + + if (homestead === false && new BN(s).cmp(SECP256K1_N_DIV_2) === 1) { + return false; + } + + return true; +}; + +/** + * Converts a `Buffer` or `Array` to JSON + * @param {Buffer|Array} ba + * @return {Array|String|null} + */ +exports.baToJSON = function (ba) { + if (Buffer.isBuffer(ba)) { + return '0x' + ba.toString('hex'); + } else if (ba instanceof Array) { + var array = []; + for (var i = 0; i < ba.length; i++) { + array.push(exports.baToJSON(ba[i])); + } + return array; + } +}; + +/** + * Defines properties on a `Object`. It make the assumption that underlying data is binary. + * @param {Object} self the `Object` to define properties on + * @param {Array} fields an array fields to define. Fields can contain: + * * `name` - the name of the properties + * * `length` - the number of bytes the field can have + * * `allowLess` - if the field can be less than the length + * * `allowEmpty` + * @param {*} data data to be validated against the definitions + */ +exports.defineProperties = function (self, fields, data) { + self.raw = []; + self._fields = []; + + // attach the `toJSON` + self.toJSON = function (label) { + if (label) { + var obj = {}; + self._fields.forEach(function (field) { + obj[field] = '0x' + self[field].toString('hex'); + }); + return obj; + } + return exports.baToJSON(this.raw); + }; + + self.serialize = function serialize() { + return rlp.encode(self.raw); + }; + + fields.forEach(function (field, i) { + self._fields.push(field.name); + function getter() { + return self.raw[i]; + } + function setter(v) { + v = exports.toBuffer(v); + + if (v.toString('hex') === '00' && !field.allowZero) { + v = Buffer.allocUnsafe(0); + } + + if (field.allowLess && field.length) { + v = exports.stripZeros(v); + assert(field.length >= v.length, 'The field ' + field.name + ' must not have more ' + field.length + ' bytes'); + } else if (!(field.allowZero && v.length === 0) && field.length) { + assert(field.length === v.length, 'The field ' + field.name + ' must have byte length of ' + field.length); + } + + self.raw[i] = v; + } + + Object.defineProperty(self, field.name, { + enumerable: true, + configurable: true, + get: getter, + set: setter + }); + + if (field.default) { + self[field.name] = field.default; + } + + // attach alias + if (field.alias) { + Object.defineProperty(self, field.alias, { + enumerable: false, + configurable: true, + set: setter, + get: getter + }); + } + }); + + // if the constuctor is passed data + if (data) { + if (typeof data === 'string') { + data = Buffer.from(exports.stripHexPrefix(data), 'hex'); + } + + if (Buffer.isBuffer(data)) { + data = rlp.decode(data); + } + + if (Array.isArray(data)) { + if (data.length > self._fields.length) { + throw new Error('wrong number of fields in data'); + } + + // make sure all the items are buffers + data.forEach(function (d, i) { + self[self._fields[i]] = exports.toBuffer(d); + }); + } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') { + var keys = Object.keys(data); + fields.forEach(function (field) { + if (keys.indexOf(field.name) !== -1) self[field.name] = data[field.name]; + if (keys.indexOf(field.alias) !== -1) self[field.alias] = data[field.alias]; + }); + } else { + throw new Error('invalid data'); + } + } +}; +},{"assert":19,"bn.js":53,"create-hash":91,"ethjs-util":155,"keccak":195,"rlp":289,"safe-buffer":290,"secp256k1":295}],142:[function(require,module,exports){ +arguments[4][128][0].apply(exports,arguments) +},{"_process":257,"dup":128}],143:[function(require,module,exports){ +'use strict'; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI +var address_1 = require("./address"); +var bignumber_1 = require("./bignumber"); +var bytes_1 = require("./bytes"); +var utf8_1 = require("./utf8"); +var properties_1 = require("./properties"); +var errors = __importStar(require("./errors")); +var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/); +var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/); +var paramTypeArray = new RegExp(/^(.*)\[([0-9]*)\]$/); +exports.defaultCoerceFunc = function (type, value) { + var match = type.match(paramTypeNumber); + if (match && parseInt(match[2]) <= 48) { + return value.toNumber(); + } + return value; +}; +/////////////////////////////////// +// Parsing for Solidity Signatures +var regexParen = new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"); +var regexIdentifier = new RegExp("^[A-Za-z_][A-Za-z0-9_]*$"); +function verifyType(type) { + // These need to be transformed to their full description + if (type.match(/^uint($|[^1-9])/)) { + type = 'uint256' + type.substring(4); + } + else if (type.match(/^int($|[^1-9])/)) { + type = 'int256' + type.substring(3); + } + return type; +} +function parseParam(param, allowIndexed) { + function throwError(i) { + throw new Error('unexpected character "' + param[i] + '" at position ' + i + ' in "' + param + '"'); + } + var parent = { type: '', name: '', state: { allowType: true } }; + var node = parent; + for (var i = 0; i < param.length; i++) { + var c = param[i]; + switch (c) { + case '(': + if (!node.state.allowParams) { + throwError(i); + } + node.state.allowType = false; + node.type = verifyType(node.type); + node.components = [{ type: '', name: '', parent: node, state: { allowType: true } }]; + node = node.components[0]; + break; + case ')': + delete node.state; + if (allowIndexed && node.name === 'indexed') { + node.indexed = true; + node.name = ''; + } + node.type = verifyType(node.type); + var child = node; + node = node.parent; + if (!node) { + throwError(i); + } + delete child.parent; + node.state.allowParams = false; + node.state.allowName = true; + node.state.allowArray = true; + break; + case ',': + delete node.state; + if (allowIndexed && node.name === 'indexed') { + node.indexed = true; + node.name = ''; + } + node.type = verifyType(node.type); + var sibling = { type: '', name: '', parent: node.parent, state: { allowType: true } }; + node.parent.components.push(sibling); + delete node.parent; + node = sibling; + break; + // Hit a space... + case ' ': + // If reading type, the type is done and may read a param or name + if (node.state.allowType) { + if (node.type !== '') { + node.type = verifyType(node.type); + delete node.state.allowType; + node.state.allowName = true; + node.state.allowParams = true; + } + } + // If reading name, the name is done + if (node.state.allowName) { + if (node.name !== '') { + if (allowIndexed && node.name === 'indexed') { + node.indexed = true; + node.name = ''; + } + else { + node.state.allowName = false; + } + } + } + break; + case '[': + if (!node.state.allowArray) { + throwError(i); + } + node.type += c; + node.state.allowArray = false; + node.state.allowName = false; + node.state.readArray = true; + break; + case ']': + if (!node.state.readArray) { + throwError(i); + } + node.type += c; + node.state.readArray = false; + node.state.allowArray = true; + node.state.allowName = true; + break; + default: + if (node.state.allowType) { + node.type += c; + node.state.allowParams = true; + node.state.allowArray = true; + } + else if (node.state.allowName) { + node.name += c; + delete node.state.allowArray; + } + else if (node.state.readArray) { + node.type += c; + } + else { + throwError(i); + } + } + } + if (node.parent) { + throw new Error("unexpected eof"); + } + delete parent.state; + if (allowIndexed && node.name === 'indexed') { + node.indexed = true; + node.name = ''; + } + parent.type = verifyType(parent.type); + return parent; +} +// @TODO: Better return type +function parseSignatureEvent(fragment) { + var abi = { + anonymous: false, + inputs: [], + name: '', + type: 'event' + }; + var match = fragment.match(regexParen); + if (!match) { + throw new Error('invalid event: ' + fragment); + } + abi.name = match[1].trim(); + splitNesting(match[2]).forEach(function (param) { + param = parseParam(param, true); + param.indexed = !!param.indexed; + abi.inputs.push(param); + }); + match[3].split(' ').forEach(function (modifier) { + switch (modifier) { + case 'anonymous': + abi.anonymous = true; + break; + case '': + break; + default: + console.log('unknown modifier: ' + modifier); + } + }); + if (abi.name && !abi.name.match(regexIdentifier)) { + throw new Error('invalid identifier: "' + abi.name + '"'); + } + return abi; +} +function parseSignatureFunction(fragment) { + var abi = { + constant: false, + inputs: [], + name: '', + outputs: [], + payable: false, + stateMutability: null, + type: 'function' + }; + var comps = fragment.split(' returns '); + var left = comps[0].match(regexParen); + if (!left) { + throw new Error('invalid signature'); + } + abi.name = left[1].trim(); + if (!abi.name.match(regexIdentifier)) { + throw new Error('invalid identifier: "' + left[1] + '"'); + } + splitNesting(left[2]).forEach(function (param) { + abi.inputs.push(parseParam(param)); + }); + left[3].split(' ').forEach(function (modifier) { + switch (modifier) { + case 'constant': + abi.constant = true; + break; + case 'payable': + abi.payable = true; + break; + case 'pure': + abi.constant = true; + abi.stateMutability = 'pure'; + break; + case 'view': + abi.constant = true; + abi.stateMutability = 'view'; + break; + case '': + break; + default: + console.log('unknown modifier: ' + modifier); + } + }); + // We have outputs + if (comps.length > 1) { + var right = comps[1].match(regexParen); + if (right[1].trim() != '' || right[3].trim() != '') { + throw new Error('unexpected tokens'); + } + splitNesting(right[2]).forEach(function (param) { + abi.outputs.push(parseParam(param)); + }); + } + return abi; +} +function parseParamType(type) { + return parseParam(type, true); +} +exports.parseParamType = parseParamType; +// @TODO: Allow a second boolean to expose names +function formatParamType(paramType) { + return getParamCoder(exports.defaultCoerceFunc, paramType).type; +} +exports.formatParamType = formatParamType; +// @TODO: Allow a second boolean to expose names and modifiers +function formatSignature(fragment) { + return fragment.name + '(' + fragment.inputs.map(function (i) { return formatParamType(i); }).join(',') + ')'; +} +exports.formatSignature = formatSignature; +function parseSignature(fragment) { + if (typeof (fragment) === 'string') { + // Make sure the "returns" is surrounded by a space and all whitespace is exactly one space + fragment = fragment.replace(/\(/g, ' (').replace(/\)/g, ') ').replace(/\s+/g, ' '); + fragment = fragment.trim(); + if (fragment.substring(0, 6) === 'event ') { + return parseSignatureEvent(fragment.substring(6).trim()); + } + else { + if (fragment.substring(0, 9) === 'function ') { + fragment = fragment.substring(9); + } + return parseSignatureFunction(fragment.trim()); + } + } + throw new Error('unknown signature'); +} +exports.parseSignature = parseSignature; +var Coder = /** @class */ (function () { + function Coder(coerceFunc, name, type, localName, dynamic) { + this.coerceFunc = coerceFunc; + this.name = name; + this.type = type; + this.localName = localName; + this.dynamic = dynamic; + } + return Coder; +}()); +// Clones the functionality of an existing Coder, but without a localName +var CoderAnonymous = /** @class */ (function (_super) { + __extends(CoderAnonymous, _super); + function CoderAnonymous(coder) { + var _this = _super.call(this, coder.coerceFunc, coder.name, coder.type, undefined, coder.dynamic) || this; + properties_1.defineReadOnly(_this, 'coder', coder); + return _this; + } + CoderAnonymous.prototype.encode = function (value) { return this.coder.encode(value); }; + CoderAnonymous.prototype.decode = function (data, offset) { return this.coder.decode(data, offset); }; + return CoderAnonymous; +}(Coder)); +var CoderNull = /** @class */ (function (_super) { + __extends(CoderNull, _super); + function CoderNull(coerceFunc, localName) { + return _super.call(this, coerceFunc, 'null', '', localName, false) || this; + } + CoderNull.prototype.encode = function (value) { + return bytes_1.arrayify([]); + }; + CoderNull.prototype.decode = function (data, offset) { + if (offset > data.length) { + throw new Error('invalid null'); + } + return { + consumed: 0, + value: this.coerceFunc('null', undefined) + }; + }; + return CoderNull; +}(Coder)); +var CoderNumber = /** @class */ (function (_super) { + __extends(CoderNumber, _super); + function CoderNumber(coerceFunc, size, signed, localName) { + var _this = this; + var name = ((signed ? 'int' : 'uint') + (size * 8)); + _this = _super.call(this, coerceFunc, name, name, localName, false) || this; + _this.size = size; + _this.signed = signed; + return _this; + } + CoderNumber.prototype.encode = function (value) { + try { + var v = bignumber_1.bigNumberify(value); + v = v.toTwos(this.size * 8).maskn(this.size * 8); + //value = value.toTwos(size * 8).maskn(size * 8); + if (this.signed) { + v = v.fromTwos(this.size * 8).toTwos(256); + } + return bytes_1.padZeros(bytes_1.arrayify(v), 32); + } + catch (error) { + errors.throwError('invalid number value', errors.INVALID_ARGUMENT, { + arg: this.localName, + coderType: this.name, + value: value + }); + } + return null; + }; + CoderNumber.prototype.decode = function (data, offset) { + if (data.length < offset + 32) { + errors.throwError('insufficient data for ' + this.name + ' type', errors.INVALID_ARGUMENT, { + arg: this.localName, + coderType: this.name, + value: bytes_1.hexlify(data.slice(offset, offset + 32)) + }); + } + var junkLength = 32 - this.size; + var value = bignumber_1.bigNumberify(data.slice(offset + junkLength, offset + 32)); + if (this.signed) { + value = value.fromTwos(this.size * 8); + } + else { + value = value.maskn(this.size * 8); + } + return { + consumed: 32, + value: this.coerceFunc(this.name, value), + }; + }; + return CoderNumber; +}(Coder)); +var uint256Coder = new CoderNumber(function (type, value) { return value; }, 32, false, 'none'); +var CoderBoolean = /** @class */ (function (_super) { + __extends(CoderBoolean, _super); + function CoderBoolean(coerceFunc, localName) { + return _super.call(this, coerceFunc, 'bool', 'bool', localName, false) || this; + } + CoderBoolean.prototype.encode = function (value) { + return uint256Coder.encode(!!value ? 1 : 0); + }; + CoderBoolean.prototype.decode = function (data, offset) { + try { + var result = uint256Coder.decode(data, offset); + } + catch (error) { + if (error.reason === 'insufficient data for uint256 type') { + errors.throwError('insufficient data for boolean type', errors.INVALID_ARGUMENT, { + arg: this.localName, + coderType: 'boolean', + value: error.value + }); + } + throw error; + } + return { + consumed: result.consumed, + value: this.coerceFunc('bool', !result.value.isZero()) + }; + }; + return CoderBoolean; +}(Coder)); +var CoderFixedBytes = /** @class */ (function (_super) { + __extends(CoderFixedBytes, _super); + function CoderFixedBytes(coerceFunc, length, localName) { + var _this = this; + var name = ('bytes' + length); + _this = _super.call(this, coerceFunc, name, name, localName, false) || this; + _this.length = length; + return _this; + } + CoderFixedBytes.prototype.encode = function (value) { + var result = new Uint8Array(32); + try { + var data = bytes_1.arrayify(value); + if (data.length > 32) { + throw new Error(); + } + result.set(data); + } + catch (error) { + errors.throwError('invalid ' + this.name + ' value', errors.INVALID_ARGUMENT, { + arg: this.localName, + coderType: this.name, + value: (error.value || value) + }); + } + return result; + }; + CoderFixedBytes.prototype.decode = function (data, offset) { + if (data.length < offset + 32) { + errors.throwError('insufficient data for ' + name + ' type', errors.INVALID_ARGUMENT, { + arg: this.localName, + coderType: this.name, + value: bytes_1.hexlify(data.slice(offset, offset + 32)) + }); + } + return { + consumed: 32, + value: this.coerceFunc(this.name, bytes_1.hexlify(data.slice(offset, offset + this.length))) + }; + }; + return CoderFixedBytes; +}(Coder)); +var CoderAddress = /** @class */ (function (_super) { + __extends(CoderAddress, _super); + function CoderAddress(coerceFunc, localName) { + return _super.call(this, coerceFunc, 'address', 'address', localName, false) || this; + } + CoderAddress.prototype.encode = function (value) { + var result = new Uint8Array(32); + try { + result.set(bytes_1.arrayify(address_1.getAddress(value)), 12); + } + catch (error) { + errors.throwError('invalid address', errors.INVALID_ARGUMENT, { + arg: this.localName, + coderType: 'address', + value: value + }); + } + return result; + }; + CoderAddress.prototype.decode = function (data, offset) { + if (data.length < offset + 32) { + errors.throwError('insufficuent data for address type', errors.INVALID_ARGUMENT, { + arg: this.localName, + coderType: 'address', + value: bytes_1.hexlify(data.slice(offset, offset + 32)) + }); + } + return { + consumed: 32, + value: this.coerceFunc('address', address_1.getAddress(bytes_1.hexlify(data.slice(offset + 12, offset + 32)))) + }; + }; + return CoderAddress; +}(Coder)); +function _encodeDynamicBytes(value) { + var dataLength = 32 * Math.ceil(value.length / 32); + var padding = new Uint8Array(dataLength - value.length); + return bytes_1.concat([ + uint256Coder.encode(value.length), + value, + padding + ]); +} +function _decodeDynamicBytes(data, offset, localName) { + if (data.length < offset + 32) { + errors.throwError('insufficient data for dynamicBytes length', errors.INVALID_ARGUMENT, { + arg: localName, + coderType: 'dynamicBytes', + value: bytes_1.hexlify(data.slice(offset, offset + 32)) + }); + } + var length = uint256Coder.decode(data, offset).value; + try { + length = length.toNumber(); + } + catch (error) { + errors.throwError('dynamic bytes count too large', errors.INVALID_ARGUMENT, { + arg: localName, + coderType: 'dynamicBytes', + value: length.toString() + }); + } + if (data.length < offset + 32 + length) { + errors.throwError('insufficient data for dynamicBytes type', errors.INVALID_ARGUMENT, { + arg: localName, + coderType: 'dynamicBytes', + value: bytes_1.hexlify(data.slice(offset, offset + 32 + length)) + }); + } + return { + consumed: 32 + 32 * Math.ceil(length / 32), + value: data.slice(offset + 32, offset + 32 + length), + }; +} +var CoderDynamicBytes = /** @class */ (function (_super) { + __extends(CoderDynamicBytes, _super); + function CoderDynamicBytes(coerceFunc, localName) { + return _super.call(this, coerceFunc, 'bytes', 'bytes', localName, true) || this; + } + CoderDynamicBytes.prototype.encode = function (value) { + try { + return _encodeDynamicBytes(bytes_1.arrayify(value)); + } + catch (error) { + errors.throwError('invalid bytes value', errors.INVALID_ARGUMENT, { + arg: this.localName, + coderType: 'bytes', + value: error.value + }); + } + return null; + }; + CoderDynamicBytes.prototype.decode = function (data, offset) { + var result = _decodeDynamicBytes(data, offset, this.localName); + result.value = this.coerceFunc('bytes', bytes_1.hexlify(result.value)); + return result; + }; + return CoderDynamicBytes; +}(Coder)); +var CoderString = /** @class */ (function (_super) { + __extends(CoderString, _super); + function CoderString(coerceFunc, localName) { + return _super.call(this, coerceFunc, 'string', 'string', localName, true) || this; + } + CoderString.prototype.encode = function (value) { + if (typeof (value) !== 'string') { + errors.throwError('invalid string value', errors.INVALID_ARGUMENT, { + arg: this.localName, + coderType: 'string', + value: value + }); + } + return _encodeDynamicBytes(utf8_1.toUtf8Bytes(value)); + }; + CoderString.prototype.decode = function (data, offset) { + var result = _decodeDynamicBytes(data, offset, this.localName); + result.value = this.coerceFunc('string', utf8_1.toUtf8String(result.value)); + return result; + }; + return CoderString; +}(Coder)); +function alignSize(size) { + return 32 * Math.ceil(size / 32); +} +function pack(coders, values) { + if (Array.isArray(values)) { + // do nothing + } + else if (values && typeof (values) === 'object') { + var arrayValues = []; + coders.forEach(function (coder) { + arrayValues.push(values[coder.localName]); + }); + values = arrayValues; + } + else { + errors.throwError('invalid tuple value', errors.INVALID_ARGUMENT, { + coderType: 'tuple', + value: values + }); + } + if (coders.length !== values.length) { + errors.throwError('types/value length mismatch', errors.INVALID_ARGUMENT, { + coderType: 'tuple', + value: values + }); + } + var parts = []; + coders.forEach(function (coder, index) { + parts.push({ dynamic: coder.dynamic, value: coder.encode(values[index]) }); + }); + var staticSize = 0, dynamicSize = 0; + parts.forEach(function (part) { + if (part.dynamic) { + staticSize += 32; + dynamicSize += alignSize(part.value.length); + } + else { + staticSize += alignSize(part.value.length); + } + }); + var offset = 0, dynamicOffset = staticSize; + var data = new Uint8Array(staticSize + dynamicSize); + parts.forEach(function (part) { + if (part.dynamic) { + //uint256Coder.encode(dynamicOffset).copy(data, offset); + data.set(uint256Coder.encode(dynamicOffset), offset); + offset += 32; + //part.value.copy(data, dynamicOffset); @TODO + data.set(part.value, dynamicOffset); + dynamicOffset += alignSize(part.value.length); + } + else { + //part.value.copy(data, offset); @TODO + data.set(part.value, offset); + offset += alignSize(part.value.length); + } + }); + return data; +} +function unpack(coders, data, offset) { + var baseOffset = offset; + var consumed = 0; + var value = []; + coders.forEach(function (coder) { + if (coder.dynamic) { + var dynamicOffset = uint256Coder.decode(data, offset); + var result = coder.decode(data, baseOffset + dynamicOffset.value.toNumber()); + // The dynamic part is leap-frogged somewhere else; doesn't count towards size + result.consumed = dynamicOffset.consumed; + } + else { + var result = coder.decode(data, offset); + } + if (result.value != undefined) { + value.push(result.value); + } + offset += result.consumed; + consumed += result.consumed; + }); + coders.forEach(function (coder, index) { + var name = coder.localName; + if (!name) { + return; + } + if (name === 'length') { + name = '_length'; + } + if (value[name] != null) { + return; + } + value[name] = value[index]; + }); + return { + value: value, + consumed: consumed + }; +} +var CoderArray = /** @class */ (function (_super) { + __extends(CoderArray, _super); + function CoderArray(coerceFunc, coder, length, localName) { + var _this = this; + var type = (coder.type + '[' + (length >= 0 ? length : '') + ']'); + var dynamic = (length === -1 || coder.dynamic); + _this = _super.call(this, coerceFunc, 'array', type, localName, dynamic) || this; + _this.coder = coder; + _this.length = length; + return _this; + } + CoderArray.prototype.encode = function (value) { + if (!Array.isArray(value)) { + errors.throwError('expected array value', errors.INVALID_ARGUMENT, { + arg: this.localName, + coderType: 'array', + value: value + }); + } + var count = this.length; + var result = new Uint8Array(0); + if (count === -1) { + count = value.length; + result = uint256Coder.encode(count); + } + errors.checkArgumentCount(count, value.length, 'in coder array' + (this.localName ? (" " + this.localName) : "")); + var coders = []; + for (var i = 0; i < value.length; i++) { + coders.push(this.coder); + } + return bytes_1.concat([result, pack(coders, value)]); + }; + CoderArray.prototype.decode = function (data, offset) { + // @TODO: + //if (data.length < offset + length * 32) { throw new Error('invalid array'); } + var consumed = 0; + var count = this.length; + if (count === -1) { + try { + var decodedLength = uint256Coder.decode(data, offset); + } + catch (error) { + errors.throwError('insufficient data for dynamic array length', errors.INVALID_ARGUMENT, { + arg: this.localName, + coderType: 'array', + value: error.value + }); + } + try { + count = decodedLength.value.toNumber(); + } + catch (error) { + errors.throwError('array count too large', errors.INVALID_ARGUMENT, { + arg: this.localName, + coderType: 'array', + value: decodedLength.value.toString() + }); + } + consumed += decodedLength.consumed; + offset += decodedLength.consumed; + } + var coders = []; + for (var i = 0; i < count; i++) { + coders.push(new CoderAnonymous(this.coder)); + } + var result = unpack(coders, data, offset); + result.consumed += consumed; + result.value = this.coerceFunc(this.type, result.value); + return result; + }; + return CoderArray; +}(Coder)); +var CoderTuple = /** @class */ (function (_super) { + __extends(CoderTuple, _super); + function CoderTuple(coerceFunc, coders, localName) { + var _this = this; + var dynamic = false; + var types = []; + coders.forEach(function (coder) { + if (coder.dynamic) { + dynamic = true; + } + types.push(coder.type); + }); + var type = ('tuple(' + types.join(',') + ')'); + _this = _super.call(this, coerceFunc, 'tuple', type, localName, dynamic) || this; + _this.coders = coders; + return _this; + } + CoderTuple.prototype.encode = function (value) { + return pack(this.coders, value); + }; + CoderTuple.prototype.decode = function (data, offset) { + var result = unpack(this.coders, data, offset); + result.value = this.coerceFunc(this.type, result.value); + return result; + }; + return CoderTuple; +}(Coder)); +/* +function getTypes(coders) { + var type = coderTuple(coders).type; + return type.substring(6, type.length - 1); +} +*/ +function splitNesting(value) { + var result = []; + var accum = ''; + var depth = 0; + for (var offset = 0; offset < value.length; offset++) { + var c = value[offset]; + if (c === ',' && depth === 0) { + result.push(accum); + accum = ''; + } + else { + accum += c; + if (c === '(') { + depth++; + } + else if (c === ')') { + depth--; + if (depth === -1) { + throw new Error('unbalanced parenthsis'); + } + } + } + } + result.push(accum); + return result; +} +// @TODO: Is there a way to return "class"? +var paramTypeSimple = { + address: CoderAddress, + bool: CoderBoolean, + string: CoderString, + bytes: CoderDynamicBytes, +}; +function getTupleParamCoder(coerceFunc, components, localName) { + if (!components) { + components = []; + } + var coders = []; + components.forEach(function (component) { + coders.push(getParamCoder(coerceFunc, component)); + }); + return new CoderTuple(coerceFunc, coders, localName); +} +function getParamCoder(coerceFunc, param) { + var coder = paramTypeSimple[param.type]; + if (coder) { + return new coder(coerceFunc, param.name); + } + var match = param.type.match(paramTypeNumber); + if (match) { + var size = parseInt(match[2] || "256"); + if (size === 0 || size > 256 || (size % 8) !== 0) { + errors.throwError('invalid ' + match[1] + ' bit length', errors.INVALID_ARGUMENT, { + arg: 'param', + value: param + }); + } + return new CoderNumber(coerceFunc, size / 8, (match[1] === 'int'), param.name); + } + var match = param.type.match(paramTypeBytes); + if (match) { + var size = parseInt(match[1]); + if (size === 0 || size > 32) { + errors.throwError('invalid bytes length', errors.INVALID_ARGUMENT, { + arg: 'param', + value: param + }); + } + return new CoderFixedBytes(coerceFunc, size, param.name); + } + var match = param.type.match(paramTypeArray); + if (match) { + var size = parseInt(match[2] || "-1"); + param = properties_1.jsonCopy(param); + param.type = match[1]; + return new CoderArray(coerceFunc, getParamCoder(coerceFunc, param), size, param.name); + } + if (param.type.substring(0, 5) === 'tuple') { + return getTupleParamCoder(coerceFunc, param.components, param.name); + } + if (param.type === '') { + return new CoderNull(coerceFunc, param.name); + } + errors.throwError('invalid type', errors.INVALID_ARGUMENT, { + arg: 'type', + value: param.type + }); + return null; +} +var AbiCoder = /** @class */ (function () { + function AbiCoder(coerceFunc) { + errors.checkNew(this, AbiCoder); + if (!coerceFunc) { + coerceFunc = exports.defaultCoerceFunc; + } + properties_1.defineReadOnly(this, 'coerceFunc', coerceFunc); + } + AbiCoder.prototype.encode = function (types, values) { + if (types.length !== values.length) { + errors.throwError('types/values length mismatch', errors.INVALID_ARGUMENT, { + count: { types: types.length, values: values.length }, + value: { types: types, values: values } + }); + } + var coders = []; + types.forEach(function (type) { + // Convert types to type objects + // - "uint foo" => { type: "uint", name: "foo" } + // - "tuple(uint, uint)" => { type: "tuple", components: [ { type: "uint" }, { type: "uint" }, ] } + var typeObject = null; + if (typeof (type) === 'string') { + typeObject = parseParam(type); + } + else { + typeObject = type; + } + coders.push(getParamCoder(this.coerceFunc, typeObject)); + }, this); + return bytes_1.hexlify(new CoderTuple(this.coerceFunc, coders, '_').encode(values)); + }; + AbiCoder.prototype.decode = function (types, data) { + var coders = []; + types.forEach(function (type) { + // See encode for details + var typeObject = null; + if (typeof (type) === 'string') { + typeObject = parseParam(type); + } + else { + typeObject = properties_1.jsonCopy(type); + } + coders.push(getParamCoder(this.coerceFunc, typeObject)); + }, this); + return new CoderTuple(this.coerceFunc, coders, '_').decode(bytes_1.arrayify(data), 0).value; + }; + return AbiCoder; +}()); +exports.AbiCoder = AbiCoder; +exports.defaultAbiCoder = new AbiCoder(); + +},{"./address":144,"./bignumber":145,"./bytes":146,"./errors":147,"./properties":149,"./utf8":152}],144:[function(require,module,exports){ +'use strict'; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +// We use this for base 36 maths +var bn_js_1 = __importDefault(require("bn.js")); +var bytes_1 = require("./bytes"); +var keccak256_1 = require("./keccak256"); +var rlp_1 = require("./rlp"); +var errors = require("./errors"); +function getChecksumAddress(address) { + if (typeof (address) !== 'string' || !address.match(/^0x[0-9A-Fa-f]{40}$/)) { + errors.throwError('invalid address', errors.INVALID_ARGUMENT, { arg: 'address', value: address }); + } + address = address.toLowerCase(); + var chars = address.substring(2).split(''); + var hashed = new Uint8Array(40); + for (var i_1 = 0; i_1 < 40; i_1++) { + hashed[i_1] = chars[i_1].charCodeAt(0); + } + hashed = bytes_1.arrayify(keccak256_1.keccak256(hashed)); + for (var i = 0; i < 40; i += 2) { + if ((hashed[i >> 1] >> 4) >= 8) { + chars[i] = chars[i].toUpperCase(); + } + if ((hashed[i >> 1] & 0x0f) >= 8) { + chars[i + 1] = chars[i + 1].toUpperCase(); + } + } + return '0x' + chars.join(''); +} +// Shims for environments that are missing some required constants and functions +var MAX_SAFE_INTEGER = 0x1fffffffffffff; +function log10(x) { + if (Math.log10) { + return Math.log10(x); + } + return Math.log(x) / Math.LN10; +} +// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number +// Create lookup table +var ibanLookup = {}; +for (var i = 0; i < 10; i++) { + ibanLookup[String(i)] = String(i); +} +for (var i = 0; i < 26; i++) { + ibanLookup[String.fromCharCode(65 + i)] = String(10 + i); +} +// How many decimal digits can we process? (for 64-bit float, this is 15) +var safeDigits = Math.floor(log10(MAX_SAFE_INTEGER)); +function ibanChecksum(address) { + address = address.toUpperCase(); + address = address.substring(4) + address.substring(0, 2) + '00'; + var expanded = ''; + address.split('').forEach(function (c) { + expanded += ibanLookup[c]; + }); + // Javascript can handle integers safely up to 15 (decimal) digits + while (expanded.length >= safeDigits) { + var block = expanded.substring(0, safeDigits); + expanded = parseInt(block, 10) % 97 + expanded.substring(block.length); + } + var checksum = String(98 - (parseInt(expanded, 10) % 97)); + while (checksum.length < 2) { + checksum = '0' + checksum; + } + return checksum; +} +; +function getAddress(address) { + var result = null; + if (typeof (address) !== 'string') { + errors.throwError('invalid address', errors.INVALID_ARGUMENT, { arg: 'address', value: address }); + } + if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) { + // Missing the 0x prefix + if (address.substring(0, 2) !== '0x') { + address = '0x' + address; + } + result = getChecksumAddress(address); + // It is a checksummed address with a bad checksum + if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) { + errors.throwError('bad address checksum', errors.INVALID_ARGUMENT, { arg: 'address', value: address }); + } + // Maybe ICAP? (we only support direct mode) + } + else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) { + // It is an ICAP address with a bad checksum + if (address.substring(2, 4) !== ibanChecksum(address)) { + errors.throwError('bad icap checksum', errors.INVALID_ARGUMENT, { arg: 'address', value: address }); + } + result = (new bn_js_1.default.BN(address.substring(4), 36)).toString(16); + while (result.length < 40) { + result = '0' + result; + } + result = getChecksumAddress('0x' + result); + } + else { + errors.throwError('invalid address', errors.INVALID_ARGUMENT, { arg: 'address', value: address }); + } + return result; +} +exports.getAddress = getAddress; +function getIcapAddress(address) { + var base36 = (new bn_js_1.default.BN(getAddress(address).substring(2), 16)).toString(36).toUpperCase(); + while (base36.length < 30) { + base36 = '0' + base36; + } + return 'XE' + ibanChecksum('XE00' + base36) + base36; +} +exports.getIcapAddress = getIcapAddress; +// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed +function getContractAddress(transaction) { + if (!transaction.from) { + throw new Error('missing from address'); + } + var nonce = transaction.nonce; + return getAddress('0x' + keccak256_1.keccak256(rlp_1.encode([ + getAddress(transaction.from), + bytes_1.stripZeros(bytes_1.hexlify(nonce)) + ])).substring(26)); +} +exports.getContractAddress = getContractAddress; + +},{"./bytes":146,"./errors":147,"./keccak256":148,"./rlp":150,"bn.js":53}],145:[function(require,module,exports){ +'use strict'; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * BigNumber + * + * A wrapper around the BN.js object. We use the BN.js library + * because it is used by elliptic, so it is required regardles. + * + */ +var bn_js_1 = __importDefault(require("bn.js")); +var bytes_1 = require("./bytes"); +var properties_1 = require("./properties"); +var types_1 = require("./types"); +var errors = __importStar(require("./errors")); +var BN_1 = new bn_js_1.default.BN(-1); +function toHex(bn) { + var value = bn.toString(16); + if (value[0] === '-') { + if ((value.length % 2) === 0) { + return '-0x0' + value.substring(1); + } + return "-0x" + value.substring(1); + } + if ((value.length % 2) === 1) { + return '0x0' + value; + } + return '0x' + value; +} +function toBN(value) { + return bigNumberify(value)._bn; +} +function toBigNumber(bn) { + return new BigNumber(toHex(bn)); +} +var BigNumber = /** @class */ (function (_super) { + __extends(BigNumber, _super); + function BigNumber(value) { + var _this = _super.call(this) || this; + errors.checkNew(_this, BigNumber); + if (typeof (value) === 'string') { + if (bytes_1.isHexString(value)) { + if (value == '0x') { + value = '0x0'; + } + properties_1.defineReadOnly(_this, '_hex', value); + } + else if (value[0] === '-' && bytes_1.isHexString(value.substring(1))) { + properties_1.defineReadOnly(_this, '_hex', value); + } + else if (value.match(/^-?[0-9]*$/)) { + if (value == '') { + value = '0'; + } + properties_1.defineReadOnly(_this, '_hex', toHex(new bn_js_1.default.BN(value))); + } + else { + errors.throwError('invalid BigNumber string value', errors.INVALID_ARGUMENT, { arg: 'value', value: value }); + } + } + else if (typeof (value) === 'number') { + if (parseInt(String(value)) !== value) { + errors.throwError('underflow', errors.NUMERIC_FAULT, { operation: 'setValue', fault: 'underflow', value: value, outputValue: parseInt(String(value)) }); + } + try { + properties_1.defineReadOnly(_this, '_hex', toHex(new bn_js_1.default.BN(value))); + } + catch (error) { + errors.throwError('overflow', errors.NUMERIC_FAULT, { operation: 'setValue', fault: 'overflow', details: error.message }); + } + } + else if (value instanceof BigNumber) { + properties_1.defineReadOnly(_this, '_hex', value._hex); + } + else if (value.toHexString) { + properties_1.defineReadOnly(_this, '_hex', toHex(toBN(value.toHexString()))); + } + else if (bytes_1.isArrayish(value)) { + properties_1.defineReadOnly(_this, '_hex', toHex(new bn_js_1.default.BN(bytes_1.hexlify(value).substring(2), 16))); + } + else { + errors.throwError('invalid BigNumber value', errors.INVALID_ARGUMENT, { arg: 'value', value: value }); + } + return _this; + } + Object.defineProperty(BigNumber.prototype, "_bn", { + get: function () { + if (this._hex[0] === '-') { + return (new bn_js_1.default.BN(this._hex.substring(3), 16)).mul(BN_1); + } + return new bn_js_1.default.BN(this._hex.substring(2), 16); + }, + enumerable: true, + configurable: true + }); + BigNumber.prototype.fromTwos = function (value) { + return toBigNumber(this._bn.fromTwos(value)); + }; + BigNumber.prototype.toTwos = function (value) { + return toBigNumber(this._bn.toTwos(value)); + }; + BigNumber.prototype.add = function (other) { + return toBigNumber(this._bn.add(toBN(other))); + }; + BigNumber.prototype.sub = function (other) { + return toBigNumber(this._bn.sub(toBN(other))); + }; + BigNumber.prototype.div = function (other) { + var o = bigNumberify(other); + if (o.isZero()) { + errors.throwError('division by zero', errors.NUMERIC_FAULT, { operation: 'divide', fault: 'division by zero' }); + } + return toBigNumber(this._bn.div(toBN(other))); + }; + BigNumber.prototype.mul = function (other) { + return toBigNumber(this._bn.mul(toBN(other))); + }; + BigNumber.prototype.mod = function (other) { + return toBigNumber(this._bn.mod(toBN(other))); + }; + BigNumber.prototype.pow = function (other) { + return toBigNumber(this._bn.pow(toBN(other))); + }; + BigNumber.prototype.maskn = function (value) { + return toBigNumber(this._bn.maskn(value)); + }; + BigNumber.prototype.eq = function (other) { + return this._bn.eq(toBN(other)); + }; + BigNumber.prototype.lt = function (other) { + return this._bn.lt(toBN(other)); + }; + BigNumber.prototype.lte = function (other) { + return this._bn.lte(toBN(other)); + }; + BigNumber.prototype.gt = function (other) { + return this._bn.gt(toBN(other)); + }; + BigNumber.prototype.gte = function (other) { + return this._bn.gte(toBN(other)); + }; + BigNumber.prototype.isZero = function () { + return this._bn.isZero(); + }; + BigNumber.prototype.toNumber = function () { + try { + return this._bn.toNumber(); + } + catch (error) { + errors.throwError('overflow', errors.NUMERIC_FAULT, { operation: 'setValue', fault: 'overflow', details: error.message }); + } + return null; + }; + BigNumber.prototype.toString = function () { + return this._bn.toString(10); + }; + BigNumber.prototype.toHexString = function () { + return this._hex; + }; + return BigNumber; +}(types_1.BigNumber)); +function bigNumberify(value) { + if (value instanceof BigNumber) { + return value; + } + return new BigNumber(value); +} +exports.bigNumberify = bigNumberify; +exports.ConstantNegativeOne = bigNumberify(-1); +exports.ConstantZero = bigNumberify(0); +exports.ConstantOne = bigNumberify(1); +exports.ConstantTwo = bigNumberify(2); +exports.ConstantWeiPerEther = bigNumberify('1000000000000000000'); + +},{"./bytes":146,"./errors":147,"./properties":149,"./types":151,"bn.js":53}],146:[function(require,module,exports){ +"use strict"; +/** + * Conversion Utilities + * + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var errors = require("./errors"); +exports.AddressZero = '0x0000000000000000000000000000000000000000'; +exports.HashZero = '0x0000000000000000000000000000000000000000000000000000000000000000'; +function isBigNumber(value) { + return !!value._bn; +} +function addSlice(array) { + if (array.slice) { + return array; + } + array.slice = function () { + var args = Array.prototype.slice.call(arguments); + return new Uint8Array(Array.prototype.slice.apply(array, args)); + }; + return array; +} +function isArrayish(value) { + if (!value || parseInt(String(value.length)) != value.length || typeof (value) === 'string') { + return false; + } + for (var i = 0; i < value.length; i++) { + var v = value[i]; + if (v < 0 || v >= 256 || parseInt(String(v)) != v) { + return false; + } + } + return true; +} +exports.isArrayish = isArrayish; +function arrayify(value) { + if (value == null) { + errors.throwError('cannot convert null value to array', errors.INVALID_ARGUMENT, { arg: 'value', value: value }); + } + if (isBigNumber(value)) { + value = value.toHexString(); + } + if (typeof (value) === 'string') { + var match = value.match(/^(0x)?[0-9a-fA-F]*$/); + if (!match) { + errors.throwError('invalid hexidecimal string', errors.INVALID_ARGUMENT, { arg: 'value', value: value }); + } + if (match[1] !== '0x') { + errors.throwError('hex string must have 0x prefix', errors.INVALID_ARGUMENT, { arg: 'value', value: value }); + } + value = value.substring(2); + if (value.length % 2) { + value = '0' + value; + } + var result = []; + for (var i = 0; i < value.length; i += 2) { + result.push(parseInt(value.substr(i, 2), 16)); + } + return addSlice(new Uint8Array(result)); + } + else if (typeof (value) === 'string') { + } + if (isArrayish(value)) { + return addSlice(new Uint8Array(value)); + } + errors.throwError('invalid arrayify value', null, { arg: 'value', value: value, type: typeof (value) }); + return null; +} +exports.arrayify = arrayify; +function concat(objects) { + var arrays = []; + var length = 0; + for (var i = 0; i < objects.length; i++) { + var object = arrayify(objects[i]); + arrays.push(object); + length += object.length; + } + var result = new Uint8Array(length); + var offset = 0; + for (var i = 0; i < arrays.length; i++) { + result.set(arrays[i], offset); + offset += arrays[i].length; + } + return addSlice(result); +} +exports.concat = concat; +function stripZeros(value) { + var result = arrayify(value); + if (result.length === 0) { + return result; + } + // Find the first non-zero entry + var start = 0; + while (result[start] === 0) { + start++; + } + // If we started with zeros, strip them + if (start) { + result = result.slice(start); + } + return result; +} +exports.stripZeros = stripZeros; +function padZeros(value, length) { + value = arrayify(value); + if (length < value.length) { + throw new Error('cannot pad'); + } + var result = new Uint8Array(length); + result.set(value, length - value.length); + return addSlice(result); +} +exports.padZeros = padZeros; +function isHexString(value, length) { + if (typeof (value) !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/)) { + return false; + } + if (length && value.length !== 2 + 2 * length) { + return false; + } + return true; +} +exports.isHexString = isHexString; +var HexCharacters = '0123456789abcdef'; +function hexlify(value) { + if (isBigNumber(value)) { + return value.toHexString(); + } + if (typeof (value) === 'number') { + if (value < 0) { + errors.throwError('cannot hexlify negative value', errors.INVALID_ARGUMENT, { arg: 'value', value: value }); + } + var hex = ''; + while (value) { + hex = HexCharacters[value & 0x0f] + hex; + value = Math.floor(value / 16); + } + if (hex.length) { + if (hex.length % 2) { + hex = '0' + hex; + } + return '0x' + hex; + } + return '0x00'; + } + if (typeof (value) === 'string') { + var match = value.match(/^(0x)?[0-9a-fA-F]*$/); + if (!match) { + errors.throwError('invalid hexidecimal string', errors.INVALID_ARGUMENT, { arg: 'value', value: value }); + } + if (match[1] !== '0x') { + errors.throwError('hex string must have 0x prefix', errors.INVALID_ARGUMENT, { arg: 'value', value: value }); + } + if (value.length % 2) { + value = '0x0' + value.substring(2); + } + return value; + } + if (isArrayish(value)) { + var result = []; + for (var i = 0; i < value.length; i++) { + var v = value[i]; + result.push(HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f]); + } + return '0x' + result.join(''); + } + errors.throwError('invalid hexlify value', null, { arg: 'value', value: value }); + return 'never'; +} +exports.hexlify = hexlify; +function hexDataLength(data) { + if (!isHexString(data) || (data.length % 2) !== 0) { + return null; + } + return (data.length - 2) / 2; +} +exports.hexDataLength = hexDataLength; +function hexDataSlice(data, offset, length) { + if (!isHexString(data)) { + errors.throwError('invalid hex data', errors.INVALID_ARGUMENT, { arg: 'value', value: data }); + } + if ((data.length % 2) !== 0) { + errors.throwError('hex data length must be even', errors.INVALID_ARGUMENT, { arg: 'value', value: data }); + } + offset = 2 + 2 * offset; + if (length != null) { + return '0x' + data.substring(offset, offset + 2 * length); + } + return '0x' + data.substring(offset); +} +exports.hexDataSlice = hexDataSlice; +function hexStripZeros(value) { + if (!isHexString(value)) { + errors.throwError('invalid hex string', errors.INVALID_ARGUMENT, { arg: 'value', value: value }); + } + while (value.length > 3 && value.substring(0, 3) === '0x0') { + value = '0x' + value.substring(3); + } + return value; +} +exports.hexStripZeros = hexStripZeros; +function hexZeroPad(value, length) { + if (!isHexString(value)) { + errors.throwError('invalid hex string', errors.INVALID_ARGUMENT, { arg: 'value', value: value }); + } + while (value.length < 2 * length + 2) { + value = '0x0' + value.substring(2); + } + return value; +} +exports.hexZeroPad = hexZeroPad; +function isSignature(value) { + return (value && value.r != null && value.s != null); +} +function splitSignature(signature) { + var v = 0; + var r = '0x', s = '0x'; + if (isSignature(signature)) { + if (signature.v == null && signature.recoveryParam == null) { + errors.throwError('at least on of recoveryParam or v must be specified', errors.INVALID_ARGUMENT, { argument: 'signature', value: signature }); + } + r = hexZeroPad(signature.r, 32); + s = hexZeroPad(signature.s, 32); + v = signature.v; + if (typeof (v) === 'string') { + v = parseInt(v, 16); + } + var recoveryParam = signature.recoveryParam; + if (recoveryParam == null && signature.v != null) { + recoveryParam = 1 - (v % 2); + } + v = 27 + recoveryParam; + } + else { + var bytes = arrayify(signature); + if (bytes.length !== 65) { + throw new Error('invalid signature'); + } + r = hexlify(bytes.slice(0, 32)); + s = hexlify(bytes.slice(32, 64)); + v = bytes[64]; + if (v !== 27 && v !== 28) { + v = 27 + (v % 2); + } + } + return { + r: r, + s: s, + recoveryParam: (v - 27), + v: v + }; +} +exports.splitSignature = splitSignature; +function joinSignature(signature) { + signature = splitSignature(signature); + return hexlify(concat([ + signature.r, + signature.s, + (signature.recoveryParam ? '0x1c' : '0x1b') + ])); +} +exports.joinSignature = joinSignature; + +},{"./errors":147}],147:[function(require,module,exports){ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +// Unknown Error +exports.UNKNOWN_ERROR = 'UNKNOWN_ERROR'; +// Not implemented +exports.NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; +// Missing new operator to an object +// - name: The name of the class +exports.MISSING_NEW = 'MISSING_NEW'; +// Call exception +// - transaction: the transaction +// - address?: the contract address +// - args?: The arguments passed into the function +// - method?: The Solidity method signature +// - errorSignature?: The EIP848 error signature +// - errorArgs?: The EIP848 error parameters +// - reason: The reason (only for EIP848 "Error(string)") +exports.CALL_EXCEPTION = 'CALL_EXCEPTION'; +// Response from a server was invalid +// - response: The body of the response +//'BAD_RESPONSE', +// Invalid argument (e.g. value is incompatible with type) to a function: +// - arg: The argument name that was invalid +// - value: The value of the argument +exports.INVALID_ARGUMENT = 'INVALID_ARGUMENT'; +// Missing argument to a function: +// - count: The number of arguments received +// - expectedCount: The number of arguments expected +exports.MISSING_ARGUMENT = 'MISSING_ARGUMENT'; +// Too many arguments +// - count: The number of arguments received +// - expectedCount: The number of arguments expected +exports.UNEXPECTED_ARGUMENT = 'UNEXPECTED_ARGUMENT'; +// Numeric Fault +// - operation: the operation being executed +// - fault: the reason this faulted +exports.NUMERIC_FAULT = 'NUMERIC_FAULT'; +// Unsupported operation +// - operation +exports.UNSUPPORTED_OPERATION = 'UNSUPPORTED_OPERATION'; +var _permanentCensorErrors = false; +var _censorErrors = false; +// @TODO: Enum +function throwError(message, code, params) { + if (_censorErrors) { + throw new Error('unknown error'); + } + if (!code) { + code = exports.UNKNOWN_ERROR; + } + if (!params) { + params = {}; + } + var messageDetails = []; + Object.keys(params).forEach(function (key) { + try { + messageDetails.push(key + '=' + JSON.stringify(params[key])); + } + catch (error) { + messageDetails.push(key + '=' + JSON.stringify(params[key].toString())); + } + }); + var reason = message; + if (messageDetails.length) { + message += ' (' + messageDetails.join(', ') + ')'; + } + // @TODO: Any?? + var error = new Error(message); + error.reason = reason; + error.code = code; + Object.keys(params).forEach(function (key) { + error[key] = params[key]; + }); + throw error; +} +exports.throwError = throwError; +function checkNew(self, kind) { + if (!(self instanceof kind)) { + throwError('missing new', exports.MISSING_NEW, { name: kind.name }); + } +} +exports.checkNew = checkNew; +function checkArgumentCount(count, expectedCount, suffix) { + if (!suffix) { + suffix = ''; + } + if (count < expectedCount) { + throwError('missing argument' + suffix, exports.MISSING_ARGUMENT, { count: count, expectedCount: expectedCount }); + } + if (count > expectedCount) { + throwError('too many arguments' + suffix, exports.UNEXPECTED_ARGUMENT, { count: count, expectedCount: expectedCount }); + } +} +exports.checkArgumentCount = checkArgumentCount; +function setCensorship(censorship, permanent) { + if (_permanentCensorErrors) { + throwError('error censorship permanent', exports.UNSUPPORTED_OPERATION, { operation: 'setCersorship' }); + } + _censorErrors = !!censorship; + _permanentCensorErrors = !!permanent; +} +exports.setCensorship = setCensorship; + +},{}],148:[function(require,module,exports){ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +var sha3 = require("js-sha3"); +var bytes_1 = require("./bytes"); +function keccak256(data) { + return '0x' + sha3.keccak_256(bytes_1.arrayify(data)); +} +exports.keccak256 = keccak256; + +},{"./bytes":146,"js-sha3":142}],149:[function(require,module,exports){ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +function defineReadOnly(object, name, value) { + Object.defineProperty(object, name, { + enumerable: true, + value: value, + writable: false, + }); +} +exports.defineReadOnly = defineReadOnly; +function defineFrozen(object, name, value) { + var frozen = JSON.stringify(value); + Object.defineProperty(object, name, { + enumerable: true, + get: function () { return JSON.parse(frozen); } + }); +} +exports.defineFrozen = defineFrozen; +function resolveProperties(object) { + var result = {}; + var promises = []; + Object.keys(object).forEach(function (key) { + var value = object[key]; + if (value instanceof Promise) { + promises.push(value.then(function (value) { + result[key] = value; + return null; + })); + } + else { + result[key] = value; + } + }); + return Promise.all(promises).then(function () { + return result; + }); +} +exports.resolveProperties = resolveProperties; +function shallowCopy(object) { + var result = {}; + for (var key in object) { + result[key] = object[key]; + } + return result; +} +exports.shallowCopy = shallowCopy; +function jsonCopy(object) { + return JSON.parse(JSON.stringify(object)); +} +exports.jsonCopy = jsonCopy; + +},{}],150:[function(require,module,exports){ +"use strict"; +//See: https://github.com/ethereum/wiki/wiki/RLP +Object.defineProperty(exports, "__esModule", { value: true }); +var bytes_1 = require("./bytes"); +function arrayifyInteger(value) { + var result = []; + while (value) { + result.unshift(value & 0xff); + value >>= 8; + } + return result; +} +function unarrayifyInteger(data, offset, length) { + var result = 0; + for (var i = 0; i < length; i++) { + result = (result * 256) + data[offset + i]; + } + return result; +} +function _encode(object) { + if (Array.isArray(object)) { + var payload = []; + object.forEach(function (child) { + payload = payload.concat(_encode(child)); + }); + if (payload.length <= 55) { + payload.unshift(0xc0 + payload.length); + return payload; + } + var length = arrayifyInteger(payload.length); + length.unshift(0xf7 + length.length); + return length.concat(payload); + } + var data = Array.prototype.slice.call(bytes_1.arrayify(object)); + if (data.length === 1 && data[0] <= 0x7f) { + return data; + } + else if (data.length <= 55) { + data.unshift(0x80 + data.length); + return data; + } + var length = arrayifyInteger(data.length); + length.unshift(0xb7 + length.length); + return length.concat(data); +} +function encode(object) { + return bytes_1.hexlify(_encode(object)); +} +exports.encode = encode; +function _decodeChildren(data, offset, childOffset, length) { + var result = []; + while (childOffset < offset + 1 + length) { + var decoded = _decode(data, childOffset); + result.push(decoded.result); + childOffset += decoded.consumed; + if (childOffset > offset + 1 + length) { + throw new Error('invalid rlp'); + } + } + return { consumed: (1 + length), result: result }; +} +// returns { consumed: number, result: Object } +function _decode(data, offset) { + if (data.length === 0) { + throw new Error('invalid rlp data'); + } + // Array with extra length prefix + if (data[offset] >= 0xf8) { + var lengthLength = data[offset] - 0xf7; + if (offset + 1 + lengthLength > data.length) { + throw new Error('too short'); + } + var length = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length > data.length) { + throw new Error('to short'); + } + return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length); + } + else if (data[offset] >= 0xc0) { + var length = data[offset] - 0xc0; + if (offset + 1 + length > data.length) { + throw new Error('invalid rlp data'); + } + return _decodeChildren(data, offset, offset + 1, length); + } + else if (data[offset] >= 0xb8) { + var lengthLength = data[offset] - 0xb7; + if (offset + 1 + lengthLength > data.length) { + throw new Error('invalid rlp data'); + } + var length = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length > data.length) { + throw new Error('invalid rlp data'); + } + var result = bytes_1.hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length)); + return { consumed: (1 + lengthLength + length), result: result }; + } + else if (data[offset] >= 0x80) { + var length = data[offset] - 0x80; + if (offset + 1 + length > data.length) { + throw new Error('invlaid rlp data'); + } + var result = bytes_1.hexlify(data.slice(offset + 1, offset + 1 + length)); + return { consumed: (1 + length), result: result }; + } + return { consumed: 1, result: bytes_1.hexlify(data[offset]) }; +} +function decode(data) { + var bytes = bytes_1.arrayify(data); + var decoded = _decode(bytes, 0); + if (decoded.consumed !== bytes.length) { + throw new Error('invalid rlp data'); + } + return decoded.result; +} +exports.decode = decode; + +},{"./bytes":146}],151:[function(require,module,exports){ +"use strict"; +/////////////////////////////// +// Bytes +Object.defineProperty(exports, "__esModule", { value: true }); +/////////////////////////////// +// BigNumber +var BigNumber = /** @class */ (function () { + function BigNumber() { + } + return BigNumber; +}()); +exports.BigNumber = BigNumber; +; +; +; +/////////////////////////////// +// Interface +var Indexed = /** @class */ (function () { + function Indexed() { + } + return Indexed; +}()); +exports.Indexed = Indexed; +/** + * Provider + * + * Note: We use an abstract class so we can use instanceof to determine if an + * object is a Provider. + */ +var MinimalProvider = /** @class */ (function () { + function MinimalProvider() { + } + return MinimalProvider; +}()); +exports.MinimalProvider = MinimalProvider; +/** + * Signer + * + * Note: We use an abstract class so we can use instanceof to determine if an + * object is a Signer. + */ +var Signer = /** @class */ (function () { + function Signer() { + } + return Signer; +}()); +exports.Signer = Signer; +/////////////////////////////// +// HDNode +var HDNode = /** @class */ (function () { + function HDNode() { + } + return HDNode; +}()); +exports.HDNode = HDNode; + +},{}],152:[function(require,module,exports){ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +var bytes_1 = require("./bytes"); +var UnicodeNormalizationForm; +(function (UnicodeNormalizationForm) { + UnicodeNormalizationForm["current"] = ""; + UnicodeNormalizationForm["NFC"] = "NFC"; + UnicodeNormalizationForm["NFD"] = "NFD"; + UnicodeNormalizationForm["NFKC"] = "NFKC"; + UnicodeNormalizationForm["NFKD"] = "NFKD"; +})(UnicodeNormalizationForm = exports.UnicodeNormalizationForm || (exports.UnicodeNormalizationForm = {})); +; +// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array +function toUtf8Bytes(str, form) { + if (form === void 0) { form = UnicodeNormalizationForm.current; } + if (form != UnicodeNormalizationForm.current) { + str = str.normalize(form); + } + var result = []; + var offset = 0; + for (var i = 0; i < str.length; i++) { + var c = str.charCodeAt(i); + if (c < 128) { + result[offset++] = c; + } + else if (c < 2048) { + result[offset++] = (c >> 6) | 192; + result[offset++] = (c & 63) | 128; + } + else if (((c & 0xFC00) == 0xD800) && (i + 1) < str.length && ((str.charCodeAt(i + 1) & 0xFC00) == 0xDC00)) { + // Surrogate Pair + c = 0x10000 + ((c & 0x03FF) << 10) + (str.charCodeAt(++i) & 0x03FF); + result[offset++] = (c >> 18) | 240; + result[offset++] = ((c >> 12) & 63) | 128; + result[offset++] = ((c >> 6) & 63) | 128; + result[offset++] = (c & 63) | 128; + } + else { + result[offset++] = (c >> 12) | 224; + result[offset++] = ((c >> 6) & 63) | 128; + result[offset++] = (c & 63) | 128; + } + } + return bytes_1.arrayify(result); +} +exports.toUtf8Bytes = toUtf8Bytes; +; +// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499 +function toUtf8String(bytes) { + bytes = bytes_1.arrayify(bytes); + var result = ''; + var i = 0; + // Invalid bytes are ignored + while (i < bytes.length) { + var c = bytes[i++]; + if (c >> 7 == 0) { + // 0xxx xxxx + result += String.fromCharCode(c); + continue; + } + // Invalid starting byte + if (c >> 6 == 0x02) { + continue; + } + // Multibyte; how many bytes left for thus character? + var extraLength = null; + if (c >> 5 == 0x06) { + extraLength = 1; + } + else if (c >> 4 == 0x0e) { + extraLength = 2; + } + else if (c >> 3 == 0x1e) { + extraLength = 3; + } + else if (c >> 2 == 0x3e) { + extraLength = 4; + } + else if (c >> 1 == 0x7e) { + extraLength = 5; + } + else { + continue; + } + // Do we have enough bytes in our data? + if (i + extraLength > bytes.length) { + // If there is an invalid unprocessed byte, try to continue + for (; i < bytes.length; i++) { + if (bytes[i] >> 6 != 0x02) { + break; + } + } + if (i != bytes.length) + continue; + // All leftover bytes are valid. + return result; + } + // Remove the UTF-8 prefix from the char (res) + var res = c & ((1 << (8 - extraLength - 1)) - 1); + var count; + for (count = 0; count < extraLength; count++) { + var nextChar = bytes[i++]; + // Is the char valid multibyte part? + if (nextChar >> 6 != 0x02) { + break; + } + ; + res = (res << 6) | (nextChar & 0x3f); + } + if (count != extraLength) { + i--; + continue; + } + if (res <= 0xffff) { + result += String.fromCharCode(res); + continue; + } + res -= 0x10000; + result += String.fromCharCode(((res >> 10) & 0x3ff) + 0xd800, (res & 0x3ff) + 0xdc00); + } + return result; +} +exports.toUtf8String = toUtf8String; + +},{"./bytes":146}],153:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var numberToBN = require('number-to-bn'); + +var zero = new BN(0); +var negative1 = new BN(-1); + +// complete ethereum unit map +var unitMap = { + 'noether': '0', // eslint-disable-line + 'wei': '1', // eslint-disable-line + 'kwei': '1000', // eslint-disable-line + 'Kwei': '1000', // eslint-disable-line + 'babbage': '1000', // eslint-disable-line + 'femtoether': '1000', // eslint-disable-line + 'mwei': '1000000', // eslint-disable-line + 'Mwei': '1000000', // eslint-disable-line + 'lovelace': '1000000', // eslint-disable-line + 'picoether': '1000000', // eslint-disable-line + 'gwei': '1000000000', // eslint-disable-line + 'Gwei': '1000000000', // eslint-disable-line + 'shannon': '1000000000', // eslint-disable-line + 'nanoether': '1000000000', // eslint-disable-line + 'nano': '1000000000', // eslint-disable-line + 'szabo': '1000000000000', // eslint-disable-line + 'microether': '1000000000000', // eslint-disable-line + 'micro': '1000000000000', // eslint-disable-line + 'finney': '1000000000000000', // eslint-disable-line + 'milliether': '1000000000000000', // eslint-disable-line + 'milli': '1000000000000000', // eslint-disable-line + 'ether': '1000000000000000000', // eslint-disable-line + 'kether': '1000000000000000000000', // eslint-disable-line + 'grand': '1000000000000000000000', // eslint-disable-line + 'mether': '1000000000000000000000000', // eslint-disable-line + 'gether': '1000000000000000000000000000', // eslint-disable-line + 'tether': '1000000000000000000000000000000' }; + +/** + * Returns value of unit in Wei + * + * @method getValueOfUnit + * @param {String} unit the unit to convert to, default ether + * @returns {BigNumber} value of the unit (in Wei) + * @throws error if the unit is not correct:w + */ +function getValueOfUnit(unitInput) { + var unit = unitInput ? unitInput.toLowerCase() : 'ether'; + var unitValue = unitMap[unit]; // eslint-disable-line + + if (typeof unitValue !== 'string') { + throw new Error('[ethjs-unit] the unit provided ' + unitInput + ' doesn\'t exists, please use the one of the following units ' + JSON.stringify(unitMap, null, 2)); + } + + return new BN(unitValue, 10); +} + +function numberToString(arg) { + if (typeof arg === 'string') { + if (!arg.match(/^-?[0-9.]+$/)) { + throw new Error('while converting number to string, invalid number value \'' + arg + '\', should be a number matching (^-?[0-9.]+).'); + } + return arg; + } else if (typeof arg === 'number') { + return String(arg); + } else if (typeof arg === 'object' && arg.toString && (arg.toTwos || arg.dividedToIntegerBy)) { + if (arg.toPrecision) { + return String(arg.toPrecision()); + } else { + // eslint-disable-line + return arg.toString(10); + } + } + throw new Error('while converting number to string, invalid number value \'' + arg + '\' type ' + typeof arg + '.'); +} + +function fromWei(weiInput, unit, optionsInput) { + var wei = numberToBN(weiInput); // eslint-disable-line + var negative = wei.lt(zero); // eslint-disable-line + var base = getValueOfUnit(unit); + var baseLength = unitMap[unit].length - 1 || 1; + var options = optionsInput || {}; + + if (negative) { + wei = wei.mul(negative1); + } + + var fraction = wei.mod(base).toString(10); // eslint-disable-line + + while (fraction.length < baseLength) { + fraction = '0' + fraction; + } + + if (!options.pad) { + fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1]; + } + + var whole = wei.div(base).toString(10); // eslint-disable-line + + if (options.commify) { + whole = whole.replace(/\B(?=(\d{3})+(?!\d))/g, ','); + } + + var value = '' + whole + (fraction == '0' ? '' : '.' + fraction); // eslint-disable-line + + if (negative) { + value = '-' + value; + } + + return value; +} + +function toWei(etherInput, unit) { + var ether = numberToString(etherInput); // eslint-disable-line + var base = getValueOfUnit(unit); + var baseLength = unitMap[unit].length - 1 || 1; + + // Is it negative? + var negative = ether.substring(0, 1) === '-'; // eslint-disable-line + if (negative) { + ether = ether.substring(1); + } + + if (ether === '.') { + throw new Error('[ethjs-unit] while converting number ' + etherInput + ' to wei, invalid value'); + } + + // Split it into a whole and fractional part + var comps = ether.split('.'); // eslint-disable-line + if (comps.length > 2) { + throw new Error('[ethjs-unit] while converting number ' + etherInput + ' to wei, too many decimal points'); + } + + var whole = comps[0], + fraction = comps[1]; // eslint-disable-line + + if (!whole) { + whole = '0'; + } + if (!fraction) { + fraction = '0'; + } + if (fraction.length > baseLength) { + throw new Error('[ethjs-unit] while converting number ' + etherInput + ' to wei, too many decimal places'); + } + + while (fraction.length < baseLength) { + fraction += '0'; + } + + whole = new BN(whole); + fraction = new BN(fraction); + var wei = whole.mul(base).add(fraction); // eslint-disable-line + + if (negative) { + wei = wei.mul(negative1); + } + + return new BN(wei.toString(10), 10); +} + +module.exports = { + unitMap: unitMap, + numberToString: numberToString, + getValueOfUnit: getValueOfUnit, + fromWei: fromWei, + toWei: toWei +}; +},{"bn.js":154,"number-to-bn":237}],154:[function(require,module,exports){ +(function (module, exports) { + 'use strict'; + + // Utils + function assert (val, msg) { + if (!val) throw new Error(msg || 'Assertion failed'); + } + + // Could use `inherits` module, but don't want to move from single file + // architecture yet. + function inherits (ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + + // BN + + function BN (number, base, endian) { + if (BN.isBN(number)) { + return number; + } + + this.negative = 0; + this.words = null; + this.length = 0; + + // Reduction context + this.red = null; + + if (number !== null) { + if (base === 'le' || base === 'be') { + endian = base; + base = 10; + } + + this._init(number || 0, base || 10, endian || 'be'); + } + } + if (typeof module === 'object') { + module.exports = BN; + } else { + exports.BN = BN; + } + + BN.BN = BN; + BN.wordSize = 26; + + var Buffer; + try { + Buffer = require('buf' + 'fer').Buffer; + } catch (e) { + } + + BN.isBN = function isBN (num) { + if (num instanceof BN) { + return true; + } + + return num !== null && typeof num === 'object' && + num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); + }; + + BN.max = function max (left, right) { + if (left.cmp(right) > 0) return left; + return right; + }; + + BN.min = function min (left, right) { + if (left.cmp(right) < 0) return left; + return right; + }; + + BN.prototype._init = function init (number, base, endian) { + if (typeof number === 'number') { + return this._initNumber(number, base, endian); + } + + if (typeof number === 'object') { + return this._initArray(number, base, endian); + } + + if (base === 'hex') { + base = 16; + } + assert(base === (base | 0) && base >= 2 && base <= 36); + + number = number.toString().replace(/\s+/g, ''); + var start = 0; + if (number[0] === '-') { + start++; + } + + if (base === 16) { + this._parseHex(number, start); + } else { + this._parseBase(number, base, start); + } + + if (number[0] === '-') { + this.negative = 1; + } + + this.strip(); + + if (endian !== 'le') return; + + this._initArray(this.toArray(), base, endian); + }; + + BN.prototype._initNumber = function _initNumber (number, base, endian) { + if (number < 0) { + this.negative = 1; + number = -number; + } + if (number < 0x4000000) { + this.words = [ number & 0x3ffffff ]; + this.length = 1; + } else if (number < 0x10000000000000) { + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff + ]; + this.length = 2; + } else { + assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff, + 1 + ]; + this.length = 3; + } + + if (endian !== 'le') return; + + // Reverse the bytes + this._initArray(this.toArray(), base, endian); + }; + + BN.prototype._initArray = function _initArray (number, base, endian) { + // Perhaps a Uint8Array + assert(typeof number.length === 'number'); + if (number.length <= 0) { + this.words = [ 0 ]; + this.length = 1; + return this; + } + + this.length = Math.ceil(number.length / 3); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + var j, w; + var off = 0; + if (endian === 'be') { + for (i = number.length - 1, j = 0; i >= 0; i -= 3) { + w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } else if (endian === 'le') { + for (i = 0, j = 0; i < number.length; i += 3) { + w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } + return this.strip(); + }; + + function parseHex (str, start, end) { + var r = 0; + var len = Math.min(str.length, end); + for (var i = start; i < len; i++) { + var c = str.charCodeAt(i) - 48; + + r <<= 4; + + // 'a' - 'f' + if (c >= 49 && c <= 54) { + r |= c - 49 + 0xa; + + // 'A' - 'F' + } else if (c >= 17 && c <= 22) { + r |= c - 17 + 0xa; + + // '0' - '9' + } else { + r |= c & 0xf; + } + } + return r; + } + + BN.prototype._parseHex = function _parseHex (number, start) { + // Create possibly bigger array to ensure that it fits the number + this.length = Math.ceil((number.length - start) / 6); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + var j, w; + // Scan 24-bit chunks and add them to the number + var off = 0; + for (i = number.length - 6, j = 0; i >= start; i -= 6) { + w = parseHex(number, i, i + 6); + this.words[j] |= (w << off) & 0x3ffffff; + // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb + this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + if (i + 6 !== start) { + w = parseHex(number, start, i + 6); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; + } + this.strip(); + }; + + function parseBase (str, start, end, mul) { + var r = 0; + var len = Math.min(str.length, end); + for (var i = start; i < len; i++) { + var c = str.charCodeAt(i) - 48; + + r *= mul; + + // 'a' + if (c >= 49) { + r += c - 49 + 0xa; + + // 'A' + } else if (c >= 17) { + r += c - 17 + 0xa; + + // '0' - '9' + } else { + r += c; + } + } + return r; + } + + BN.prototype._parseBase = function _parseBase (number, base, start) { + // Initialize as zero + this.words = [ 0 ]; + this.length = 1; + + // Find length of limb in base + for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { + limbLen++; + } + limbLen--; + limbPow = (limbPow / base) | 0; + + var total = number.length - start; + var mod = total % limbLen; + var end = Math.min(total, total - mod) + start; + + var word = 0; + for (var i = start; i < end; i += limbLen) { + word = parseBase(number, i, i + limbLen, base); + + this.imuln(limbPow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + + if (mod !== 0) { + var pow = 1; + word = parseBase(number, i, number.length, base); + + for (i = 0; i < mod; i++) { + pow *= base; + } + + this.imuln(pow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + }; + + BN.prototype.copy = function copy (dest) { + dest.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + dest.words[i] = this.words[i]; + } + dest.length = this.length; + dest.negative = this.negative; + dest.red = this.red; + }; + + BN.prototype.clone = function clone () { + var r = new BN(null); + this.copy(r); + return r; + }; + + BN.prototype._expand = function _expand (size) { + while (this.length < size) { + this.words[this.length++] = 0; + } + return this; + }; + + // Remove leading `0` from `this` + BN.prototype.strip = function strip () { + while (this.length > 1 && this.words[this.length - 1] === 0) { + this.length--; + } + return this._normSign(); + }; + + BN.prototype._normSign = function _normSign () { + // -0 = 0 + if (this.length === 1 && this.words[0] === 0) { + this.negative = 0; + } + return this; + }; + + BN.prototype.inspect = function inspect () { + return (this.red ? ''; + }; + + /* + + var zeros = []; + var groupSizes = []; + var groupBases = []; + + var s = ''; + var i = -1; + while (++i < BN.wordSize) { + zeros[i] = s; + s += '0'; + } + groupSizes[0] = 0; + groupSizes[1] = 0; + groupBases[0] = 0; + groupBases[1] = 0; + var base = 2 - 1; + while (++base < 36 + 1) { + var groupSize = 0; + var groupBase = 1; + while (groupBase < (1 << BN.wordSize) / base) { + groupBase *= base; + groupSize += 1; + } + groupSizes[base] = groupSize; + groupBases[base] = groupBase; + } + + */ + + var zeros = [ + '', + '0', + '00', + '000', + '0000', + '00000', + '000000', + '0000000', + '00000000', + '000000000', + '0000000000', + '00000000000', + '000000000000', + '0000000000000', + '00000000000000', + '000000000000000', + '0000000000000000', + '00000000000000000', + '000000000000000000', + '0000000000000000000', + '00000000000000000000', + '000000000000000000000', + '0000000000000000000000', + '00000000000000000000000', + '000000000000000000000000', + '0000000000000000000000000' + ]; + + var groupSizes = [ + 0, 0, + 25, 16, 12, 11, 10, 9, 8, + 8, 7, 7, 7, 7, 6, 6, + 6, 6, 6, 6, 6, 5, 5, + 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5 + ]; + + var groupBases = [ + 0, 0, + 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, + 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, + 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, + 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, + 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 + ]; + + BN.prototype.toString = function toString (base, padding) { + base = base || 10; + padding = padding | 0 || 1; + + var out; + if (base === 16 || base === 'hex') { + out = ''; + var off = 0; + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = this.words[i]; + var word = (((w << off) | carry) & 0xffffff).toString(16); + carry = (w >>> (24 - off)) & 0xffffff; + if (carry !== 0 || i !== this.length - 1) { + out = zeros[6 - word.length] + word + out; + } else { + out = word + out; + } + off += 2; + if (off >= 26) { + off -= 26; + i--; + } + } + if (carry !== 0) { + out = carry.toString(16) + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + if (base === (base | 0) && base >= 2 && base <= 36) { + // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); + var groupSize = groupSizes[base]; + // var groupBase = Math.pow(base, groupSize); + var groupBase = groupBases[base]; + out = ''; + var c = this.clone(); + c.negative = 0; + while (!c.isZero()) { + var r = c.modn(groupBase).toString(base); + c = c.idivn(groupBase); + + if (!c.isZero()) { + out = zeros[groupSize - r.length] + r + out; + } else { + out = r + out; + } + } + if (this.isZero()) { + out = '0' + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + assert(false, 'Base should be between 2 and 36'); + }; + + BN.prototype.toNumber = function toNumber () { + var ret = this.words[0]; + if (this.length === 2) { + ret += this.words[1] * 0x4000000; + } else if (this.length === 3 && this.words[2] === 0x01) { + // NOTE: at this stage it is known that the top bit is set + ret += 0x10000000000000 + (this.words[1] * 0x4000000); + } else if (this.length > 2) { + assert(false, 'Number can only safely store up to 53 bits'); + } + return (this.negative !== 0) ? -ret : ret; + }; + + BN.prototype.toJSON = function toJSON () { + return this.toString(16); + }; + + BN.prototype.toBuffer = function toBuffer (endian, length) { + assert(typeof Buffer !== 'undefined'); + return this.toArrayLike(Buffer, endian, length); + }; + + BN.prototype.toArray = function toArray (endian, length) { + return this.toArrayLike(Array, endian, length); + }; + + BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { + var byteLength = this.byteLength(); + var reqLength = length || Math.max(1, byteLength); + assert(byteLength <= reqLength, 'byte array longer than desired length'); + assert(reqLength > 0, 'Requested array length <= 0'); + + this.strip(); + var littleEndian = endian === 'le'; + var res = new ArrayType(reqLength); + + var b, i; + var q = this.clone(); + if (!littleEndian) { + // Assume big-endian + for (i = 0; i < reqLength - byteLength; i++) { + res[i] = 0; + } + + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); + + res[reqLength - i - 1] = b; + } + } else { + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); + + res[i] = b; + } + + for (; i < reqLength; i++) { + res[i] = 0; + } + } + + return res; + }; + + if (Math.clz32) { + BN.prototype._countBits = function _countBits (w) { + return 32 - Math.clz32(w); + }; + } else { + BN.prototype._countBits = function _countBits (w) { + var t = w; + var r = 0; + if (t >= 0x1000) { + r += 13; + t >>>= 13; + } + if (t >= 0x40) { + r += 7; + t >>>= 7; + } + if (t >= 0x8) { + r += 4; + t >>>= 4; + } + if (t >= 0x02) { + r += 2; + t >>>= 2; + } + return r + t; + }; + } + + BN.prototype._zeroBits = function _zeroBits (w) { + // Short-cut + if (w === 0) return 26; + + var t = w; + var r = 0; + if ((t & 0x1fff) === 0) { + r += 13; + t >>>= 13; + } + if ((t & 0x7f) === 0) { + r += 7; + t >>>= 7; + } + if ((t & 0xf) === 0) { + r += 4; + t >>>= 4; + } + if ((t & 0x3) === 0) { + r += 2; + t >>>= 2; + } + if ((t & 0x1) === 0) { + r++; + } + return r; + }; + + // Return number of used bits in a BN + BN.prototype.bitLength = function bitLength () { + var w = this.words[this.length - 1]; + var hi = this._countBits(w); + return (this.length - 1) * 26 + hi; + }; + + function toBitArray (num) { + var w = new Array(num.bitLength()); + + for (var bit = 0; bit < w.length; bit++) { + var off = (bit / 26) | 0; + var wbit = bit % 26; + + w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; + } + + return w; + } + + // Number of trailing zero bits + BN.prototype.zeroBits = function zeroBits () { + if (this.isZero()) return 0; + + var r = 0; + for (var i = 0; i < this.length; i++) { + var b = this._zeroBits(this.words[i]); + r += b; + if (b !== 26) break; + } + return r; + }; + + BN.prototype.byteLength = function byteLength () { + return Math.ceil(this.bitLength() / 8); + }; + + BN.prototype.toTwos = function toTwos (width) { + if (this.negative !== 0) { + return this.abs().inotn(width).iaddn(1); + } + return this.clone(); + }; + + BN.prototype.fromTwos = function fromTwos (width) { + if (this.testn(width - 1)) { + return this.notn(width).iaddn(1).ineg(); + } + return this.clone(); + }; + + BN.prototype.isNeg = function isNeg () { + return this.negative !== 0; + }; + + // Return negative clone of `this` + BN.prototype.neg = function neg () { + return this.clone().ineg(); + }; + + BN.prototype.ineg = function ineg () { + if (!this.isZero()) { + this.negative ^= 1; + } + + return this; + }; + + // Or `num` with `this` in-place + BN.prototype.iuor = function iuor (num) { + while (this.length < num.length) { + this.words[this.length++] = 0; + } + + for (var i = 0; i < num.length; i++) { + this.words[i] = this.words[i] | num.words[i]; + } + + return this.strip(); + }; + + BN.prototype.ior = function ior (num) { + assert((this.negative | num.negative) === 0); + return this.iuor(num); + }; + + // Or `num` with `this` + BN.prototype.or = function or (num) { + if (this.length > num.length) return this.clone().ior(num); + return num.clone().ior(this); + }; + + BN.prototype.uor = function uor (num) { + if (this.length > num.length) return this.clone().iuor(num); + return num.clone().iuor(this); + }; + + // And `num` with `this` in-place + BN.prototype.iuand = function iuand (num) { + // b = min-length(num, this) + var b; + if (this.length > num.length) { + b = num; + } else { + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = this.words[i] & num.words[i]; + } + + this.length = b.length; + + return this.strip(); + }; + + BN.prototype.iand = function iand (num) { + assert((this.negative | num.negative) === 0); + return this.iuand(num); + }; + + // And `num` with `this` + BN.prototype.and = function and (num) { + if (this.length > num.length) return this.clone().iand(num); + return num.clone().iand(this); + }; + + BN.prototype.uand = function uand (num) { + if (this.length > num.length) return this.clone().iuand(num); + return num.clone().iuand(this); + }; + + // Xor `num` with `this` in-place + BN.prototype.iuxor = function iuxor (num) { + // a.length > b.length + var a; + var b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = a.words[i] ^ b.words[i]; + } + + if (this !== a) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = a.length; + + return this.strip(); + }; + + BN.prototype.ixor = function ixor (num) { + assert((this.negative | num.negative) === 0); + return this.iuxor(num); + }; + + // Xor `num` with `this` + BN.prototype.xor = function xor (num) { + if (this.length > num.length) return this.clone().ixor(num); + return num.clone().ixor(this); + }; + + BN.prototype.uxor = function uxor (num) { + if (this.length > num.length) return this.clone().iuxor(num); + return num.clone().iuxor(this); + }; + + // Not ``this`` with ``width`` bitwidth + BN.prototype.inotn = function inotn (width) { + assert(typeof width === 'number' && width >= 0); + + var bytesNeeded = Math.ceil(width / 26) | 0; + var bitsLeft = width % 26; + + // Extend the buffer with leading zeroes + this._expand(bytesNeeded); + + if (bitsLeft > 0) { + bytesNeeded--; + } + + // Handle complete words + for (var i = 0; i < bytesNeeded; i++) { + this.words[i] = ~this.words[i] & 0x3ffffff; + } + + // Handle the residue + if (bitsLeft > 0) { + this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); + } + + // And remove leading zeroes + return this.strip(); + }; + + BN.prototype.notn = function notn (width) { + return this.clone().inotn(width); + }; + + // Set `bit` of `this` + BN.prototype.setn = function setn (bit, val) { + assert(typeof bit === 'number' && bit >= 0); + + var off = (bit / 26) | 0; + var wbit = bit % 26; + + this._expand(off + 1); + + if (val) { + this.words[off] = this.words[off] | (1 << wbit); + } else { + this.words[off] = this.words[off] & ~(1 << wbit); + } + + return this.strip(); + }; + + // Add `num` to `this` in-place + BN.prototype.iadd = function iadd (num) { + var r; + + // negative + positive + if (this.negative !== 0 && num.negative === 0) { + this.negative = 0; + r = this.isub(num); + this.negative ^= 1; + return this._normSign(); + + // positive + negative + } else if (this.negative === 0 && num.negative !== 0) { + num.negative = 0; + r = this.isub(num); + num.negative = 1; + return r._normSign(); + } + + // a.length > b.length + var a, b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) + (b.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + + this.length = a.length; + if (carry !== 0) { + this.words[this.length] = carry; + this.length++; + // Copy the rest of the words + } else if (a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + return this; + }; + + // Add `num` to `this` + BN.prototype.add = function add (num) { + var res; + if (num.negative !== 0 && this.negative === 0) { + num.negative = 0; + res = this.sub(num); + num.negative ^= 1; + return res; + } else if (num.negative === 0 && this.negative !== 0) { + this.negative = 0; + res = num.sub(this); + this.negative = 1; + return res; + } + + if (this.length > num.length) return this.clone().iadd(num); + + return num.clone().iadd(this); + }; + + // Subtract `num` from `this` in-place + BN.prototype.isub = function isub (num) { + // this - (-num) = this + num + if (num.negative !== 0) { + num.negative = 0; + var r = this.iadd(num); + num.negative = 1; + return r._normSign(); + + // -this - num = -(this + num) + } else if (this.negative !== 0) { + this.negative = 0; + this.iadd(num); + this.negative = 1; + return this._normSign(); + } + + // At this point both numbers are positive + var cmp = this.cmp(num); + + // Optimization - zeroify + if (cmp === 0) { + this.negative = 0; + this.length = 1; + this.words[0] = 0; + return this; + } + + // a > b + var a, b; + if (cmp > 0) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) - (b.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + + // Copy rest of the words + if (carry === 0 && i < a.length && a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = Math.max(this.length, i); + + if (a !== this) { + this.negative = 1; + } + + return this.strip(); + }; + + // Subtract `num` from `this` + BN.prototype.sub = function sub (num) { + return this.clone().isub(num); + }; + + function smallMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + var len = (self.length + num.length) | 0; + out.length = len; + len = (len - 1) | 0; + + // Peel one iteration (compiler can't do it, because of code complexity) + var a = self.words[0] | 0; + var b = num.words[0] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + var carry = (r / 0x4000000) | 0; + out.words[0] = lo; + + for (var k = 1; k < len; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = carry >>> 26; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = (k - j) | 0; + a = self.words[i] | 0; + b = num.words[j] | 0; + r = a * b + rword; + ncarry += (r / 0x4000000) | 0; + rword = r & 0x3ffffff; + } + out.words[k] = rword | 0; + carry = ncarry | 0; + } + if (carry !== 0) { + out.words[k] = carry | 0; + } else { + out.length--; + } + + return out.strip(); + } + + // TODO(indutny): it may be reasonable to omit it for users who don't need + // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit + // multiplication (like elliptic secp256k1). + var comb10MulTo = function comb10MulTo (self, num, out) { + var a = self.words; + var b = num.words; + var o = out.words; + var c = 0; + var lo; + var mid; + var hi; + var a0 = a[0] | 0; + var al0 = a0 & 0x1fff; + var ah0 = a0 >>> 13; + var a1 = a[1] | 0; + var al1 = a1 & 0x1fff; + var ah1 = a1 >>> 13; + var a2 = a[2] | 0; + var al2 = a2 & 0x1fff; + var ah2 = a2 >>> 13; + var a3 = a[3] | 0; + var al3 = a3 & 0x1fff; + var ah3 = a3 >>> 13; + var a4 = a[4] | 0; + var al4 = a4 & 0x1fff; + var ah4 = a4 >>> 13; + var a5 = a[5] | 0; + var al5 = a5 & 0x1fff; + var ah5 = a5 >>> 13; + var a6 = a[6] | 0; + var al6 = a6 & 0x1fff; + var ah6 = a6 >>> 13; + var a7 = a[7] | 0; + var al7 = a7 & 0x1fff; + var ah7 = a7 >>> 13; + var a8 = a[8] | 0; + var al8 = a8 & 0x1fff; + var ah8 = a8 >>> 13; + var a9 = a[9] | 0; + var al9 = a9 & 0x1fff; + var ah9 = a9 >>> 13; + var b0 = b[0] | 0; + var bl0 = b0 & 0x1fff; + var bh0 = b0 >>> 13; + var b1 = b[1] | 0; + var bl1 = b1 & 0x1fff; + var bh1 = b1 >>> 13; + var b2 = b[2] | 0; + var bl2 = b2 & 0x1fff; + var bh2 = b2 >>> 13; + var b3 = b[3] | 0; + var bl3 = b3 & 0x1fff; + var bh3 = b3 >>> 13; + var b4 = b[4] | 0; + var bl4 = b4 & 0x1fff; + var bh4 = b4 >>> 13; + var b5 = b[5] | 0; + var bl5 = b5 & 0x1fff; + var bh5 = b5 >>> 13; + var b6 = b[6] | 0; + var bl6 = b6 & 0x1fff; + var bh6 = b6 >>> 13; + var b7 = b[7] | 0; + var bl7 = b7 & 0x1fff; + var bh7 = b7 >>> 13; + var b8 = b[8] | 0; + var bl8 = b8 & 0x1fff; + var bh8 = b8 >>> 13; + var b9 = b[9] | 0; + var bl9 = b9 & 0x1fff; + var bh9 = b9 >>> 13; + + out.negative = self.negative ^ num.negative; + out.length = 19; + /* k = 0 */ + lo = Math.imul(al0, bl0); + mid = Math.imul(al0, bh0); + mid = (mid + Math.imul(ah0, bl0)) | 0; + hi = Math.imul(ah0, bh0); + var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; + w0 &= 0x3ffffff; + /* k = 1 */ + lo = Math.imul(al1, bl0); + mid = Math.imul(al1, bh0); + mid = (mid + Math.imul(ah1, bl0)) | 0; + hi = Math.imul(ah1, bh0); + lo = (lo + Math.imul(al0, bl1)) | 0; + mid = (mid + Math.imul(al0, bh1)) | 0; + mid = (mid + Math.imul(ah0, bl1)) | 0; + hi = (hi + Math.imul(ah0, bh1)) | 0; + var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; + w1 &= 0x3ffffff; + /* k = 2 */ + lo = Math.imul(al2, bl0); + mid = Math.imul(al2, bh0); + mid = (mid + Math.imul(ah2, bl0)) | 0; + hi = Math.imul(ah2, bh0); + lo = (lo + Math.imul(al1, bl1)) | 0; + mid = (mid + Math.imul(al1, bh1)) | 0; + mid = (mid + Math.imul(ah1, bl1)) | 0; + hi = (hi + Math.imul(ah1, bh1)) | 0; + lo = (lo + Math.imul(al0, bl2)) | 0; + mid = (mid + Math.imul(al0, bh2)) | 0; + mid = (mid + Math.imul(ah0, bl2)) | 0; + hi = (hi + Math.imul(ah0, bh2)) | 0; + var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; + w2 &= 0x3ffffff; + /* k = 3 */ + lo = Math.imul(al3, bl0); + mid = Math.imul(al3, bh0); + mid = (mid + Math.imul(ah3, bl0)) | 0; + hi = Math.imul(ah3, bh0); + lo = (lo + Math.imul(al2, bl1)) | 0; + mid = (mid + Math.imul(al2, bh1)) | 0; + mid = (mid + Math.imul(ah2, bl1)) | 0; + hi = (hi + Math.imul(ah2, bh1)) | 0; + lo = (lo + Math.imul(al1, bl2)) | 0; + mid = (mid + Math.imul(al1, bh2)) | 0; + mid = (mid + Math.imul(ah1, bl2)) | 0; + hi = (hi + Math.imul(ah1, bh2)) | 0; + lo = (lo + Math.imul(al0, bl3)) | 0; + mid = (mid + Math.imul(al0, bh3)) | 0; + mid = (mid + Math.imul(ah0, bl3)) | 0; + hi = (hi + Math.imul(ah0, bh3)) | 0; + var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; + w3 &= 0x3ffffff; + /* k = 4 */ + lo = Math.imul(al4, bl0); + mid = Math.imul(al4, bh0); + mid = (mid + Math.imul(ah4, bl0)) | 0; + hi = Math.imul(ah4, bh0); + lo = (lo + Math.imul(al3, bl1)) | 0; + mid = (mid + Math.imul(al3, bh1)) | 0; + mid = (mid + Math.imul(ah3, bl1)) | 0; + hi = (hi + Math.imul(ah3, bh1)) | 0; + lo = (lo + Math.imul(al2, bl2)) | 0; + mid = (mid + Math.imul(al2, bh2)) | 0; + mid = (mid + Math.imul(ah2, bl2)) | 0; + hi = (hi + Math.imul(ah2, bh2)) | 0; + lo = (lo + Math.imul(al1, bl3)) | 0; + mid = (mid + Math.imul(al1, bh3)) | 0; + mid = (mid + Math.imul(ah1, bl3)) | 0; + hi = (hi + Math.imul(ah1, bh3)) | 0; + lo = (lo + Math.imul(al0, bl4)) | 0; + mid = (mid + Math.imul(al0, bh4)) | 0; + mid = (mid + Math.imul(ah0, bl4)) | 0; + hi = (hi + Math.imul(ah0, bh4)) | 0; + var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; + w4 &= 0x3ffffff; + /* k = 5 */ + lo = Math.imul(al5, bl0); + mid = Math.imul(al5, bh0); + mid = (mid + Math.imul(ah5, bl0)) | 0; + hi = Math.imul(ah5, bh0); + lo = (lo + Math.imul(al4, bl1)) | 0; + mid = (mid + Math.imul(al4, bh1)) | 0; + mid = (mid + Math.imul(ah4, bl1)) | 0; + hi = (hi + Math.imul(ah4, bh1)) | 0; + lo = (lo + Math.imul(al3, bl2)) | 0; + mid = (mid + Math.imul(al3, bh2)) | 0; + mid = (mid + Math.imul(ah3, bl2)) | 0; + hi = (hi + Math.imul(ah3, bh2)) | 0; + lo = (lo + Math.imul(al2, bl3)) | 0; + mid = (mid + Math.imul(al2, bh3)) | 0; + mid = (mid + Math.imul(ah2, bl3)) | 0; + hi = (hi + Math.imul(ah2, bh3)) | 0; + lo = (lo + Math.imul(al1, bl4)) | 0; + mid = (mid + Math.imul(al1, bh4)) | 0; + mid = (mid + Math.imul(ah1, bl4)) | 0; + hi = (hi + Math.imul(ah1, bh4)) | 0; + lo = (lo + Math.imul(al0, bl5)) | 0; + mid = (mid + Math.imul(al0, bh5)) | 0; + mid = (mid + Math.imul(ah0, bl5)) | 0; + hi = (hi + Math.imul(ah0, bh5)) | 0; + var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; + w5 &= 0x3ffffff; + /* k = 6 */ + lo = Math.imul(al6, bl0); + mid = Math.imul(al6, bh0); + mid = (mid + Math.imul(ah6, bl0)) | 0; + hi = Math.imul(ah6, bh0); + lo = (lo + Math.imul(al5, bl1)) | 0; + mid = (mid + Math.imul(al5, bh1)) | 0; + mid = (mid + Math.imul(ah5, bl1)) | 0; + hi = (hi + Math.imul(ah5, bh1)) | 0; + lo = (lo + Math.imul(al4, bl2)) | 0; + mid = (mid + Math.imul(al4, bh2)) | 0; + mid = (mid + Math.imul(ah4, bl2)) | 0; + hi = (hi + Math.imul(ah4, bh2)) | 0; + lo = (lo + Math.imul(al3, bl3)) | 0; + mid = (mid + Math.imul(al3, bh3)) | 0; + mid = (mid + Math.imul(ah3, bl3)) | 0; + hi = (hi + Math.imul(ah3, bh3)) | 0; + lo = (lo + Math.imul(al2, bl4)) | 0; + mid = (mid + Math.imul(al2, bh4)) | 0; + mid = (mid + Math.imul(ah2, bl4)) | 0; + hi = (hi + Math.imul(ah2, bh4)) | 0; + lo = (lo + Math.imul(al1, bl5)) | 0; + mid = (mid + Math.imul(al1, bh5)) | 0; + mid = (mid + Math.imul(ah1, bl5)) | 0; + hi = (hi + Math.imul(ah1, bh5)) | 0; + lo = (lo + Math.imul(al0, bl6)) | 0; + mid = (mid + Math.imul(al0, bh6)) | 0; + mid = (mid + Math.imul(ah0, bl6)) | 0; + hi = (hi + Math.imul(ah0, bh6)) | 0; + var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; + w6 &= 0x3ffffff; + /* k = 7 */ + lo = Math.imul(al7, bl0); + mid = Math.imul(al7, bh0); + mid = (mid + Math.imul(ah7, bl0)) | 0; + hi = Math.imul(ah7, bh0); + lo = (lo + Math.imul(al6, bl1)) | 0; + mid = (mid + Math.imul(al6, bh1)) | 0; + mid = (mid + Math.imul(ah6, bl1)) | 0; + hi = (hi + Math.imul(ah6, bh1)) | 0; + lo = (lo + Math.imul(al5, bl2)) | 0; + mid = (mid + Math.imul(al5, bh2)) | 0; + mid = (mid + Math.imul(ah5, bl2)) | 0; + hi = (hi + Math.imul(ah5, bh2)) | 0; + lo = (lo + Math.imul(al4, bl3)) | 0; + mid = (mid + Math.imul(al4, bh3)) | 0; + mid = (mid + Math.imul(ah4, bl3)) | 0; + hi = (hi + Math.imul(ah4, bh3)) | 0; + lo = (lo + Math.imul(al3, bl4)) | 0; + mid = (mid + Math.imul(al3, bh4)) | 0; + mid = (mid + Math.imul(ah3, bl4)) | 0; + hi = (hi + Math.imul(ah3, bh4)) | 0; + lo = (lo + Math.imul(al2, bl5)) | 0; + mid = (mid + Math.imul(al2, bh5)) | 0; + mid = (mid + Math.imul(ah2, bl5)) | 0; + hi = (hi + Math.imul(ah2, bh5)) | 0; + lo = (lo + Math.imul(al1, bl6)) | 0; + mid = (mid + Math.imul(al1, bh6)) | 0; + mid = (mid + Math.imul(ah1, bl6)) | 0; + hi = (hi + Math.imul(ah1, bh6)) | 0; + lo = (lo + Math.imul(al0, bl7)) | 0; + mid = (mid + Math.imul(al0, bh7)) | 0; + mid = (mid + Math.imul(ah0, bl7)) | 0; + hi = (hi + Math.imul(ah0, bh7)) | 0; + var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; + w7 &= 0x3ffffff; + /* k = 8 */ + lo = Math.imul(al8, bl0); + mid = Math.imul(al8, bh0); + mid = (mid + Math.imul(ah8, bl0)) | 0; + hi = Math.imul(ah8, bh0); + lo = (lo + Math.imul(al7, bl1)) | 0; + mid = (mid + Math.imul(al7, bh1)) | 0; + mid = (mid + Math.imul(ah7, bl1)) | 0; + hi = (hi + Math.imul(ah7, bh1)) | 0; + lo = (lo + Math.imul(al6, bl2)) | 0; + mid = (mid + Math.imul(al6, bh2)) | 0; + mid = (mid + Math.imul(ah6, bl2)) | 0; + hi = (hi + Math.imul(ah6, bh2)) | 0; + lo = (lo + Math.imul(al5, bl3)) | 0; + mid = (mid + Math.imul(al5, bh3)) | 0; + mid = (mid + Math.imul(ah5, bl3)) | 0; + hi = (hi + Math.imul(ah5, bh3)) | 0; + lo = (lo + Math.imul(al4, bl4)) | 0; + mid = (mid + Math.imul(al4, bh4)) | 0; + mid = (mid + Math.imul(ah4, bl4)) | 0; + hi = (hi + Math.imul(ah4, bh4)) | 0; + lo = (lo + Math.imul(al3, bl5)) | 0; + mid = (mid + Math.imul(al3, bh5)) | 0; + mid = (mid + Math.imul(ah3, bl5)) | 0; + hi = (hi + Math.imul(ah3, bh5)) | 0; + lo = (lo + Math.imul(al2, bl6)) | 0; + mid = (mid + Math.imul(al2, bh6)) | 0; + mid = (mid + Math.imul(ah2, bl6)) | 0; + hi = (hi + Math.imul(ah2, bh6)) | 0; + lo = (lo + Math.imul(al1, bl7)) | 0; + mid = (mid + Math.imul(al1, bh7)) | 0; + mid = (mid + Math.imul(ah1, bl7)) | 0; + hi = (hi + Math.imul(ah1, bh7)) | 0; + lo = (lo + Math.imul(al0, bl8)) | 0; + mid = (mid + Math.imul(al0, bh8)) | 0; + mid = (mid + Math.imul(ah0, bl8)) | 0; + hi = (hi + Math.imul(ah0, bh8)) | 0; + var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; + w8 &= 0x3ffffff; + /* k = 9 */ + lo = Math.imul(al9, bl0); + mid = Math.imul(al9, bh0); + mid = (mid + Math.imul(ah9, bl0)) | 0; + hi = Math.imul(ah9, bh0); + lo = (lo + Math.imul(al8, bl1)) | 0; + mid = (mid + Math.imul(al8, bh1)) | 0; + mid = (mid + Math.imul(ah8, bl1)) | 0; + hi = (hi + Math.imul(ah8, bh1)) | 0; + lo = (lo + Math.imul(al7, bl2)) | 0; + mid = (mid + Math.imul(al7, bh2)) | 0; + mid = (mid + Math.imul(ah7, bl2)) | 0; + hi = (hi + Math.imul(ah7, bh2)) | 0; + lo = (lo + Math.imul(al6, bl3)) | 0; + mid = (mid + Math.imul(al6, bh3)) | 0; + mid = (mid + Math.imul(ah6, bl3)) | 0; + hi = (hi + Math.imul(ah6, bh3)) | 0; + lo = (lo + Math.imul(al5, bl4)) | 0; + mid = (mid + Math.imul(al5, bh4)) | 0; + mid = (mid + Math.imul(ah5, bl4)) | 0; + hi = (hi + Math.imul(ah5, bh4)) | 0; + lo = (lo + Math.imul(al4, bl5)) | 0; + mid = (mid + Math.imul(al4, bh5)) | 0; + mid = (mid + Math.imul(ah4, bl5)) | 0; + hi = (hi + Math.imul(ah4, bh5)) | 0; + lo = (lo + Math.imul(al3, bl6)) | 0; + mid = (mid + Math.imul(al3, bh6)) | 0; + mid = (mid + Math.imul(ah3, bl6)) | 0; + hi = (hi + Math.imul(ah3, bh6)) | 0; + lo = (lo + Math.imul(al2, bl7)) | 0; + mid = (mid + Math.imul(al2, bh7)) | 0; + mid = (mid + Math.imul(ah2, bl7)) | 0; + hi = (hi + Math.imul(ah2, bh7)) | 0; + lo = (lo + Math.imul(al1, bl8)) | 0; + mid = (mid + Math.imul(al1, bh8)) | 0; + mid = (mid + Math.imul(ah1, bl8)) | 0; + hi = (hi + Math.imul(ah1, bh8)) | 0; + lo = (lo + Math.imul(al0, bl9)) | 0; + mid = (mid + Math.imul(al0, bh9)) | 0; + mid = (mid + Math.imul(ah0, bl9)) | 0; + hi = (hi + Math.imul(ah0, bh9)) | 0; + var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; + w9 &= 0x3ffffff; + /* k = 10 */ + lo = Math.imul(al9, bl1); + mid = Math.imul(al9, bh1); + mid = (mid + Math.imul(ah9, bl1)) | 0; + hi = Math.imul(ah9, bh1); + lo = (lo + Math.imul(al8, bl2)) | 0; + mid = (mid + Math.imul(al8, bh2)) | 0; + mid = (mid + Math.imul(ah8, bl2)) | 0; + hi = (hi + Math.imul(ah8, bh2)) | 0; + lo = (lo + Math.imul(al7, bl3)) | 0; + mid = (mid + Math.imul(al7, bh3)) | 0; + mid = (mid + Math.imul(ah7, bl3)) | 0; + hi = (hi + Math.imul(ah7, bh3)) | 0; + lo = (lo + Math.imul(al6, bl4)) | 0; + mid = (mid + Math.imul(al6, bh4)) | 0; + mid = (mid + Math.imul(ah6, bl4)) | 0; + hi = (hi + Math.imul(ah6, bh4)) | 0; + lo = (lo + Math.imul(al5, bl5)) | 0; + mid = (mid + Math.imul(al5, bh5)) | 0; + mid = (mid + Math.imul(ah5, bl5)) | 0; + hi = (hi + Math.imul(ah5, bh5)) | 0; + lo = (lo + Math.imul(al4, bl6)) | 0; + mid = (mid + Math.imul(al4, bh6)) | 0; + mid = (mid + Math.imul(ah4, bl6)) | 0; + hi = (hi + Math.imul(ah4, bh6)) | 0; + lo = (lo + Math.imul(al3, bl7)) | 0; + mid = (mid + Math.imul(al3, bh7)) | 0; + mid = (mid + Math.imul(ah3, bl7)) | 0; + hi = (hi + Math.imul(ah3, bh7)) | 0; + lo = (lo + Math.imul(al2, bl8)) | 0; + mid = (mid + Math.imul(al2, bh8)) | 0; + mid = (mid + Math.imul(ah2, bl8)) | 0; + hi = (hi + Math.imul(ah2, bh8)) | 0; + lo = (lo + Math.imul(al1, bl9)) | 0; + mid = (mid + Math.imul(al1, bh9)) | 0; + mid = (mid + Math.imul(ah1, bl9)) | 0; + hi = (hi + Math.imul(ah1, bh9)) | 0; + var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; + w10 &= 0x3ffffff; + /* k = 11 */ + lo = Math.imul(al9, bl2); + mid = Math.imul(al9, bh2); + mid = (mid + Math.imul(ah9, bl2)) | 0; + hi = Math.imul(ah9, bh2); + lo = (lo + Math.imul(al8, bl3)) | 0; + mid = (mid + Math.imul(al8, bh3)) | 0; + mid = (mid + Math.imul(ah8, bl3)) | 0; + hi = (hi + Math.imul(ah8, bh3)) | 0; + lo = (lo + Math.imul(al7, bl4)) | 0; + mid = (mid + Math.imul(al7, bh4)) | 0; + mid = (mid + Math.imul(ah7, bl4)) | 0; + hi = (hi + Math.imul(ah7, bh4)) | 0; + lo = (lo + Math.imul(al6, bl5)) | 0; + mid = (mid + Math.imul(al6, bh5)) | 0; + mid = (mid + Math.imul(ah6, bl5)) | 0; + hi = (hi + Math.imul(ah6, bh5)) | 0; + lo = (lo + Math.imul(al5, bl6)) | 0; + mid = (mid + Math.imul(al5, bh6)) | 0; + mid = (mid + Math.imul(ah5, bl6)) | 0; + hi = (hi + Math.imul(ah5, bh6)) | 0; + lo = (lo + Math.imul(al4, bl7)) | 0; + mid = (mid + Math.imul(al4, bh7)) | 0; + mid = (mid + Math.imul(ah4, bl7)) | 0; + hi = (hi + Math.imul(ah4, bh7)) | 0; + lo = (lo + Math.imul(al3, bl8)) | 0; + mid = (mid + Math.imul(al3, bh8)) | 0; + mid = (mid + Math.imul(ah3, bl8)) | 0; + hi = (hi + Math.imul(ah3, bh8)) | 0; + lo = (lo + Math.imul(al2, bl9)) | 0; + mid = (mid + Math.imul(al2, bh9)) | 0; + mid = (mid + Math.imul(ah2, bl9)) | 0; + hi = (hi + Math.imul(ah2, bh9)) | 0; + var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; + w11 &= 0x3ffffff; + /* k = 12 */ + lo = Math.imul(al9, bl3); + mid = Math.imul(al9, bh3); + mid = (mid + Math.imul(ah9, bl3)) | 0; + hi = Math.imul(ah9, bh3); + lo = (lo + Math.imul(al8, bl4)) | 0; + mid = (mid + Math.imul(al8, bh4)) | 0; + mid = (mid + Math.imul(ah8, bl4)) | 0; + hi = (hi + Math.imul(ah8, bh4)) | 0; + lo = (lo + Math.imul(al7, bl5)) | 0; + mid = (mid + Math.imul(al7, bh5)) | 0; + mid = (mid + Math.imul(ah7, bl5)) | 0; + hi = (hi + Math.imul(ah7, bh5)) | 0; + lo = (lo + Math.imul(al6, bl6)) | 0; + mid = (mid + Math.imul(al6, bh6)) | 0; + mid = (mid + Math.imul(ah6, bl6)) | 0; + hi = (hi + Math.imul(ah6, bh6)) | 0; + lo = (lo + Math.imul(al5, bl7)) | 0; + mid = (mid + Math.imul(al5, bh7)) | 0; + mid = (mid + Math.imul(ah5, bl7)) | 0; + hi = (hi + Math.imul(ah5, bh7)) | 0; + lo = (lo + Math.imul(al4, bl8)) | 0; + mid = (mid + Math.imul(al4, bh8)) | 0; + mid = (mid + Math.imul(ah4, bl8)) | 0; + hi = (hi + Math.imul(ah4, bh8)) | 0; + lo = (lo + Math.imul(al3, bl9)) | 0; + mid = (mid + Math.imul(al3, bh9)) | 0; + mid = (mid + Math.imul(ah3, bl9)) | 0; + hi = (hi + Math.imul(ah3, bh9)) | 0; + var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; + w12 &= 0x3ffffff; + /* k = 13 */ + lo = Math.imul(al9, bl4); + mid = Math.imul(al9, bh4); + mid = (mid + Math.imul(ah9, bl4)) | 0; + hi = Math.imul(ah9, bh4); + lo = (lo + Math.imul(al8, bl5)) | 0; + mid = (mid + Math.imul(al8, bh5)) | 0; + mid = (mid + Math.imul(ah8, bl5)) | 0; + hi = (hi + Math.imul(ah8, bh5)) | 0; + lo = (lo + Math.imul(al7, bl6)) | 0; + mid = (mid + Math.imul(al7, bh6)) | 0; + mid = (mid + Math.imul(ah7, bl6)) | 0; + hi = (hi + Math.imul(ah7, bh6)) | 0; + lo = (lo + Math.imul(al6, bl7)) | 0; + mid = (mid + Math.imul(al6, bh7)) | 0; + mid = (mid + Math.imul(ah6, bl7)) | 0; + hi = (hi + Math.imul(ah6, bh7)) | 0; + lo = (lo + Math.imul(al5, bl8)) | 0; + mid = (mid + Math.imul(al5, bh8)) | 0; + mid = (mid + Math.imul(ah5, bl8)) | 0; + hi = (hi + Math.imul(ah5, bh8)) | 0; + lo = (lo + Math.imul(al4, bl9)) | 0; + mid = (mid + Math.imul(al4, bh9)) | 0; + mid = (mid + Math.imul(ah4, bl9)) | 0; + hi = (hi + Math.imul(ah4, bh9)) | 0; + var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; + w13 &= 0x3ffffff; + /* k = 14 */ + lo = Math.imul(al9, bl5); + mid = Math.imul(al9, bh5); + mid = (mid + Math.imul(ah9, bl5)) | 0; + hi = Math.imul(ah9, bh5); + lo = (lo + Math.imul(al8, bl6)) | 0; + mid = (mid + Math.imul(al8, bh6)) | 0; + mid = (mid + Math.imul(ah8, bl6)) | 0; + hi = (hi + Math.imul(ah8, bh6)) | 0; + lo = (lo + Math.imul(al7, bl7)) | 0; + mid = (mid + Math.imul(al7, bh7)) | 0; + mid = (mid + Math.imul(ah7, bl7)) | 0; + hi = (hi + Math.imul(ah7, bh7)) | 0; + lo = (lo + Math.imul(al6, bl8)) | 0; + mid = (mid + Math.imul(al6, bh8)) | 0; + mid = (mid + Math.imul(ah6, bl8)) | 0; + hi = (hi + Math.imul(ah6, bh8)) | 0; + lo = (lo + Math.imul(al5, bl9)) | 0; + mid = (mid + Math.imul(al5, bh9)) | 0; + mid = (mid + Math.imul(ah5, bl9)) | 0; + hi = (hi + Math.imul(ah5, bh9)) | 0; + var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; + w14 &= 0x3ffffff; + /* k = 15 */ + lo = Math.imul(al9, bl6); + mid = Math.imul(al9, bh6); + mid = (mid + Math.imul(ah9, bl6)) | 0; + hi = Math.imul(ah9, bh6); + lo = (lo + Math.imul(al8, bl7)) | 0; + mid = (mid + Math.imul(al8, bh7)) | 0; + mid = (mid + Math.imul(ah8, bl7)) | 0; + hi = (hi + Math.imul(ah8, bh7)) | 0; + lo = (lo + Math.imul(al7, bl8)) | 0; + mid = (mid + Math.imul(al7, bh8)) | 0; + mid = (mid + Math.imul(ah7, bl8)) | 0; + hi = (hi + Math.imul(ah7, bh8)) | 0; + lo = (lo + Math.imul(al6, bl9)) | 0; + mid = (mid + Math.imul(al6, bh9)) | 0; + mid = (mid + Math.imul(ah6, bl9)) | 0; + hi = (hi + Math.imul(ah6, bh9)) | 0; + var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; + w15 &= 0x3ffffff; + /* k = 16 */ + lo = Math.imul(al9, bl7); + mid = Math.imul(al9, bh7); + mid = (mid + Math.imul(ah9, bl7)) | 0; + hi = Math.imul(ah9, bh7); + lo = (lo + Math.imul(al8, bl8)) | 0; + mid = (mid + Math.imul(al8, bh8)) | 0; + mid = (mid + Math.imul(ah8, bl8)) | 0; + hi = (hi + Math.imul(ah8, bh8)) | 0; + lo = (lo + Math.imul(al7, bl9)) | 0; + mid = (mid + Math.imul(al7, bh9)) | 0; + mid = (mid + Math.imul(ah7, bl9)) | 0; + hi = (hi + Math.imul(ah7, bh9)) | 0; + var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; + w16 &= 0x3ffffff; + /* k = 17 */ + lo = Math.imul(al9, bl8); + mid = Math.imul(al9, bh8); + mid = (mid + Math.imul(ah9, bl8)) | 0; + hi = Math.imul(ah9, bh8); + lo = (lo + Math.imul(al8, bl9)) | 0; + mid = (mid + Math.imul(al8, bh9)) | 0; + mid = (mid + Math.imul(ah8, bl9)) | 0; + hi = (hi + Math.imul(ah8, bh9)) | 0; + var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; + w17 &= 0x3ffffff; + /* k = 18 */ + lo = Math.imul(al9, bl9); + mid = Math.imul(al9, bh9); + mid = (mid + Math.imul(ah9, bl9)) | 0; + hi = Math.imul(ah9, bh9); + var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; + w18 &= 0x3ffffff; + o[0] = w0; + o[1] = w1; + o[2] = w2; + o[3] = w3; + o[4] = w4; + o[5] = w5; + o[6] = w6; + o[7] = w7; + o[8] = w8; + o[9] = w9; + o[10] = w10; + o[11] = w11; + o[12] = w12; + o[13] = w13; + o[14] = w14; + o[15] = w15; + o[16] = w16; + o[17] = w17; + o[18] = w18; + if (c !== 0) { + o[19] = c; + out.length++; + } + return out; + }; + + // Polyfill comb + if (!Math.imul) { + comb10MulTo = smallMulTo; + } + + function bigMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + out.length = self.length + num.length; + + var carry = 0; + var hncarry = 0; + for (var k = 0; k < out.length - 1; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = hncarry; + hncarry = 0; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = k - j; + var a = self.words[i] | 0; + var b = num.words[j] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; + lo = (lo + rword) | 0; + rword = lo & 0x3ffffff; + ncarry = (ncarry + (lo >>> 26)) | 0; + + hncarry += ncarry >>> 26; + ncarry &= 0x3ffffff; + } + out.words[k] = rword; + carry = ncarry; + ncarry = hncarry; + } + if (carry !== 0) { + out.words[k] = carry; + } else { + out.length--; + } + + return out.strip(); + } + + function jumboMulTo (self, num, out) { + var fftm = new FFTM(); + return fftm.mulp(self, num, out); + } + + BN.prototype.mulTo = function mulTo (num, out) { + var res; + var len = this.length + num.length; + if (this.length === 10 && num.length === 10) { + res = comb10MulTo(this, num, out); + } else if (len < 63) { + res = smallMulTo(this, num, out); + } else if (len < 1024) { + res = bigMulTo(this, num, out); + } else { + res = jumboMulTo(this, num, out); + } + + return res; + }; + + // Cooley-Tukey algorithm for FFT + // slightly revisited to rely on looping instead of recursion + + function FFTM (x, y) { + this.x = x; + this.y = y; + } + + FFTM.prototype.makeRBT = function makeRBT (N) { + var t = new Array(N); + var l = BN.prototype._countBits(N) - 1; + for (var i = 0; i < N; i++) { + t[i] = this.revBin(i, l, N); + } + + return t; + }; + + // Returns binary-reversed representation of `x` + FFTM.prototype.revBin = function revBin (x, l, N) { + if (x === 0 || x === N - 1) return x; + + var rb = 0; + for (var i = 0; i < l; i++) { + rb |= (x & 1) << (l - i - 1); + x >>= 1; + } + + return rb; + }; + + // Performs "tweedling" phase, therefore 'emulating' + // behaviour of the recursive algorithm + FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { + for (var i = 0; i < N; i++) { + rtws[i] = rws[rbt[i]]; + itws[i] = iws[rbt[i]]; + } + }; + + FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { + this.permute(rbt, rws, iws, rtws, itws, N); + + for (var s = 1; s < N; s <<= 1) { + var l = s << 1; + + var rtwdf = Math.cos(2 * Math.PI / l); + var itwdf = Math.sin(2 * Math.PI / l); + + for (var p = 0; p < N; p += l) { + var rtwdf_ = rtwdf; + var itwdf_ = itwdf; + + for (var j = 0; j < s; j++) { + var re = rtws[p + j]; + var ie = itws[p + j]; + + var ro = rtws[p + j + s]; + var io = itws[p + j + s]; + + var rx = rtwdf_ * ro - itwdf_ * io; + + io = rtwdf_ * io + itwdf_ * ro; + ro = rx; + + rtws[p + j] = re + ro; + itws[p + j] = ie + io; + + rtws[p + j + s] = re - ro; + itws[p + j + s] = ie - io; + + /* jshint maxdepth : false */ + if (j !== l) { + rx = rtwdf * rtwdf_ - itwdf * itwdf_; + + itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; + rtwdf_ = rx; + } + } + } + } + }; + + FFTM.prototype.guessLen13b = function guessLen13b (n, m) { + var N = Math.max(m, n) | 1; + var odd = N & 1; + var i = 0; + for (N = N / 2 | 0; N; N = N >>> 1) { + i++; + } + + return 1 << i + 1 + odd; + }; + + FFTM.prototype.conjugate = function conjugate (rws, iws, N) { + if (N <= 1) return; + + for (var i = 0; i < N / 2; i++) { + var t = rws[i]; + + rws[i] = rws[N - i - 1]; + rws[N - i - 1] = t; + + t = iws[i]; + + iws[i] = -iws[N - i - 1]; + iws[N - i - 1] = -t; + } + }; + + FFTM.prototype.normalize13b = function normalize13b (ws, N) { + var carry = 0; + for (var i = 0; i < N / 2; i++) { + var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + + Math.round(ws[2 * i] / N) + + carry; + + ws[i] = w & 0x3ffffff; + + if (w < 0x4000000) { + carry = 0; + } else { + carry = w / 0x4000000 | 0; + } + } + + return ws; + }; + + FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { + var carry = 0; + for (var i = 0; i < len; i++) { + carry = carry + (ws[i] | 0); + + rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; + rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; + } + + // Pad with zeroes + for (i = 2 * len; i < N; ++i) { + rws[i] = 0; + } + + assert(carry === 0); + assert((carry & ~0x1fff) === 0); + }; + + FFTM.prototype.stub = function stub (N) { + var ph = new Array(N); + for (var i = 0; i < N; i++) { + ph[i] = 0; + } + + return ph; + }; + + FFTM.prototype.mulp = function mulp (x, y, out) { + var N = 2 * this.guessLen13b(x.length, y.length); + + var rbt = this.makeRBT(N); + + var _ = this.stub(N); + + var rws = new Array(N); + var rwst = new Array(N); + var iwst = new Array(N); + + var nrws = new Array(N); + var nrwst = new Array(N); + var niwst = new Array(N); + + var rmws = out.words; + rmws.length = N; + + this.convert13b(x.words, x.length, rws, N); + this.convert13b(y.words, y.length, nrws, N); + + this.transform(rws, _, rwst, iwst, N, rbt); + this.transform(nrws, _, nrwst, niwst, N, rbt); + + for (var i = 0; i < N; i++) { + var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; + iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; + rwst[i] = rx; + } + + this.conjugate(rwst, iwst, N); + this.transform(rwst, iwst, rmws, _, N, rbt); + this.conjugate(rmws, _, N); + this.normalize13b(rmws, N); + + out.negative = x.negative ^ y.negative; + out.length = x.length + y.length; + return out.strip(); + }; + + // Multiply `this` by `num` + BN.prototype.mul = function mul (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return this.mulTo(num, out); + }; + + // Multiply employing FFT + BN.prototype.mulf = function mulf (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return jumboMulTo(this, num, out); + }; + + // In-place Multiplication + BN.prototype.imul = function imul (num) { + return this.clone().mulTo(num, this); + }; + + BN.prototype.imuln = function imuln (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + + // Carry + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = (this.words[i] | 0) * num; + var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); + carry >>= 26; + carry += (w / 0x4000000) | 0; + // NOTE: lo is 27bit maximum + carry += lo >>> 26; + this.words[i] = lo & 0x3ffffff; + } + + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + + return this; + }; + + BN.prototype.muln = function muln (num) { + return this.clone().imuln(num); + }; + + // `this` * `this` + BN.prototype.sqr = function sqr () { + return this.mul(this); + }; + + // `this` * `this` in-place + BN.prototype.isqr = function isqr () { + return this.imul(this.clone()); + }; + + // Math.pow(`this`, `num`) + BN.prototype.pow = function pow (num) { + var w = toBitArray(num); + if (w.length === 0) return new BN(1); + + // Skip leading zeroes + var res = this; + for (var i = 0; i < w.length; i++, res = res.sqr()) { + if (w[i] !== 0) break; + } + + if (++i < w.length) { + for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { + if (w[i] === 0) continue; + + res = res.mul(q); + } + } + + return res; + }; + + // Shift-left in-place + BN.prototype.iushln = function iushln (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); + var i; + + if (r !== 0) { + var carry = 0; + + for (i = 0; i < this.length; i++) { + var newCarry = this.words[i] & carryMask; + var c = ((this.words[i] | 0) - newCarry) << r; + this.words[i] = c | carry; + carry = newCarry >>> (26 - r); + } + + if (carry) { + this.words[i] = carry; + this.length++; + } + } + + if (s !== 0) { + for (i = this.length - 1; i >= 0; i--) { + this.words[i + s] = this.words[i]; + } + + for (i = 0; i < s; i++) { + this.words[i] = 0; + } + + this.length += s; + } + + return this.strip(); + }; + + BN.prototype.ishln = function ishln (bits) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushln(bits); + }; + + // Shift-right in-place + // NOTE: `hint` is a lowest bit before trailing zeroes + // NOTE: if `extended` is present - it will be filled with destroyed bits + BN.prototype.iushrn = function iushrn (bits, hint, extended) { + assert(typeof bits === 'number' && bits >= 0); + var h; + if (hint) { + h = (hint - (hint % 26)) / 26; + } else { + h = 0; + } + + var r = bits % 26; + var s = Math.min((bits - r) / 26, this.length); + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + var maskedWords = extended; + + h -= s; + h = Math.max(0, h); + + // Extended mode, copy masked part + if (maskedWords) { + for (var i = 0; i < s; i++) { + maskedWords.words[i] = this.words[i]; + } + maskedWords.length = s; + } + + if (s === 0) { + // No-op, we should not move anything at all + } else if (this.length > s) { + this.length -= s; + for (i = 0; i < this.length; i++) { + this.words[i] = this.words[i + s]; + } + } else { + this.words[0] = 0; + this.length = 1; + } + + var carry = 0; + for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { + var word = this.words[i] | 0; + this.words[i] = (carry << (26 - r)) | (word >>> r); + carry = word & mask; + } + + // Push carried bits as a mask + if (maskedWords && carry !== 0) { + maskedWords.words[maskedWords.length++] = carry; + } + + if (this.length === 0) { + this.words[0] = 0; + this.length = 1; + } + + return this.strip(); + }; + + BN.prototype.ishrn = function ishrn (bits, hint, extended) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushrn(bits, hint, extended); + }; + + // Shift-left + BN.prototype.shln = function shln (bits) { + return this.clone().ishln(bits); + }; + + BN.prototype.ushln = function ushln (bits) { + return this.clone().iushln(bits); + }; + + // Shift-right + BN.prototype.shrn = function shrn (bits) { + return this.clone().ishrn(bits); + }; + + BN.prototype.ushrn = function ushrn (bits) { + return this.clone().iushrn(bits); + }; + + // Test if n bit is set + BN.prototype.testn = function testn (bit) { + assert(typeof bit === 'number' && bit >= 0); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) return false; + + // Check bit and return + var w = this.words[s]; + + return !!(w & q); + }; + + // Return only lowers bits of number (in-place) + BN.prototype.imaskn = function imaskn (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + + assert(this.negative === 0, 'imaskn works only with positive numbers'); + + if (this.length <= s) { + return this; + } + + if (r !== 0) { + s++; + } + this.length = Math.min(s, this.length); + + if (r !== 0) { + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + this.words[this.length - 1] &= mask; + } + + return this.strip(); + }; + + // Return only lowers bits of number + BN.prototype.maskn = function maskn (bits) { + return this.clone().imaskn(bits); + }; + + // Add plain number `num` to `this` + BN.prototype.iaddn = function iaddn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.isubn(-num); + + // Possible sign change + if (this.negative !== 0) { + if (this.length === 1 && (this.words[0] | 0) < num) { + this.words[0] = num - (this.words[0] | 0); + this.negative = 0; + return this; + } + + this.negative = 0; + this.isubn(num); + this.negative = 1; + return this; + } + + // Add without checks + return this._iaddn(num); + }; + + BN.prototype._iaddn = function _iaddn (num) { + this.words[0] += num; + + // Carry + for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { + this.words[i] -= 0x4000000; + if (i === this.length - 1) { + this.words[i + 1] = 1; + } else { + this.words[i + 1]++; + } + } + this.length = Math.max(this.length, i + 1); + + return this; + }; + + // Subtract plain number `num` from `this` + BN.prototype.isubn = function isubn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.iaddn(-num); + + if (this.negative !== 0) { + this.negative = 0; + this.iaddn(num); + this.negative = 1; + return this; + } + + this.words[0] -= num; + + if (this.length === 1 && this.words[0] < 0) { + this.words[0] = -this.words[0]; + this.negative = 1; + } else { + // Carry + for (var i = 0; i < this.length && this.words[i] < 0; i++) { + this.words[i] += 0x4000000; + this.words[i + 1] -= 1; + } + } + + return this.strip(); + }; + + BN.prototype.addn = function addn (num) { + return this.clone().iaddn(num); + }; + + BN.prototype.subn = function subn (num) { + return this.clone().isubn(num); + }; + + BN.prototype.iabs = function iabs () { + this.negative = 0; + + return this; + }; + + BN.prototype.abs = function abs () { + return this.clone().iabs(); + }; + + BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { + var len = num.length + shift; + var i; + + this._expand(len); + + var w; + var carry = 0; + for (i = 0; i < num.length; i++) { + w = (this.words[i + shift] | 0) + carry; + var right = (num.words[i] | 0) * mul; + w -= right & 0x3ffffff; + carry = (w >> 26) - ((right / 0x4000000) | 0); + this.words[i + shift] = w & 0x3ffffff; + } + for (; i < this.length - shift; i++) { + w = (this.words[i + shift] | 0) + carry; + carry = w >> 26; + this.words[i + shift] = w & 0x3ffffff; + } + + if (carry === 0) return this.strip(); + + // Subtraction overflow + assert(carry === -1); + carry = 0; + for (i = 0; i < this.length; i++) { + w = -(this.words[i] | 0) + carry; + carry = w >> 26; + this.words[i] = w & 0x3ffffff; + } + this.negative = 1; + + return this.strip(); + }; + + BN.prototype._wordDiv = function _wordDiv (num, mode) { + var shift = this.length - num.length; + + var a = this.clone(); + var b = num; + + // Normalize + var bhi = b.words[b.length - 1] | 0; + var bhiBits = this._countBits(bhi); + shift = 26 - bhiBits; + if (shift !== 0) { + b = b.ushln(shift); + a.iushln(shift); + bhi = b.words[b.length - 1] | 0; + } + + // Initialize quotient + var m = a.length - b.length; + var q; + + if (mode !== 'mod') { + q = new BN(null); + q.length = m + 1; + q.words = new Array(q.length); + for (var i = 0; i < q.length; i++) { + q.words[i] = 0; + } + } + + var diff = a.clone()._ishlnsubmul(b, 1, m); + if (diff.negative === 0) { + a = diff; + if (q) { + q.words[m] = 1; + } + } + + for (var j = m - 1; j >= 0; j--) { + var qj = (a.words[b.length + j] | 0) * 0x4000000 + + (a.words[b.length + j - 1] | 0); + + // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max + // (0x7ffffff) + qj = Math.min((qj / bhi) | 0, 0x3ffffff); + + a._ishlnsubmul(b, qj, j); + while (a.negative !== 0) { + qj--; + a.negative = 0; + a._ishlnsubmul(b, 1, j); + if (!a.isZero()) { + a.negative ^= 1; + } + } + if (q) { + q.words[j] = qj; + } + } + if (q) { + q.strip(); + } + a.strip(); + + // Denormalize + if (mode !== 'div' && shift !== 0) { + a.iushrn(shift); + } + + return { + div: q || null, + mod: a + }; + }; + + // NOTE: 1) `mode` can be set to `mod` to request mod only, + // to `div` to request div only, or be absent to + // request both div & mod + // 2) `positive` is true if unsigned mod is requested + BN.prototype.divmod = function divmod (num, mode, positive) { + assert(!num.isZero()); + + if (this.isZero()) { + return { + div: new BN(0), + mod: new BN(0) + }; + } + + var div, mod, res; + if (this.negative !== 0 && num.negative === 0) { + res = this.neg().divmod(num, mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.iadd(num); + } + } + + return { + div: div, + mod: mod + }; + } + + if (this.negative === 0 && num.negative !== 0) { + res = this.divmod(num.neg(), mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + return { + div: div, + mod: res.mod + }; + } + + if ((this.negative & num.negative) !== 0) { + res = this.neg().divmod(num.neg(), mode); + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.isub(num); + } + } + + return { + div: res.div, + mod: mod + }; + } + + // Both numbers are positive at this point + + // Strip both numbers to approximate shift value + if (num.length > this.length || this.cmp(num) < 0) { + return { + div: new BN(0), + mod: this + }; + } + + // Very short reduction + if (num.length === 1) { + if (mode === 'div') { + return { + div: this.divn(num.words[0]), + mod: null + }; + } + + if (mode === 'mod') { + return { + div: null, + mod: new BN(this.modn(num.words[0])) + }; + } + + return { + div: this.divn(num.words[0]), + mod: new BN(this.modn(num.words[0])) + }; + } + + return this._wordDiv(num, mode); + }; + + // Find `this` / `num` + BN.prototype.div = function div (num) { + return this.divmod(num, 'div', false).div; + }; + + // Find `this` % `num` + BN.prototype.mod = function mod (num) { + return this.divmod(num, 'mod', false).mod; + }; + + BN.prototype.umod = function umod (num) { + return this.divmod(num, 'mod', true).mod; + }; + + // Find Round(`this` / `num`) + BN.prototype.divRound = function divRound (num) { + var dm = this.divmod(num); + + // Fast case - exact division + if (dm.mod.isZero()) return dm.div; + + var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; + + var half = num.ushrn(1); + var r2 = num.andln(1); + var cmp = mod.cmp(half); + + // Round down + if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; + + // Round up + return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); + }; + + BN.prototype.modn = function modn (num) { + assert(num <= 0x3ffffff); + var p = (1 << 26) % num; + + var acc = 0; + for (var i = this.length - 1; i >= 0; i--) { + acc = (p * acc + (this.words[i] | 0)) % num; + } + + return acc; + }; + + // In-place division by number + BN.prototype.idivn = function idivn (num) { + assert(num <= 0x3ffffff); + + var carry = 0; + for (var i = this.length - 1; i >= 0; i--) { + var w = (this.words[i] | 0) + carry * 0x4000000; + this.words[i] = (w / num) | 0; + carry = w % num; + } + + return this.strip(); + }; + + BN.prototype.divn = function divn (num) { + return this.clone().idivn(num); + }; + + BN.prototype.egcd = function egcd (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var x = this; + var y = p.clone(); + + if (x.negative !== 0) { + x = x.umod(p); + } else { + x = x.clone(); + } + + // A * x + B * y = x + var A = new BN(1); + var B = new BN(0); + + // C * x + D * y = y + var C = new BN(0); + var D = new BN(1); + + var g = 0; + + while (x.isEven() && y.isEven()) { + x.iushrn(1); + y.iushrn(1); + ++g; + } + + var yp = y.clone(); + var xp = x.clone(); + + while (!x.isZero()) { + for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + x.iushrn(i); + while (i-- > 0) { + if (A.isOdd() || B.isOdd()) { + A.iadd(yp); + B.isub(xp); + } + + A.iushrn(1); + B.iushrn(1); + } + } + + for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + y.iushrn(j); + while (j-- > 0) { + if (C.isOdd() || D.isOdd()) { + C.iadd(yp); + D.isub(xp); + } + + C.iushrn(1); + D.iushrn(1); + } + } + + if (x.cmp(y) >= 0) { + x.isub(y); + A.isub(C); + B.isub(D); + } else { + y.isub(x); + C.isub(A); + D.isub(B); + } + } + + return { + a: C, + b: D, + gcd: y.iushln(g) + }; + }; + + // This is reduced incarnation of the binary EEA + // above, designated to invert members of the + // _prime_ fields F(p) at a maximal speed + BN.prototype._invmp = function _invmp (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var a = this; + var b = p.clone(); + + if (a.negative !== 0) { + a = a.umod(p); + } else { + a = a.clone(); + } + + var x1 = new BN(1); + var x2 = new BN(0); + + var delta = b.clone(); + + while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { + for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + a.iushrn(i); + while (i-- > 0) { + if (x1.isOdd()) { + x1.iadd(delta); + } + + x1.iushrn(1); + } + } + + for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + b.iushrn(j); + while (j-- > 0) { + if (x2.isOdd()) { + x2.iadd(delta); + } + + x2.iushrn(1); + } + } + + if (a.cmp(b) >= 0) { + a.isub(b); + x1.isub(x2); + } else { + b.isub(a); + x2.isub(x1); + } + } + + var res; + if (a.cmpn(1) === 0) { + res = x1; + } else { + res = x2; + } + + if (res.cmpn(0) < 0) { + res.iadd(p); + } + + return res; + }; + + BN.prototype.gcd = function gcd (num) { + if (this.isZero()) return num.abs(); + if (num.isZero()) return this.abs(); + + var a = this.clone(); + var b = num.clone(); + a.negative = 0; + b.negative = 0; + + // Remove common factor of two + for (var shift = 0; a.isEven() && b.isEven(); shift++) { + a.iushrn(1); + b.iushrn(1); + } + + do { + while (a.isEven()) { + a.iushrn(1); + } + while (b.isEven()) { + b.iushrn(1); + } + + var r = a.cmp(b); + if (r < 0) { + // Swap `a` and `b` to make `a` always bigger than `b` + var t = a; + a = b; + b = t; + } else if (r === 0 || b.cmpn(1) === 0) { + break; + } + + a.isub(b); + } while (true); + + return b.iushln(shift); + }; + + // Invert number in the field F(num) + BN.prototype.invm = function invm (num) { + return this.egcd(num).a.umod(num); + }; + + BN.prototype.isEven = function isEven () { + return (this.words[0] & 1) === 0; + }; + + BN.prototype.isOdd = function isOdd () { + return (this.words[0] & 1) === 1; + }; + + // And first word and num + BN.prototype.andln = function andln (num) { + return this.words[0] & num; + }; + + // Increment at the bit position in-line + BN.prototype.bincn = function bincn (bit) { + assert(typeof bit === 'number'); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) { + this._expand(s + 1); + this.words[s] |= q; + return this; + } + + // Add bit and propagate, if needed + var carry = q; + for (var i = s; carry !== 0 && i < this.length; i++) { + var w = this.words[i] | 0; + w += carry; + carry = w >>> 26; + w &= 0x3ffffff; + this.words[i] = w; + } + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + return this; + }; + + BN.prototype.isZero = function isZero () { + return this.length === 1 && this.words[0] === 0; + }; + + BN.prototype.cmpn = function cmpn (num) { + var negative = num < 0; + + if (this.negative !== 0 && !negative) return -1; + if (this.negative === 0 && negative) return 1; + + this.strip(); + + var res; + if (this.length > 1) { + res = 1; + } else { + if (negative) { + num = -num; + } + + assert(num <= 0x3ffffff, 'Number is too big'); + + var w = this.words[0] | 0; + res = w === num ? 0 : w < num ? -1 : 1; + } + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Compare two numbers and return: + // 1 - if `this` > `num` + // 0 - if `this` == `num` + // -1 - if `this` < `num` + BN.prototype.cmp = function cmp (num) { + if (this.negative !== 0 && num.negative === 0) return -1; + if (this.negative === 0 && num.negative !== 0) return 1; + + var res = this.ucmp(num); + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Unsigned comparison + BN.prototype.ucmp = function ucmp (num) { + // At this point both numbers have the same sign + if (this.length > num.length) return 1; + if (this.length < num.length) return -1; + + var res = 0; + for (var i = this.length - 1; i >= 0; i--) { + var a = this.words[i] | 0; + var b = num.words[i] | 0; + + if (a === b) continue; + if (a < b) { + res = -1; + } else if (a > b) { + res = 1; + } + break; + } + return res; + }; + + BN.prototype.gtn = function gtn (num) { + return this.cmpn(num) === 1; + }; + + BN.prototype.gt = function gt (num) { + return this.cmp(num) === 1; + }; + + BN.prototype.gten = function gten (num) { + return this.cmpn(num) >= 0; + }; + + BN.prototype.gte = function gte (num) { + return this.cmp(num) >= 0; + }; + + BN.prototype.ltn = function ltn (num) { + return this.cmpn(num) === -1; + }; + + BN.prototype.lt = function lt (num) { + return this.cmp(num) === -1; + }; + + BN.prototype.lten = function lten (num) { + return this.cmpn(num) <= 0; + }; + + BN.prototype.lte = function lte (num) { + return this.cmp(num) <= 0; + }; + + BN.prototype.eqn = function eqn (num) { + return this.cmpn(num) === 0; + }; + + BN.prototype.eq = function eq (num) { + return this.cmp(num) === 0; + }; + + // + // A reduce context, could be using montgomery or something better, depending + // on the `m` itself. + // + BN.red = function red (num) { + return new Red(num); + }; + + BN.prototype.toRed = function toRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + assert(this.negative === 0, 'red works only with positives'); + return ctx.convertTo(this)._forceRed(ctx); + }; + + BN.prototype.fromRed = function fromRed () { + assert(this.red, 'fromRed works only with numbers in reduction context'); + return this.red.convertFrom(this); + }; + + BN.prototype._forceRed = function _forceRed (ctx) { + this.red = ctx; + return this; + }; + + BN.prototype.forceRed = function forceRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + return this._forceRed(ctx); + }; + + BN.prototype.redAdd = function redAdd (num) { + assert(this.red, 'redAdd works only with red numbers'); + return this.red.add(this, num); + }; + + BN.prototype.redIAdd = function redIAdd (num) { + assert(this.red, 'redIAdd works only with red numbers'); + return this.red.iadd(this, num); + }; + + BN.prototype.redSub = function redSub (num) { + assert(this.red, 'redSub works only with red numbers'); + return this.red.sub(this, num); + }; + + BN.prototype.redISub = function redISub (num) { + assert(this.red, 'redISub works only with red numbers'); + return this.red.isub(this, num); + }; + + BN.prototype.redShl = function redShl (num) { + assert(this.red, 'redShl works only with red numbers'); + return this.red.shl(this, num); + }; + + BN.prototype.redMul = function redMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.mul(this, num); + }; + + BN.prototype.redIMul = function redIMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.imul(this, num); + }; + + BN.prototype.redSqr = function redSqr () { + assert(this.red, 'redSqr works only with red numbers'); + this.red._verify1(this); + return this.red.sqr(this); + }; + + BN.prototype.redISqr = function redISqr () { + assert(this.red, 'redISqr works only with red numbers'); + this.red._verify1(this); + return this.red.isqr(this); + }; + + // Square root over p + BN.prototype.redSqrt = function redSqrt () { + assert(this.red, 'redSqrt works only with red numbers'); + this.red._verify1(this); + return this.red.sqrt(this); + }; + + BN.prototype.redInvm = function redInvm () { + assert(this.red, 'redInvm works only with red numbers'); + this.red._verify1(this); + return this.red.invm(this); + }; + + // Return negative clone of `this` % `red modulo` + BN.prototype.redNeg = function redNeg () { + assert(this.red, 'redNeg works only with red numbers'); + this.red._verify1(this); + return this.red.neg(this); + }; + + BN.prototype.redPow = function redPow (num) { + assert(this.red && !num.red, 'redPow(normalNum)'); + this.red._verify1(this); + return this.red.pow(this, num); + }; + + // Prime numbers with efficient reduction + var primes = { + k256: null, + p224: null, + p192: null, + p25519: null + }; + + // Pseudo-Mersenne prime + function MPrime (name, p) { + // P = 2 ^ N - K + this.name = name; + this.p = new BN(p, 16); + this.n = this.p.bitLength(); + this.k = new BN(1).iushln(this.n).isub(this.p); + + this.tmp = this._tmp(); + } + + MPrime.prototype._tmp = function _tmp () { + var tmp = new BN(null); + tmp.words = new Array(Math.ceil(this.n / 13)); + return tmp; + }; + + MPrime.prototype.ireduce = function ireduce (num) { + // Assumes that `num` is less than `P^2` + // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) + var r = num; + var rlen; + + do { + this.split(r, this.tmp); + r = this.imulK(r); + r = r.iadd(this.tmp); + rlen = r.bitLength(); + } while (rlen > this.n); + + var cmp = rlen < this.n ? -1 : r.ucmp(this.p); + if (cmp === 0) { + r.words[0] = 0; + r.length = 1; + } else if (cmp > 0) { + r.isub(this.p); + } else { + r.strip(); + } + + return r; + }; + + MPrime.prototype.split = function split (input, out) { + input.iushrn(this.n, 0, out); + }; + + MPrime.prototype.imulK = function imulK (num) { + return num.imul(this.k); + }; + + function K256 () { + MPrime.call( + this, + 'k256', + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); + } + inherits(K256, MPrime); + + K256.prototype.split = function split (input, output) { + // 256 = 9 * 26 + 22 + var mask = 0x3fffff; + + var outLen = Math.min(input.length, 9); + for (var i = 0; i < outLen; i++) { + output.words[i] = input.words[i]; + } + output.length = outLen; + + if (input.length <= 9) { + input.words[0] = 0; + input.length = 1; + return; + } + + // Shift by 9 limbs + var prev = input.words[9]; + output.words[output.length++] = prev & mask; + + for (i = 10; i < input.length; i++) { + var next = input.words[i] | 0; + input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); + prev = next; + } + prev >>>= 22; + input.words[i - 10] = prev; + if (prev === 0 && input.length > 10) { + input.length -= 10; + } else { + input.length -= 9; + } + }; + + K256.prototype.imulK = function imulK (num) { + // K = 0x1000003d1 = [ 0x40, 0x3d1 ] + num.words[num.length] = 0; + num.words[num.length + 1] = 0; + num.length += 2; + + // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 + var lo = 0; + for (var i = 0; i < num.length; i++) { + var w = num.words[i] | 0; + lo += w * 0x3d1; + num.words[i] = lo & 0x3ffffff; + lo = w * 0x40 + ((lo / 0x4000000) | 0); + } + + // Fast length reduction + if (num.words[num.length - 1] === 0) { + num.length--; + if (num.words[num.length - 1] === 0) { + num.length--; + } + } + return num; + }; + + function P224 () { + MPrime.call( + this, + 'p224', + 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); + } + inherits(P224, MPrime); + + function P192 () { + MPrime.call( + this, + 'p192', + 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); + } + inherits(P192, MPrime); + + function P25519 () { + // 2 ^ 255 - 19 + MPrime.call( + this, + '25519', + '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); + } + inherits(P25519, MPrime); + + P25519.prototype.imulK = function imulK (num) { + // K = 0x13 + var carry = 0; + for (var i = 0; i < num.length; i++) { + var hi = (num.words[i] | 0) * 0x13 + carry; + var lo = hi & 0x3ffffff; + hi >>>= 26; + + num.words[i] = lo; + carry = hi; + } + if (carry !== 0) { + num.words[num.length++] = carry; + } + return num; + }; + + // Exported mostly for testing purposes, use plain name instead + BN._prime = function prime (name) { + // Cached version of prime + if (primes[name]) return primes[name]; + + var prime; + if (name === 'k256') { + prime = new K256(); + } else if (name === 'p224') { + prime = new P224(); + } else if (name === 'p192') { + prime = new P192(); + } else if (name === 'p25519') { + prime = new P25519(); + } else { + throw new Error('Unknown prime ' + name); + } + primes[name] = prime; + + return prime; + }; + + // + // Base reduction engine + // + function Red (m) { + if (typeof m === 'string') { + var prime = BN._prime(m); + this.m = prime.p; + this.prime = prime; + } else { + assert(m.gtn(1), 'modulus must be greater than 1'); + this.m = m; + this.prime = null; + } + } + + Red.prototype._verify1 = function _verify1 (a) { + assert(a.negative === 0, 'red works only with positives'); + assert(a.red, 'red works only with red numbers'); + }; + + Red.prototype._verify2 = function _verify2 (a, b) { + assert((a.negative | b.negative) === 0, 'red works only with positives'); + assert(a.red && a.red === b.red, + 'red works only with red numbers'); + }; + + Red.prototype.imod = function imod (a) { + if (this.prime) return this.prime.ireduce(a)._forceRed(this); + return a.umod(this.m)._forceRed(this); + }; + + Red.prototype.neg = function neg (a) { + if (a.isZero()) { + return a.clone(); + } + + return this.m.sub(a)._forceRed(this); + }; + + Red.prototype.add = function add (a, b) { + this._verify2(a, b); + + var res = a.add(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.iadd = function iadd (a, b) { + this._verify2(a, b); + + var res = a.iadd(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res; + }; + + Red.prototype.sub = function sub (a, b) { + this._verify2(a, b); + + var res = a.sub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.isub = function isub (a, b) { + this._verify2(a, b); + + var res = a.isub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res; + }; + + Red.prototype.shl = function shl (a, num) { + this._verify1(a); + return this.imod(a.ushln(num)); + }; + + Red.prototype.imul = function imul (a, b) { + this._verify2(a, b); + return this.imod(a.imul(b)); + }; + + Red.prototype.mul = function mul (a, b) { + this._verify2(a, b); + return this.imod(a.mul(b)); + }; + + Red.prototype.isqr = function isqr (a) { + return this.imul(a, a.clone()); + }; + + Red.prototype.sqr = function sqr (a) { + return this.mul(a, a); + }; + + Red.prototype.sqrt = function sqrt (a) { + if (a.isZero()) return a.clone(); + + var mod3 = this.m.andln(3); + assert(mod3 % 2 === 1); + + // Fast case + if (mod3 === 3) { + var pow = this.m.add(new BN(1)).iushrn(2); + return this.pow(a, pow); + } + + // Tonelli-Shanks algorithm (Totally unoptimized and slow) + // + // Find Q and S, that Q * 2 ^ S = (P - 1) + var q = this.m.subn(1); + var s = 0; + while (!q.isZero() && q.andln(1) === 0) { + s++; + q.iushrn(1); + } + assert(!q.isZero()); + + var one = new BN(1).toRed(this); + var nOne = one.redNeg(); + + // Find quadratic non-residue + // NOTE: Max is such because of generalized Riemann hypothesis. + var lpow = this.m.subn(1).iushrn(1); + var z = this.m.bitLength(); + z = new BN(2 * z * z).toRed(this); + + while (this.pow(z, lpow).cmp(nOne) !== 0) { + z.redIAdd(nOne); + } + + var c = this.pow(z, q); + var r = this.pow(a, q.addn(1).iushrn(1)); + var t = this.pow(a, q); + var m = s; + while (t.cmp(one) !== 0) { + var tmp = t; + for (var i = 0; tmp.cmp(one) !== 0; i++) { + tmp = tmp.redSqr(); + } + assert(i < m); + var b = this.pow(c, new BN(1).iushln(m - i - 1)); + + r = r.redMul(b); + c = b.redSqr(); + t = t.redMul(c); + m = i; + } + + return r; + }; + + Red.prototype.invm = function invm (a) { + var inv = a._invmp(this.m); + if (inv.negative !== 0) { + inv.negative = 0; + return this.imod(inv).redNeg(); + } else { + return this.imod(inv); + } + }; + + Red.prototype.pow = function pow (a, num) { + if (num.isZero()) return new BN(1); + if (num.cmpn(1) === 0) return a.clone(); + + var windowSize = 4; + var wnd = new Array(1 << windowSize); + wnd[0] = new BN(1).toRed(this); + wnd[1] = a; + for (var i = 2; i < wnd.length; i++) { + wnd[i] = this.mul(wnd[i - 1], a); + } + + var res = wnd[0]; + var current = 0; + var currentLen = 0; + var start = num.bitLength() % 26; + if (start === 0) { + start = 26; + } + + for (i = num.length - 1; i >= 0; i--) { + var word = num.words[i]; + for (var j = start - 1; j >= 0; j--) { + var bit = (word >> j) & 1; + if (res !== wnd[0]) { + res = this.sqr(res); + } + + if (bit === 0 && current === 0) { + currentLen = 0; + continue; + } + + current <<= 1; + current |= bit; + currentLen++; + if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; + + res = this.mul(res, wnd[current]); + currentLen = 0; + current = 0; + } + start = 26; + } + + return res; + }; + + Red.prototype.convertTo = function convertTo (num) { + var r = num.umod(this.m); + + return r === num ? r.clone() : r; + }; + + Red.prototype.convertFrom = function convertFrom (num) { + var res = num.clone(); + res.red = null; + return res; + }; + + // + // Montgomery method engine + // + + BN.mont = function mont (num) { + return new Mont(num); + }; + + function Mont (m) { + Red.call(this, m); + + this.shift = this.m.bitLength(); + if (this.shift % 26 !== 0) { + this.shift += 26 - (this.shift % 26); + } + + this.r = new BN(1).iushln(this.shift); + this.r2 = this.imod(this.r.sqr()); + this.rinv = this.r._invmp(this.m); + + this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); + this.minv = this.minv.umod(this.r); + this.minv = this.r.sub(this.minv); + } + inherits(Mont, Red); + + Mont.prototype.convertTo = function convertTo (num) { + return this.imod(num.ushln(this.shift)); + }; + + Mont.prototype.convertFrom = function convertFrom (num) { + var r = this.imod(num.mul(this.rinv)); + r.red = null; + return r; + }; + + Mont.prototype.imul = function imul (a, b) { + if (a.isZero() || b.isZero()) { + a.words[0] = 0; + a.length = 1; + return a; + } + + var t = a.imul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.mul = function mul (a, b) { + if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); + + var t = a.mul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.invm = function invm (a) { + // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R + var res = this.imod(a._invmp(this.m).mul(this.r2)); + return res._forceRed(this); + }; +})(typeof module === 'undefined' || module, this); + +},{}],155:[function(require,module,exports){ +(function (Buffer){ +'use strict'; + +var isHexPrefixed = require('is-hex-prefixed'); +var stripHexPrefix = require('strip-hex-prefix'); + +/** + * Pads a `String` to have an even length + * @param {String} value + * @return {String} output + */ +function padToEven(value) { + var a = value; // eslint-disable-line + + if (typeof a !== 'string') { + throw new Error('[ethjs-util] while padding to even, value must be string, is currently ' + typeof a + ', while padToEven.'); + } + + if (a.length % 2) { + a = '0' + a; + } + + return a; +} + +/** + * Converts a `Number` into a hex `String` + * @param {Number} i + * @return {String} + */ +function intToHex(i) { + var hex = i.toString(16); // eslint-disable-line + + return '0x' + hex; +} + +/** + * Converts an `Number` to a `Buffer` + * @param {Number} i + * @return {Buffer} + */ +function intToBuffer(i) { + var hex = intToHex(i); + + return new Buffer(padToEven(hex.slice(2)), 'hex'); +} + +/** + * Get the binary size of a string + * @param {String} str + * @return {Number} + */ +function getBinarySize(str) { + if (typeof str !== 'string') { + throw new Error('[ethjs-util] while getting binary size, method getBinarySize requires input \'str\' to be type String, got \'' + typeof str + '\'.'); + } + + return Buffer.byteLength(str, 'utf8'); +} + +/** + * Returns TRUE if the first specified array contains all elements + * from the second one. FALSE otherwise. + * + * @param {array} superset + * @param {array} subset + * + * @returns {boolean} + */ +function arrayContainsArray(superset, subset, some) { + if (Array.isArray(superset) !== true) { + throw new Error('[ethjs-util] method arrayContainsArray requires input \'superset\' to be an array got type \'' + typeof superset + '\''); + } + if (Array.isArray(subset) !== true) { + throw new Error('[ethjs-util] method arrayContainsArray requires input \'subset\' to be an array got type \'' + typeof subset + '\''); + } + + return subset[Boolean(some) && 'some' || 'every'](function (value) { + return superset.indexOf(value) >= 0; + }); +} + +/** + * Should be called to get utf8 from it's hex representation + * + * @method toUtf8 + * @param {String} string in hex + * @returns {String} ascii string representation of hex value + */ +function toUtf8(hex) { + var bufferValue = new Buffer(padToEven(stripHexPrefix(hex).replace(/^0+|0+$/g, '')), 'hex'); + + return bufferValue.toString('utf8'); +} + +/** + * Should be called to get ascii from it's hex representation + * + * @method toAscii + * @param {String} string in hex + * @returns {String} ascii string representation of hex value + */ +function toAscii(hex) { + var str = ''; // eslint-disable-line + var i = 0, + l = hex.length; // eslint-disable-line + + if (hex.substring(0, 2) === '0x') { + i = 2; + } + + for (; i < l; i += 2) { + var code = parseInt(hex.substr(i, 2), 16); + str += String.fromCharCode(code); + } + + return str; +} + +/** + * Should be called to get hex representation (prefixed by 0x) of utf8 string + * + * @method fromUtf8 + * @param {String} string + * @param {Number} optional padding + * @returns {String} hex representation of input string + */ +function fromUtf8(stringValue) { + var str = new Buffer(stringValue, 'utf8'); + + return '0x' + padToEven(str.toString('hex')).replace(/^0+|0+$/g, ''); +} + +/** + * Should be called to get hex representation (prefixed by 0x) of ascii string + * + * @method fromAscii + * @param {String} string + * @param {Number} optional padding + * @returns {String} hex representation of input string + */ +function fromAscii(stringValue) { + var hex = ''; // eslint-disable-line + for (var i = 0; i < stringValue.length; i++) { + // eslint-disable-line + var code = stringValue.charCodeAt(i); + var n = code.toString(16); + hex += n.length < 2 ? '0' + n : n; + } + + return '0x' + hex; +} + +/** + * getKeys([{a: 1, b: 2}, {a: 3, b: 4}], 'a') => [1, 3] + * + * @method getKeys get specific key from inner object array of objects + * @param {String} params + * @param {String} key + * @param {Boolean} allowEmpty + * @returns {Array} output just a simple array of output keys + */ +function getKeys(params, key, allowEmpty) { + if (!Array.isArray(params)) { + throw new Error('[ethjs-util] method getKeys expecting type Array as \'params\' input, got \'' + typeof params + '\''); + } + if (typeof key !== 'string') { + throw new Error('[ethjs-util] method getKeys expecting type String for input \'key\' got \'' + typeof key + '\'.'); + } + + var result = []; // eslint-disable-line + + for (var i = 0; i < params.length; i++) { + // eslint-disable-line + var value = params[i][key]; // eslint-disable-line + if (allowEmpty && !value) { + value = ''; + } else if (typeof value !== 'string') { + throw new Error('invalid abi'); + } + result.push(value); + } + + return result; +} + +/** + * Is the string a hex string. + * + * @method check if string is hex string of specific length + * @param {String} value + * @param {Number} length + * @returns {Boolean} output the string is a hex string + */ +function isHexString(value, length) { + if (typeof value !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/)) { + return false; + } + + if (length && value.length !== 2 + 2 * length) { + return false; + } + + return true; +} + +module.exports = { + arrayContainsArray: arrayContainsArray, + intToBuffer: intToBuffer, + getBinarySize: getBinarySize, + isHexPrefixed: isHexPrefixed, + stripHexPrefix: stripHexPrefix, + padToEven: padToEven, + intToHex: intToHex, + fromAscii: fromAscii, + fromUtf8: fromUtf8, + toAscii: toAscii, + toUtf8: toUtf8, + getKeys: getKeys, + isHexString: isHexString +}; +}).call(this,require("buffer").Buffer) +},{"buffer":84,"is-hex-prefixed":185,"strip-hex-prefix":318}],156:[function(require,module,exports){ +'use strict'; + +// +// We store our EE objects in a plain object whose properties are event names. +// If `Object.create(null)` is not supported we prefix the event names with a +// `~` to make sure that the built-in object properties are not overridden or +// used as an attack vector. +// We also assume that `Object.create(null)` is available when the event name +// is an ES6 Symbol. +// +var prefix = typeof Object.create !== 'function' ? '~' : false; + +/** + * Representation of a single EventEmitter function. + * + * @param {Function} fn Event handler to be called. + * @param {Mixed} context Context for function execution. + * @param {Boolean} once Only emit once + * @api private + */ +function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; +} + +/** + * Minimal EventEmitter interface that is molded against the Node.js + * EventEmitter interface. + * + * @constructor + * @api public + */ +function EventEmitter() { /* Nothing to set */ } + +/** + * Holds the assigned EventEmitters by name. + * + * @type {Object} + * @private + */ +EventEmitter.prototype._events = undefined; + +/** + * Return a list of assigned event listeners. + * + * @param {String} event The events that should be listed. + * @param {Boolean} exists We only need to know if there are listeners. + * @returns {Array|Boolean} + * @api public + */ +EventEmitter.prototype.listeners = function listeners(event, exists) { + var evt = prefix ? prefix + event : event + , available = this._events && this._events[evt]; + + if (exists) return !!available; + if (!available) return []; + if (available.fn) return [available.fn]; + + for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) { + ee[i] = available[i].fn; + } + + return ee; +}; + +/** + * Emit an event to all registered event listeners. + * + * @param {String} event The name of the event. + * @returns {Boolean} Indication if we've emitted an event. + * @api public + */ +EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events || !this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if ('function' === typeof listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; +}; + +/** + * Register a new EventListener for the given event. + * + * @param {String} event Name of the event. + * @param {Functon} fn Callback function. + * @param {Mixed} context The context of the function. + * @api public + */ +EventEmitter.prototype.on = function on(event, fn, context) { + var listener = new EE(fn, context || this) + , evt = prefix ? prefix + event : event; + + if (!this._events) this._events = prefix ? {} : Object.create(null); + if (!this._events[evt]) this._events[evt] = listener; + else { + if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [ + this._events[evt], listener + ]; + } + + return this; +}; + +/** + * Add an EventListener that's only called once. + * + * @param {String} event Name of the event. + * @param {Function} fn Callback function. + * @param {Mixed} context The context of the function. + * @api public + */ +EventEmitter.prototype.once = function once(event, fn, context) { + var listener = new EE(fn, context || this, true) + , evt = prefix ? prefix + event : event; + + if (!this._events) this._events = prefix ? {} : Object.create(null); + if (!this._events[evt]) this._events[evt] = listener; + else { + if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [ + this._events[evt], listener + ]; + } + + return this; +}; + +/** + * Remove event listeners. + * + * @param {String} event The event we want to remove. + * @param {Function} fn The listener that we need to find. + * @param {Mixed} context Only remove listeners matching this context. + * @param {Boolean} once Only remove once listeners. + * @api public + */ +EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events || !this._events[evt]) return this; + + var listeners = this._events[evt] + , events = []; + + if (fn) { + if (listeners.fn) { + if ( + listeners.fn !== fn + || (once && !listeners.once) + || (context && listeners.context !== context) + ) { + events.push(listeners); + } + } else { + for (var i = 0, length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn + || (once && !listeners[i].once) + || (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) { + this._events[evt] = events.length === 1 ? events[0] : events; + } else { + delete this._events[evt]; + } + + return this; +}; + +/** + * Remove all listeners or only the listeners for the specified event. + * + * @param {String} event The event want to remove all listeners for. + * @api public + */ +EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + if (!this._events) return this; + + if (event) delete this._events[prefix ? prefix + event : event]; + else this._events = prefix ? {} : Object.create(null); + + return this; +}; + +// +// Alias methods names because people roll like that. +// +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; +EventEmitter.prototype.addListener = EventEmitter.prototype.on; + +// +// This function doesn't apply anymore. +// +EventEmitter.prototype.setMaxListeners = function setMaxListeners() { + return this; +}; + +// +// Expose the prefix. +// +EventEmitter.prefixed = prefix; + +// +// Expose the module. +// +if ('undefined' !== typeof module) { + module.exports = EventEmitter; +} + +},{}],157:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +function EventEmitter() { + this._events = this._events || {}; + this._maxListeners = this._maxListeners || undefined; +} +module.exports = EventEmitter; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +EventEmitter.defaultMaxListeners = 10; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function(n) { + if (!isNumber(n) || n < 0 || isNaN(n)) + throw TypeError('n must be a positive number'); + this._maxListeners = n; + return this; +}; + +EventEmitter.prototype.emit = function(type) { + var er, handler, len, args, i, listeners; + + if (!this._events) + this._events = {}; + + // If there is no 'error' event listener then throw. + if (type === 'error') { + if (!this._events.error || + (isObject(this._events.error) && !this._events.error.length)) { + er = arguments[1]; + if (er instanceof Error) { + throw er; // Unhandled 'error' event + } else { + // At least give some kind of context to the user + var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); + err.context = er; + throw err; + } + } + } + + handler = this._events[type]; + + if (isUndefined(handler)) + return false; + + if (isFunction(handler)) { + switch (arguments.length) { + // fast cases + case 1: + handler.call(this); + break; + case 2: + handler.call(this, arguments[1]); + break; + case 3: + handler.call(this, arguments[1], arguments[2]); + break; + // slower + default: + args = Array.prototype.slice.call(arguments, 1); + handler.apply(this, args); + } + } else if (isObject(handler)) { + args = Array.prototype.slice.call(arguments, 1); + listeners = handler.slice(); + len = listeners.length; + for (i = 0; i < len; i++) + listeners[i].apply(this, args); + } + + return true; +}; + +EventEmitter.prototype.addListener = function(type, listener) { + var m; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events) + this._events = {}; + + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (this._events.newListener) + this.emit('newListener', type, + isFunction(listener.listener) ? + listener.listener : listener); + + if (!this._events[type]) + // Optimize the case of one listener. Don't need the extra array object. + this._events[type] = listener; + else if (isObject(this._events[type])) + // If we've already got an array, just append. + this._events[type].push(listener); + else + // Adding the second element, need to change to array. + this._events[type] = [this._events[type], listener]; + + // Check for listener leak + if (isObject(this._events[type]) && !this._events[type].warned) { + if (!isUndefined(this._maxListeners)) { + m = this._maxListeners; + } else { + m = EventEmitter.defaultMaxListeners; + } + + if (m && m > 0 && this._events[type].length > m) { + this._events[type].warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + this._events[type].length); + if (typeof console.trace === 'function') { + // not supported in IE 10 + console.trace(); + } + } + } + + return this; +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.once = function(type, listener) { + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + var fired = false; + + function g() { + this.removeListener(type, g); + + if (!fired) { + fired = true; + listener.apply(this, arguments); + } + } + + g.listener = listener; + this.on(type, g); + + return this; +}; + +// emits a 'removeListener' event iff the listener was removed +EventEmitter.prototype.removeListener = function(type, listener) { + var list, position, length, i; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events || !this._events[type]) + return this; + + list = this._events[type]; + length = list.length; + position = -1; + + if (list === listener || + (isFunction(list.listener) && list.listener === listener)) { + delete this._events[type]; + if (this._events.removeListener) + this.emit('removeListener', type, listener); + + } else if (isObject(list)) { + for (i = length; i-- > 0;) { + if (list[i] === listener || + (list[i].listener && list[i].listener === listener)) { + position = i; + break; + } + } + + if (position < 0) + return this; + + if (list.length === 1) { + list.length = 0; + delete this._events[type]; + } else { + list.splice(position, 1); + } + + if (this._events.removeListener) + this.emit('removeListener', type, listener); + } + + return this; +}; + +EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; + + if (!this._events) + return this; + + // not listening for removeListener, no need to emit + if (!this._events.removeListener) { + if (arguments.length === 0) + this._events = {}; + else if (this._events[type]) + delete this._events[type]; + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + for (key in this._events) { + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = {}; + return this; + } + + listeners = this._events[type]; + + if (isFunction(listeners)) { + this.removeListener(type, listeners); + } else if (listeners) { + // LIFO order + while (listeners.length) + this.removeListener(type, listeners[listeners.length - 1]); + } + delete this._events[type]; + + return this; +}; + +EventEmitter.prototype.listeners = function(type) { + var ret; + if (!this._events || !this._events[type]) + ret = []; + else if (isFunction(this._events[type])) + ret = [this._events[type]]; + else + ret = this._events[type].slice(); + return ret; +}; + +EventEmitter.prototype.listenerCount = function(type) { + if (this._events) { + var evlistener = this._events[type]; + + if (isFunction(evlistener)) + return 1; + else if (evlistener) + return evlistener.length; + } + return 0; +}; + +EventEmitter.listenerCount = function(emitter, type) { + return emitter.listenerCount(type); +}; + +function isFunction(arg) { + return typeof arg === 'function'; +} + +function isNumber(arg) { + return typeof arg === 'number'; +} + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} + +function isUndefined(arg) { + return arg === void 0; +} + +},{}],158:[function(require,module,exports){ +var Buffer = require('safe-buffer').Buffer +var MD5 = require('md5.js') + +/* eslint-disable camelcase */ +function EVP_BytesToKey (password, salt, keyBits, ivLen) { + if (!Buffer.isBuffer(password)) password = Buffer.from(password, 'binary') + if (salt) { + if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, 'binary') + if (salt.length !== 8) throw new RangeError('salt should be Buffer with 8 byte length') + } + + var keyLen = keyBits / 8 + var key = Buffer.alloc(keyLen) + var iv = Buffer.alloc(ivLen || 0) + var tmp = Buffer.alloc(0) + + while (keyLen > 0 || ivLen > 0) { + var hash = new MD5() + hash.update(tmp) + hash.update(password) + if (salt) hash.update(salt) + tmp = hash.digest() + + var used = 0 + + if (keyLen > 0) { + var keyStart = key.length - keyLen + used = Math.min(keyLen, tmp.length) + tmp.copy(key, keyStart, 0, used) + keyLen -= used + } + + if (used < tmp.length && ivLen > 0) { + var ivStart = iv.length - ivLen + var length = Math.min(ivLen, tmp.length - used) + tmp.copy(iv, ivStart, used, used + length) + ivLen -= length + } + } + + tmp.fill(0) + return { key: key, iv: iv } +} + +module.exports = EVP_BytesToKey + +},{"md5.js":231,"safe-buffer":290}],159:[function(require,module,exports){ +'use strict'; + +var isCallable = require('is-callable'); + +var toStr = Object.prototype.toString; +var hasOwnProperty = Object.prototype.hasOwnProperty; + +var forEachArray = function forEachArray(array, iterator, receiver) { + for (var i = 0, len = array.length; i < len; i++) { + if (hasOwnProperty.call(array, i)) { + if (receiver == null) { + iterator(array[i], i, array); + } else { + iterator.call(receiver, array[i], i, array); + } + } + } +}; + +var forEachString = function forEachString(string, iterator, receiver) { + for (var i = 0, len = string.length; i < len; i++) { + // no such thing as a sparse string. + if (receiver == null) { + iterator(string.charAt(i), i, string); + } else { + iterator.call(receiver, string.charAt(i), i, string); + } + } +}; + +var forEachObject = function forEachObject(object, iterator, receiver) { + for (var k in object) { + if (hasOwnProperty.call(object, k)) { + if (receiver == null) { + iterator(object[k], k, object); + } else { + iterator.call(receiver, object[k], k, object); + } + } + } +}; + +var forEach = function forEach(list, iterator, thisArg) { + if (!isCallable(iterator)) { + throw new TypeError('iterator must be a function'); + } + + var receiver; + if (arguments.length >= 3) { + receiver = thisArg; + } + + if (toStr.call(list) === '[object Array]') { + forEachArray(list, iterator, receiver); + } else if (typeof list === 'string') { + forEachString(list, iterator, receiver); + } else { + forEachObject(list, iterator, receiver); + } +}; + +module.exports = forEach; + +},{"is-callable":182}],160:[function(require,module,exports){ +(function (global){ +var win; + +if (typeof window !== "undefined") { + win = window; +} else if (typeof global !== "undefined") { + win = global; +} else if (typeof self !== "undefined"){ + win = self; +} else { + win = {}; +} + +module.exports = win; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],161:[function(require,module,exports){ +(function (Buffer){ +'use strict' +var Transform = require('stream').Transform +var inherits = require('inherits') + +function HashBase (blockSize) { + Transform.call(this) + + this._block = new Buffer(blockSize) + this._blockSize = blockSize + this._blockOffset = 0 + this._length = [0, 0, 0, 0] + + this._finalized = false +} + +inherits(HashBase, Transform) + +HashBase.prototype._transform = function (chunk, encoding, callback) { + var error = null + try { + if (encoding !== 'buffer') chunk = new Buffer(chunk, encoding) + this.update(chunk) + } catch (err) { + error = err + } + + callback(error) +} + +HashBase.prototype._flush = function (callback) { + var error = null + try { + this.push(this._digest()) + } catch (err) { + error = err + } + + callback(error) +} + +HashBase.prototype.update = function (data, encoding) { + if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer') + if (this._finalized) throw new Error('Digest already called') + if (!Buffer.isBuffer(data)) data = new Buffer(data, encoding || 'binary') + + // consume data + var block = this._block + var offset = 0 + while (this._blockOffset + data.length - offset >= this._blockSize) { + for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++] + this._update() + this._blockOffset = 0 + } + while (offset < data.length) block[this._blockOffset++] = data[offset++] + + // update length + for (var j = 0, carry = data.length * 8; carry > 0; ++j) { + this._length[j] += carry + carry = (this._length[j] / 0x0100000000) | 0 + if (carry > 0) this._length[j] -= 0x0100000000 * carry + } + + return this +} + +HashBase.prototype._update = function (data) { + throw new Error('_update is not implemented') +} + +HashBase.prototype.digest = function (encoding) { + if (this._finalized) throw new Error('Digest already called') + this._finalized = true + + var digest = this._digest() + if (encoding !== undefined) digest = digest.toString(encoding) + return digest +} + +HashBase.prototype._digest = function () { + throw new Error('_digest is not implemented') +} + +module.exports = HashBase + +}).call(this,require("buffer").Buffer) +},{"buffer":84,"inherits":180,"stream":311}],162:[function(require,module,exports){ +var hash = exports; + +hash.utils = require('./hash/utils'); +hash.common = require('./hash/common'); +hash.sha = require('./hash/sha'); +hash.ripemd = require('./hash/ripemd'); +hash.hmac = require('./hash/hmac'); + +// Proxy hash functions to the main object +hash.sha1 = hash.sha.sha1; +hash.sha256 = hash.sha.sha256; +hash.sha224 = hash.sha.sha224; +hash.sha384 = hash.sha.sha384; +hash.sha512 = hash.sha.sha512; +hash.ripemd160 = hash.ripemd.ripemd160; + +},{"./hash/common":163,"./hash/hmac":164,"./hash/ripemd":165,"./hash/sha":166,"./hash/utils":173}],163:[function(require,module,exports){ +'use strict'; + +var utils = require('./utils'); +var assert = require('minimalistic-assert'); + +function BlockHash() { + this.pending = null; + this.pendingTotal = 0; + this.blockSize = this.constructor.blockSize; + this.outSize = this.constructor.outSize; + this.hmacStrength = this.constructor.hmacStrength; + this.padLength = this.constructor.padLength / 8; + this.endian = 'big'; + + this._delta8 = this.blockSize / 8; + this._delta32 = this.blockSize / 32; +} +exports.BlockHash = BlockHash; + +BlockHash.prototype.update = function update(msg, enc) { + // Convert message to array, pad it, and join into 32bit blocks + msg = utils.toArray(msg, enc); + if (!this.pending) + this.pending = msg; + else + this.pending = this.pending.concat(msg); + this.pendingTotal += msg.length; + + // Enough data, try updating + if (this.pending.length >= this._delta8) { + msg = this.pending; + + // Process pending data in blocks + var r = msg.length % this._delta8; + this.pending = msg.slice(msg.length - r, msg.length); + if (this.pending.length === 0) + this.pending = null; + + msg = utils.join32(msg, 0, msg.length - r, this.endian); + for (var i = 0; i < msg.length; i += this._delta32) + this._update(msg, i, i + this._delta32); + } + + return this; +}; + +BlockHash.prototype.digest = function digest(enc) { + this.update(this._pad()); + assert(this.pending === null); + + return this._digest(enc); +}; + +BlockHash.prototype._pad = function pad() { + var len = this.pendingTotal; + var bytes = this._delta8; + var k = bytes - ((len + this.padLength) % bytes); + var res = new Array(k + this.padLength); + res[0] = 0x80; + for (var i = 1; i < k; i++) + res[i] = 0; + + // Append length + len <<= 3; + if (this.endian === 'big') { + for (var t = 8; t < this.padLength; t++) + res[i++] = 0; + + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = (len >>> 24) & 0xff; + res[i++] = (len >>> 16) & 0xff; + res[i++] = (len >>> 8) & 0xff; + res[i++] = len & 0xff; + } else { + res[i++] = len & 0xff; + res[i++] = (len >>> 8) & 0xff; + res[i++] = (len >>> 16) & 0xff; + res[i++] = (len >>> 24) & 0xff; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + + for (t = 8; t < this.padLength; t++) + res[i++] = 0; + } + + return res; +}; + +},{"./utils":173,"minimalistic-assert":234}],164:[function(require,module,exports){ +'use strict'; + +var utils = require('./utils'); +var assert = require('minimalistic-assert'); + +function Hmac(hash, key, enc) { + if (!(this instanceof Hmac)) + return new Hmac(hash, key, enc); + this.Hash = hash; + this.blockSize = hash.blockSize / 8; + this.outSize = hash.outSize / 8; + this.inner = null; + this.outer = null; + + this._init(utils.toArray(key, enc)); +} +module.exports = Hmac; + +Hmac.prototype._init = function init(key) { + // Shorten key, if needed + if (key.length > this.blockSize) + key = new this.Hash().update(key).digest(); + assert(key.length <= this.blockSize); + + // Add padding to key + for (var i = key.length; i < this.blockSize; i++) + key.push(0); + + for (i = 0; i < key.length; i++) + key[i] ^= 0x36; + this.inner = new this.Hash().update(key); + + // 0x36 ^ 0x5c = 0x6a + for (i = 0; i < key.length; i++) + key[i] ^= 0x6a; + this.outer = new this.Hash().update(key); +}; + +Hmac.prototype.update = function update(msg, enc) { + this.inner.update(msg, enc); + return this; +}; + +Hmac.prototype.digest = function digest(enc) { + this.outer.update(this.inner.digest()); + return this.outer.digest(enc); +}; + +},{"./utils":173,"minimalistic-assert":234}],165:[function(require,module,exports){ +'use strict'; + +var utils = require('./utils'); +var common = require('./common'); + +var rotl32 = utils.rotl32; +var sum32 = utils.sum32; +var sum32_3 = utils.sum32_3; +var sum32_4 = utils.sum32_4; +var BlockHash = common.BlockHash; + +function RIPEMD160() { + if (!(this instanceof RIPEMD160)) + return new RIPEMD160(); + + BlockHash.call(this); + + this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ]; + this.endian = 'little'; +} +utils.inherits(RIPEMD160, BlockHash); +exports.ripemd160 = RIPEMD160; + +RIPEMD160.blockSize = 512; +RIPEMD160.outSize = 160; +RIPEMD160.hmacStrength = 192; +RIPEMD160.padLength = 64; + +RIPEMD160.prototype._update = function update(msg, start) { + var A = this.h[0]; + var B = this.h[1]; + var C = this.h[2]; + var D = this.h[3]; + var E = this.h[4]; + var Ah = A; + var Bh = B; + var Ch = C; + var Dh = D; + var Eh = E; + for (var j = 0; j < 80; j++) { + var T = sum32( + rotl32( + sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)), + s[j]), + E); + A = E; + E = D; + D = rotl32(C, 10); + C = B; + B = T; + T = sum32( + rotl32( + sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), + sh[j]), + Eh); + Ah = Eh; + Eh = Dh; + Dh = rotl32(Ch, 10); + Ch = Bh; + Bh = T; + } + T = sum32_3(this.h[1], C, Dh); + this.h[1] = sum32_3(this.h[2], D, Eh); + this.h[2] = sum32_3(this.h[3], E, Ah); + this.h[3] = sum32_3(this.h[4], A, Bh); + this.h[4] = sum32_3(this.h[0], B, Ch); + this.h[0] = T; +}; + +RIPEMD160.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'little'); + else + return utils.split32(this.h, 'little'); +}; + +function f(j, x, y, z) { + if (j <= 15) + return x ^ y ^ z; + else if (j <= 31) + return (x & y) | ((~x) & z); + else if (j <= 47) + return (x | (~y)) ^ z; + else if (j <= 63) + return (x & z) | (y & (~z)); + else + return x ^ (y | (~z)); +} + +function K(j) { + if (j <= 15) + return 0x00000000; + else if (j <= 31) + return 0x5a827999; + else if (j <= 47) + return 0x6ed9eba1; + else if (j <= 63) + return 0x8f1bbcdc; + else + return 0xa953fd4e; +} + +function Kh(j) { + if (j <= 15) + return 0x50a28be6; + else if (j <= 31) + return 0x5c4dd124; + else if (j <= 47) + return 0x6d703ef3; + else if (j <= 63) + return 0x7a6d76e9; + else + return 0x00000000; +} + +var r = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 +]; + +var rh = [ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 +]; + +var s = [ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 +]; + +var sh = [ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 +]; + +},{"./common":163,"./utils":173}],166:[function(require,module,exports){ +'use strict'; + +exports.sha1 = require('./sha/1'); +exports.sha224 = require('./sha/224'); +exports.sha256 = require('./sha/256'); +exports.sha384 = require('./sha/384'); +exports.sha512 = require('./sha/512'); + +},{"./sha/1":167,"./sha/224":168,"./sha/256":169,"./sha/384":170,"./sha/512":171}],167:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var common = require('../common'); +var shaCommon = require('./common'); + +var rotl32 = utils.rotl32; +var sum32 = utils.sum32; +var sum32_5 = utils.sum32_5; +var ft_1 = shaCommon.ft_1; +var BlockHash = common.BlockHash; + +var sha1_K = [ + 0x5A827999, 0x6ED9EBA1, + 0x8F1BBCDC, 0xCA62C1D6 +]; + +function SHA1() { + if (!(this instanceof SHA1)) + return new SHA1(); + + BlockHash.call(this); + this.h = [ + 0x67452301, 0xefcdab89, 0x98badcfe, + 0x10325476, 0xc3d2e1f0 ]; + this.W = new Array(80); +} + +utils.inherits(SHA1, BlockHash); +module.exports = SHA1; + +SHA1.blockSize = 512; +SHA1.outSize = 160; +SHA1.hmacStrength = 80; +SHA1.padLength = 64; + +SHA1.prototype._update = function _update(msg, start) { + var W = this.W; + + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + + for(; i < W.length; i++) + W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); + + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + + for (i = 0; i < W.length; i++) { + var s = ~~(i / 20); + var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); + e = d; + d = c; + c = rotl32(b, 30); + b = a; + a = t; + } + + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); +}; + +SHA1.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; + +},{"../common":163,"../utils":173,"./common":172}],168:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var SHA256 = require('./256'); + +function SHA224() { + if (!(this instanceof SHA224)) + return new SHA224(); + + SHA256.call(this); + this.h = [ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ]; +} +utils.inherits(SHA224, SHA256); +module.exports = SHA224; + +SHA224.blockSize = 512; +SHA224.outSize = 224; +SHA224.hmacStrength = 192; +SHA224.padLength = 64; + +SHA224.prototype._digest = function digest(enc) { + // Just truncate output + if (enc === 'hex') + return utils.toHex32(this.h.slice(0, 7), 'big'); + else + return utils.split32(this.h.slice(0, 7), 'big'); +}; + + +},{"../utils":173,"./256":169}],169:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var common = require('../common'); +var shaCommon = require('./common'); +var assert = require('minimalistic-assert'); + +var sum32 = utils.sum32; +var sum32_4 = utils.sum32_4; +var sum32_5 = utils.sum32_5; +var ch32 = shaCommon.ch32; +var maj32 = shaCommon.maj32; +var s0_256 = shaCommon.s0_256; +var s1_256 = shaCommon.s1_256; +var g0_256 = shaCommon.g0_256; +var g1_256 = shaCommon.g1_256; + +var BlockHash = common.BlockHash; + +var sha256_K = [ + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +]; + +function SHA256() { + if (!(this instanceof SHA256)) + return new SHA256(); + + BlockHash.call(this); + this.h = [ + 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, + 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 + ]; + this.k = sha256_K; + this.W = new Array(64); +} +utils.inherits(SHA256, BlockHash); +module.exports = SHA256; + +SHA256.blockSize = 512; +SHA256.outSize = 256; +SHA256.hmacStrength = 192; +SHA256.padLength = 64; + +SHA256.prototype._update = function _update(msg, start) { + var W = this.W; + + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + for (; i < W.length; i++) + W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]); + + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + var f = this.h[5]; + var g = this.h[6]; + var h = this.h[7]; + + assert(this.k.length === W.length); + for (i = 0; i < W.length; i++) { + var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]); + var T2 = sum32(s0_256(a), maj32(a, b, c)); + h = g; + g = f; + f = e; + e = sum32(d, T1); + d = c; + c = b; + b = a; + a = sum32(T1, T2); + } + + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); + this.h[5] = sum32(this.h[5], f); + this.h[6] = sum32(this.h[6], g); + this.h[7] = sum32(this.h[7], h); +}; + +SHA256.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; + +},{"../common":163,"../utils":173,"./common":172,"minimalistic-assert":234}],170:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); + +var SHA512 = require('./512'); + +function SHA384() { + if (!(this instanceof SHA384)) + return new SHA384(); + + SHA512.call(this); + this.h = [ + 0xcbbb9d5d, 0xc1059ed8, + 0x629a292a, 0x367cd507, + 0x9159015a, 0x3070dd17, + 0x152fecd8, 0xf70e5939, + 0x67332667, 0xffc00b31, + 0x8eb44a87, 0x68581511, + 0xdb0c2e0d, 0x64f98fa7, + 0x47b5481d, 0xbefa4fa4 ]; +} +utils.inherits(SHA384, SHA512); +module.exports = SHA384; + +SHA384.blockSize = 1024; +SHA384.outSize = 384; +SHA384.hmacStrength = 192; +SHA384.padLength = 128; + +SHA384.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h.slice(0, 12), 'big'); + else + return utils.split32(this.h.slice(0, 12), 'big'); +}; + +},{"../utils":173,"./512":171}],171:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var common = require('../common'); +var assert = require('minimalistic-assert'); + +var rotr64_hi = utils.rotr64_hi; +var rotr64_lo = utils.rotr64_lo; +var shr64_hi = utils.shr64_hi; +var shr64_lo = utils.shr64_lo; +var sum64 = utils.sum64; +var sum64_hi = utils.sum64_hi; +var sum64_lo = utils.sum64_lo; +var sum64_4_hi = utils.sum64_4_hi; +var sum64_4_lo = utils.sum64_4_lo; +var sum64_5_hi = utils.sum64_5_hi; +var sum64_5_lo = utils.sum64_5_lo; + +var BlockHash = common.BlockHash; + +var sha512_K = [ + 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, + 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, + 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, + 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, + 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, + 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, + 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, + 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, + 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, + 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, + 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, + 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, + 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, + 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, + 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, + 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, + 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, + 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, + 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, + 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, + 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, + 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, + 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, + 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, + 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, + 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, + 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, + 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, + 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, + 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, + 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, + 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, + 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, + 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, + 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, + 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, + 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, + 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, + 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, + 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 +]; + +function SHA512() { + if (!(this instanceof SHA512)) + return new SHA512(); + + BlockHash.call(this); + this.h = [ + 0x6a09e667, 0xf3bcc908, + 0xbb67ae85, 0x84caa73b, + 0x3c6ef372, 0xfe94f82b, + 0xa54ff53a, 0x5f1d36f1, + 0x510e527f, 0xade682d1, + 0x9b05688c, 0x2b3e6c1f, + 0x1f83d9ab, 0xfb41bd6b, + 0x5be0cd19, 0x137e2179 ]; + this.k = sha512_K; + this.W = new Array(160); +} +utils.inherits(SHA512, BlockHash); +module.exports = SHA512; + +SHA512.blockSize = 1024; +SHA512.outSize = 512; +SHA512.hmacStrength = 192; +SHA512.padLength = 128; + +SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) { + var W = this.W; + + // 32 x 32bit words + for (var i = 0; i < 32; i++) + W[i] = msg[start + i]; + for (; i < W.length; i += 2) { + var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2 + var c0_lo = g1_512_lo(W[i - 4], W[i - 3]); + var c1_hi = W[i - 14]; // i - 7 + var c1_lo = W[i - 13]; + var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15 + var c2_lo = g0_512_lo(W[i - 30], W[i - 29]); + var c3_hi = W[i - 32]; // i - 16 + var c3_lo = W[i - 31]; + + W[i] = sum64_4_hi( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo); + W[i + 1] = sum64_4_lo( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo); + } +}; + +SHA512.prototype._update = function _update(msg, start) { + this._prepareBlock(msg, start); + + var W = this.W; + + var ah = this.h[0]; + var al = this.h[1]; + var bh = this.h[2]; + var bl = this.h[3]; + var ch = this.h[4]; + var cl = this.h[5]; + var dh = this.h[6]; + var dl = this.h[7]; + var eh = this.h[8]; + var el = this.h[9]; + var fh = this.h[10]; + var fl = this.h[11]; + var gh = this.h[12]; + var gl = this.h[13]; + var hh = this.h[14]; + var hl = this.h[15]; + + assert(this.k.length === W.length); + for (var i = 0; i < W.length; i += 2) { + var c0_hi = hh; + var c0_lo = hl; + var c1_hi = s1_512_hi(eh, el); + var c1_lo = s1_512_lo(eh, el); + var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl); + var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl); + var c3_hi = this.k[i]; + var c3_lo = this.k[i + 1]; + var c4_hi = W[i]; + var c4_lo = W[i + 1]; + + var T1_hi = sum64_5_hi( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo, + c4_hi, c4_lo); + var T1_lo = sum64_5_lo( + c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo, + c4_hi, c4_lo); + + c0_hi = s0_512_hi(ah, al); + c0_lo = s0_512_lo(ah, al); + c1_hi = maj64_hi(ah, al, bh, bl, ch, cl); + c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); + + var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo); + var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo); + + hh = gh; + hl = gl; + + gh = fh; + gl = fl; + + fh = eh; + fl = el; + + eh = sum64_hi(dh, dl, T1_hi, T1_lo); + el = sum64_lo(dl, dl, T1_hi, T1_lo); + + dh = ch; + dl = cl; + + ch = bh; + cl = bl; + + bh = ah; + bl = al; + + ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo); + al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo); + } + + sum64(this.h, 0, ah, al); + sum64(this.h, 2, bh, bl); + sum64(this.h, 4, ch, cl); + sum64(this.h, 6, dh, dl); + sum64(this.h, 8, eh, el); + sum64(this.h, 10, fh, fl); + sum64(this.h, 12, gh, gl); + sum64(this.h, 14, hh, hl); +}; + +SHA512.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; + +function ch64_hi(xh, xl, yh, yl, zh) { + var r = (xh & yh) ^ ((~xh) & zh); + if (r < 0) + r += 0x100000000; + return r; +} + +function ch64_lo(xh, xl, yh, yl, zh, zl) { + var r = (xl & yl) ^ ((~xl) & zl); + if (r < 0) + r += 0x100000000; + return r; +} + +function maj64_hi(xh, xl, yh, yl, zh) { + var r = (xh & yh) ^ (xh & zh) ^ (yh & zh); + if (r < 0) + r += 0x100000000; + return r; +} + +function maj64_lo(xh, xl, yh, yl, zh, zl) { + var r = (xl & yl) ^ (xl & zl) ^ (yl & zl); + if (r < 0) + r += 0x100000000; + return r; +} + +function s0_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 28); + var c1_hi = rotr64_hi(xl, xh, 2); // 34 + var c2_hi = rotr64_hi(xl, xh, 7); // 39 + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function s0_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 28); + var c1_lo = rotr64_lo(xl, xh, 2); // 34 + var c2_lo = rotr64_lo(xl, xh, 7); // 39 + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +function s1_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 14); + var c1_hi = rotr64_hi(xh, xl, 18); + var c2_hi = rotr64_hi(xl, xh, 9); // 41 + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function s1_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 14); + var c1_lo = rotr64_lo(xh, xl, 18); + var c2_lo = rotr64_lo(xl, xh, 9); // 41 + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +function g0_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 1); + var c1_hi = rotr64_hi(xh, xl, 8); + var c2_hi = shr64_hi(xh, xl, 7); + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function g0_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 1); + var c1_lo = rotr64_lo(xh, xl, 8); + var c2_lo = shr64_lo(xh, xl, 7); + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +function g1_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 19); + var c1_hi = rotr64_hi(xl, xh, 29); // 61 + var c2_hi = shr64_hi(xh, xl, 6); + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function g1_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 19); + var c1_lo = rotr64_lo(xl, xh, 29); // 61 + var c2_lo = shr64_lo(xh, xl, 6); + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +},{"../common":163,"../utils":173,"minimalistic-assert":234}],172:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var rotr32 = utils.rotr32; + +function ft_1(s, x, y, z) { + if (s === 0) + return ch32(x, y, z); + if (s === 1 || s === 3) + return p32(x, y, z); + if (s === 2) + return maj32(x, y, z); +} +exports.ft_1 = ft_1; + +function ch32(x, y, z) { + return (x & y) ^ ((~x) & z); +} +exports.ch32 = ch32; + +function maj32(x, y, z) { + return (x & y) ^ (x & z) ^ (y & z); +} +exports.maj32 = maj32; + +function p32(x, y, z) { + return x ^ y ^ z; +} +exports.p32 = p32; + +function s0_256(x) { + return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); +} +exports.s0_256 = s0_256; + +function s1_256(x) { + return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); +} +exports.s1_256 = s1_256; + +function g0_256(x) { + return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3); +} +exports.g0_256 = g0_256; + +function g1_256(x) { + return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10); +} +exports.g1_256 = g1_256; + +},{"../utils":173}],173:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); +var inherits = require('inherits'); + +exports.inherits = inherits; + +function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg === 'string') { + if (!enc) { + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + var hi = c >> 8; + var lo = c & 0xff; + if (hi) + res.push(hi, lo); + else + res.push(lo); + } + } else if (enc === 'hex') { + msg = msg.replace(/[^a-z0-9]+/ig, ''); + if (msg.length % 2 !== 0) + msg = '0' + msg; + for (i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } + } else { + for (i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + } + return res; +} +exports.toArray = toArray; + +function toHex(msg) { + var res = ''; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; +} +exports.toHex = toHex; + +function htonl(w) { + var res = (w >>> 24) | + ((w >>> 8) & 0xff00) | + ((w << 8) & 0xff0000) | + ((w & 0xff) << 24); + return res >>> 0; +} +exports.htonl = htonl; + +function toHex32(msg, endian) { + var res = ''; + for (var i = 0; i < msg.length; i++) { + var w = msg[i]; + if (endian === 'little') + w = htonl(w); + res += zero8(w.toString(16)); + } + return res; +} +exports.toHex32 = toHex32; + +function zero2(word) { + if (word.length === 1) + return '0' + word; + else + return word; +} +exports.zero2 = zero2; + +function zero8(word) { + if (word.length === 7) + return '0' + word; + else if (word.length === 6) + return '00' + word; + else if (word.length === 5) + return '000' + word; + else if (word.length === 4) + return '0000' + word; + else if (word.length === 3) + return '00000' + word; + else if (word.length === 2) + return '000000' + word; + else if (word.length === 1) + return '0000000' + word; + else + return word; +} +exports.zero8 = zero8; + +function join32(msg, start, end, endian) { + var len = end - start; + assert(len % 4 === 0); + var res = new Array(len / 4); + for (var i = 0, k = start; i < res.length; i++, k += 4) { + var w; + if (endian === 'big') + w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3]; + else + w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k]; + res[i] = w >>> 0; + } + return res; +} +exports.join32 = join32; + +function split32(msg, endian) { + var res = new Array(msg.length * 4); + for (var i = 0, k = 0; i < msg.length; i++, k += 4) { + var m = msg[i]; + if (endian === 'big') { + res[k] = m >>> 24; + res[k + 1] = (m >>> 16) & 0xff; + res[k + 2] = (m >>> 8) & 0xff; + res[k + 3] = m & 0xff; + } else { + res[k + 3] = m >>> 24; + res[k + 2] = (m >>> 16) & 0xff; + res[k + 1] = (m >>> 8) & 0xff; + res[k] = m & 0xff; + } + } + return res; +} +exports.split32 = split32; + +function rotr32(w, b) { + return (w >>> b) | (w << (32 - b)); +} +exports.rotr32 = rotr32; + +function rotl32(w, b) { + return (w << b) | (w >>> (32 - b)); +} +exports.rotl32 = rotl32; + +function sum32(a, b) { + return (a + b) >>> 0; +} +exports.sum32 = sum32; + +function sum32_3(a, b, c) { + return (a + b + c) >>> 0; +} +exports.sum32_3 = sum32_3; + +function sum32_4(a, b, c, d) { + return (a + b + c + d) >>> 0; +} +exports.sum32_4 = sum32_4; + +function sum32_5(a, b, c, d, e) { + return (a + b + c + d + e) >>> 0; +} +exports.sum32_5 = sum32_5; + +function sum64(buf, pos, ah, al) { + var bh = buf[pos]; + var bl = buf[pos + 1]; + + var lo = (al + bl) >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + buf[pos] = hi >>> 0; + buf[pos + 1] = lo; +} +exports.sum64 = sum64; + +function sum64_hi(ah, al, bh, bl) { + var lo = (al + bl) >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + return hi >>> 0; +} +exports.sum64_hi = sum64_hi; + +function sum64_lo(ah, al, bh, bl) { + var lo = al + bl; + return lo >>> 0; +} +exports.sum64_lo = sum64_lo; + +function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { + var carry = 0; + var lo = al; + lo = (lo + bl) >>> 0; + carry += lo < al ? 1 : 0; + lo = (lo + cl) >>> 0; + carry += lo < cl ? 1 : 0; + lo = (lo + dl) >>> 0; + carry += lo < dl ? 1 : 0; + + var hi = ah + bh + ch + dh + carry; + return hi >>> 0; +} +exports.sum64_4_hi = sum64_4_hi; + +function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { + var lo = al + bl + cl + dl; + return lo >>> 0; +} +exports.sum64_4_lo = sum64_4_lo; + +function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var carry = 0; + var lo = al; + lo = (lo + bl) >>> 0; + carry += lo < al ? 1 : 0; + lo = (lo + cl) >>> 0; + carry += lo < cl ? 1 : 0; + lo = (lo + dl) >>> 0; + carry += lo < dl ? 1 : 0; + lo = (lo + el) >>> 0; + carry += lo < el ? 1 : 0; + + var hi = ah + bh + ch + dh + eh + carry; + return hi >>> 0; +} +exports.sum64_5_hi = sum64_5_hi; + +function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var lo = al + bl + cl + dl + el; + + return lo >>> 0; +} +exports.sum64_5_lo = sum64_5_lo; + +function rotr64_hi(ah, al, num) { + var r = (al << (32 - num)) | (ah >>> num); + return r >>> 0; +} +exports.rotr64_hi = rotr64_hi; + +function rotr64_lo(ah, al, num) { + var r = (ah << (32 - num)) | (al >>> num); + return r >>> 0; +} +exports.rotr64_lo = rotr64_lo; + +function shr64_hi(ah, al, num) { + return ah >>> num; +} +exports.shr64_hi = shr64_hi; + +function shr64_lo(ah, al, num) { + var r = (ah << (32 - num)) | (al >>> num); + return r >>> 0; +} +exports.shr64_lo = shr64_lo; + +},{"inherits":180,"minimalistic-assert":234}],174:[function(require,module,exports){ +'use strict'; + +var hash = require('hash.js'); +var utils = require('minimalistic-crypto-utils'); +var assert = require('minimalistic-assert'); + +function HmacDRBG(options) { + if (!(this instanceof HmacDRBG)) + return new HmacDRBG(options); + this.hash = options.hash; + this.predResist = !!options.predResist; + + this.outLen = this.hash.outSize; + this.minEntropy = options.minEntropy || this.hash.hmacStrength; + + this._reseed = null; + this.reseedInterval = null; + this.K = null; + this.V = null; + + var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex'); + var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex'); + var pers = utils.toArray(options.pers, options.persEnc || 'hex'); + assert(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + this._init(entropy, nonce, pers); +} +module.exports = HmacDRBG; + +HmacDRBG.prototype._init = function init(entropy, nonce, pers) { + var seed = entropy.concat(nonce).concat(pers); + + this.K = new Array(this.outLen / 8); + this.V = new Array(this.outLen / 8); + for (var i = 0; i < this.V.length; i++) { + this.K[i] = 0x00; + this.V[i] = 0x01; + } + + this._update(seed); + this._reseed = 1; + this.reseedInterval = 0x1000000000000; // 2^48 +}; + +HmacDRBG.prototype._hmac = function hmac() { + return new hash.hmac(this.hash, this.K); +}; + +HmacDRBG.prototype._update = function update(seed) { + var kmac = this._hmac() + .update(this.V) + .update([ 0x00 ]); + if (seed) + kmac = kmac.update(seed); + this.K = kmac.digest(); + this.V = this._hmac().update(this.V).digest(); + if (!seed) + return; + + this.K = this._hmac() + .update(this.V) + .update([ 0x01 ]) + .update(seed) + .digest(); + this.V = this._hmac().update(this.V).digest(); +}; + +HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { + // Optional entropy enc + if (typeof entropyEnc !== 'string') { + addEnc = add; + add = entropyEnc; + entropyEnc = null; + } + + entropy = utils.toArray(entropy, entropyEnc); + add = utils.toArray(add, addEnc); + + assert(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + + this._update(entropy.concat(add || [])); + this._reseed = 1; +}; + +HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { + if (this._reseed > this.reseedInterval) + throw new Error('Reseed is required'); + + // Optional encoding + if (typeof enc !== 'string') { + addEnc = add; + add = enc; + enc = null; + } + + // Optional additional data + if (add) { + add = utils.toArray(add, addEnc || 'hex'); + this._update(add); + } + + var temp = []; + while (temp.length < len) { + this.V = this._hmac().update(this.V).digest(); + temp = temp.concat(this.V); + } + + var res = temp.slice(0, len); + this._update(add); + this._reseed++; + return utils.encode(res, enc); +}; + +},{"hash.js":162,"minimalistic-assert":234,"minimalistic-crypto-utils":235}],175:[function(require,module,exports){ +var http = require('http') +var url = require('url') + +var https = module.exports + +for (var key in http) { + if (http.hasOwnProperty(key)) https[key] = http[key] +} + +https.request = function (params, cb) { + params = validateParams(params) + return http.request.call(this, params, cb) +} + +https.get = function (params, cb) { + params = validateParams(params) + return http.get.call(this, params, cb) +} + +function validateParams (params) { + if (typeof params === 'string') { + params = url.parse(params) + } + if (!params.protocol) { + params.protocol = 'https:' + } + if (params.protocol !== 'https:') { + throw new Error('Protocol "' + params.protocol + '" not supported. Expected "https:"') + } + return params +} + +},{"http":312,"url":327}],176:[function(require,module,exports){ +/* This file is generated from the Unicode IDNA table, using + the build-unicode-tables.py script. Please edit that + script instead of this file. */ + +/* istanbul ignore next */ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + define([], function () { return factory(); }); + } else if (typeof exports === 'object') { + module.exports = factory(); + } else { + root.uts46_map = factory(); + } +}(this, function () { +var blocks = [ + new Uint32Array([2157250,2157314,2157378,2157442,2157506,2157570,2157634,0,2157698,2157762,2157826,2157890,2157954,0,2158018,0]), + new Uint32Array([2179041,6291456,2179073,6291456,2179105,6291456,2179137,6291456,2179169,6291456,2179201,6291456,2179233,6291456,2179265,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064]), + new Uint32Array([0,2113729,2197345,2197377,2113825,2197409,2197441,2113921,2197473,2114017,2197505,2197537,2197569,2197601,2197633,2197665]), + new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672,23068672,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672,23068672,0,0,0,0,23068672]), + new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064]), + new Uint32Array([2196001,2196033,2196065,2196097,2196129,2196161,2196193,2196225,2196257,2196289,2196321,2196353,2196385,2196417,2196449,2196481]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,0,0,0,0,0]), + new Uint32Array([2097281,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,2105889,2097185,2097697,2135777,2097633,2097441]), + new Uint32Array([2177025,6291456,2177057,6291456,2177089,6291456,2177121,6291456,2177153,6291456,2177185,6291456,2177217,6291456,2177249,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456]), + new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456]), + new Uint32Array([2134435,2134531,2134627,2134723,2134723,2134819,2134819,2134915,2134915,2135011,2105987,2135107,2135203,2135299,2131587,2135395]), + new Uint32Array([0,0,0,0,0,0,0,6291456,2168673,2169249,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354,2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354]), + new Uint32Array([2125219,2125315,2152834,2152898,2125411,2152962,2153026,2125506,2125507,2125603,2153090,2153154,2153218,2153282,2153346,2105348]), + new Uint32Array([2203393,6291456,2203425,6291456,2203457,6291456,2203489,6291456,6291456,6291456,6291456,2203521,6291456,2181281,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,23068672,6291456,2145538,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,6291456]), + new Uint32Array([2139426,2160834,2160898,2160962,2134242,2161026,2161090,2161154,2161218,2161282,2161346,2161410,2138658,2161474,2161538,2134722]), + new Uint32Array([2119939,2124930,2125026,2106658,2125218,2128962,2129058,2129154,2129250,2129346,2129442,2108866,2108770,2150466,2150530,2150594]), + new Uint32Array([2201601,6291456,2201633,6291456,2201665,6291456,2201697,6291456,2201729,6291456,2201761,6291456,2201793,6291456,2201825,6291456]), + new Uint32Array([2193537,2193569,2193601,2193633,2193665,2193697,2193729,2193761,2193793,2193825,2193857,2193889,2193921,2193953,2193985,2194017]), + new Uint32Array([6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([0,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2190561,6291456,2190593,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2190625,6291456,2190657,6291456,23068672]), + new Uint32Array([2215905,2215937,2215969,2216001,2216033,2216065,2216097,2216129,2216161,2216193,2216225,2216257,2105441,2216289,2216321,2216353]), + new Uint32Array([23068672,18884130,23068672,23068672,23068672,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672]), + new Uint32Array([23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([2191233,2191265,2191297,2191329,2191361,2191393,2191425,2117377,2191457,2191489,2191521,2191553,2191585,2191617,2191649,2117953]), + new Uint32Array([2132227,2132323,2132419,2132419,2132515,2132515,2132611,2132707,2132707,2132803,2132899,2132899,2132995,2132995,2133091,2133187]), + new Uint32Array([0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,0,0]), + new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10609889,10610785,10609921,10610817,2222241]), + new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]), + new Uint32Array([2219969,2157121,2157441,2157505,2157889,2157953,2220001,2158465,2158529,10575617,2156994,2157058,2129923,2130019,2157122,2157186]), + new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]), + new Uint32Array([2185249,6291456,2185281,6291456,2185313,6291456,2185345,6291456,2185377,6291456,2185409,6291456,2185441,6291456,2185473,6291456]), + new Uint32Array([0,0,0,0,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,6291456,0]), + new Uint32Array([2183361,6291456,2183393,6291456,2183425,6291456,2183457,6291456,2183489,6291456,2183521,6291456,2183553,6291456,2183585,6291456]), + new Uint32Array([2192161,2192193,2192225,2192257,2192289,2192321,2192353,2192385,2192417,2192449,2192481,2192513,2192545,2192577,2192609,2192641]), + new Uint32Array([2212001,2212033,2212065,2212097,2212129,2212161,2212193,2212225,2212257,2212289,2212321,2212353,2212385,2212417,2212449,2207265]), + new Uint32Array([2249825,2249857,2249889,2249921,2249954,2250018,2250082,2250145,2250177,2250209,2250241,2250274,2250337,2250370,2250433,2250465]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147905,2147969,2148033,2148097,2148161,2148225,2148289,2148353]), + new Uint32Array([10485857,6291456,2197217,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672]), + new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]), + new Uint32Array([2180353,2180385,2144033,2180417,2180449,2180481,2180513,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10610209,10610465,10610241,10610753,10609857]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]), + new Uint32Array([2223842,2223906,2223970,2224034,2224098,2224162,2224226,2224290,2224354,2224418,2224482,2224546,2224610,2224674,2224738,2224802]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]), + new Uint32Array([23068672,23068672,23068672,18923650,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,18923714,23068672,23068672]), + new Uint32Array([2126179,2125538,2126275,2126371,2126467,2125634,2126563,2105603,2105604,2125346,2126659,2126755,2126851,2098179,2098181,2098182]), + new Uint32Array([2227426,2227490,2227554,2227618,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2192353,2240642,2240642,2240705,2240737,2240737,2240769,2240802,2240866,2240929,2240961,2240993,2241025,2241057,2241089,2241121]), + new Uint32Array([6291456,2170881,2170913,2170945,6291456,2170977,6291456,2171009,2171041,6291456,6291456,6291456,2171073,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([2132226,2132514,2163586,2132610,2160386,2133090,2133186,2160450,2160514,2160578,2133570,2106178,2160642,2133858,2160706,2160770]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10532162,10532226,10532290,10532354,10532418,10532482,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]), + new Uint32Array([2098209,2108353,2108193,2108481,2170241,2111713,2105473,2105569,2105601,2112289,2112481,2098305,2108321,0,0,0]), + new Uint32Array([2209121,2209153,2209185,2209217,2209249,2209281,2209313,2209345,2209377,2209409,2209441,2209473,2207265,2209505,2209537,2209569]), + new Uint32Array([2189025,6291456,2189057,6291456,2189089,6291456,2189121,6291456,2189153,6291456,2189185,6291456,2189217,6291456,2189249,6291456]), + new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2165764,2140004]), + new Uint32Array([2215105,6291456,2215137,6291456,6291456,2215169,2215201,6291456,6291456,6291456,2215233,2215265,2215297,2215329,2215361,2215393]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,6291456,6291456,6291456,23068672,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([10505091,10505187,10505283,10505379,10505475,10505571,10505667,10505763,10505859,10505955,10506051,10506147,10506243,10506339,10506435,10506531]), + new Uint32Array([2229730,2229794,2229858,2229922,2229986,2230050,2230114,2230178,2230242,2230306,2230370,2230434,2230498,2230562,2230626,2230690]), + new Uint32Array([2105505,2098241,2108353,2108417,2105825,0,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]), + new Uint32Array([6291456,6291456,6291456,6291456,10502115,10502178,10502211,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]), + new Uint32Array([2190305,6291456,2190337,6291456,2190369,6291456,2190401,6291456,2190433,6291456,2190465,6291456,2190497,6291456,2190529,6291456]), + new Uint32Array([2173793,2173985,2174017,6291456,2173761,2173697,6291456,2174689,6291456,2174017,2174721,6291456,6291456,2174753,2174785,2174817]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609,2100033]), + new Uint32Array([2132898,2163842,2163906,2133282,2132034,2131938,2137410,2132802,2132706,2164866,2133282,2160578,2165186,2165186,6291456,6291456]), + new Uint32Array([10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059,10501155,10501251,10501347,10501443]), + new Uint32Array([2163458,2130978,2131074,2131266,2131362,2163522,2160130,2132066,2131010,2131106,2106018,2131618,2131298,2132034,2131938,2137410]), + new Uint32Array([2212961,2116993,2212993,2213025,2213057,2213089,2213121,2213153,2213185,2213217,2213249,2209633,2213281,2213313,2213345,2213377]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]), + new Uint32Array([2113729,2113825,2113921,2114017,2114113,2114209,2114305,2114401,2114497,2114593,2114689,2114785,2114881,2114977,2115073,2115169]), + new Uint32Array([2238177,2238209,2238241,2238273,2238305,2238337,2238337,2217537,2238369,2238401,2238433,2238465,2215649,2238497,2238529,2238561]), + new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]), + new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0]), + new Uint32Array([6291456,0,6291456,2145026,0,6291456,2145090,0,6291456,6291456,0,0,23068672,0,23068672,23068672]), + new Uint32Array([2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129,2100289]), + new Uint32Array([6291456,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0]), + new Uint32Array([2187681,2187713,2187745,2187777,2187809,2187841,2187873,2187905,2187937,2187969,2188001,2188033,2188065,2188097,2188129,2188161]), + new Uint32Array([0,10554498,10554562,10554626,10554690,10554754,10554818,10554882,10554946,10555010,10555074,6291456,6291456,0,0,0]), + new Uint32Array([2235170,2235234,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0]), + new Uint32Array([2181153,6291456,2188897,6291456,6291456,2188929,6291456,6291456,6291456,6291456,6291456,6291456,2111905,2100865,2188961,2188993]), + new Uint32Array([2100833,2100897,0,0,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,2112289]), + new Uint32Array([6291456,2172833,6291456,2172865,2172897,2172929,2172961,6291456,2172993,6291456,2173025,6291456,2173057,6291456,2173089,6291456]), + new Uint32Array([6291456,0,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,2190721]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456]), + new Uint32Array([2184993,6291456,2185025,6291456,2185057,6291456,2185089,6291456,2185121,6291456,2185153,6291456,2185185,6291456,2185217,6291456]), + new Uint32Array([2115265,2115361,2115457,2115553,2115649,2115745,2115841,2115937,2116033,2116129,2116225,2116321,2150658,2150722,2200225,6291456]), + new Uint32Array([2168321,6291456,2168353,6291456,2168385,6291456,2168417,6291456,2168449,6291456,2168481,6291456,2168513,6291456,2168545,6291456]), + new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,0,6291456,0,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,2186625,0,0,6291456,6291456,2186657,2186689,2186721,2173505,0,10496067,10496163,10496259]), + new Uint32Array([2178785,6291456,2178817,6291456,2178849,6291456,2178881,6291456,2178913,6291456,2178945,6291456,2178977,6291456,2179009,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]), + new Uint32Array([2097152,0,0,0,2097152,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]), + new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([0,0,2197857,2197889,2197921,2197953,2197985,2198017,0,0,2198049,2198081,2198113,2198145,2198177,2198209]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2098209,2167297,2111137,6291456]), + new Uint32Array([2171393,6291456,2171425,6291456,2171457,6291456,2171489,6291456,2171521,6291456,2171553,6291456,2171585,6291456,2171617,6291456]), + new Uint32Array([2206753,2206785,2195457,2206817,2206849,2206881,2206913,2197153,2197153,2206945,2117857,2206977,2207009,2207041,2207073,2207105]), + new Uint32Array([0,0,0,0,0,0,0,23068672,0,0,0,0,2144834,2144898,0,2144962]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672]), + new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,0,2105505,2098241]), + new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,2202049,6291456,2202081,6291456,2202113,6291456,2202145,6291456,2202177,6291456,2202209,6291456,2202241,6291456]), + new Uint32Array([10501155,10501251,10501347,10501443,10501539,10501635,10501731,10501827,10501923,10502019,2141731,2105505,2098177,2155586,2166530,0]), + new Uint32Array([2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441]), + new Uint32Array([2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330,2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]), + new Uint32Array([10502307,10502403,10502499,10502595,10502691,10502787,10502883,10502979,10503075,10503171,10503267,10503363,10503459,10503555,10503651,10503747]), + new Uint32Array([2179937,2179969,2180001,2180033,2156545,2180065,2156577,2180097,2180129,2180161,2180193,2180225,2180257,2180289,2156737,2180321]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,0,0,6291456,0,0,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]), + new Uint32Array([2227682,2227746,2227810,2227874,2227938,2228002,2228066,2228130,2228194,2228258,2228322,2228386,2228450,2228514,2228578,2228642]), + new Uint32Array([2105601,2169121,2108193,2170049,2181025,2181057,2112481,2108321,2108289,2181089,2170497,2100865,2181121,2173601,2173633,2173665]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180641,6291456,6291456,6291456]), + new Uint32Array([0,6291456,6291456,6291456,0,6291456,0,6291456,0,0,6291456,6291456,0,6291456,6291456,6291456]), + new Uint32Array([2178273,6291456,2178305,6291456,2178337,6291456,2178369,6291456,2178401,6291456,2178433,6291456,2178465,6291456,2178497,6291456]), + new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064,14680064]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]), + new Uint32Array([2237377,2237409,2236225,2237441,2237473,2217441,2215521,2215553,2217473,2237505,2237537,2209697,2237569,2215585,2237601,2237633]), + new Uint32Array([2221985,2165601,2165601,2165665,2165665,2222017,2222017,2165729,2165729,2158913,2158913,2158913,2158913,2097281,2097281,2105921]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2149634,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2176897,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2176929,6291456,2176961,6291456,2176993,6291456]), + new Uint32Array([2172641,6291456,2172673,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2172705,2172737,6291456,2172769,2172801,6291456]), + new Uint32Array([2099173,2104196,2121667,2099395,2121763,2152258,2152322,2098946,2152386,2121859,2121955,2099333,2122051,2104324,2099493,2122147]), + new Uint32Array([6291456,6291456,6291456,2145794,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2145858,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,0,0,6291456,0]), + new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,0,2097505,2105889,2097185,2097697,2135777,2097633,2097441]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([2239074,2239138,2239201,2239233,2239265,2239297,2239329,2239361,0,2239393,2239425,2239425,2239458,2239521,2239553,2209569]), + new Uint32Array([14680064,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,6291456,23068672]), + new Uint32Array([2108321,2108289,2113153,2098209,2180897,2180929,2180961,2111137,2098241,2108353,2170241,2170273,2180993,2105825,6291456,2105473]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146114,6291456,6291456,6291456,0,0,0]), + new Uint32Array([2105921,2105921,2105921,2222049,2222049,2130977,2130977,2130977,2130977,2160065,2160065,2160065,2160065,2097729,2097729,2097729]), + new Uint32Array([2218145,2214785,2207937,2218177,2218209,2192993,2210113,2212769,2218241,2218273,2216129,2218305,2216161,2218337,2218369,2218401]), + new Uint32Array([0,0,0,2156546,2156610,2156674,2156738,2156802,0,0,0,0,0,2156866,23068672,2156930]), + new Uint32Array([23068672,23068672,23068672,0,0,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]), + new Uint32Array([2213409,2213441,2213473,2213505,2213537,2213569,2213601,2213633,2213665,2195681,2213697,2213729,2213761,2213793,2213825,2213857]), + new Uint32Array([2100033,2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2201857,6291456,2201889,6291456,2201921,6291456,2201953,6291456,2201985,6291456,2202017,6291456,2176193,2176257,23068672,23068672]), + new Uint32Array([6291456,6291456,23068672,23068672,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2188193,2188225,2188257,2188289,2188321,2188353,2188385,2188417,2188449,2188481,2188513,2188545,2188577,2188609,2188641,0]), + new Uint32Array([10554529,2221089,0,10502113,10562017,10537921,10538049,2221121,2221153,0,0,0,0,0,0,0]), + new Uint32Array([2213889,2213921,2213953,2213985,2214017,2214049,2214081,2194177,2214113,2214145,2214177,2214209,2214241,2214273,2214305,2214337]), + new Uint32Array([2166978,2167042,2099169,0,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180545,6291456,6291456,6291456]), + new Uint32Array([10518915,10519011,10519107,10519203,2162242,2162306,2159554,2162370,2159362,2159618,2105922,2162434,2159746,2162498,2159810,2159874]), + new Uint32Array([2161730,2161794,2135586,2161858,2161922,2137186,2131810,2160290,2135170,2161986,2137954,2162050,2162114,2162178,10518723,10518819]), + new Uint32Array([10506627,10506723,10506819,10506915,10507011,10507107,10507203,10507299,10507395,10507491,10507587,10507683,10507779,10507875,10507971,10508067]), + new Uint32Array([6291456,23068672,23068672,23068672,0,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672]), + new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]), + new Uint32Array([2175873,2175905,2175937,2175969,2176001,2176033,2176065,2176097,2176129,2176161,2176193,2176225,2176257,2176289,2176321,2176353]), + new Uint32Array([2140006,2140198,2140390,2140582,2140774,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,23068672,23068672,23068672]), + new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241]), + new Uint32Array([0,23068672,0,0,0,0,0,0,0,2145154,2145218,2145282,6291456,0,2145346,0]), + new Uint32Array([0,0,0,0,10531458,10495395,2148545,2143201,2173473,2148865,2173505,0,2173537,0,2173569,2149121]), + new Uint32Array([10537282,10495683,2148738,2148802,2148866,0,6291456,2148930,2186593,2173473,2148737,2148865,2148802,10495779,10495875,10495971]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2215425,2215457,2215489,2215521,2215553,2215585,2215617,2215649,2215681,2215713,2215745,2215777,2192033,2215809,2215841,2215873]), + new Uint32Array([2242049,2242081,2242113,2242145,2242177,2242209,2242241,2242273,2215937,2242305,2242338,2242401,2242433,2242465,2242497,2216001]), + new Uint32Array([10554529,2221089,0,0,10562017,10502113,10538049,10537921,2221185,10489601,10489697,10609889,10609921,2141729,2141793,10610273]), + new Uint32Array([2141923,2142019,2142115,2142211,2142307,2142403,2142499,2142595,2142691,0,0,0,0,0,0,0]), + new Uint32Array([0,2221185,2221217,10609857,10609857,10489601,10489697,10609889,10609921,2141729,2141793,2221345,2221377,2221409,2221441,2187105]), + new Uint32Array([6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18923970,23068672,23068672,23068672,0,6291456,6291456]), + new Uint32Array([2183105,6291456,2183137,6291456,2183169,6291456,2183201,6291456,2183233,6291456,2183265,6291456,2183297,6291456,2183329,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]), + new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]), + new Uint32Array([2134434,2134818,2097666,2097186,2097474,2097698,2105986,2131586,2132450,2131874,2131778,2135970,2135778,2161602,2136162,2161666]), + new Uint32Array([2236865,2236897,2236930,2236993,2237025,2235681,2237058,2237121,2237153,2237185,2237217,2217281,2237250,2191233,2237313,2237345]), + new Uint32Array([2190049,6291456,2190081,6291456,2190113,6291456,2190145,6291456,2190177,6291456,2190209,6291456,2190241,6291456,2190273,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2101922,2102050,2102178,2102306,10498755,10498851,10498947,10499043,10499139,10499235,10499331,10499427,10499523,10489604,10489732,10489860]), + new Uint32Array([2166914,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]), + new Uint32Array([2181601,2170561,2181633,2181665,2170753,2181697,2172897,2170881,2181729,2170913,2172929,2113441,2181761,2181793,2171009,2173761]), + new Uint32Array([0,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]), + new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0]), + new Uint32Array([2248001,2248033,2248066,2248130,2248193,2248226,2248289,2248322,2248385,2248417,2216673,2248450,2248514,2248577,2248610,2248673]), + new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,0,0,0]), + new Uint32Array([2169729,6291456,2169761,6291456,2169793,6291456,2169825,6291456,2169857,2169889,6291456,2169921,6291456,2143329,6291456,2098305]), + new Uint32Array([2162178,2163202,2163266,2135170,2136226,2161986,2137954,2159426,2159490,2163330,2159554,2163394,2159682,2139522,2136450,2159746]), + new Uint32Array([2173953,2173985,0,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2174209,2174241,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,4271169,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2174273]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,2190785,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2189793,6291456,2189825,6291456,2189857,6291456,2189889,6291456,2189921,6291456,2189953,6291456,2189985,6291456,2190017,6291456]), + new Uint32Array([2105601,2112289,2108193,2112481,2112577,0,2098305,2108321,2108289,2100865,2113153,2108481,2113345,0,2098209,2111137]), + new Uint32Array([2172129,6291456,2172161,6291456,2172193,6291456,2172225,6291456,2172257,6291456,2172289,6291456,2172321,6291456,2172353,6291456]), + new Uint32Array([2214753,6291456,2214785,6291456,6291456,2214817,2214849,2214881,2214913,2214945,2214977,2215009,2215041,2215073,2194401,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([0,0,0,0,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([10610305,10610337,10575617,2221761,10610401,10610433,10502177,0,10610465,10610497,10610529,10610561,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,0,0,0,0,23068672]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2187105,2187137,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2199393,2199425,2199457,2199489,2199521,2199553,2199585,2199617,2199649,2199681,2199713,2199745,2199777,2199809,2199841,0]), + new Uint32Array([2217249,2217281,2217313,2217345,2217377,2217409,2217441,2217473,2215617,2217505,2217537,2217569,2214753,2217601,2217633,2217665]), + new Uint32Array([2170273,2170305,6291456,2170337,2170369,6291456,2170401,2170433,2170465,6291456,6291456,6291456,2170497,2170529,6291456,2170561]), + new Uint32Array([2188673,6291456,2188705,2188737,2188769,6291456,6291456,2188801,6291456,2188833,6291456,2188865,6291456,2180929,2181505,2180897]), + new Uint32Array([10489988,10490116,10490244,10490372,10490500,10490628,10490756,10490884,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147393,2147457,2147521,2147585,2147649,2147713,2147777,2147841]), + new Uint32Array([23068672,23068672,0,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]), + new Uint32Array([2241153,2241185,2241217,2215809,2241250,2241313,2241345,2241377,2217921,2241377,2241409,2215873,2241441,2241473,2241505,2241537]), + new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2220417,2220417,2220449,2220449,2220481,2220481,2220513,2220513,2220545,2220545,2220577,2220577,2220609,2220609,2220641,2220641]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2144002,0,6291456,6291456,0,0,6291456,6291456,6291456]), + new Uint32Array([2167105,2167137,2167169,2167201,2167233,2167265,2167297,2167329,2167361,2167393,2167425,2167457,2167489,2167521,2167553,2167585]), + new Uint32Array([10575521,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]), + new Uint32Array([2234146,2234210,2234274,2234338,2234402,2234466,2234530,2234594,2234658,2234722,2234786,2234850,2234914,2234978,2235042,2235106]), + new Uint32Array([0,0,0,0,0,0,0,2180577,0,0,0,0,0,2180609,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456]), + new Uint32Array([2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481]), + new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2242529,2242561,2242593,2242625,2242657,2242689,2242721,2242753,2207937,2218177,2242785,2242817,2242849,2242882,2242945,2242977]), + new Uint32Array([2118049,2105345,2118241,2105441,2118433,2118529,2118625,2118721,2118817,2200257,2200289,2191809,2200321,2200353,2200385,2200417]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]), + new Uint32Array([2185505,6291456,2185537,6291456,2185569,6291456,2185601,6291456,2185633,6291456,2185665,6291456,2185697,6291456,2185729,6291456]), + new Uint32Array([2231970,2232034,2232098,2232162,2232226,2232290,2232354,2232418,2232482,2232546,2232610,2232674,2232738,2232802,2232866,2232930]), + new Uint32Array([2218625,2246402,2246466,2246530,2246594,2246657,2246689,2246689,2218657,2219681,2246721,2246753,2246785,2246818,2246881,2208481]), + new Uint32Array([2197025,2197057,2197089,2197121,2197153,2197185,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2219137,2216961,2219169,2219201,2219233,2219265,2219297,2217025,2215041,2219329,2217057,2219361,2217089,2219393,2197153,2219426]), + new Uint32Array([23068672,23068672,23068672,0,0,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]), + new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713]), + new Uint32Array([2243522,2243585,2243617,2243649,2243681,2210113,2243713,2243746,2243810,2243874,2243937,2243970,2244033,2244065,2244097,2244129]), + new Uint32Array([2178017,6291456,2178049,6291456,2178081,6291456,2178113,6291456,2178145,6291456,2178177,6291456,2178209,6291456,2178241,6291456]), + new Uint32Array([10553858,2165314,10518722,6291456,10518818,0,10518914,2130690,10519010,2130786,10519106,2130882,10519202,2165378,10554050,2165506]), + new Uint32Array([0,0,2135491,2135587,2135683,2135779,2135875,2135971,2135971,2136067,2136163,2136259,2136355,2136355,2136451,2136547]), + new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]), + new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2220033,2220033,2220065,2220065,2220065,2220065,2220097,2220097,2220097,2220097,2220129,2220129,2220129,2220129,2220161,2220161]), + new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([2100897,2100898,2100899,2150018,2100865,2100866,2100867,2100868,2150082,2108481,2109858,2109859,2105569,2105505,2098241,2105601]), + new Uint32Array([2097217,2097505,2097505,2097505,2097505,2165570,2165570,2165634,2165634,2165698,2165698,2097858,2097858,0,0,2097152]), + new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672]), + new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]), + new Uint32Array([10503843,10503939,10504035,10504131,10504227,10504323,10504419,10504515,10504611,10504707,10504803,10504899,10504995,10491140,10491268,0]), + new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,2235297,2220769,2235329,2235361]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([2222401,2222433,2222465,10531394,2222497,2222529,2222561,0,2222593,2222625,2222657,2222689,2222721,2222753,2222785,0]), + new Uint32Array([2184481,6291456,2184513,6291456,2184545,6291456,2184577,6291456,2184609,6291456,2184641,6291456,2184673,6291456,2184705,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2105570,2156034,2126947,2156098,2153666,2127043,2127139,2156162,0,2127235,2156226,2156290,2156354,2156418,2127331,2127427]), + new Uint32Array([2215905,2207041,2153185,2241569,2241601,2241633,2241665,2241697,2241730,2241793,2241825,2241857,2241889,2241921,2241954,2242017]), + new Uint32Array([2203777,6291456,2203809,6291456,2203841,6291456,2203873,6291456,2203905,6291456,2173121,2180993,2181249,2203937,2181313,0]), + new Uint32Array([2168577,6291456,2168609,6291456,2168641,6291456,2168673,6291456,2168705,6291456,2168737,6291456,2168769,6291456,2168801,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,0,0]), + new Uint32Array([2210113,2195521,2210145,2210177,2210209,2210241,2210273,2210305,2210337,2210369,2210401,2210433,2210465,2210497,2210529,2210561]), + new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]), + new Uint32Array([2228706,2228770,2228834,2228898,2228962,2229026,2229090,2229154,2229218,2229282,2229346,2229410,2229474,2229538,2229602,2229666]), + new Uint32Array([23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,18874368,18874368,18874368,0,0]), + new Uint32Array([2133089,2133281,2133281,2133281,2133281,2160577,2160577,2160577,2160577,2097441,2097441,2097441,2097441,2133857,2133857,2133857]), + new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089]), + new Uint32Array([2178529,6291456,2178561,6291456,2178593,6291456,2178625,6291456,2178657,6291456,2178689,6291456,2178721,6291456,2178753,6291456]), + new Uint32Array([2221025,2221025,2221057,2221057,2159329,2159329,2159329,2159329,2097217,2097217,2158914,2158914,2158978,2158978,2159042,2159042]), + new Uint32Array([2208161,2208193,2208225,2208257,2194433,2208289,2208321,2208353,2208385,2208417,2208449,2208481,2208513,2208545,2208577,2208609]), + new Uint32Array([2169217,6291456,2169249,6291456,2169281,6291456,2169313,6291456,2169345,6291456,2169377,6291456,2169409,6291456,2169441,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456]), + new Uint32Array([2133187,2133283,2133283,2133379,2133475,2133571,2133667,2133667,2133763,2133859,2133955,2134051,2134147,2134147,2134243,2134339]), + new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,0]), + new Uint32Array([2193089,2193121,2193153,2193185,2117665,2117569,2193217,2193249,2193281,2193313,2193345,2193377,2193409,2193441,2193473,2193505]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]), + new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2184225,6291456,2184257,6291456,2184289,6291456,2184321,6291456,2184353,6291456,2184385,6291456,2184417,6291456,2184449,6291456]), + new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2100833,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2200801,2200833,2200865,0]), + new Uint32Array([23068672,23068672,23068672,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]), + new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2181153,2105505,2181185,2167617,2180993]), + new Uint32Array([2160002,2160066,2160130,2160194,2160258,2132066,2131010,2131106,2106018,2131618,2160322,2131298,2132034,2131938,2137410,2132226]), + new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,6291456]), + new Uint32Array([2183617,6291456,2183649,6291456,2183681,6291456,2183713,6291456,2183745,6291456,2183777,6291456,2183809,6291456,2183841,6291456]), + new Uint32Array([0,6291456,6291456,0,6291456,0,0,6291456,6291456,0,6291456,0,0,6291456,0,0]), + new Uint32Array([2250977,2251009,2251041,2251073,2195009,2251106,2251169,2251201,2251233,2251265,2251297,2251330,2251394,2251457,2251489,2251521]), + new Uint32Array([2205729,2205761,2205793,2205825,2205857,2205889,2205921,2205953,2205985,2206017,2206049,2206081,2206113,2206145,2206177,2206209]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2143170,2168993,6291456,2169025,6291456,2169057,6291456,2169089,6291456,2143234,2169121,6291456,2169153,6291456,2169185,6291456]), + new Uint32Array([23068672,23068672,2190689,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2248706,2248769,2248801,2248833,2248865,2248897,2248929,2248962,2249026,2249090,2249154,2240705,2249217,2249249,2249281,2249313]), + new Uint32Array([10485857,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10495394,6291456,2098209,6291456,6291456,2097152,6291456,10531394]), + new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,0]), + new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]), + new Uint32Array([6291456,2186977,6291456,6291456,6291456,6291456,6291456,10537858,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2209601,2209633,2209665,2209697,2209729,2209761,2209793,2209825,2209857,2209889,2209921,2209953,2209985,2210017,2210049,2210081]), + new Uint32Array([10501539,10501635,10501731,10501827,10501923,10502019,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]), + new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,0,0]), + new Uint32Array([6291456,6291456,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2194561,2194593,2194625,2119777,2119873,2194657,2194689,2194721,2194753,2194785,2194817,2194849,2194881,2194913,2194945,2194977]), + new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569]), + new Uint32Array([2222818,2222882,2222946,2223010,2223074,2223138,2223202,2223266,2223330,2223394,2223458,2223522,2223586,2223650,2223714,2223778]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672]), + new Uint32Array([0,2179553,2179585,2179617,2179649,2144001,2179681,2179713,2179745,2179777,2179809,2156705,2179841,2156833,2179873,2179905]), + new Uint32Array([6291456,23068672,6291456,2145602,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,6291456,0,0]), + new Uint32Array([2196513,2196545,2196577,2196609,2196641,2196673,2196705,2196737,2196769,2196801,2196833,2196865,2196897,2196929,2196961,2196993]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2177281,6291456,2177313,6291456,2177345,6291456,2177377,6291456,2177409,6291456,2177441,6291456,2177473,6291456,2177505,6291456]), + new Uint32Array([2187137,2221473,2221505,2221537,2221569,6291456,6291456,10610209,10610241,10537986,10537986,10537986,10537986,10609857,10609857,10609857]), + new Uint32Array([2243009,2243041,2216033,2243074,2243137,2243169,2243201,2219617,2243233,2243265,2243297,2243329,2243362,2243425,2243457,2243489]), + new Uint32Array([10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,2097152,4194304,4194304,0,0]), + new Uint32Array([2143042,6291456,2143106,2143106,2168833,6291456,2168865,6291456,6291456,2168897,6291456,2168929,6291456,2168961,6291456,2143170]), + new Uint32Array([6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2204193,2204225,2204257,2204289,2204321,2204353,2204385,2204417,2204449,2204481,2204513,2204545,2204577,2204609,2204641,2204673]), + new Uint32Array([2202753,6291456,2202785,6291456,2202817,6291456,2202849,6291456,2202881,6291456,2202913,6291456,2202945,6291456,2202977,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321]), + new Uint32Array([2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842,2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842]), + new Uint32Array([2253313,2253346,2253409,2253441,2253473,2253505,2253537,2253569,2253601,2253634,2219393,2253697,2253729,2253761,2253793,2253825]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456]), + new Uint32Array([2162562,2162626,2131362,2162690,2159938,2160002,2162754,2162818,2160130,2162882,2160194,2160258,2160834,2160898,2161026,2161090]), + new Uint32Array([2175361,2175393,2175425,2175457,2175489,2175521,2175553,2175585,2175617,2175649,2175681,2175713,2175745,2175777,2175809,2175841]), + new Uint32Array([2253858,2253921,2253954,2254018,2254082,2196737,2254145,2196865,2254177,2254209,2254241,2254273,2197025,2254306,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2202113,2204129,2188705,2204161]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,0]), + new Uint32Array([2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953]), + new Uint32Array([2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209]), + new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,0,2108417,0,2111713,2100897,2111905]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0]), + new Uint32Array([2175425,2175489,2175809,2175905,2175937,2175937,2176193,2176417,2180865,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,2143298,2143298,2143298,2143362,2143362,2143362,2143426,2143426,2143426,2171105,6291456,2171137]), + new Uint32Array([2120162,2120258,2151618,2151682,2151746,2151810,2151874,2151938,2152002,2120035,2120131,2120227,2152066,2120323,2152130,2120419]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2195361,2142433,2236065,2236097,2236129,2236161,2118241,2117473,2236193,2236225,2236257,2236289,0,0,0,0]), + new Uint32Array([2189281,6291456,2189313,6291456,2189345,6291456,2189377,6291456,2189409,6291456,2189441,6291456,2189473,6291456,2189505,6291456]), + new Uint32Array([6291456,6291456,2145922,6291456,6291456,6291456,6291456,2145986,6291456,6291456,6291456,6291456,2146050,6291456,6291456,6291456]), + new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10502113,10562017,10610401,10502177,10610433,10538049]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,2186401,0,2186433,0,2186465,0,2186497]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,23068672,23068672]), + new Uint32Array([0,0,2198241,2198273,2198305,2198337,2198369,2198401,0,0,2198433,2198465,2198497,0,0,0]), + new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,0,23068672,23068672,23068672,23068672,23068672,23068672,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]), + new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,2133281,2097505,2105889,0,2097697,2135777,2097633,2097441]), + new Uint32Array([2197889,2197921,2197953,2197985,2198017,2198049,2198081,2198113,2198145,2198177,2198209,2198241,2198273,2198305,2198337,2198369]), + new Uint32Array([2132514,2132610,2160386,2133090,2133186,2160450,2160514,2133282,2160578,2133570,2106178,2160642,2133858,2160706,2160770,2134146]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,23068672,23068672,6291456,23068672,23068672,6291456,23068672,0,0,0,0,0,0,0,0]), + new Uint32Array([2184737,6291456,2184769,6291456,2184801,6291456,2184833,6291456,2184865,6291456,2184897,6291456,2184929,6291456,2184961,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,6291456]), + new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,0,0]), + new Uint32Array([6291456,6291456,6291456,2186753,6291456,6291456,6291456,6291456,2186785,2186817,2186849,2173569,2186881,10496355,10495395,10575521]), + new Uint32Array([0,0,2097729,0,0,0,0,2106017,0,2097505,0,2097185,0,2135777,2097633,2097441]), + new Uint32Array([2189537,6291456,2189569,6291456,2189601,6291456,2189633,6291456,2189665,6291456,2189697,6291456,2189729,6291456,2189761,6291456]), + new Uint32Array([2202497,6291456,2202529,6291456,2202561,6291456,2202593,6291456,2202625,6291456,2202657,6291456,2202689,6291456,2202721,6291456]), + new Uint32Array([2245217,2218369,2245249,2245282,2245345,2245377,2245410,2245474,2245537,2245569,2245601,2245633,2245665,2245665,2245697,2245729]), + new Uint32Array([6291456,0,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,23068672,6291456,23068672,6291456,6291456,6291456,6291456,23068672,23068672]), + new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2097281,2105921,2097729,2106081,2097377,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]), + new Uint32Array([2176641,6291456,2176673,6291456,2176705,6291456,2176737,6291456,2176769,6291456,2176801,6291456,2176833,6291456,2176865,6291456]), + new Uint32Array([2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2174369,2174369,0,0,2100833,2100737]), + new Uint32Array([2116513,2190817,2190849,2190881,2190913,2190945,2116609,2190977,2191009,2191041,2191073,2117185,2191105,2191137,2191169,2191201]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456]), + new Uint32Array([0,0,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]), + new Uint32Array([2167617,2167649,2167681,2167713,2167745,2167777,2167809,6291456,2167841,2167873,2167905,2167937,2167969,2168001,2168033,4240130]), + new Uint32Array([2165122,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122,2134562,2132162,2132834,2136866]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2186209,2186241,2186273,2186305,2186337,2186369,0,0]), + new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,14680064,14680064,14680064,14680064,14680064]), + new Uint32Array([0,0,23068672,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]), + new Uint32Array([0,10537921,10610689,10610273,10610497,10610529,10610305,10610721,10489601,10489697,10610337,10575617,10554529,2221761,2197217,10496577]), + new Uint32Array([2105473,2105569,2105601,2112289,0,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]), + new Uint32Array([2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481]), + new Uint32Array([2125346,2153410,2153474,2127394,2153538,2153602,2153666,2153730,2105507,2105476,2153794,2153858,2153922,2153986,2154050,2105794]), + new Uint32Array([2200449,2119681,2200481,2153313,2199873,2199905,2199937,2200513,2200545,2200577,2200609,2119105,2119201,2119297,2119393,2119489]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2175777,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2222273,2197217,2221473,2221505,2221089,2222305,2200865,2099681,2104481,2222337,2099905,2120737,2222369,2103713,2100225,2098785]), + new Uint32Array([2201377,6291456,2201409,6291456,2201441,6291456,2201473,6291456,2201505,6291456,2201537,6291456,2201569,6291456,6291456,23068672]), + new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]), + new Uint32Array([2200897,6291456,2200929,6291456,2200961,6291456,2200993,6291456,2201025,6291456,2180865,6291456,2201057,6291456,2201089,6291456]), + new Uint32Array([0,0,0,0,0,23068672,23068672,0,6291456,6291456,6291456,0,0,0,0,0]), + new Uint32Array([2161154,2161410,2138658,2161474,2161538,2097666,2097186,2097474,2162946,2132450,2163010,2163074,2136162,2163138,2161666,2161730]), + new Uint32Array([2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953]), + new Uint32Array([0,0,0,0,0,0,23068672,23068672,0,0,0,0,2145410,2145474,0,6291456]), + new Uint32Array([2244161,2216065,2212769,2244193,2244225,2244257,2244290,2244353,2244385,2244417,2244449,2218273,2244481,2244514,2244577,2244609]), + new Uint32Array([2125730,2125699,2125795,2125891,2125987,2154114,2154178,2154242,2154306,2154370,2154434,2154498,2126082,2126178,2126274,2126083]), + new Uint32Array([2237665,2237697,2237697,2237697,2237730,2237793,2237825,2237857,2237890,2237953,2237985,2238017,2238049,2238081,2238113,2238145]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150146,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]), + new Uint32Array([2214369,2238593,2238625,2238657,2238689,2238721,2238753,2238785,2238817,2238850,2238913,2238945,2238977,2235457,2239009,2239041]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]), + new Uint32Array([2252066,2252130,2252193,2252225,2252257,2252290,2252353,2252385,2252417,2252449,2252481,2252513,2252545,2252578,2252641,2252673]), + new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,2197857]), + new Uint32Array([2224866,2224930,2224994,2225058,2225122,2225186,2225250,2225314,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2219490,2219554,2219617,2219649,2219681,2219714,2219778,2219842,2219905,2219937,0,0,0,0,0,0]), + new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]), + new Uint32Array([2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]), + new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665]), + new Uint32Array([2220161,2220161,2220193,2220193,2220193,2220193,2220225,2220225,2220225,2220225,2220257,2220257,2220257,2220257,2220289,2220289]), + new Uint32Array([2192673,2192705,2192737,2192769,2192801,2192833,2192865,2118049,2192897,2117473,2117761,2192929,2192961,2192993,2193025,2193057]), + new Uint32Array([2179297,6291456,2179329,6291456,2179361,6291456,2179393,6291456,2179425,6291456,2179457,6291456,2179489,6291456,2179521,6291456]), + new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2235745,2235777,2193633,2235809,2235841,2235873,2235905,2235937,2235969,2116513,2116705,2236001,2200513,2199905,2200545,2236033]), + new Uint32Array([2113153,2108481,2113345,2113441,2232993,2233025,0,0,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761]), + new Uint32Array([2170593,6291456,2170625,6291456,2170657,6291456,2170689,2170721,6291456,2170753,6291456,6291456,2170785,6291456,2170817,2170849]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2166786,2166850,0,0,0,0]), + new Uint32Array([23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]), + new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,0]), + new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2134562,2132162,2132834,2136866,2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058]), + new Uint32Array([6291456,6291456,2098337,2101441,10531458,2153473,6291456,6291456,10531522,2100737,2108193,6291456,2106499,2106595,2106691,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2233122,2233186,2233250,2233314,2233378,2233442,2233506,2233570,2233634,2233698,2233762,2233826,2233890,2233954,2234018,2234082]), + new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2205217,2205249,2205281,2205313,2205345,2205377,2205409,2205441,2205473,2205505,2205537,2205569,2205601,2205633,2205665,2205697]), + new Uint32Array([6291456,0,6291456,0,0,0,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]), + new Uint32Array([2173601,2173761,2174081,2173569,2174241,2174113,2173953,6291456,2174305,6291456,2174337,6291456,2174369,6291456,2174401,6291456]), + new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]), + new Uint32Array([2152450,2152514,2099653,2104452,2099813,2122243,2099973,2152578,2122339,2122435,2122531,2122627,2122723,2104580,2122819,2152642]), + new Uint32Array([2236385,2236417,2236449,2236482,2236545,2215425,2236577,2236609,2236641,2236673,2215457,2236705,2236737,2236770,2215489,2236833]), + new Uint32Array([2163394,2159746,2163458,2131362,2163522,2160130,2163778,2132226,2163842,2132898,2163906,2161410,2138658,2097666,2136162,2163650]), + new Uint32Array([2218721,2246913,2246946,2216385,2247010,2247074,2215009,2247137,2247169,2216481,2247201,2247233,2247266,2247330,2247330,0]), + new Uint32Array([2129730,2129762,2129858,2129731,2129827,2156482,2156482,0,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0,0,0,0,6291456,0,0]), + new Uint32Array([2203969,2204001,2181377,2204033,2204065,6291456,2204097,6291456,0,0,0,0,0,0,0,0]), + new Uint32Array([2169473,6291456,2169505,6291456,2169537,6291456,2169569,6291456,2169601,6291456,2169633,6291456,2169665,6291456,2169697,6291456]), + new Uint32Array([2141542,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2220801,2220801,2220801,2220801,2220833,2220833,2220865,2220865,2220865,2220865,2220897,2220897,2220897,2220897,2139873,2139873]), + new Uint32Array([0,0,0,0,0,23068672,23068672,0,0,0,0,0,0,0,6291456,0]), + new Uint32Array([2214849,2218433,2218465,2218497,2218529,2218561,2214881,2218593,2218625,2218657,2218689,2218721,2218753,2216545,2218785,2218817]), + new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,6291456]), + new Uint32Array([2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058,2165122,2132802,2132706,2164866]), + new Uint32Array([2207649,2207681,2207713,2207745,2207777,2207809,2207841,2207873,2207905,2207937,2207969,2208001,2208033,2208065,2208097,2208129]), + new Uint32Array([2123683,2105092,2152706,2123779,2105220,2152770,2100453,2098755,2123906,2124002,2124098,2124194,2124290,2124386,2124482,2124578]), + new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,0,0,0,0,0,0,0,10485857]), + new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([10508163,10508259,10508355,10508451,2200129,2200161,2192737,2200193,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2203553,6291456,2203585,6291456,6291456,6291456,2203617,6291456,2203649,6291456,2203681,6291456,2203713,6291456,2203745,6291456]), + new Uint32Array([18884449,18884065,23068672,18884417,18884034,18921185,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18874368]), + new Uint32Array([2247393,2247426,2247489,2247521,2247553,2247586,2247649,2247681,2247713,2247745,2247777,2247810,2247873,2247905,2247937,2247969]), + new Uint32Array([6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]), + new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,2160577,2133857,2235297,0,2235329,0]), + new Uint32Array([2182593,6291456,2182625,6291456,2182657,6291456,2182689,6291456,2182721,6291456,2182753,6291456,2182785,6291456,2182817,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102402,2102403,6291456,2110050]), + new Uint32Array([2149890,2108323,2149954,6291456,2113441,6291456,2149057,6291456,2113441,6291456,2105473,2167265,2111137,2105505,6291456,2108353]), + new Uint32Array([2219105,2219137,2195233,2251554,2251617,2251649,2251681,2251713,2251746,2251810,2251873,2251905,2251937,2251970,2252033,2219169]), + new Uint32Array([2203009,6291456,2203041,6291456,2203073,6291456,2203105,6291456,2203137,6291456,2203169,6291456,2203201,6291456,2203233,6291456]), + new Uint32Array([2128195,2128291,2128387,2128483,2128579,2128675,2128771,2128867,2128963,2129059,2129155,2129251,2129347,2129443,2129539,2129635]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2140964,2141156,2140966,2141158,2141350]), + new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([2225378,2225442,2225506,2225570,2225634,2225698,2225762,2225826,2225890,2225954,2226018,2226082,2226146,2226210,2226274,2226338]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417]), + new Uint32Array([2108353,2108417,0,2105601,2108193,2157121,2157313,2157377,2157441,2100897,6291456,2108419,2173953,2173633,2173633,2173953]), + new Uint32Array([2111713,2173121,2111905,2098177,2173153,2173185,2173217,2113153,2113345,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2190753]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,2197249,6291456,2117377,2197281,2197313,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,6291456,6291456,6291456]), + new Uint32Array([2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953]), + new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]), + new Uint32Array([0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,23068672]), + new Uint32Array([2173281,6291456,2173313,6291456,2173345,6291456,2173377,6291456,0,0,10532546,6291456,6291456,6291456,10562017,2173441]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]), + new Uint32Array([23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2159426,2159490,2159554,2159362,2159618,2159682,2139522,2136450,2159746,2159810,2159874,2130978,2131074,2131266,2131362,2159938]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2203233,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2203265,6291456,2203297,6291456,2203329,2203361,6291456]), + new Uint32Array([6291456,6291456,2148418,2148482,2148546,0,6291456,2148610,2186529,2186561,2148417,2148545,2148482,10495778,2143969,10495778]), + new Uint32Array([2134146,2139426,2160962,2134242,2161218,2161282,2161346,2161410,2138658,2134722,2134434,2134818,2097666,2097346,2097698,2105986]), + new Uint32Array([2198881,2198913,2198945,2198977,2199009,2199041,2199073,2199105,2199137,2199169,2199201,2199233,2199265,2199297,2199329,2199361]), + new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]), + new Uint32Array([10610561,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]), + new Uint32Array([2183873,6291456,2183905,6291456,2183937,6291456,2183969,6291456,2184001,6291456,2184033,6291456,2184065,6291456,2184097,6291456]), + new Uint32Array([2244642,2244706,2244769,2244801,2218305,2244833,2244865,2244897,2244929,2244961,2244993,2245026,2245089,2245122,2245185,0]), + new Uint32Array([6291456,6291456,2116513,2116609,2116705,2116801,2199873,2199905,2199937,2199969,2190913,2200001,2200033,2200065,2200097,2191009]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2180673,2180705,2180737,2180769,2180801,2180833,0,0]), + new Uint32Array([2098081,2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150402]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,2145666,2145730,6291456,6291456]), + new Uint32Array([2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665]), + new Uint32Array([2187073,6291456,6291456,6291456,6291456,2098241,2098241,2108353,2100897,2111905,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102404,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2100612,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10485857]), + new Uint32Array([2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]), + new Uint32Array([2217697,2217729,2217761,2217793,2217825,2217857,2217889,2217921,2217953,2215873,2217985,2215905,2218017,2218049,2218081,2218113]), + new Uint32Array([2211233,2218849,2216673,2218881,2218913,2218945,2218977,2219009,2216833,2219041,2215137,2219073,2216865,2209505,2219105,2216897]), + new Uint32Array([2240097,2240129,2240161,2240193,2240225,2240257,2240289,2240321,2240353,2240386,2240449,2240481,2240513,2240545,2207905,2240578]), + new Uint32Array([6291456,6291456,2202273,6291456,2202305,6291456,2202337,6291456,2202369,6291456,2202401,6291456,2202433,6291456,2202465,6291456]), + new Uint32Array([0,23068672,23068672,18923394,23068672,18923458,18923522,18884099,18923586,18884195,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([2201121,6291456,2201153,6291456,2201185,6291456,2201217,6291456,2201249,6291456,2201281,6291456,2201313,6291456,2201345,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]), + new Uint32Array([2211041,2211073,2211105,2211137,2211169,2211201,2211233,2211265,2211297,2211329,2211361,2211393,2211425,2211457,2211489,2211521]), + new Uint32Array([2181825,6291456,2181857,6291456,2181889,6291456,2181921,6291456,2181953,6291456,2181985,6291456,2182017,6291456,2182049,6291456]), + new Uint32Array([2162337,2097633,2097633,2097633,2097633,2132705,2132705,2132705,2132705,2097153,2097153,2097153,2097153,2133089,2133089,2133089]), + new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,2148545,6291456,2173473,6291456,2148865,6291456,2173505,6291456,2173537,6291456,2173569,6291456,2149121,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,0,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]), + new Uint32Array([2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([2207137,2207169,2207201,2207233,2207265,2207297,2207329,2207361,2207393,2207425,2207457,2207489,2207521,2207553,2207585,2207617]), + new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,23068672,23068672,0,0,0,0,0,0]), + new Uint32Array([2198401,2198433,2198465,2198497,0,2198529,2198561,2198593,2198625,2198657,2198689,2198721,2198753,2198785,2198817,2198849]), + new Uint32Array([2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]), + new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]), + new Uint32Array([2216385,2118721,2216417,2216449,2216481,2216513,2216545,2211233,2216577,2216609,2216641,2216673,2216705,2216737,2216737,2216769]), + new Uint32Array([2216801,2216833,2216865,2216897,2216929,2216961,2216993,2215169,2217025,2217057,2217089,2217121,2217154,2217217,0,0]), + new Uint32Array([2210593,2191809,2210625,2210657,2210689,2210721,2210753,2210785,2210817,2210849,2191297,2210881,2210913,2210945,2210977,2211009]), + new Uint32Array([0,0,2105825,0,0,2111905,2105473,0,0,2112289,2108193,2112481,2112577,0,2098305,2108321]), + new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([0,2097153,2134241,0,2132705,0,0,2131297,0,2133089,0,2133857,0,2220769,0,2235361]), + new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,6291456,6291456,14680064]), + new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]), + new Uint32Array([2171873,6291456,2171905,6291456,2171937,6291456,2171969,6291456,2172001,6291456,2172033,6291456,2172065,6291456,2172097,6291456]), + new Uint32Array([2220929,2220929,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2133857,2134145,2134145,2134145,2134145,2134241,2134241,2134241,2134241,2105889,2105889,2105889,2105889,2097185,2097185,2097185]), + new Uint32Array([2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]), + new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,10499619,10499715,10499811,10499907]), + new Uint32Array([0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]), + new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,23068672,23068672]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2144322,2144386,2144450,2144514,2144578,2144642,2144706,2144770]), + new Uint32Array([23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456]), + new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0,0,2111905,2105473,2105569]), + new Uint32Array([2236321,2236353,0,0,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2152194,2121283,2103684,2103812,2097986,2098533,2097990,2098693,2098595,2098853,2099013,2103940,2121379,2121475,2121571,2104068]), + new Uint32Array([2206241,2206273,2206305,2206337,2206369,2206401,2206433,2206465,2206497,2206529,2206561,2206593,2206625,2206657,2206689,2206721]), + new Uint32Array([6291456,6291456,6291456,6291456,16777216,16777216,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,10538818,10538882,6291456,6291456,2150338]), + new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2214369,2214401,2214433,2214465,2214497,2214529,2214561,2214593,2194977,2214625,2195073,2214657,2214689,2214721,6291456,6291456]), + new Uint32Array([2097152,2097152,2097152,2097152,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2182081,6291456,2182113,6291456,2182145,6291456,2182177,6291456,2182209,6291456,2182241,6291456,2182273,6291456,2182305,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146881,2146945,2147009,2147073,2147137,2147201,2147265,2147329]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672]), + new Uint32Array([0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2122915,2123011,2123107,2104708,2123203,2123299,2123395,2100133,2104836,2100290,2100293,2104962,2104964,2098052,2123491,2123587]), + new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]), + new Uint32Array([6291456,2171169,6291456,2171201,6291456,2171233,6291456,2171265,6291456,2171297,6291456,2171329,6291456,6291456,2171361,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([0,0,2148994,2149058,2149122,0,6291456,2149186,2186945,2173537,2148993,2149121,2149058,10531458,10496066,0]), + new Uint32Array([2195009,2195041,2195073,2195105,2195137,2195169,2195201,2195233,2195265,2195297,2195329,2195361,2195393,2195425,2195457,2195489]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,0,0,6291456,6291456]), + new Uint32Array([2182849,6291456,2182881,6291456,2182913,6291456,2182945,6291456,2182977,6291456,2183009,6291456,2183041,6291456,2183073,6291456]), + new Uint32Array([2211553,2210081,2211585,2211617,2211649,2211681,2211713,2211745,2211777,2211809,2209569,2211841,2211873,2211905,2211937,2211969]), + new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2166594,2127298,2166658,2142978,2141827,2166722]), + new Uint32Array([2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2185761,2185793,2185825,2185857,2185889,2185921,0,0]), + new Uint32Array([6291456,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456]), + new Uint32Array([0,0,0,2220961,2220961,2220961,2220961,2144193,2144193,2159201,2159201,2159265,2159265,2144194,2220993,2220993]), + new Uint32Array([2192641,2235393,2235425,2152257,2116609,2235457,2235489,2200065,2235521,2235553,2235585,2212449,2235617,2235649,2235681,2235713]), + new Uint32Array([2194049,2194081,2194113,2194145,2194177,2194209,2194241,2194273,2194305,2194337,2194369,2194401,2194433,2194465,2194497,2194529]), + new Uint32Array([2196673,2208641,2208673,2208705,2208737,2208769,2208801,2208833,2208865,2208897,2208929,2208961,2208993,2209025,2209057,2209089]), + new Uint32Array([2191681,2191713,2191745,2191777,2153281,2191809,2191841,2191873,2191905,2191937,2191969,2192001,2192033,2192065,2192097,2192129]), + new Uint32Array([2230946,2231010,2231074,2231138,2231202,2231266,2231330,2231394,2231458,2231522,2231586,2231650,2231714,2231778,2231842,2231906]), + new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2185953,2185985,2186017,2186049,2186081,2186113,2186145,2186177]), + new Uint32Array([2139811,2139907,2097284,2105860,2105988,2106116,2106244,2097444,2097604,2097155,10485778,10486344,2106372,6291456,0,0]), + new Uint32Array([2110051,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2172385,6291456,2172417,6291456,2172449,6291456,2172481,6291456,2172513,6291456,2172545,6291456,2172577,6291456,2172609,6291456]), + new Uint32Array([0,0,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2249345,2249377,2249409,2249441,2249473,2249505,2249537,2249570,2210209,2249633,2249665,2249697,2249729,2249761,2249793,2216769]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456]), + new Uint32Array([2187169,2187201,2187233,2187265,2187297,2187329,2187361,2187393,2187425,2187457,2187489,2187521,2187553,2187585,2187617,2187649]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([0,0,0,6291456,6291456,0,0,0,6291456,6291456,6291456,0,0,0,6291456,6291456]), + new Uint32Array([2182337,6291456,2182369,6291456,2182401,6291456,2182433,6291456,2182465,6291456,2182497,6291456,2182529,6291456,2182561,6291456]), + new Uint32Array([2138179,2138275,2138371,2138467,2134243,2134435,2138563,2138659,2138755,2138851,2138947,2139043,2138947,2138755,2139139,2139235]), + new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]), + new Uint32Array([0,0,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2250498,2250562,2250625,2250657,2208321,2250689,2250721,2250753,2250785,2250817,2250849,2218945,2250881,2250913,2250945,0]), + new Uint32Array([2170369,2105569,2098305,2108481,2173249,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]), + new Uint32Array([2100897,2111905,2105473,2105569,2105601,0,2108193,0,0,0,2098305,2108321,2108289,2100865,2113153,2108481]), + new Uint32Array([2100897,2100897,2105569,2105569,6291456,2112289,2149826,6291456,6291456,2112481,2112577,2098177,2098177,2098177,6291456,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456,6291456]), + new Uint32Array([6291456,2169953,2169985,6291456,2170017,6291456,2170049,2170081,6291456,2170113,2170145,2170177,6291456,6291456,2170209,2170241]), + new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2220641,2220641,2220673,2220673,2220673,2220673,2220705,2220705,2220705,2220705,2220737,2220737,2220737,2220737,2220769,2220769]), + new Uint32Array([2127650,2127746,2127842,2127938,2128034,2128130,2128226,2128322,2128418,2127523,2127619,2127715,2127811,2127907,2128003,2128099]), + new Uint32Array([2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177]), + new Uint32Array([0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([2204705,2204737,2204769,2204801,2204833,2204865,2204897,2204929,2204961,2204993,2205025,2205057,2205089,2205121,2205153,2205185]), + new Uint32Array([2176385,6291456,2176417,6291456,2176449,6291456,2176481,6291456,2176513,6291456,2176545,6291456,2176577,6291456,2176609,6291456]), + new Uint32Array([2195521,2195553,2195585,2195617,2195649,2195681,2117857,2195713,2195745,2195777,2195809,2195841,2195873,2195905,2195937,2195969]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456]), + new Uint32Array([2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113]), + new Uint32Array([2131586,2132450,2135970,2135778,2161602,2136162,2163650,2161794,2135586,2163714,2137186,2131810,2160290,2135170,2097506,2159554]), + new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,0,0,0,0]), + new Uint32Array([2116513,2116609,2116705,2116801,2116897,2116993,2117089,2117185,2117281,2117377,2117473,2117569,2117665,2117761,2117857,2117953]), + new Uint32Array([2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100802,2101154,2101282,2101410,2101538,2101666,2101794]), + new Uint32Array([2100289,2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2098977,2150241,2150305]), + new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,2109955,6291456,6291456,0,0,0,0]), + new Uint32Array([18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,0,0]), + new Uint32Array([2130979,2131075,2131075,2131171,2131267,2131363,2131459,2131555,2131651,2131651,2131747,2131843,2131939,2132035,2132131,2132227]), + new Uint32Array([0,2177793,6291456,2177825,6291456,2177857,6291456,2177889,6291456,2177921,6291456,2177953,6291456,2177985,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]), + new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2113345,0,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]), + new Uint32Array([2136643,2136739,2136835,2136931,2137027,2137123,2137219,2137315,2137411,2137507,2137603,2137699,2137795,2137891,2137987,2138083]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]), + new Uint32Array([2174433,6291456,2174465,6291456,2174497,6291456,2174529,6291456,2174561,6291456,2174593,6291456,2174625,6291456,2174657,6291456]), + new Uint32Array([0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]), + new Uint32Array([10496547,10496643,2105505,2149698,6291456,10496739,10496835,2170273,6291456,2149762,2105825,2111713,2111713,2111713,2111713,2168673]), + new Uint32Array([6291456,2143490,2143490,2143490,2171649,6291456,2171681,2171713,2171745,6291456,2171777,6291456,2171809,6291456,2171841,6291456]), + new Uint32Array([2159106,2159106,2159170,2159170,2159234,2159234,2159298,2159298,2159298,2159362,2159362,2159362,2106401,2106401,2106401,2106401]), + new Uint32Array([2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137]), + new Uint32Array([2108417,2181217,2181249,2181281,2170433,2170401,2181313,2181345,2181377,2181409,2181441,2181473,2181505,2181537,2170529,2181569]), + new Uint32Array([2218433,2245761,2245793,2245825,2245857,2245890,2245953,2245986,2209665,2246050,2246113,2246146,2246210,2246274,2246337,2246369]), + new Uint32Array([2230754,2230818,2230882,0,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2184129,6291456,2184161,6291456,2184193,6291456,6291456,6291456,6291456,6291456,2146818,2183361,6291456,6291456,2142978,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2135170,2097506,2130691,2130787,2130883,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122]), + new Uint32Array([2108515,2108611,2100740,2108707,2108803,2108899,2108995,2109091,2109187,2109283,2109379,2109475,2109571,2109667,2109763,2100738]), + new Uint32Array([2102788,2102916,2103044,2120515,2103172,2120611,2120707,2098373,2103300,2120803,2120899,2120995,2103428,2103556,2121091,2121187]), + new Uint32Array([2158082,2158146,0,2158210,2158274,0,2158338,2158402,2158466,2129922,2158530,2158594,2158658,2158722,2158786,2158850]), + new Uint32Array([10499619,10499715,10499811,10499907,10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059]), + new Uint32Array([2239585,2239618,2239681,2239713,0,2191969,2239745,2239777,2192033,2239809,2239841,2239874,2239937,2239970,2240033,2240065]), + new Uint32Array([2252705,2252738,2252801,2252833,2252865,2252897,2252930,2252994,2253057,2253089,2253121,2253154,2253217,2253250,2219361,2219361]), + new Uint32Array([2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,10538050,10538114,10538178,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([2226402,2226466,2226530,2226594,2226658,2226722,2226786,2226850,2226914,2226978,2227042,2227106,2227170,2227234,2227298,2227362]), + new Uint32Array([23068672,6291456,6291456,6291456,6291456,2144066,2144130,2144194,2144258,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,23068672,23068672]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]), + new Uint32Array([2124674,2124770,2123875,2123971,2124067,2124163,2124259,2124355,2124451,2124547,2124643,2124739,2124835,2124931,2125027,2125123]), + new Uint32Array([2168065,6291456,2168097,6291456,2168129,6291456,2168161,6291456,2168193,6291456,2168225,6291456,2168257,6291456,2168289,6291456]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0]), + new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,2100610,2100611,6291456,2107842,2107843,6291456,6291456,6291456,6291456,10537922,6291456,10537986,6291456]), + new Uint32Array([2174849,2174881,2174913,2174945,2174977,2175009,2175041,2175073,2175105,2175137,2175169,2175201,2175233,2175265,2175297,2175329]), + new Uint32Array([2154562,2154626,2154690,2154754,2141858,2154818,2154882,2127298,2154946,2127298,2155010,2155074,2155138,2155202,2155266,2155202]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0]), + new Uint32Array([2200641,2150786,2150850,2150914,2150978,2151042,2106562,2151106,2150562,2151170,2151234,2151298,2151362,2151426,2151490,2151554]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456]), + new Uint32Array([2220289,2220289,2220321,2220321,2220321,2220321,2220353,2220353,2220353,2220353,2220385,2220385,2220385,2220385,2220417,2220417]), + new Uint32Array([2155330,2155394,0,2155458,2155522,2155586,2105732,0,2155650,2155714,2155778,2125314,2155842,2155906,2126274,2155970]), + new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,23068672,23068672,23068672,23068672,6291456,6291456]), + new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0]), + new Uint32Array([2097729,2106017,2106017,2106017,2106017,2131297,2131297,2131297,2131297,2106081,2106081,2162049,2162049,2105953,2105953,2162337]), + new Uint32Array([2097185,2097697,2097697,2097697,2097697,2135777,2135777,2135777,2135777,2097377,2097377,2097377,2097377,2097601,2097601,2097217]), + new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]), + new Uint32Array([2139331,2139427,2139523,2139043,2133571,2132611,2139619,2139715,0,0,0,0,0,0,0,0]), + new Uint32Array([2174113,2174145,2100897,2098177,2108289,2100865,2173601,2173633,2173985,2174113,2174145,6291456,6291456,6291456,6291456,6291456]), + new Uint32Array([6291456,6291456,23068672,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456]), + new Uint32Array([23068672,23068672,18923778,23068672,23068672,23068672,23068672,18923842,23068672,23068672,23068672,23068672,18923906,23068672,23068672,23068672]), + new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,0,2133857,0,0,0,0]), + new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2177537,6291456,2177569,6291456,2177601,6291456,2177633,6291456,2177665,6291456,2177697,6291456,2177729,6291456,2177761,6291456]), + new Uint32Array([2212481,2212513,2212545,2212577,2197121,2212609,2212641,2212673,2212705,2212737,2212769,2212801,2212833,2212865,2212897,2212929]), + new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,0,0,0,0,0,0,0,0]), + new Uint32Array([2098241,2108353,2170209,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,6291456,2108193,2172417,2112481,2098177]), + new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]), +]; +var blockIdxes = new Uint16Array([616,616,565,147,161,411,330,2,131,131,328,454,241,408,86,86,696,113,285,350,325,301,473,214,639,232,447,64,369,598,124,672,567,223,621,154,107,86,86,86,86,86,86,505,86,68,634,86,218,218,218,218,486,218,218,513,188,608,216,86,217,463,668,85,700,360,184,86,86,86,647,402,153,10,346,718,662,260,145,298,117,1,443,342,138,54,563,86,240,572,218,70,387,86,118,460,641,602,86,86,306,218,86,692,86,86,86,86,86,162,707,86,458,26,86,218,638,86,86,86,86,86,65,449,86,86,306,183,86,58,391,667,86,157,131,131,131,131,86,433,131,406,31,218,247,86,86,693,218,581,351,86,438,295,69,462,45,126,173,650,14,295,69,97,168,187,641,78,523,390,69,108,287,664,173,219,83,295,69,108,431,426,173,694,412,115,628,52,257,398,641,118,501,121,69,579,151,423,173,620,464,121,69,382,151,476,173,27,53,121,86,594,578,226,173,86,632,130,86,96,228,268,641,622,563,86,86,21,148,650,131,131,321,43,144,343,381,531,131,131,178,20,86,399,156,375,164,541,30,60,715,198,92,118,131,131,86,86,306,407,86,280,457,196,488,358,131,131,244,86,86,143,86,86,86,86,86,667,563,86,86,86,86,86,86,86,86,86,86,86,86,86,336,363,86,86,336,86,86,380,678,67,86,86,86,678,86,86,86,512,86,307,86,708,86,86,86,86,86,528,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,563,307,86,86,86,86,86,104,450,337,86,720,86,32,450,397,86,86,86,587,218,558,708,708,293,708,86,86,86,86,86,694,205,86,8,86,86,86,86,549,86,667,697,697,679,86,458,460,86,86,650,86,708,543,86,86,86,245,86,86,86,140,218,127,708,708,458,197,131,131,131,131,500,86,86,483,251,86,306,510,515,86,722,86,86,86,65,201,86,86,483,580,470,86,86,86,368,131,131,131,694,114,110,555,86,86,123,721,163,142,713,418,86,317,675,209,218,218,218,371,545,592,629,490,603,199,46,320,525,680,310,279,388,111,42,252,593,607,235,617,410,377,50,548,135,356,17,520,189,116,392,600,349,332,482,699,690,535,119,106,451,71,152,667,131,218,218,265,671,637,492,504,533,683,269,269,658,86,86,86,86,86,86,86,86,86,491,619,86,86,6,86,86,86,86,86,86,86,86,86,86,86,229,86,86,86,86,86,86,86,86,86,86,86,86,667,86,86,171,131,118,131,656,206,234,571,89,334,670,246,311,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,534,86,86,86,86,86,86,82,86,86,86,86,86,430,86,86,86,86,86,86,86,86,86,599,86,324,86,470,69,640,264,131,626,101,174,86,86,667,233,105,73,374,394,221,204,84,28,326,86,86,471,86,86,86,109,573,86,171,200,200,200,200,218,218,86,86,86,86,460,131,131,131,86,506,86,86,86,86,86,220,404,34,614,47,442,305,25,612,338,601,648,7,344,255,131,131,51,86,312,507,563,86,86,86,86,588,86,86,86,86,86,530,511,86,458,3,435,384,556,522,230,527,86,118,86,86,717,86,137,273,79,181,484,23,93,112,655,249,417,703,370,87,98,313,684,585,155,465,596,481,695,18,416,428,61,701,706,282,643,495,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,86,86,86,171,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,650,131,422,542,420,263,24,172,86,86,86,86,86,566,86,86,132,540,395,353,494,519,19,485,284,472,131,131,131,16,714,86,211,708,86,86,86,694,698,86,86,483,704,708,218,272,86,86,120,86,159,478,86,307,247,86,86,663,597,459,627,667,86,86,277,455,39,302,86,250,86,86,86,271,99,452,306,281,329,400,200,86,86,362,549,352,646,461,323,586,86,86,4,708,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,717,86,518,86,86,650,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,125,554,480,300,613,72,333,288,561,544,604,48,719,91,169,176,590,224,76,191,29,559,560,231,537,166,477,538,256,437,131,131,469,167,40,0,685,266,441,705,239,642,475,568,640,610,299,673,517,318,385,22,202,180,179,359,424,215,90,66,521,653,467,682,453,409,479,88,131,661,35,303,15,262,666,630,712,131,131,618,659,175,218,195,347,193,227,261,150,165,709,546,294,569,710,270,413,376,524,55,242,38,419,529,170,657,3,304,122,379,278,131,651,86,67,576,458,458,131,131,86,86,86,86,86,86,86,118,309,86,86,547,86,86,86,86,667,650,664,131,131,86,86,56,131,131,131,131,131,131,131,131,86,307,86,86,86,664,238,650,86,86,717,86,118,86,86,315,86,59,86,86,574,549,131,131,340,57,436,86,86,86,86,86,86,458,708,499,691,62,86,650,86,86,694,86,86,86,319,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,86,549,694,131,131,131,131,131,131,131,131,131,77,86,86,139,86,502,86,86,86,667,595,131,131,131,86,12,86,13,86,609,131,131,131,131,86,86,86,625,86,669,86,86,182,129,86,5,694,104,86,86,86,86,131,131,86,86,386,171,86,86,86,345,86,324,86,589,86,213,36,131,131,131,131,131,86,86,86,86,104,131,131,131,141,290,80,677,86,86,86,267,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,515,86,86,33,136,669,86,711,515,86,86,550,640,86,104,708,515,86,159,372,717,86,86,444,515,86,86,663,37,86,563,460,86,390,624,702,131,131,131,131,389,59,708,86,86,341,208,708,635,295,69,108,431,508,100,190,131,131,131,131,131,131,131,131,86,86,86,649,516,660,131,131,86,86,86,218,631,708,131,131,131,131,131,131,131,131,131,131,86,86,341,575,238,514,131,131,86,86,86,218,291,708,307,131,86,86,306,367,708,131,131,131,86,378,697,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,615,253,86,86,86,292,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,104,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,69,86,341,553,549,86,307,86,86,645,275,455,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,708,131,131,131,131,131,131,86,86,86,86,86,86,667,460,86,86,86,86,86,86,86,86,86,86,86,86,717,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,104,86,667,459,131,131,131,131,131,131,86,458,225,86,86,86,516,549,11,390,405,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,460,44,218,197,711,515,131,131,131,131,664,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,118,307,104,286,591,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,681,86,86,75,185,314,582,86,358,496,474,86,104,131,86,86,86,86,146,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,171,86,640,131,131,131,131,131,131,131,131,246,503,689,339,674,81,258,415,439,128,562,366,414,246,503,689,583,222,557,316,636,665,186,355,95,670,246,503,689,339,674,557,258,415,439,186,355,95,670,246,503,689,446,644,536,652,331,532,335,440,274,421,297,570,74,425,364,425,606,552,403,509,134,365,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,218,218,218,498,218,218,577,627,551,497,572,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,553,354,236,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,296,455,131,131,456,243,103,86,41,459,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,9,276,158,716,393,564,383,489,401,654,210,654,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,650,86,86,86,86,86,86,717,667,563,563,563,86,549,102,686,133,246,605,86,448,86,86,207,307,131,131,131,641,86,177,611,445,373,194,584,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,307,171,86,86,86,86,86,86,86,717,86,86,86,86,86,460,131,131,650,86,86,86,694,708,86,86,694,86,458,131,131,131,131,131,131,667,694,289,650,667,131,131,86,640,131,131,664,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,460,86,86,86,86,86,86,86,86,86,86,86,86,86,458,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,466,203,149,429,94,432,160,687,539,63,237,283,192,248,348,259,427,526,396,676,254,468,487,212,327,623,49,633,322,493,434,688,357,361,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131]); +var mappingStr = "صلى الله عليه وسلمجل جلالهキロメートルrad∕s2エスクードキログラムキロワットグラムトンクルゼイロサンチームパーセントピアストルファラッドブッシェルヘクタールマンションミリバールレントゲン′′′′1⁄10viii(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)∫∫∫∫(오전)(오후)アパートアルファアンペアイニングエーカーカラットカロリーキュリーギルダークローネサイクルシリングバーレルフィートポイントマイクロミクロンメガトンリットルルーブル株式会社kcalm∕s2c∕kgاكبرمحمدصلعمرسولریال1⁄41⁄23⁄4 ̈́ྲཱྀླཱྀ ̈͂ ̓̀ ̓́ ̓͂ ̔̀ ̔́ ̔͂ ̈̀‵‵‵a/ca/sc/oc/utelfax1⁄71⁄91⁄32⁄31⁄52⁄53⁄54⁄51⁄65⁄61⁄83⁄85⁄87⁄8xii0⁄3∮∮∮(1)(2)(3)(4)(5)(6)(7)(8)(9)(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)::====(ᄀ)(ᄂ)(ᄃ)(ᄅ)(ᄆ)(ᄇ)(ᄉ)(ᄋ)(ᄌ)(ᄎ)(ᄏ)(ᄐ)(ᄑ)(ᄒ)(가)(나)(다)(라)(마)(바)(사)(아)(자)(차)(카)(타)(파)(하)(주)(一)(二)(三)(四)(五)(六)(七)(八)(九)(十)(月)(火)(水)(木)(金)(土)(日)(株)(有)(社)(名)(特)(財)(祝)(労)(代)(呼)(学)(監)(企)(資)(協)(祭)(休)(自)(至)pte10月11月12月ergltdアールインチウォンオンスオームカイリガロンガンマギニーケースコルナコーポセンチダースノットハイツパーツピクルフランペニヒヘルツペンスページベータボルトポンドホールホーンマイルマッハマルクヤードヤールユアンルピー10点11点12点13点14点15点16点17点18点19点20点21点22点23点24点hpabardm2dm3khzmhzghzthzmm2cm2km2mm3cm3km3kpampagpalogmilmolppmv∕ma∕m10日11日12日13日14日15日16日17日18日19日20日21日22日23日24日25日26日27日28日29日30日31日galffifflשּׁשּׂ ٌّ ٍّ َّ ُّ ِّ ّٰـَّـُّـِّتجمتحجتحمتخمتمجتمحتمخجمححميحمىسحجسجحسجىسمحسمجسممصححصممشحمشجيشمخشممضحىضخمطمحطممطميعجمعممعمىغممغميغمىفخمقمحقمملحملحيلحىلججلخملمحمحجمحيمجحمجممخممجخهمجهممنحمنحىنجمنجىنمينمىيممبخيتجيتجىتخيتخىتميتمىجميجحىجمىسخىصحيشحيضحيلجيلمييحييجييميمميقمينحيعميكمينجحمخيلجمكممجحيحجيمجيفميبحيسخينجيصلےقلے𝅘𝅥𝅮𝅘𝅥𝅯𝅘𝅥𝅰𝅘𝅥𝅱𝅘𝅥𝅲𝆹𝅥𝅮𝆺𝅥𝅮𝆹𝅥𝅯𝆺𝅥𝅯〔s〕ppv〔本〕〔三〕〔二〕〔安〕〔点〕〔打〕〔盗〕〔勝〕〔敗〕 ̄ ́ ̧ssi̇ijl·ʼndžljnjdz ̆ ̇ ̊ ̨ ̃ ̋ ιեւاٴوٴۇٴيٴक़ख़ग़ज़ड़ढ़फ़य़ড়ঢ়য়ਲ਼ਸ਼ਖ਼ਗ਼ਜ਼ਫ਼ଡ଼ଢ଼ําໍາຫນຫມགྷཌྷདྷབྷཛྷཀྵཱཱིུྲྀླྀྒྷྜྷྡྷྦྷྫྷྐྵaʾἀιἁιἂιἃιἄιἅιἆιἇιἠιἡιἢιἣιἤιἥιἦιἧιὠιὡιὢιὣιὤιὥιὦιὧιὰιαιάιᾶι ͂ὴιηιήιῆιὼιωιώιῶι ̳!! ̅???!!?rs°c°fnosmtmivix⫝̸ ゙ ゚よりコト333435참고주의363738394042444546474849503月4月5月6月7月8月9月hgevギガデシドルナノピコビルペソホンリラレムdaauovpciu平成昭和大正明治naμakakbmbgbpfnfμfμgmgμlmldlklfmnmμmpsnsμsmsnvμvkvpwnwμwmwkwkωmωbqcccddbgyhainkkktlnlxphprsrsvwbstմնմեմիվնմխיִײַשׁשׂאַאָאּבּגּדּהּוּזּטּיּךּכּלּמּנּסּףּפּצּקּרּתּוֹבֿכֿפֿאלئائەئوئۇئۆئۈئېئىئجئحئمئيبجبمبىبيتىتيثجثمثىثيخحضجضمطحظمغجفجفحفىفيقحقىقيكاكجكحكخكلكىكينخنىنيهجهىهييىذٰرٰىٰئرئزئنبزبنترتزتنثرثزثنمانرنزننيريزئخئهبهتهصخنههٰثهسهشهطىطيعىعيغىغيسىسيشىشيصىصيضىضيشخشرسرصرضراً ًـًـّ ْـْلآلألإ𝅗𝅥0,1,2,3,4,5,6,7,8,9,wzhvsdwcmcmddjほかココàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįĵķĺļľłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷÿźżɓƃƅɔƈɖɗƌǝəɛƒɠɣɩɨƙɯɲɵơƣƥʀƨʃƭʈưʊʋƴƶʒƹƽǎǐǒǔǖǘǚǜǟǡǣǥǧǩǫǭǯǵƕƿǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟƞȣȥȧȩȫȭȯȱȳⱥȼƚⱦɂƀʉʌɇɉɋɍɏɦɹɻʁʕͱͳʹͷ;ϳέίόύβγδεζθκλνξοπρστυφχψϊϋϗϙϛϝϟϡϣϥϧϩϫϭϯϸϻͻͼͽѐёђѓєѕіїјљњћќѝўџабвгдежзийклмнопрстуфхцчшщъыьэюяѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯաբգդզէըթժլծկհձղճյշոչպջռստրցփքօֆ་ⴧⴭნᏰᏱᏲᏳᏴᏵꙋɐɑᴂɜᴖᴗᴝᴥɒɕɟɡɥɪᵻʝɭᶅʟɱɰɳɴɸʂƫᴜʐʑḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿἐἑἒἓἔἕἰἱἲἳἴἵἶἷὀὁὂὃὄὅὑὓὕὗᾰᾱὲΐῐῑὶΰῠῡὺῥ`ὸ‐+−∑〈〉ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞⱡɫᵽɽⱨⱪⱬⱳⱶȿɀⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳬⳮⳳⵡ母龟丨丶丿乙亅亠人儿入冂冖冫几凵刀力勹匕匚匸卜卩厂厶又口囗士夂夊夕女子宀寸小尢尸屮山巛工己巾干幺广廴廾弋弓彐彡彳心戈戶手支攴文斗斤方无曰欠止歹殳毋比毛氏气爪父爻爿片牙牛犬玄玉瓜瓦甘生用田疋疒癶白皮皿目矛矢石示禸禾穴立竹米糸缶网羊羽老而耒耳聿肉臣臼舌舛舟艮色艸虍虫血行衣襾見角言谷豆豕豸貝赤走足身車辛辰辵邑酉釆里長門阜隶隹雨靑非面革韋韭音頁風飛食首香馬骨高髟鬥鬯鬲鬼魚鳥鹵鹿麥麻黃黍黑黹黽鼎鼓鼠鼻齊齒龍龜龠.〒卄卅ᄁᆪᆬᆭᄄᆰᆱᆲᆳᆴᆵᄚᄈᄡᄊ짜ᅢᅣᅤᅥᅦᅧᅨᅩᅪᅫᅬᅭᅮᅯᅰᅱᅲᅳᅴᅵᄔᄕᇇᇈᇌᇎᇓᇗᇙᄜᇝᇟᄝᄞᄠᄢᄣᄧᄩᄫᄬᄭᄮᄯᄲᄶᅀᅇᅌᇱᇲᅗᅘᅙᆄᆅᆈᆑᆒᆔᆞᆡ上中下甲丙丁天地問幼箏우秘男適優印注項写左右医宗夜テヌモヨヰヱヲꙁꙃꙅꙇꙉꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝺꝼᵹꝿꞁꞃꞅꞇꞌꞑꞓꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩɬʞʇꭓꞵꞷꬷꭒᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩᎪᎫᎬᎭᎮᎯᎰᎱᎲᎳᎴᎵᎶᎷᎸᎹᎺᎻᎼᎽᎾᎿᏀᏁᏂᏃᏄᏅᏆᏇᏈᏉᏊᏋᏌᏍᏎᏏᏐᏑᏒᏓᏔᏕᏖᏗᏘᏙᏚᏛᏜᏝᏞᏟᏠᏡᏢᏣᏤᏥᏦᏧᏨᏩᏪᏫᏬᏭᏮᏯ豈更賈滑串句契喇奈懶癩羅蘿螺裸邏樂洛烙珞落酪駱亂卵欄爛蘭鸞嵐濫藍襤拉臘蠟廊朗浪狼郎來冷勞擄櫓爐盧蘆虜路露魯鷺碌祿綠菉錄論壟弄籠聾牢磊賂雷壘屢樓淚漏累縷陋勒肋凜凌稜綾菱陵讀拏諾丹寧怒率異北磻便復不泌數索參塞省葉說殺沈拾若掠略亮兩凉梁糧良諒量勵呂廬旅濾礪閭驪麗黎曆歷轢年憐戀撚漣煉璉秊練聯輦蓮連鍊列劣咽烈裂廉念捻殮簾獵令囹嶺怜玲瑩羚聆鈴零靈領例禮醴隸惡了僚寮尿料燎療蓼遼暈阮劉杻柳流溜琉留硫紐類戮陸倫崙淪輪律慄栗隆利吏履易李梨泥理痢罹裏裡離匿溺吝燐璘藺隣鱗麟林淋臨笠粒狀炙識什茶刺切度拓糖宅洞暴輻降廓兀嗀塚晴凞猪益礼神祥福靖精蘒諸逸都飯飼館鶴郞隷侮僧免勉勤卑喝嘆器塀墨層悔慨憎懲敏既暑梅海渚漢煮爫琢碑祉祈祐祖禍禎穀突節縉繁署者臭艹著褐視謁謹賓贈辶難響頻恵𤋮舘並况全侀充冀勇勺啕喙嗢墳奄奔婢嬨廒廙彩徭惘慎愈慠戴揄搜摒敖望杖滛滋瀞瞧爵犯瑱甆画瘝瘟盛直睊着磌窱类絛缾荒華蝹襁覆調請諭變輸遲醙鉶陼韛頋鬒𢡊𢡄𣏕㮝䀘䀹𥉉𥳐𧻓齃龎עםٱٻپڀٺٿٹڤڦڄڃچڇڍڌڎڈژڑکگڳڱںڻۀہھۓڭۋۅۉ、〖〗—–_{}【】《》「」『』[]#&*-<>\\$%@ءؤة\"'^|~⦅⦆・ゥャ¢£¬¦¥₩│←↑→↓■○𐐨𐐩𐐪𐐫𐐬𐐭𐐮𐐯𐐰𐐱𐐲𐐳𐐴𐐵𐐶𐐷𐐸𐐹𐐺𐐻𐐼𐐽𐐾𐐿𐑀𐑁𐑂𐑃𐑄𐑅𐑆𐑇𐑈𐑉𐑊𐑋𐑌𐑍𐑎𐑏𐓘𐓙𐓚𐓛𐓜𐓝𐓞𐓟𐓠𐓡𐓢𐓣𐓤𐓥𐓦𐓧𐓨𐓩𐓪𐓫𐓬𐓭𐓮𐓯𐓰𐓱𐓲𐓳𐓴𐓵𐓶𐓷𐓸𐓹𐓺𐓻𐳀𐳁𐳂𐳃𐳄𐳅𐳆𐳇𐳈𐳉𐳊𐳋𐳌𐳍𐳎𐳏𐳐𐳑𐳒𐳓𐳔𐳕𐳖𐳗𐳘𐳙𐳚𐳛𐳜𐳝𐳞𐳟𐳠𐳡𐳢𐳣𐳤𐳥𐳦𐳧𐳨𐳩𐳪𐳫𐳬𐳭𐳮𐳯𐳰𐳱𐳲𑣀𑣁𑣂𑣃𑣄𑣅𑣆𑣇𑣈𑣉𑣊𑣋𑣌𑣍𑣎𑣏𑣐𑣑𑣒𑣓𑣔𑣕𑣖𑣗𑣘𑣙𑣚𑣛𑣜𑣝𑣞𑣟ıȷ∇∂𞤢𞤣𞤤𞤥𞤦𞤧𞤨𞤩𞤪𞤫𞤬𞤭𞤮𞤯𞤰𞤱𞤲𞤳𞤴𞤵𞤶𞤷𞤸𞤹𞤺𞤻𞤼𞤽𞤾𞤿𞥀𞥁𞥂𞥃ٮڡٯ字双多解交映無前後再新初終販声吹演投捕遊指禁空合満申割営配得可丽丸乁𠄢你侻倂偺備像㒞𠘺兔兤具𠔜㒹內𠕋冗冤仌冬𩇟刃㓟刻剆剷㔕包匆卉博即卽卿𠨬灰及叟𠭣叫叱吆咞吸呈周咢哶唐啓啣善喫喳嗂圖圗噑噴壮城埴堍型堲報墬𡓤売壷夆夢奢𡚨𡛪姬娛娧姘婦㛮嬈嬾𡧈寃寘寳𡬘寿将㞁屠峀岍𡷤嵃𡷦嵮嵫嵼巡巢㠯巽帨帽幩㡢𢆃㡼庰庳庶𪎒𢌱舁弢㣇𣊸𦇚形彫㣣徚忍志忹悁㤺㤜𢛔惇慈慌慺憲憤憯懞戛扝抱拔捐𢬌挽拼捨掃揤𢯱搢揅掩㨮摩摾撝摷㩬敬𣀊旣書晉㬙㬈㫤冒冕最暜肭䏙朡杞杓𣏃㭉柺枅桒𣑭梎栟椔楂榣槪檨𣚣櫛㰘次𣢧歔㱎歲殟殻𣪍𡴋𣫺汎𣲼沿泍汧洖派浩浸涅𣴞洴港湮㴳滇𣻑淹潮𣽞𣾎濆瀹瀛㶖灊災灷炭𠔥煅𤉣熜爨牐𤘈犀犕𤜵𤠔獺王㺬玥㺸瑇瑜璅瓊㼛甤𤰶甾𤲒𢆟瘐𤾡𤾸𥁄㿼䀈𥃳𥃲𥄙𥄳眞真瞋䁆䂖𥐝硎䃣𥘦𥚚𥛅秫䄯穊穏𥥼𥪧䈂𥮫篆築䈧𥲀糒䊠糨糣紀𥾆絣䌁緇縂繅䌴𦈨𦉇䍙𦋙罺𦌾羕翺𦓚𦔣聠𦖨聰𣍟䏕育脃䐋脾媵𦞧𦞵𣎓𣎜舄辞䑫芑芋芝劳花芳芽苦𦬼茝荣莭茣莽菧荓菊菌菜𦰶𦵫𦳕䔫蓱蓳蔖𧏊蕤𦼬䕝䕡𦾱𧃒䕫虐虧虩蚩蚈蜎蛢蜨蝫螆蟡蠁䗹衠𧙧裗裞䘵裺㒻𧢮𧥦䚾䛇誠𧲨貫賁贛起𧼯𠠄跋趼跰𠣞軔𨗒𨗭邔郱鄑𨜮鄛鈸鋗鋘鉼鏹鐕𨯺開䦕閷𨵷䧦雃嶲霣𩅅𩈚䩮䩶韠𩐊䪲𩒖頩𩖶飢䬳餩馧駂駾䯎𩬰鱀鳽䳎䳭鵧𪃎䳸𪄅𪈎𪊑䵖黾鼅鼏鼖𪘀"; + +function mapChar(codePoint) { + if (codePoint >= 0x30000) { + // High planes are special cased. + if (codePoint >= 0xE0100 && codePoint <= 0xE01EF) + return 18874368; + return 0; + } + return blocks[blockIdxes[codePoint >> 4]][codePoint & 15]; +} + +return { + mapStr: mappingStr, + mapChar: mapChar +}; +})); + +},{}],177:[function(require,module,exports){ +(function(root, factory) { + /* istanbul ignore next */ + if (typeof define === 'function' && define.amd) { + define(['punycode', './idna-map'], function(punycode, idna_map) { + return factory(punycode, idna_map); + }); + } + else if (typeof exports === 'object') { + module.exports = factory(require('punycode'), require('./idna-map')); + } + else { + root.uts46 = factory(root.punycode, root.idna_map); + } +}(this, function(punycode, idna_map) { + + function mapLabel(label, useStd3ASCII, transitional) { + var mapped = []; + var chars = punycode.ucs2.decode(label); + for (var i = 0; i < chars.length; i++) { + var cp = chars[i]; + var ch = punycode.ucs2.encode([chars[i]]); + var composite = idna_map.mapChar(cp); + var flags = (composite >> 23); + var kind = (composite >> 21) & 3; + var index = (composite >> 5) & 0xffff; + var length = composite & 0x1f; + var value = idna_map.mapStr.substr(index, length); + if (kind === 0 || (useStd3ASCII && (flags & 1))) { + throw new Error("Illegal char " + ch); + } + else if (kind === 1) { + mapped.push(value); + } + else if (kind === 2) { + mapped.push(transitional ? value : ch); + } + /* istanbul ignore next */ + else if (kind === 3) { + mapped.push(ch); + } + } + + var newLabel = mapped.join("").normalize("NFC"); + return newLabel; + } + + function process(domain, transitional, useStd3ASCII) { + /* istanbul ignore if */ + if (useStd3ASCII === undefined) + useStd3ASCII = false; + var mappedIDNA = mapLabel(domain, useStd3ASCII, transitional); + + // Step 3. Break + var labels = mappedIDNA.split("."); + + // Step 4. Convert/Validate + labels = labels.map(function(label) { + if (label.startsWith("xn--")) { + label = punycode.decode(label.substring(4)); + validateLabel(label, useStd3ASCII, false); + } + else { + validateLabel(label, useStd3ASCII, transitional); + } + return label; + }); + + return labels.join("."); + } + + function validateLabel(label, useStd3ASCII, transitional) { + // 2. The label must not contain a U+002D HYPHEN-MINUS character in both the + // third position and fourth positions. + if (label[2] === '-' && label[3] === '-') + throw new Error("Failed to validate " + label); + + // 3. The label must neither begin nor end with a U+002D HYPHEN-MINUS + // character. + if (label.startsWith('-') || label.endsWith('-')) + throw new Error("Failed to validate " + label); + + // 4. The label must not contain a U+002E ( . ) FULL STOP. + // this should nerver happen as label is chunked internally by this character + /* istanbul ignore if */ + if (label.includes('.')) + throw new Error("Failed to validate " + label); + + if (mapLabel(label, useStd3ASCII, transitional) !== label) + throw new Error("Failed to validate " + label); + + // 5. The label must not begin with a combining mark, that is: + // General_Category=Mark. + var ch = label.codePointAt(0); + if (idna_map.mapChar(ch) & (0x2 << 23)) + throw new Error("Label contains illegal character: " + ch); + } + + function toAscii(domain, options) { + if (options === undefined) + options = {}; + var transitional = 'transitional' in options ? options.transitional : true; + var useStd3ASCII = 'useStd3ASCII' in options ? options.useStd3ASCII : false; + var verifyDnsLength = 'verifyDnsLength' in options ? options.verifyDnsLength : false; + var labels = process(domain, transitional, useStd3ASCII).split('.'); + var asciiLabels = labels.map(punycode.toASCII); + var asciiString = asciiLabels.join('.'); + var i; + if (verifyDnsLength) { + if (asciiString.length < 1 || asciiString.length > 253) { + throw new Error("DNS name has wrong length: " + asciiString); + } + for (i = 0; i < asciiLabels.length; i++) {//for .. of replacement + var label = asciiLabels[i]; + if (label.length < 1 || label.length > 63) + throw new Error("DNS label has wrong length: " + label); + } + } + return asciiString; + } + + function toUnicode(domain, options) { + if (options === undefined) + options = {}; + var useStd3ASCII = 'useStd3ASCII' in options ? options.useStd3ASCII : false; + return process(domain, false, useStd3ASCII); + } + + return { + toUnicode: toUnicode, + toAscii: toAscii, + }; +})); + +},{"./idna-map":176,"punycode":265}],178:[function(require,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],179:[function(require,module,exports){ + +var indexOf = [].indexOf; + +module.exports = function(arr, obj){ + if (indexOf) return arr.indexOf(obj); + for (var i = 0; i < arr.length; ++i) { + if (arr[i] === obj) return i; + } + return -1; +}; +},{}],180:[function(require,module,exports){ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} + +},{}],181:[function(require,module,exports){ +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) +} + +function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) +} + +},{}],182:[function(require,module,exports){ +'use strict'; + +var fnToStr = Function.prototype.toString; + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = function isCallable(value) { + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + return strClass === fnClass || strClass === genClass; +}; + +},{}],183:[function(require,module,exports){ +'use strict'; +var toString = Object.prototype.toString; + +module.exports = function (x) { + return toString.call(x) === '[object Function]'; +}; + +},{}],184:[function(require,module,exports){ +module.exports = isFunction + +var toString = Object.prototype.toString + +function isFunction (fn) { + var string = toString.call(fn) + return string === '[object Function]' || + (typeof fn === 'function' && string !== '[object RegExp]') || + (typeof window !== 'undefined' && + // IE8 and below + (fn === window.setTimeout || + fn === window.alert || + fn === window.confirm || + fn === window.prompt)) +}; + +},{}],185:[function(require,module,exports){ +/** + * Returns a `Boolean` on whether or not the a `String` starts with '0x' + * @param {String} str the string input value + * @return {Boolean} a boolean if it is or is not hex prefixed + * @throws if the str input is not a string + */ +module.exports = function isHexPrefixed(str) { + if (typeof str !== 'string') { + throw new Error("[is-hex-prefixed] value must be type 'string', is currently type " + (typeof str) + ", while checking isHexPrefixed."); + } + + return str.slice(0, 2) === '0x'; +} + +},{}],186:[function(require,module,exports){ +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + +},{}],187:[function(require,module,exports){ +'use strict'; + +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } + +var promiseToCallback = require('promise-to-callback'); + +module.exports = createAsyncMiddleware; + +function createAsyncMiddleware(asyncMiddleware) { + return function (req, res, next, end) { + var getNextPromise = function () { + var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() { + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + nextDonePromise = getNextDoneCallback(); + _context.next = 3; + return nextDonePromise; + + case 3: + return _context.abrupt('return', undefined); + + case 4: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + })); + + return function getNextPromise() { + return _ref.apply(this, arguments); + }; + }(); + + var nextDonePromise = null; + var finishedPromise = asyncMiddleware(req, res, getNextPromise); + promiseToCallback(finishedPromise)(function (err) { + // async middleware ended + if (nextDonePromise) { + // next handler was called - complete nextHandler + promiseToCallback(nextDonePromise)(function (nextErr, nextHandlerSignalDone) { + // nextErr is only present if something went really wrong + // if an error is thrown after `await next()` it appears as `err` and not `nextErr` + if (nextErr) { + console.error(nextErr); + return end(nextErr); + } + nextHandlerSignalDone(err); + }); + } else { + // next handler was not called - complete middleware + end(err); + } + }); + + function getNextDoneCallback() { + return new Promise(function (resolve) { + next(function (cb) { + return resolve(cb); + }); + }); + } + }; +} + +},{"promise-to-callback":258}],188:[function(require,module,exports){ +'use strict'; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var async = require('async'); +var SafeEventEmitter = require('safe-event-emitter'); + +var RpcEngine = function (_SafeEventEmitter) { + _inherits(RpcEngine, _SafeEventEmitter); + + function RpcEngine() { + _classCallCheck(this, RpcEngine); + + var _this = _possibleConstructorReturn(this, (RpcEngine.__proto__ || Object.getPrototypeOf(RpcEngine)).call(this)); + + _this._middleware = []; + return _this; + } + + // + // Public + // + + _createClass(RpcEngine, [{ + key: 'push', + value: function push(middleware) { + this._middleware.push(middleware); + } + }, { + key: 'handle', + value: function handle(req, cb) { + // batch request support + if (Array.isArray(req)) { + async.map(req, this._handle.bind(this), cb); + } else { + this._handle(req, cb); + } + } + + // + // Private + // + + }, { + key: '_handle', + value: function _handle(_req, cb) { + // shallow clone request object + var req = Object.assign({}, _req); + // create response obj + var res = { + id: req.id, + jsonrpc: req.jsonrpc + // process all middleware + };this._runMiddleware(req, res, function (err) { + // return response + cb(err, res); + }); + } + }, { + key: '_runMiddleware', + value: function _runMiddleware(req, res, onDone) { + var _this2 = this; + + // flow + async.waterfall([function (cb) { + return _this2._runMiddlewareDown(req, res, cb); + }, checkForCompletion, function (returnHandlers, cb) { + return _this2._runReturnHandlersUp(returnHandlers, cb); + }], onDone); + + function checkForCompletion(_ref, cb) { + var isComplete = _ref.isComplete, + returnHandlers = _ref.returnHandlers; + + // fail if not completed + if (!('result' in res) && !('error' in res)) { + var requestBody = JSON.stringify(req, null, 2); + var message = 'JsonRpcEngine - response has no error or result for request:\n' + requestBody; + return cb(new Error(message)); + } + if (!isComplete) { + var _requestBody = JSON.stringify(req, null, 2); + var _message = 'JsonRpcEngine - nothing ended request:\n' + _requestBody; + return cb(new Error(_message)); + } + // continue + return cb(null, returnHandlers); + } + + function runReturnHandlers(returnHandlers, cb) { + async.eachSeries(returnHandlers, function (handler, next) { + return handler(next); + }, onDone); + } + } + + // walks down stack of middleware + + }, { + key: '_runMiddlewareDown', + value: function _runMiddlewareDown(req, res, onDone) { + // for climbing back up the stack + var allReturnHandlers = []; + // flag for stack return + var isComplete = false; + + // down stack of middleware, call and collect optional allReturnHandlers + async.mapSeries(this._middleware, eachMiddleware, completeRequest); + + // runs an individual middleware + function eachMiddleware(middleware, cb) { + // skip middleware if completed + if (isComplete) return cb(); + // run individual middleware + middleware(req, res, next, end); + + function next(returnHandler) { + // add return handler + allReturnHandlers.push(returnHandler); + cb(); + } + function end(err) { + if (err) return cb(err); + // mark as completed + isComplete = true; + cb(); + } + } + + // returns, indicating whether or not it ended + function completeRequest(err) { + if (err) { + // prepare error message + res.error = { + code: err.code || -32603, + message: err.stack + // return error-first and res with err + };return onDone(err, res); + } + var returnHandlers = allReturnHandlers.filter(Boolean).reverse(); + onDone(null, { isComplete: isComplete, returnHandlers: returnHandlers }); + } + } + + // climbs the stack calling return handlers + + }, { + key: '_runReturnHandlersUp', + value: function _runReturnHandlersUp(returnHandlers, cb) { + async.eachSeries(returnHandlers, function (handler, next) { + return handler(next); + }, cb); + } + }]); + + return RpcEngine; +}(SafeEventEmitter); + +module.exports = RpcEngine; + +},{"async":21,"safe-event-emitter":291}],189:[function(require,module,exports){ +module.exports = require('./lib/errors'); +},{"./lib/errors":190}],190:[function(require,module,exports){ +var inherits = require('inherits'); + +var JsonRpcError = function(message, code, data) { + if (!(this instanceof JsonRpcError)) { + return new JsonRpcError(message, code, data); + } + + this.message = message; + this.code = code; + + if (typeof data !== 'undefined') { + this.data = data; + } +}; + +inherits(JsonRpcError, Error); + +var ParseError = function() { + if (!(this instanceof ParseError)) { + return new ParseError(); + } + + JsonRpcError.call(this, 'Parse error', -32700); +}; + +inherits(ParseError, JsonRpcError); + +var InvalidRequest = function() { + if (!(this instanceof InvalidRequest)) { + return new InvalidRequest(); + } + + JsonRpcError.call(this, 'Invalid Request', -32600); +}; + +inherits(InvalidRequest, JsonRpcError); + +var MethodNotFound = function() { + if (!(this instanceof MethodNotFound)) { + return new MethodNotFound(); + } + + JsonRpcError.call(this, 'Method not found', -32601); +}; + +inherits(MethodNotFound, JsonRpcError); + +var InvalidParams = function() { + if (!(this instanceof InvalidParams)) { + return new InvalidParams(); + } + + JsonRpcError.call(this, 'Invalid params', -32602); +}; + +inherits(InvalidParams, JsonRpcError); + +var InternalError = function(err) { + var message; + + if (!(this instanceof InternalError)) { + return new InternalError(err); + } + + if (err && err.message) { + message = err.message; + } else { + message = 'Internal error'; + } + + JsonRpcError.call(this, message, -32603); +}; + +inherits(InternalError, JsonRpcError); + +var ServerError = function(code) { + if (code < -32099 || code > -32000) { + throw new Error('Invalid error code'); + } + + if (!(this instanceof ServerError)) { + return new ServerError(code); + } + + JsonRpcError.call(this, 'Server error', code); +}; + +inherits(ServerError, JsonRpcError); + +JsonRpcError.ParseError = ParseError; +JsonRpcError.InvalidRequest = InvalidRequest; +JsonRpcError.MethodNotFound = MethodNotFound; +JsonRpcError.InvalidParams = InvalidParams; +JsonRpcError.InternalError = InternalError; +JsonRpcError.ServerError = ServerError; + +module.exports = JsonRpcError; + + + +},{"inherits":180}],191:[function(require,module,exports){ +module.exports = IdIterator + +function IdIterator(opts){ + opts = opts || {} + var max = opts.max || Number.MAX_SAFE_INTEGER + var idCounter = typeof opts.start !== 'undefined' ? opts.start : Math.floor(Math.random() * max) + + return function createRandomId () { + idCounter = idCounter % max + return idCounter++ + } + +} +},{}],192:[function(require,module,exports){ +exports.parse = require('./lib/parse'); +exports.stringify = require('./lib/stringify'); + +},{"./lib/parse":193,"./lib/stringify":194}],193:[function(require,module,exports){ +var at, // The index of the current character + ch, // The current character + escapee = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t' + }, + text, + + error = function (m) { + // Call error when something is wrong. + throw { + name: 'SyntaxError', + message: m, + at: at, + text: text + }; + }, + + next = function (c) { + // If a c parameter is provided, verify that it matches the current character. + if (c && c !== ch) { + error("Expected '" + c + "' instead of '" + ch + "'"); + } + + // Get the next character. When there are no more characters, + // return the empty string. + + ch = text.charAt(at); + at += 1; + return ch; + }, + + number = function () { + // Parse a number value. + var number, + string = ''; + + if (ch === '-') { + string = '-'; + next('-'); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + if (ch === '.') { + string += '.'; + while (next() && ch >= '0' && ch <= '9') { + string += ch; + } + } + if (ch === 'e' || ch === 'E') { + string += ch; + next(); + if (ch === '-' || ch === '+') { + string += ch; + next(); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + } + number = +string; + if (!isFinite(number)) { + error("Bad number"); + } else { + return number; + } + }, + + string = function () { + // Parse a string value. + var hex, + i, + string = '', + uffff; + + // When parsing for string values, we must look for " and \ characters. + if (ch === '"') { + while (next()) { + if (ch === '"') { + next(); + return string; + } else if (ch === '\\') { + next(); + if (ch === 'u') { + uffff = 0; + for (i = 0; i < 4; i += 1) { + hex = parseInt(next(), 16); + if (!isFinite(hex)) { + break; + } + uffff = uffff * 16 + hex; + } + string += String.fromCharCode(uffff); + } else if (typeof escapee[ch] === 'string') { + string += escapee[ch]; + } else { + break; + } + } else { + string += ch; + } + } + } + error("Bad string"); + }, + + white = function () { + +// Skip whitespace. + + while (ch && ch <= ' ') { + next(); + } + }, + + word = function () { + +// true, false, or null. + + switch (ch) { + case 't': + next('t'); + next('r'); + next('u'); + next('e'); + return true; + case 'f': + next('f'); + next('a'); + next('l'); + next('s'); + next('e'); + return false; + case 'n': + next('n'); + next('u'); + next('l'); + next('l'); + return null; + } + error("Unexpected '" + ch + "'"); + }, + + value, // Place holder for the value function. + + array = function () { + +// Parse an array value. + + var array = []; + + if (ch === '[') { + next('['); + white(); + if (ch === ']') { + next(']'); + return array; // empty array + } + while (ch) { + array.push(value()); + white(); + if (ch === ']') { + next(']'); + return array; + } + next(','); + white(); + } + } + error("Bad array"); + }, + + object = function () { + +// Parse an object value. + + var key, + object = {}; + + if (ch === '{') { + next('{'); + white(); + if (ch === '}') { + next('}'); + return object; // empty object + } + while (ch) { + key = string(); + white(); + next(':'); + if (Object.hasOwnProperty.call(object, key)) { + error('Duplicate key "' + key + '"'); + } + object[key] = value(); + white(); + if (ch === '}') { + next('}'); + return object; + } + next(','); + white(); + } + } + error("Bad object"); + }; + +value = function () { + +// Parse a JSON value. It could be an object, an array, a string, a number, +// or a word. + + white(); + switch (ch) { + case '{': + return object(); + case '[': + return array(); + case '"': + return string(); + case '-': + return number(); + default: + return ch >= '0' && ch <= '9' ? number() : word(); + } +}; + +// Return the json_parse function. It will have access to all of the above +// functions and variables. + +module.exports = function (source, reviver) { + var result; + + text = source; + at = 0; + ch = ' '; + result = value(); + white(); + if (ch) { + error("Syntax error"); + } + + // If there is a reviver function, we recursively walk the new structure, + // passing each name/value pair to the reviver function for possible + // transformation, starting with a temporary root object that holds the result + // in an empty key. If there is not a reviver function, we simply return the + // result. + + return typeof reviver === 'function' ? (function walk(holder, key) { + var k, v, value = holder[key]; + if (value && typeof value === 'object') { + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = walk(value, k); + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + } + } + } + return reviver.call(holder, key, value); + }({'': result}, '')) : result; +}; + +},{}],194:[function(require,module,exports){ +var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + gap, + indent, + meta = { // table of character substitutions + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"' : '\\"', + '\\': '\\\\' + }, + rep; + +function quote(string) { + // If the string contains no control characters, no quote characters, and no + // backslash characters, then we can safely slap some quotes around it. + // Otherwise we must also replace the offending characters with safe escape + // sequences. + + escapable.lastIndex = 0; + return escapable.test(string) ? '"' + string.replace(escapable, function (a) { + var c = meta[a]; + return typeof c === 'string' ? c : + '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : '"' + string + '"'; +} + +function str(key, holder) { + // Produce a string from holder[key]. + var i, // The loop counter. + k, // The member key. + v, // The member value. + length, + mind = gap, + partial, + value = holder[key]; + + // If the value has a toJSON method, call it to obtain a replacement value. + if (value && typeof value === 'object' && + typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + + // If we were called with a replacer function, then call the replacer to + // obtain a replacement value. + if (typeof rep === 'function') { + value = rep.call(holder, key, value); + } + + // What happens next depends on the value's type. + switch (typeof value) { + case 'string': + return quote(value); + + case 'number': + // JSON numbers must be finite. Encode non-finite numbers as null. + return isFinite(value) ? String(value) : 'null'; + + case 'boolean': + case 'null': + // If the value is a boolean or null, convert it to a string. Note: + // typeof null does not produce 'null'. The case is included here in + // the remote chance that this gets fixed someday. + return String(value); + + case 'object': + if (!value) return 'null'; + gap += indent; + partial = []; + + // Array.isArray + if (Object.prototype.toString.apply(value) === '[object Array]') { + length = value.length; + for (i = 0; i < length; i += 1) { + partial[i] = str(i, value) || 'null'; + } + + // Join all of the elements together, separated with commas, and + // wrap them in brackets. + v = partial.length === 0 ? '[]' : gap ? + '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : + '[' + partial.join(',') + ']'; + gap = mind; + return v; + } + + // If the replacer is an array, use it to select the members to be + // stringified. + if (rep && typeof rep === 'object') { + length = rep.length; + for (i = 0; i < length; i += 1) { + k = rep[i]; + if (typeof k === 'string') { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } + else { + // Otherwise, iterate through all of the keys in the object. + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } + + // Join all of the member texts together, separated with commas, + // and wrap them in braces. + + v = partial.length === 0 ? '{}' : gap ? + '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : + '{' + partial.join(',') + '}'; + gap = mind; + return v; + } +} + +module.exports = function (value, replacer, space) { + var i; + gap = ''; + indent = ''; + + // If the space parameter is a number, make an indent string containing that + // many spaces. + if (typeof space === 'number') { + for (i = 0; i < space; i += 1) { + indent += ' '; + } + } + // If the space parameter is a string, it will be used as the indent string. + else if (typeof space === 'string') { + indent = space; + } + + // If there is a replacer, it must be a function or an array. + // Otherwise, throw an error. + rep = replacer; + if (replacer && typeof replacer !== 'function' + && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) { + throw new Error('JSON.stringify'); + } + + // Make a fake root object containing our value under the key of ''. + // Return the result of stringifying the value. + return str('', {'': value}); +}; + +},{}],195:[function(require,module,exports){ +'use strict' +module.exports = require('./lib/api')(require('./lib/keccak')) + +},{"./lib/api":196,"./lib/keccak":200}],196:[function(require,module,exports){ +'use strict' +var createKeccak = require('./keccak') +var createShake = require('./shake') + +module.exports = function (KeccakState) { + var Keccak = createKeccak(KeccakState) + var Shake = createShake(KeccakState) + + return function (algorithm, options) { + var hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm + switch (hash) { + case 'keccak224': return new Keccak(1152, 448, null, 224, options) + case 'keccak256': return new Keccak(1088, 512, null, 256, options) + case 'keccak384': return new Keccak(832, 768, null, 384, options) + case 'keccak512': return new Keccak(576, 1024, null, 512, options) + + case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options) + case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options) + case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options) + case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options) + + case 'shake128': return new Shake(1344, 256, 0x1f, options) + case 'shake256': return new Shake(1088, 512, 0x1f, options) + + default: throw new Error('Invald algorithm: ' + algorithm) + } + } +} + +},{"./keccak":197,"./shake":198}],197:[function(require,module,exports){ +'use strict' +var Buffer = require('safe-buffer').Buffer +var Transform = require('stream').Transform +var inherits = require('inherits') + +module.exports = function (KeccakState) { + function Keccak (rate, capacity, delimitedSuffix, hashBitLength, options) { + Transform.call(this, options) + + this._rate = rate + this._capacity = capacity + this._delimitedSuffix = delimitedSuffix + this._hashBitLength = hashBitLength + this._options = options + + this._state = new KeccakState() + this._state.initialize(rate, capacity) + this._finalized = false + } + + inherits(Keccak, Transform) + + Keccak.prototype._transform = function (chunk, encoding, callback) { + var error = null + try { + this.update(chunk, encoding) + } catch (err) { + error = err + } + + callback(error) + } + + Keccak.prototype._flush = function (callback) { + var error = null + try { + this.push(this.digest()) + } catch (err) { + error = err + } + + callback(error) + } + + Keccak.prototype.update = function (data, encoding) { + if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer') + if (this._finalized) throw new Error('Digest already called') + if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding) + + this._state.absorb(data) + + return this + } + + Keccak.prototype.digest = function (encoding) { + if (this._finalized) throw new Error('Digest already called') + this._finalized = true + + if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix) + var digest = this._state.squeeze(this._hashBitLength / 8) + if (encoding !== undefined) digest = digest.toString(encoding) + + this._resetState() + + return digest + } + + // remove result from memory + Keccak.prototype._resetState = function () { + this._state.initialize(this._rate, this._capacity) + return this + } + + // because sometimes we need hash right now and little later + Keccak.prototype._clone = function () { + var clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options) + this._state.copy(clone._state) + clone._finalized = this._finalized + + return clone + } + + return Keccak +} + +},{"inherits":180,"safe-buffer":290,"stream":311}],198:[function(require,module,exports){ +'use strict' +var Buffer = require('safe-buffer').Buffer +var Transform = require('stream').Transform +var inherits = require('inherits') + +module.exports = function (KeccakState) { + function Shake (rate, capacity, delimitedSuffix, options) { + Transform.call(this, options) + + this._rate = rate + this._capacity = capacity + this._delimitedSuffix = delimitedSuffix + this._options = options + + this._state = new KeccakState() + this._state.initialize(rate, capacity) + this._finalized = false + } + + inherits(Shake, Transform) + + Shake.prototype._transform = function (chunk, encoding, callback) { + var error = null + try { + this.update(chunk, encoding) + } catch (err) { + error = err + } + + callback(error) + } + + Shake.prototype._flush = function () {} + + Shake.prototype._read = function (size) { + this.push(this.squeeze(size)) + } + + Shake.prototype.update = function (data, encoding) { + if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer') + if (this._finalized) throw new Error('Squeeze already called') + if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding) + + this._state.absorb(data) + + return this + } + + Shake.prototype.squeeze = function (dataByteLength, encoding) { + if (!this._finalized) { + this._finalized = true + this._state.absorbLastFewBits(this._delimitedSuffix) + } + + var data = this._state.squeeze(dataByteLength) + if (encoding !== undefined) data = data.toString(encoding) + + return data + } + + Shake.prototype._resetState = function () { + this._state.initialize(this._rate, this._capacity) + return this + } + + Shake.prototype._clone = function () { + var clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options) + this._state.copy(clone._state) + clone._finalized = this._finalized + + return clone + } + + return Shake +} + +},{"inherits":180,"safe-buffer":290,"stream":311}],199:[function(require,module,exports){ +'use strict' +var P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648] + +exports.p1600 = function (s) { + for (var round = 0; round < 24; ++round) { + // theta + var lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40] + var hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41] + var lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42] + var hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43] + var lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44] + var hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45] + var lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46] + var hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47] + var lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48] + var hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49] + + var lo = lo4 ^ (lo1 << 1 | hi1 >>> 31) + var hi = hi4 ^ (hi1 << 1 | lo1 >>> 31) + var t1slo0 = s[0] ^ lo + var t1shi0 = s[1] ^ hi + var t1slo5 = s[10] ^ lo + var t1shi5 = s[11] ^ hi + var t1slo10 = s[20] ^ lo + var t1shi10 = s[21] ^ hi + var t1slo15 = s[30] ^ lo + var t1shi15 = s[31] ^ hi + var t1slo20 = s[40] ^ lo + var t1shi20 = s[41] ^ hi + lo = lo0 ^ (lo2 << 1 | hi2 >>> 31) + hi = hi0 ^ (hi2 << 1 | lo2 >>> 31) + var t1slo1 = s[2] ^ lo + var t1shi1 = s[3] ^ hi + var t1slo6 = s[12] ^ lo + var t1shi6 = s[13] ^ hi + var t1slo11 = s[22] ^ lo + var t1shi11 = s[23] ^ hi + var t1slo16 = s[32] ^ lo + var t1shi16 = s[33] ^ hi + var t1slo21 = s[42] ^ lo + var t1shi21 = s[43] ^ hi + lo = lo1 ^ (lo3 << 1 | hi3 >>> 31) + hi = hi1 ^ (hi3 << 1 | lo3 >>> 31) + var t1slo2 = s[4] ^ lo + var t1shi2 = s[5] ^ hi + var t1slo7 = s[14] ^ lo + var t1shi7 = s[15] ^ hi + var t1slo12 = s[24] ^ lo + var t1shi12 = s[25] ^ hi + var t1slo17 = s[34] ^ lo + var t1shi17 = s[35] ^ hi + var t1slo22 = s[44] ^ lo + var t1shi22 = s[45] ^ hi + lo = lo2 ^ (lo4 << 1 | hi4 >>> 31) + hi = hi2 ^ (hi4 << 1 | lo4 >>> 31) + var t1slo3 = s[6] ^ lo + var t1shi3 = s[7] ^ hi + var t1slo8 = s[16] ^ lo + var t1shi8 = s[17] ^ hi + var t1slo13 = s[26] ^ lo + var t1shi13 = s[27] ^ hi + var t1slo18 = s[36] ^ lo + var t1shi18 = s[37] ^ hi + var t1slo23 = s[46] ^ lo + var t1shi23 = s[47] ^ hi + lo = lo3 ^ (lo0 << 1 | hi0 >>> 31) + hi = hi3 ^ (hi0 << 1 | lo0 >>> 31) + var t1slo4 = s[8] ^ lo + var t1shi4 = s[9] ^ hi + var t1slo9 = s[18] ^ lo + var t1shi9 = s[19] ^ hi + var t1slo14 = s[28] ^ lo + var t1shi14 = s[29] ^ hi + var t1slo19 = s[38] ^ lo + var t1shi19 = s[39] ^ hi + var t1slo24 = s[48] ^ lo + var t1shi24 = s[49] ^ hi + + // rho & pi + var t2slo0 = t1slo0 + var t2shi0 = t1shi0 + var t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28) + var t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28) + var t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29) + var t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29) + var t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23) + var t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23) + var t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14) + var t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14) + var t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31) + var t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31) + var t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20) + var t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20) + var t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22) + var t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22) + var t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19) + var t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19) + var t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30) + var t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30) + var t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2) + var t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2) + var t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26) + var t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26) + var t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21) + var t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21) + var t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17) + var t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17) + var t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3) + var t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3) + var t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4) + var t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4) + var t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9) + var t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9) + var t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7) + var t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7) + var t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11) + var t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11) + var t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8) + var t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8) + var t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5) + var t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5) + var t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12) + var t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12) + var t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25) + var t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25) + var t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24) + var t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24) + var t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18) + var t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18) + + // chi + s[0] = t2slo0 ^ (~t2slo1 & t2slo2) + s[1] = t2shi0 ^ (~t2shi1 & t2shi2) + s[10] = t2slo5 ^ (~t2slo6 & t2slo7) + s[11] = t2shi5 ^ (~t2shi6 & t2shi7) + s[20] = t2slo10 ^ (~t2slo11 & t2slo12) + s[21] = t2shi10 ^ (~t2shi11 & t2shi12) + s[30] = t2slo15 ^ (~t2slo16 & t2slo17) + s[31] = t2shi15 ^ (~t2shi16 & t2shi17) + s[40] = t2slo20 ^ (~t2slo21 & t2slo22) + s[41] = t2shi20 ^ (~t2shi21 & t2shi22) + s[2] = t2slo1 ^ (~t2slo2 & t2slo3) + s[3] = t2shi1 ^ (~t2shi2 & t2shi3) + s[12] = t2slo6 ^ (~t2slo7 & t2slo8) + s[13] = t2shi6 ^ (~t2shi7 & t2shi8) + s[22] = t2slo11 ^ (~t2slo12 & t2slo13) + s[23] = t2shi11 ^ (~t2shi12 & t2shi13) + s[32] = t2slo16 ^ (~t2slo17 & t2slo18) + s[33] = t2shi16 ^ (~t2shi17 & t2shi18) + s[42] = t2slo21 ^ (~t2slo22 & t2slo23) + s[43] = t2shi21 ^ (~t2shi22 & t2shi23) + s[4] = t2slo2 ^ (~t2slo3 & t2slo4) + s[5] = t2shi2 ^ (~t2shi3 & t2shi4) + s[14] = t2slo7 ^ (~t2slo8 & t2slo9) + s[15] = t2shi7 ^ (~t2shi8 & t2shi9) + s[24] = t2slo12 ^ (~t2slo13 & t2slo14) + s[25] = t2shi12 ^ (~t2shi13 & t2shi14) + s[34] = t2slo17 ^ (~t2slo18 & t2slo19) + s[35] = t2shi17 ^ (~t2shi18 & t2shi19) + s[44] = t2slo22 ^ (~t2slo23 & t2slo24) + s[45] = t2shi22 ^ (~t2shi23 & t2shi24) + s[6] = t2slo3 ^ (~t2slo4 & t2slo0) + s[7] = t2shi3 ^ (~t2shi4 & t2shi0) + s[16] = t2slo8 ^ (~t2slo9 & t2slo5) + s[17] = t2shi8 ^ (~t2shi9 & t2shi5) + s[26] = t2slo13 ^ (~t2slo14 & t2slo10) + s[27] = t2shi13 ^ (~t2shi14 & t2shi10) + s[36] = t2slo18 ^ (~t2slo19 & t2slo15) + s[37] = t2shi18 ^ (~t2shi19 & t2shi15) + s[46] = t2slo23 ^ (~t2slo24 & t2slo20) + s[47] = t2shi23 ^ (~t2shi24 & t2shi20) + s[8] = t2slo4 ^ (~t2slo0 & t2slo1) + s[9] = t2shi4 ^ (~t2shi0 & t2shi1) + s[18] = t2slo9 ^ (~t2slo5 & t2slo6) + s[19] = t2shi9 ^ (~t2shi5 & t2shi6) + s[28] = t2slo14 ^ (~t2slo10 & t2slo11) + s[29] = t2shi14 ^ (~t2shi10 & t2shi11) + s[38] = t2slo19 ^ (~t2slo15 & t2slo16) + s[39] = t2shi19 ^ (~t2shi15 & t2shi16) + s[48] = t2slo24 ^ (~t2slo20 & t2slo21) + s[49] = t2shi24 ^ (~t2shi20 & t2shi21) + + // iota + s[0] ^= P1600_ROUND_CONSTANTS[round * 2] + s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1] + } +} + +},{}],200:[function(require,module,exports){ +'use strict' +var Buffer = require('safe-buffer').Buffer +var keccakState = require('./keccak-state-unroll') + +function Keccak () { + // much faster than `new Array(50)` + this.state = [ + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0 + ] + + this.blockSize = null + this.count = 0 + this.squeezing = false +} + +Keccak.prototype.initialize = function (rate, capacity) { + for (var i = 0; i < 50; ++i) this.state[i] = 0 + this.blockSize = rate / 8 + this.count = 0 + this.squeezing = false +} + +Keccak.prototype.absorb = function (data) { + for (var i = 0; i < data.length; ++i) { + this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4)) + this.count += 1 + if (this.count === this.blockSize) { + keccakState.p1600(this.state) + this.count = 0 + } + } +} + +Keccak.prototype.absorbLastFewBits = function (bits) { + this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4)) + if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state) + this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4)) + keccakState.p1600(this.state) + this.count = 0 + this.squeezing = true +} + +Keccak.prototype.squeeze = function (length) { + if (!this.squeezing) this.absorbLastFewBits(0x01) + + var output = Buffer.alloc(length) + for (var i = 0; i < length; ++i) { + output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff + this.count += 1 + if (this.count === this.blockSize) { + keccakState.p1600(this.state) + this.count = 0 + } + } + + return output +} + +Keccak.prototype.copy = function (dest) { + for (var i = 0; i < 50; ++i) dest.state[i] = this.state[i] + dest.blockSize = this.blockSize + dest.count = this.count + dest.squeezing = this.squeezing +} + +module.exports = Keccak + +},{"./keccak-state-unroll":199,"safe-buffer":290}],201:[function(require,module,exports){ +var root = require('./_root'); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; + +},{"./_root":217}],202:[function(require,module,exports){ +var baseTimes = require('./_baseTimes'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isIndex = require('./_isIndex'), + isTypedArray = require('./isTypedArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +module.exports = arrayLikeKeys; + +},{"./_baseTimes":207,"./_isIndex":211,"./isArguments":219,"./isArray":220,"./isBuffer":222,"./isTypedArray":227}],203:[function(require,module,exports){ +var Symbol = require('./_Symbol'), + getRawTag = require('./_getRawTag'), + objectToString = require('./_objectToString'); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; + +},{"./_Symbol":201,"./_getRawTag":210,"./_objectToString":215}],204:[function(require,module,exports){ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +module.exports = baseIsArguments; + +},{"./_baseGetTag":203,"./isObjectLike":226}],205:[function(require,module,exports){ +var baseGetTag = require('./_baseGetTag'), + isLength = require('./isLength'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +module.exports = baseIsTypedArray; + +},{"./_baseGetTag":203,"./isLength":224,"./isObjectLike":226}],206:[function(require,module,exports){ +var isPrototype = require('./_isPrototype'), + nativeKeys = require('./_nativeKeys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +module.exports = baseKeys; + +},{"./_isPrototype":212,"./_nativeKeys":213}],207:[function(require,module,exports){ +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +module.exports = baseTimes; + +},{}],208:[function(require,module,exports){ +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +module.exports = baseUnary; + +},{}],209:[function(require,module,exports){ +(function (global){ +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],210:[function(require,module,exports){ +var Symbol = require('./_Symbol'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; + +},{"./_Symbol":201}],211:[function(require,module,exports){ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +module.exports = isIndex; + +},{}],212:[function(require,module,exports){ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +module.exports = isPrototype; + +},{}],213:[function(require,module,exports){ +var overArg = require('./_overArg'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +module.exports = nativeKeys; + +},{"./_overArg":216}],214:[function(require,module,exports){ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; + +},{"./_freeGlobal":209}],215:[function(require,module,exports){ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; + +},{}],216:[function(require,module,exports){ +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; + +},{}],217:[function(require,module,exports){ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + +},{"./_freeGlobal":209}],218:[function(require,module,exports){ +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +module.exports = constant; + +},{}],219:[function(require,module,exports){ +var baseIsArguments = require('./_baseIsArguments'), + isObjectLike = require('./isObjectLike'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +module.exports = isArguments; + +},{"./_baseIsArguments":204,"./isObjectLike":226}],220:[function(require,module,exports){ +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = isArray; + +},{}],221:[function(require,module,exports){ +var isFunction = require('./isFunction'), + isLength = require('./isLength'); + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +module.exports = isArrayLike; + +},{"./isFunction":223,"./isLength":224}],222:[function(require,module,exports){ +var root = require('./_root'), + stubFalse = require('./stubFalse'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +module.exports = isBuffer; + +},{"./_root":217,"./stubFalse":230}],223:[function(require,module,exports){ +var baseGetTag = require('./_baseGetTag'), + isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +module.exports = isFunction; + +},{"./_baseGetTag":203,"./isObject":225}],224:[function(require,module,exports){ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; + +},{}],225:[function(require,module,exports){ +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + +},{}],226:[function(require,module,exports){ +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; + +},{}],227:[function(require,module,exports){ +var baseIsTypedArray = require('./_baseIsTypedArray'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +module.exports = isTypedArray; + +},{"./_baseIsTypedArray":205,"./_baseUnary":208,"./_nodeUtil":214}],228:[function(require,module,exports){ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeys = require('./_baseKeys'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +module.exports = keys; + +},{"./_arrayLikeKeys":202,"./_baseKeys":206,"./isArrayLike":221}],229:[function(require,module,exports){ +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +module.exports = noop; + +},{}],230:[function(require,module,exports){ +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = stubFalse; + +},{}],231:[function(require,module,exports){ +(function (Buffer){ +'use strict' +var inherits = require('inherits') +var HashBase = require('hash-base') + +var ARRAY16 = new Array(16) + +function MD5 () { + HashBase.call(this, 64) + + // state + this._a = 0x67452301 + this._b = 0xefcdab89 + this._c = 0x98badcfe + this._d = 0x10325476 +} + +inherits(MD5, HashBase) + +MD5.prototype._update = function () { + var M = ARRAY16 + for (var i = 0; i < 16; ++i) M[i] = this._block.readInt32LE(i * 4) + + var a = this._a + var b = this._b + var c = this._c + var d = this._d + + a = fnF(a, b, c, d, M[0], 0xd76aa478, 7) + d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12) + c = fnF(c, d, a, b, M[2], 0x242070db, 17) + b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22) + a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7) + d = fnF(d, a, b, c, M[5], 0x4787c62a, 12) + c = fnF(c, d, a, b, M[6], 0xa8304613, 17) + b = fnF(b, c, d, a, M[7], 0xfd469501, 22) + a = fnF(a, b, c, d, M[8], 0x698098d8, 7) + d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12) + c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17) + b = fnF(b, c, d, a, M[11], 0x895cd7be, 22) + a = fnF(a, b, c, d, M[12], 0x6b901122, 7) + d = fnF(d, a, b, c, M[13], 0xfd987193, 12) + c = fnF(c, d, a, b, M[14], 0xa679438e, 17) + b = fnF(b, c, d, a, M[15], 0x49b40821, 22) + + a = fnG(a, b, c, d, M[1], 0xf61e2562, 5) + d = fnG(d, a, b, c, M[6], 0xc040b340, 9) + c = fnG(c, d, a, b, M[11], 0x265e5a51, 14) + b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20) + a = fnG(a, b, c, d, M[5], 0xd62f105d, 5) + d = fnG(d, a, b, c, M[10], 0x02441453, 9) + c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14) + b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20) + a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5) + d = fnG(d, a, b, c, M[14], 0xc33707d6, 9) + c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14) + b = fnG(b, c, d, a, M[8], 0x455a14ed, 20) + a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5) + d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9) + c = fnG(c, d, a, b, M[7], 0x676f02d9, 14) + b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20) + + a = fnH(a, b, c, d, M[5], 0xfffa3942, 4) + d = fnH(d, a, b, c, M[8], 0x8771f681, 11) + c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16) + b = fnH(b, c, d, a, M[14], 0xfde5380c, 23) + a = fnH(a, b, c, d, M[1], 0xa4beea44, 4) + d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11) + c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16) + b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23) + a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4) + d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11) + c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16) + b = fnH(b, c, d, a, M[6], 0x04881d05, 23) + a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4) + d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11) + c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16) + b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23) + + a = fnI(a, b, c, d, M[0], 0xf4292244, 6) + d = fnI(d, a, b, c, M[7], 0x432aff97, 10) + c = fnI(c, d, a, b, M[14], 0xab9423a7, 15) + b = fnI(b, c, d, a, M[5], 0xfc93a039, 21) + a = fnI(a, b, c, d, M[12], 0x655b59c3, 6) + d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10) + c = fnI(c, d, a, b, M[10], 0xffeff47d, 15) + b = fnI(b, c, d, a, M[1], 0x85845dd1, 21) + a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6) + d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10) + c = fnI(c, d, a, b, M[6], 0xa3014314, 15) + b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21) + a = fnI(a, b, c, d, M[4], 0xf7537e82, 6) + d = fnI(d, a, b, c, M[11], 0xbd3af235, 10) + c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15) + b = fnI(b, c, d, a, M[9], 0xeb86d391, 21) + + this._a = (this._a + a) | 0 + this._b = (this._b + b) | 0 + this._c = (this._c + c) | 0 + this._d = (this._d + d) | 0 +} + +MD5.prototype._digest = function () { + // create padding and handle blocks + this._block[this._blockOffset++] = 0x80 + if (this._blockOffset > 56) { + this._block.fill(0, this._blockOffset, 64) + this._update() + this._blockOffset = 0 + } + + this._block.fill(0, this._blockOffset, 56) + this._block.writeUInt32LE(this._length[0], 56) + this._block.writeUInt32LE(this._length[1], 60) + this._update() + + // produce result + var buffer = new Buffer(16) + buffer.writeInt32LE(this._a, 0) + buffer.writeInt32LE(this._b, 4) + buffer.writeInt32LE(this._c, 8) + buffer.writeInt32LE(this._d, 12) + return buffer +} + +function rotl (x, n) { + return (x << n) | (x >>> (32 - n)) +} + +function fnF (a, b, c, d, m, k, s) { + return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + b) | 0 +} + +function fnG (a, b, c, d, m, k, s) { + return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + b) | 0 +} + +function fnH (a, b, c, d, m, k, s) { + return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + b) | 0 +} + +function fnI (a, b, c, d, m, k, s) { + return (rotl((a + ((c ^ (b | (~d)))) + m + k) | 0, s) + b) | 0 +} + +module.exports = MD5 + +}).call(this,require("buffer").Buffer) +},{"buffer":84,"hash-base":232,"inherits":180}],232:[function(require,module,exports){ +'use strict' +var Buffer = require('safe-buffer').Buffer +var Transform = require('stream').Transform +var inherits = require('inherits') + +function throwIfNotStringOrBuffer (val, prefix) { + if (!Buffer.isBuffer(val) && typeof val !== 'string') { + throw new TypeError(prefix + ' must be a string or a buffer') + } +} + +function HashBase (blockSize) { + Transform.call(this) + + this._block = Buffer.allocUnsafe(blockSize) + this._blockSize = blockSize + this._blockOffset = 0 + this._length = [0, 0, 0, 0] + + this._finalized = false +} + +inherits(HashBase, Transform) + +HashBase.prototype._transform = function (chunk, encoding, callback) { + var error = null + try { + this.update(chunk, encoding) + } catch (err) { + error = err + } + + callback(error) +} + +HashBase.prototype._flush = function (callback) { + var error = null + try { + this.push(this.digest()) + } catch (err) { + error = err + } + + callback(error) +} + +HashBase.prototype.update = function (data, encoding) { + throwIfNotStringOrBuffer(data, 'Data') + if (this._finalized) throw new Error('Digest already called') + if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding) + + // consume data + var block = this._block + var offset = 0 + while (this._blockOffset + data.length - offset >= this._blockSize) { + for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++] + this._update() + this._blockOffset = 0 + } + while (offset < data.length) block[this._blockOffset++] = data[offset++] + + // update length + for (var j = 0, carry = data.length * 8; carry > 0; ++j) { + this._length[j] += carry + carry = (this._length[j] / 0x0100000000) | 0 + if (carry > 0) this._length[j] -= 0x0100000000 * carry + } + + return this +} + +HashBase.prototype._update = function () { + throw new Error('_update is not implemented') +} + +HashBase.prototype.digest = function (encoding) { + if (this._finalized) throw new Error('Digest already called') + this._finalized = true + + var digest = this._digest() + if (encoding !== undefined) digest = digest.toString(encoding) + + // reset state + this._block.fill(0) + this._blockOffset = 0 + for (var i = 0; i < 4; ++i) this._length[i] = 0 + + return digest +} + +HashBase.prototype._digest = function () { + throw new Error('_digest is not implemented') +} + +module.exports = HashBase + +},{"inherits":180,"safe-buffer":290,"stream":311}],233:[function(require,module,exports){ +var bn = require('bn.js'); +var brorand = require('brorand'); + +function MillerRabin(rand) { + this.rand = rand || new brorand.Rand(); +} +module.exports = MillerRabin; + +MillerRabin.create = function create(rand) { + return new MillerRabin(rand); +}; + +MillerRabin.prototype._randbelow = function _randbelow(n) { + var len = n.bitLength(); + var min_bytes = Math.ceil(len / 8); + + // Generage random bytes until a number less than n is found. + // This ensures that 0..n-1 have an equal probability of being selected. + do + var a = new bn(this.rand.generate(min_bytes)); + while (a.cmp(n) >= 0); + + return a; +}; + +MillerRabin.prototype._randrange = function _randrange(start, stop) { + // Generate a random number greater than or equal to start and less than stop. + var size = stop.sub(start); + return start.add(this._randbelow(size)); +}; + +MillerRabin.prototype.test = function test(n, k, cb) { + var len = n.bitLength(); + var red = bn.mont(n); + var rone = new bn(1).toRed(red); + + if (!k) + k = Math.max(1, (len / 48) | 0); + + // Find d and s, (n - 1) = (2 ^ s) * d; + var n1 = n.subn(1); + for (var s = 0; !n1.testn(s); s++) {} + var d = n.shrn(s); + + var rn1 = n1.toRed(red); + + var prime = true; + for (; k > 0; k--) { + var a = this._randrange(new bn(2), n1); + if (cb) + cb(a); + + var x = a.toRed(red).redPow(d); + if (x.cmp(rone) === 0 || x.cmp(rn1) === 0) + continue; + + for (var i = 1; i < s; i++) { + x = x.redSqr(); + + if (x.cmp(rone) === 0) + return false; + if (x.cmp(rn1) === 0) + break; + } + + if (i === s) + return false; + } + + return prime; +}; + +MillerRabin.prototype.getDivisor = function getDivisor(n, k) { + var len = n.bitLength(); + var red = bn.mont(n); + var rone = new bn(1).toRed(red); + + if (!k) + k = Math.max(1, (len / 48) | 0); + + // Find d and s, (n - 1) = (2 ^ s) * d; + var n1 = n.subn(1); + for (var s = 0; !n1.testn(s); s++) {} + var d = n.shrn(s); + + var rn1 = n1.toRed(red); + + for (; k > 0; k--) { + var a = this._randrange(new bn(2), n1); + + var g = n.gcd(a); + if (g.cmpn(1) !== 0) + return g; + + var x = a.toRed(red).redPow(d); + if (x.cmp(rone) === 0 || x.cmp(rn1) === 0) + continue; + + for (var i = 1; i < s; i++) { + x = x.redSqr(); + + if (x.cmp(rone) === 0) + return x.fromRed().subn(1).gcd(n); + if (x.cmp(rn1) === 0) + break; + } + + if (i === s) { + x = x.redSqr(); + return x.fromRed().subn(1).gcd(n); + } + } + + return false; +}; + +},{"bn.js":53,"brorand":54}],234:[function(require,module,exports){ +module.exports = assert; + +function assert(val, msg) { + if (!val) + throw new Error(msg || 'Assertion failed'); +} + +assert.equal = function assertEqual(l, r, msg) { + if (l != r) + throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); +}; + +},{}],235:[function(require,module,exports){ +'use strict'; + +var utils = exports; + +function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg !== 'string') { + for (var i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + return res; + } + if (enc === 'hex') { + msg = msg.replace(/[^a-z0-9]+/ig, ''); + if (msg.length % 2 !== 0) + msg = '0' + msg; + for (var i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } else { + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + var hi = c >> 8; + var lo = c & 0xff; + if (hi) + res.push(hi, lo); + else + res.push(lo); + } + } + return res; +} +utils.toArray = toArray; + +function zero2(word) { + if (word.length === 1) + return '0' + word; + else + return word; +} +utils.zero2 = zero2; + +function toHex(msg) { + var res = ''; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; +} +utils.toHex = toHex; + +utils.encode = function encode(arr, enc) { + if (enc === 'hex') + return toHex(arr); + else + return arr; +}; + +},{}],236:[function(require,module,exports){ +arguments[4][154][0].apply(exports,arguments) +},{"dup":154}],237:[function(require,module,exports){ +var BN = require('bn.js'); +var stripHexPrefix = require('strip-hex-prefix'); + +/** + * Returns a BN object, converts a number value to a BN + * @param {String|Number|Object} `arg` input a string number, hex string number, number, BigNumber or BN object + * @return {Object} `output` BN object of the number + * @throws if the argument is not an array, object that isn't a bignumber, not a string number or number + */ +module.exports = function numberToBN(arg) { + if (typeof arg === 'string' || typeof arg === 'number') { + var multiplier = new BN(1); // eslint-disable-line + var formattedString = String(arg).toLowerCase().trim(); + var isHexPrefixed = formattedString.substr(0, 2) === '0x' || formattedString.substr(0, 3) === '-0x'; + var stringArg = stripHexPrefix(formattedString); // eslint-disable-line + if (stringArg.substr(0, 1) === '-') { + stringArg = stripHexPrefix(stringArg.slice(1)); + multiplier = new BN(-1, 10); + } + stringArg = stringArg === '' ? '0' : stringArg; + + if ((!stringArg.match(/^-?[0-9]+$/) && stringArg.match(/^[0-9A-Fa-f]+$/)) + || stringArg.match(/^[a-fA-F]+$/) + || (isHexPrefixed === true && stringArg.match(/^[0-9A-Fa-f]+$/))) { + return new BN(stringArg, 16).mul(multiplier); + } + + if ((stringArg.match(/^-?[0-9]+$/) || stringArg === '') && isHexPrefixed === false) { + return new BN(stringArg, 10).mul(multiplier); + } + } else if (typeof arg === 'object' && arg.toString && (!arg.pop && !arg.push)) { + if (arg.toString(10).match(/^-?[0-9]+$/) && (arg.mul || arg.dividedToIntegerBy)) { + return new BN(arg.toString(10), 10); + } + } + + throw new Error('[number-to-bn] while converting number ' + JSON.stringify(arg) + ' to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.'); +} + +},{"bn.js":236,"strip-hex-prefix":318}],238:[function(require,module,exports){ +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + +'use strict'; +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + +},{}],239:[function(require,module,exports){ +// This file is the concatenation of many js files. +// See http://github.com/jimhigson/oboe.js for the raw source + +// having a local undefined, window, Object etc allows slightly better minification: +(function (window, Object, Array, Error, JSON, undefined ) { + + // v2.1.3 + +/* + +Copyright (c) 2013, Jim Higson + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. 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. + +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 +HOLDER 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. + +*/ + +/** + * Partially complete a function. + * + * var add3 = partialComplete( function add(a,b){return a+b}, 3 ); + * + * add3(4) // gives 7 + * + * function wrap(left, right, cen){return left + " " + cen + " " + right;} + * + * var pirateGreeting = partialComplete( wrap , "I'm", ", a mighty pirate!" ); + * + * pirateGreeting("Guybrush Threepwood"); + * // gives "I'm Guybrush Threepwood, a mighty pirate!" + */ +var partialComplete = varArgs(function( fn, args ) { + + // this isn't the shortest way to write this but it does + // avoid creating a new array each time to pass to fn.apply, + // otherwise could just call boundArgs.concat(callArgs) + + var numBoundArgs = args.length; + + return varArgs(function( callArgs ) { + + for (var i = 0; i < callArgs.length; i++) { + args[numBoundArgs + i] = callArgs[i]; + } + + args.length = numBoundArgs + callArgs.length; + + return fn.apply(this, args); + }); + }), + +/** + * Compose zero or more functions: + * + * compose(f1, f2, f3)(x) = f1(f2(f3(x)))) + * + * The last (inner-most) function may take more than one parameter: + * + * compose(f1, f2, f3)(x,y) = f1(f2(f3(x,y)))) + */ + compose = varArgs(function(fns) { + + var fnsList = arrayAsList(fns); + + function next(params, curFn) { + return [apply(params, curFn)]; + } + + return varArgs(function(startParams){ + + return foldR(next, startParams, fnsList)[0]; + }); + }); + +/** + * A more optimised version of compose that takes exactly two functions + * @param f1 + * @param f2 + */ +function compose2(f1, f2){ + return function(){ + return f1.call(this,f2.apply(this,arguments)); + } +} + +/** + * Generic form for a function to get a property from an object + * + * var o = { + * foo:'bar' + * } + * + * var getFoo = attr('foo') + * + * fetFoo(o) // returns 'bar' + * + * @param {String} key the property name + */ +function attr(key) { + return function(o) { return o[key]; }; +} + +/** + * Call a list of functions with the same args until one returns a + * truthy result. Similar to the || operator. + * + * So: + * lazyUnion([f1,f2,f3 ... fn])( p1, p2 ... pn ) + * + * Is equivalent to: + * apply([p1, p2 ... pn], f1) || + * apply([p1, p2 ... pn], f2) || + * apply([p1, p2 ... pn], f3) ... apply(fn, [p1, p2 ... pn]) + * + * @returns the first return value that is given that is truthy. + */ + var lazyUnion = varArgs(function(fns) { + + return varArgs(function(params){ + + var maybeValue; + + for (var i = 0; i < len(fns); i++) { + + maybeValue = apply(params, fns[i]); + + if( maybeValue ) { + return maybeValue; + } + } + }); + }); + +/** + * This file declares various pieces of functional programming. + * + * This isn't a general purpose functional library, to keep things small it + * has just the parts useful for Oboe.js. + */ + + +/** + * Call a single function with the given arguments array. + * Basically, a functional-style version of the OO-style Function#apply for + * when we don't care about the context ('this') of the call. + * + * The order of arguments allows partial completion of the arguments array + */ +function apply(args, fn) { + return fn.apply(undefined, args); +} + +/** + * Define variable argument functions but cut out all that tedious messing about + * with the arguments object. Delivers the variable-length part of the arguments + * list as an array. + * + * Eg: + * + * var myFunction = varArgs( + * function( fixedArgument, otherFixedArgument, variableNumberOfArguments ){ + * console.log( variableNumberOfArguments ); + * } + * ) + * + * myFunction('a', 'b', 1, 2, 3); // logs [1,2,3] + * + * var myOtherFunction = varArgs(function( variableNumberOfArguments ){ + * console.log( variableNumberOfArguments ); + * }) + * + * myFunction(1, 2, 3); // logs [1,2,3] + * + */ +function varArgs(fn){ + + var numberOfFixedArguments = fn.length -1, + slice = Array.prototype.slice; + + + if( numberOfFixedArguments == 0 ) { + // an optimised case for when there are no fixed args: + + return function(){ + return fn.call(this, slice.call(arguments)); + } + + } else if( numberOfFixedArguments == 1 ) { + // an optimised case for when there are is one fixed args: + + return function(){ + return fn.call(this, arguments[0], slice.call(arguments, 1)); + } + } + + // general case + + // we know how many arguments fn will always take. Create a + // fixed-size array to hold that many, to be re-used on + // every call to the returned function + var argsHolder = Array(fn.length); + + return function(){ + + for (var i = 0; i < numberOfFixedArguments; i++) { + argsHolder[i] = arguments[i]; + } + + argsHolder[numberOfFixedArguments] = + slice.call(arguments, numberOfFixedArguments); + + return fn.apply( this, argsHolder); + } +} + + +/** + * Swap the order of parameters to a binary function + * + * A bit like this flip: http://zvon.org/other/haskell/Outputprelude/flip_f.html + */ +function flip(fn){ + return function(a, b){ + return fn(b,a); + } +} + + +/** + * Create a function which is the intersection of two other functions. + * + * Like the && operator, if the first is truthy, the second is never called, + * otherwise the return value from the second is returned. + */ +function lazyIntersection(fn1, fn2) { + + return function (param) { + + return fn1(param) && fn2(param); + }; +} + +/** + * A function which does nothing + */ +function noop(){} + +/** + * A function which is always happy + */ +function always(){return true} + +/** + * Create a function which always returns the same + * value + * + * var return3 = functor(3); + * + * return3() // gives 3 + * return3() // still gives 3 + * return3() // will always give 3 + */ +function functor(val){ + return function(){ + return val; + } +} + +/** + * This file defines some loosely associated syntactic sugar for + * Javascript programming + */ + + +/** + * Returns true if the given candidate is of type T + */ +function isOfType(T, maybeSomething){ + return maybeSomething && maybeSomething.constructor === T; +} + +var len = attr('length'), + isString = partialComplete(isOfType, String); + +/** + * I don't like saying this: + * + * foo !=== undefined + * + * because of the double-negative. I find this: + * + * defined(foo) + * + * easier to read. + */ +function defined( value ) { + return value !== undefined; +} + +/** + * Returns true if object o has a key named like every property in + * the properties array. Will give false if any are missing, or if o + * is not an object. + */ +function hasAllProperties(fieldList, o) { + + return (o instanceof Object) + && + all(function (field) { + return (field in o); + }, fieldList); +} +/** + * Like cons in Lisp + */ +function cons(x, xs) { + + /* Internally lists are linked 2-element Javascript arrays. + + Ideally the return here would be Object.freeze([x,xs]) + so that bugs related to mutation are found fast. + However, cons is right on the critical path for + performance and this slows oboe-mark down by + ~25%. Under theoretical future JS engines that freeze more + efficiently (possibly even use immutability to + run faster) this should be considered for + restoration. + */ + + return [x,xs]; +} + +/** + * The empty list + */ +var emptyList = null, + +/** + * Get the head of a list. + * + * Ie, head(cons(a,b)) = a + */ + head = attr(0), + +/** + * Get the tail of a list. + * + * Ie, tail(cons(a,b)) = b + */ + tail = attr(1); + + +/** + * Converts an array to a list + * + * asList([a,b,c]) + * + * is equivalent to: + * + * cons(a, cons(b, cons(c, emptyList))) + **/ +function arrayAsList(inputArray){ + + return reverseList( + inputArray.reduce( + flip(cons), + emptyList + ) + ); +} + +/** + * A varargs version of arrayAsList. Works a bit like list + * in LISP. + * + * list(a,b,c) + * + * is equivalent to: + * + * cons(a, cons(b, cons(c, emptyList))) + */ +var list = varArgs(arrayAsList); + +/** + * Convert a list back to a js native array + */ +function listAsArray(list){ + + return foldR( function(arraySoFar, listItem){ + + arraySoFar.unshift(listItem); + return arraySoFar; + + }, [], list ); + +} + +/** + * Map a function over a list + */ +function map(fn, list) { + + return list + ? cons(fn(head(list)), map(fn,tail(list))) + : emptyList + ; +} + +/** + * foldR implementation. Reduce a list down to a single value. + * + * @pram {Function} fn (rightEval, curVal) -> result + */ +function foldR(fn, startValue, list) { + + return list + ? fn(foldR(fn, startValue, tail(list)), head(list)) + : startValue + ; +} + +/** + * foldR implementation. Reduce a list down to a single value. + * + * @pram {Function} fn (rightEval, curVal) -> result + */ +function foldR1(fn, list) { + + return tail(list) + ? fn(foldR1(fn, tail(list)), head(list)) + : head(list) + ; +} + + +/** + * Return a list like the one given but with the first instance equal + * to item removed + */ +function without(list, test, removedFn) { + + return withoutInner(list, removedFn || noop); + + function withoutInner(subList, removedFn) { + return subList + ? ( test(head(subList)) + ? (removedFn(head(subList)), tail(subList)) + : cons(head(subList), withoutInner(tail(subList), removedFn)) + ) + : emptyList + ; + } +} + +/** + * Returns true if the given function holds for every item in + * the list, false otherwise + */ +function all(fn, list) { + + return !list || + ( fn(head(list)) && all(fn, tail(list)) ); +} + +/** + * Call every function in a list of functions with the same arguments + * + * This doesn't make any sense if we're doing pure functional because + * it doesn't return anything. Hence, this is only really useful if the + * functions being called have side-effects. + */ +function applyEach(fnList, args) { + + if( fnList ) { + head(fnList).apply(null, args); + + applyEach(tail(fnList), args); + } +} + +/** + * Reverse the order of a list + */ +function reverseList(list){ + + // js re-implementation of 3rd solution from: + // http://www.haskell.org/haskellwiki/99_questions/Solutions/5 + function reverseInner( list, reversedAlready ) { + if( !list ) { + return reversedAlready; + } + + return reverseInner(tail(list), cons(head(list), reversedAlready)) + } + + return reverseInner(list, emptyList); +} + +function first(test, list) { + return list && + (test(head(list)) + ? head(list) + : first(test,tail(list))); +} + +/* + This is a slightly hacked-up browser only version of clarinet + + * some features removed to help keep browser Oboe under + the 5k micro-library limit + * plug directly into event bus + + For the original go here: + https://github.com/dscape/clarinet + + We receive the events: + STREAM_DATA + STREAM_END + + We emit the events: + SAX_KEY + SAX_VALUE_OPEN + SAX_VALUE_CLOSE + FAIL_EVENT + */ + +function clarinet(eventBus) { + "use strict"; + + var + // shortcut some events on the bus + emitSaxKey = eventBus(SAX_KEY).emit, + emitValueOpen = eventBus(SAX_VALUE_OPEN).emit, + emitValueClose = eventBus(SAX_VALUE_CLOSE).emit, + emitFail = eventBus(FAIL_EVENT).emit, + + MAX_BUFFER_LENGTH = 64 * 1024 + , stringTokenPattern = /[\\"\n]/g + , _n = 0 + + // states + , BEGIN = _n++ + , VALUE = _n++ // general stuff + , OPEN_OBJECT = _n++ // { + , CLOSE_OBJECT = _n++ // } + , OPEN_ARRAY = _n++ // [ + , CLOSE_ARRAY = _n++ // ] + , STRING = _n++ // "" + , OPEN_KEY = _n++ // , "a" + , CLOSE_KEY = _n++ // : + , TRUE = _n++ // r + , TRUE2 = _n++ // u + , TRUE3 = _n++ // e + , FALSE = _n++ // a + , FALSE2 = _n++ // l + , FALSE3 = _n++ // s + , FALSE4 = _n++ // e + , NULL = _n++ // u + , NULL2 = _n++ // l + , NULL3 = _n++ // l + , NUMBER_DECIMAL_POINT = _n++ // . + , NUMBER_DIGIT = _n // [0-9] + + // setup initial parser values + , bufferCheckPosition = MAX_BUFFER_LENGTH + , latestError + , c + , p + , textNode = undefined + , numberNode = "" + , slashed = false + , closed = false + , state = BEGIN + , stack = [] + , unicodeS = null + , unicodeI = 0 + , depth = 0 + , position = 0 + , column = 0 //mostly for error reporting + , line = 1 + ; + + function checkBufferLength () { + + var maxActual = 0; + + if (textNode !== undefined && textNode.length > MAX_BUFFER_LENGTH) { + emitError("Max buffer length exceeded: textNode"); + maxActual = Math.max(maxActual, textNode.length); + } + if (numberNode.length > MAX_BUFFER_LENGTH) { + emitError("Max buffer length exceeded: numberNode"); + maxActual = Math.max(maxActual, numberNode.length); + } + + bufferCheckPosition = (MAX_BUFFER_LENGTH - maxActual) + + position; + } + + eventBus(STREAM_DATA).on(handleData); + + /* At the end of the http content close the clarinet + This will provide an error if the total content provided was not + valid json, ie if not all arrays, objects and Strings closed properly */ + eventBus(STREAM_END).on(handleStreamEnd); + + function emitError (errorString) { + if (textNode !== undefined) { + emitValueOpen(textNode); + emitValueClose(); + textNode = undefined; + } + + latestError = Error(errorString + "\nLn: "+line+ + "\nCol: "+column+ + "\nChr: "+c); + + emitFail(errorReport(undefined, undefined, latestError)); + } + + function handleStreamEnd() { + if( state == BEGIN ) { + // Handle the case where the stream closes without ever receiving + // any input. This isn't an error - response bodies can be blank, + // particularly for 204 http responses + + // Because of how Oboe is currently implemented, we parse a + // completely empty stream as containing an empty object. + // This is because Oboe's done event is only fired when the + // root object of the JSON stream closes. + + // This should be decoupled and attached instead to the input stream + // from the http (or whatever) resource ending. + // If this decoupling could happen the SAX parser could simply emit + // zero events on a completely empty input. + emitValueOpen({}); + emitValueClose(); + + closed = true; + return; + } + + if (state !== VALUE || depth !== 0) + emitError("Unexpected end"); + + if (textNode !== undefined) { + emitValueOpen(textNode); + emitValueClose(); + textNode = undefined; + } + + closed = true; + } + + function whitespace(c){ + return c == '\r' || c == '\n' || c == ' ' || c == '\t'; + } + + function handleData (chunk) { + + // this used to throw the error but inside Oboe we will have already + // gotten the error when it was emitted. The important thing is to + // not continue with the parse. + if (latestError) + return; + + if (closed) { + return emitError("Cannot write after close"); + } + + var i = 0; + c = chunk[0]; + + while (c) { + p = c; + c = chunk[i++]; + if(!c) break; + + position ++; + if (c == "\n") { + line ++; + column = 0; + } else column ++; + switch (state) { + + case BEGIN: + if (c === "{") state = OPEN_OBJECT; + else if (c === "[") state = OPEN_ARRAY; + else if (!whitespace(c)) + return emitError("Non-whitespace before {[."); + continue; + + case OPEN_KEY: + case OPEN_OBJECT: + if (whitespace(c)) continue; + if(state === OPEN_KEY) stack.push(CLOSE_KEY); + else { + if(c === '}') { + emitValueOpen({}); + emitValueClose(); + state = stack.pop() || VALUE; + continue; + } else stack.push(CLOSE_OBJECT); + } + if(c === '"') + state = STRING; + else + return emitError("Malformed object key should start with \" "); + continue; + + case CLOSE_KEY: + case CLOSE_OBJECT: + if (whitespace(c)) continue; + + if(c===':') { + if(state === CLOSE_OBJECT) { + stack.push(CLOSE_OBJECT); + + if (textNode !== undefined) { + // was previously (in upstream Clarinet) one event + // - object open came with the text of the first + emitValueOpen({}); + emitSaxKey(textNode); + textNode = undefined; + } + depth++; + } else { + if (textNode !== undefined) { + emitSaxKey(textNode); + textNode = undefined; + } + } + state = VALUE; + } else if (c==='}') { + if (textNode !== undefined) { + emitValueOpen(textNode); + emitValueClose(); + textNode = undefined; + } + emitValueClose(); + depth--; + state = stack.pop() || VALUE; + } else if(c===',') { + if(state === CLOSE_OBJECT) + stack.push(CLOSE_OBJECT); + if (textNode !== undefined) { + emitValueOpen(textNode); + emitValueClose(); + textNode = undefined; + } + state = OPEN_KEY; + } else + return emitError('Bad object'); + continue; + + case OPEN_ARRAY: // after an array there always a value + case VALUE: + if (whitespace(c)) continue; + if(state===OPEN_ARRAY) { + emitValueOpen([]); + depth++; + state = VALUE; + if(c === ']') { + emitValueClose(); + depth--; + state = stack.pop() || VALUE; + continue; + } else { + stack.push(CLOSE_ARRAY); + } + } + if(c === '"') state = STRING; + else if(c === '{') state = OPEN_OBJECT; + else if(c === '[') state = OPEN_ARRAY; + else if(c === 't') state = TRUE; + else if(c === 'f') state = FALSE; + else if(c === 'n') state = NULL; + else if(c === '-') { // keep and continue + numberNode += c; + } else if(c==='0') { + numberNode += c; + state = NUMBER_DIGIT; + } else if('123456789'.indexOf(c) !== -1) { + numberNode += c; + state = NUMBER_DIGIT; + } else + return emitError("Bad value"); + continue; + + case CLOSE_ARRAY: + if(c===',') { + stack.push(CLOSE_ARRAY); + if (textNode !== undefined) { + emitValueOpen(textNode); + emitValueClose(); + textNode = undefined; + } + state = VALUE; + } else if (c===']') { + if (textNode !== undefined) { + emitValueOpen(textNode); + emitValueClose(); + textNode = undefined; + } + emitValueClose(); + depth--; + state = stack.pop() || VALUE; + } else if (whitespace(c)) + continue; + else + return emitError('Bad array'); + continue; + + case STRING: + if (textNode === undefined) { + textNode = ""; + } + + // thanks thejh, this is an about 50% performance improvement. + var starti = i-1; + + STRING_BIGLOOP: while (true) { + + // zero means "no unicode active". 1-4 mean "parse some more". end after 4. + while (unicodeI > 0) { + unicodeS += c; + c = chunk.charAt(i++); + if (unicodeI === 4) { + // TODO this might be slow? well, probably not used too often anyway + textNode += String.fromCharCode(parseInt(unicodeS, 16)); + unicodeI = 0; + starti = i-1; + } else { + unicodeI++; + } + // we can just break here: no stuff we skipped that still has to be sliced out or so + if (!c) break STRING_BIGLOOP; + } + if (c === '"' && !slashed) { + state = stack.pop() || VALUE; + textNode += chunk.substring(starti, i-1); + break; + } + if (c === '\\' && !slashed) { + slashed = true; + textNode += chunk.substring(starti, i-1); + c = chunk.charAt(i++); + if (!c) break; + } + if (slashed) { + slashed = false; + if (c === 'n') { textNode += '\n'; } + else if (c === 'r') { textNode += '\r'; } + else if (c === 't') { textNode += '\t'; } + else if (c === 'f') { textNode += '\f'; } + else if (c === 'b') { textNode += '\b'; } + else if (c === 'u') { + // \uxxxx. meh! + unicodeI = 1; + unicodeS = ''; + } else { + textNode += c; + } + c = chunk.charAt(i++); + starti = i-1; + if (!c) break; + else continue; + } + + stringTokenPattern.lastIndex = i; + var reResult = stringTokenPattern.exec(chunk); + if (!reResult) { + i = chunk.length+1; + textNode += chunk.substring(starti, i-1); + break; + } + i = reResult.index+1; + c = chunk.charAt(reResult.index); + if (!c) { + textNode += chunk.substring(starti, i-1); + break; + } + } + continue; + + case TRUE: + if (!c) continue; // strange buffers + if (c==='r') state = TRUE2; + else + return emitError( 'Invalid true started with t'+ c); + continue; + + case TRUE2: + if (!c) continue; + if (c==='u') state = TRUE3; + else + return emitError('Invalid true started with tr'+ c); + continue; + + case TRUE3: + if (!c) continue; + if(c==='e') { + emitValueOpen(true); + emitValueClose(); + state = stack.pop() || VALUE; + } else + return emitError('Invalid true started with tru'+ c); + continue; + + case FALSE: + if (!c) continue; + if (c==='a') state = FALSE2; + else + return emitError('Invalid false started with f'+ c); + continue; + + case FALSE2: + if (!c) continue; + if (c==='l') state = FALSE3; + else + return emitError('Invalid false started with fa'+ c); + continue; + + case FALSE3: + if (!c) continue; + if (c==='s') state = FALSE4; + else + return emitError('Invalid false started with fal'+ c); + continue; + + case FALSE4: + if (!c) continue; + if (c==='e') { + emitValueOpen(false); + emitValueClose(); + state = stack.pop() || VALUE; + } else + return emitError('Invalid false started with fals'+ c); + continue; + + case NULL: + if (!c) continue; + if (c==='u') state = NULL2; + else + return emitError('Invalid null started with n'+ c); + continue; + + case NULL2: + if (!c) continue; + if (c==='l') state = NULL3; + else + return emitError('Invalid null started with nu'+ c); + continue; + + case NULL3: + if (!c) continue; + if(c==='l') { + emitValueOpen(null); + emitValueClose(); + state = stack.pop() || VALUE; + } else + return emitError('Invalid null started with nul'+ c); + continue; + + case NUMBER_DECIMAL_POINT: + if(c==='.') { + numberNode += c; + state = NUMBER_DIGIT; + } else + return emitError('Leading zero not followed by .'); + continue; + + case NUMBER_DIGIT: + if('0123456789'.indexOf(c) !== -1) numberNode += c; + else if (c==='.') { + if(numberNode.indexOf('.')!==-1) + return emitError('Invalid number has two dots'); + numberNode += c; + } else if (c==='e' || c==='E') { + if(numberNode.indexOf('e')!==-1 || + numberNode.indexOf('E')!==-1 ) + return emitError('Invalid number has two exponential'); + numberNode += c; + } else if (c==="+" || c==="-") { + if(!(p==='e' || p==='E')) + return emitError('Invalid symbol in number'); + numberNode += c; + } else { + if (numberNode) { + emitValueOpen(parseFloat(numberNode)); + emitValueClose(); + numberNode = ""; + } + i--; // go back one + state = stack.pop() || VALUE; + } + continue; + + default: + return emitError("Unknown state: " + state); + } + } + if (position >= bufferCheckPosition) + checkBufferLength(); + } +} + + +/** + * A bridge used to assign stateless functions to listen to clarinet. + * + * As well as the parameter from clarinet, each callback will also be passed + * the result of the last callback. + * + * This may also be used to clear all listeners by assigning zero handlers: + * + * ascentManager( clarinet, {} ) + */ +function ascentManager(oboeBus, handlers){ + "use strict"; + + var listenerId = {}, + ascent; + + function stateAfter(handler) { + return function(param){ + ascent = handler( ascent, param); + } + } + + for( var eventName in handlers ) { + + oboeBus(eventName).on(stateAfter(handlers[eventName]), listenerId); + } + + oboeBus(NODE_SWAP).on(function(newNode) { + + var oldHead = head(ascent), + key = keyOf(oldHead), + ancestors = tail(ascent), + parentNode; + + if( ancestors ) { + parentNode = nodeOf(head(ancestors)); + parentNode[key] = newNode; + } + }); + + oboeBus(NODE_DROP).on(function() { + + var oldHead = head(ascent), + key = keyOf(oldHead), + ancestors = tail(ascent), + parentNode; + + if( ancestors ) { + parentNode = nodeOf(head(ancestors)); + + delete parentNode[key]; + } + }); + + oboeBus(ABORTING).on(function(){ + + for( var eventName in handlers ) { + oboeBus(eventName).un(listenerId); + } + }); +} + +// based on gist https://gist.github.com/monsur/706839 + +/** + * XmlHttpRequest's getAllResponseHeaders() method returns a string of response + * headers according to the format described here: + * http://www.w3.org/TR/XMLHttpRequest/#the-getallresponseheaders-method + * This method parses that string into a user-friendly key/value pair object. + */ +function parseResponseHeaders(headerStr) { + var headers = {}; + + headerStr && headerStr.split('\u000d\u000a') + .forEach(function(headerPair){ + + // Can't use split() here because it does the wrong thing + // if the header value has the string ": " in it. + var index = headerPair.indexOf('\u003a\u0020'); + + headers[headerPair.substring(0, index)] + = headerPair.substring(index + 2); + }); + + return headers; +} + +/** + * Detect if a given URL is cross-origin in the scope of the + * current page. + * + * Browser only (since cross-origin has no meaning in Node.js) + * + * @param {Object} pageLocation - as in window.location + * @param {Object} ajaxHost - an object like window.location describing the + * origin of the url that we want to ajax in + */ +function isCrossOrigin(pageLocation, ajaxHost) { + + /* + * NB: defaultPort only knows http and https. + * Returns undefined otherwise. + */ + function defaultPort(protocol) { + return {'http:':80, 'https:':443}[protocol]; + } + + function portOf(location) { + // pageLocation should always have a protocol. ajaxHost if no port or + // protocol is specified, should use the port of the containing page + + return location.port || defaultPort(location.protocol||pageLocation.protocol); + } + + // if ajaxHost doesn't give a domain, port is the same as pageLocation + // it can't give a protocol but not a domain + // it can't give a port but not a domain + + return !!( (ajaxHost.protocol && (ajaxHost.protocol != pageLocation.protocol)) || + (ajaxHost.host && (ajaxHost.host != pageLocation.host)) || + (ajaxHost.host && (portOf(ajaxHost) != portOf(pageLocation))) + ); +} + +/* turn any url into an object like window.location */ +function parseUrlOrigin(url) { + // url could be domain-relative + // url could give a domain + + // cross origin means: + // same domain + // same port + // some protocol + // so, same everything up to the first (single) slash + // if such is given + // + // can ignore everything after that + + var URL_HOST_PATTERN = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/, + + // if no match, use an empty array so that + // subexpressions 1,2,3 are all undefined + // and will ultimately return all empty + // strings as the parse result: + urlHostMatch = URL_HOST_PATTERN.exec(url) || []; + + return { + protocol: urlHostMatch[1] || '', + host: urlHostMatch[2] || '', + port: urlHostMatch[3] || '' + }; +} + +function httpTransport(){ + return new XMLHttpRequest(); +} + +/** + * A wrapper around the browser XmlHttpRequest object that raises an + * event whenever a new part of the response is available. + * + * In older browsers progressive reading is impossible so all the + * content is given in a single call. For newer ones several events + * should be raised, allowing progressive interpretation of the response. + * + * @param {Function} oboeBus an event bus local to this Oboe instance + * @param {XMLHttpRequest} xhr the xhr to use as the transport. Under normal + * operation, will have been created using httpTransport() above + * but for tests a stub can be provided instead. + * @param {String} method one of 'GET' 'POST' 'PUT' 'PATCH' 'DELETE' + * @param {String} url the url to make a request to + * @param {String|Null} data some content to be sent with the request. + * Only valid if method is POST or PUT. + * @param {Object} [headers] the http request headers to send + * @param {boolean} withCredentials the XHR withCredentials property will be + * set to this value + */ +function streamingHttp(oboeBus, xhr, method, url, data, headers, withCredentials) { + + "use strict"; + + var emitStreamData = oboeBus(STREAM_DATA).emit, + emitFail = oboeBus(FAIL_EVENT).emit, + numberOfCharsAlreadyGivenToCallback = 0, + stillToSendStartEvent = true; + + // When an ABORTING message is put on the event bus abort + // the ajax request + oboeBus( ABORTING ).on( function(){ + + // if we keep the onreadystatechange while aborting the XHR gives + // a callback like a successful call so first remove this listener + // by assigning null: + xhr.onreadystatechange = null; + + xhr.abort(); + }); + + /** + * Handle input from the underlying xhr: either a state change, + * the progress event or the request being complete. + */ + function handleProgress() { + + var textSoFar = xhr.responseText, + newText = textSoFar.substr(numberOfCharsAlreadyGivenToCallback); + + + /* Raise the event for new text. + + On older browsers, the new text is the whole response. + On newer/better ones, the fragment part that we got since + last progress. */ + + if( newText ) { + emitStreamData( newText ); + } + + numberOfCharsAlreadyGivenToCallback = len(textSoFar); + } + + + if('onprogress' in xhr){ // detect browser support for progressive delivery + xhr.onprogress = handleProgress; + } + + xhr.onreadystatechange = function() { + + function sendStartIfNotAlready() { + // Internet Explorer is very unreliable as to when xhr.status etc can + // be read so has to be protected with try/catch and tried again on + // the next readyState if it fails + try{ + stillToSendStartEvent && oboeBus( HTTP_START ).emit( + xhr.status, + parseResponseHeaders(xhr.getAllResponseHeaders()) ); + stillToSendStartEvent = false; + } catch(e){/* do nothing, will try again on next readyState*/} + } + + switch( xhr.readyState ) { + + case 2: // HEADERS_RECEIVED + case 3: // LOADING + return sendStartIfNotAlready(); + + case 4: // DONE + sendStartIfNotAlready(); // if xhr.status hasn't been available yet, it must be NOW, huh IE? + + // is this a 2xx http code? + var successful = String(xhr.status)[0] == 2; + + if( successful ) { + // In Chrome 29 (not 28) no onprogress is emitted when a response + // is complete before the onload. We need to always do handleInput + // in case we get the load but have not had a final progress event. + // This looks like a bug and may change in future but let's take + // the safest approach and assume we might not have received a + // progress event for each part of the response + handleProgress(); + + oboeBus(STREAM_END).emit(); + } else { + + emitFail( errorReport( + xhr.status, + xhr.responseText + )); + } + } + }; + + try{ + + xhr.open(method, url, true); + + for( var headerName in headers ){ + xhr.setRequestHeader(headerName, headers[headerName]); + } + + if( !isCrossOrigin(window.location, parseUrlOrigin(url)) ) { + xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); + } + + xhr.withCredentials = withCredentials; + + xhr.send(data); + + } catch( e ) { + + // To keep a consistent interface with Node, we can't emit an event here. + // Node's streaming http adaptor receives the error as an asynchronous + // event rather than as an exception. If we emitted now, the Oboe user + // has had no chance to add a .fail listener so there is no way + // the event could be useful. For both these reasons defer the + // firing to the next JS frame. + window.setTimeout( + partialComplete(emitFail, errorReport(undefined, undefined, e)) + , 0 + ); + } +} + +var jsonPathSyntax = (function() { + + var + + /** + * Export a regular expression as a simple function by exposing just + * the Regex#exec. This allows regex tests to be used under the same + * interface as differently implemented tests, or for a user of the + * tests to not concern themselves with their implementation as regular + * expressions. + * + * This could also be expressed point-free as: + * Function.prototype.bind.bind(RegExp.prototype.exec), + * + * But that's far too confusing! (and not even smaller once minified + * and gzipped) + */ + regexDescriptor = function regexDescriptor(regex) { + return regex.exec.bind(regex); + } + + /** + * Join several regular expressions and express as a function. + * This allows the token patterns to reuse component regular expressions + * instead of being expressed in full using huge and confusing regular + * expressions. + */ + , jsonPathClause = varArgs(function( componentRegexes ) { + + // The regular expressions all start with ^ because we + // only want to find matches at the start of the + // JSONPath fragment we are inspecting + componentRegexes.unshift(/^/); + + return regexDescriptor( + RegExp( + componentRegexes.map(attr('source')).join('') + ) + ); + }) + + , possiblyCapturing = /(\$?)/ + , namedNode = /([\w-_]+|\*)/ + , namePlaceholder = /()/ + , nodeInArrayNotation = /\["([^"]+)"\]/ + , numberedNodeInArrayNotation = /\[(\d+|\*)\]/ + , fieldList = /{([\w ]*?)}/ + , optionalFieldList = /(?:{([\w ]*?)})?/ + + + // foo or * + , jsonPathNamedNodeInObjectNotation = jsonPathClause( + possiblyCapturing, + namedNode, + optionalFieldList + ) + + // ["foo"] + , jsonPathNamedNodeInArrayNotation = jsonPathClause( + possiblyCapturing, + nodeInArrayNotation, + optionalFieldList + ) + + // [2] or [*] + , jsonPathNumberedNodeInArrayNotation = jsonPathClause( + possiblyCapturing, + numberedNodeInArrayNotation, + optionalFieldList + ) + + // {a b c} + , jsonPathPureDuckTyping = jsonPathClause( + possiblyCapturing, + namePlaceholder, + fieldList + ) + + // .. + , jsonPathDoubleDot = jsonPathClause(/\.\./) + + // . + , jsonPathDot = jsonPathClause(/\./) + + // ! + , jsonPathBang = jsonPathClause( + possiblyCapturing, + /!/ + ) + + // nada! + , emptyString = jsonPathClause(/$/) + + ; + + + /* We export only a single function. When called, this function injects + into another function the descriptors from above. + */ + return function (fn){ + return fn( + lazyUnion( + jsonPathNamedNodeInObjectNotation + , jsonPathNamedNodeInArrayNotation + , jsonPathNumberedNodeInArrayNotation + , jsonPathPureDuckTyping + ) + , jsonPathDoubleDot + , jsonPathDot + , jsonPathBang + , emptyString + ); + }; + +}()); +/** + * Get a new key->node mapping + * + * @param {String|Number} key + * @param {Object|Array|String|Number|null} node a value found in the json + */ +function namedNode(key, node) { + return {key:key, node:node}; +} + +/** get the key of a namedNode */ +var keyOf = attr('key'); + +/** get the node from a namedNode */ +var nodeOf = attr('node'); +/** + * This file provides various listeners which can be used to build up + * a changing ascent based on the callbacks provided by Clarinet. It listens + * to the low-level events from Clarinet and emits higher-level ones. + * + * The building up is stateless so to track a JSON file + * ascentManager.js is required to store the ascent state + * between calls. + */ + + + +/** + * A special value to use in the path list to represent the path 'to' a root + * object (which doesn't really have any path). This prevents the need for + * special-casing detection of the root object and allows it to be treated + * like any other object. We might think of this as being similar to the + * 'unnamed root' domain ".", eg if I go to + * http://en.wikipedia.org./wiki/En/Main_page the dot after 'org' deliminates + * the unnamed root of the DNS. + * + * This is kept as an object to take advantage that in Javascript's OO objects + * are guaranteed to be distinct, therefore no other object can possibly clash + * with this one. Strings, numbers etc provide no such guarantee. + **/ +var ROOT_PATH = {}; + + +/** + * Create a new set of handlers for clarinet's events, bound to the emit + * function given. + */ +function incrementalContentBuilder( oboeBus ) { + + var emitNodeOpened = oboeBus(NODE_OPENED).emit, + emitNodeClosed = oboeBus(NODE_CLOSED).emit, + emitRootOpened = oboeBus(ROOT_PATH_FOUND).emit, + emitRootClosed = oboeBus(ROOT_NODE_FOUND).emit; + + function arrayIndicesAreKeys( possiblyInconsistentAscent, newDeepestNode) { + + /* for values in arrays we aren't pre-warned of the coming paths + (Clarinet gives no call to onkey like it does for values in objects) + so if we are in an array we need to create this path ourselves. The + key will be len(parentNode) because array keys are always sequential + numbers. */ + + var parentNode = nodeOf( head( possiblyInconsistentAscent)); + + return isOfType( Array, parentNode) + ? + keyFound( possiblyInconsistentAscent, + len(parentNode), + newDeepestNode + ) + : + // nothing needed, return unchanged + possiblyInconsistentAscent + ; + } + + function nodeOpened( ascent, newDeepestNode ) { + + if( !ascent ) { + // we discovered the root node, + emitRootOpened( newDeepestNode); + + return keyFound( ascent, ROOT_PATH, newDeepestNode); + } + + // we discovered a non-root node + + var arrayConsistentAscent = arrayIndicesAreKeys( ascent, newDeepestNode), + ancestorBranches = tail( arrayConsistentAscent), + previouslyUnmappedName = keyOf( head( arrayConsistentAscent)); + + appendBuiltContent( + ancestorBranches, + previouslyUnmappedName, + newDeepestNode + ); + + return cons( + namedNode( previouslyUnmappedName, newDeepestNode ), + ancestorBranches + ); + } + + + /** + * Add a new value to the object we are building up to represent the + * parsed JSON + */ + function appendBuiltContent( ancestorBranches, key, node ){ + + nodeOf( head( ancestorBranches))[key] = node; + } + + + /** + * For when we find a new key in the json. + * + * @param {String|Number|Object} newDeepestName the key. If we are in an + * array will be a number, otherwise a string. May take the special + * value ROOT_PATH if the root node has just been found + * + * @param {String|Number|Object|Array|Null|undefined} [maybeNewDeepestNode] + * usually this won't be known so can be undefined. Can't use null + * to represent unknown because null is a valid value in JSON + **/ + function keyFound(ascent, newDeepestName, maybeNewDeepestNode) { + + if( ascent ) { // if not root + + // If we have the key but (unless adding to an array) no known value + // yet. Put that key in the output but against no defined value: + appendBuiltContent( ascent, newDeepestName, maybeNewDeepestNode ); + } + + var ascentWithNewPath = cons( + namedNode( newDeepestName, + maybeNewDeepestNode), + ascent + ); + + emitNodeOpened( ascentWithNewPath); + + return ascentWithNewPath; + } + + + /** + * For when the current node ends. + */ + function nodeClosed( ascent ) { + + emitNodeClosed( ascent); + + return tail( ascent) || + // If there are no nodes left in the ascent the root node + // just closed. Emit a special event for this: + emitRootClosed(nodeOf(head(ascent))); + } + + var contentBuilderHandlers = {}; + contentBuilderHandlers[SAX_VALUE_OPEN] = nodeOpened; + contentBuilderHandlers[SAX_VALUE_CLOSE] = nodeClosed; + contentBuilderHandlers[SAX_KEY] = keyFound; + return contentBuilderHandlers; +} + +/** + * The jsonPath evaluator compiler used for Oboe.js. + * + * One function is exposed. This function takes a String JSONPath spec and + * returns a function to test candidate ascents for matches. + * + * String jsonPath -> (List ascent) -> Boolean|Object + * + * This file is coded in a pure functional style. That is, no function has + * side effects, every function evaluates to the same value for the same + * arguments and no variables are reassigned. + */ +// the call to jsonPathSyntax injects the token syntaxes that are needed +// inside the compiler +var jsonPathCompiler = jsonPathSyntax(function (pathNodeSyntax, + doubleDotSyntax, + dotSyntax, + bangSyntax, + emptySyntax ) { + + var CAPTURING_INDEX = 1; + var NAME_INDEX = 2; + var FIELD_LIST_INDEX = 3; + + var headKey = compose2(keyOf, head), + headNode = compose2(nodeOf, head); + + /** + * Create an evaluator function for a named path node, expressed in the + * JSONPath like: + * foo + * ["bar"] + * [2] + */ + function nameClause(previousExpr, detection ) { + + var name = detection[NAME_INDEX], + + matchesName = ( !name || name == '*' ) + ? always + : function(ascent){return headKey(ascent) == name}; + + + return lazyIntersection(matchesName, previousExpr); + } + + /** + * Create an evaluator function for a a duck-typed node, expressed like: + * + * {spin, taste, colour} + * .particle{spin, taste, colour} + * *{spin, taste, colour} + */ + function duckTypeClause(previousExpr, detection) { + + var fieldListStr = detection[FIELD_LIST_INDEX]; + + if (!fieldListStr) + return previousExpr; // don't wrap at all, return given expr as-is + + var hasAllrequiredFields = partialComplete( + hasAllProperties, + arrayAsList(fieldListStr.split(/\W+/)) + ), + + isMatch = compose2( + hasAllrequiredFields, + headNode + ); + + return lazyIntersection(isMatch, previousExpr); + } + + /** + * Expression for $, returns the evaluator function + */ + function capture( previousExpr, detection ) { + + // extract meaning from the detection + var capturing = !!detection[CAPTURING_INDEX]; + + if (!capturing) + return previousExpr; // don't wrap at all, return given expr as-is + + return lazyIntersection(previousExpr, head); + + } + + /** + * Create an evaluator function that moves onto the next item on the + * lists. This function is the place where the logic to move up a + * level in the ascent exists. + * + * Eg, for JSONPath ".foo" we need skip1(nameClause(always, [,'foo'])) + */ + function skip1(previousExpr) { + + + if( previousExpr == always ) { + /* If there is no previous expression this consume command + is at the start of the jsonPath. + Since JSONPath specifies what we'd like to find but not + necessarily everything leading down to it, when running + out of JSONPath to check against we default to true */ + return always; + } + + /** return true if the ascent we have contains only the JSON root, + * false otherwise + */ + function notAtRoot(ascent){ + return headKey(ascent) != ROOT_PATH; + } + + return lazyIntersection( + /* If we're already at the root but there are more + expressions to satisfy, can't consume any more. No match. + + This check is why none of the other exprs have to be able + to handle empty lists; skip1 is the only evaluator that + moves onto the next token and it refuses to do so once it + reaches the last item in the list. */ + notAtRoot, + + /* We are not at the root of the ascent yet. + Move to the next level of the ascent by handing only + the tail to the previous expression */ + compose2(previousExpr, tail) + ); + + } + + /** + * Create an evaluator function for the .. (double dot) token. Consumes + * zero or more levels of the ascent, the fewest that are required to find + * a match when given to previousExpr. + */ + function skipMany(previousExpr) { + + if( previousExpr == always ) { + /* If there is no previous expression this consume command + is at the start of the jsonPath. + Since JSONPath specifies what we'd like to find but not + necessarily everything leading down to it, when running + out of JSONPath to check against we default to true */ + return always; + } + + var + // In JSONPath .. is equivalent to !.. so if .. reaches the root + // the match has succeeded. Ie, we might write ..foo or !..foo + // and both should match identically. + terminalCaseWhenArrivingAtRoot = rootExpr(), + terminalCaseWhenPreviousExpressionIsSatisfied = previousExpr, + recursiveCase = skip1(function(ascent) { + return cases(ascent); + }), + + cases = lazyUnion( + terminalCaseWhenArrivingAtRoot + , terminalCaseWhenPreviousExpressionIsSatisfied + , recursiveCase + ); + + return cases; + } + + /** + * Generate an evaluator for ! - matches only the root element of the json + * and ignores any previous expressions since nothing may precede !. + */ + function rootExpr() { + + return function(ascent){ + return headKey(ascent) == ROOT_PATH; + }; + } + + /** + * Generate a statement wrapper to sit around the outermost + * clause evaluator. + * + * Handles the case where the capturing is implicit because the JSONPath + * did not contain a '$' by returning the last node. + */ + function statementExpr(lastClause) { + + return function(ascent) { + + // kick off the evaluation by passing through to the last clause + var exprMatch = lastClause(ascent); + + return exprMatch === true ? head(ascent) : exprMatch; + }; + } + + /** + * For when a token has been found in the JSONPath input. + * Compiles the parser for that token and returns in combination with the + * parser already generated. + * + * @param {Function} exprs a list of the clause evaluator generators for + * the token that was found + * @param {Function} parserGeneratedSoFar the parser already found + * @param {Array} detection the match given by the regex engine when + * the feature was found + */ + function expressionsReader( exprs, parserGeneratedSoFar, detection ) { + + // if exprs is zero-length foldR will pass back the + // parserGeneratedSoFar as-is so we don't need to treat + // this as a special case + + return foldR( + function( parserGeneratedSoFar, expr ){ + + return expr(parserGeneratedSoFar, detection); + }, + parserGeneratedSoFar, + exprs + ); + + } + + /** + * If jsonPath matches the given detector function, creates a function which + * evaluates against every clause in the clauseEvaluatorGenerators. The + * created function is propagated to the onSuccess function, along with + * the remaining unparsed JSONPath substring. + * + * The intended use is to create a clauseMatcher by filling in + * the first two arguments, thus providing a function that knows + * some syntax to match and what kind of generator to create if it + * finds it. The parameter list once completed is: + * + * (jsonPath, parserGeneratedSoFar, onSuccess) + * + * onSuccess may be compileJsonPathToFunction, to recursively continue + * parsing after finding a match or returnFoundParser to stop here. + */ + function generateClauseReaderIfTokenFound ( + + tokenDetector, clauseEvaluatorGenerators, + + jsonPath, parserGeneratedSoFar, onSuccess) { + + var detected = tokenDetector(jsonPath); + + if(detected) { + var compiledParser = expressionsReader( + clauseEvaluatorGenerators, + parserGeneratedSoFar, + detected + ), + + remainingUnparsedJsonPath = jsonPath.substr(len(detected[0])); + + return onSuccess(remainingUnparsedJsonPath, compiledParser); + } + } + + /** + * Partially completes generateClauseReaderIfTokenFound above. + */ + function clauseMatcher(tokenDetector, exprs) { + + return partialComplete( + generateClauseReaderIfTokenFound, + tokenDetector, + exprs + ); + } + + /** + * clauseForJsonPath is a function which attempts to match against + * several clause matchers in order until one matches. If non match the + * jsonPath expression is invalid and an error is thrown. + * + * The parameter list is the same as a single clauseMatcher: + * + * (jsonPath, parserGeneratedSoFar, onSuccess) + */ + var clauseForJsonPath = lazyUnion( + + clauseMatcher(pathNodeSyntax , list( capture, + duckTypeClause, + nameClause, + skip1 )) + + , clauseMatcher(doubleDotSyntax , list( skipMany)) + + // dot is a separator only (like whitespace in other languages) but + // rather than make it a special case, use an empty list of + // expressions when this token is found + , clauseMatcher(dotSyntax , list() ) + + , clauseMatcher(bangSyntax , list( capture, + rootExpr)) + + , clauseMatcher(emptySyntax , list( statementExpr)) + + , function (jsonPath) { + throw Error('"' + jsonPath + '" could not be tokenised') + } + ); + + + /** + * One of two possible values for the onSuccess argument of + * generateClauseReaderIfTokenFound. + * + * When this function is used, generateClauseReaderIfTokenFound simply + * returns the compiledParser that it made, regardless of if there is + * any remaining jsonPath to be compiled. + */ + function returnFoundParser(_remainingJsonPath, compiledParser){ + return compiledParser + } + + /** + * Recursively compile a JSONPath expression. + * + * This function serves as one of two possible values for the onSuccess + * argument of generateClauseReaderIfTokenFound, meaning continue to + * recursively compile. Otherwise, returnFoundParser is given and + * compilation terminates. + */ + function compileJsonPathToFunction( uncompiledJsonPath, + parserGeneratedSoFar ) { + + /** + * On finding a match, if there is remaining text to be compiled + * we want to either continue parsing using a recursive call to + * compileJsonPathToFunction. Otherwise, we want to stop and return + * the parser that we have found so far. + */ + var onFind = uncompiledJsonPath + ? compileJsonPathToFunction + : returnFoundParser; + + return clauseForJsonPath( + uncompiledJsonPath, + parserGeneratedSoFar, + onFind + ); + } + + /** + * This is the function that we expose to the rest of the library. + */ + return function(jsonPath){ + + try { + // Kick off the recursive parsing of the jsonPath + return compileJsonPathToFunction(jsonPath, always); + + } catch( e ) { + throw Error( 'Could not compile "' + jsonPath + + '" because ' + e.message + ); + } + } + +}); + +/** + * A pub/sub which is responsible for a single event type. A + * multi-event type event bus is created by pubSub by collecting + * several of these. + * + * @param {String} eventType + * the name of the events managed by this singleEventPubSub + * @param {singleEventPubSub} [newListener] + * place to notify of new listeners + * @param {singleEventPubSub} [removeListener] + * place to notify of when listeners are removed + */ +function singleEventPubSub(eventType, newListener, removeListener){ + + /** we are optimised for emitting events over firing them. + * As well as the tuple list which stores event ids and + * listeners there is a list with just the listeners which + * can be iterated more quickly when we are emitting + */ + var listenerTupleList, + listenerList; + + function hasId(id){ + return function(tuple) { + return tuple.id == id; + }; + } + + return { + + /** + * @param {Function} listener + * @param {*} listenerId + * an id that this listener can later by removed by. + * Can be of any type, to be compared to other ids using == + */ + on:function( listener, listenerId ) { + + var tuple = { + listener: listener + , id: listenerId || listener // when no id is given use the + // listener function as the id + }; + + if( newListener ) { + newListener.emit(eventType, listener, tuple.id); + } + + listenerTupleList = cons( tuple, listenerTupleList ); + listenerList = cons( listener, listenerList ); + + return this; // chaining + }, + + emit:function () { + applyEach( listenerList, arguments ); + }, + + un: function( listenerId ) { + + var removed; + + listenerTupleList = without( + listenerTupleList, + hasId(listenerId), + function(tuple){ + removed = tuple; + } + ); + + if( removed ) { + listenerList = without( listenerList, function(listener){ + return listener == removed.listener; + }); + + if( removeListener ) { + removeListener.emit(eventType, removed.listener, removed.id); + } + } + }, + + listeners: function(){ + // differs from Node EventEmitter: returns list, not array + return listenerList; + }, + + hasListener: function(listenerId){ + var test = listenerId? hasId(listenerId) : always; + + return defined(first( test, listenerTupleList)); + } + }; +} +/** + * pubSub is a curried interface for listening to and emitting + * events. + * + * If we get a bus: + * + * var bus = pubSub(); + * + * We can listen to event 'foo' like: + * + * bus('foo').on(myCallback) + * + * And emit event foo like: + * + * bus('foo').emit() + * + * or, with a parameter: + * + * bus('foo').emit('bar') + * + * All functions can be cached and don't need to be + * bound. Ie: + * + * var fooEmitter = bus('foo').emit + * fooEmitter('bar'); // emit an event + * fooEmitter('baz'); // emit another + * + * There's also an uncurried[1] shortcut for .emit and .on: + * + * bus.on('foo', callback) + * bus.emit('foo', 'bar') + * + * [1]: http://zvon.org/other/haskell/Outputprelude/uncurry_f.html + */ +function pubSub(){ + + var singles = {}, + newListener = newSingle('newListener'), + removeListener = newSingle('removeListener'); + + function newSingle(eventName) { + return singles[eventName] = singleEventPubSub( + eventName, + newListener, + removeListener + ); + } + + /** pubSub instances are functions */ + function pubSubInstance( eventName ){ + + return singles[eventName] || newSingle( eventName ); + } + + // add convenience EventEmitter-style uncurried form of 'emit' and 'on' + ['emit', 'on', 'un'].forEach(function(methodName){ + + pubSubInstance[methodName] = varArgs(function(eventName, parameters){ + apply( parameters, pubSubInstance( eventName )[methodName]); + }); + }); + + return pubSubInstance; +} + +/** + * This file declares some constants to use as names for event types. + */ + +var // the events which are never exported are kept as + // the smallest possible representation, in numbers: + _S = 1, + + // fired whenever a new node starts in the JSON stream: + NODE_OPENED = _S++, + + // fired whenever a node closes in the JSON stream: + NODE_CLOSED = _S++, + + // called if a .node callback returns a value - + NODE_SWAP = _S++, + NODE_DROP = _S++, + + FAIL_EVENT = 'fail', + + ROOT_NODE_FOUND = _S++, + ROOT_PATH_FOUND = _S++, + + HTTP_START = 'start', + STREAM_DATA = 'data', + STREAM_END = 'end', + ABORTING = _S++, + + // SAX events butchered from Clarinet + SAX_KEY = _S++, + SAX_VALUE_OPEN = _S++, + SAX_VALUE_CLOSE = _S++; + +function errorReport(statusCode, body, error) { + try{ + var jsonBody = JSON.parse(body); + }catch(e){} + + return { + statusCode:statusCode, + body:body, + jsonBody:jsonBody, + thrown:error + }; +} + +/** + * The pattern adaptor listens for newListener and removeListener + * events. When patterns are added or removed it compiles the JSONPath + * and wires them up. + * + * When nodes and paths are found it emits the fully-qualified match + * events with parameters ready to ship to the outside world + */ + +function patternAdapter(oboeBus, jsonPathCompiler) { + + var predicateEventMap = { + node:oboeBus(NODE_CLOSED) + , path:oboeBus(NODE_OPENED) + }; + + function emitMatchingNode(emitMatch, node, ascent) { + + /* + We're now calling to the outside world where Lisp-style + lists will not be familiar. Convert to standard arrays. + + Also, reverse the order because it is more common to + list paths "root to leaf" than "leaf to root" */ + var descent = reverseList(ascent); + + emitMatch( + node, + + // To make a path, strip off the last item which is the special + // ROOT_PATH token for the 'path' to the root node + listAsArray(tail(map(keyOf,descent))), // path + listAsArray(map(nodeOf, descent)) // ancestors + ); + } + + /* + * Set up the catching of events such as NODE_CLOSED and NODE_OPENED and, if + * matching the specified pattern, propagate to pattern-match events such as + * oboeBus('node:!') + * + * + * + * @param {Function} predicateEvent + * either oboeBus(NODE_CLOSED) or oboeBus(NODE_OPENED). + * @param {Function} compiledJsonPath + */ + function addUnderlyingListener( fullEventName, predicateEvent, compiledJsonPath ){ + + var emitMatch = oboeBus(fullEventName).emit; + + predicateEvent.on( function (ascent) { + + var maybeMatchingMapping = compiledJsonPath(ascent); + + /* Possible values for maybeMatchingMapping are now: + + false: + we did not match + + an object/array/string/number/null: + we matched and have the node that matched. + Because nulls are valid json values this can be null. + + undefined: + we matched but don't have the matching node yet. + ie, we know there is an upcoming node that matches but we + can't say anything else about it. + */ + if (maybeMatchingMapping !== false) { + + emitMatchingNode( + emitMatch, + nodeOf(maybeMatchingMapping), + ascent + ); + } + }, fullEventName); + + oboeBus('removeListener').on( function(removedEventName){ + + // if the fully qualified match event listener is later removed, clean up + // by removing the underlying listener if it was the last using that pattern: + + if( removedEventName == fullEventName ) { + + if( !oboeBus(removedEventName).listeners( )) { + predicateEvent.un( fullEventName ); + } + } + }); + } + + oboeBus('newListener').on( function(fullEventName){ + + var match = /(node|path):(.*)/.exec(fullEventName); + + if( match ) { + var predicateEvent = predicateEventMap[match[1]]; + + if( !predicateEvent.hasListener( fullEventName) ) { + + addUnderlyingListener( + fullEventName, + predicateEvent, + jsonPathCompiler( match[2] ) + ); + } + } + }) + +} + +/** + * The instance API is the thing that is returned when oboe() is called. + * it allows: + * + * - listeners for various events to be added and removed + * - the http response header/headers to be read + */ +function instanceApi(oboeBus, contentSource){ + + var oboeApi, + fullyQualifiedNamePattern = /^(node|path):./, + rootNodeFinishedEvent = oboeBus(ROOT_NODE_FOUND), + emitNodeDrop = oboeBus(NODE_DROP).emit, + emitNodeSwap = oboeBus(NODE_SWAP).emit, + + /** + * Add any kind of listener that the instance api exposes + */ + addListener = varArgs(function( eventId, parameters ){ + + if( oboeApi[eventId] ) { + + // for events added as .on(event, callback), if there is a + // .event() equivalent with special behaviour , pass through + // to that: + apply(parameters, oboeApi[eventId]); + } else { + + // we have a standard Node.js EventEmitter 2-argument call. + // The first parameter is the listener. + var event = oboeBus(eventId), + listener = parameters[0]; + + if( fullyQualifiedNamePattern.test(eventId) ) { + + // allow fully-qualified node/path listeners + // to be added + addForgettableCallback(event, listener); + } else { + + // the event has no special handling, pass through + // directly onto the event bus: + event.on( listener); + } + } + + return oboeApi; // chaining + }), + + /** + * Remove any kind of listener that the instance api exposes + */ + removeListener = function( eventId, p2, p3 ){ + + if( eventId == 'done' ) { + + rootNodeFinishedEvent.un(p2); + + } else if( eventId == 'node' || eventId == 'path' ) { + + // allow removal of node and path + oboeBus.un(eventId + ':' + p2, p3); + } else { + + // we have a standard Node.js EventEmitter 2-argument call. + // The second parameter is the listener. This may be a call + // to remove a fully-qualified node/path listener but requires + // no special handling + var listener = p2; + + oboeBus(eventId).un(listener); + } + + return oboeApi; // chaining + }; + + /** + * Add a callback, wrapped in a try/catch so as to not break the + * execution of Oboe if an exception is thrown (fail events are + * fired instead) + * + * The callback is used as the listener id so that it can later be + * removed using .un(callback) + */ + function addProtectedCallback(eventName, callback) { + oboeBus(eventName).on(protectedCallback(callback), callback); + return oboeApi; // chaining + } + + /** + * Add a callback where, if .forget() is called during the callback's + * execution, the callback will be de-registered + */ + function addForgettableCallback(event, callback, listenerId) { + + // listenerId is optional and if not given, the original + // callback will be used + listenerId = listenerId || callback; + + var safeCallback = protectedCallback(callback); + + event.on( function() { + + var discard = false; + + oboeApi.forget = function(){ + discard = true; + }; + + apply( arguments, safeCallback ); + + delete oboeApi.forget; + + if( discard ) { + event.un(listenerId); + } + }, listenerId); + + return oboeApi; // chaining + } + + /** + * wrap a callback so that if it throws, Oboe.js doesn't crash but instead + * throw the error in another event loop + */ + function protectedCallback( callback ) { + return function() { + try{ + return callback.apply(oboeApi, arguments); + }catch(e) { + setTimeout(function() { + throw e; + }); + } + } + } + + /** + * Return the fully qualified event for when a pattern matches + * either a node or a path + * + * @param type {String} either 'node' or 'path' + */ + function fullyQualifiedPatternMatchEvent(type, pattern) { + return oboeBus(type + ':' + pattern); + } + + function wrapCallbackToSwapNodeIfSomethingReturned( callback ) { + return function() { + var returnValueFromCallback = callback.apply(this, arguments); + + if( defined(returnValueFromCallback) ) { + + if( returnValueFromCallback == oboe.drop ) { + emitNodeDrop(); + } else { + emitNodeSwap(returnValueFromCallback); + } + } + } + } + + function addSingleNodeOrPathListener(eventId, pattern, callback) { + + var effectiveCallback; + + if( eventId == 'node' ) { + effectiveCallback = wrapCallbackToSwapNodeIfSomethingReturned(callback); + } else { + effectiveCallback = callback; + } + + addForgettableCallback( + fullyQualifiedPatternMatchEvent(eventId, pattern), + effectiveCallback, + callback + ); + } + + /** + * Add several listeners at a time, from a map + */ + function addMultipleNodeOrPathListeners(eventId, listenerMap) { + + for( var pattern in listenerMap ) { + addSingleNodeOrPathListener(eventId, pattern, listenerMap[pattern]); + } + } + + /** + * implementation behind .onPath() and .onNode() + */ + function addNodeOrPathListenerApi( eventId, jsonPathOrListenerMap, callback ){ + + if( isString(jsonPathOrListenerMap) ) { + addSingleNodeOrPathListener(eventId, jsonPathOrListenerMap, callback); + + } else { + addMultipleNodeOrPathListeners(eventId, jsonPathOrListenerMap); + } + + return oboeApi; // chaining + } + + + // some interface methods are only filled in after we receive + // values and are noops before that: + oboeBus(ROOT_PATH_FOUND).on( function(rootNode) { + oboeApi.root = functor(rootNode); + }); + + /** + * When content starts make the headers readable through the + * instance API + */ + oboeBus(HTTP_START).on( function(_statusCode, headers) { + + oboeApi.header = function(name) { + return name ? headers[name] + : headers + ; + } + }); + + /** + * Construct and return the public API of the Oboe instance to be + * returned to the calling application + */ + return oboeApi = { + on : addListener, + addListener : addListener, + removeListener : removeListener, + emit : oboeBus.emit, + + node : partialComplete(addNodeOrPathListenerApi, 'node'), + path : partialComplete(addNodeOrPathListenerApi, 'path'), + + done : partialComplete(addForgettableCallback, rootNodeFinishedEvent), + start : partialComplete(addProtectedCallback, HTTP_START ), + + // fail doesn't use protectedCallback because + // could lead to non-terminating loops + fail : oboeBus(FAIL_EVENT).on, + + // public api calling abort fires the ABORTING event + abort : oboeBus(ABORTING).emit, + + // initially return nothing for header and root + header : noop, + root : noop, + + source : contentSource + }; +} + +/** + * This file sits just behind the API which is used to attain a new + * Oboe instance. It creates the new components that are required + * and introduces them to each other. + */ + +function wire (httpMethodName, contentSource, body, headers, withCredentials){ + + var oboeBus = pubSub(); + + // Wire the input stream in if we are given a content source. + // This will usually be the case. If not, the instance created + // will have to be passed content from an external source. + + if( contentSource ) { + + streamingHttp( oboeBus, + httpTransport(), + httpMethodName, + contentSource, + body, + headers, + withCredentials + ); + } + + clarinet(oboeBus); + + ascentManager(oboeBus, incrementalContentBuilder(oboeBus)); + + patternAdapter(oboeBus, jsonPathCompiler); + + return instanceApi(oboeBus, contentSource); +} + +function applyDefaults( passthrough, url, httpMethodName, body, headers, withCredentials, cached ){ + + headers = headers ? + // Shallow-clone the headers array. This allows it to be + // modified without side effects to the caller. We don't + // want to change objects that the user passes in. + JSON.parse(JSON.stringify(headers)) + : {}; + + if( body ) { + if( !isString(body) ) { + + // If the body is not a string, stringify it. This allows objects to + // be given which will be sent as JSON. + body = JSON.stringify(body); + + // Default Content-Type to JSON unless given otherwise. + headers['Content-Type'] = headers['Content-Type'] || 'application/json'; + } + } else { + body = null; + } + + // support cache busting like jQuery.ajax({cache:false}) + function modifiedUrl(baseUrl, cached) { + + if( cached === false ) { + + if( baseUrl.indexOf('?') == -1 ) { + baseUrl += '?'; + } else { + baseUrl += '&'; + } + + baseUrl += '_=' + new Date().getTime(); + } + return baseUrl; + } + + return passthrough( httpMethodName || 'GET', modifiedUrl(url, cached), body, headers, withCredentials || false ); +} + +// export public API +function oboe(arg1) { + + // We use duck-typing to detect if the parameter given is a stream, with the + // below list of parameters. + // Unpipe and unshift would normally be present on a stream but this breaks + // compatibility with Request streams. + // See https://github.com/jimhigson/oboe.js/issues/65 + + var nodeStreamMethodNames = list('resume', 'pause', 'pipe'), + isStream = partialComplete( + hasAllProperties + , nodeStreamMethodNames + ); + + if( arg1 ) { + if (isStream(arg1) || isString(arg1)) { + + // simple version for GETs. Signature is: + // oboe( url ) + // or, under node: + // oboe( readableStream ) + return applyDefaults( + wire, + arg1 // url + ); + + } else { + + // method signature is: + // oboe({method:m, url:u, body:b, headers:{...}}) + + return applyDefaults( + wire, + arg1.url, + arg1.method, + arg1.body, + arg1.headers, + arg1.withCredentials, + arg1.cached + ); + + } + } else { + // wire up a no-AJAX, no-stream Oboe. Will have to have content + // fed in externally and using .emit. + return wire(); + } +} + +/* oboe.drop is a special value. If a node callback returns this value the + parsed node is deleted from the JSON + */ +oboe.drop = function() { + return oboe.drop; +}; + + + if ( typeof define === "function" && define.amd ) { + define( "oboe", [], function () { return oboe; } ); + } else if (typeof exports === 'object') { + module.exports = oboe; + } else { + window.oboe = oboe; + } +})((function(){ + // Access to the window object throws an exception in HTML5 web workers so + // point it to "self" if it runs in a web worker + try { + return window; + } catch (e) { + return self; + } + }()), Object, Array, Error, JSON); + +},{}],240:[function(require,module,exports){ +exports.endianness = function () { return 'LE' }; + +exports.hostname = function () { + if (typeof location !== 'undefined') { + return location.hostname + } + else return ''; +}; + +exports.loadavg = function () { return [] }; + +exports.uptime = function () { return 0 }; + +exports.freemem = function () { + return Number.MAX_VALUE; +}; + +exports.totalmem = function () { + return Number.MAX_VALUE; +}; + +exports.cpus = function () { return [] }; + +exports.type = function () { return 'Browser' }; + +exports.release = function () { + if (typeof navigator !== 'undefined') { + return navigator.appVersion; + } + return ''; +}; + +exports.networkInterfaces += exports.getNetworkInterfaces += function () { return {} }; + +exports.arch = function () { return 'javascript' }; + +exports.platform = function () { return 'browser' }; + +exports.tmpdir = exports.tmpDir = function () { + return '/tmp'; +}; + +exports.EOL = '\n'; + +exports.homedir = function () { + return '/' +}; + +},{}],241:[function(require,module,exports){ +module.exports={"2.16.840.1.101.3.4.1.1": "aes-128-ecb", +"2.16.840.1.101.3.4.1.2": "aes-128-cbc", +"2.16.840.1.101.3.4.1.3": "aes-128-ofb", +"2.16.840.1.101.3.4.1.4": "aes-128-cfb", +"2.16.840.1.101.3.4.1.21": "aes-192-ecb", +"2.16.840.1.101.3.4.1.22": "aes-192-cbc", +"2.16.840.1.101.3.4.1.23": "aes-192-ofb", +"2.16.840.1.101.3.4.1.24": "aes-192-cfb", +"2.16.840.1.101.3.4.1.41": "aes-256-ecb", +"2.16.840.1.101.3.4.1.42": "aes-256-cbc", +"2.16.840.1.101.3.4.1.43": "aes-256-ofb", +"2.16.840.1.101.3.4.1.44": "aes-256-cfb" +} +},{}],242:[function(require,module,exports){ +// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js +// Fedor, you are amazing. +'use strict' + +var asn1 = require('asn1.js') + +exports.certificate = require('./certificate') + +var RSAPrivateKey = asn1.define('RSAPrivateKey', function () { + this.seq().obj( + this.key('version').int(), + this.key('modulus').int(), + this.key('publicExponent').int(), + this.key('privateExponent').int(), + this.key('prime1').int(), + this.key('prime2').int(), + this.key('exponent1').int(), + this.key('exponent2').int(), + this.key('coefficient').int() + ) +}) +exports.RSAPrivateKey = RSAPrivateKey + +var RSAPublicKey = asn1.define('RSAPublicKey', function () { + this.seq().obj( + this.key('modulus').int(), + this.key('publicExponent').int() + ) +}) +exports.RSAPublicKey = RSAPublicKey + +var PublicKey = asn1.define('SubjectPublicKeyInfo', function () { + this.seq().obj( + this.key('algorithm').use(AlgorithmIdentifier), + this.key('subjectPublicKey').bitstr() + ) +}) +exports.PublicKey = PublicKey + +var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () { + this.seq().obj( + this.key('algorithm').objid(), + this.key('none').null_().optional(), + this.key('curve').objid().optional(), + this.key('params').seq().obj( + this.key('p').int(), + this.key('q').int(), + this.key('g').int() + ).optional() + ) +}) + +var PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () { + this.seq().obj( + this.key('version').int(), + this.key('algorithm').use(AlgorithmIdentifier), + this.key('subjectPrivateKey').octstr() + ) +}) +exports.PrivateKey = PrivateKeyInfo +var EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () { + this.seq().obj( + this.key('algorithm').seq().obj( + this.key('id').objid(), + this.key('decrypt').seq().obj( + this.key('kde').seq().obj( + this.key('id').objid(), + this.key('kdeparams').seq().obj( + this.key('salt').octstr(), + this.key('iters').int() + ) + ), + this.key('cipher').seq().obj( + this.key('algo').objid(), + this.key('iv').octstr() + ) + ) + ), + this.key('subjectPrivateKey').octstr() + ) +}) + +exports.EncryptedPrivateKey = EncryptedPrivateKeyInfo + +var DSAPrivateKey = asn1.define('DSAPrivateKey', function () { + this.seq().obj( + this.key('version').int(), + this.key('p').int(), + this.key('q').int(), + this.key('g').int(), + this.key('pub_key').int(), + this.key('priv_key').int() + ) +}) +exports.DSAPrivateKey = DSAPrivateKey + +exports.DSAparam = asn1.define('DSAparam', function () { + this.int() +}) + +var ECPrivateKey = asn1.define('ECPrivateKey', function () { + this.seq().obj( + this.key('version').int(), + this.key('privateKey').octstr(), + this.key('parameters').optional().explicit(0).use(ECParameters), + this.key('publicKey').optional().explicit(1).bitstr() + ) +}) +exports.ECPrivateKey = ECPrivateKey + +var ECParameters = asn1.define('ECParameters', function () { + this.choice({ + namedCurve: this.objid() + }) +}) + +exports.signature = asn1.define('signature', function () { + this.seq().obj( + this.key('r').int(), + this.key('s').int() + ) +}) + +},{"./certificate":243,"asn1.js":5}],243:[function(require,module,exports){ +// from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js +// thanks to @Rantanen + +'use strict' + +var asn = require('asn1.js') + +var Time = asn.define('Time', function () { + this.choice({ + utcTime: this.utctime(), + generalTime: this.gentime() + }) +}) + +var AttributeTypeValue = asn.define('AttributeTypeValue', function () { + this.seq().obj( + this.key('type').objid(), + this.key('value').any() + ) +}) + +var AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () { + this.seq().obj( + this.key('algorithm').objid(), + this.key('parameters').optional() + ) +}) + +var SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () { + this.seq().obj( + this.key('algorithm').use(AlgorithmIdentifier), + this.key('subjectPublicKey').bitstr() + ) +}) + +var RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () { + this.setof(AttributeTypeValue) +}) + +var RDNSequence = asn.define('RDNSequence', function () { + this.seqof(RelativeDistinguishedName) +}) + +var Name = asn.define('Name', function () { + this.choice({ + rdnSequence: this.use(RDNSequence) + }) +}) + +var Validity = asn.define('Validity', function () { + this.seq().obj( + this.key('notBefore').use(Time), + this.key('notAfter').use(Time) + ) +}) + +var Extension = asn.define('Extension', function () { + this.seq().obj( + this.key('extnID').objid(), + this.key('critical').bool().def(false), + this.key('extnValue').octstr() + ) +}) + +var TBSCertificate = asn.define('TBSCertificate', function () { + this.seq().obj( + this.key('version').explicit(0).int(), + this.key('serialNumber').int(), + this.key('signature').use(AlgorithmIdentifier), + this.key('issuer').use(Name), + this.key('validity').use(Validity), + this.key('subject').use(Name), + this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo), + this.key('issuerUniqueID').implicit(1).bitstr().optional(), + this.key('subjectUniqueID').implicit(2).bitstr().optional(), + this.key('extensions').explicit(3).seqof(Extension).optional() + ) +}) + +var X509Certificate = asn.define('X509Certificate', function () { + this.seq().obj( + this.key('tbsCertificate').use(TBSCertificate), + this.key('signatureAlgorithm').use(AlgorithmIdentifier), + this.key('signatureValue').bitstr() + ) +}) + +module.exports = X509Certificate + +},{"asn1.js":5}],244:[function(require,module,exports){ +(function (Buffer){ +// adapted from https://github.com/apatil/pemstrip +var findProc = /Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m +var startRegex = /^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m +var fullRegex = /^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m +var evp = require('evp_bytestokey') +var ciphers = require('browserify-aes') +module.exports = function (okey, password) { + var key = okey.toString() + var match = key.match(findProc) + var decrypted + if (!match) { + var match2 = key.match(fullRegex) + decrypted = new Buffer(match2[2].replace(/\r?\n/g, ''), 'base64') + } else { + var suite = 'aes' + match[1] + var iv = new Buffer(match[2], 'hex') + var cipherText = new Buffer(match[3].replace(/\r?\n/g, ''), 'base64') + var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key + var out = [] + var cipher = ciphers.createDecipheriv(suite, cipherKey, iv) + out.push(cipher.update(cipherText)) + out.push(cipher.final()) + decrypted = Buffer.concat(out) + } + var tag = key.match(startRegex)[1] + return { + tag: tag, + data: decrypted + } +} + +}).call(this,require("buffer").Buffer) +},{"browserify-aes":58,"buffer":84,"evp_bytestokey":158}],245:[function(require,module,exports){ +(function (Buffer){ +var asn1 = require('./asn1') +var aesid = require('./aesid.json') +var fixProc = require('./fixProc') +var ciphers = require('browserify-aes') +var compat = require('pbkdf2') +module.exports = parseKeys + +function parseKeys (buffer) { + var password + if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) { + password = buffer.passphrase + buffer = buffer.key + } + if (typeof buffer === 'string') { + buffer = new Buffer(buffer) + } + + var stripped = fixProc(buffer, password) + + var type = stripped.tag + var data = stripped.data + var subtype, ndata + switch (type) { + case 'CERTIFICATE': + ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo + // falls through + case 'PUBLIC KEY': + if (!ndata) { + ndata = asn1.PublicKey.decode(data, 'der') + } + subtype = ndata.algorithm.algorithm.join('.') + switch (subtype) { + case '1.2.840.113549.1.1.1': + return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der') + case '1.2.840.10045.2.1': + ndata.subjectPrivateKey = ndata.subjectPublicKey + return { + type: 'ec', + data: ndata + } + case '1.2.840.10040.4.1': + ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der') + return { + type: 'dsa', + data: ndata.algorithm.params + } + default: throw new Error('unknown key id ' + subtype) + } + throw new Error('unknown key type ' + type) + case 'ENCRYPTED PRIVATE KEY': + data = asn1.EncryptedPrivateKey.decode(data, 'der') + data = decrypt(data, password) + // falls through + case 'PRIVATE KEY': + ndata = asn1.PrivateKey.decode(data, 'der') + subtype = ndata.algorithm.algorithm.join('.') + switch (subtype) { + case '1.2.840.113549.1.1.1': + return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der') + case '1.2.840.10045.2.1': + return { + curve: ndata.algorithm.curve, + privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey + } + case '1.2.840.10040.4.1': + ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der') + return { + type: 'dsa', + params: ndata.algorithm.params + } + default: throw new Error('unknown key id ' + subtype) + } + throw new Error('unknown key type ' + type) + case 'RSA PUBLIC KEY': + return asn1.RSAPublicKey.decode(data, 'der') + case 'RSA PRIVATE KEY': + return asn1.RSAPrivateKey.decode(data, 'der') + case 'DSA PRIVATE KEY': + return { + type: 'dsa', + params: asn1.DSAPrivateKey.decode(data, 'der') + } + case 'EC PRIVATE KEY': + data = asn1.ECPrivateKey.decode(data, 'der') + return { + curve: data.parameters.value, + privateKey: data.privateKey + } + default: throw new Error('unknown key type ' + type) + } +} +parseKeys.signature = asn1.signature +function decrypt (data, password) { + var salt = data.algorithm.decrypt.kde.kdeparams.salt + var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10) + var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')] + var iv = data.algorithm.decrypt.cipher.iv + var cipherText = data.subjectPrivateKey + var keylen = parseInt(algo.split('-')[1], 10) / 8 + var key = compat.pbkdf2Sync(password, salt, iters, keylen) + var cipher = ciphers.createDecipheriv(algo, key, iv) + var out = [] + out.push(cipher.update(cipherText)) + out.push(cipher.final()) + return Buffer.concat(out) +} + +}).call(this,require("buffer").Buffer) +},{"./aesid.json":241,"./asn1":242,"./fixProc":244,"browserify-aes":58,"buffer":84,"pbkdf2":247}],246:[function(require,module,exports){ +var trim = require('trim') + , forEach = require('for-each') + , isArray = function(arg) { + return Object.prototype.toString.call(arg) === '[object Array]'; + } + +module.exports = function (headers) { + if (!headers) + return {} + + var result = {} + + forEach( + trim(headers).split('\n') + , function (row) { + var index = row.indexOf(':') + , key = trim(row.slice(0, index)).toLowerCase() + , value = trim(row.slice(index + 1)) + + if (typeof(result[key]) === 'undefined') { + result[key] = value + } else if (isArray(result[key])) { + result[key].push(value) + } else { + result[key] = [ result[key], value ] + } + } + ) + + return result +} +},{"for-each":159,"trim":324}],247:[function(require,module,exports){ + +exports.pbkdf2 = require('./lib/async') + +exports.pbkdf2Sync = require('./lib/sync') + +},{"./lib/async":248,"./lib/sync":251}],248:[function(require,module,exports){ +(function (process,global){ +var checkParameters = require('./precondition') +var defaultEncoding = require('./default-encoding') +var sync = require('./sync') +var Buffer = require('safe-buffer').Buffer + +var ZERO_BUF +var subtle = global.crypto && global.crypto.subtle +var toBrowser = { + 'sha': 'SHA-1', + 'sha-1': 'SHA-1', + 'sha1': 'SHA-1', + 'sha256': 'SHA-256', + 'sha-256': 'SHA-256', + 'sha384': 'SHA-384', + 'sha-384': 'SHA-384', + 'sha-512': 'SHA-512', + 'sha512': 'SHA-512' +} +var checks = [] +function checkNative (algo) { + if (global.process && !global.process.browser) { + return Promise.resolve(false) + } + if (!subtle || !subtle.importKey || !subtle.deriveBits) { + return Promise.resolve(false) + } + if (checks[algo] !== undefined) { + return checks[algo] + } + ZERO_BUF = ZERO_BUF || Buffer.alloc(8) + var prom = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, algo) + .then(function () { + return true + }).catch(function () { + return false + }) + checks[algo] = prom + return prom +} +function browserPbkdf2 (password, salt, iterations, length, algo) { + return subtle.importKey( + 'raw', password, {name: 'PBKDF2'}, false, ['deriveBits'] + ).then(function (key) { + return subtle.deriveBits({ + name: 'PBKDF2', + salt: salt, + iterations: iterations, + hash: { + name: algo + } + }, key, length << 3) + }).then(function (res) { + return Buffer.from(res) + }) +} +function resolvePromise (promise, callback) { + promise.then(function (out) { + process.nextTick(function () { + callback(null, out) + }) + }, function (e) { + process.nextTick(function () { + callback(e) + }) + }) +} +module.exports = function (password, salt, iterations, keylen, digest, callback) { + if (!Buffer.isBuffer(password)) password = Buffer.from(password, defaultEncoding) + if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, defaultEncoding) + + checkParameters(iterations, keylen) + if (typeof digest === 'function') { + callback = digest + digest = undefined + } + if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2') + + digest = digest || 'sha1' + var algo = toBrowser[digest.toLowerCase()] + if (!algo || typeof global.Promise !== 'function') { + return process.nextTick(function () { + var out + try { + out = sync(password, salt, iterations, keylen, digest) + } catch (e) { + return callback(e) + } + callback(null, out) + }) + } + resolvePromise(checkNative(algo).then(function (resp) { + if (resp) { + return browserPbkdf2(password, salt, iterations, keylen, algo) + } else { + return sync(password, salt, iterations, keylen, digest) + } + }), callback) +} + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./default-encoding":249,"./precondition":250,"./sync":251,"_process":257,"safe-buffer":290}],249:[function(require,module,exports){ +(function (process){ +var defaultEncoding +/* istanbul ignore next */ +if (process.browser) { + defaultEncoding = 'utf-8' +} else { + var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10) + + defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary' +} +module.exports = defaultEncoding + +}).call(this,require('_process')) +},{"_process":257}],250:[function(require,module,exports){ +var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs +module.exports = function (iterations, keylen) { + if (typeof iterations !== 'number') { + throw new TypeError('Iterations not a number') + } + + if (iterations < 0) { + throw new TypeError('Bad iterations') + } + + if (typeof keylen !== 'number') { + throw new TypeError('Key length not a number') + } + + if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */ + throw new TypeError('Bad key length') + } +} + +},{}],251:[function(require,module,exports){ +var md5 = require('create-hash/md5') +var rmd160 = require('ripemd160') +var sha = require('sha.js') + +var checkParameters = require('./precondition') +var defaultEncoding = require('./default-encoding') +var Buffer = require('safe-buffer').Buffer +var ZEROS = Buffer.alloc(128) +var sizes = { + md5: 16, + sha1: 20, + sha224: 28, + sha256: 32, + sha384: 48, + sha512: 64, + rmd160: 20, + ripemd160: 20 +} + +function Hmac (alg, key, saltLen) { + var hash = getDigest(alg) + var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64 + + if (key.length > blocksize) { + key = hash(key) + } else if (key.length < blocksize) { + key = Buffer.concat([key, ZEROS], blocksize) + } + + var ipad = Buffer.allocUnsafe(blocksize + sizes[alg]) + var opad = Buffer.allocUnsafe(blocksize + sizes[alg]) + for (var i = 0; i < blocksize; i++) { + ipad[i] = key[i] ^ 0x36 + opad[i] = key[i] ^ 0x5C + } + + var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4) + ipad.copy(ipad1, 0, 0, blocksize) + this.ipad1 = ipad1 + this.ipad2 = ipad + this.opad = opad + this.alg = alg + this.blocksize = blocksize + this.hash = hash + this.size = sizes[alg] +} + +Hmac.prototype.run = function (data, ipad) { + data.copy(ipad, this.blocksize) + var h = this.hash(ipad) + h.copy(this.opad, this.blocksize) + return this.hash(this.opad) +} + +function getDigest (alg) { + function shaFunc (data) { + return sha(alg).update(data).digest() + } + + if (alg === 'rmd160' || alg === 'ripemd160') return rmd160 + if (alg === 'md5') return md5 + return shaFunc +} + +function pbkdf2 (password, salt, iterations, keylen, digest) { + if (!Buffer.isBuffer(password)) password = Buffer.from(password, defaultEncoding) + if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, defaultEncoding) + + checkParameters(iterations, keylen) + + digest = digest || 'sha1' + + var hmac = new Hmac(digest, password, salt.length) + + var DK = Buffer.allocUnsafe(keylen) + var block1 = Buffer.allocUnsafe(salt.length + 4) + salt.copy(block1, 0, 0, salt.length) + + var destPos = 0 + var hLen = sizes[digest] + var l = Math.ceil(keylen / hLen) + + for (var i = 1; i <= l; i++) { + block1.writeUInt32BE(i, salt.length) + + var T = hmac.run(block1, hmac.ipad1) + var U = T + + for (var j = 1; j < iterations; j++) { + U = hmac.run(U, hmac.ipad2) + for (var k = 0; k < hLen; k++) T[k] ^= U[k] + } + + T.copy(DK, destPos) + destPos += hLen + } + + return DK +} + +module.exports = pbkdf2 + +},{"./default-encoding":249,"./precondition":250,"create-hash/md5":93,"ripemd160":288,"safe-buffer":290,"sha.js":304}],252:[function(require,module,exports){ +'use strict'; + +var processFn = function (fn, P, opts) { + return function () { + var that = this; + var args = new Array(arguments.length); + + for (var i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P(function (resolve, reject) { + args.push(function (err, result) { + if (err) { + reject(err); + } else if (opts.multiArgs) { + var results = new Array(arguments.length - 1); + + for (var i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + + fn.apply(that, args); + }); + }; +}; + +var pify = module.exports = function (obj, P, opts) { + if (typeof P !== 'function') { + opts = P; + P = Promise; + } + + opts = opts || {}; + opts.exclude = opts.exclude || [/.+Sync$/]; + + var filter = function (key) { + var match = function (pattern) { + return typeof pattern === 'string' ? key === pattern : pattern.test(key); + }; + + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + var ret = typeof obj === 'function' ? function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, P, opts).apply(this, arguments); + } : {}; + + return Object.keys(obj).reduce(function (ret, key) { + var x = obj[key]; + + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x; + + return ret; + }, ret); +}; + +pify.all = pify; + +},{}],253:[function(require,module,exports){ +/* + * Copyright (c) 2012 Mathieu Turcotte + * Licensed under the MIT license. + */ + +module.exports = require('./lib/checks'); +},{"./lib/checks":254}],254:[function(require,module,exports){ +/* + * Copyright (c) 2012 Mathieu Turcotte + * Licensed under the MIT license. + */ + +var util = require('util'); + +var errors = module.exports = require('./errors'); + +function failCheck(ExceptionConstructor, callee, messageFormat, formatArgs) { + messageFormat = messageFormat || ''; + var message = util.format.apply(this, [messageFormat].concat(formatArgs)); + var error = new ExceptionConstructor(message); + Error.captureStackTrace(error, callee); + throw error; +} + +function failArgumentCheck(callee, message, formatArgs) { + failCheck(errors.IllegalArgumentError, callee, message, formatArgs); +} + +function failStateCheck(callee, message, formatArgs) { + failCheck(errors.IllegalStateError, callee, message, formatArgs); +} + +module.exports.checkArgument = function(value, message) { + if (!value) { + failArgumentCheck(arguments.callee, message, + Array.prototype.slice.call(arguments, 2)); + } +}; + +module.exports.checkState = function(value, message) { + if (!value) { + failStateCheck(arguments.callee, message, + Array.prototype.slice.call(arguments, 2)); + } +}; + +module.exports.checkIsDef = function(value, message) { + if (value !== undefined) { + return value; + } + + failArgumentCheck(arguments.callee, message || + 'Expected value to be defined but was undefined.', + Array.prototype.slice.call(arguments, 2)); +}; + +module.exports.checkIsDefAndNotNull = function(value, message) { + // Note that undefined == null. + if (value != null) { + return value; + } + + failArgumentCheck(arguments.callee, message || + 'Expected value to be defined and not null but got "' + + typeOf(value) + '".', Array.prototype.slice.call(arguments, 2)); +}; + +// Fixed version of the typeOf operator which returns 'null' for null values +// and 'array' for arrays. +function typeOf(value) { + var s = typeof value; + if (s == 'object') { + if (!value) { + return 'null'; + } else if (value instanceof Array) { + return 'array'; + } + } + return s; +} + +function typeCheck(expect) { + return function(value, message) { + var type = typeOf(value); + + if (type == expect) { + return value; + } + + failArgumentCheck(arguments.callee, message || + 'Expected "' + expect + '" but got "' + type + '".', + Array.prototype.slice.call(arguments, 2)); + }; +} + +module.exports.checkIsString = typeCheck('string'); +module.exports.checkIsArray = typeCheck('array'); +module.exports.checkIsNumber = typeCheck('number'); +module.exports.checkIsBoolean = typeCheck('boolean'); +module.exports.checkIsFunction = typeCheck('function'); +module.exports.checkIsObject = typeCheck('object'); + +},{"./errors":255,"util":333}],255:[function(require,module,exports){ +/* + * Copyright (c) 2012 Mathieu Turcotte + * Licensed under the MIT license. + */ + +var util = require('util'); + +function IllegalArgumentError(message) { + Error.call(this, message); + this.message = message; +} +util.inherits(IllegalArgumentError, Error); + +IllegalArgumentError.prototype.name = 'IllegalArgumentError'; + +function IllegalStateError(message) { + Error.call(this, message); + this.message = message; +} +util.inherits(IllegalStateError, Error); + +IllegalStateError.prototype.name = 'IllegalStateError'; + +module.exports.IllegalStateError = IllegalStateError; +module.exports.IllegalArgumentError = IllegalArgumentError; +},{"util":333}],256:[function(require,module,exports){ +(function (process){ +'use strict'; + +if (!process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = { nextTick: nextTick }; +} else { + module.exports = process +} + +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} + + +}).call(this,require('_process')) +},{"_process":257}],257:[function(require,module,exports){ +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],258:[function(require,module,exports){ +'use strict'; +var isFn = require('is-fn'); +var setImmediate = require('set-immediate-shim'); + +module.exports = function (promise) { + if (!isFn(promise.then)) { + throw new TypeError('Expected a promise'); + } + + return function (cb) { + promise.then(function (data) { + setImmediate(cb, null, data); + }, function (err) { + setImmediate(cb, err); + }); + }; +}; + +},{"is-fn":183,"set-immediate-shim":302}],259:[function(require,module,exports){ +exports.publicEncrypt = require('./publicEncrypt'); +exports.privateDecrypt = require('./privateDecrypt'); + +exports.privateEncrypt = function privateEncrypt(key, buf) { + return exports.publicEncrypt(key, buf, true); +}; + +exports.publicDecrypt = function publicDecrypt(key, buf) { + return exports.privateDecrypt(key, buf, true); +}; +},{"./privateDecrypt":261,"./publicEncrypt":262}],260:[function(require,module,exports){ +(function (Buffer){ +var createHash = require('create-hash'); +module.exports = function (seed, len) { + var t = new Buffer(''); + var i = 0, c; + while (t.length < len) { + c = i2ops(i++); + t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()]); + } + return t.slice(0, len); +}; + +function i2ops(c) { + var out = new Buffer(4); + out.writeUInt32BE(c,0); + return out; +} +}).call(this,require("buffer").Buffer) +},{"buffer":84,"create-hash":91}],261:[function(require,module,exports){ +(function (Buffer){ +var parseKeys = require('parse-asn1'); +var mgf = require('./mgf'); +var xor = require('./xor'); +var bn = require('bn.js'); +var crt = require('browserify-rsa'); +var createHash = require('create-hash'); +var withPublic = require('./withPublic'); +module.exports = function privateDecrypt(private_key, enc, reverse) { + var padding; + if (private_key.padding) { + padding = private_key.padding; + } else if (reverse) { + padding = 1; + } else { + padding = 4; + } + + var key = parseKeys(private_key); + var k = key.modulus.byteLength(); + if (enc.length > k || new bn(enc).cmp(key.modulus) >= 0) { + throw new Error('decryption error'); + } + var msg; + if (reverse) { + msg = withPublic(new bn(enc), key); + } else { + msg = crt(enc, key); + } + var zBuffer = new Buffer(k - msg.length); + zBuffer.fill(0); + msg = Buffer.concat([zBuffer, msg], k); + if (padding === 4) { + return oaep(key, msg); + } else if (padding === 1) { + return pkcs1(key, msg, reverse); + } else if (padding === 3) { + return msg; + } else { + throw new Error('unknown padding'); + } +}; + +function oaep(key, msg){ + var n = key.modulus; + var k = key.modulus.byteLength(); + var mLen = msg.length; + var iHash = createHash('sha1').update(new Buffer('')).digest(); + var hLen = iHash.length; + var hLen2 = 2 * hLen; + if (msg[0] !== 0) { + throw new Error('decryption error'); + } + var maskedSeed = msg.slice(1, hLen + 1); + var maskedDb = msg.slice(hLen + 1); + var seed = xor(maskedSeed, mgf(maskedDb, hLen)); + var db = xor(maskedDb, mgf(seed, k - hLen - 1)); + if (compare(iHash, db.slice(0, hLen))) { + throw new Error('decryption error'); + } + var i = hLen; + while (db[i] === 0) { + i++; + } + if (db[i++] !== 1) { + throw new Error('decryption error'); + } + return db.slice(i); +} + +function pkcs1(key, msg, reverse){ + var p1 = msg.slice(0, 2); + var i = 2; + var status = 0; + while (msg[i++] !== 0) { + if (i >= msg.length) { + status++; + break; + } + } + var ps = msg.slice(2, i - 1); + var p2 = msg.slice(i - 1, i); + + if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)){ + status++; + } + if (ps.length < 8) { + status++; + } + if (status) { + throw new Error('decryption error'); + } + return msg.slice(i); +} +function compare(a, b){ + a = new Buffer(a); + b = new Buffer(b); + var dif = 0; + var len = a.length; + if (a.length !== b.length) { + dif++; + len = Math.min(a.length, b.length); + } + var i = -1; + while (++i < len) { + dif += (a[i] ^ b[i]); + } + return dif; +} +}).call(this,require("buffer").Buffer) +},{"./mgf":260,"./withPublic":263,"./xor":264,"bn.js":53,"browserify-rsa":76,"buffer":84,"create-hash":91,"parse-asn1":245}],262:[function(require,module,exports){ +(function (Buffer){ +var parseKeys = require('parse-asn1'); +var randomBytes = require('randombytes'); +var createHash = require('create-hash'); +var mgf = require('./mgf'); +var xor = require('./xor'); +var bn = require('bn.js'); +var withPublic = require('./withPublic'); +var crt = require('browserify-rsa'); + +var constants = { + RSA_PKCS1_OAEP_PADDING: 4, + RSA_PKCS1_PADDIN: 1, + RSA_NO_PADDING: 3 +}; + +module.exports = function publicEncrypt(public_key, msg, reverse) { + var padding; + if (public_key.padding) { + padding = public_key.padding; + } else if (reverse) { + padding = 1; + } else { + padding = 4; + } + var key = parseKeys(public_key); + var paddedMsg; + if (padding === 4) { + paddedMsg = oaep(key, msg); + } else if (padding === 1) { + paddedMsg = pkcs1(key, msg, reverse); + } else if (padding === 3) { + paddedMsg = new bn(msg); + if (paddedMsg.cmp(key.modulus) >= 0) { + throw new Error('data too long for modulus'); + } + } else { + throw new Error('unknown padding'); + } + if (reverse) { + return crt(paddedMsg, key); + } else { + return withPublic(paddedMsg, key); + } +}; + +function oaep(key, msg){ + var k = key.modulus.byteLength(); + var mLen = msg.length; + var iHash = createHash('sha1').update(new Buffer('')).digest(); + var hLen = iHash.length; + var hLen2 = 2 * hLen; + if (mLen > k - hLen2 - 2) { + throw new Error('message too long'); + } + var ps = new Buffer(k - mLen - hLen2 - 2); + ps.fill(0); + var dblen = k - hLen - 1; + var seed = randomBytes(hLen); + var maskedDb = xor(Buffer.concat([iHash, ps, new Buffer([1]), msg], dblen), mgf(seed, dblen)); + var maskedSeed = xor(seed, mgf(maskedDb, hLen)); + return new bn(Buffer.concat([new Buffer([0]), maskedSeed, maskedDb], k)); +} +function pkcs1(key, msg, reverse){ + var mLen = msg.length; + var k = key.modulus.byteLength(); + if (mLen > k - 11) { + throw new Error('message too long'); + } + var ps; + if (reverse) { + ps = new Buffer(k - mLen - 3); + ps.fill(0xff); + } else { + ps = nonZero(k - mLen - 3); + } + return new bn(Buffer.concat([new Buffer([0, reverse?1:2]), ps, new Buffer([0]), msg], k)); +} +function nonZero(len, crypto) { + var out = new Buffer(len); + var i = 0; + var cache = randomBytes(len*2); + var cur = 0; + var num; + while (i < len) { + if (cur === cache.length) { + cache = randomBytes(len*2); + cur = 0; + } + num = cache[cur++]; + if (num) { + out[i++] = num; + } + } + return out; +} +}).call(this,require("buffer").Buffer) +},{"./mgf":260,"./withPublic":263,"./xor":264,"bn.js":53,"browserify-rsa":76,"buffer":84,"create-hash":91,"parse-asn1":245,"randombytes":270}],263:[function(require,module,exports){ +(function (Buffer){ +var bn = require('bn.js'); +function withPublic(paddedMsg, key) { + return new Buffer(paddedMsg + .toRed(bn.mont(key.modulus)) + .redPow(new bn(key.publicExponent)) + .fromRed() + .toArray()); +} + +module.exports = withPublic; +}).call(this,require("buffer").Buffer) +},{"bn.js":53,"buffer":84}],264:[function(require,module,exports){ +module.exports = function xor(a, b) { + var len = a.length; + var i = -1; + while (++i < len) { + a[i] ^= b[i]; + } + return a +}; +},{}],265:[function(require,module,exports){ +(function (global){ +/*! https://mths.be/punycode v1.4.1 by @mathias */ +;(function(root) { + + /** Detect free variables */ + var freeExports = typeof exports == 'object' && exports && + !exports.nodeType && exports; + var freeModule = typeof module == 'object' && module && + !module.nodeType && module; + var freeGlobal = typeof global == 'object' && global; + if ( + freeGlobal.global === freeGlobal || + freeGlobal.window === freeGlobal || + freeGlobal.self === freeGlobal + ) { + root = freeGlobal; + } + + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, + + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators + + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw new RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.4.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define('punycode', function() { + return punycode; + }); + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { + // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { + // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { + // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],266:[function(require,module,exports){ +'use strict'; +var strictUriEncode = require('strict-uri-encode'); +var objectAssign = require('object-assign'); +var decodeComponent = require('decode-uri-component'); + +function encoderForArrayFormat(opts) { + switch (opts.arrayFormat) { + case 'index': + return function (key, value, index) { + return value === null ? [ + encode(key, opts), + '[', + index, + ']' + ].join('') : [ + encode(key, opts), + '[', + encode(index, opts), + ']=', + encode(value, opts) + ].join(''); + }; + + case 'bracket': + return function (key, value) { + return value === null ? encode(key, opts) : [ + encode(key, opts), + '[]=', + encode(value, opts) + ].join(''); + }; + + default: + return function (key, value) { + return value === null ? encode(key, opts) : [ + encode(key, opts), + '=', + encode(value, opts) + ].join(''); + }; + } +} + +function parserForArrayFormat(opts) { + var result; + + switch (opts.arrayFormat) { + case 'index': + return function (key, value, accumulator) { + result = /\[(\d*)\]$/.exec(key); + + key = key.replace(/\[\d*\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = {}; + } + + accumulator[key][result[1]] = value; + }; + + case 'bracket': + return function (key, value, accumulator) { + result = /(\[\])$/.exec(key); + key = key.replace(/\[\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } else if (accumulator[key] === undefined) { + accumulator[key] = [value]; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + + default: + return function (key, value, accumulator) { + if (accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + } +} + +function encode(value, opts) { + if (opts.encode) { + return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); + } + + return value; +} + +function keysSorter(input) { + if (Array.isArray(input)) { + return input.sort(); + } else if (typeof input === 'object') { + return keysSorter(Object.keys(input)).sort(function (a, b) { + return Number(a) - Number(b); + }).map(function (key) { + return input[key]; + }); + } + + return input; +} + +function extract(str) { + var queryStart = str.indexOf('?'); + if (queryStart === -1) { + return ''; + } + return str.slice(queryStart + 1); +} + +function parse(str, opts) { + opts = objectAssign({arrayFormat: 'none'}, opts); + + var formatter = parserForArrayFormat(opts); + + // Create an object with no prototype + // https://github.com/sindresorhus/query-string/issues/47 + var ret = Object.create(null); + + if (typeof str !== 'string') { + return ret; + } + + str = str.trim().replace(/^[?#&]/, ''); + + if (!str) { + return ret; + } + + str.split('&').forEach(function (param) { + var parts = param.replace(/\+/g, ' ').split('='); + // Firefox (pre 40) decodes `%3D` to `=` + // https://github.com/sindresorhus/query-string/pull/37 + var key = parts.shift(); + var val = parts.length > 0 ? parts.join('=') : undefined; + + // missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + val = val === undefined ? null : decodeComponent(val); + + formatter(decodeComponent(key), val, ret); + }); + + return Object.keys(ret).sort().reduce(function (result, key) { + var val = ret[key]; + if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) { + // Sort object keys, not values + result[key] = keysSorter(val); + } else { + result[key] = val; + } + + return result; + }, Object.create(null)); +} + +exports.extract = extract; +exports.parse = parse; + +exports.stringify = function (obj, opts) { + var defaults = { + encode: true, + strict: true, + arrayFormat: 'none' + }; + + opts = objectAssign(defaults, opts); + + if (opts.sort === false) { + opts.sort = function () {}; + } + + var formatter = encoderForArrayFormat(opts); + + return obj ? Object.keys(obj).sort(opts.sort).map(function (key) { + var val = obj[key]; + + if (val === undefined) { + return ''; + } + + if (val === null) { + return encode(key, opts); + } + + if (Array.isArray(val)) { + var result = []; + + val.slice().forEach(function (val2) { + if (val2 === undefined) { + return; + } + + result.push(formatter(key, val2, result.length)); + }); + + return result.join('&'); + } + + return encode(key, opts) + '=' + encode(val, opts); + }).filter(function (x) { + return x.length > 0; + }).join('&') : ''; +}; + +exports.parseUrl = function (str, opts) { + return { + url: str.split('?')[0] || '', + query: parse(extract(str), opts) + }; +}; + +},{"decode-uri-component":98,"object-assign":238,"strict-uri-encode":316}],267:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +'use strict'; + +// If obj.hasOwnProperty has been overridden, then calling +// obj.hasOwnProperty(prop) will break. +// See: https://github.com/joyent/node/issues/1707 +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +module.exports = function(qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } + + var regexp = /\+/g; + qs = qs.split(sep); + + var maxKeys = 1000; + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } + + var len = qs.length; + // maxKeys <= 0 means that we should not limit keys count + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, vstr, k, v; + + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; + } + + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + + if (!hasOwnProperty(obj, k)) { + obj[k] = v; + } else if (isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + + return obj; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +},{}],268:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +'use strict'; + +var stringifyPrimitive = function(v) { + switch (typeof v) { + case 'string': + return v; + + case 'boolean': + return v ? 'true' : 'false'; + + case 'number': + return isFinite(v) ? v : ''; + + default: + return ''; + } +}; + +module.exports = function(obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + if (obj === null) { + obj = undefined; + } + + if (typeof obj === 'object') { + return map(objectKeys(obj), function(k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + if (isArray(obj[k])) { + return map(obj[k], function(v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + + } + + if (!name) return ''; + return encodeURIComponent(stringifyPrimitive(name)) + eq + + encodeURIComponent(stringifyPrimitive(obj)); +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +function map (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f(xs[i], i)); + } + return res; +} + +var objectKeys = Object.keys || function (obj) { + var res = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); + } + return res; +}; + +},{}],269:[function(require,module,exports){ +'use strict'; + +exports.decode = exports.parse = require('./decode'); +exports.encode = exports.stringify = require('./encode'); + +},{"./decode":267,"./encode":268}],270:[function(require,module,exports){ +(function (process,global){ +'use strict' + +function oldBrowser () { + throw new Error('Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11') +} + +var Buffer = require('safe-buffer').Buffer +var crypto = global.crypto || global.msCrypto + +if (crypto && crypto.getRandomValues) { + module.exports = randomBytes +} else { + module.exports = oldBrowser +} + +function randomBytes (size, cb) { + // phantomjs needs to throw + if (size > 65536) throw new Error('requested too many random bytes') + // in case browserify isn't using the Uint8Array version + var rawBytes = new global.Uint8Array(size) + + // This will not work in older browsers. + // See https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues + if (size > 0) { // getRandomValues fails on IE if size == 0 + crypto.getRandomValues(rawBytes) + } + + // XXX: phantomjs doesn't like a buffer being passed here + var bytes = Buffer.from(rawBytes.buffer) + + if (typeof cb === 'function') { + return process.nextTick(function () { + cb(null, bytes) + }) + } + + return bytes +} + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"_process":257,"safe-buffer":290}],271:[function(require,module,exports){ +(function (process,global){ +'use strict' + +function oldBrowser () { + throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11') +} +var safeBuffer = require('safe-buffer') +var randombytes = require('randombytes') +var Buffer = safeBuffer.Buffer +var kBufferMaxLength = safeBuffer.kMaxLength +var crypto = global.crypto || global.msCrypto +var kMaxUint32 = Math.pow(2, 32) - 1 +function assertOffset (offset, length) { + if (typeof offset !== 'number' || offset !== offset) { // eslint-disable-line no-self-compare + throw new TypeError('offset must be a number') + } + + if (offset > kMaxUint32 || offset < 0) { + throw new TypeError('offset must be a uint32') + } + + if (offset > kBufferMaxLength || offset > length) { + throw new RangeError('offset out of range') + } +} + +function assertSize (size, offset, length) { + if (typeof size !== 'number' || size !== size) { // eslint-disable-line no-self-compare + throw new TypeError('size must be a number') + } + + if (size > kMaxUint32 || size < 0) { + throw new TypeError('size must be a uint32') + } + + if (size + offset > length || size > kBufferMaxLength) { + throw new RangeError('buffer too small') + } +} +if ((crypto && crypto.getRandomValues) || !process.browser) { + exports.randomFill = randomFill + exports.randomFillSync = randomFillSync +} else { + exports.randomFill = oldBrowser + exports.randomFillSync = oldBrowser +} +function randomFill (buf, offset, size, cb) { + if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) { + throw new TypeError('"buf" argument must be a Buffer or Uint8Array') + } + + if (typeof offset === 'function') { + cb = offset + offset = 0 + size = buf.length + } else if (typeof size === 'function') { + cb = size + size = buf.length - offset + } else if (typeof cb !== 'function') { + throw new TypeError('"cb" argument must be a function') + } + assertOffset(offset, buf.length) + assertSize(size, offset, buf.length) + return actualFill(buf, offset, size, cb) +} + +function actualFill (buf, offset, size, cb) { + if (process.browser) { + var ourBuf = buf.buffer + var uint = new Uint8Array(ourBuf, offset, size) + crypto.getRandomValues(uint) + if (cb) { + process.nextTick(function () { + cb(null, buf) + }) + return + } + return buf + } + if (cb) { + randombytes(size, function (err, bytes) { + if (err) { + return cb(err) + } + bytes.copy(buf, offset) + cb(null, buf) + }) + return + } + var bytes = randombytes(size) + bytes.copy(buf, offset) + return buf +} +function randomFillSync (buf, offset, size) { + if (typeof offset === 'undefined') { + offset = 0 + } + if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) { + throw new TypeError('"buf" argument must be a Buffer or Uint8Array') + } + + assertOffset(offset, buf.length) + + if (size === undefined) size = buf.length - offset + + assertSize(size, offset, buf.length) + + return actualFill(buf, offset, size) +} + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"_process":257,"randombytes":270,"safe-buffer":290}],272:[function(require,module,exports){ +module.exports = window.crypto; +},{}],273:[function(require,module,exports){ +module.exports = require('crypto'); +},{"crypto":272}],274:[function(require,module,exports){ +var randomHex = function(size, callback) { + var crypto = require('./crypto.js'); + var isCallback = (typeof callback === 'function'); + + + if (size > 65536) { + if(isCallback) { + callback(new Error('Requested too many random bytes.')); + } else { + throw new Error('Requested too many random bytes.'); + } + }; + + + // is node + if (typeof crypto !== 'undefined' && crypto.randomBytes) { + + if(isCallback) { + crypto.randomBytes(size, function(err, result){ + if(!err) { + callback(null, '0x'+ result.toString('hex')); + } else { + callback(error); + } + }) + } else { + return '0x'+ crypto.randomBytes(size).toString('hex'); + } + + // is browser + } else { + var cryptoLib; + + if (typeof crypto !== 'undefined') { + cryptoLib = crypto; + } else if(typeof msCrypto !== 'undefined') { + cryptoLib = msCrypto; + } + + if (cryptoLib && cryptoLib.getRandomValues) { + var randomBytes = cryptoLib.getRandomValues(new Uint8Array(size)); + var returnValue = '0x'+ Array.from(randomBytes).map(function(arr){ return arr.toString(16); }).join(''); + + if(isCallback) { + callback(null, returnValue); + } else { + return returnValue; + } + + // not crypto object + } else { + var error = new Error('No "crypto" object available. This Browser doesn\'t support generating secure random bytes.'); + + if(isCallback) { + callback(error); + } else { + throw error; + } + } + } +}; + + +module.exports = randomHex; + +},{"./crypto.js":273}],275:[function(require,module,exports){ +module.exports = require('./lib/_stream_duplex.js'); + +},{"./lib/_stream_duplex.js":276}],276:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ + +var processNextTick = require('process-nextick-args').nextTick; +/**/ + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +var keys = objectKeys(Writable.prototype); +for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + processNextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +Object.defineProperty(Duplex.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); + +Duplex.prototype._destroy = function (err, cb) { + this.push(null); + this.end(); + + processNextTick(cb, err); +}; + +function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} +},{"./_stream_readable":278,"./_stream_writable":280,"core-util-is":89,"inherits":180,"process-nextick-args":256}],277:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; +},{"./_stream_transform":279,"core-util-is":89,"inherits":180}],278:[function(require,module,exports){ +(function (process,global){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +'use strict'; + +/**/ + +var processNextTick = require('process-nextick-args').nextTick; +/**/ + +module.exports = Readable; + +/**/ +var isArray = require('isarray'); +/**/ + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var debugUtil = require('util'); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var BufferList = require('./internal/streams/BufferList'); +var destroyImpl = require('./internal/streams/destroy'); +var StringDecoder; + +util.inherits(Readable, Stream); + +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + +function ReadableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // has it been destroyed + this.destroyed = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options) { + if (typeof options.read === 'function') this._read = options.read; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + + Stream.call(this); +} + +Object.defineProperty(Readable.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); + +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + this.push(null); + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; + +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (addToFront) { + if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit('error', new Error('stream.push() after EOF')); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + + return needMoreData(state); +} + +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} + +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + processNextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, unpipeInfo); + }return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this, unpipeInfo); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + processNextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + processNextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + + var state = this._readableState; + var paused = false; + + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + + _this.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return this; +}; + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; +} + +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} + +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = Buffer.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + processNextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./_stream_duplex":276,"./internal/streams/BufferList":281,"./internal/streams/destroy":282,"./internal/streams/stream":283,"_process":257,"core-util-is":89,"events":157,"inherits":180,"isarray":186,"process-nextick-args":256,"safe-buffer":290,"string_decoder/":317,"util":55}],279:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) { + return this.emit('error', new Error('write callback called multiple times')); + } + + ts.writechunk = null; + ts.writecb = null; + + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); + + cb(er); + + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} + +function prefinish() { + var _this = this; + + if (typeof this._flush === 'function') { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +Transform.prototype._destroy = function (err, cb) { + var _this2 = this; + + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + _this2.emit('close'); + }); +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); + + if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} +},{"./_stream_duplex":276,"core-util-is":89,"inherits":180}],280:[function(require,module,exports){ +(function (process,global){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +/**/ + +var processNextTick = require('process-nextick-args').nextTick; +/**/ + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; +/**/ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +var destroyImpl = require('./internal/streams/destroy'); + +util.inherits(Writable, Stream); + +function nop() {} + +function WritableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + + if (typeof options.final === 'function') this._final = options.final; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + processNextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + processNextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + processNextTick(cb, er); + // this can emit finish, and it will always happen + // after error + processNextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + stream.emit('error', err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function') { + state.pendingcb++; + state.finalCalled = true; + processNextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) processNextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = corkReq; + } else { + state.corkedRequestsFree = corkReq; + } +} + +Object.defineProperty(Writable.prototype, 'destroyed', { + get: function () { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); + +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + this.end(); + cb(err); +}; +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./_stream_duplex":276,"./internal/streams/destroy":282,"./internal/streams/stream":283,"_process":257,"core-util-is":89,"inherits":180,"process-nextick-args":256,"safe-buffer":290,"util-deprecate":330}],281:[function(require,module,exports){ +'use strict'; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Buffer = require('safe-buffer').Buffer; +var util = require('util'); + +function copyBuffer(src, target, offset) { + src.copy(target, offset); +} + +module.exports = function () { + function BufferList() { + _classCallCheck(this, BufferList); + + this.head = null; + this.tail = null; + this.length = 0; + } + + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + }; + + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; + + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + }; + + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; + }; + + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + if (this.length === 1) return this.head.data; + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; + + return BufferList; +}(); + +if (util && util.inspect && util.inspect.custom) { + module.exports.prototype[util.inspect.custom] = function () { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + ' ' + obj; + }; +} +},{"safe-buffer":290,"util":55}],282:[function(require,module,exports){ +'use strict'; + +/**/ + +var processNextTick = require('process-nextick-args').nextTick; +/**/ + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { + processNextTick(emitErrorNT, this, err); + } + return this; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + + this._destroy(err || null, function (err) { + if (!cb && err) { + processNextTick(emitErrorNT, _this, err); + if (_this._writableState) { + _this._writableState.errorEmitted = true; + } + } else if (cb) { + cb(err); + } + }); + + return this; +} + +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} + +function emitErrorNT(self, err) { + self.emit('error', err); +} + +module.exports = { + destroy: destroy, + undestroy: undestroy +}; +},{"process-nextick-args":256}],283:[function(require,module,exports){ +module.exports = require('events').EventEmitter; + +},{"events":157}],284:[function(require,module,exports){ +module.exports = require('./readable').PassThrough + +},{"./readable":285}],285:[function(require,module,exports){ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); + +},{"./lib/_stream_duplex.js":276,"./lib/_stream_passthrough.js":277,"./lib/_stream_readable.js":278,"./lib/_stream_transform.js":279,"./lib/_stream_writable.js":280}],286:[function(require,module,exports){ +module.exports = require('./readable').Transform + +},{"./readable":285}],287:[function(require,module,exports){ +module.exports = require('./lib/_stream_writable.js'); + +},{"./lib/_stream_writable.js":280}],288:[function(require,module,exports){ +(function (Buffer){ +'use strict' +var inherits = require('inherits') +var HashBase = require('hash-base') + +function RIPEMD160 () { + HashBase.call(this, 64) + + // state + this._a = 0x67452301 + this._b = 0xefcdab89 + this._c = 0x98badcfe + this._d = 0x10325476 + this._e = 0xc3d2e1f0 +} + +inherits(RIPEMD160, HashBase) + +RIPEMD160.prototype._update = function () { + var m = new Array(16) + for (var i = 0; i < 16; ++i) m[i] = this._block.readInt32LE(i * 4) + + var al = this._a + var bl = this._b + var cl = this._c + var dl = this._d + var el = this._e + + // Mj = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 + // K = 0x00000000 + // Sj = 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8 + al = fn1(al, bl, cl, dl, el, m[0], 0x00000000, 11); cl = rotl(cl, 10) + el = fn1(el, al, bl, cl, dl, m[1], 0x00000000, 14); bl = rotl(bl, 10) + dl = fn1(dl, el, al, bl, cl, m[2], 0x00000000, 15); al = rotl(al, 10) + cl = fn1(cl, dl, el, al, bl, m[3], 0x00000000, 12); el = rotl(el, 10) + bl = fn1(bl, cl, dl, el, al, m[4], 0x00000000, 5); dl = rotl(dl, 10) + al = fn1(al, bl, cl, dl, el, m[5], 0x00000000, 8); cl = rotl(cl, 10) + el = fn1(el, al, bl, cl, dl, m[6], 0x00000000, 7); bl = rotl(bl, 10) + dl = fn1(dl, el, al, bl, cl, m[7], 0x00000000, 9); al = rotl(al, 10) + cl = fn1(cl, dl, el, al, bl, m[8], 0x00000000, 11); el = rotl(el, 10) + bl = fn1(bl, cl, dl, el, al, m[9], 0x00000000, 13); dl = rotl(dl, 10) + al = fn1(al, bl, cl, dl, el, m[10], 0x00000000, 14); cl = rotl(cl, 10) + el = fn1(el, al, bl, cl, dl, m[11], 0x00000000, 15); bl = rotl(bl, 10) + dl = fn1(dl, el, al, bl, cl, m[12], 0x00000000, 6); al = rotl(al, 10) + cl = fn1(cl, dl, el, al, bl, m[13], 0x00000000, 7); el = rotl(el, 10) + bl = fn1(bl, cl, dl, el, al, m[14], 0x00000000, 9); dl = rotl(dl, 10) + al = fn1(al, bl, cl, dl, el, m[15], 0x00000000, 8); cl = rotl(cl, 10) + + // Mj = 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8 + // K = 0x5a827999 + // Sj = 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12 + el = fn2(el, al, bl, cl, dl, m[7], 0x5a827999, 7); bl = rotl(bl, 10) + dl = fn2(dl, el, al, bl, cl, m[4], 0x5a827999, 6); al = rotl(al, 10) + cl = fn2(cl, dl, el, al, bl, m[13], 0x5a827999, 8); el = rotl(el, 10) + bl = fn2(bl, cl, dl, el, al, m[1], 0x5a827999, 13); dl = rotl(dl, 10) + al = fn2(al, bl, cl, dl, el, m[10], 0x5a827999, 11); cl = rotl(cl, 10) + el = fn2(el, al, bl, cl, dl, m[6], 0x5a827999, 9); bl = rotl(bl, 10) + dl = fn2(dl, el, al, bl, cl, m[15], 0x5a827999, 7); al = rotl(al, 10) + cl = fn2(cl, dl, el, al, bl, m[3], 0x5a827999, 15); el = rotl(el, 10) + bl = fn2(bl, cl, dl, el, al, m[12], 0x5a827999, 7); dl = rotl(dl, 10) + al = fn2(al, bl, cl, dl, el, m[0], 0x5a827999, 12); cl = rotl(cl, 10) + el = fn2(el, al, bl, cl, dl, m[9], 0x5a827999, 15); bl = rotl(bl, 10) + dl = fn2(dl, el, al, bl, cl, m[5], 0x5a827999, 9); al = rotl(al, 10) + cl = fn2(cl, dl, el, al, bl, m[2], 0x5a827999, 11); el = rotl(el, 10) + bl = fn2(bl, cl, dl, el, al, m[14], 0x5a827999, 7); dl = rotl(dl, 10) + al = fn2(al, bl, cl, dl, el, m[11], 0x5a827999, 13); cl = rotl(cl, 10) + el = fn2(el, al, bl, cl, dl, m[8], 0x5a827999, 12); bl = rotl(bl, 10) + + // Mj = 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12 + // K = 0x6ed9eba1 + // Sj = 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5 + dl = fn3(dl, el, al, bl, cl, m[3], 0x6ed9eba1, 11); al = rotl(al, 10) + cl = fn3(cl, dl, el, al, bl, m[10], 0x6ed9eba1, 13); el = rotl(el, 10) + bl = fn3(bl, cl, dl, el, al, m[14], 0x6ed9eba1, 6); dl = rotl(dl, 10) + al = fn3(al, bl, cl, dl, el, m[4], 0x6ed9eba1, 7); cl = rotl(cl, 10) + el = fn3(el, al, bl, cl, dl, m[9], 0x6ed9eba1, 14); bl = rotl(bl, 10) + dl = fn3(dl, el, al, bl, cl, m[15], 0x6ed9eba1, 9); al = rotl(al, 10) + cl = fn3(cl, dl, el, al, bl, m[8], 0x6ed9eba1, 13); el = rotl(el, 10) + bl = fn3(bl, cl, dl, el, al, m[1], 0x6ed9eba1, 15); dl = rotl(dl, 10) + al = fn3(al, bl, cl, dl, el, m[2], 0x6ed9eba1, 14); cl = rotl(cl, 10) + el = fn3(el, al, bl, cl, dl, m[7], 0x6ed9eba1, 8); bl = rotl(bl, 10) + dl = fn3(dl, el, al, bl, cl, m[0], 0x6ed9eba1, 13); al = rotl(al, 10) + cl = fn3(cl, dl, el, al, bl, m[6], 0x6ed9eba1, 6); el = rotl(el, 10) + bl = fn3(bl, cl, dl, el, al, m[13], 0x6ed9eba1, 5); dl = rotl(dl, 10) + al = fn3(al, bl, cl, dl, el, m[11], 0x6ed9eba1, 12); cl = rotl(cl, 10) + el = fn3(el, al, bl, cl, dl, m[5], 0x6ed9eba1, 7); bl = rotl(bl, 10) + dl = fn3(dl, el, al, bl, cl, m[12], 0x6ed9eba1, 5); al = rotl(al, 10) + + // Mj = 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2 + // K = 0x8f1bbcdc + // Sj = 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12 + cl = fn4(cl, dl, el, al, bl, m[1], 0x8f1bbcdc, 11); el = rotl(el, 10) + bl = fn4(bl, cl, dl, el, al, m[9], 0x8f1bbcdc, 12); dl = rotl(dl, 10) + al = fn4(al, bl, cl, dl, el, m[11], 0x8f1bbcdc, 14); cl = rotl(cl, 10) + el = fn4(el, al, bl, cl, dl, m[10], 0x8f1bbcdc, 15); bl = rotl(bl, 10) + dl = fn4(dl, el, al, bl, cl, m[0], 0x8f1bbcdc, 14); al = rotl(al, 10) + cl = fn4(cl, dl, el, al, bl, m[8], 0x8f1bbcdc, 15); el = rotl(el, 10) + bl = fn4(bl, cl, dl, el, al, m[12], 0x8f1bbcdc, 9); dl = rotl(dl, 10) + al = fn4(al, bl, cl, dl, el, m[4], 0x8f1bbcdc, 8); cl = rotl(cl, 10) + el = fn4(el, al, bl, cl, dl, m[13], 0x8f1bbcdc, 9); bl = rotl(bl, 10) + dl = fn4(dl, el, al, bl, cl, m[3], 0x8f1bbcdc, 14); al = rotl(al, 10) + cl = fn4(cl, dl, el, al, bl, m[7], 0x8f1bbcdc, 5); el = rotl(el, 10) + bl = fn4(bl, cl, dl, el, al, m[15], 0x8f1bbcdc, 6); dl = rotl(dl, 10) + al = fn4(al, bl, cl, dl, el, m[14], 0x8f1bbcdc, 8); cl = rotl(cl, 10) + el = fn4(el, al, bl, cl, dl, m[5], 0x8f1bbcdc, 6); bl = rotl(bl, 10) + dl = fn4(dl, el, al, bl, cl, m[6], 0x8f1bbcdc, 5); al = rotl(al, 10) + cl = fn4(cl, dl, el, al, bl, m[2], 0x8f1bbcdc, 12); el = rotl(el, 10) + + // Mj = 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 + // K = 0xa953fd4e + // Sj = 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 + bl = fn5(bl, cl, dl, el, al, m[4], 0xa953fd4e, 9); dl = rotl(dl, 10) + al = fn5(al, bl, cl, dl, el, m[0], 0xa953fd4e, 15); cl = rotl(cl, 10) + el = fn5(el, al, bl, cl, dl, m[5], 0xa953fd4e, 5); bl = rotl(bl, 10) + dl = fn5(dl, el, al, bl, cl, m[9], 0xa953fd4e, 11); al = rotl(al, 10) + cl = fn5(cl, dl, el, al, bl, m[7], 0xa953fd4e, 6); el = rotl(el, 10) + bl = fn5(bl, cl, dl, el, al, m[12], 0xa953fd4e, 8); dl = rotl(dl, 10) + al = fn5(al, bl, cl, dl, el, m[2], 0xa953fd4e, 13); cl = rotl(cl, 10) + el = fn5(el, al, bl, cl, dl, m[10], 0xa953fd4e, 12); bl = rotl(bl, 10) + dl = fn5(dl, el, al, bl, cl, m[14], 0xa953fd4e, 5); al = rotl(al, 10) + cl = fn5(cl, dl, el, al, bl, m[1], 0xa953fd4e, 12); el = rotl(el, 10) + bl = fn5(bl, cl, dl, el, al, m[3], 0xa953fd4e, 13); dl = rotl(dl, 10) + al = fn5(al, bl, cl, dl, el, m[8], 0xa953fd4e, 14); cl = rotl(cl, 10) + el = fn5(el, al, bl, cl, dl, m[11], 0xa953fd4e, 11); bl = rotl(bl, 10) + dl = fn5(dl, el, al, bl, cl, m[6], 0xa953fd4e, 8); al = rotl(al, 10) + cl = fn5(cl, dl, el, al, bl, m[15], 0xa953fd4e, 5); el = rotl(el, 10) + bl = fn5(bl, cl, dl, el, al, m[13], 0xa953fd4e, 6); dl = rotl(dl, 10) + + var ar = this._a + var br = this._b + var cr = this._c + var dr = this._d + var er = this._e + + // M'j = 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12 + // K' = 0x50a28be6 + // S'j = 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6 + ar = fn5(ar, br, cr, dr, er, m[5], 0x50a28be6, 8); cr = rotl(cr, 10) + er = fn5(er, ar, br, cr, dr, m[14], 0x50a28be6, 9); br = rotl(br, 10) + dr = fn5(dr, er, ar, br, cr, m[7], 0x50a28be6, 9); ar = rotl(ar, 10) + cr = fn5(cr, dr, er, ar, br, m[0], 0x50a28be6, 11); er = rotl(er, 10) + br = fn5(br, cr, dr, er, ar, m[9], 0x50a28be6, 13); dr = rotl(dr, 10) + ar = fn5(ar, br, cr, dr, er, m[2], 0x50a28be6, 15); cr = rotl(cr, 10) + er = fn5(er, ar, br, cr, dr, m[11], 0x50a28be6, 15); br = rotl(br, 10) + dr = fn5(dr, er, ar, br, cr, m[4], 0x50a28be6, 5); ar = rotl(ar, 10) + cr = fn5(cr, dr, er, ar, br, m[13], 0x50a28be6, 7); er = rotl(er, 10) + br = fn5(br, cr, dr, er, ar, m[6], 0x50a28be6, 7); dr = rotl(dr, 10) + ar = fn5(ar, br, cr, dr, er, m[15], 0x50a28be6, 8); cr = rotl(cr, 10) + er = fn5(er, ar, br, cr, dr, m[8], 0x50a28be6, 11); br = rotl(br, 10) + dr = fn5(dr, er, ar, br, cr, m[1], 0x50a28be6, 14); ar = rotl(ar, 10) + cr = fn5(cr, dr, er, ar, br, m[10], 0x50a28be6, 14); er = rotl(er, 10) + br = fn5(br, cr, dr, er, ar, m[3], 0x50a28be6, 12); dr = rotl(dr, 10) + ar = fn5(ar, br, cr, dr, er, m[12], 0x50a28be6, 6); cr = rotl(cr, 10) + + // M'j = 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2 + // K' = 0x5c4dd124 + // S'j = 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11 + er = fn4(er, ar, br, cr, dr, m[6], 0x5c4dd124, 9); br = rotl(br, 10) + dr = fn4(dr, er, ar, br, cr, m[11], 0x5c4dd124, 13); ar = rotl(ar, 10) + cr = fn4(cr, dr, er, ar, br, m[3], 0x5c4dd124, 15); er = rotl(er, 10) + br = fn4(br, cr, dr, er, ar, m[7], 0x5c4dd124, 7); dr = rotl(dr, 10) + ar = fn4(ar, br, cr, dr, er, m[0], 0x5c4dd124, 12); cr = rotl(cr, 10) + er = fn4(er, ar, br, cr, dr, m[13], 0x5c4dd124, 8); br = rotl(br, 10) + dr = fn4(dr, er, ar, br, cr, m[5], 0x5c4dd124, 9); ar = rotl(ar, 10) + cr = fn4(cr, dr, er, ar, br, m[10], 0x5c4dd124, 11); er = rotl(er, 10) + br = fn4(br, cr, dr, er, ar, m[14], 0x5c4dd124, 7); dr = rotl(dr, 10) + ar = fn4(ar, br, cr, dr, er, m[15], 0x5c4dd124, 7); cr = rotl(cr, 10) + er = fn4(er, ar, br, cr, dr, m[8], 0x5c4dd124, 12); br = rotl(br, 10) + dr = fn4(dr, er, ar, br, cr, m[12], 0x5c4dd124, 7); ar = rotl(ar, 10) + cr = fn4(cr, dr, er, ar, br, m[4], 0x5c4dd124, 6); er = rotl(er, 10) + br = fn4(br, cr, dr, er, ar, m[9], 0x5c4dd124, 15); dr = rotl(dr, 10) + ar = fn4(ar, br, cr, dr, er, m[1], 0x5c4dd124, 13); cr = rotl(cr, 10) + er = fn4(er, ar, br, cr, dr, m[2], 0x5c4dd124, 11); br = rotl(br, 10) + + // M'j = 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13 + // K' = 0x6d703ef3 + // S'j = 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5 + dr = fn3(dr, er, ar, br, cr, m[15], 0x6d703ef3, 9); ar = rotl(ar, 10) + cr = fn3(cr, dr, er, ar, br, m[5], 0x6d703ef3, 7); er = rotl(er, 10) + br = fn3(br, cr, dr, er, ar, m[1], 0x6d703ef3, 15); dr = rotl(dr, 10) + ar = fn3(ar, br, cr, dr, er, m[3], 0x6d703ef3, 11); cr = rotl(cr, 10) + er = fn3(er, ar, br, cr, dr, m[7], 0x6d703ef3, 8); br = rotl(br, 10) + dr = fn3(dr, er, ar, br, cr, m[14], 0x6d703ef3, 6); ar = rotl(ar, 10) + cr = fn3(cr, dr, er, ar, br, m[6], 0x6d703ef3, 6); er = rotl(er, 10) + br = fn3(br, cr, dr, er, ar, m[9], 0x6d703ef3, 14); dr = rotl(dr, 10) + ar = fn3(ar, br, cr, dr, er, m[11], 0x6d703ef3, 12); cr = rotl(cr, 10) + er = fn3(er, ar, br, cr, dr, m[8], 0x6d703ef3, 13); br = rotl(br, 10) + dr = fn3(dr, er, ar, br, cr, m[12], 0x6d703ef3, 5); ar = rotl(ar, 10) + cr = fn3(cr, dr, er, ar, br, m[2], 0x6d703ef3, 14); er = rotl(er, 10) + br = fn3(br, cr, dr, er, ar, m[10], 0x6d703ef3, 13); dr = rotl(dr, 10) + ar = fn3(ar, br, cr, dr, er, m[0], 0x6d703ef3, 13); cr = rotl(cr, 10) + er = fn3(er, ar, br, cr, dr, m[4], 0x6d703ef3, 7); br = rotl(br, 10) + dr = fn3(dr, er, ar, br, cr, m[13], 0x6d703ef3, 5); ar = rotl(ar, 10) + + // M'j = 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14 + // K' = 0x7a6d76e9 + // S'j = 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8 + cr = fn2(cr, dr, er, ar, br, m[8], 0x7a6d76e9, 15); er = rotl(er, 10) + br = fn2(br, cr, dr, er, ar, m[6], 0x7a6d76e9, 5); dr = rotl(dr, 10) + ar = fn2(ar, br, cr, dr, er, m[4], 0x7a6d76e9, 8); cr = rotl(cr, 10) + er = fn2(er, ar, br, cr, dr, m[1], 0x7a6d76e9, 11); br = rotl(br, 10) + dr = fn2(dr, er, ar, br, cr, m[3], 0x7a6d76e9, 14); ar = rotl(ar, 10) + cr = fn2(cr, dr, er, ar, br, m[11], 0x7a6d76e9, 14); er = rotl(er, 10) + br = fn2(br, cr, dr, er, ar, m[15], 0x7a6d76e9, 6); dr = rotl(dr, 10) + ar = fn2(ar, br, cr, dr, er, m[0], 0x7a6d76e9, 14); cr = rotl(cr, 10) + er = fn2(er, ar, br, cr, dr, m[5], 0x7a6d76e9, 6); br = rotl(br, 10) + dr = fn2(dr, er, ar, br, cr, m[12], 0x7a6d76e9, 9); ar = rotl(ar, 10) + cr = fn2(cr, dr, er, ar, br, m[2], 0x7a6d76e9, 12); er = rotl(er, 10) + br = fn2(br, cr, dr, er, ar, m[13], 0x7a6d76e9, 9); dr = rotl(dr, 10) + ar = fn2(ar, br, cr, dr, er, m[9], 0x7a6d76e9, 12); cr = rotl(cr, 10) + er = fn2(er, ar, br, cr, dr, m[7], 0x7a6d76e9, 5); br = rotl(br, 10) + dr = fn2(dr, er, ar, br, cr, m[10], 0x7a6d76e9, 15); ar = rotl(ar, 10) + cr = fn2(cr, dr, er, ar, br, m[14], 0x7a6d76e9, 8); er = rotl(er, 10) + + // M'j = 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 + // K' = 0x00000000 + // S'j = 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 + br = fn1(br, cr, dr, er, ar, m[12], 0x00000000, 8); dr = rotl(dr, 10) + ar = fn1(ar, br, cr, dr, er, m[15], 0x00000000, 5); cr = rotl(cr, 10) + er = fn1(er, ar, br, cr, dr, m[10], 0x00000000, 12); br = rotl(br, 10) + dr = fn1(dr, er, ar, br, cr, m[4], 0x00000000, 9); ar = rotl(ar, 10) + cr = fn1(cr, dr, er, ar, br, m[1], 0x00000000, 12); er = rotl(er, 10) + br = fn1(br, cr, dr, er, ar, m[5], 0x00000000, 5); dr = rotl(dr, 10) + ar = fn1(ar, br, cr, dr, er, m[8], 0x00000000, 14); cr = rotl(cr, 10) + er = fn1(er, ar, br, cr, dr, m[7], 0x00000000, 6); br = rotl(br, 10) + dr = fn1(dr, er, ar, br, cr, m[6], 0x00000000, 8); ar = rotl(ar, 10) + cr = fn1(cr, dr, er, ar, br, m[2], 0x00000000, 13); er = rotl(er, 10) + br = fn1(br, cr, dr, er, ar, m[13], 0x00000000, 6); dr = rotl(dr, 10) + ar = fn1(ar, br, cr, dr, er, m[14], 0x00000000, 5); cr = rotl(cr, 10) + er = fn1(er, ar, br, cr, dr, m[0], 0x00000000, 15); br = rotl(br, 10) + dr = fn1(dr, er, ar, br, cr, m[3], 0x00000000, 13); ar = rotl(ar, 10) + cr = fn1(cr, dr, er, ar, br, m[9], 0x00000000, 11); er = rotl(er, 10) + br = fn1(br, cr, dr, er, ar, m[11], 0x00000000, 11); dr = rotl(dr, 10) + + // change state + var t = (this._b + cl + dr) | 0 + this._b = (this._c + dl + er) | 0 + this._c = (this._d + el + ar) | 0 + this._d = (this._e + al + br) | 0 + this._e = (this._a + bl + cr) | 0 + this._a = t +} + +RIPEMD160.prototype._digest = function () { + // create padding and handle blocks + this._block[this._blockOffset++] = 0x80 + if (this._blockOffset > 56) { + this._block.fill(0, this._blockOffset, 64) + this._update() + this._blockOffset = 0 + } + + this._block.fill(0, this._blockOffset, 56) + this._block.writeUInt32LE(this._length[0], 56) + this._block.writeUInt32LE(this._length[1], 60) + this._update() + + // produce result + var buffer = new Buffer(20) + buffer.writeInt32LE(this._a, 0) + buffer.writeInt32LE(this._b, 4) + buffer.writeInt32LE(this._c, 8) + buffer.writeInt32LE(this._d, 12) + buffer.writeInt32LE(this._e, 16) + return buffer +} + +function rotl (x, n) { + return (x << n) | (x >>> (32 - n)) +} + +function fn1 (a, b, c, d, e, m, k, s) { + return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0 +} + +function fn2 (a, b, c, d, e, m, k, s) { + return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0 +} + +function fn3 (a, b, c, d, e, m, k, s) { + return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0 +} + +function fn4 (a, b, c, d, e, m, k, s) { + return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0 +} + +function fn5 (a, b, c, d, e, m, k, s) { + return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0 +} + +module.exports = RIPEMD160 + +}).call(this,require("buffer").Buffer) +},{"buffer":84,"hash-base":161,"inherits":180}],289:[function(require,module,exports){ +const assert = require('assert') +const Buffer = require('safe-buffer').Buffer +/** + * RLP Encoding based on: https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-RLP + * This function takes in a data, convert it to buffer if not, and a length for recursion + * + * @param {Buffer,String,Integer,Array} data - will be converted to buffer + * @returns {Buffer} - returns buffer of encoded data + **/ +exports.encode = function (input) { + if (input instanceof Array) { + var output = [] + for (var i = 0; i < input.length; i++) { + output.push(exports.encode(input[i])) + } + var buf = Buffer.concat(output) + return Buffer.concat([encodeLength(buf.length, 192), buf]) + } else { + input = toBuffer(input) + if (input.length === 1 && input[0] < 128) { + return input + } else { + return Buffer.concat([encodeLength(input.length, 128), input]) + } + } +} + +function safeParseInt (v, base) { + if (v.slice(0, 2) === '00') { + throw (new Error('invalid RLP: extra zeros')) + } + + return parseInt(v, base) +} + +function encodeLength (len, offset) { + if (len < 56) { + return Buffer.from([len + offset]) + } else { + var hexLength = intToHex(len) + var lLength = hexLength.length / 2 + var firstByte = intToHex(offset + 55 + lLength) + return Buffer.from(firstByte + hexLength, 'hex') + } +} + +/** + * RLP Decoding based on: {@link https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-RLP|RLP} + * @param {Buffer,String,Integer,Array} data - will be converted to buffer + * @returns {Array} - returns decode Array of Buffers containg the original message + **/ +exports.decode = function (input, stream) { + if (!input || input.length === 0) { + return Buffer.from([]) + } + + input = toBuffer(input) + var decoded = _decode(input) + + if (stream) { + return decoded + } + + assert.equal(decoded.remainder.length, 0, 'invalid remainder') + return decoded.data +} + +exports.getLength = function (input) { + if (!input || input.length === 0) { + return Buffer.from([]) + } + + input = toBuffer(input) + var firstByte = input[0] + if (firstByte <= 0x7f) { + return input.length + } else if (firstByte <= 0xb7) { + return firstByte - 0x7f + } else if (firstByte <= 0xbf) { + return firstByte - 0xb6 + } else if (firstByte <= 0xf7) { + // a list between 0-55 bytes long + return firstByte - 0xbf + } else { + // a list over 55 bytes long + var llength = firstByte - 0xf6 + var length = safeParseInt(input.slice(1, llength).toString('hex'), 16) + return llength + length + } +} + +function _decode (input) { + var length, llength, data, innerRemainder, d + var decoded = [] + var firstByte = input[0] + + if (firstByte <= 0x7f) { + // a single byte whose value is in the [0x00, 0x7f] range, that byte is its own RLP encoding. + return { + data: input.slice(0, 1), + remainder: input.slice(1) + } + } else if (firstByte <= 0xb7) { + // string is 0-55 bytes long. A single byte with value 0x80 plus the length of the string followed by the string + // The range of the first byte is [0x80, 0xb7] + length = firstByte - 0x7f + + // set 0x80 null to 0 + if (firstByte === 0x80) { + data = Buffer.from([]) + } else { + data = input.slice(1, length) + } + + if (length === 2 && data[0] < 0x80) { + throw new Error('invalid rlp encoding: byte must be less 0x80') + } + + return { + data: data, + remainder: input.slice(length) + } + } else if (firstByte <= 0xbf) { + llength = firstByte - 0xb6 + length = safeParseInt(input.slice(1, llength).toString('hex'), 16) + data = input.slice(llength, length + llength) + if (data.length < length) { + throw (new Error('invalid RLP')) + } + + return { + data: data, + remainder: input.slice(length + llength) + } + } else if (firstByte <= 0xf7) { + // a list between 0-55 bytes long + length = firstByte - 0xbf + innerRemainder = input.slice(1, length) + while (innerRemainder.length) { + d = _decode(innerRemainder) + decoded.push(d.data) + innerRemainder = d.remainder + } + + return { + data: decoded, + remainder: input.slice(length) + } + } else { + // a list over 55 bytes long + llength = firstByte - 0xf6 + length = safeParseInt(input.slice(1, llength).toString('hex'), 16) + var totalLength = llength + length + if (totalLength > input.length) { + throw new Error('invalid rlp: total length is larger than the data') + } + + innerRemainder = input.slice(llength, totalLength) + if (innerRemainder.length === 0) { + throw new Error('invalid rlp, List has a invalid length') + } + + while (innerRemainder.length) { + d = _decode(innerRemainder) + decoded.push(d.data) + innerRemainder = d.remainder + } + return { + data: decoded, + remainder: input.slice(totalLength) + } + } +} + +function isHexPrefixed (str) { + return str.slice(0, 2) === '0x' +} + +// Removes 0x from a given String +function stripHexPrefix (str) { + if (typeof str !== 'string') { + return str + } + return isHexPrefixed(str) ? str.slice(2) : str +} + +function intToHex (i) { + var hex = i.toString(16) + if (hex.length % 2) { + hex = '0' + hex + } + + return hex +} + +function padToEven (a) { + if (a.length % 2) a = '0' + a + return a +} + +function intToBuffer (i) { + var hex = intToHex(i) + return Buffer.from(hex, 'hex') +} + +function toBuffer (v) { + if (!Buffer.isBuffer(v)) { + if (typeof v === 'string') { + if (isHexPrefixed(v)) { + v = Buffer.from(padToEven(stripHexPrefix(v)), 'hex') + } else { + v = Buffer.from(v) + } + } else if (typeof v === 'number') { + if (!v) { + v = Buffer.from([]) + } else { + v = intToBuffer(v) + } + } else if (v === null || v === undefined) { + v = Buffer.from([]) + } else if (v.toArray) { + // converts a BN to a Buffer + v = Buffer.from(v.toArray()) + } else { + throw new Error('invalid type') + } + } + return v +} + +},{"assert":19,"safe-buffer":290}],290:[function(require,module,exports){ +/* eslint-disable node/no-deprecated-api */ +var buffer = require('buffer') +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} + +},{"buffer":84}],291:[function(require,module,exports){ +const util = require('util') +const EventEmitter = require('events/') + +var R = typeof Reflect === 'object' ? Reflect : null +var ReflectApply = R && typeof R.apply === 'function' + ? R.apply + : function ReflectApply(target, receiver, args) { + return Function.prototype.apply.call(target, receiver, args); +} + +module.exports = SafeEventEmitter + + +function SafeEventEmitter() { + EventEmitter.call(this) +} + +util.inherits(SafeEventEmitter, EventEmitter) + +SafeEventEmitter.prototype.emit = function (type) { + // copied from https://github.com/Gozala/events/blob/master/events.js + // modified lines are commented with "edited:" + var args = []; + for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); + var doError = (type === 'error'); + + var events = this._events; + if (events !== undefined) + doError = (doError && events.error === undefined); + else if (!doError) + return false; + + // If there is no 'error' event listener then throw. + if (doError) { + var er; + if (args.length > 0) + er = args[0]; + if (er instanceof Error) { + // Note: The comments on the `throw` lines are intentional, they show + // up in Node's output if this results in an unhandled exception. + throw er; // Unhandled 'error' event + } + // At least give some kind of context to the user + var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); + err.context = er; + throw err; // Unhandled 'error' event + } + + var handler = events[type]; + + if (handler === undefined) + return false; + + if (typeof handler === 'function') { + // edited: using safeApply + safeApply(handler, this, args); + } else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + // edited: using safeApply + safeApply(listeners[i], this, args); + } + + return true; +} + +function safeApply(handler, context, args) { + try { + ReflectApply(handler, context, args) + } catch (err) { + // throw error after timeout so as not to interupt the stack + setTimeout(() => { + throw err + }) + } +} + +function arrayClone(arr, n) { + var copy = new Array(n); + for (var i = 0; i < n; ++i) + copy[i] = arr[i]; + return copy; +} + +},{"events/":292,"util":333}],292:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +'use strict'; + +var R = typeof Reflect === 'object' ? Reflect : null +var ReflectApply = R && typeof R.apply === 'function' + ? R.apply + : function ReflectApply(target, receiver, args) { + return Function.prototype.apply.call(target, receiver, args); + } + +var ReflectOwnKeys +if (R && typeof R.ownKeys === 'function') { + ReflectOwnKeys = R.ownKeys +} else if (Object.getOwnPropertySymbols) { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target) + .concat(Object.getOwnPropertySymbols(target)); + }; +} else { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target); + }; +} + +function ProcessEmitWarning(warning) { + if (console && console.warn) console.warn(warning); +} + +var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { + return value !== value; +} + +function EventEmitter() { + EventEmitter.init.call(this); +} +module.exports = EventEmitter; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._eventsCount = 0; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +var defaultMaxListeners = 10; + +Object.defineProperty(EventEmitter, 'defaultMaxListeners', { + enumerable: true, + get: function() { + return defaultMaxListeners; + }, + set: function(arg) { + if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { + throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); + } + defaultMaxListeners = arg; + } +}); + +EventEmitter.init = function() { + + if (this._events === undefined || + this._events === Object.getPrototypeOf(this)._events) { + this._events = Object.create(null); + this._eventsCount = 0; + } + + this._maxListeners = this._maxListeners || undefined; +}; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { + if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { + throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); + } + this._maxListeners = n; + return this; +}; + +function $getMaxListeners(that) { + if (that._maxListeners === undefined) + return EventEmitter.defaultMaxListeners; + return that._maxListeners; +} + +EventEmitter.prototype.getMaxListeners = function getMaxListeners() { + return $getMaxListeners(this); +}; + +EventEmitter.prototype.emit = function emit(type) { + var args = []; + for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); + var doError = (type === 'error'); + + var events = this._events; + if (events !== undefined) + doError = (doError && events.error === undefined); + else if (!doError) + return false; + + // If there is no 'error' event listener then throw. + if (doError) { + var er; + if (args.length > 0) + er = args[0]; + if (er instanceof Error) { + // Note: The comments on the `throw` lines are intentional, they show + // up in Node's output if this results in an unhandled exception. + throw er; // Unhandled 'error' event + } + // At least give some kind of context to the user + var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); + err.context = er; + throw err; // Unhandled 'error' event + } + + var handler = events[type]; + + if (handler === undefined) + return false; + + if (typeof handler === 'function') { + ReflectApply(handler, this, args); + } else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + ReflectApply(listeners[i], this, args); + } + + return true; +}; + +function _addListener(target, type, listener, prepend) { + var m; + var events; + var existing; + + if (typeof listener !== 'function') { + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); + } + + events = target._events; + if (events === undefined) { + events = target._events = Object.create(null); + target._eventsCount = 0; + } else { + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (events.newListener !== undefined) { + target.emit('newListener', type, + listener.listener ? listener.listener : listener); + + // Re-assign `events` because a newListener handler could have caused the + // this._events to be assigned to a new object + events = target._events; + } + existing = events[type]; + } + + if (existing === undefined) { + // Optimize the case of one listener. Don't need the extra array object. + existing = events[type] = listener; + ++target._eventsCount; + } else { + if (typeof existing === 'function') { + // Adding the second element, need to change to array. + existing = events[type] = + prepend ? [listener, existing] : [existing, listener]; + // If we've already got an array, just append. + } else if (prepend) { + existing.unshift(listener); + } else { + existing.push(listener); + } + + // Check for listener leak + m = $getMaxListeners(target); + if (m > 0 && existing.length > m && !existing.warned) { + existing.warned = true; + // No error code for this since it is a Warning + // eslint-disable-next-line no-restricted-syntax + var w = new Error('Possible EventEmitter memory leak detected. ' + + existing.length + ' ' + String(type) + ' listeners ' + + 'added. Use emitter.setMaxListeners() to ' + + 'increase limit'); + w.name = 'MaxListenersExceededWarning'; + w.emitter = target; + w.type = type; + w.count = existing.length; + ProcessEmitWarning(w); + } + } + + return target; +} + +EventEmitter.prototype.addListener = function addListener(type, listener) { + return _addListener(this, type, listener, false); +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.prependListener = + function prependListener(type, listener) { + return _addListener(this, type, listener, true); + }; + +function onceWrapper() { + var args = []; + for (var i = 0; i < arguments.length; i++) args.push(arguments[i]); + if (!this.fired) { + this.target.removeListener(this.type, this.wrapFn); + this.fired = true; + ReflectApply(this.listener, this.target, args); + } +} + +function _onceWrap(target, type, listener) { + var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; + var wrapped = onceWrapper.bind(state); + wrapped.listener = listener; + state.wrapFn = wrapped; + return wrapped; +} + +EventEmitter.prototype.once = function once(type, listener) { + if (typeof listener !== 'function') { + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); + } + this.on(type, _onceWrap(this, type, listener)); + return this; +}; + +EventEmitter.prototype.prependOnceListener = + function prependOnceListener(type, listener) { + if (typeof listener !== 'function') { + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); + } + this.prependListener(type, _onceWrap(this, type, listener)); + return this; + }; + +// Emits a 'removeListener' event if and only if the listener was removed. +EventEmitter.prototype.removeListener = + function removeListener(type, listener) { + var list, events, position, i, originalListener; + + if (typeof listener !== 'function') { + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); + } + + events = this._events; + if (events === undefined) + return this; + + list = events[type]; + if (list === undefined) + return this; + + if (list === listener || list.listener === listener) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else { + delete events[type]; + if (events.removeListener) + this.emit('removeListener', type, list.listener || listener); + } + } else if (typeof list !== 'function') { + position = -1; + + for (i = list.length - 1; i >= 0; i--) { + if (list[i] === listener || list[i].listener === listener) { + originalListener = list[i].listener; + position = i; + break; + } + } + + if (position < 0) + return this; + + if (position === 0) + list.shift(); + else { + spliceOne(list, position); + } + + if (list.length === 1) + events[type] = list[0]; + + if (events.removeListener !== undefined) + this.emit('removeListener', type, originalListener || listener); + } + + return this; + }; + +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + +EventEmitter.prototype.removeAllListeners = + function removeAllListeners(type) { + var listeners, events, i; + + events = this._events; + if (events === undefined) + return this; + + // not listening for removeListener, no need to emit + if (events.removeListener === undefined) { + if (arguments.length === 0) { + this._events = Object.create(null); + this._eventsCount = 0; + } else if (events[type] !== undefined) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else + delete events[type]; + } + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + var keys = Object.keys(events); + var key; + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = Object.create(null); + this._eventsCount = 0; + return this; + } + + listeners = events[type]; + + if (typeof listeners === 'function') { + this.removeListener(type, listeners); + } else if (listeners !== undefined) { + // LIFO order + for (i = listeners.length - 1; i >= 0; i--) { + this.removeListener(type, listeners[i]); + } + } + + return this; + }; + +function _listeners(target, type, unwrap) { + var events = target._events; + + if (events === undefined) + return []; + + var evlistener = events[type]; + if (evlistener === undefined) + return []; + + if (typeof evlistener === 'function') + return unwrap ? [evlistener.listener || evlistener] : [evlistener]; + + return unwrap ? + unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); +} + +EventEmitter.prototype.listeners = function listeners(type) { + return _listeners(this, type, true); +}; + +EventEmitter.prototype.rawListeners = function rawListeners(type) { + return _listeners(this, type, false); +}; + +EventEmitter.listenerCount = function(emitter, type) { + if (typeof emitter.listenerCount === 'function') { + return emitter.listenerCount(type); + } else { + return listenerCount.call(emitter, type); + } +}; + +EventEmitter.prototype.listenerCount = listenerCount; +function listenerCount(type) { + var events = this._events; + + if (events !== undefined) { + var evlistener = events[type]; + + if (typeof evlistener === 'function') { + return 1; + } else if (evlistener !== undefined) { + return evlistener.length; + } + } + + return 0; +} + +EventEmitter.prototype.eventNames = function eventNames() { + return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; +}; + +function arrayClone(arr, n) { + var copy = new Array(n); + for (var i = 0; i < n; ++i) + copy[i] = arr[i]; + return copy; +} + +function spliceOne(list, index) { + for (; index + 1 < list.length; index++) + list[index] = list[index + 1]; + list.pop(); +} + +function unwrapListeners(arr) { + var ret = new Array(arr.length); + for (var i = 0; i < ret.length; ++i) { + ret[i] = arr[i].listener || arr[i]; + } + return ret; +} + +},{}],293:[function(require,module,exports){ +module.exports = require('scryptsy') + +},{"scryptsy":294}],294:[function(require,module,exports){ +(function (Buffer){ +var pbkdf2Sync = require('pbkdf2').pbkdf2Sync + +var MAX_VALUE = 0x7fffffff + +// N = Cpu cost, r = Memory cost, p = parallelization cost +function scrypt (key, salt, N, r, p, dkLen, progressCallback) { + if (N === 0 || (N & (N - 1)) !== 0) throw Error('N must be > 0 and a power of 2') + + if (N > MAX_VALUE / 128 / r) throw Error('Parameter N is too large') + if (r > MAX_VALUE / 128 / p) throw Error('Parameter r is too large') + + var XY = new Buffer(256 * r) + var V = new Buffer(128 * r * N) + + // pseudo global + var B32 = new Int32Array(16) // salsa20_8 + var x = new Int32Array(16) // salsa20_8 + var _X = new Buffer(64) // blockmix_salsa8 + + // pseudo global + var B = pbkdf2Sync(key, salt, 1, p * 128 * r, 'sha256') + + var tickCallback + if (progressCallback) { + var totalOps = p * N * 2 + var currentOp = 0 + + tickCallback = function () { + ++currentOp + + // send progress notifications once every 1,000 ops + if (currentOp % 1000 === 0) { + progressCallback({ + current: currentOp, + total: totalOps, + percent: (currentOp / totalOps) * 100.0 + }) + } + } + } + + for (var i = 0; i < p; i++) { + smix(B, i * 128 * r, r, N, V, XY) + } + + return pbkdf2Sync(key, B, 1, dkLen, 'sha256') + + // all of these functions are actually moved to the top + // due to function hoisting + + function smix (B, Bi, r, N, V, XY) { + var Xi = 0 + var Yi = 128 * r + var i + + B.copy(XY, Xi, Bi, Bi + Yi) + + for (i = 0; i < N; i++) { + XY.copy(V, i * Yi, Xi, Xi + Yi) + blockmix_salsa8(XY, Xi, Yi, r) + + if (tickCallback) tickCallback() + } + + for (i = 0; i < N; i++) { + var offset = Xi + (2 * r - 1) * 64 + var j = XY.readUInt32LE(offset) & (N - 1) + blockxor(V, j * Yi, XY, Xi, Yi) + blockmix_salsa8(XY, Xi, Yi, r) + + if (tickCallback) tickCallback() + } + + XY.copy(B, Bi, Xi, Xi + Yi) + } + + function blockmix_salsa8 (BY, Bi, Yi, r) { + var i + + arraycopy(BY, Bi + (2 * r - 1) * 64, _X, 0, 64) + + for (i = 0; i < 2 * r; i++) { + blockxor(BY, i * 64, _X, 0, 64) + salsa20_8(_X) + arraycopy(_X, 0, BY, Yi + (i * 64), 64) + } + + for (i = 0; i < r; i++) { + arraycopy(BY, Yi + (i * 2) * 64, BY, Bi + (i * 64), 64) + } + + for (i = 0; i < r; i++) { + arraycopy(BY, Yi + (i * 2 + 1) * 64, BY, Bi + (i + r) * 64, 64) + } + } + + function R (a, b) { + return (a << b) | (a >>> (32 - b)) + } + + function salsa20_8 (B) { + var i + + for (i = 0; i < 16; i++) { + B32[i] = (B[i * 4 + 0] & 0xff) << 0 + B32[i] |= (B[i * 4 + 1] & 0xff) << 8 + B32[i] |= (B[i * 4 + 2] & 0xff) << 16 + B32[i] |= (B[i * 4 + 3] & 0xff) << 24 + // B32[i] = B.readUInt32LE(i*4) <--- this is signficantly slower even in Node.js + } + + arraycopy(B32, 0, x, 0, 16) + + for (i = 8; i > 0; i -= 2) { + x[ 4] ^= R(x[ 0] + x[12], 7) + x[ 8] ^= R(x[ 4] + x[ 0], 9) + x[12] ^= R(x[ 8] + x[ 4], 13) + x[ 0] ^= R(x[12] + x[ 8], 18) + x[ 9] ^= R(x[ 5] + x[ 1], 7) + x[13] ^= R(x[ 9] + x[ 5], 9) + x[ 1] ^= R(x[13] + x[ 9], 13) + x[ 5] ^= R(x[ 1] + x[13], 18) + x[14] ^= R(x[10] + x[ 6], 7) + x[ 2] ^= R(x[14] + x[10], 9) + x[ 6] ^= R(x[ 2] + x[14], 13) + x[10] ^= R(x[ 6] + x[ 2], 18) + x[ 3] ^= R(x[15] + x[11], 7) + x[ 7] ^= R(x[ 3] + x[15], 9) + x[11] ^= R(x[ 7] + x[ 3], 13) + x[15] ^= R(x[11] + x[ 7], 18) + x[ 1] ^= R(x[ 0] + x[ 3], 7) + x[ 2] ^= R(x[ 1] + x[ 0], 9) + x[ 3] ^= R(x[ 2] + x[ 1], 13) + x[ 0] ^= R(x[ 3] + x[ 2], 18) + x[ 6] ^= R(x[ 5] + x[ 4], 7) + x[ 7] ^= R(x[ 6] + x[ 5], 9) + x[ 4] ^= R(x[ 7] + x[ 6], 13) + x[ 5] ^= R(x[ 4] + x[ 7], 18) + x[11] ^= R(x[10] + x[ 9], 7) + x[ 8] ^= R(x[11] + x[10], 9) + x[ 9] ^= R(x[ 8] + x[11], 13) + x[10] ^= R(x[ 9] + x[ 8], 18) + x[12] ^= R(x[15] + x[14], 7) + x[13] ^= R(x[12] + x[15], 9) + x[14] ^= R(x[13] + x[12], 13) + x[15] ^= R(x[14] + x[13], 18) + } + + for (i = 0; i < 16; ++i) B32[i] = x[i] + B32[i] + + for (i = 0; i < 16; i++) { + var bi = i * 4 + B[bi + 0] = (B32[i] >> 0 & 0xff) + B[bi + 1] = (B32[i] >> 8 & 0xff) + B[bi + 2] = (B32[i] >> 16 & 0xff) + B[bi + 3] = (B32[i] >> 24 & 0xff) + // B.writeInt32LE(B32[i], i*4) //<--- this is signficantly slower even in Node.js + } + } + + // naive approach... going back to loop unrolling may yield additional performance + function blockxor (S, Si, D, Di, len) { + for (var i = 0; i < len; i++) { + D[Di + i] ^= S[Si + i] + } + } +} + +function arraycopy (src, srcPos, dest, destPos, length) { + if (Buffer.isBuffer(src) && Buffer.isBuffer(dest)) { + src.copy(dest, destPos, srcPos, srcPos + length) + } else { + while (length--) { + dest[destPos++] = src[srcPos++] + } + } +} + +module.exports = scrypt + +}).call(this,require("buffer").Buffer) +},{"buffer":84,"pbkdf2":247}],295:[function(require,module,exports){ +'use strict' +module.exports = require('./lib')(require('./lib/elliptic')) + +},{"./lib":299,"./lib/elliptic":298}],296:[function(require,module,exports){ +(function (Buffer){ +'use strict' +var toString = Object.prototype.toString + +// TypeError +exports.isArray = function (value, message) { + if (!Array.isArray(value)) throw TypeError(message) +} + +exports.isBoolean = function (value, message) { + if (toString.call(value) !== '[object Boolean]') throw TypeError(message) +} + +exports.isBuffer = function (value, message) { + if (!Buffer.isBuffer(value)) throw TypeError(message) +} + +exports.isFunction = function (value, message) { + if (toString.call(value) !== '[object Function]') throw TypeError(message) +} + +exports.isNumber = function (value, message) { + if (toString.call(value) !== '[object Number]') throw TypeError(message) +} + +exports.isObject = function (value, message) { + if (toString.call(value) !== '[object Object]') throw TypeError(message) +} + +// RangeError +exports.isBufferLength = function (buffer, length, message) { + if (buffer.length !== length) throw RangeError(message) +} + +exports.isBufferLength2 = function (buffer, length1, length2, message) { + if (buffer.length !== length1 && buffer.length !== length2) throw RangeError(message) +} + +exports.isLengthGTZero = function (value, message) { + if (value.length === 0) throw RangeError(message) +} + +exports.isNumberInInterval = function (number, x, y, message) { + if (number <= x || number >= y) throw RangeError(message) +} + +}).call(this,{"isBuffer":require("../../is-buffer/index.js")}) +},{"../../is-buffer/index.js":181}],297:[function(require,module,exports){ +'use strict' +var Buffer = require('safe-buffer').Buffer +var bip66 = require('bip66') + +var EC_PRIVKEY_EXPORT_DER_COMPRESSED = Buffer.from([ + // begin + 0x30, 0x81, 0xd3, 0x02, 0x01, 0x01, 0x04, 0x20, + // private key + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // middle + 0xa0, 0x81, 0x85, 0x30, 0x81, 0x82, 0x02, 0x01, 0x01, 0x30, 0x2c, 0x06, 0x07, 0x2a, 0x86, 0x48, + 0xcE, 0x3d, 0x01, 0x01, 0x02, 0x21, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfE, 0xff, 0xff, 0xfc, 0x2f, 0x30, 0x06, 0x04, 0x01, 0x00, 0x04, 0x01, 0x07, 0x04, + 0x21, 0x02, 0x79, 0xbE, 0x66, 0x7E, 0xf9, 0xdc, 0xbb, 0xac, 0x55, 0xa0, 0x62, 0x95, 0xcE, 0x87, + 0x0b, 0x07, 0x02, 0x9b, 0xfc, 0xdb, 0x2d, 0xcE, 0x28, 0xd9, 0x59, 0xf2, 0x81, 0x5b, 0x16, 0xf8, + 0x17, 0x98, 0x02, 0x21, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfE, 0xba, 0xaE, 0xdc, 0xE6, 0xaf, 0x48, 0xa0, 0x3b, 0xbf, 0xd2, 0x5E, + 0x8c, 0xd0, 0x36, 0x41, 0x41, 0x02, 0x01, 0x01, 0xa1, 0x24, 0x03, 0x22, 0x00, + // public key + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00 +]) + +var EC_PRIVKEY_EXPORT_DER_UNCOMPRESSED = Buffer.from([ + // begin + 0x30, 0x82, 0x01, 0x13, 0x02, 0x01, 0x01, 0x04, 0x20, + // private key + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // middle + 0xa0, 0x81, 0xa5, 0x30, 0x81, 0xa2, 0x02, 0x01, 0x01, 0x30, 0x2c, 0x06, 0x07, 0x2a, 0x86, 0x48, + 0xcE, 0x3d, 0x01, 0x01, 0x02, 0x21, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfE, 0xff, 0xff, 0xfc, 0x2f, 0x30, 0x06, 0x04, 0x01, 0x00, 0x04, 0x01, 0x07, 0x04, + 0x41, 0x04, 0x79, 0xbE, 0x66, 0x7E, 0xf9, 0xdc, 0xbb, 0xac, 0x55, 0xa0, 0x62, 0x95, 0xcE, 0x87, + 0x0b, 0x07, 0x02, 0x9b, 0xfc, 0xdb, 0x2d, 0xcE, 0x28, 0xd9, 0x59, 0xf2, 0x81, 0x5b, 0x16, 0xf8, + 0x17, 0x98, 0x48, 0x3a, 0xda, 0x77, 0x26, 0xa3, 0xc4, 0x65, 0x5d, 0xa4, 0xfb, 0xfc, 0x0E, 0x11, + 0x08, 0xa8, 0xfd, 0x17, 0xb4, 0x48, 0xa6, 0x85, 0x54, 0x19, 0x9c, 0x47, 0xd0, 0x8f, 0xfb, 0x10, + 0xd4, 0xb8, 0x02, 0x21, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfE, 0xba, 0xaE, 0xdc, 0xE6, 0xaf, 0x48, 0xa0, 0x3b, 0xbf, 0xd2, 0x5E, + 0x8c, 0xd0, 0x36, 0x41, 0x41, 0x02, 0x01, 0x01, 0xa1, 0x44, 0x03, 0x42, 0x00, + // public key + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00 +]) + +exports.privateKeyExport = function (privateKey, publicKey, compressed) { + var result = Buffer.from(compressed ? EC_PRIVKEY_EXPORT_DER_COMPRESSED : EC_PRIVKEY_EXPORT_DER_UNCOMPRESSED) + privateKey.copy(result, compressed ? 8 : 9) + publicKey.copy(result, compressed ? 181 : 214) + return result +} + +exports.privateKeyImport = function (privateKey) { + var length = privateKey.length + + // sequence header + var index = 0 + if (length < index + 1 || privateKey[index] !== 0x30) return + index += 1 + + // sequence length constructor + if (length < index + 1 || !(privateKey[index] & 0x80)) return + + var lenb = privateKey[index] & 0x7f + index += 1 + if (lenb < 1 || lenb > 2) return + if (length < index + lenb) return + + // sequence length + var len = privateKey[index + lenb - 1] | (lenb > 1 ? privateKey[index + lenb - 2] << 8 : 0) + index += lenb + if (length < index + len) return + + // sequence element 0: version number (=1) + if (length < index + 3 || + privateKey[index] !== 0x02 || + privateKey[index + 1] !== 0x01 || + privateKey[index + 2] !== 0x01) { + return + } + index += 3 + + // sequence element 1: octet string, up to 32 bytes + if (length < index + 2 || + privateKey[index] !== 0x04 || + privateKey[index + 1] > 0x20 || + length < index + 2 + privateKey[index + 1]) { + return + } + + return privateKey.slice(index + 2, index + 2 + privateKey[index + 1]) +} + +exports.signatureExport = function (sigObj) { + var r = Buffer.concat([Buffer.from([0]), sigObj.r]) + for (var lenR = 33, posR = 0; lenR > 1 && r[posR] === 0x00 && !(r[posR + 1] & 0x80); --lenR, ++posR); + + var s = Buffer.concat([Buffer.from([0]), sigObj.s]) + for (var lenS = 33, posS = 0; lenS > 1 && s[posS] === 0x00 && !(s[posS + 1] & 0x80); --lenS, ++posS); + + return bip66.encode(r.slice(posR), s.slice(posS)) +} + +exports.signatureImport = function (sig) { + var r = Buffer.alloc(32, 0) + var s = Buffer.alloc(32, 0) + + try { + var sigObj = bip66.decode(sig) + if (sigObj.r.length === 33 && sigObj.r[0] === 0x00) sigObj.r = sigObj.r.slice(1) + if (sigObj.r.length > 32) throw new Error('R length is too long') + if (sigObj.s.length === 33 && sigObj.s[0] === 0x00) sigObj.s = sigObj.s.slice(1) + if (sigObj.s.length > 32) throw new Error('S length is too long') + } catch (err) { + return + } + + sigObj.r.copy(r, 32 - sigObj.r.length) + sigObj.s.copy(s, 32 - sigObj.s.length) + + return { r: r, s: s } +} + +exports.signatureImportLax = function (sig) { + var r = Buffer.alloc(32, 0) + var s = Buffer.alloc(32, 0) + + var length = sig.length + var index = 0 + + // sequence tag byte + if (sig[index++] !== 0x30) return + + // sequence length byte + var lenbyte = sig[index++] + if (lenbyte & 0x80) { + index += lenbyte - 0x80 + if (index > length) return + } + + // sequence tag byte for r + if (sig[index++] !== 0x02) return + + // length for r + var rlen = sig[index++] + if (rlen & 0x80) { + lenbyte = rlen - 0x80 + if (index + lenbyte > length) return + for (; lenbyte > 0 && sig[index] === 0x00; index += 1, lenbyte -= 1); + for (rlen = 0; lenbyte > 0; index += 1, lenbyte -= 1) rlen = (rlen << 8) + sig[index] + } + if (rlen > length - index) return + var rindex = index + index += rlen + + // sequence tag byte for s + if (sig[index++] !== 0x02) return + + // length for s + var slen = sig[index++] + if (slen & 0x80) { + lenbyte = slen - 0x80 + if (index + lenbyte > length) return + for (; lenbyte > 0 && sig[index] === 0x00; index += 1, lenbyte -= 1); + for (slen = 0; lenbyte > 0; index += 1, lenbyte -= 1) slen = (slen << 8) + sig[index] + } + if (slen > length - index) return + var sindex = index + index += slen + + // ignore leading zeros in r + for (; rlen > 0 && sig[rindex] === 0x00; rlen -= 1, rindex += 1); + // copy r value + if (rlen > 32) return + var rvalue = sig.slice(rindex, rindex + rlen) + rvalue.copy(r, 32 - rvalue.length) + + // ignore leading zeros in s + for (; slen > 0 && sig[sindex] === 0x00; slen -= 1, sindex += 1); + // copy s value + if (slen > 32) return + var svalue = sig.slice(sindex, sindex + slen) + svalue.copy(s, 32 - svalue.length) + + return { r: r, s: s } +} + +},{"bip66":52,"safe-buffer":290}],298:[function(require,module,exports){ +'use strict' +var Buffer = require('safe-buffer').Buffer +var createHash = require('create-hash') +var BN = require('bn.js') +var EC = require('elliptic').ec + +var messages = require('../messages.json') + +var ec = new EC('secp256k1') +var ecparams = ec.curve + +function loadCompressedPublicKey (first, xBuffer) { + var x = new BN(xBuffer) + + // overflow + if (x.cmp(ecparams.p) >= 0) return null + x = x.toRed(ecparams.red) + + // compute corresponding Y + var y = x.redSqr().redIMul(x).redIAdd(ecparams.b).redSqrt() + if ((first === 0x03) !== y.isOdd()) y = y.redNeg() + + return ec.keyPair({ pub: { x: x, y: y } }) +} + +function loadUncompressedPublicKey (first, xBuffer, yBuffer) { + var x = new BN(xBuffer) + var y = new BN(yBuffer) + + // overflow + if (x.cmp(ecparams.p) >= 0 || y.cmp(ecparams.p) >= 0) return null + + x = x.toRed(ecparams.red) + y = y.toRed(ecparams.red) + + // is odd flag + if ((first === 0x06 || first === 0x07) && y.isOdd() !== (first === 0x07)) return null + + // x*x*x + b = y*y + var x3 = x.redSqr().redIMul(x) + if (!y.redSqr().redISub(x3.redIAdd(ecparams.b)).isZero()) return null + + return ec.keyPair({ pub: { x: x, y: y } }) +} + +function loadPublicKey (publicKey) { + var first = publicKey[0] + switch (first) { + case 0x02: + case 0x03: + if (publicKey.length !== 33) return null + return loadCompressedPublicKey(first, publicKey.slice(1, 33)) + case 0x04: + case 0x06: + case 0x07: + if (publicKey.length !== 65) return null + return loadUncompressedPublicKey(first, publicKey.slice(1, 33), publicKey.slice(33, 65)) + default: + return null + } +} + +exports.privateKeyVerify = function (privateKey) { + var bn = new BN(privateKey) + return bn.cmp(ecparams.n) < 0 && !bn.isZero() +} + +exports.privateKeyExport = function (privateKey, compressed) { + var d = new BN(privateKey) + if (d.cmp(ecparams.n) >= 0 || d.isZero()) throw new Error(messages.EC_PRIVATE_KEY_EXPORT_DER_FAIL) + + return Buffer.from(ec.keyFromPrivate(privateKey).getPublic(compressed, true)) +} + +exports.privateKeyNegate = function (privateKey) { + var bn = new BN(privateKey) + return bn.isZero() ? Buffer.alloc(32) : ecparams.n.sub(bn).umod(ecparams.n).toArrayLike(Buffer, 'be', 32) +} + +exports.privateKeyModInverse = function (privateKey) { + var bn = new BN(privateKey) + if (bn.cmp(ecparams.n) >= 0 || bn.isZero()) throw new Error(messages.EC_PRIVATE_KEY_RANGE_INVALID) + + return bn.invm(ecparams.n).toArrayLike(Buffer, 'be', 32) +} + +exports.privateKeyTweakAdd = function (privateKey, tweak) { + var bn = new BN(tweak) + if (bn.cmp(ecparams.n) >= 0) throw new Error(messages.EC_PRIVATE_KEY_TWEAK_ADD_FAIL) + + bn.iadd(new BN(privateKey)) + if (bn.cmp(ecparams.n) >= 0) bn.isub(ecparams.n) + if (bn.isZero()) throw new Error(messages.EC_PRIVATE_KEY_TWEAK_ADD_FAIL) + + return bn.toArrayLike(Buffer, 'be', 32) +} + +exports.privateKeyTweakMul = function (privateKey, tweak) { + var bn = new BN(tweak) + if (bn.cmp(ecparams.n) >= 0 || bn.isZero()) throw new Error(messages.EC_PRIVATE_KEY_TWEAK_MUL_FAIL) + + bn.imul(new BN(privateKey)) + if (bn.cmp(ecparams.n)) bn = bn.umod(ecparams.n) + + return bn.toArrayLike(Buffer, 'be', 32) +} + +exports.publicKeyCreate = function (privateKey, compressed) { + var d = new BN(privateKey) + if (d.cmp(ecparams.n) >= 0 || d.isZero()) throw new Error(messages.EC_PUBLIC_KEY_CREATE_FAIL) + + return Buffer.from(ec.keyFromPrivate(privateKey).getPublic(compressed, true)) +} + +exports.publicKeyConvert = function (publicKey, compressed) { + var pair = loadPublicKey(publicKey) + if (pair === null) throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL) + + return Buffer.from(pair.getPublic(compressed, true)) +} + +exports.publicKeyVerify = function (publicKey) { + return loadPublicKey(publicKey) !== null +} + +exports.publicKeyTweakAdd = function (publicKey, tweak, compressed) { + var pair = loadPublicKey(publicKey) + if (pair === null) throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL) + + tweak = new BN(tweak) + if (tweak.cmp(ecparams.n) >= 0) throw new Error(messages.EC_PUBLIC_KEY_TWEAK_ADD_FAIL) + + return Buffer.from(ecparams.g.mul(tweak).add(pair.pub).encode(true, compressed)) +} + +exports.publicKeyTweakMul = function (publicKey, tweak, compressed) { + var pair = loadPublicKey(publicKey) + if (pair === null) throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL) + + tweak = new BN(tweak) + if (tweak.cmp(ecparams.n) >= 0 || tweak.isZero()) throw new Error(messages.EC_PUBLIC_KEY_TWEAK_MUL_FAIL) + + return Buffer.from(pair.pub.mul(tweak).encode(true, compressed)) +} + +exports.publicKeyCombine = function (publicKeys, compressed) { + var pairs = new Array(publicKeys.length) + for (var i = 0; i < publicKeys.length; ++i) { + pairs[i] = loadPublicKey(publicKeys[i]) + if (pairs[i] === null) throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL) + } + + var point = pairs[0].pub + for (var j = 1; j < pairs.length; ++j) point = point.add(pairs[j].pub) + if (point.isInfinity()) throw new Error(messages.EC_PUBLIC_KEY_COMBINE_FAIL) + + return Buffer.from(point.encode(true, compressed)) +} + +exports.signatureNormalize = function (signature) { + var r = new BN(signature.slice(0, 32)) + var s = new BN(signature.slice(32, 64)) + if (r.cmp(ecparams.n) >= 0 || s.cmp(ecparams.n) >= 0) throw new Error(messages.ECDSA_SIGNATURE_PARSE_FAIL) + + var result = Buffer.from(signature) + if (s.cmp(ec.nh) === 1) ecparams.n.sub(s).toArrayLike(Buffer, 'be', 32).copy(result, 32) + + return result +} + +exports.signatureExport = function (signature) { + var r = signature.slice(0, 32) + var s = signature.slice(32, 64) + if (new BN(r).cmp(ecparams.n) >= 0 || new BN(s).cmp(ecparams.n) >= 0) throw new Error(messages.ECDSA_SIGNATURE_PARSE_FAIL) + + return { r: r, s: s } +} + +exports.signatureImport = function (sigObj) { + var r = new BN(sigObj.r) + if (r.cmp(ecparams.n) >= 0) r = new BN(0) + + var s = new BN(sigObj.s) + if (s.cmp(ecparams.n) >= 0) s = new BN(0) + + return Buffer.concat([ + r.toArrayLike(Buffer, 'be', 32), + s.toArrayLike(Buffer, 'be', 32) + ]) +} + +exports.sign = function (message, privateKey, noncefn, data) { + if (typeof noncefn === 'function') { + var getNonce = noncefn + noncefn = function (counter) { + var nonce = getNonce(message, privateKey, null, data, counter) + if (!Buffer.isBuffer(nonce) || nonce.length !== 32) throw new Error(messages.ECDSA_SIGN_FAIL) + + return new BN(nonce) + } + } + + var d = new BN(privateKey) + if (d.cmp(ecparams.n) >= 0 || d.isZero()) throw new Error(messages.ECDSA_SIGN_FAIL) + + var result = ec.sign(message, privateKey, { canonical: true, k: noncefn, pers: data }) + return { + signature: Buffer.concat([ + result.r.toArrayLike(Buffer, 'be', 32), + result.s.toArrayLike(Buffer, 'be', 32) + ]), + recovery: result.recoveryParam + } +} + +exports.verify = function (message, signature, publicKey) { + var sigObj = {r: signature.slice(0, 32), s: signature.slice(32, 64)} + + var sigr = new BN(sigObj.r) + var sigs = new BN(sigObj.s) + if (sigr.cmp(ecparams.n) >= 0 || sigs.cmp(ecparams.n) >= 0) throw new Error(messages.ECDSA_SIGNATURE_PARSE_FAIL) + if (sigs.cmp(ec.nh) === 1 || sigr.isZero() || sigs.isZero()) return false + + var pair = loadPublicKey(publicKey) + if (pair === null) throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL) + + return ec.verify(message, sigObj, {x: pair.pub.x, y: pair.pub.y}) +} + +exports.recover = function (message, signature, recovery, compressed) { + var sigObj = {r: signature.slice(0, 32), s: signature.slice(32, 64)} + + var sigr = new BN(sigObj.r) + var sigs = new BN(sigObj.s) + if (sigr.cmp(ecparams.n) >= 0 || sigs.cmp(ecparams.n) >= 0) throw new Error(messages.ECDSA_SIGNATURE_PARSE_FAIL) + + try { + if (sigr.isZero() || sigs.isZero()) throw new Error() + + var point = ec.recoverPubKey(message, sigObj, recovery) + return Buffer.from(point.encode(true, compressed)) + } catch (err) { + throw new Error(messages.ECDSA_RECOVER_FAIL) + } +} + +exports.ecdh = function (publicKey, privateKey) { + var shared = exports.ecdhUnsafe(publicKey, privateKey, true) + return createHash('sha256').update(shared).digest() +} + +exports.ecdhUnsafe = function (publicKey, privateKey, compressed) { + var pair = loadPublicKey(publicKey) + if (pair === null) throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL) + + var scalar = new BN(privateKey) + if (scalar.cmp(ecparams.n) >= 0 || scalar.isZero()) throw new Error(messages.ECDH_FAIL) + + return Buffer.from(pair.pub.mul(scalar).encode(true, compressed)) +} + +},{"../messages.json":300,"bn.js":53,"create-hash":91,"elliptic":109,"safe-buffer":290}],299:[function(require,module,exports){ +'use strict' +var assert = require('./assert') +var der = require('./der') +var messages = require('./messages.json') + +function initCompressedValue (value, defaultValue) { + if (value === undefined) return defaultValue + + assert.isBoolean(value, messages.COMPRESSED_TYPE_INVALID) + return value +} + +module.exports = function (secp256k1) { + return { + privateKeyVerify: function (privateKey) { + assert.isBuffer(privateKey, messages.EC_PRIVATE_KEY_TYPE_INVALID) + return privateKey.length === 32 && secp256k1.privateKeyVerify(privateKey) + }, + + privateKeyExport: function (privateKey, compressed) { + assert.isBuffer(privateKey, messages.EC_PRIVATE_KEY_TYPE_INVALID) + assert.isBufferLength(privateKey, 32, messages.EC_PRIVATE_KEY_LENGTH_INVALID) + + compressed = initCompressedValue(compressed, true) + var publicKey = secp256k1.privateKeyExport(privateKey, compressed) + + return der.privateKeyExport(privateKey, publicKey, compressed) + }, + + privateKeyImport: function (privateKey) { + assert.isBuffer(privateKey, messages.EC_PRIVATE_KEY_TYPE_INVALID) + + privateKey = der.privateKeyImport(privateKey) + if (privateKey && privateKey.length === 32 && secp256k1.privateKeyVerify(privateKey)) return privateKey + + throw new Error(messages.EC_PRIVATE_KEY_IMPORT_DER_FAIL) + }, + + privateKeyNegate: function (privateKey) { + assert.isBuffer(privateKey, messages.EC_PRIVATE_KEY_TYPE_INVALID) + assert.isBufferLength(privateKey, 32, messages.EC_PRIVATE_KEY_LENGTH_INVALID) + + return secp256k1.privateKeyNegate(privateKey) + }, + + privateKeyModInverse: function (privateKey) { + assert.isBuffer(privateKey, messages.EC_PRIVATE_KEY_TYPE_INVALID) + assert.isBufferLength(privateKey, 32, messages.EC_PRIVATE_KEY_LENGTH_INVALID) + + return secp256k1.privateKeyModInverse(privateKey) + }, + + privateKeyTweakAdd: function (privateKey, tweak) { + assert.isBuffer(privateKey, messages.EC_PRIVATE_KEY_TYPE_INVALID) + assert.isBufferLength(privateKey, 32, messages.EC_PRIVATE_KEY_LENGTH_INVALID) + + assert.isBuffer(tweak, messages.TWEAK_TYPE_INVALID) + assert.isBufferLength(tweak, 32, messages.TWEAK_LENGTH_INVALID) + + return secp256k1.privateKeyTweakAdd(privateKey, tweak) + }, + + privateKeyTweakMul: function (privateKey, tweak) { + assert.isBuffer(privateKey, messages.EC_PRIVATE_KEY_TYPE_INVALID) + assert.isBufferLength(privateKey, 32, messages.EC_PRIVATE_KEY_LENGTH_INVALID) + + assert.isBuffer(tweak, messages.TWEAK_TYPE_INVALID) + assert.isBufferLength(tweak, 32, messages.TWEAK_LENGTH_INVALID) + + return secp256k1.privateKeyTweakMul(privateKey, tweak) + }, + + publicKeyCreate: function (privateKey, compressed) { + assert.isBuffer(privateKey, messages.EC_PRIVATE_KEY_TYPE_INVALID) + assert.isBufferLength(privateKey, 32, messages.EC_PRIVATE_KEY_LENGTH_INVALID) + + compressed = initCompressedValue(compressed, true) + + return secp256k1.publicKeyCreate(privateKey, compressed) + }, + + publicKeyConvert: function (publicKey, compressed) { + assert.isBuffer(publicKey, messages.EC_PUBLIC_KEY_TYPE_INVALID) + assert.isBufferLength2(publicKey, 33, 65, messages.EC_PUBLIC_KEY_LENGTH_INVALID) + + compressed = initCompressedValue(compressed, true) + + return secp256k1.publicKeyConvert(publicKey, compressed) + }, + + publicKeyVerify: function (publicKey) { + assert.isBuffer(publicKey, messages.EC_PUBLIC_KEY_TYPE_INVALID) + return secp256k1.publicKeyVerify(publicKey) + }, + + publicKeyTweakAdd: function (publicKey, tweak, compressed) { + assert.isBuffer(publicKey, messages.EC_PUBLIC_KEY_TYPE_INVALID) + assert.isBufferLength2(publicKey, 33, 65, messages.EC_PUBLIC_KEY_LENGTH_INVALID) + + assert.isBuffer(tweak, messages.TWEAK_TYPE_INVALID) + assert.isBufferLength(tweak, 32, messages.TWEAK_LENGTH_INVALID) + + compressed = initCompressedValue(compressed, true) + + return secp256k1.publicKeyTweakAdd(publicKey, tweak, compressed) + }, + + publicKeyTweakMul: function (publicKey, tweak, compressed) { + assert.isBuffer(publicKey, messages.EC_PUBLIC_KEY_TYPE_INVALID) + assert.isBufferLength2(publicKey, 33, 65, messages.EC_PUBLIC_KEY_LENGTH_INVALID) + + assert.isBuffer(tweak, messages.TWEAK_TYPE_INVALID) + assert.isBufferLength(tweak, 32, messages.TWEAK_LENGTH_INVALID) + + compressed = initCompressedValue(compressed, true) + + return secp256k1.publicKeyTweakMul(publicKey, tweak, compressed) + }, + + publicKeyCombine: function (publicKeys, compressed) { + assert.isArray(publicKeys, messages.EC_PUBLIC_KEYS_TYPE_INVALID) + assert.isLengthGTZero(publicKeys, messages.EC_PUBLIC_KEYS_LENGTH_INVALID) + for (var i = 0; i < publicKeys.length; ++i) { + assert.isBuffer(publicKeys[i], messages.EC_PUBLIC_KEY_TYPE_INVALID) + assert.isBufferLength2(publicKeys[i], 33, 65, messages.EC_PUBLIC_KEY_LENGTH_INVALID) + } + + compressed = initCompressedValue(compressed, true) + + return secp256k1.publicKeyCombine(publicKeys, compressed) + }, + + signatureNormalize: function (signature) { + assert.isBuffer(signature, messages.ECDSA_SIGNATURE_TYPE_INVALID) + assert.isBufferLength(signature, 64, messages.ECDSA_SIGNATURE_LENGTH_INVALID) + + return secp256k1.signatureNormalize(signature) + }, + + signatureExport: function (signature) { + assert.isBuffer(signature, messages.ECDSA_SIGNATURE_TYPE_INVALID) + assert.isBufferLength(signature, 64, messages.ECDSA_SIGNATURE_LENGTH_INVALID) + + var sigObj = secp256k1.signatureExport(signature) + return der.signatureExport(sigObj) + }, + + signatureImport: function (sig) { + assert.isBuffer(sig, messages.ECDSA_SIGNATURE_TYPE_INVALID) + assert.isLengthGTZero(sig, messages.ECDSA_SIGNATURE_LENGTH_INVALID) + + var sigObj = der.signatureImport(sig) + if (sigObj) return secp256k1.signatureImport(sigObj) + + throw new Error(messages.ECDSA_SIGNATURE_PARSE_DER_FAIL) + }, + + signatureImportLax: function (sig) { + assert.isBuffer(sig, messages.ECDSA_SIGNATURE_TYPE_INVALID) + assert.isLengthGTZero(sig, messages.ECDSA_SIGNATURE_LENGTH_INVALID) + + var sigObj = der.signatureImportLax(sig) + if (sigObj) return secp256k1.signatureImport(sigObj) + + throw new Error(messages.ECDSA_SIGNATURE_PARSE_DER_FAIL) + }, + + sign: function (message, privateKey, options) { + assert.isBuffer(message, messages.MSG32_TYPE_INVALID) + assert.isBufferLength(message, 32, messages.MSG32_LENGTH_INVALID) + + assert.isBuffer(privateKey, messages.EC_PRIVATE_KEY_TYPE_INVALID) + assert.isBufferLength(privateKey, 32, messages.EC_PRIVATE_KEY_LENGTH_INVALID) + + var data = null + var noncefn = null + if (options !== undefined) { + assert.isObject(options, messages.OPTIONS_TYPE_INVALID) + + if (options.data !== undefined) { + assert.isBuffer(options.data, messages.OPTIONS_DATA_TYPE_INVALID) + assert.isBufferLength(options.data, 32, messages.OPTIONS_DATA_LENGTH_INVALID) + data = options.data + } + + if (options.noncefn !== undefined) { + assert.isFunction(options.noncefn, messages.OPTIONS_NONCEFN_TYPE_INVALID) + noncefn = options.noncefn + } + } + + return secp256k1.sign(message, privateKey, noncefn, data) + }, + + verify: function (message, signature, publicKey) { + assert.isBuffer(message, messages.MSG32_TYPE_INVALID) + assert.isBufferLength(message, 32, messages.MSG32_LENGTH_INVALID) + + assert.isBuffer(signature, messages.ECDSA_SIGNATURE_TYPE_INVALID) + assert.isBufferLength(signature, 64, messages.ECDSA_SIGNATURE_LENGTH_INVALID) + + assert.isBuffer(publicKey, messages.EC_PUBLIC_KEY_TYPE_INVALID) + assert.isBufferLength2(publicKey, 33, 65, messages.EC_PUBLIC_KEY_LENGTH_INVALID) + + return secp256k1.verify(message, signature, publicKey) + }, + + recover: function (message, signature, recovery, compressed) { + assert.isBuffer(message, messages.MSG32_TYPE_INVALID) + assert.isBufferLength(message, 32, messages.MSG32_LENGTH_INVALID) + + assert.isBuffer(signature, messages.ECDSA_SIGNATURE_TYPE_INVALID) + assert.isBufferLength(signature, 64, messages.ECDSA_SIGNATURE_LENGTH_INVALID) + + assert.isNumber(recovery, messages.RECOVERY_ID_TYPE_INVALID) + assert.isNumberInInterval(recovery, -1, 4, messages.RECOVERY_ID_VALUE_INVALID) + + compressed = initCompressedValue(compressed, true) + + return secp256k1.recover(message, signature, recovery, compressed) + }, + + ecdh: function (publicKey, privateKey) { + assert.isBuffer(publicKey, messages.EC_PUBLIC_KEY_TYPE_INVALID) + assert.isBufferLength2(publicKey, 33, 65, messages.EC_PUBLIC_KEY_LENGTH_INVALID) + + assert.isBuffer(privateKey, messages.EC_PRIVATE_KEY_TYPE_INVALID) + assert.isBufferLength(privateKey, 32, messages.EC_PRIVATE_KEY_LENGTH_INVALID) + + return secp256k1.ecdh(publicKey, privateKey) + }, + + ecdhUnsafe: function (publicKey, privateKey, compressed) { + assert.isBuffer(publicKey, messages.EC_PUBLIC_KEY_TYPE_INVALID) + assert.isBufferLength2(publicKey, 33, 65, messages.EC_PUBLIC_KEY_LENGTH_INVALID) + + assert.isBuffer(privateKey, messages.EC_PRIVATE_KEY_TYPE_INVALID) + assert.isBufferLength(privateKey, 32, messages.EC_PRIVATE_KEY_LENGTH_INVALID) + + compressed = initCompressedValue(compressed, true) + + return secp256k1.ecdhUnsafe(publicKey, privateKey, compressed) + } + } +} + +},{"./assert":296,"./der":297,"./messages.json":300}],300:[function(require,module,exports){ +module.exports={ + "COMPRESSED_TYPE_INVALID": "compressed should be a boolean", + "EC_PRIVATE_KEY_TYPE_INVALID": "private key should be a Buffer", + "EC_PRIVATE_KEY_LENGTH_INVALID": "private key length is invalid", + "EC_PRIVATE_KEY_RANGE_INVALID": "private key range is invalid", + "EC_PRIVATE_KEY_TWEAK_ADD_FAIL": "tweak out of range or resulting private key is invalid", + "EC_PRIVATE_KEY_TWEAK_MUL_FAIL": "tweak out of range", + "EC_PRIVATE_KEY_EXPORT_DER_FAIL": "couldn't export to DER format", + "EC_PRIVATE_KEY_IMPORT_DER_FAIL": "couldn't import from DER format", + "EC_PUBLIC_KEYS_TYPE_INVALID": "public keys should be an Array", + "EC_PUBLIC_KEYS_LENGTH_INVALID": "public keys Array should have at least 1 element", + "EC_PUBLIC_KEY_TYPE_INVALID": "public key should be a Buffer", + "EC_PUBLIC_KEY_LENGTH_INVALID": "public key length is invalid", + "EC_PUBLIC_KEY_PARSE_FAIL": "the public key could not be parsed or is invalid", + "EC_PUBLIC_KEY_CREATE_FAIL": "private was invalid, try again", + "EC_PUBLIC_KEY_TWEAK_ADD_FAIL": "tweak out of range or resulting public key is invalid", + "EC_PUBLIC_KEY_TWEAK_MUL_FAIL": "tweak out of range", + "EC_PUBLIC_KEY_COMBINE_FAIL": "the sum of the public keys is not valid", + "ECDH_FAIL": "scalar was invalid (zero or overflow)", + "ECDSA_SIGNATURE_TYPE_INVALID": "signature should be a Buffer", + "ECDSA_SIGNATURE_LENGTH_INVALID": "signature length is invalid", + "ECDSA_SIGNATURE_PARSE_FAIL": "couldn't parse signature", + "ECDSA_SIGNATURE_PARSE_DER_FAIL": "couldn't parse DER signature", + "ECDSA_SIGNATURE_SERIALIZE_DER_FAIL": "couldn't serialize signature to DER format", + "ECDSA_SIGN_FAIL": "nonce generation function failed or private key is invalid", + "ECDSA_RECOVER_FAIL": "couldn't recover public key from signature", + "MSG32_TYPE_INVALID": "message should be a Buffer", + "MSG32_LENGTH_INVALID": "message length is invalid", + "OPTIONS_TYPE_INVALID": "options should be an Object", + "OPTIONS_DATA_TYPE_INVALID": "options.data should be a Buffer", + "OPTIONS_DATA_LENGTH_INVALID": "options.data length is invalid", + "OPTIONS_NONCEFN_TYPE_INVALID": "options.noncefn should be a Function", + "RECOVERY_ID_TYPE_INVALID": "recovery should be a Number", + "RECOVERY_ID_VALUE_INVALID": "recovery should have value between -1 and 4", + "TWEAK_TYPE_INVALID": "tweak should be a Buffer", + "TWEAK_LENGTH_INVALID": "tweak length is invalid" +} + +},{}],301:[function(require,module,exports){ +(function (process){ +;(function(global) { + +'use strict'; + +var nextTick = function (fn) { setTimeout(fn, 0); } +if (typeof process != 'undefined' && process && typeof process.nextTick == 'function') { + // node.js and the like + nextTick = process.nextTick; +} + +function semaphore(capacity) { + var semaphore = { + capacity: capacity || 1, + current: 0, + queue: [], + firstHere: false, + + take: function() { + if (semaphore.firstHere === false) { + semaphore.current++; + semaphore.firstHere = true; + var isFirst = 1; + } else { + var isFirst = 0; + } + var item = { n: 1 }; + + if (typeof arguments[0] == 'function') { + item.task = arguments[0]; + } else { + item.n = arguments[0]; + } + + if (arguments.length >= 2) { + if (typeof arguments[1] == 'function') item.task = arguments[1]; + else item.n = arguments[1]; + } + + var task = item.task; + item.task = function() { task(semaphore.leave); }; + + if (semaphore.current + item.n - isFirst > semaphore.capacity) { + if (isFirst === 1) { + semaphore.current--; + semaphore.firstHere = false; + } + return semaphore.queue.push(item); + } + + semaphore.current += item.n - isFirst; + item.task(semaphore.leave); + if (isFirst === 1) semaphore.firstHere = false; + }, + + leave: function(n) { + n = n || 1; + + semaphore.current -= n; + + if (!semaphore.queue.length) { + if (semaphore.current < 0) { + throw new Error('leave called too many times.'); + } + + return; + } + + var item = semaphore.queue[0]; + + if (item.n + semaphore.current > semaphore.capacity) { + return; + } + + semaphore.queue.shift(); + semaphore.current += item.n; + + nextTick(item.task); + }, + + available: function(n) { + n = n || 1; + return(semaphore.current + n <= semaphore.capacity); + } + }; + + return semaphore; +}; + +if (typeof exports === 'object') { + // node export + module.exports = semaphore; +} else if (typeof define === 'function' && define.amd) { + // amd export + define(function () { + return semaphore; + }); +} else { + // browser global + global.semaphore = semaphore; +} +}(this)); + +}).call(this,require('_process')) +},{"_process":257}],302:[function(require,module,exports){ +'use strict'; +module.exports = typeof setImmediate === 'function' ? setImmediate : + function setImmediate() { + var args = [].slice.apply(arguments); + args.splice(1, 0, 0); + setTimeout.apply(null, args); + }; + +},{}],303:[function(require,module,exports){ +var Buffer = require('safe-buffer').Buffer + +// prototype class for hash functions +function Hash (blockSize, finalSize) { + this._block = Buffer.alloc(blockSize) + this._finalSize = finalSize + this._blockSize = blockSize + this._len = 0 +} + +Hash.prototype.update = function (data, enc) { + if (typeof data === 'string') { + enc = enc || 'utf8' + data = Buffer.from(data, enc) + } + + var block = this._block + var blockSize = this._blockSize + var length = data.length + var accum = this._len + + for (var offset = 0; offset < length;) { + var assigned = accum % blockSize + var remainder = Math.min(length - offset, blockSize - assigned) + + for (var i = 0; i < remainder; i++) { + block[assigned + i] = data[offset + i] + } + + accum += remainder + offset += remainder + + if ((accum % blockSize) === 0) { + this._update(block) + } + } + + this._len += length + return this +} + +Hash.prototype.digest = function (enc) { + var rem = this._len % this._blockSize + + this._block[rem] = 0x80 + + // zero (rem + 1) trailing bits, where (rem + 1) is the smallest + // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize + this._block.fill(0, rem + 1) + + if (rem >= this._finalSize) { + this._update(this._block) + this._block.fill(0) + } + + var bits = this._len * 8 + + // uint32 + if (bits <= 0xffffffff) { + this._block.writeUInt32BE(bits, this._blockSize - 4) + + // uint64 + } else { + var lowBits = (bits & 0xffffffff) >>> 0 + var highBits = (bits - lowBits) / 0x100000000 + + this._block.writeUInt32BE(highBits, this._blockSize - 8) + this._block.writeUInt32BE(lowBits, this._blockSize - 4) + } + + this._update(this._block) + var hash = this._hash() + + return enc ? hash.toString(enc) : hash +} + +Hash.prototype._update = function () { + throw new Error('_update must be implemented by subclass') +} + +module.exports = Hash + +},{"safe-buffer":290}],304:[function(require,module,exports){ +var exports = module.exports = function SHA (algorithm) { + algorithm = algorithm.toLowerCase() + + var Algorithm = exports[algorithm] + if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)') + + return new Algorithm() +} + +exports.sha = require('./sha') +exports.sha1 = require('./sha1') +exports.sha224 = require('./sha224') +exports.sha256 = require('./sha256') +exports.sha384 = require('./sha384') +exports.sha512 = require('./sha512') + +},{"./sha":305,"./sha1":306,"./sha224":307,"./sha256":308,"./sha384":309,"./sha512":310}],305:[function(require,module,exports){ +/* + * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined + * in FIPS PUB 180-1 + * This source code is derived from sha1.js of the same repository. + * The difference between SHA-0 and SHA-1 is just a bitwise rotate left + * operation was added. + */ + +var inherits = require('inherits') +var Hash = require('./hash') +var Buffer = require('safe-buffer').Buffer + +var K = [ + 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 +] + +var W = new Array(80) + +function Sha () { + this.init() + this._w = W + + Hash.call(this, 64, 56) +} + +inherits(Sha, Hash) + +Sha.prototype.init = function () { + this._a = 0x67452301 + this._b = 0xefcdab89 + this._c = 0x98badcfe + this._d = 0x10325476 + this._e = 0xc3d2e1f0 + + return this +} + +function rotl5 (num) { + return (num << 5) | (num >>> 27) +} + +function rotl30 (num) { + return (num << 30) | (num >>> 2) +} + +function ft (s, b, c, d) { + if (s === 0) return (b & c) | ((~b) & d) + if (s === 2) return (b & c) | (b & d) | (c & d) + return b ^ c ^ d +} + +Sha.prototype._update = function (M) { + var W = this._w + + var a = this._a | 0 + var b = this._b | 0 + var c = this._c | 0 + var d = this._d | 0 + var e = this._e | 0 + + for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) + for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16] + + for (var j = 0; j < 80; ++j) { + var s = ~~(j / 20) + var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 + + e = d + d = c + c = rotl30(b) + b = a + a = t + } + + this._a = (a + this._a) | 0 + this._b = (b + this._b) | 0 + this._c = (c + this._c) | 0 + this._d = (d + this._d) | 0 + this._e = (e + this._e) | 0 +} + +Sha.prototype._hash = function () { + var H = Buffer.allocUnsafe(20) + + H.writeInt32BE(this._a | 0, 0) + H.writeInt32BE(this._b | 0, 4) + H.writeInt32BE(this._c | 0, 8) + H.writeInt32BE(this._d | 0, 12) + H.writeInt32BE(this._e | 0, 16) + + return H +} + +module.exports = Sha + +},{"./hash":303,"inherits":180,"safe-buffer":290}],306:[function(require,module,exports){ +/* + * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined + * in FIPS PUB 180-1 + * Version 2.1a Copyright Paul Johnston 2000 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for details. + */ + +var inherits = require('inherits') +var Hash = require('./hash') +var Buffer = require('safe-buffer').Buffer + +var K = [ + 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 +] + +var W = new Array(80) + +function Sha1 () { + this.init() + this._w = W + + Hash.call(this, 64, 56) +} + +inherits(Sha1, Hash) + +Sha1.prototype.init = function () { + this._a = 0x67452301 + this._b = 0xefcdab89 + this._c = 0x98badcfe + this._d = 0x10325476 + this._e = 0xc3d2e1f0 + + return this +} + +function rotl1 (num) { + return (num << 1) | (num >>> 31) +} + +function rotl5 (num) { + return (num << 5) | (num >>> 27) +} + +function rotl30 (num) { + return (num << 30) | (num >>> 2) +} + +function ft (s, b, c, d) { + if (s === 0) return (b & c) | ((~b) & d) + if (s === 2) return (b & c) | (b & d) | (c & d) + return b ^ c ^ d +} + +Sha1.prototype._update = function (M) { + var W = this._w + + var a = this._a | 0 + var b = this._b | 0 + var c = this._c | 0 + var d = this._d | 0 + var e = this._e | 0 + + for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) + for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]) + + for (var j = 0; j < 80; ++j) { + var s = ~~(j / 20) + var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 + + e = d + d = c + c = rotl30(b) + b = a + a = t + } + + this._a = (a + this._a) | 0 + this._b = (b + this._b) | 0 + this._c = (c + this._c) | 0 + this._d = (d + this._d) | 0 + this._e = (e + this._e) | 0 +} + +Sha1.prototype._hash = function () { + var H = Buffer.allocUnsafe(20) + + H.writeInt32BE(this._a | 0, 0) + H.writeInt32BE(this._b | 0, 4) + H.writeInt32BE(this._c | 0, 8) + H.writeInt32BE(this._d | 0, 12) + H.writeInt32BE(this._e | 0, 16) + + return H +} + +module.exports = Sha1 + +},{"./hash":303,"inherits":180,"safe-buffer":290}],307:[function(require,module,exports){ +/** + * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined + * in FIPS 180-2 + * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * + */ + +var inherits = require('inherits') +var Sha256 = require('./sha256') +var Hash = require('./hash') +var Buffer = require('safe-buffer').Buffer + +var W = new Array(64) + +function Sha224 () { + this.init() + + this._w = W // new Array(64) + + Hash.call(this, 64, 56) +} + +inherits(Sha224, Sha256) + +Sha224.prototype.init = function () { + this._a = 0xc1059ed8 + this._b = 0x367cd507 + this._c = 0x3070dd17 + this._d = 0xf70e5939 + this._e = 0xffc00b31 + this._f = 0x68581511 + this._g = 0x64f98fa7 + this._h = 0xbefa4fa4 + + return this +} + +Sha224.prototype._hash = function () { + var H = Buffer.allocUnsafe(28) + + H.writeInt32BE(this._a, 0) + H.writeInt32BE(this._b, 4) + H.writeInt32BE(this._c, 8) + H.writeInt32BE(this._d, 12) + H.writeInt32BE(this._e, 16) + H.writeInt32BE(this._f, 20) + H.writeInt32BE(this._g, 24) + + return H +} + +module.exports = Sha224 + +},{"./hash":303,"./sha256":308,"inherits":180,"safe-buffer":290}],308:[function(require,module,exports){ +/** + * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined + * in FIPS 180-2 + * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * + */ + +var inherits = require('inherits') +var Hash = require('./hash') +var Buffer = require('safe-buffer').Buffer + +var K = [ + 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, + 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, + 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, + 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, + 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, + 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, + 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, + 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, + 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, + 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, + 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, + 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, + 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, + 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, + 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, + 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 +] + +var W = new Array(64) + +function Sha256 () { + this.init() + + this._w = W // new Array(64) + + Hash.call(this, 64, 56) +} + +inherits(Sha256, Hash) + +Sha256.prototype.init = function () { + this._a = 0x6a09e667 + this._b = 0xbb67ae85 + this._c = 0x3c6ef372 + this._d = 0xa54ff53a + this._e = 0x510e527f + this._f = 0x9b05688c + this._g = 0x1f83d9ab + this._h = 0x5be0cd19 + + return this +} + +function ch (x, y, z) { + return z ^ (x & (y ^ z)) +} + +function maj (x, y, z) { + return (x & y) | (z & (x | y)) +} + +function sigma0 (x) { + return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10) +} + +function sigma1 (x) { + return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7) +} + +function gamma0 (x) { + return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3) +} + +function gamma1 (x) { + return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10) +} + +Sha256.prototype._update = function (M) { + var W = this._w + + var a = this._a | 0 + var b = this._b | 0 + var c = this._c | 0 + var d = this._d | 0 + var e = this._e | 0 + var f = this._f | 0 + var g = this._g | 0 + var h = this._h | 0 + + for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) + for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0 + + for (var j = 0; j < 64; ++j) { + var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0 + var T2 = (sigma0(a) + maj(a, b, c)) | 0 + + h = g + g = f + f = e + e = (d + T1) | 0 + d = c + c = b + b = a + a = (T1 + T2) | 0 + } + + this._a = (a + this._a) | 0 + this._b = (b + this._b) | 0 + this._c = (c + this._c) | 0 + this._d = (d + this._d) | 0 + this._e = (e + this._e) | 0 + this._f = (f + this._f) | 0 + this._g = (g + this._g) | 0 + this._h = (h + this._h) | 0 +} + +Sha256.prototype._hash = function () { + var H = Buffer.allocUnsafe(32) + + H.writeInt32BE(this._a, 0) + H.writeInt32BE(this._b, 4) + H.writeInt32BE(this._c, 8) + H.writeInt32BE(this._d, 12) + H.writeInt32BE(this._e, 16) + H.writeInt32BE(this._f, 20) + H.writeInt32BE(this._g, 24) + H.writeInt32BE(this._h, 28) + + return H +} + +module.exports = Sha256 + +},{"./hash":303,"inherits":180,"safe-buffer":290}],309:[function(require,module,exports){ +var inherits = require('inherits') +var SHA512 = require('./sha512') +var Hash = require('./hash') +var Buffer = require('safe-buffer').Buffer + +var W = new Array(160) + +function Sha384 () { + this.init() + this._w = W + + Hash.call(this, 128, 112) +} + +inherits(Sha384, SHA512) + +Sha384.prototype.init = function () { + this._ah = 0xcbbb9d5d + this._bh = 0x629a292a + this._ch = 0x9159015a + this._dh = 0x152fecd8 + this._eh = 0x67332667 + this._fh = 0x8eb44a87 + this._gh = 0xdb0c2e0d + this._hh = 0x47b5481d + + this._al = 0xc1059ed8 + this._bl = 0x367cd507 + this._cl = 0x3070dd17 + this._dl = 0xf70e5939 + this._el = 0xffc00b31 + this._fl = 0x68581511 + this._gl = 0x64f98fa7 + this._hl = 0xbefa4fa4 + + return this +} + +Sha384.prototype._hash = function () { + var H = Buffer.allocUnsafe(48) + + function writeInt64BE (h, l, offset) { + H.writeInt32BE(h, offset) + H.writeInt32BE(l, offset + 4) + } + + writeInt64BE(this._ah, this._al, 0) + writeInt64BE(this._bh, this._bl, 8) + writeInt64BE(this._ch, this._cl, 16) + writeInt64BE(this._dh, this._dl, 24) + writeInt64BE(this._eh, this._el, 32) + writeInt64BE(this._fh, this._fl, 40) + + return H +} + +module.exports = Sha384 + +},{"./hash":303,"./sha512":310,"inherits":180,"safe-buffer":290}],310:[function(require,module,exports){ +var inherits = require('inherits') +var Hash = require('./hash') +var Buffer = require('safe-buffer').Buffer + +var K = [ + 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, + 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, + 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, + 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, + 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, + 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, + 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, + 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, + 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, + 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, + 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, + 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, + 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, + 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, + 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, + 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, + 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, + 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, + 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, + 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, + 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, + 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, + 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, + 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, + 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, + 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, + 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, + 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, + 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, + 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, + 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, + 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, + 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, + 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, + 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, + 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, + 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, + 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, + 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, + 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 +] + +var W = new Array(160) + +function Sha512 () { + this.init() + this._w = W + + Hash.call(this, 128, 112) +} + +inherits(Sha512, Hash) + +Sha512.prototype.init = function () { + this._ah = 0x6a09e667 + this._bh = 0xbb67ae85 + this._ch = 0x3c6ef372 + this._dh = 0xa54ff53a + this._eh = 0x510e527f + this._fh = 0x9b05688c + this._gh = 0x1f83d9ab + this._hh = 0x5be0cd19 + + this._al = 0xf3bcc908 + this._bl = 0x84caa73b + this._cl = 0xfe94f82b + this._dl = 0x5f1d36f1 + this._el = 0xade682d1 + this._fl = 0x2b3e6c1f + this._gl = 0xfb41bd6b + this._hl = 0x137e2179 + + return this +} + +function Ch (x, y, z) { + return z ^ (x & (y ^ z)) +} + +function maj (x, y, z) { + return (x & y) | (z & (x | y)) +} + +function sigma0 (x, xl) { + return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25) +} + +function sigma1 (x, xl) { + return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23) +} + +function Gamma0 (x, xl) { + return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7) +} + +function Gamma0l (x, xl) { + return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25) +} + +function Gamma1 (x, xl) { + return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6) +} + +function Gamma1l (x, xl) { + return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26) +} + +function getCarry (a, b) { + return (a >>> 0) < (b >>> 0) ? 1 : 0 +} + +Sha512.prototype._update = function (M) { + var W = this._w + + var ah = this._ah | 0 + var bh = this._bh | 0 + var ch = this._ch | 0 + var dh = this._dh | 0 + var eh = this._eh | 0 + var fh = this._fh | 0 + var gh = this._gh | 0 + var hh = this._hh | 0 + + var al = this._al | 0 + var bl = this._bl | 0 + var cl = this._cl | 0 + var dl = this._dl | 0 + var el = this._el | 0 + var fl = this._fl | 0 + var gl = this._gl | 0 + var hl = this._hl | 0 + + for (var i = 0; i < 32; i += 2) { + W[i] = M.readInt32BE(i * 4) + W[i + 1] = M.readInt32BE(i * 4 + 4) + } + for (; i < 160; i += 2) { + var xh = W[i - 15 * 2] + var xl = W[i - 15 * 2 + 1] + var gamma0 = Gamma0(xh, xl) + var gamma0l = Gamma0l(xl, xh) + + xh = W[i - 2 * 2] + xl = W[i - 2 * 2 + 1] + var gamma1 = Gamma1(xh, xl) + var gamma1l = Gamma1l(xl, xh) + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7h = W[i - 7 * 2] + var Wi7l = W[i - 7 * 2 + 1] + + var Wi16h = W[i - 16 * 2] + var Wi16l = W[i - 16 * 2 + 1] + + var Wil = (gamma0l + Wi7l) | 0 + var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0 + Wil = (Wil + gamma1l) | 0 + Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0 + Wil = (Wil + Wi16l) | 0 + Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0 + + W[i] = Wih + W[i + 1] = Wil + } + + for (var j = 0; j < 160; j += 2) { + Wih = W[j] + Wil = W[j + 1] + + var majh = maj(ah, bh, ch) + var majl = maj(al, bl, cl) + + var sigma0h = sigma0(ah, al) + var sigma0l = sigma0(al, ah) + var sigma1h = sigma1(eh, el) + var sigma1l = sigma1(el, eh) + + // t1 = h + sigma1 + ch + K[j] + W[j] + var Kih = K[j] + var Kil = K[j + 1] + + var chh = Ch(eh, fh, gh) + var chl = Ch(el, fl, gl) + + var t1l = (hl + sigma1l) | 0 + var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0 + t1l = (t1l + chl) | 0 + t1h = (t1h + chh + getCarry(t1l, chl)) | 0 + t1l = (t1l + Kil) | 0 + t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0 + t1l = (t1l + Wil) | 0 + t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0 + + // t2 = sigma0 + maj + var t2l = (sigma0l + majl) | 0 + var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0 + + hh = gh + hl = gl + gh = fh + gl = fl + fh = eh + fl = el + el = (dl + t1l) | 0 + eh = (dh + t1h + getCarry(el, dl)) | 0 + dh = ch + dl = cl + ch = bh + cl = bl + bh = ah + bl = al + al = (t1l + t2l) | 0 + ah = (t1h + t2h + getCarry(al, t1l)) | 0 + } + + this._al = (this._al + al) | 0 + this._bl = (this._bl + bl) | 0 + this._cl = (this._cl + cl) | 0 + this._dl = (this._dl + dl) | 0 + this._el = (this._el + el) | 0 + this._fl = (this._fl + fl) | 0 + this._gl = (this._gl + gl) | 0 + this._hl = (this._hl + hl) | 0 + + this._ah = (this._ah + ah + getCarry(this._al, al)) | 0 + this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0 + this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0 + this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0 + this._eh = (this._eh + eh + getCarry(this._el, el)) | 0 + this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0 + this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0 + this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0 +} + +Sha512.prototype._hash = function () { + var H = Buffer.allocUnsafe(64) + + function writeInt64BE (h, l, offset) { + H.writeInt32BE(h, offset) + H.writeInt32BE(l, offset + 4) + } + + writeInt64BE(this._ah, this._al, 0) + writeInt64BE(this._bh, this._bl, 8) + writeInt64BE(this._ch, this._cl, 16) + writeInt64BE(this._dh, this._dl, 24) + writeInt64BE(this._eh, this._el, 32) + writeInt64BE(this._fh, this._fl, 40) + writeInt64BE(this._gh, this._gl, 48) + writeInt64BE(this._hh, this._hl, 56) + + return H +} + +module.exports = Sha512 + +},{"./hash":303,"inherits":180,"safe-buffer":290}],311:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +module.exports = Stream; + +var EE = require('events').EventEmitter; +var inherits = require('inherits'); + +inherits(Stream, EE); +Stream.Readable = require('readable-stream/readable.js'); +Stream.Writable = require('readable-stream/writable.js'); +Stream.Duplex = require('readable-stream/duplex.js'); +Stream.Transform = require('readable-stream/transform.js'); +Stream.PassThrough = require('readable-stream/passthrough.js'); + +// Backwards-compat with node 0.4.x +Stream.Stream = Stream; + + + +// old-style streams. Note that the pipe method (the only relevant +// part of this class) is overridden in the Readable class. + +function Stream() { + EE.call(this); +} + +Stream.prototype.pipe = function(dest, options) { + var source = this; + + function ondata(chunk) { + if (dest.writable) { + if (false === dest.write(chunk) && source.pause) { + source.pause(); + } + } + } + + source.on('data', ondata); + + function ondrain() { + if (source.readable && source.resume) { + source.resume(); + } + } + + dest.on('drain', ondrain); + + // If the 'end' option is not supplied, dest.end() will be called when + // source gets the 'end' or 'close' events. Only dest.end() once. + if (!dest._isStdio && (!options || options.end !== false)) { + source.on('end', onend); + source.on('close', onclose); + } + + var didOnEnd = false; + function onend() { + if (didOnEnd) return; + didOnEnd = true; + + dest.end(); + } + + + function onclose() { + if (didOnEnd) return; + didOnEnd = true; + + if (typeof dest.destroy === 'function') dest.destroy(); + } + + // don't leave dangling pipes when there are errors. + function onerror(er) { + cleanup(); + if (EE.listenerCount(this, 'error') === 0) { + throw er; // Unhandled stream error in pipe. + } + } + + source.on('error', onerror); + dest.on('error', onerror); + + // remove all the event listeners that were added. + function cleanup() { + source.removeListener('data', ondata); + dest.removeListener('drain', ondrain); + + source.removeListener('end', onend); + source.removeListener('close', onclose); + + source.removeListener('error', onerror); + dest.removeListener('error', onerror); + + source.removeListener('end', cleanup); + source.removeListener('close', cleanup); + + dest.removeListener('close', cleanup); + } + + source.on('end', cleanup); + source.on('close', cleanup); + + dest.on('close', cleanup); + + dest.emit('pipe', source); + + // Allow for unix-like usage: A.pipe(B).pipe(C) + return dest; +}; + +},{"events":157,"inherits":180,"readable-stream/duplex.js":275,"readable-stream/passthrough.js":284,"readable-stream/readable.js":285,"readable-stream/transform.js":286,"readable-stream/writable.js":287}],312:[function(require,module,exports){ +(function (global){ +var ClientRequest = require('./lib/request') +var IncomingMessage = require('./lib/response') +var extend = require('xtend') +var statusCodes = require('builtin-status-codes') +var url = require('url') + +var http = exports + +http.request = function (opts, cb) { + if (typeof opts === 'string') + opts = url.parse(opts) + else + opts = extend(opts) + + // Normally, the page is loaded from http or https, so not specifying a protocol + // will result in a (valid) protocol-relative url. However, this won't work if + // the protocol is something else, like 'file:' + var defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : '' + + var protocol = opts.protocol || defaultProtocol + var host = opts.hostname || opts.host + var port = opts.port + var path = opts.path || '/' + + // Necessary for IPv6 addresses + if (host && host.indexOf(':') !== -1) + host = '[' + host + ']' + + // This may be a relative url. The browser should always be able to interpret it correctly. + opts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path + opts.method = (opts.method || 'GET').toUpperCase() + opts.headers = opts.headers || {} + + // Also valid opts.auth, opts.mode + + var req = new ClientRequest(opts) + if (cb) + req.on('response', cb) + return req +} + +http.get = function get (opts, cb) { + var req = http.request(opts, cb) + req.end() + return req +} + +http.ClientRequest = ClientRequest +http.IncomingMessage = IncomingMessage + +http.Agent = function () {} +http.Agent.defaultMaxSockets = 4 + +http.STATUS_CODES = statusCodes + +http.METHODS = [ + 'CHECKOUT', + 'CONNECT', + 'COPY', + 'DELETE', + 'GET', + 'HEAD', + 'LOCK', + 'M-SEARCH', + 'MERGE', + 'MKACTIVITY', + 'MKCOL', + 'MOVE', + 'NOTIFY', + 'OPTIONS', + 'PATCH', + 'POST', + 'PROPFIND', + 'PROPPATCH', + 'PURGE', + 'PUT', + 'REPORT', + 'SEARCH', + 'SUBSCRIBE', + 'TRACE', + 'UNLOCK', + 'UNSUBSCRIBE' +] +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./lib/request":314,"./lib/response":315,"builtin-status-codes":85,"url":327,"xtend":423}],313:[function(require,module,exports){ +(function (global){ +exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream) + +exports.writableStream = isFunction(global.WritableStream) + +exports.abortController = isFunction(global.AbortController) + +exports.blobConstructor = false +try { + new Blob([new ArrayBuffer(1)]) + exports.blobConstructor = true +} catch (e) {} + +// The xhr request to example.com may violate some restrictive CSP configurations, +// so if we're running in a browser that supports `fetch`, avoid calling getXHR() +// and assume support for certain features below. +var xhr +function getXHR () { + // Cache the xhr value + if (xhr !== undefined) return xhr + + if (global.XMLHttpRequest) { + xhr = new global.XMLHttpRequest() + // If XDomainRequest is available (ie only, where xhr might not work + // cross domain), use the page location. Otherwise use example.com + // Note: this doesn't actually make an http request. + try { + xhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com') + } catch(e) { + xhr = null + } + } else { + // Service workers don't have XHR + xhr = null + } + return xhr +} + +function checkTypeSupport (type) { + var xhr = getXHR() + if (!xhr) return false + try { + xhr.responseType = type + return xhr.responseType === type + } catch (e) {} + return false +} + +// For some strange reason, Safari 7.0 reports typeof global.ArrayBuffer === 'object'. +// Safari 7.1 appears to have fixed this bug. +var haveArrayBuffer = typeof global.ArrayBuffer !== 'undefined' +var haveSlice = haveArrayBuffer && isFunction(global.ArrayBuffer.prototype.slice) + +// If fetch is supported, then arraybuffer will be supported too. Skip calling +// checkTypeSupport(), since that calls getXHR(). +exports.arraybuffer = exports.fetch || (haveArrayBuffer && checkTypeSupport('arraybuffer')) + +// These next two tests unavoidably show warnings in Chrome. Since fetch will always +// be used if it's available, just return false for these to avoid the warnings. +exports.msstream = !exports.fetch && haveSlice && checkTypeSupport('ms-stream') +exports.mozchunkedarraybuffer = !exports.fetch && haveArrayBuffer && + checkTypeSupport('moz-chunked-arraybuffer') + +// If fetch is supported, then overrideMimeType will be supported too. Skip calling +// getXHR(). +exports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false) + +exports.vbArray = isFunction(global.VBArray) + +function isFunction (value) { + return typeof value === 'function' +} + +xhr = null // Help gc + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],314:[function(require,module,exports){ +(function (process,global,Buffer){ +var capability = require('./capability') +var inherits = require('inherits') +var response = require('./response') +var stream = require('readable-stream') +var toArrayBuffer = require('to-arraybuffer') + +var IncomingMessage = response.IncomingMessage +var rStates = response.readyStates + +function decideMode (preferBinary, useFetch) { + if (capability.fetch && useFetch) { + return 'fetch' + } else if (capability.mozchunkedarraybuffer) { + return 'moz-chunked-arraybuffer' + } else if (capability.msstream) { + return 'ms-stream' + } else if (capability.arraybuffer && preferBinary) { + return 'arraybuffer' + } else if (capability.vbArray && preferBinary) { + return 'text:vbarray' + } else { + return 'text' + } +} + +var ClientRequest = module.exports = function (opts) { + var self = this + stream.Writable.call(self) + + self._opts = opts + self._body = [] + self._headers = {} + if (opts.auth) + self.setHeader('Authorization', 'Basic ' + new Buffer(opts.auth).toString('base64')) + Object.keys(opts.headers).forEach(function (name) { + self.setHeader(name, opts.headers[name]) + }) + + var preferBinary + var useFetch = true + if (opts.mode === 'disable-fetch' || ('requestTimeout' in opts && !capability.abortController)) { + // If the use of XHR should be preferred. Not typically needed. + useFetch = false + preferBinary = true + } else if (opts.mode === 'prefer-streaming') { + // If streaming is a high priority but binary compatibility and + // the accuracy of the 'content-type' header aren't + preferBinary = false + } else if (opts.mode === 'allow-wrong-content-type') { + // If streaming is more important than preserving the 'content-type' header + preferBinary = !capability.overrideMimeType + } else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') { + // Use binary if text streaming may corrupt data or the content-type header, or for speed + preferBinary = true + } else { + throw new Error('Invalid value for opts.mode') + } + self._mode = decideMode(preferBinary, useFetch) + + self.on('finish', function () { + self._onFinish() + }) +} + +inherits(ClientRequest, stream.Writable) + +ClientRequest.prototype.setHeader = function (name, value) { + var self = this + var lowerName = name.toLowerCase() + // This check is not necessary, but it prevents warnings from browsers about setting unsafe + // headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but + // http-browserify did it, so I will too. + if (unsafeHeaders.indexOf(lowerName) !== -1) + return + + self._headers[lowerName] = { + name: name, + value: value + } +} + +ClientRequest.prototype.getHeader = function (name) { + var header = this._headers[name.toLowerCase()] + if (header) + return header.value + return null +} + +ClientRequest.prototype.removeHeader = function (name) { + var self = this + delete self._headers[name.toLowerCase()] +} + +ClientRequest.prototype._onFinish = function () { + var self = this + + if (self._destroyed) + return + var opts = self._opts + + var headersObj = self._headers + var body = null + if (opts.method !== 'GET' && opts.method !== 'HEAD') { + if (capability.arraybuffer) { + body = toArrayBuffer(Buffer.concat(self._body)) + } else if (capability.blobConstructor) { + body = new global.Blob(self._body.map(function (buffer) { + return toArrayBuffer(buffer) + }), { + type: (headersObj['content-type'] || {}).value || '' + }) + } else { + // get utf8 string + body = Buffer.concat(self._body).toString() + } + } + + // create flattened list of headers + var headersList = [] + Object.keys(headersObj).forEach(function (keyName) { + var name = headersObj[keyName].name + var value = headersObj[keyName].value + if (Array.isArray(value)) { + value.forEach(function (v) { + headersList.push([name, v]) + }) + } else { + headersList.push([name, value]) + } + }) + + if (self._mode === 'fetch') { + var signal = null + if (capability.abortController) { + var controller = new AbortController() + signal = controller.signal + self._fetchAbortController = controller + + if ('requestTimeout' in opts && opts.requestTimeout !== 0) { + global.setTimeout(function () { + self.emit('requestTimeout') + if (self._fetchAbortController) + self._fetchAbortController.abort() + }, opts.requestTimeout) + } + } + + global.fetch(self._opts.url, { + method: self._opts.method, + headers: headersList, + body: body || undefined, + mode: 'cors', + credentials: opts.withCredentials ? 'include' : 'same-origin', + signal: signal + }).then(function (response) { + self._fetchResponse = response + self._connect() + }, function (reason) { + self.emit('error', reason) + }) + } else { + var xhr = self._xhr = new global.XMLHttpRequest() + try { + xhr.open(self._opts.method, self._opts.url, true) + } catch (err) { + process.nextTick(function () { + self.emit('error', err) + }) + return + } + + // Can't set responseType on really old browsers + if ('responseType' in xhr) + xhr.responseType = self._mode.split(':')[0] + + if ('withCredentials' in xhr) + xhr.withCredentials = !!opts.withCredentials + + if (self._mode === 'text' && 'overrideMimeType' in xhr) + xhr.overrideMimeType('text/plain; charset=x-user-defined') + + if ('requestTimeout' in opts) { + xhr.timeout = opts.requestTimeout + xhr.ontimeout = function () { + self.emit('requestTimeout') + } + } + + headersList.forEach(function (header) { + xhr.setRequestHeader(header[0], header[1]) + }) + + self._response = null + xhr.onreadystatechange = function () { + switch (xhr.readyState) { + case rStates.LOADING: + case rStates.DONE: + self._onXHRProgress() + break + } + } + // Necessary for streaming in Firefox, since xhr.response is ONLY defined + // in onprogress, not in onreadystatechange with xhr.readyState = 3 + if (self._mode === 'moz-chunked-arraybuffer') { + xhr.onprogress = function () { + self._onXHRProgress() + } + } + + xhr.onerror = function () { + if (self._destroyed) + return + self.emit('error', new Error('XHR error')) + } + + try { + xhr.send(body) + } catch (err) { + process.nextTick(function () { + self.emit('error', err) + }) + return + } + } +} + +/** + * Checks if xhr.status is readable and non-zero, indicating no error. + * Even though the spec says it should be available in readyState 3, + * accessing it throws an exception in IE8 + */ +function statusValid (xhr) { + try { + var status = xhr.status + return (status !== null && status !== 0) + } catch (e) { + return false + } +} + +ClientRequest.prototype._onXHRProgress = function () { + var self = this + + if (!statusValid(self._xhr) || self._destroyed) + return + + if (!self._response) + self._connect() + + self._response._onXHRProgress() +} + +ClientRequest.prototype._connect = function () { + var self = this + + if (self._destroyed) + return + + self._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode) + self._response.on('error', function(err) { + self.emit('error', err) + }) + + self.emit('response', self._response) +} + +ClientRequest.prototype._write = function (chunk, encoding, cb) { + var self = this + + self._body.push(chunk) + cb() +} + +ClientRequest.prototype.abort = ClientRequest.prototype.destroy = function () { + var self = this + self._destroyed = true + if (self._response) + self._response._destroyed = true + if (self._xhr) + self._xhr.abort() + else if (self._fetchAbortController) + self._fetchAbortController.abort() +} + +ClientRequest.prototype.end = function (data, encoding, cb) { + var self = this + if (typeof data === 'function') { + cb = data + data = undefined + } + + stream.Writable.prototype.end.call(self, data, encoding, cb) +} + +ClientRequest.prototype.flushHeaders = function () {} +ClientRequest.prototype.setTimeout = function () {} +ClientRequest.prototype.setNoDelay = function () {} +ClientRequest.prototype.setSocketKeepAlive = function () {} + +// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method +var unsafeHeaders = [ + 'accept-charset', + 'accept-encoding', + 'access-control-request-headers', + 'access-control-request-method', + 'connection', + 'content-length', + 'cookie', + 'cookie2', + 'date', + 'dnt', + 'expect', + 'host', + 'keep-alive', + 'origin', + 'referer', + 'te', + 'trailer', + 'transfer-encoding', + 'upgrade', + 'user-agent', + 'via' +] + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) +},{"./capability":313,"./response":315,"_process":257,"buffer":84,"inherits":180,"readable-stream":285,"to-arraybuffer":323}],315:[function(require,module,exports){ +(function (process,global,Buffer){ +var capability = require('./capability') +var inherits = require('inherits') +var stream = require('readable-stream') + +var rStates = exports.readyStates = { + UNSENT: 0, + OPENED: 1, + HEADERS_RECEIVED: 2, + LOADING: 3, + DONE: 4 +} + +var IncomingMessage = exports.IncomingMessage = function (xhr, response, mode) { + var self = this + stream.Readable.call(self) + + self._mode = mode + self.headers = {} + self.rawHeaders = [] + self.trailers = {} + self.rawTrailers = [] + + // Fake the 'close' event, but only once 'end' fires + self.on('end', function () { + // The nextTick is necessary to prevent the 'request' module from causing an infinite loop + process.nextTick(function () { + self.emit('close') + }) + }) + + if (mode === 'fetch') { + self._fetchResponse = response + + self.url = response.url + self.statusCode = response.status + self.statusMessage = response.statusText + + response.headers.forEach(function (header, key){ + self.headers[key.toLowerCase()] = header + self.rawHeaders.push(key, header) + }) + + if (capability.writableStream) { + var writable = new WritableStream({ + write: function (chunk) { + return new Promise(function (resolve, reject) { + if (self._destroyed) { + return + } else if(self.push(new Buffer(chunk))) { + resolve() + } else { + self._resumeFetch = resolve + } + }) + }, + close: function () { + if (!self._destroyed) + self.push(null) + }, + abort: function (err) { + if (!self._destroyed) + self.emit('error', err) + } + }) + + try { + response.body.pipeTo(writable) + return + } catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this + } + // fallback for when writableStream or pipeTo aren't available + var reader = response.body.getReader() + function read () { + reader.read().then(function (result) { + if (self._destroyed) + return + if (result.done) { + self.push(null) + return + } + self.push(new Buffer(result.value)) + read() + }).catch(function(err) { + if (!self._destroyed) + self.emit('error', err) + }) + } + read() + } else { + self._xhr = xhr + self._pos = 0 + + self.url = xhr.responseURL + self.statusCode = xhr.status + self.statusMessage = xhr.statusText + var headers = xhr.getAllResponseHeaders().split(/\r?\n/) + headers.forEach(function (header) { + var matches = header.match(/^([^:]+):\s*(.*)/) + if (matches) { + var key = matches[1].toLowerCase() + if (key === 'set-cookie') { + if (self.headers[key] === undefined) { + self.headers[key] = [] + } + self.headers[key].push(matches[2]) + } else if (self.headers[key] !== undefined) { + self.headers[key] += ', ' + matches[2] + } else { + self.headers[key] = matches[2] + } + self.rawHeaders.push(matches[1], matches[2]) + } + }) + + self._charset = 'x-user-defined' + if (!capability.overrideMimeType) { + var mimeType = self.rawHeaders['mime-type'] + if (mimeType) { + var charsetMatch = mimeType.match(/;\s*charset=([^;])(;|$)/) + if (charsetMatch) { + self._charset = charsetMatch[1].toLowerCase() + } + } + if (!self._charset) + self._charset = 'utf-8' // best guess + } + } +} + +inherits(IncomingMessage, stream.Readable) + +IncomingMessage.prototype._read = function () { + var self = this + + var resolve = self._resumeFetch + if (resolve) { + self._resumeFetch = null + resolve() + } +} + +IncomingMessage.prototype._onXHRProgress = function () { + var self = this + + var xhr = self._xhr + + var response = null + switch (self._mode) { + case 'text:vbarray': // For IE9 + if (xhr.readyState !== rStates.DONE) + break + try { + // This fails in IE8 + response = new global.VBArray(xhr.responseBody).toArray() + } catch (e) {} + if (response !== null) { + self.push(new Buffer(response)) + break + } + // Falls through in IE8 + case 'text': + try { // This will fail when readyState = 3 in IE9. Switch mode and wait for readyState = 4 + response = xhr.responseText + } catch (e) { + self._mode = 'text:vbarray' + break + } + if (response.length > self._pos) { + var newData = response.substr(self._pos) + if (self._charset === 'x-user-defined') { + var buffer = new Buffer(newData.length) + for (var i = 0; i < newData.length; i++) + buffer[i] = newData.charCodeAt(i) & 0xff + + self.push(buffer) + } else { + self.push(newData, self._charset) + } + self._pos = response.length + } + break + case 'arraybuffer': + if (xhr.readyState !== rStates.DONE || !xhr.response) + break + response = xhr.response + self.push(new Buffer(new Uint8Array(response))) + break + case 'moz-chunked-arraybuffer': // take whole + response = xhr.response + if (xhr.readyState !== rStates.LOADING || !response) + break + self.push(new Buffer(new Uint8Array(response))) + break + case 'ms-stream': + response = xhr.response + if (xhr.readyState !== rStates.LOADING) + break + var reader = new global.MSStreamReader() + reader.onprogress = function () { + if (reader.result.byteLength > self._pos) { + self.push(new Buffer(new Uint8Array(reader.result.slice(self._pos)))) + self._pos = reader.result.byteLength + } + } + reader.onload = function () { + self.push(null) + } + // reader.onerror = ??? // TODO: this + reader.readAsArrayBuffer(response) + break + } + + // The ms-stream case handles end separately in reader.onload() + if (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') { + self.push(null) + } +} + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) +},{"./capability":313,"_process":257,"buffer":84,"inherits":180,"readable-stream":285}],316:[function(require,module,exports){ +'use strict'; +module.exports = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); +}; + +},{}],317:[function(require,module,exports){ +'use strict'; + +var Buffer = require('safe-buffer').Buffer; + +var isEncoding = Buffer.isEncoding || function (encoding) { + encoding = '' + encoding; + switch (encoding && encoding.toLowerCase()) { + case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': + return true; + default: + return false; + } +}; + +function _normalizeEncoding(enc) { + if (!enc) return 'utf8'; + var retried; + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8'; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le'; + case 'latin1': + case 'binary': + return 'latin1'; + case 'base64': + case 'ascii': + case 'hex': + return enc; + default: + if (retried) return; // undefined + enc = ('' + enc).toLowerCase(); + retried = true; + } + } +}; + +// Do not cache `Buffer.isEncoding` when checking encoding names as some +// modules monkey-patch it to support additional encodings +function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); + return nenc || enc; +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. +exports.StringDecoder = StringDecoder; +function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case 'utf8': + this.fillLast = utf8FillLast; + nb = 4; + break; + case 'base64': + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer.allocUnsafe(nb); +} + +StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return ''; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === undefined) return ''; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ''; +}; + +StringDecoder.prototype.end = utf8End; + +// Returns only complete characters in a Buffer +StringDecoder.prototype.text = utf8Text; + +// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer +StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; +}; + +// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a +// continuation byte. +function utf8CheckByte(byte) { + if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; + return -1; +} + +// Checks at most 3 bytes at the end of a Buffer in order to detect an +// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) +// needed to complete the UTF-8 character (if applicable) are returned. +function utf8CheckIncomplete(self, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 1; + return nb; + } + if (--j < i) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0;else self.lastNeed = nb - 3; + } + return nb; + } + return 0; +} + +// Validates as many continuation bytes for a multi-byte UTF-8 character as +// needed or are available. If we see a non-continuation byte where we expect +// one, we "replace" the validated continuation bytes we've seen so far with +// UTF-8 replacement characters ('\ufffd'), to match v8's UTF-8 decoding +// behavior. The continuation byte check is included three times in the case +// where all of the continuation bytes for a character exist in the same buffer. +// It is also done this way as a slight performance increase instead of using a +// loop. +function utf8CheckExtraBytes(self, buf, p) { + if ((buf[0] & 0xC0) !== 0x80) { + self.lastNeed = 0; + return '\ufffd'.repeat(p); + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'.repeat(p + 1); + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'.repeat(p + 2); + } + } + } +} + +// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. +function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== undefined) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; +} + +// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a +// partial character, the character's bytes are buffered until the required +// number of bytes are available. +function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString('utf8', i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString('utf8', i, end); +} + +// For UTF-8, a replacement character for each buffered byte of a (partial) +// character needs to be added to the output. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'.repeat(this.lastTotal - this.lastNeed); + return r; +} + +// UTF-16LE typically needs two bytes per character, but even if we have an even +// number of bytes available, we need to check if we end on a leading/high +// surrogate. In that case, we need to wait for the next two bytes in order to +// decode the last character properly. +function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 0xD800 && c <= 0xDBFF) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString('utf16le', i, buf.length - 1); +} + +// For UTF-16LE we do not explicitly append special replacement characters if we +// end on a partial character, we simply let v8 handle that. +function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString('utf16le', 0, end); + } + return r; +} + +function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString('base64', i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString('base64', i, buf.length - n); +} + +function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); + return r; +} + +// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) +function simpleWrite(buf) { + return buf.toString(this.encoding); +} + +function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ''; +} +},{"safe-buffer":290}],318:[function(require,module,exports){ +var isHexPrefixed = require('is-hex-prefixed'); + +/** + * Removes '0x' from a given `String` is present + * @param {String} str the string value + * @return {String|Optional} a string by pass if necessary + */ +module.exports = function stripHexPrefix(str) { + if (typeof str !== 'string') { + return str; + } + + return isHexPrefixed(str) ? str.slice(2) : str; +} + +},{"is-hex-prefixed":185}],319:[function(require,module,exports){ +var unavailable = function unavailable() { + throw "This swarm.js function isn't available on the browser."; +}; + +var fsp = { readFile: unavailable }; +var files = { download: unavailable, safeDownloadArchived: unavailable, directoryTree: unavailable }; +var os = { platform: unavailable, arch: unavailable }; +var path = { join: unavailable, slice: unavailable }; +var child_process = { spawn: unavailable }; +var mimetype = { lookup: unavailable }; +var defaultArchives = {}; +var downloadUrl = null; +var request = require("xhr-request-promise"); +var bytes = require("eth-lib/lib/bytes"); +var hash = require("./swarm-hash.js"); +var pick = require("./pick.js"); +var swarm = require("./swarm"); + +module.exports = swarm({ + fsp: fsp, + files: files, + os: os, + path: path, + child_process: child_process, + defaultArchives: defaultArchives, + mimetype: mimetype, + request: request, + downloadUrl: downloadUrl, + bytes: bytes, + hash: hash, + pick: pick +}); +},{"./pick.js":320,"./swarm":322,"./swarm-hash.js":321,"eth-lib/lib/bytes":133,"xhr-request-promise":411}],320:[function(require,module,exports){ +var picker = function picker(type) { + return function () { + return new Promise(function (resolve, reject) { + var fileLoader = function fileLoader(e) { + var directory = {}; + var totalFiles = e.target.files.length; + var loadedFiles = 0; + [].map.call(e.target.files, function (file) { + var reader = new FileReader(); + reader.onload = function (e) { + var data = new Uint8Array(e.target.result); + if (type === "directory") { + var path = file.webkitRelativePath; + directory[path.slice(path.indexOf("/") + 1)] = { + type: "text/plain", + data: data + }; + if (++loadedFiles === totalFiles) resolve(directory); + } else if (type === "file") { + var _path = file.webkitRelativePath; + resolve({ "type": mimetype.lookup(_path), "data": data }); + } else { + resolve(data); + } + }; + reader.readAsArrayBuffer(file); + }); + }; + + var fileInput = void 0; + if (type === "directory") { + fileInput = document.createElement("input"); + fileInput.addEventListener("change", fileLoader); + fileInput.type = "file"; + fileInput.webkitdirectory = true; + fileInput.mozdirectory = true; + fileInput.msdirectory = true; + fileInput.odirectory = true; + fileInput.directory = true; + } else { + fileInput = document.createElement("input"); + fileInput.addEventListener("change", fileLoader); + fileInput.type = "file"; + }; + + var mouseEvent = document.createEvent("MouseEvents"); + mouseEvent.initEvent("click", true, false); + fileInput.dispatchEvent(mouseEvent); + }); + }; +}; + +module.exports = { + data: picker("data"), + file: picker("file"), + directory: picker("directory") +}; +},{}],321:[function(require,module,exports){ +// Thanks https://github.com/axic/swarmhash + +var keccak = require("eth-lib/lib/hash").keccak256; +var Bytes = require("eth-lib/lib/bytes"); + +var swarmHashBlock = function swarmHashBlock(length, data) { + var lengthEncoded = Bytes.reverse(Bytes.pad(6, Bytes.fromNumber(length))); + var bytes = Bytes.flatten([lengthEncoded, "0x0000", data]); + return keccak(bytes).slice(2); +}; + +// (Bytes | Uint8Array | String) -> String +var swarmHash = function swarmHash(data) { + if (typeof data === "string" && data.slice(0, 2) !== "0x") { + data = Bytes.fromString(data); + } else if (typeof data !== "string" && data.length !== undefined) { + data = Bytes.fromUint8Array(data); + } + + var length = Bytes.length(data); + + if (length <= 4096) { + return swarmHashBlock(length, data); + } + + var maxSize = 4096; + while (maxSize * (4096 / 32) < length) { + maxSize *= 4096 / 32; + } + + var innerNodes = []; + for (var i = 0; i < length; i += maxSize) { + var size = maxSize < length - i ? maxSize : length - i; + innerNodes.push(swarmHash(Bytes.slice(data, i, i + size))); + } + + return swarmHashBlock(length, Bytes.flatten(innerNodes)); +}; + +module.exports = swarmHash; +},{"eth-lib/lib/bytes":133,"eth-lib/lib/hash":134}],322:[function(require,module,exports){ +// TODO: this is a temporary fix to hide those libraries from the browser. A +// slightly better long-term solution would be to split this file into two, +// separating the functions that are used on Node.js from the functions that +// are used only on the browser. +module.exports = function (_ref) { + var fsp = _ref.fsp, + files = _ref.files, + os = _ref.os, + path = _ref.path, + child_process = _ref.child_process, + mimetype = _ref.mimetype, + defaultArchives = _ref.defaultArchives, + request = _ref.request, + downloadUrl = _ref.downloadUrl, + bytes = _ref.bytes, + hash = _ref.hash, + pick = _ref.pick; + + + // ∀ a . String -> JSON -> Map String a -o Map String a + // Inserts a key/val pair in an object impurely. + var impureInsert = function impureInsert(key) { + return function (val) { + return function (map) { + return map[key] = val, map; + }; + }; + }; + + // String -> JSON -> Map String JSON + // Merges an array of keys and an array of vals into an object. + var toMap = function toMap(keys) { + return function (vals) { + var map = {}; + for (var i = 0, l = keys.length; i < l; ++i) { + map[keys[i]] = vals[i]; + }return map; + }; + }; + + // ∀ a . Map String a -> Map String a -> Map String a + // Merges two maps into one. + var merge = function merge(a) { + return function (b) { + var map = {}; + for (var key in a) { + map[key] = a[key]; + }for (var _key in b) { + map[_key] = b[_key]; + }return map; + }; + }; + + // ∀ a . [a] -> [a] -> Bool + var equals = function equals(a) { + return function (b) { + if (a.length !== b.length) { + return false; + } else { + for (var i = 0, l = a.length; i < a; ++i) { + if (a[i] !== b[i]) return false; + } + } + return true; + }; + }; + + // String -> String -> String + var rawUrl = function rawUrl(swarmUrl) { + return function (hash) { + return swarmUrl + "/bzzr:/" + hash; + }; + }; + + // String -> String -> Promise Uint8Array + // Gets the raw contents of a Swarm hash address. + var downloadData = function downloadData(swarmUrl) { + return function (hash) { + return request(rawUrl(swarmUrl)(hash), { responseType: "arraybuffer" }).then(function (arrayBuffer) { + var uint8Array = new Uint8Array(arrayBuffer); + var error404 = [52, 48, 52, 32, 112, 97, 103, 101, 32, 110, 111, 116, 32, 102, 111, 117, 110, 100, 10]; + if (equals(uint8Array)(error404)) throw "Error 404."; + return uint8Array; + }); + }; + }; + + // type Entry = {"type": String, "hash": String} + // type File = {"type": String, "data": Uint8Array} + + // String -> String -> Promise (Map String Entry) + // Solves the manifest of a Swarm address recursively. + // Returns a map from full paths to entries. + var downloadEntries = function downloadEntries(swarmUrl) { + return function (hash) { + var search = function search(hash) { + return function (path) { + return function (routes) { + // Formats an entry to the Swarm.js type. + var format = function format(entry) { + return { + type: entry.contentType, + hash: entry.hash }; + }; + + // To download a single entry: + // if type is bzz-manifest, go deeper + // if not, add it to the routing table + var downloadEntry = function downloadEntry(entry) { + if (entry.path === undefined) { + return Promise.resolve(); + } else { + return entry.contentType === "application/bzz-manifest+json" ? search(entry.hash)(path + entry.path)(routes) : Promise.resolve(impureInsert(path + entry.path)(format(entry))(routes)); + } + }; + + // Downloads the initial manifest and then each entry. + return downloadData(swarmUrl)(hash).then(function (text) { + return JSON.parse(toString(text)).entries; + }).then(function (entries) { + return Promise.all(entries.map(downloadEntry)); + }).then(function () { + return routes; + }); + }; + }; + }; + + return search(hash)("")({}); + }; + }; + + // String -> String -> Promise (Map String String) + // Same as `downloadEntries`, but returns only hashes (no types). + var downloadRoutes = function downloadRoutes(swarmUrl) { + return function (hash) { + return downloadEntries(swarmUrl)(hash).then(function (entries) { + return toMap(Object.keys(entries))(Object.keys(entries).map(function (route) { + return entries[route].hash; + })); + }); + }; + }; + + // String -> String -> Promise (Map String File) + // Gets the entire directory tree in a Swarm address. + // Returns a promise mapping paths to file contents. + var downloadDirectory = function downloadDirectory(swarmUrl) { + return function (hash) { + return downloadEntries(swarmUrl)(hash).then(function (entries) { + var paths = Object.keys(entries); + var hashs = paths.map(function (path) { + return entries[path].hash; + }); + var types = paths.map(function (path) { + return entries[path].type; + }); + var datas = hashs.map(downloadData(swarmUrl)); + var files = function files(datas) { + return datas.map(function (data, i) { + return { type: types[i], data: data }; + }); + }; + return Promise.all(datas).then(function (datas) { + return toMap(paths)(files(datas)); + }); + }); + }; + }; + + // String -> String -> String -> Promise String + // Gets the raw contents of a Swarm hash address. + // Returns a promise with the downloaded file path. + var downloadDataToDisk = function downloadDataToDisk(swarmUrl) { + return function (hash) { + return function (filePath) { + return files.download(rawUrl(swarmUrl)(hash))(filePath); + }; + }; + }; + + // String -> String -> String -> Promise (Map String String) + // Gets the entire directory tree in a Swarm address. + // Returns a promise mapping paths to file contents. + var downloadDirectoryToDisk = function downloadDirectoryToDisk(swarmUrl) { + return function (hash) { + return function (dirPath) { + return downloadRoutes(swarmUrl)(hash).then(function (routingTable) { + var downloads = []; + for (var route in routingTable) { + if (route.length > 0) { + var filePath = path.join(dirPath, route); + downloads.push(downloadDataToDisk(swarmUrl)(routingTable[route])(filePath)); + }; + }; + return Promise.all(downloads).then(function () { + return dirPath; + }); + }); + }; + }; + }; + + // String -> Uint8Array -> Promise String + // Uploads raw data to Swarm. + // Returns a promise with the uploaded hash. + var uploadData = function uploadData(swarmUrl) { + return function (data) { + return request(swarmUrl + "/bzzr:/", { + body: typeof data === "string" ? fromString(data) : data, + method: "POST" }); + }; + }; + + // String -> String -> String -> File -> Promise String + // Uploads a file to the Swarm manifest at a given hash, under a specific + // route. Returns a promise containing the uploaded hash. + // FIXME: for some reasons Swarm-Gateways is sometimes returning + // error 404 (bad request), so we retry up to 3 times. Why? + var uploadToManifest = function uploadToManifest(swarmUrl) { + return function (hash) { + return function (route) { + return function (file) { + var attempt = function attempt(n) { + var slashRoute = route[0] === "/" ? route : "/" + route; + var url = swarmUrl + "/bzz:/" + hash + slashRoute; + var opt = { + method: "PUT", + headers: { "Content-Type": file.type }, + body: file.data }; + return request(url, opt).then(function (response) { + if (response.indexOf("error") !== -1) { + throw response; + } + return response; + }).catch(function (e) { + return n > 0 && attempt(n - 1); + }); + }; + return attempt(3); + }; + }; + }; + }; + + // String -> {type: String, data: Uint8Array} -> Promise String + var uploadFile = function uploadFile(swarmUrl) { + return function (file) { + return uploadDirectory(swarmUrl)({ "": file }); + }; + }; + + // String -> String -> Promise String + var uploadFileFromDisk = function uploadFileFromDisk(swarmUrl) { + return function (filePath) { + return fsp.readFile(filePath).then(function (data) { + return uploadFile(swarmUrl)({ type: mimetype.lookup(filePath), data: data }); + }); + }; + }; + + // String -> Map String File -> Promise String + // Uploads a directory to Swarm. The directory is + // represented as a map of routes and files. + // A default path is encoded by having a "" route. + var uploadDirectory = function uploadDirectory(swarmUrl) { + return function (directory) { + return uploadData(swarmUrl)("{}").then(function (hash) { + var uploadRoute = function uploadRoute(route) { + return function (hash) { + return uploadToManifest(swarmUrl)(hash)(route)(directory[route]); + }; + }; + var uploadToHash = function uploadToHash(hash, route) { + return hash.then(uploadRoute(route)); + }; + return Object.keys(directory).reduce(uploadToHash, Promise.resolve(hash)); + }); + }; + }; + + // String -> Promise String + var uploadDataFromDisk = function uploadDataFromDisk(swarmUrl) { + return function (filePath) { + return fsp.readFile(filePath).then(uploadData(swarmUrl)); + }; + }; + + // String -> Nullable String -> String -> Promise String + var uploadDirectoryFromDisk = function uploadDirectoryFromDisk(swarmUrl) { + return function (defaultPath) { + return function (dirPath) { + return files.directoryTree(dirPath).then(function (fullPaths) { + return Promise.all(fullPaths.map(function (path) { + return fsp.readFile(path); + })).then(function (datas) { + var paths = fullPaths.map(function (path) { + return path.slice(dirPath.length); + }); + var types = fullPaths.map(function (path) { + return mimetype.lookup(path) || "text/plain"; + }); + return toMap(paths)(datas.map(function (data, i) { + return { type: types[i], data: data }; + })); + }); + }).then(function (directory) { + return merge(defaultPath ? { "": directory[defaultPath] } : {})(directory); + }).then(uploadDirectory(swarmUrl)); + }; + }; + }; + + // String -> UploadInfo -> Promise String + // Simplified multi-type upload which calls the correct + // one based on the type of the argument given. + var _upload = function _upload(swarmUrl) { + return function (arg) { + // Upload raw data from browser + if (arg.pick === "data") { + return pick.data().then(uploadData(swarmUrl)); + + // Upload a file from browser + } else if (arg.pick === "file") { + return pick.file().then(uploadFile(swarmUrl)); + + // Upload a directory from browser + } else if (arg.pick === "directory") { + return pick.directory().then(uploadDirectory(swarmUrl)); + + // Upload directory/file from disk + } else if (arg.path) { + switch (arg.kind) { + case "data": + return uploadDataFromDisk(swarmUrl)(arg.path); + case "file": + return uploadFileFromDisk(swarmUrl)(arg.path); + case "directory": + return uploadDirectoryFromDisk(swarmUrl)(arg.defaultFile)(arg.path); + }; + + // Upload UTF-8 string or raw data (buffer) + } else if (arg.length || typeof arg === "string") { + return uploadData(swarmUrl)(arg); + + // Upload directory with JSON + } else if (arg instanceof Object) { + return uploadDirectory(swarmUrl)(arg); + } + + return Promise.reject(new Error("Bad arguments")); + }; + }; + + // String -> String -> Nullable String -> Promise (String | Uint8Array | Map String Uint8Array) + // Simplified multi-type download which calls the correct function based on + // the type of the argument given, and on whether the Swwarm address has a + // directory or a file. + var _download = function _download(swarmUrl) { + return function (hash) { + return function (path) { + return isDirectory(swarmUrl)(hash).then(function (isDir) { + if (isDir) { + return path ? downloadDirectoryToDisk(swarmUrl)(hash)(path) : downloadDirectory(swarmUrl)(hash); + } else { + return path ? downloadDataToDisk(swarmUrl)(hash)(path) : downloadData(swarmUrl)(hash); + } + }); + }; + }; + }; + + // String -> Promise String + // Downloads the Swarm binaries into a path. Returns a promise that only + // resolves when the exact Swarm file is there, and verified to be correct. + // If it was already there to begin with, skips the download. + var downloadBinary = function downloadBinary(path, archives) { + var system = os.platform().replace("win32", "windows") + "-" + (os.arch() === "x64" ? "amd64" : "386"); + var archive = (archives || defaultArchives)[system]; + var archiveUrl = downloadUrl + archive.archive + ".tar.gz"; + var archiveMD5 = archive.archiveMD5; + var binaryMD5 = archive.binaryMD5; + return files.safeDownloadArchived(archiveUrl)(archiveMD5)(binaryMD5)(path); + }; + + // type SwarmSetup = { + // account : String, + // password : String, + // dataDir : String, + // binPath : String, + // ensApi : String, + // onDownloadProgress : Number ~> (), + // archives : [{ + // archive: String, + // binaryMD5: String, + // archiveMD5: String + // }] + // } + + // SwarmSetup ~> Promise Process + // Starts the Swarm process. + var startProcess = function startProcess(swarmSetup) { + return new Promise(function (resolve, reject) { + var spawn = child_process.spawn; + + + var hasString = function hasString(str) { + return function (buffer) { + return ('' + buffer).indexOf(str) !== -1; + }; + }; + var account = swarmSetup.account, + password = swarmSetup.password, + dataDir = swarmSetup.dataDir, + ensApi = swarmSetup.ensApi, + privateKey = swarmSetup.privateKey; + + + var STARTUP_TIMEOUT_SECS = 3; + var WAITING_PASSWORD = 0; + var STARTING = 1; + var LISTENING = 2; + var PASSWORD_PROMPT_HOOK = "Passphrase"; + var LISTENING_HOOK = "Swarm http proxy started"; + + var state = WAITING_PASSWORD; + + var swarmProcess = spawn(swarmSetup.binPath, ['--bzzaccount', account || privateKey, '--datadir', dataDir, '--ens-api', ensApi]); + + var handleProcessOutput = function handleProcessOutput(data) { + if (state === WAITING_PASSWORD && hasString(PASSWORD_PROMPT_HOOK)(data)) { + setTimeout(function () { + state = STARTING; + swarmProcess.stdin.write(password + '\n'); + }, 500); + } else if (hasString(LISTENING_HOOK)(data)) { + state = LISTENING; + clearTimeout(timeout); + resolve(swarmProcess); + } + }; + + swarmProcess.stdout.on('data', handleProcessOutput); + swarmProcess.stderr.on('data', handleProcessOutput); + //swarmProcess.on('close', () => setTimeout(restart, 2000)); + + var restart = function restart() { + return startProcess(swarmSetup).then(resolve).catch(reject); + }; + var error = function error() { + return reject(new Error("Couldn't start swarm process.")); + }; + var timeout = setTimeout(error, 20000); + }); + }; + + // Process ~> Promise () + // Stops the Swarm process. + var stopProcess = function stopProcess(process) { + return new Promise(function (resolve, reject) { + process.stderr.removeAllListeners('data'); + process.stdout.removeAllListeners('data'); + process.stdin.removeAllListeners('error'); + process.removeAllListeners('error'); + process.removeAllListeners('exit'); + process.kill('SIGINT'); + + var killTimeout = setTimeout(function () { + return process.kill('SIGKILL'); + }, 8000); + + process.once('close', function () { + clearTimeout(killTimeout); + resolve(); + }); + }); + }; + + // SwarmSetup -> (SwarmAPI -> Promise ()) -> Promise () + // Receives a Swarm configuration object and a callback function. It then + // checks if a local Swarm node is running. If no local Swarm is found, it + // downloads the Swarm binaries to the dataDir (if not there), checksums, + // starts the Swarm process and calls the callback function with an API + // object using the local node. That callback must return a promise which + // will resolve when it is done using the API, so that this function can + // close the Swarm process properly. Returns a promise that resolves when the + // user is done with the API and the Swarm process is closed. + // TODO: check if Swarm process is already running (improve `isAvailable`) + var local = function local(swarmSetup) { + return function (useAPI) { + return _isAvailable("http://localhost:8500").then(function (isAvailable) { + return isAvailable ? useAPI(at("http://localhost:8500")).then(function () {}) : downloadBinary(swarmSetup.binPath, swarmSetup.archives).onData(function (data) { + return (swarmSetup.onProgress || function () {})(data.length); + }).then(function () { + return startProcess(swarmSetup); + }).then(function (process) { + return useAPI(at("http://localhost:8500")).then(function () { + return process; + }); + }).then(stopProcess); + }); + }; + }; + + // String ~> Promise Bool + // Returns true if Swarm is available on `url`. + // Perfoms a test upload to determine that. + // TODO: improve this? + var _isAvailable = function _isAvailable(swarmUrl) { + var testFile = "test"; + var testHash = "c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"; + return uploadData(swarmUrl)(testFile).then(function (hash) { + return hash === testHash; + }).catch(function () { + return false; + }); + }; + + // String -> String ~> Promise Bool + // Returns a Promise which is true if that Swarm address is a directory. + // Determines that by checking that it (i) is a JSON, (ii) has a .entries. + // TODO: improve this? + var isDirectory = function isDirectory(swarmUrl) { + return function (hash) { + return downloadData(swarmUrl)(hash).then(function (data) { + try { + return !!JSON.parse(toString(data)).entries; + } catch (e) { + return false; + } + }); + }; + }; + + // Uncurries a function; used to allow the f(x,y,z) style on exports. + var uncurry = function uncurry(f) { + return function (a, b, c, d, e) { + var p; + // Hardcoded because efficiency (`arguments` is very slow). + if (typeof a !== "undefined") p = f(a); + if (typeof b !== "undefined") p = f(b); + if (typeof c !== "undefined") p = f(c); + if (typeof d !== "undefined") p = f(d); + if (typeof e !== "undefined") p = f(e); + return p; + }; + }; + + // () -> Promise Bool + // Not sure how to mock Swarm to test it properly. Ideas? + var test = function test() { + return Promise.resolve(true); + }; + + // Uint8Array -> String + var toString = function toString(uint8Array) { + return bytes.toString(bytes.fromUint8Array(uint8Array)); + }; + + // String -> Uint8Array + var fromString = function fromString(string) { + return bytes.toUint8Array(bytes.fromString(string)); + }; + + // String -> SwarmAPI + // Fixes the `swarmUrl`, returning an API where you don't have to pass it. + var at = function at(swarmUrl) { + return { + download: function download(hash, path) { + return _download(swarmUrl)(hash)(path); + }, + downloadData: uncurry(downloadData(swarmUrl)), + downloadDataToDisk: uncurry(downloadDataToDisk(swarmUrl)), + downloadDirectory: uncurry(downloadDirectory(swarmUrl)), + downloadDirectoryToDisk: uncurry(downloadDirectoryToDisk(swarmUrl)), + downloadEntries: uncurry(downloadEntries(swarmUrl)), + downloadRoutes: uncurry(downloadRoutes(swarmUrl)), + isAvailable: function isAvailable() { + return _isAvailable(swarmUrl); + }, + upload: function upload(arg) { + return _upload(swarmUrl)(arg); + }, + uploadData: uncurry(uploadData(swarmUrl)), + uploadFile: uncurry(uploadFile(swarmUrl)), + uploadFileFromDisk: uncurry(uploadFile(swarmUrl)), + uploadDataFromDisk: uncurry(uploadDataFromDisk(swarmUrl)), + uploadDirectory: uncurry(uploadDirectory(swarmUrl)), + uploadDirectoryFromDisk: uncurry(uploadDirectoryFromDisk(swarmUrl)), + uploadToManifest: uncurry(uploadToManifest(swarmUrl)), + pick: pick, + hash: hash, + fromString: fromString, + toString: toString + }; + }; + + return { + at: at, + local: local, + download: _download, + downloadBinary: downloadBinary, + downloadData: downloadData, + downloadDataToDisk: downloadDataToDisk, + downloadDirectory: downloadDirectory, + downloadDirectoryToDisk: downloadDirectoryToDisk, + downloadEntries: downloadEntries, + downloadRoutes: downloadRoutes, + isAvailable: _isAvailable, + startProcess: startProcess, + stopProcess: stopProcess, + upload: _upload, + uploadData: uploadData, + uploadDataFromDisk: uploadDataFromDisk, + uploadFile: uploadFile, + uploadFileFromDisk: uploadFileFromDisk, + uploadDirectory: uploadDirectory, + uploadDirectoryFromDisk: uploadDirectoryFromDisk, + uploadToManifest: uploadToManifest, + pick: pick, + hash: hash, + fromString: fromString, + toString: toString + }; +}; + +},{}],323:[function(require,module,exports){ +var Buffer = require('buffer').Buffer + +module.exports = function (buf) { + // If the buffer is backed by a Uint8Array, a faster version will work + if (buf instanceof Uint8Array) { + // If the buffer isn't a subarray, return the underlying ArrayBuffer + if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) { + return buf.buffer + } else if (typeof buf.buffer.slice === 'function') { + // Otherwise we need to get a proper copy + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength) + } + } + + if (Buffer.isBuffer(buf)) { + // This is the slow version that will work with any Buffer + // implementation (even in old browsers) + var arrayCopy = new Uint8Array(buf.length) + var len = buf.length + for (var i = 0; i < len; i++) { + arrayCopy[i] = buf[i] + } + return arrayCopy.buffer + } else { + throw new Error('Argument must be a Buffer') + } +} + +},{"buffer":84}],324:[function(require,module,exports){ + +exports = module.exports = trim; + +function trim(str){ + return str.replace(/^\s*|\s*$/g, ''); +} + +exports.left = function(str){ + return str.replace(/^\s*/, ''); +}; + +exports.right = function(str){ + return str.replace(/\s*$/, ''); +}; + +},{}],325:[function(require,module,exports){ +// Underscore.js 1.8.3 +// http://underscorejs.org +// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +// Underscore may be freely distributed under the MIT license. + +(function() { + + // Baseline setup + // -------------- + + // Establish the root object, `window` in the browser, or `exports` on the server. + var root = this; + + // Save the previous value of the `_` variable. + var previousUnderscore = root._; + + // Save bytes in the minified (but not gzipped) version: + var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; + + // Create quick reference variables for speed access to core prototypes. + var + push = ArrayProto.push, + slice = ArrayProto.slice, + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; + + // All **ECMAScript 5** native function implementations that we hope to use + // are declared here. + var + nativeIsArray = Array.isArray, + nativeKeys = Object.keys, + nativeBind = FuncProto.bind, + nativeCreate = Object.create; + + // Naked function reference for surrogate-prototype-swapping. + var Ctor = function(){}; + + // Create a safe reference to the Underscore object for use below. + var _ = function(obj) { + if (obj instanceof _) return obj; + if (!(this instanceof _)) return new _(obj); + this._wrapped = obj; + }; + + // Export the Underscore object for **Node.js**, with + // backwards-compatibility for the old `require()` API. If we're in + // the browser, add `_` as a global object. + if (typeof exports !== 'undefined') { + if (typeof module !== 'undefined' && module.exports) { + exports = module.exports = _; + } + exports._ = _; + } else { + root._ = _; + } + + // Current version. + _.VERSION = '1.8.3'; + + // Internal function that returns an efficient (for current engines) version + // of the passed-in callback, to be repeatedly applied in other Underscore + // functions. + var optimizeCb = function(func, context, argCount) { + if (context === void 0) return func; + switch (argCount == null ? 3 : argCount) { + case 1: return function(value) { + return func.call(context, value); + }; + case 2: return function(value, other) { + return func.call(context, value, other); + }; + case 3: return function(value, index, collection) { + return func.call(context, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(context, accumulator, value, index, collection); + }; + } + return function() { + return func.apply(context, arguments); + }; + }; + + // A mostly-internal function to generate callbacks that can be applied + // to each element in a collection, returning the desired result — either + // identity, an arbitrary callback, a property matcher, or a property accessor. + var cb = function(value, context, argCount) { + if (value == null) return _.identity; + if (_.isFunction(value)) return optimizeCb(value, context, argCount); + if (_.isObject(value)) return _.matcher(value); + return _.property(value); + }; + _.iteratee = function(value, context) { + return cb(value, context, Infinity); + }; + + // An internal function for creating assigner functions. + var createAssigner = function(keysFunc, undefinedOnly) { + return function(obj) { + var length = arguments.length; + if (length < 2 || obj == null) return obj; + for (var index = 1; index < length; index++) { + var source = arguments[index], + keys = keysFunc(source), + l = keys.length; + for (var i = 0; i < l; i++) { + var key = keys[i]; + if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key]; + } + } + return obj; + }; + }; + + // An internal function for creating a new object that inherits from another. + var baseCreate = function(prototype) { + if (!_.isObject(prototype)) return {}; + if (nativeCreate) return nativeCreate(prototype); + Ctor.prototype = prototype; + var result = new Ctor; + Ctor.prototype = null; + return result; + }; + + var property = function(key) { + return function(obj) { + return obj == null ? void 0 : obj[key]; + }; + }; + + // Helper for collection methods to determine whether a collection + // should be iterated as an array or as an object + // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength + // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 + var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; + var getLength = property('length'); + var isArrayLike = function(collection) { + var length = getLength(collection); + return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; + }; + + // Collection Functions + // -------------------- + + // The cornerstone, an `each` implementation, aka `forEach`. + // Handles raw objects in addition to array-likes. Treats all + // sparse array-likes as if they were dense. + _.each = _.forEach = function(obj, iteratee, context) { + iteratee = optimizeCb(iteratee, context); + var i, length; + if (isArrayLike(obj)) { + for (i = 0, length = obj.length; i < length; i++) { + iteratee(obj[i], i, obj); + } + } else { + var keys = _.keys(obj); + for (i = 0, length = keys.length; i < length; i++) { + iteratee(obj[keys[i]], keys[i], obj); + } + } + return obj; + }; + + // Return the results of applying the iteratee to each element. + _.map = _.collect = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length, + results = Array(length); + for (var index = 0; index < length; index++) { + var currentKey = keys ? keys[index] : index; + results[index] = iteratee(obj[currentKey], currentKey, obj); + } + return results; + }; + + // Create a reducing function iterating left or right. + function createReduce(dir) { + // Optimized iterator function as using arguments.length + // in the main function will deoptimize the, see #1991. + function iterator(obj, iteratee, memo, keys, index, length) { + for (; index >= 0 && index < length; index += dir) { + var currentKey = keys ? keys[index] : index; + memo = iteratee(memo, obj[currentKey], currentKey, obj); + } + return memo; + } + + return function(obj, iteratee, memo, context) { + iteratee = optimizeCb(iteratee, context, 4); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length, + index = dir > 0 ? 0 : length - 1; + // Determine the initial value if none is provided. + if (arguments.length < 3) { + memo = obj[keys ? keys[index] : index]; + index += dir; + } + return iterator(obj, iteratee, memo, keys, index, length); + }; + } + + // **Reduce** builds up a single result from a list of values, aka `inject`, + // or `foldl`. + _.reduce = _.foldl = _.inject = createReduce(1); + + // The right-associative version of reduce, also known as `foldr`. + _.reduceRight = _.foldr = createReduce(-1); + + // Return the first value which passes a truth test. Aliased as `detect`. + _.find = _.detect = function(obj, predicate, context) { + var key; + if (isArrayLike(obj)) { + key = _.findIndex(obj, predicate, context); + } else { + key = _.findKey(obj, predicate, context); + } + if (key !== void 0 && key !== -1) return obj[key]; + }; + + // Return all the elements that pass a truth test. + // Aliased as `select`. + _.filter = _.select = function(obj, predicate, context) { + var results = []; + predicate = cb(predicate, context); + _.each(obj, function(value, index, list) { + if (predicate(value, index, list)) results.push(value); + }); + return results; + }; + + // Return all the elements for which a truth test fails. + _.reject = function(obj, predicate, context) { + return _.filter(obj, _.negate(cb(predicate)), context); + }; + + // Determine whether all of the elements match a truth test. + // Aliased as `all`. + _.every = _.all = function(obj, predicate, context) { + predicate = cb(predicate, context); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = keys ? keys[index] : index; + if (!predicate(obj[currentKey], currentKey, obj)) return false; + } + return true; + }; + + // Determine if at least one element in the object matches a truth test. + // Aliased as `any`. + _.some = _.any = function(obj, predicate, context) { + predicate = cb(predicate, context); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = keys ? keys[index] : index; + if (predicate(obj[currentKey], currentKey, obj)) return true; + } + return false; + }; + + // Determine if the array or object contains a given item (using `===`). + // Aliased as `includes` and `include`. + _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) { + if (!isArrayLike(obj)) obj = _.values(obj); + if (typeof fromIndex != 'number' || guard) fromIndex = 0; + return _.indexOf(obj, item, fromIndex) >= 0; + }; + + // Invoke a method (with arguments) on every item in a collection. + _.invoke = function(obj, method) { + var args = slice.call(arguments, 2); + var isFunc = _.isFunction(method); + return _.map(obj, function(value) { + var func = isFunc ? method : value[method]; + return func == null ? func : func.apply(value, args); + }); + }; + + // Convenience version of a common use case of `map`: fetching a property. + _.pluck = function(obj, key) { + return _.map(obj, _.property(key)); + }; + + // Convenience version of a common use case of `filter`: selecting only objects + // containing specific `key:value` pairs. + _.where = function(obj, attrs) { + return _.filter(obj, _.matcher(attrs)); + }; + + // Convenience version of a common use case of `find`: getting the first object + // containing specific `key:value` pairs. + _.findWhere = function(obj, attrs) { + return _.find(obj, _.matcher(attrs)); + }; + + // Return the maximum element (or element-based computation). + _.max = function(obj, iteratee, context) { + var result = -Infinity, lastComputed = -Infinity, + value, computed; + if (iteratee == null && obj != null) { + obj = isArrayLike(obj) ? obj : _.values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value > result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + _.each(obj, function(value, index, list) { + computed = iteratee(value, index, list); + if (computed > lastComputed || computed === -Infinity && result === -Infinity) { + result = value; + lastComputed = computed; + } + }); + } + return result; + }; + + // Return the minimum element (or element-based computation). + _.min = function(obj, iteratee, context) { + var result = Infinity, lastComputed = Infinity, + value, computed; + if (iteratee == null && obj != null) { + obj = isArrayLike(obj) ? obj : _.values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value < result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + _.each(obj, function(value, index, list) { + computed = iteratee(value, index, list); + if (computed < lastComputed || computed === Infinity && result === Infinity) { + result = value; + lastComputed = computed; + } + }); + } + return result; + }; + + // Shuffle a collection, using the modern version of the + // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). + _.shuffle = function(obj) { + var set = isArrayLike(obj) ? obj : _.values(obj); + var length = set.length; + var shuffled = Array(length); + for (var index = 0, rand; index < length; index++) { + rand = _.random(0, index); + if (rand !== index) shuffled[index] = shuffled[rand]; + shuffled[rand] = set[index]; + } + return shuffled; + }; + + // Sample **n** random values from a collection. + // If **n** is not specified, returns a single random element. + // The internal `guard` argument allows it to work with `map`. + _.sample = function(obj, n, guard) { + if (n == null || guard) { + if (!isArrayLike(obj)) obj = _.values(obj); + return obj[_.random(obj.length - 1)]; + } + return _.shuffle(obj).slice(0, Math.max(0, n)); + }; + + // Sort the object's values by a criterion produced by an iteratee. + _.sortBy = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); + return _.pluck(_.map(obj, function(value, index, list) { + return { + value: value, + index: index, + criteria: iteratee(value, index, list) + }; + }).sort(function(left, right) { + var a = left.criteria; + var b = right.criteria; + if (a !== b) { + if (a > b || a === void 0) return 1; + if (a < b || b === void 0) return -1; + } + return left.index - right.index; + }), 'value'); + }; + + // An internal function used for aggregate "group by" operations. + var group = function(behavior) { + return function(obj, iteratee, context) { + var result = {}; + iteratee = cb(iteratee, context); + _.each(obj, function(value, index) { + var key = iteratee(value, index, obj); + behavior(result, value, key); + }); + return result; + }; + }; + + // Groups the object's values by a criterion. Pass either a string attribute + // to group by, or a function that returns the criterion. + _.groupBy = group(function(result, value, key) { + if (_.has(result, key)) result[key].push(value); else result[key] = [value]; + }); + + // Indexes the object's values by a criterion, similar to `groupBy`, but for + // when you know that your index values will be unique. + _.indexBy = group(function(result, value, key) { + result[key] = value; + }); + + // Counts instances of an object that group by a certain criterion. Pass + // either a string attribute to count by, or a function that returns the + // criterion. + _.countBy = group(function(result, value, key) { + if (_.has(result, key)) result[key]++; else result[key] = 1; + }); + + // Safely create a real, live array from anything iterable. + _.toArray = function(obj) { + if (!obj) return []; + if (_.isArray(obj)) return slice.call(obj); + if (isArrayLike(obj)) return _.map(obj, _.identity); + return _.values(obj); + }; + + // Return the number of elements in an object. + _.size = function(obj) { + if (obj == null) return 0; + return isArrayLike(obj) ? obj.length : _.keys(obj).length; + }; + + // Split a collection into two arrays: one whose elements all satisfy the given + // predicate, and one whose elements all do not satisfy the predicate. + _.partition = function(obj, predicate, context) { + predicate = cb(predicate, context); + var pass = [], fail = []; + _.each(obj, function(value, key, obj) { + (predicate(value, key, obj) ? pass : fail).push(value); + }); + return [pass, fail]; + }; + + // Array Functions + // --------------- + + // Get the first element of an array. Passing **n** will return the first N + // values in the array. Aliased as `head` and `take`. The **guard** check + // allows it to work with `_.map`. + _.first = _.head = _.take = function(array, n, guard) { + if (array == null) return void 0; + if (n == null || guard) return array[0]; + return _.initial(array, array.length - n); + }; + + // Returns everything but the last entry of the array. Especially useful on + // the arguments object. Passing **n** will return all the values in + // the array, excluding the last N. + _.initial = function(array, n, guard) { + return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); + }; + + // Get the last element of an array. Passing **n** will return the last N + // values in the array. + _.last = function(array, n, guard) { + if (array == null) return void 0; + if (n == null || guard) return array[array.length - 1]; + return _.rest(array, Math.max(0, array.length - n)); + }; + + // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. + // Especially useful on the arguments object. Passing an **n** will return + // the rest N values in the array. + _.rest = _.tail = _.drop = function(array, n, guard) { + return slice.call(array, n == null || guard ? 1 : n); + }; + + // Trim out all falsy values from an array. + _.compact = function(array) { + return _.filter(array, _.identity); + }; + + // Internal implementation of a recursive `flatten` function. + var flatten = function(input, shallow, strict, startIndex) { + var output = [], idx = 0; + for (var i = startIndex || 0, length = getLength(input); i < length; i++) { + var value = input[i]; + if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) { + //flatten current level of array or arguments object + if (!shallow) value = flatten(value, shallow, strict); + var j = 0, len = value.length; + output.length += len; + while (j < len) { + output[idx++] = value[j++]; + } + } else if (!strict) { + output[idx++] = value; + } + } + return output; + }; + + // Flatten out an array, either recursively (by default), or just one level. + _.flatten = function(array, shallow) { + return flatten(array, shallow, false); + }; + + // Return a version of the array that does not contain the specified value(s). + _.without = function(array) { + return _.difference(array, slice.call(arguments, 1)); + }; + + // Produce a duplicate-free version of the array. If the array has already + // been sorted, you have the option of using a faster algorithm. + // Aliased as `unique`. + _.uniq = _.unique = function(array, isSorted, iteratee, context) { + if (!_.isBoolean(isSorted)) { + context = iteratee; + iteratee = isSorted; + isSorted = false; + } + if (iteratee != null) iteratee = cb(iteratee, context); + var result = []; + var seen = []; + for (var i = 0, length = getLength(array); i < length; i++) { + var value = array[i], + computed = iteratee ? iteratee(value, i, array) : value; + if (isSorted) { + if (!i || seen !== computed) result.push(value); + seen = computed; + } else if (iteratee) { + if (!_.contains(seen, computed)) { + seen.push(computed); + result.push(value); + } + } else if (!_.contains(result, value)) { + result.push(value); + } + } + return result; + }; + + // Produce an array that contains the union: each distinct element from all of + // the passed-in arrays. + _.union = function() { + return _.uniq(flatten(arguments, true, true)); + }; + + // Produce an array that contains every item shared between all the + // passed-in arrays. + _.intersection = function(array) { + var result = []; + var argsLength = arguments.length; + for (var i = 0, length = getLength(array); i < length; i++) { + var item = array[i]; + if (_.contains(result, item)) continue; + for (var j = 1; j < argsLength; j++) { + if (!_.contains(arguments[j], item)) break; + } + if (j === argsLength) result.push(item); + } + return result; + }; + + // Take the difference between one array and a number of other arrays. + // Only the elements present in just the first array will remain. + _.difference = function(array) { + var rest = flatten(arguments, true, true, 1); + return _.filter(array, function(value){ + return !_.contains(rest, value); + }); + }; + + // Zip together multiple lists into a single array -- elements that share + // an index go together. + _.zip = function() { + return _.unzip(arguments); + }; + + // Complement of _.zip. Unzip accepts an array of arrays and groups + // each array's elements on shared indices + _.unzip = function(array) { + var length = array && _.max(array, getLength).length || 0; + var result = Array(length); + + for (var index = 0; index < length; index++) { + result[index] = _.pluck(array, index); + } + return result; + }; + + // Converts lists into objects. Pass either a single array of `[key, value]` + // pairs, or two parallel arrays of the same length -- one of keys, and one of + // the corresponding values. + _.object = function(list, values) { + var result = {}; + for (var i = 0, length = getLength(list); i < length; i++) { + if (values) { + result[list[i]] = values[i]; + } else { + result[list[i][0]] = list[i][1]; + } + } + return result; + }; + + // Generator function to create the findIndex and findLastIndex functions + function createPredicateIndexFinder(dir) { + return function(array, predicate, context) { + predicate = cb(predicate, context); + var length = getLength(array); + var index = dir > 0 ? 0 : length - 1; + for (; index >= 0 && index < length; index += dir) { + if (predicate(array[index], index, array)) return index; + } + return -1; + }; + } + + // Returns the first index on an array-like that passes a predicate test + _.findIndex = createPredicateIndexFinder(1); + _.findLastIndex = createPredicateIndexFinder(-1); + + // Use a comparator function to figure out the smallest index at which + // an object should be inserted so as to maintain order. Uses binary search. + _.sortedIndex = function(array, obj, iteratee, context) { + iteratee = cb(iteratee, context, 1); + var value = iteratee(obj); + var low = 0, high = getLength(array); + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; + } + return low; + }; + + // Generator function to create the indexOf and lastIndexOf functions + function createIndexFinder(dir, predicateFind, sortedIndex) { + return function(array, item, idx) { + var i = 0, length = getLength(array); + if (typeof idx == 'number') { + if (dir > 0) { + i = idx >= 0 ? idx : Math.max(idx + length, i); + } else { + length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; + } + } else if (sortedIndex && idx && length) { + idx = sortedIndex(array, item); + return array[idx] === item ? idx : -1; + } + if (item !== item) { + idx = predicateFind(slice.call(array, i, length), _.isNaN); + return idx >= 0 ? idx + i : -1; + } + for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { + if (array[idx] === item) return idx; + } + return -1; + }; + } + + // Return the position of the first occurrence of an item in an array, + // or -1 if the item is not included in the array. + // If the array is large and already in sort order, pass `true` + // for **isSorted** to use binary search. + _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex); + _.lastIndexOf = createIndexFinder(-1, _.findLastIndex); + + // Generate an integer Array containing an arithmetic progression. A port of + // the native Python `range()` function. See + // [the Python documentation](http://docs.python.org/library/functions.html#range). + _.range = function(start, stop, step) { + if (stop == null) { + stop = start || 0; + start = 0; + } + step = step || 1; + + var length = Math.max(Math.ceil((stop - start) / step), 0); + var range = Array(length); + + for (var idx = 0; idx < length; idx++, start += step) { + range[idx] = start; + } + + return range; + }; + + // Function (ahem) Functions + // ------------------ + + // Determines whether to execute a function as a constructor + // or a normal function with the provided arguments + var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) { + if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); + var self = baseCreate(sourceFunc.prototype); + var result = sourceFunc.apply(self, args); + if (_.isObject(result)) return result; + return self; + }; + + // Create a function bound to a given object (assigning `this`, and arguments, + // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if + // available. + _.bind = function(func, context) { + if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); + if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); + var args = slice.call(arguments, 2); + var bound = function() { + return executeBound(func, bound, context, this, args.concat(slice.call(arguments))); + }; + return bound; + }; + + // Partially apply a function by creating a version that has had some of its + // arguments pre-filled, without changing its dynamic `this` context. _ acts + // as a placeholder, allowing any combination of arguments to be pre-filled. + _.partial = function(func) { + var boundArgs = slice.call(arguments, 1); + var bound = function() { + var position = 0, length = boundArgs.length; + var args = Array(length); + for (var i = 0; i < length; i++) { + args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i]; + } + while (position < arguments.length) args.push(arguments[position++]); + return executeBound(func, bound, this, this, args); + }; + return bound; + }; + + // Bind a number of an object's methods to that object. Remaining arguments + // are the method names to be bound. Useful for ensuring that all callbacks + // defined on an object belong to it. + _.bindAll = function(obj) { + var i, length = arguments.length, key; + if (length <= 1) throw new Error('bindAll must be passed function names'); + for (i = 1; i < length; i++) { + key = arguments[i]; + obj[key] = _.bind(obj[key], obj); + } + return obj; + }; + + // Memoize an expensive function by storing its results. + _.memoize = function(func, hasher) { + var memoize = function(key) { + var cache = memoize.cache; + var address = '' + (hasher ? hasher.apply(this, arguments) : key); + if (!_.has(cache, address)) cache[address] = func.apply(this, arguments); + return cache[address]; + }; + memoize.cache = {}; + return memoize; + }; + + // Delays a function for the given number of milliseconds, and then calls + // it with the arguments supplied. + _.delay = function(func, wait) { + var args = slice.call(arguments, 2); + return setTimeout(function(){ + return func.apply(null, args); + }, wait); + }; + + // Defers a function, scheduling it to run after the current call stack has + // cleared. + _.defer = _.partial(_.delay, _, 1); + + // Returns a function, that, when invoked, will only be triggered at most once + // during a given window of time. Normally, the throttled function will run + // as much as it can, without ever going more than once per `wait` duration; + // but if you'd like to disable the execution on the leading edge, pass + // `{leading: false}`. To disable execution on the trailing edge, ditto. + _.throttle = function(func, wait, options) { + var context, args, result; + var timeout = null; + var previous = 0; + if (!options) options = {}; + var later = function() { + previous = options.leading === false ? 0 : _.now(); + timeout = null; + result = func.apply(context, args); + if (!timeout) context = args = null; + }; + return function() { + var now = _.now(); + if (!previous && options.leading === false) previous = now; + var remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = now; + result = func.apply(context, args); + if (!timeout) context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }; + + // Returns a function, that, as long as it continues to be invoked, will not + // be triggered. The function will be called after it stops being called for + // N milliseconds. If `immediate` is passed, trigger the function on the + // leading edge, instead of the trailing. + _.debounce = function(func, wait, immediate) { + var timeout, args, context, timestamp, result; + + var later = function() { + var last = _.now() - timestamp; + + if (last < wait && last >= 0) { + timeout = setTimeout(later, wait - last); + } else { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + if (!timeout) context = args = null; + } + } + }; + + return function() { + context = this; + args = arguments; + timestamp = _.now(); + var callNow = immediate && !timeout; + if (!timeout) timeout = setTimeout(later, wait); + if (callNow) { + result = func.apply(context, args); + context = args = null; + } + + return result; + }; + }; + + // Returns the first function passed as an argument to the second, + // allowing you to adjust arguments, run code before and after, and + // conditionally execute the original function. + _.wrap = function(func, wrapper) { + return _.partial(wrapper, func); + }; + + // Returns a negated version of the passed-in predicate. + _.negate = function(predicate) { + return function() { + return !predicate.apply(this, arguments); + }; + }; + + // Returns a function that is the composition of a list of functions, each + // consuming the return value of the function that follows. + _.compose = function() { + var args = arguments; + var start = args.length - 1; + return function() { + var i = start; + var result = args[start].apply(this, arguments); + while (i--) result = args[i].call(this, result); + return result; + }; + }; + + // Returns a function that will only be executed on and after the Nth call. + _.after = function(times, func) { + return function() { + if (--times < 1) { + return func.apply(this, arguments); + } + }; + }; + + // Returns a function that will only be executed up to (but not including) the Nth call. + _.before = function(times, func) { + var memo; + return function() { + if (--times > 0) { + memo = func.apply(this, arguments); + } + if (times <= 1) func = null; + return memo; + }; + }; + + // Returns a function that will be executed at most one time, no matter how + // often you call it. Useful for lazy initialization. + _.once = _.partial(_.before, 2); + + // Object Functions + // ---------------- + + // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. + var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); + var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', + 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; + + function collectNonEnumProps(obj, keys) { + var nonEnumIdx = nonEnumerableProps.length; + var constructor = obj.constructor; + var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto; + + // Constructor is a special case. + var prop = 'constructor'; + if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop); + + while (nonEnumIdx--) { + prop = nonEnumerableProps[nonEnumIdx]; + if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) { + keys.push(prop); + } + } + } + + // Retrieve the names of an object's own properties. + // Delegates to **ECMAScript 5**'s native `Object.keys` + _.keys = function(obj) { + if (!_.isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); + var keys = []; + for (var key in obj) if (_.has(obj, key)) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; + }; + + // Retrieve all the property names of an object. + _.allKeys = function(obj) { + if (!_.isObject(obj)) return []; + var keys = []; + for (var key in obj) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; + }; + + // Retrieve the values of an object's properties. + _.values = function(obj) { + var keys = _.keys(obj); + var length = keys.length; + var values = Array(length); + for (var i = 0; i < length; i++) { + values[i] = obj[keys[i]]; + } + return values; + }; + + // Returns the results of applying the iteratee to each element of the object + // In contrast to _.map it returns an object + _.mapObject = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var keys = _.keys(obj), + length = keys.length, + results = {}, + currentKey; + for (var index = 0; index < length; index++) { + currentKey = keys[index]; + results[currentKey] = iteratee(obj[currentKey], currentKey, obj); + } + return results; + }; + + // Convert an object into a list of `[key, value]` pairs. + _.pairs = function(obj) { + var keys = _.keys(obj); + var length = keys.length; + var pairs = Array(length); + for (var i = 0; i < length; i++) { + pairs[i] = [keys[i], obj[keys[i]]]; + } + return pairs; + }; + + // Invert the keys and values of an object. The values must be serializable. + _.invert = function(obj) { + var result = {}; + var keys = _.keys(obj); + for (var i = 0, length = keys.length; i < length; i++) { + result[obj[keys[i]]] = keys[i]; + } + return result; + }; + + // Return a sorted list of the function names available on the object. + // Aliased as `methods` + _.functions = _.methods = function(obj) { + var names = []; + for (var key in obj) { + if (_.isFunction(obj[key])) names.push(key); + } + return names.sort(); + }; + + // Extend a given object with all the properties in passed-in object(s). + _.extend = createAssigner(_.allKeys); + + // Assigns a given object with all the own properties in the passed-in object(s) + // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) + _.extendOwn = _.assign = createAssigner(_.keys); + + // Returns the first key on an object that passes a predicate test + _.findKey = function(obj, predicate, context) { + predicate = cb(predicate, context); + var keys = _.keys(obj), key; + for (var i = 0, length = keys.length; i < length; i++) { + key = keys[i]; + if (predicate(obj[key], key, obj)) return key; + } + }; + + // Return a copy of the object only containing the whitelisted properties. + _.pick = function(object, oiteratee, context) { + var result = {}, obj = object, iteratee, keys; + if (obj == null) return result; + if (_.isFunction(oiteratee)) { + keys = _.allKeys(obj); + iteratee = optimizeCb(oiteratee, context); + } else { + keys = flatten(arguments, false, false, 1); + iteratee = function(value, key, obj) { return key in obj; }; + obj = Object(obj); + } + for (var i = 0, length = keys.length; i < length; i++) { + var key = keys[i]; + var value = obj[key]; + if (iteratee(value, key, obj)) result[key] = value; + } + return result; + }; + + // Return a copy of the object without the blacklisted properties. + _.omit = function(obj, iteratee, context) { + if (_.isFunction(iteratee)) { + iteratee = _.negate(iteratee); + } else { + var keys = _.map(flatten(arguments, false, false, 1), String); + iteratee = function(value, key) { + return !_.contains(keys, key); + }; + } + return _.pick(obj, iteratee, context); + }; + + // Fill in a given object with default properties. + _.defaults = createAssigner(_.allKeys, true); + + // Creates an object that inherits from the given prototype object. + // If additional properties are provided then they will be added to the + // created object. + _.create = function(prototype, props) { + var result = baseCreate(prototype); + if (props) _.extendOwn(result, props); + return result; + }; + + // Create a (shallow-cloned) duplicate of an object. + _.clone = function(obj) { + if (!_.isObject(obj)) return obj; + return _.isArray(obj) ? obj.slice() : _.extend({}, obj); + }; + + // Invokes interceptor with the obj, and then returns obj. + // The primary purpose of this method is to "tap into" a method chain, in + // order to perform operations on intermediate results within the chain. + _.tap = function(obj, interceptor) { + interceptor(obj); + return obj; + }; + + // Returns whether an object has a given set of `key:value` pairs. + _.isMatch = function(object, attrs) { + var keys = _.keys(attrs), length = keys.length; + if (object == null) return !length; + var obj = Object(object); + for (var i = 0; i < length; i++) { + var key = keys[i]; + if (attrs[key] !== obj[key] || !(key in obj)) return false; + } + return true; + }; + + + // Internal recursive comparison function for `isEqual`. + var eq = function(a, b, aStack, bStack) { + // Identical objects are equal. `0 === -0`, but they aren't identical. + // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). + if (a === b) return a !== 0 || 1 / a === 1 / b; + // A strict comparison is necessary because `null == undefined`. + if (a == null || b == null) return a === b; + // Unwrap any wrapped objects. + if (a instanceof _) a = a._wrapped; + if (b instanceof _) b = b._wrapped; + // Compare `[[Class]]` names. + var className = toString.call(a); + if (className !== toString.call(b)) return false; + switch (className) { + // Strings, numbers, regular expressions, dates, and booleans are compared by value. + case '[object RegExp]': + // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') + case '[object String]': + // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is + // equivalent to `new String("5")`. + return '' + a === '' + b; + case '[object Number]': + // `NaN`s are equivalent, but non-reflexive. + // Object(NaN) is equivalent to NaN + if (+a !== +a) return +b !== +b; + // An `egal` comparison is performed for other numeric values. + return +a === 0 ? 1 / +a === 1 / b : +a === +b; + case '[object Date]': + case '[object Boolean]': + // Coerce dates and booleans to numeric primitive values. Dates are compared by their + // millisecond representations. Note that invalid dates with millisecond representations + // of `NaN` are not equivalent. + return +a === +b; + } + + var areArrays = className === '[object Array]'; + if (!areArrays) { + if (typeof a != 'object' || typeof b != 'object') return false; + + // Objects with different constructors are not equivalent, but `Object`s or `Array`s + // from different frames are. + var aCtor = a.constructor, bCtor = b.constructor; + if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && + _.isFunction(bCtor) && bCtor instanceof bCtor) + && ('constructor' in a && 'constructor' in b)) { + return false; + } + } + // Assume equality for cyclic structures. The algorithm for detecting cyclic + // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. + + // Initializing stack of traversed objects. + // It's done here since we only need them for objects and arrays comparison. + aStack = aStack || []; + bStack = bStack || []; + var length = aStack.length; + while (length--) { + // Linear search. Performance is inversely proportional to the number of + // unique nested structures. + if (aStack[length] === a) return bStack[length] === b; + } + + // Add the first object to the stack of traversed objects. + aStack.push(a); + bStack.push(b); + + // Recursively compare objects and arrays. + if (areArrays) { + // Compare array lengths to determine if a deep comparison is necessary. + length = a.length; + if (length !== b.length) return false; + // Deep compare the contents, ignoring non-numeric properties. + while (length--) { + if (!eq(a[length], b[length], aStack, bStack)) return false; + } + } else { + // Deep compare objects. + var keys = _.keys(a), key; + length = keys.length; + // Ensure that both objects contain the same number of properties before comparing deep equality. + if (_.keys(b).length !== length) return false; + while (length--) { + // Deep compare each member + key = keys[length]; + if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; + } + } + // Remove the first object from the stack of traversed objects. + aStack.pop(); + bStack.pop(); + return true; + }; + + // Perform a deep comparison to check if two objects are equal. + _.isEqual = function(a, b) { + return eq(a, b); + }; + + // Is a given array, string, or object empty? + // An "empty" object has no enumerable own-properties. + _.isEmpty = function(obj) { + if (obj == null) return true; + if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0; + return _.keys(obj).length === 0; + }; + + // Is a given value a DOM element? + _.isElement = function(obj) { + return !!(obj && obj.nodeType === 1); + }; + + // Is a given value an array? + // Delegates to ECMA5's native Array.isArray + _.isArray = nativeIsArray || function(obj) { + return toString.call(obj) === '[object Array]'; + }; + + // Is a given variable an object? + _.isObject = function(obj) { + var type = typeof obj; + return type === 'function' || type === 'object' && !!obj; + }; + + // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError. + _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) { + _['is' + name] = function(obj) { + return toString.call(obj) === '[object ' + name + ']'; + }; + }); + + // Define a fallback version of the method in browsers (ahem, IE < 9), where + // there isn't any inspectable "Arguments" type. + if (!_.isArguments(arguments)) { + _.isArguments = function(obj) { + return _.has(obj, 'callee'); + }; + } + + // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8, + // IE 11 (#1621), and in Safari 8 (#1929). + if (typeof /./ != 'function' && typeof Int8Array != 'object') { + _.isFunction = function(obj) { + return typeof obj == 'function' || false; + }; + } + + // Is a given object a finite number? + _.isFinite = function(obj) { + return isFinite(obj) && !isNaN(parseFloat(obj)); + }; + + // Is the given value `NaN`? (NaN is the only number which does not equal itself). + _.isNaN = function(obj) { + return _.isNumber(obj) && obj !== +obj; + }; + + // Is a given value a boolean? + _.isBoolean = function(obj) { + return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; + }; + + // Is a given value equal to null? + _.isNull = function(obj) { + return obj === null; + }; + + // Is a given variable undefined? + _.isUndefined = function(obj) { + return obj === void 0; + }; + + // Shortcut function for checking if an object has a given property directly + // on itself (in other words, not on a prototype). + _.has = function(obj, key) { + return obj != null && hasOwnProperty.call(obj, key); + }; + + // Utility Functions + // ----------------- + + // Run Underscore.js in *noConflict* mode, returning the `_` variable to its + // previous owner. Returns a reference to the Underscore object. + _.noConflict = function() { + root._ = previousUnderscore; + return this; + }; + + // Keep the identity function around for default iteratees. + _.identity = function(value) { + return value; + }; + + // Predicate-generating functions. Often useful outside of Underscore. + _.constant = function(value) { + return function() { + return value; + }; + }; + + _.noop = function(){}; + + _.property = property; + + // Generates a function for a given object that returns a given property. + _.propertyOf = function(obj) { + return obj == null ? function(){} : function(key) { + return obj[key]; + }; + }; + + // Returns a predicate for checking whether an object has a given set of + // `key:value` pairs. + _.matcher = _.matches = function(attrs) { + attrs = _.extendOwn({}, attrs); + return function(obj) { + return _.isMatch(obj, attrs); + }; + }; + + // Run a function **n** times. + _.times = function(n, iteratee, context) { + var accum = Array(Math.max(0, n)); + iteratee = optimizeCb(iteratee, context, 1); + for (var i = 0; i < n; i++) accum[i] = iteratee(i); + return accum; + }; + + // Return a random integer between min and max (inclusive). + _.random = function(min, max) { + if (max == null) { + max = min; + min = 0; + } + return min + Math.floor(Math.random() * (max - min + 1)); + }; + + // A (possibly faster) way to get the current timestamp as an integer. + _.now = Date.now || function() { + return new Date().getTime(); + }; + + // List of HTML entities for escaping. + var escapeMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' + }; + var unescapeMap = _.invert(escapeMap); + + // Functions for escaping and unescaping strings to/from HTML interpolation. + var createEscaper = function(map) { + var escaper = function(match) { + return map[match]; + }; + // Regexes for identifying a key that needs to be escaped + var source = '(?:' + _.keys(map).join('|') + ')'; + var testRegexp = RegExp(source); + var replaceRegexp = RegExp(source, 'g'); + return function(string) { + string = string == null ? '' : '' + string; + return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; + }; + }; + _.escape = createEscaper(escapeMap); + _.unescape = createEscaper(unescapeMap); + + // If the value of the named `property` is a function then invoke it with the + // `object` as context; otherwise, return it. + _.result = function(object, property, fallback) { + var value = object == null ? void 0 : object[property]; + if (value === void 0) { + value = fallback; + } + return _.isFunction(value) ? value.call(object) : value; + }; + + // Generate a unique integer id (unique within the entire client session). + // Useful for temporary DOM ids. + var idCounter = 0; + _.uniqueId = function(prefix) { + var id = ++idCounter + ''; + return prefix ? prefix + id : id; + }; + + // By default, Underscore uses ERB-style template delimiters, change the + // following template settings to use alternative delimiters. + _.templateSettings = { + evaluate : /<%([\s\S]+?)%>/g, + interpolate : /<%=([\s\S]+?)%>/g, + escape : /<%-([\s\S]+?)%>/g + }; + + // When customizing `templateSettings`, if you don't want to define an + // interpolation, evaluation or escaping regex, we need one that is + // guaranteed not to match. + var noMatch = /(.)^/; + + // Certain characters need to be escaped so that they can be put into a + // string literal. + var escapes = { + "'": "'", + '\\': '\\', + '\r': 'r', + '\n': 'n', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + var escaper = /\\|'|\r|\n|\u2028|\u2029/g; + + var escapeChar = function(match) { + return '\\' + escapes[match]; + }; + + // JavaScript micro-templating, similar to John Resig's implementation. + // Underscore templating handles arbitrary delimiters, preserves whitespace, + // and correctly escapes quotes within interpolated code. + // NB: `oldSettings` only exists for backwards compatibility. + _.template = function(text, settings, oldSettings) { + if (!settings && oldSettings) settings = oldSettings; + settings = _.defaults({}, settings, _.templateSettings); + + // Combine delimiters into one regular expression via alternation. + var matcher = RegExp([ + (settings.escape || noMatch).source, + (settings.interpolate || noMatch).source, + (settings.evaluate || noMatch).source + ].join('|') + '|$', 'g'); + + // Compile the template source, escaping string literals appropriately. + var index = 0; + var source = "__p+='"; + text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { + source += text.slice(index, offset).replace(escaper, escapeChar); + index = offset + match.length; + + if (escape) { + source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; + } else if (interpolate) { + source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; + } else if (evaluate) { + source += "';\n" + evaluate + "\n__p+='"; + } + + // Adobe VMs need the match returned to produce the correct offest. + return match; + }); + source += "';\n"; + + // If a variable is not specified, place data values in local scope. + if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; + + source = "var __t,__p='',__j=Array.prototype.join," + + "print=function(){__p+=__j.call(arguments,'');};\n" + + source + 'return __p;\n'; + + try { + var render = new Function(settings.variable || 'obj', '_', source); + } catch (e) { + e.source = source; + throw e; + } + + var template = function(data) { + return render.call(this, data, _); + }; + + // Provide the compiled source as a convenience for precompilation. + var argument = settings.variable || 'obj'; + template.source = 'function(' + argument + '){\n' + source + '}'; + + return template; + }; + + // Add a "chain" function. Start chaining a wrapped Underscore object. + _.chain = function(obj) { + var instance = _(obj); + instance._chain = true; + return instance; + }; + + // OOP + // --------------- + // If Underscore is called as a function, it returns a wrapped object that + // can be used OO-style. This wrapper holds altered versions of all the + // underscore functions. Wrapped objects may be chained. + + // Helper function to continue chaining intermediate results. + var result = function(instance, obj) { + return instance._chain ? _(obj).chain() : obj; + }; + + // Add your own custom functions to the Underscore object. + _.mixin = function(obj) { + _.each(_.functions(obj), function(name) { + var func = _[name] = obj[name]; + _.prototype[name] = function() { + var args = [this._wrapped]; + push.apply(args, arguments); + return result(this, func.apply(_, args)); + }; + }); + }; + + // Add all of the Underscore functions to the wrapper object. + _.mixin(_); + + // Add all mutator Array functions to the wrapper. + _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { + var method = ArrayProto[name]; + _.prototype[name] = function() { + var obj = this._wrapped; + method.apply(obj, arguments); + if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; + return result(this, obj); + }; + }); + + // Add all accessor Array functions to the wrapper. + _.each(['concat', 'join', 'slice'], function(name) { + var method = ArrayProto[name]; + _.prototype[name] = function() { + return result(this, method.apply(this._wrapped, arguments)); + }; + }); + + // Extracts the result from a wrapped and chained object. + _.prototype.value = function() { + return this._wrapped; + }; + + // Provide unwrapping proxy for some methods used in engine operations + // such as arithmetic and JSON stringification. + _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; + + _.prototype.toString = function() { + return '' + this._wrapped; + }; + + // AMD registration happens at the end for compatibility with AMD loaders + // that may not enforce next-turn semantics on modules. Even though general + // practice for AMD registration is to be anonymous, underscore registers + // as a named module because, like jQuery, it is a base library that is + // popular enough to be bundled in a third party lib, but not be part of + // an AMD load request. Those cases could generate an error when an + // anonymous define() is called outside of a loader request. + if (typeof define === 'function' && define.amd) { + define('underscore', [], function() { + return _; + }); + } +}.call(this)); + +},{}],326:[function(require,module,exports){ +module.exports = urlSetQuery +function urlSetQuery (url, query) { + if (query) { + // remove optional leading symbols + query = query.trim().replace(/^(\?|#|&)/, '') + + // don't append empty query + query = query ? ('?' + query) : query + + var parts = url.split(/[\?\#]/) + var start = parts[0] + if (query && /\:\/\/[^\/]*$/.test(start)) { + // e.g. http://foo.com -> http://foo.com/ + start = start + '/' + } + var match = url.match(/(\#.*)$/) + url = start + query + if (match) { // add hash back in + url = url + match[0] + } + } + return url +} + +},{}],327:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +'use strict'; + +var punycode = require('punycode'); +var util = require('./util'); + +exports.parse = urlParse; +exports.resolve = urlResolve; +exports.resolveObject = urlResolveObject; +exports.format = urlFormat; + +exports.Url = Url; + +function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.host = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.query = null; + this.pathname = null; + this.path = null; + this.href = null; +} + +// Reference: RFC 3986, RFC 1808, RFC 2396 + +// define these here so at least they only have to be +// compiled once on the first module load. +var protocolPattern = /^([a-z0-9.+-]+:)/i, + portPattern = /:[0-9]*$/, + + // Special case for a simple path URL + simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, + + // RFC 2396: characters reserved for delimiting URLs. + // We actually just auto-escape these. + delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], + + // RFC 2396: characters not allowed for various reasons. + unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), + + // Allowed by RFCs, but cause of XSS attacks. Always escape these. + autoEscape = ['\''].concat(unwise), + // Characters that are never ever allowed in a hostname. + // Note that any invalid chars are also handled, but these + // are the ones that are *expected* to be seen, so we fast-path + // them. + nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), + hostEndingChars = ['/', '?', '#'], + hostnameMaxLen = 255, + hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, + hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, + // protocols that can allow "unsafe" and "unwise" chars. + unsafeProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that never have a hostname. + hostlessProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that always contain a // bit. + slashedProtocol = { + 'http': true, + 'https': true, + 'ftp': true, + 'gopher': true, + 'file': true, + 'http:': true, + 'https:': true, + 'ftp:': true, + 'gopher:': true, + 'file:': true + }, + querystring = require('querystring'); + +function urlParse(url, parseQueryString, slashesDenoteHost) { + if (url && util.isObject(url) && url instanceof Url) return url; + + var u = new Url; + u.parse(url, parseQueryString, slashesDenoteHost); + return u; +} + +Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { + if (!util.isString(url)) { + throw new TypeError("Parameter 'url' must be a string, not " + typeof url); + } + + // Copy chrome, IE, opera backslash-handling behavior. + // Back slashes before the query string get converted to forward slashes + // See: https://code.google.com/p/chromium/issues/detail?id=25916 + var queryIndex = url.indexOf('?'), + splitter = + (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', + uSplit = url.split(splitter), + slashRegex = /\\/g; + uSplit[0] = uSplit[0].replace(slashRegex, '/'); + url = uSplit.join(splitter); + + var rest = url; + + // trim before proceeding. + // This is to support parse stuff like " http://foo.com \n" + rest = rest.trim(); + + if (!slashesDenoteHost && url.split('#').length === 1) { + // Try fast path regexp + var simplePath = simplePathPattern.exec(rest); + if (simplePath) { + this.path = rest; + this.href = rest; + this.pathname = simplePath[1]; + if (simplePath[2]) { + this.search = simplePath[2]; + if (parseQueryString) { + this.query = querystring.parse(this.search.substr(1)); + } else { + this.query = this.search.substr(1); + } + } else if (parseQueryString) { + this.search = ''; + this.query = {}; + } + return this; + } + } + + var proto = protocolPattern.exec(rest); + if (proto) { + proto = proto[0]; + var lowerProto = proto.toLowerCase(); + this.protocol = lowerProto; + rest = rest.substr(proto.length); + } + + // figure out if it's got a host + // user@server is *always* interpreted as a hostname, and url + // resolution will treat //foo/bar as host=foo,path=bar because that's + // how the browser resolves relative URLs. + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var slashes = rest.substr(0, 2) === '//'; + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + this.slashes = true; + } + } + + if (!hostlessProtocol[proto] && + (slashes || (proto && !slashedProtocol[proto]))) { + + // there's a hostname. + // the first instance of /, ?, ;, or # ends the host. + // + // If there is an @ in the hostname, then non-host chars *are* allowed + // to the left of the last @ sign, unless some host-ending character + // comes *before* the @-sign. + // URLs are obnoxious. + // + // ex: + // http://a@b@c/ => user:a@b host:c + // http://a@b?@c => user:a host:c path:/?@c + + // v0.12 TODO(isaacs): This is not quite how Chrome does things. + // Review our test case against browsers more comprehensively. + + // find the first instance of any hostEndingChars + var hostEnd = -1; + for (var i = 0; i < hostEndingChars.length; i++) { + var hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + + // at this point, either we have an explicit point where the + // auth portion cannot go past, or the last @ char is the decider. + var auth, atSign; + if (hostEnd === -1) { + // atSign can be anywhere. + atSign = rest.lastIndexOf('@'); + } else { + // atSign must be in auth portion. + // http://a@b/c@d => host:b auth:a path:/c@d + atSign = rest.lastIndexOf('@', hostEnd); + } + + // Now we have a portion which is definitely the auth. + // Pull that off. + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + this.auth = decodeURIComponent(auth); + } + + // the host is the remaining to the left of the first non-host char + hostEnd = -1; + for (var i = 0; i < nonHostChars.length; i++) { + var hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + // if we still have not hit it, then the entire thing is a host. + if (hostEnd === -1) + hostEnd = rest.length; + + this.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + + // pull out port. + this.parseHost(); + + // we've indicated that there is a hostname, + // so even if it's empty, it has to be present. + this.hostname = this.hostname || ''; + + // if hostname begins with [ and ends with ] + // assume that it's an IPv6 address. + var ipv6Hostname = this.hostname[0] === '[' && + this.hostname[this.hostname.length - 1] === ']'; + + // validate a little. + if (!ipv6Hostname) { + var hostparts = this.hostname.split(/\./); + for (var i = 0, l = hostparts.length; i < l; i++) { + var part = hostparts[i]; + if (!part) continue; + if (!part.match(hostnamePartPattern)) { + var newpart = ''; + for (var j = 0, k = part.length; j < k; j++) { + if (part.charCodeAt(j) > 127) { + // we replace non-ASCII char with a temporary placeholder + // we need this to make sure size of hostname is not + // broken by replacing non-ASCII by nothing + newpart += 'x'; + } else { + newpart += part[j]; + } + } + // we test again with ASCII char only + if (!newpart.match(hostnamePartPattern)) { + var validParts = hostparts.slice(0, i); + var notHost = hostparts.slice(i + 1); + var bit = part.match(hostnamePartStart); + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + if (notHost.length) { + rest = '/' + notHost.join('.') + rest; + } + this.hostname = validParts.join('.'); + break; + } + } + } + } + + if (this.hostname.length > hostnameMaxLen) { + this.hostname = ''; + } else { + // hostnames are always lower case. + this.hostname = this.hostname.toLowerCase(); + } + + if (!ipv6Hostname) { + // IDNA Support: Returns a punycoded representation of "domain". + // It only converts parts of the domain name that + // have non-ASCII characters, i.e. it doesn't matter if + // you call it with a domain that already is ASCII-only. + this.hostname = punycode.toASCII(this.hostname); + } + + var p = this.port ? ':' + this.port : ''; + var h = this.hostname || ''; + this.host = h + p; + this.href += this.host; + + // strip [ and ] from the hostname + // the host field still retains them, though + if (ipv6Hostname) { + this.hostname = this.hostname.substr(1, this.hostname.length - 2); + if (rest[0] !== '/') { + rest = '/' + rest; + } + } + } + + // now rest is set to the post-host stuff. + // chop off any delim chars. + if (!unsafeProtocol[lowerProto]) { + + // First, make 100% sure that any "autoEscape" chars get + // escaped, even if encodeURIComponent doesn't think they + // need to be. + for (var i = 0, l = autoEscape.length; i < l; i++) { + var ae = autoEscape[i]; + if (rest.indexOf(ae) === -1) + continue; + var esc = encodeURIComponent(ae); + if (esc === ae) { + esc = escape(ae); + } + rest = rest.split(ae).join(esc); + } + } + + + // chop off from the tail first. + var hash = rest.indexOf('#'); + if (hash !== -1) { + // got a fragment string. + this.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + var qm = rest.indexOf('?'); + if (qm !== -1) { + this.search = rest.substr(qm); + this.query = rest.substr(qm + 1); + if (parseQueryString) { + this.query = querystring.parse(this.query); + } + rest = rest.slice(0, qm); + } else if (parseQueryString) { + // no query string, but parseQueryString still requested + this.search = ''; + this.query = {}; + } + if (rest) this.pathname = rest; + if (slashedProtocol[lowerProto] && + this.hostname && !this.pathname) { + this.pathname = '/'; + } + + //to support http.request + if (this.pathname || this.search) { + var p = this.pathname || ''; + var s = this.search || ''; + this.path = p + s; + } + + // finally, reconstruct the href based on what has been validated. + this.href = this.format(); + return this; +}; + +// format a parsed object into a url string +function urlFormat(obj) { + // ensure it's an object, and not a string url. + // If it's an obj, this is a no-op. + // this way, you can call url_format() on strings + // to clean up potentially wonky urls. + if (util.isString(obj)) obj = urlParse(obj); + if (!(obj instanceof Url)) return Url.prototype.format.call(obj); + return obj.format(); +} + +Url.prototype.format = function() { + var auth = this.auth || ''; + if (auth) { + auth = encodeURIComponent(auth); + auth = auth.replace(/%3A/i, ':'); + auth += '@'; + } + + var protocol = this.protocol || '', + pathname = this.pathname || '', + hash = this.hash || '', + host = false, + query = ''; + + if (this.host) { + host = auth + this.host; + } else if (this.hostname) { + host = auth + (this.hostname.indexOf(':') === -1 ? + this.hostname : + '[' + this.hostname + ']'); + if (this.port) { + host += ':' + this.port; + } + } + + if (this.query && + util.isObject(this.query) && + Object.keys(this.query).length) { + query = querystring.stringify(this.query); + } + + var search = this.search || (query && ('?' + query)) || ''; + + if (protocol && protocol.substr(-1) !== ':') protocol += ':'; + + // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. + // unless they had them to begin with. + if (this.slashes || + (!protocol || slashedProtocol[protocol]) && host !== false) { + host = '//' + (host || ''); + if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; + } else if (!host) { + host = ''; + } + + if (hash && hash.charAt(0) !== '#') hash = '#' + hash; + if (search && search.charAt(0) !== '?') search = '?' + search; + + pathname = pathname.replace(/[?#]/g, function(match) { + return encodeURIComponent(match); + }); + search = search.replace('#', '%23'); + + return protocol + host + pathname + search + hash; +}; + +function urlResolve(source, relative) { + return urlParse(source, false, true).resolve(relative); +} + +Url.prototype.resolve = function(relative) { + return this.resolveObject(urlParse(relative, false, true)).format(); +}; + +function urlResolveObject(source, relative) { + if (!source) return relative; + return urlParse(source, false, true).resolveObject(relative); +} + +Url.prototype.resolveObject = function(relative) { + if (util.isString(relative)) { + var rel = new Url(); + rel.parse(relative, false, true); + relative = rel; + } + + var result = new Url(); + var tkeys = Object.keys(this); + for (var tk = 0; tk < tkeys.length; tk++) { + var tkey = tkeys[tk]; + result[tkey] = this[tkey]; + } + + // hash is always overridden, no matter what. + // even href="" will remove it. + result.hash = relative.hash; + + // if the relative url is empty, then there's nothing left to do here. + if (relative.href === '') { + result.href = result.format(); + return result; + } + + // hrefs like //foo/bar always cut to the protocol. + if (relative.slashes && !relative.protocol) { + // take everything except the protocol from relative + var rkeys = Object.keys(relative); + for (var rk = 0; rk < rkeys.length; rk++) { + var rkey = rkeys[rk]; + if (rkey !== 'protocol') + result[rkey] = relative[rkey]; + } + + //urlParse appends trailing / to urls like http://www.example.com + if (slashedProtocol[result.protocol] && + result.hostname && !result.pathname) { + result.path = result.pathname = '/'; + } + + result.href = result.format(); + return result; + } + + if (relative.protocol && relative.protocol !== result.protocol) { + // if it's a known url protocol, then changing + // the protocol does weird things + // first, if it's not file:, then we MUST have a host, + // and if there was a path + // to begin with, then we MUST have a path. + // if it is file:, then the host is dropped, + // because that's known to be hostless. + // anything else is assumed to be absolute. + if (!slashedProtocol[relative.protocol]) { + var keys = Object.keys(relative); + for (var v = 0; v < keys.length; v++) { + var k = keys[v]; + result[k] = relative[k]; + } + result.href = result.format(); + return result; + } + + result.protocol = relative.protocol; + if (!relative.host && !hostlessProtocol[relative.protocol]) { + var relPath = (relative.pathname || '').split('/'); + while (relPath.length && !(relative.host = relPath.shift())); + if (!relative.host) relative.host = ''; + if (!relative.hostname) relative.hostname = ''; + if (relPath[0] !== '') relPath.unshift(''); + if (relPath.length < 2) relPath.unshift(''); + result.pathname = relPath.join('/'); + } else { + result.pathname = relative.pathname; + } + result.search = relative.search; + result.query = relative.query; + result.host = relative.host || ''; + result.auth = relative.auth; + result.hostname = relative.hostname || relative.host; + result.port = relative.port; + // to support http.request + if (result.pathname || result.search) { + var p = result.pathname || ''; + var s = result.search || ''; + result.path = p + s; + } + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + } + + var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), + isRelAbs = ( + relative.host || + relative.pathname && relative.pathname.charAt(0) === '/' + ), + mustEndAbs = (isRelAbs || isSourceAbs || + (result.host && relative.pathname)), + removeAllDots = mustEndAbs, + srcPath = result.pathname && result.pathname.split('/') || [], + relPath = relative.pathname && relative.pathname.split('/') || [], + psychotic = result.protocol && !slashedProtocol[result.protocol]; + + // if the url is a non-slashed url, then relative + // links like ../.. should be able + // to crawl up to the hostname, as well. This is strange. + // result.protocol has already been set by now. + // Later on, put the first path part into the host field. + if (psychotic) { + result.hostname = ''; + result.port = null; + if (result.host) { + if (srcPath[0] === '') srcPath[0] = result.host; + else srcPath.unshift(result.host); + } + result.host = ''; + if (relative.protocol) { + relative.hostname = null; + relative.port = null; + if (relative.host) { + if (relPath[0] === '') relPath[0] = relative.host; + else relPath.unshift(relative.host); + } + relative.host = null; + } + mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); + } + + if (isRelAbs) { + // it's absolute. + result.host = (relative.host || relative.host === '') ? + relative.host : result.host; + result.hostname = (relative.hostname || relative.hostname === '') ? + relative.hostname : result.hostname; + result.search = relative.search; + result.query = relative.query; + srcPath = relPath; + // fall through to the dot-handling below. + } else if (relPath.length) { + // it's relative + // throw away the existing file, and take the new path instead. + if (!srcPath) srcPath = []; + srcPath.pop(); + srcPath = srcPath.concat(relPath); + result.search = relative.search; + result.query = relative.query; + } else if (!util.isNullOrUndefined(relative.search)) { + // just pull out the search. + // like href='?foo'. + // Put this after the other two cases because it simplifies the booleans + if (psychotic) { + result.hostname = result.host = srcPath.shift(); + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + result.search = relative.search; + result.query = relative.query; + //to support http.request + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.href = result.format(); + return result; + } + + if (!srcPath.length) { + // no path at all. easy. + // we've already handled the other stuff above. + result.pathname = null; + //to support http.request + if (result.search) { + result.path = '/' + result.search; + } else { + result.path = null; + } + result.href = result.format(); + return result; + } + + // if a url ENDs in . or .., then it must get a trailing slash. + // however, if it ends in anything else non-slashy, + // then it must NOT get a trailing slash. + var last = srcPath.slice(-1)[0]; + var hasTrailingSlash = ( + (result.host || relative.host || srcPath.length > 1) && + (last === '.' || last === '..') || last === ''); + + // strip single dots, resolve double dots to parent dir + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = srcPath.length; i >= 0; i--) { + last = srcPath[i]; + if (last === '.') { + srcPath.splice(i, 1); + } else if (last === '..') { + srcPath.splice(i, 1); + up++; + } else if (up) { + srcPath.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (!mustEndAbs && !removeAllDots) { + for (; up--; up) { + srcPath.unshift('..'); + } + } + + if (mustEndAbs && srcPath[0] !== '' && + (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { + srcPath.unshift(''); + } + + if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { + srcPath.push(''); + } + + var isAbsolute = srcPath[0] === '' || + (srcPath[0] && srcPath[0].charAt(0) === '/'); + + // put the host back + if (psychotic) { + result.hostname = result.host = isAbsolute ? '' : + srcPath.length ? srcPath.shift() : ''; + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + + mustEndAbs = mustEndAbs || (result.host && srcPath.length); + + if (mustEndAbs && !isAbsolute) { + srcPath.unshift(''); + } + + if (!srcPath.length) { + result.pathname = null; + result.path = null; + } else { + result.pathname = srcPath.join('/'); + } + + //to support request.http + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.auth = relative.auth || result.auth; + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; +}; + +Url.prototype.parseHost = function() { + var host = this.host; + var port = portPattern.exec(host); + if (port) { + port = port[0]; + if (port !== ':') { + this.port = port.substr(1); + } + host = host.substr(0, host.length - port.length); + } + if (host) this.hostname = host; +}; + +},{"./util":328,"punycode":265,"querystring":269}],328:[function(require,module,exports){ +'use strict'; + +module.exports = { + isString: function(arg) { + return typeof(arg) === 'string'; + }, + isObject: function(arg) { + return typeof(arg) === 'object' && arg !== null; + }, + isNull: function(arg) { + return arg === null; + }, + isNullOrUndefined: function(arg) { + return arg == null; + } +}; + +},{}],329:[function(require,module,exports){ +(function (global){ +/*! https://mths.be/utf8js v2.0.0 by @mathias */ +;(function(root) { + + // Detect free variables `exports` + var freeExports = typeof exports == 'object' && exports; + + // Detect free variable `module` + var freeModule = typeof module == 'object' && module && + module.exports == freeExports && module; + + // Detect free variable `global`, from Node.js or Browserified code, + // and use it as `root` + var freeGlobal = typeof global == 'object' && global; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + var stringFromCharCode = String.fromCharCode; + + // Taken from https://mths.be/punycode + function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + var value; + var extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + // Taken from https://mths.be/punycode + function ucs2encode(array) { + var length = array.length; + var index = -1; + var value; + var output = ''; + while (++index < length) { + value = array[index]; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + } + return output; + } + + function checkScalarValue(codePoint) { + if (codePoint >= 0xD800 && codePoint <= 0xDFFF) { + throw Error( + 'Lone surrogate U+' + codePoint.toString(16).toUpperCase() + + ' is not a scalar value' + ); + } + } + /*--------------------------------------------------------------------------*/ + + function createByte(codePoint, shift) { + return stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80); + } + + function encodeCodePoint(codePoint) { + if ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence + return stringFromCharCode(codePoint); + } + var symbol = ''; + if ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence + symbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0); + } + else if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence + checkScalarValue(codePoint); + symbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0); + symbol += createByte(codePoint, 6); + } + else if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence + symbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0); + symbol += createByte(codePoint, 12); + symbol += createByte(codePoint, 6); + } + symbol += stringFromCharCode((codePoint & 0x3F) | 0x80); + return symbol; + } + + function utf8encode(string) { + var codePoints = ucs2decode(string); + var length = codePoints.length; + var index = -1; + var codePoint; + var byteString = ''; + while (++index < length) { + codePoint = codePoints[index]; + byteString += encodeCodePoint(codePoint); + } + return byteString; + } + + /*--------------------------------------------------------------------------*/ + + function readContinuationByte() { + if (byteIndex >= byteCount) { + throw Error('Invalid byte index'); + } + + var continuationByte = byteArray[byteIndex] & 0xFF; + byteIndex++; + + if ((continuationByte & 0xC0) == 0x80) { + return continuationByte & 0x3F; + } + + // If we end up here, it’s not a continuation byte + throw Error('Invalid continuation byte'); + } + + function decodeSymbol() { + var byte1; + var byte2; + var byte3; + var byte4; + var codePoint; + + if (byteIndex > byteCount) { + throw Error('Invalid byte index'); + } + + if (byteIndex == byteCount) { + return false; + } + + // Read first byte + byte1 = byteArray[byteIndex] & 0xFF; + byteIndex++; + + // 1-byte sequence (no continuation bytes) + if ((byte1 & 0x80) == 0) { + return byte1; + } + + // 2-byte sequence + if ((byte1 & 0xE0) == 0xC0) { + var byte2 = readContinuationByte(); + codePoint = ((byte1 & 0x1F) << 6) | byte2; + if (codePoint >= 0x80) { + return codePoint; + } else { + throw Error('Invalid continuation byte'); + } + } + + // 3-byte sequence (may include unpaired surrogates) + if ((byte1 & 0xF0) == 0xE0) { + byte2 = readContinuationByte(); + byte3 = readContinuationByte(); + codePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3; + if (codePoint >= 0x0800) { + checkScalarValue(codePoint); + return codePoint; + } else { + throw Error('Invalid continuation byte'); + } + } + + // 4-byte sequence + if ((byte1 & 0xF8) == 0xF0) { + byte2 = readContinuationByte(); + byte3 = readContinuationByte(); + byte4 = readContinuationByte(); + codePoint = ((byte1 & 0x0F) << 0x12) | (byte2 << 0x0C) | + (byte3 << 0x06) | byte4; + if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) { + return codePoint; + } + } + + throw Error('Invalid UTF-8 detected'); + } + + var byteArray; + var byteCount; + var byteIndex; + function utf8decode(byteString) { + byteArray = ucs2decode(byteString); + byteCount = byteArray.length; + byteIndex = 0; + var codePoints = []; + var tmp; + while ((tmp = decodeSymbol()) !== false) { + codePoints.push(tmp); + } + return ucs2encode(codePoints); + } + + /*--------------------------------------------------------------------------*/ + + var utf8 = { + 'version': '2.0.0', + 'encode': utf8encode, + 'decode': utf8decode + }; + + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define(function() { + return utf8; + }); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js or RingoJS v0.8.0+ + freeModule.exports = utf8; + } else { // in Narwhal or RingoJS v0.7.0- + var object = {}; + var hasOwnProperty = object.hasOwnProperty; + for (var key in utf8) { + hasOwnProperty.call(utf8, key) && (freeExports[key] = utf8[key]); + } + } + } else { // in Rhino or a web browser + root.utf8 = utf8; + } + +}(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],330:[function(require,module,exports){ +(function (global){ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],331:[function(require,module,exports){ +arguments[4][180][0].apply(exports,arguments) +},{"dup":180}],332:[function(require,module,exports){ +module.exports = function isBuffer(arg) { + return arg && typeof arg === 'object' + && typeof arg.copy === 'function' + && typeof arg.fill === 'function' + && typeof arg.readUInt8 === 'function'; +} +},{}],333:[function(require,module,exports){ +(function (process,global){ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +var formatRegExp = /%[sdj%]/g; +exports.format = function(f) { + if (!isString(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') return '%'; + if (i >= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; +}; + + +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +exports.deprecate = function(fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global.process)) { + return function() { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + + if (process.noDeprecation === true) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +}; + + +var debugs = {}; +var debugEnviron; +exports.debuglog = function(set) { + if (isUndefined(debugEnviron)) + debugEnviron = process.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + debugs[set] = function() { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; + } + } + return debugs[set]; +}; + + +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} +exports.inspect = inspect; + + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + + +function stylizeNoColor(str, styleType) { + return str; +} + + +function arrayToHash(array) { + var hash = {}; + + array.forEach(function(val, idx) { + hash[val] = true; + }); + + return hash; +} + + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) + && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); +} + + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + + +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function(prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = require('./support/isBuffer'); + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + + +// log is just a thin wrapper to console.log that prepends a timestamp +exports.log = function() { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; + + +/** + * Inherit the prototype methods from one constructor into another. + * + * The Function.prototype.inherits from lang.js rewritten as a standalone + * function (not on Function.prototype). NOTE: If this file is to be loaded + * during bootstrapping this function needs to be rewritten using some native + * functions as prototype setup using normal JavaScript does not work as + * expected during bootstrapping (see mirror.js in r114903). + * + * @param {function} ctor Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor Constructor function to inherit prototype from. + */ +exports.inherits = require('inherits'); + +exports._extend = function(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +}; + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./support/isBuffer":332,"_process":257,"inherits":331}],334:[function(require,module,exports){ +var indexOf = require('indexof'); + +var Object_keys = function (obj) { + if (Object.keys) return Object.keys(obj) + else { + var res = []; + for (var key in obj) res.push(key) + return res; + } +}; + +var forEach = function (xs, fn) { + if (xs.forEach) return xs.forEach(fn) + else for (var i = 0; i < xs.length; i++) { + fn(xs[i], i, xs); + } +}; + +var defineProp = (function() { + try { + Object.defineProperty({}, '_', {}); + return function(obj, name, value) { + Object.defineProperty(obj, name, { + writable: true, + enumerable: false, + configurable: true, + value: value + }) + }; + } catch(e) { + return function(obj, name, value) { + obj[name] = value; + }; + } +}()); + +var globals = ['Array', 'Boolean', 'Date', 'Error', 'EvalError', 'Function', +'Infinity', 'JSON', 'Math', 'NaN', 'Number', 'Object', 'RangeError', +'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError', +'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'escape', +'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'undefined', 'unescape']; + +function Context() {} +Context.prototype = {}; + +var Script = exports.Script = function NodeScript (code) { + if (!(this instanceof Script)) return new Script(code); + this.code = code; +}; + +Script.prototype.runInContext = function (context) { + if (!(context instanceof Context)) { + throw new TypeError("needs a 'context' argument."); + } + + var iframe = document.createElement('iframe'); + if (!iframe.style) iframe.style = {}; + iframe.style.display = 'none'; + + document.body.appendChild(iframe); + + var win = iframe.contentWindow; + var wEval = win.eval, wExecScript = win.execScript; + + if (!wEval && wExecScript) { + // win.eval() magically appears when this is called in IE: + wExecScript.call(win, 'null'); + wEval = win.eval; + } + + forEach(Object_keys(context), function (key) { + win[key] = context[key]; + }); + forEach(globals, function (key) { + if (context[key]) { + win[key] = context[key]; + } + }); + + var winKeys = Object_keys(win); + + var res = wEval.call(win, this.code); + + forEach(Object_keys(win), function (key) { + // Avoid copying circular objects like `top` and `window` by only + // updating existing context properties or new properties in the `win` + // that was only introduced after the eval. + if (key in context || indexOf(winKeys, key) === -1) { + context[key] = win[key]; + } + }); + + forEach(globals, function (key) { + if (!(key in context)) { + defineProp(context, key, win[key]); + } + }); + + document.body.removeChild(iframe); + + return res; +}; + +Script.prototype.runInThisContext = function () { + return eval(this.code); // maybe... +}; + +Script.prototype.runInNewContext = function (context) { + var ctx = Script.createContext(context); + var res = this.runInContext(ctx); + + forEach(Object_keys(ctx), function (key) { + context[key] = ctx[key]; + }); + + return res; +}; + +forEach(Object_keys(Script.prototype), function (name) { + exports[name] = Script[name] = function (code) { + var s = Script(code); + return s[name].apply(s, [].slice.call(arguments, 1)); + }; +}); + +exports.createScript = function (code) { + return exports.Script(code); +}; + +exports.createContext = Script.createContext = function (context) { + var copy = new Context(); + if(typeof context === 'object') { + forEach(Object_keys(context), function (key) { + copy[key] = context[key]; + }); + } + return copy; +}; + +},{"indexof":179}],335:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var _ = require('underscore'); +var swarm = require("swarm-js"); + + +var Bzz = function Bzz(provider) { + + this.givenProvider = Bzz.givenProvider; + + if (provider && provider._requestManager) { + provider = provider.currentProvider; + } + + // only allow file picker when in browser + if(typeof document !== 'undefined') { + this.pick = swarm.pick; + } + + this.setProvider(provider); +}; + +// set default ethereum provider +/* jshint ignore:start */ +Bzz.givenProvider = null; +if(typeof ethereumProvider !== 'undefined' && ethereumProvider.bzz) { + Bzz.givenProvider = ethereumProvider.bzz; +} +/* jshint ignore:end */ + +Bzz.prototype.setProvider = function(provider) { + // is ethereum provider + if(_.isObject(provider) && _.isString(provider.bzz)) { + provider = provider.bzz; + // is no string, set default + } + // else if(!_.isString(provider)) { + // provider = 'http://swarm-gateways.net'; // default to gateway + // } + + + if(_.isString(provider)) { + this.currentProvider = provider; + } else { + this.currentProvider = null; + + var noProviderError = new Error('No provider set, please set one using bzz.setProvider().'); + + this.download = this.upload = this.isAvailable = function(){ + throw noProviderError; + }; + + return false; + } + + // add functions + this.download = swarm.at(provider).download; + this.upload = swarm.at(provider).upload; + this.isAvailable = swarm.at(provider).isAvailable; + + return true; +}; + + +module.exports = Bzz; + + +},{"swarm-js":319,"underscore":325}],336:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file errors.js + * @author Fabian Vogelsteller + * @author Marek Kotewicz + * @date 2017 + */ + +"use strict"; + +module.exports = { + ErrorResponse: function (result) { + var message = !!result && !!result.error && !!result.error.message ? result.error.message : JSON.stringify(result); + return new Error('Returned error: ' + message); + }, + InvalidNumberOfParams: function (got, expected, method) { + return new Error('Invalid number of parameters for "'+ method +'". Got '+ got +' expected '+ expected +'!'); + }, + InvalidConnection: function (host){ + return new Error('CONNECTION ERROR: Couldn\'t connect to node '+ host +'.'); + }, + InvalidProvider: function () { + return new Error('Provider not set or invalid'); + }, + InvalidResponse: function (result){ + var message = !!result && !!result.error && !!result.error.message ? result.error.message : 'Invalid JSON RPC response: ' + JSON.stringify(result); + return new Error(message); + }, + ConnectionTimeout: function (ms){ + return new Error('CONNECTION TIMEOUT: timeout of ' + ms + ' ms achived'); + } +}; + +},{}],337:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file formatters.js + * @author Fabian Vogelsteller + * @author Marek Kotewicz + * @date 2017 + */ + +"use strict"; + + +var _ = require('underscore'); +var utils = require('web3-utils'); +var Iban = require('web3-eth-iban'); + +/** + * Should the format output to a big number + * + * @method outputBigNumberFormatter + * @param {String|Number|BigNumber} number + * @returns {BigNumber} object + */ +var outputBigNumberFormatter = function (number) { + return utils.toBN(number).toString(10); +}; + +var isPredefinedBlockNumber = function (blockNumber) { + return blockNumber === 'latest' || blockNumber === 'pending' || blockNumber === 'earliest'; +}; + +var inputDefaultBlockNumberFormatter = function (blockNumber) { + if (this && (blockNumber === undefined || blockNumber === null)) { + return this.defaultBlock; + } + if (blockNumber === 'genesis' || blockNumber === 'earliest') { + return '0x0'; + } + return inputBlockNumberFormatter(blockNumber); +}; + +var inputBlockNumberFormatter = function (blockNumber) { + if (blockNumber === undefined) { + return undefined; + } else if (isPredefinedBlockNumber(blockNumber)) { + return blockNumber; + } + return (utils.isHexStrict(blockNumber)) ? ((_.isString(blockNumber)) ? blockNumber.toLowerCase() : blockNumber) : utils.numberToHex(blockNumber); +}; + +/** + * Formats the input of a transaction and converts all values to HEX + * + * @method _txInputFormatter + * @param {Object} transaction options + * @returns object + */ +var _txInputFormatter = function (options){ + + if (options.to) { // it might be contract creation + options.to = inputAddressFormatter(options.to); + } + + if (options.data && options.input) { + throw new Error('You can\'t have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.'); + } + + if (!options.data && options.input) { + options.data = options.input; + delete options.input; + } + + if(options.data && !utils.isHex(options.data)) { + throw new Error('The data field must be HEX encoded data.'); + } + + // allow both + if (options.gas || options.gasLimit) { + options.gas = options.gas || options.gasLimit; + } + + ['gasPrice', 'gas', 'value', 'nonce'].filter(function (key) { + return options[key] !== undefined; + }).forEach(function(key){ + options[key] = utils.numberToHex(options[key]); + }); + + return options; +}; + +/** + * Formats the input of a transaction and converts all values to HEX + * + * @method inputCallFormatter + * @param {Object} transaction options + * @returns object +*/ +var inputCallFormatter = function (options){ + + options = _txInputFormatter(options); + + var from = options.from || (this ? this.defaultAccount : null); + + if (from) { + options.from = inputAddressFormatter(from); + } + + + return options; +}; + +/** + * Formats the input of a transaction and converts all values to HEX + * + * @method inputTransactionFormatter + * @param {Object} options + * @returns object +*/ +var inputTransactionFormatter = function (options) { + + options = _txInputFormatter(options); + + // check from, only if not number, or object + if (!_.isNumber(options.from) && !_.isObject(options.from)) { + options.from = options.from || (this ? this.defaultAccount : null); + + if (!options.from && !_.isNumber(options.from)) { + throw new Error('The send transactions "from" field must be defined!'); + } + + options.from = inputAddressFormatter(options.from); + } + + return options; +}; + +/** + * Hex encodes the data passed to eth_sign and personal_sign + * + * @method inputSignFormatter + * @param {String} data + * @returns {String} + */ +var inputSignFormatter = function (data) { + return (utils.isHexStrict(data)) ? data : utils.utf8ToHex(data); +}; + +/** + * Formats the output of a transaction to its proper values + * + * @method outputTransactionFormatter + * @param {Object} tx + * @returns {Object} +*/ +var outputTransactionFormatter = function (tx){ + if(tx.blockNumber !== null) + tx.blockNumber = utils.hexToNumber(tx.blockNumber); + if(tx.transactionIndex !== null) + tx.transactionIndex = utils.hexToNumber(tx.transactionIndex); + tx.nonce = utils.hexToNumber(tx.nonce); + tx.gas = utils.hexToNumber(tx.gas); + tx.gasPrice = outputBigNumberFormatter(tx.gasPrice); + tx.value = outputBigNumberFormatter(tx.value); + + if(tx.to && utils.isAddress(tx.to)) { // tx.to could be `0x0` or `null` while contract creation + tx.to = utils.toChecksumAddress(tx.to); + } else { + tx.to = null; // set to `null` if invalid address + } + + if(tx.from) { + tx.from = utils.toChecksumAddress(tx.from); + } + + return tx; +}; + +/** + * Formats the output of a transaction receipt to its proper values + * + * @method outputTransactionReceiptFormatter + * @param {Object} receipt + * @returns {Object} +*/ +var outputTransactionReceiptFormatter = function (receipt){ + if(typeof receipt !== 'object') { + throw new Error('Received receipt is invalid: '+ receipt); + } + + if(receipt.blockNumber !== null) + receipt.blockNumber = utils.hexToNumber(receipt.blockNumber); + if(receipt.transactionIndex !== null) + receipt.transactionIndex = utils.hexToNumber(receipt.transactionIndex); + receipt.cumulativeGasUsed = utils.hexToNumber(receipt.cumulativeGasUsed); + receipt.gasUsed = utils.hexToNumber(receipt.gasUsed); + + if(_.isArray(receipt.logs)) { + receipt.logs = receipt.logs.map(outputLogFormatter); + } + + if(receipt.contractAddress) { + receipt.contractAddress = utils.toChecksumAddress(receipt.contractAddress); + } + + if(typeof receipt.status !== 'undefined') { + receipt.status = Boolean(parseInt(receipt.status)); + } + + return receipt; +}; + +/** + * Formats the output of a block to its proper values + * + * @method outputBlockFormatter + * @param {Object} block + * @returns {Object} +*/ +var outputBlockFormatter = function(block) { + + // transform to number + block.gasLimit = utils.hexToNumber(block.gasLimit); + block.gasUsed = utils.hexToNumber(block.gasUsed); + block.size = utils.hexToNumber(block.size); + block.timestamp = utils.hexToNumber(block.timestamp); + if (block.number !== null) + block.number = utils.hexToNumber(block.number); + + if(block.difficulty) + block.difficulty = outputBigNumberFormatter(block.difficulty); + if(block.totalDifficulty) + block.totalDifficulty = outputBigNumberFormatter(block.totalDifficulty); + + if (_.isArray(block.transactions)) { + block.transactions.forEach(function(item){ + if(!_.isString(item)) + return outputTransactionFormatter(item); + }); + } + + if (block.miner) + block.miner = utils.toChecksumAddress(block.miner); + + return block; +}; + +/** + * Formats the input of a log + * + * @method inputLogFormatter + * @param {Object} log object + * @returns {Object} log +*/ +var inputLogFormatter = function(options) { + var toTopic = function(value){ + + if(value === null || typeof value === 'undefined') + return null; + + value = String(value); + + if(value.indexOf('0x') === 0) + return value; + else + return utils.fromUtf8(value); + }; + + if (options.fromBlock) + options.fromBlock = inputBlockNumberFormatter(options.fromBlock); + + if (options.toBlock) + options.toBlock = inputBlockNumberFormatter(options.toBlock); + + + // make sure topics, get converted to hex + options.topics = options.topics || []; + options.topics = options.topics.map(function(topic){ + return (_.isArray(topic)) ? topic.map(toTopic) : toTopic(topic); + }); + + toTopic = null; + + if (options.address) { + options.address = (_.isArray(options.address)) ? options.address.map(function (addr) { + return inputAddressFormatter(addr); + }) : inputAddressFormatter(options.address); + } + + return options; +}; + +/** + * Formats the output of a log + * + * @method outputLogFormatter + * @param {Object} log object + * @returns {Object} log +*/ +var outputLogFormatter = function(log) { + + // generate a custom log id + if(typeof log.blockHash === 'string' && + typeof log.transactionHash === 'string' && + typeof log.logIndex === 'string') { + var shaId = utils.sha3(log.blockHash.replace('0x','') + log.transactionHash.replace('0x','') + log.logIndex.replace('0x','')); + log.id = 'log_'+ shaId.replace('0x','').substr(0,8); + } else if(!log.id) { + log.id = null; + } + + if (log.blockNumber !== null) + log.blockNumber = utils.hexToNumber(log.blockNumber); + if (log.transactionIndex !== null) + log.transactionIndex = utils.hexToNumber(log.transactionIndex); + if (log.logIndex !== null) + log.logIndex = utils.hexToNumber(log.logIndex); + + if (log.address) { + log.address = utils.toChecksumAddress(log.address); + } + + return log; +}; + +/** + * Formats the input of a whisper post and converts all values to HEX + * + * @method inputPostFormatter + * @param {Object} transaction object + * @returns {Object} +*/ +var inputPostFormatter = function(post) { + + // post.payload = utils.toHex(post.payload); + + if (post.ttl) + post.ttl = utils.numberToHex(post.ttl); + if (post.workToProve) + post.workToProve = utils.numberToHex(post.workToProve); + if (post.priority) + post.priority = utils.numberToHex(post.priority); + + // fallback + if (!_.isArray(post.topics)) { + post.topics = post.topics ? [post.topics] : []; + } + + // format the following options + post.topics = post.topics.map(function(topic){ + // convert only if not hex + return (topic.indexOf('0x') === 0) ? topic : utils.fromUtf8(topic); + }); + + return post; +}; + +/** + * Formats the output of a received post message + * + * @method outputPostFormatter + * @param {Object} + * @returns {Object} + */ +var outputPostFormatter = function(post){ + + post.expiry = utils.hexToNumber(post.expiry); + post.sent = utils.hexToNumber(post.sent); + post.ttl = utils.hexToNumber(post.ttl); + post.workProved = utils.hexToNumber(post.workProved); + // post.payloadRaw = post.payload; + // post.payload = utils.hexToAscii(post.payload); + + // if (utils.isJson(post.payload)) { + // post.payload = JSON.parse(post.payload); + // } + + // format the following options + if (!post.topics) { + post.topics = []; + } + post.topics = post.topics.map(function(topic){ + return utils.toUtf8(topic); + }); + + return post; +}; + +var inputAddressFormatter = function (address) { + var iban = new Iban(address); + if (iban.isValid() && iban.isDirect()) { + return iban.toAddress().toLowerCase(); + } else if (utils.isAddress(address)) { + return '0x' + address.toLowerCase().replace('0x',''); + } + throw new Error('Provided address "'+ address +'" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can\'t be converted.'); +}; + + +var outputSyncingFormatter = function(result) { + + result.startingBlock = utils.hexToNumber(result.startingBlock); + result.currentBlock = utils.hexToNumber(result.currentBlock); + result.highestBlock = utils.hexToNumber(result.highestBlock); + if (result.knownStates) { + result.knownStates = utils.hexToNumber(result.knownStates); + result.pulledStates = utils.hexToNumber(result.pulledStates); + } + + return result; +}; + +module.exports = { + inputDefaultBlockNumberFormatter: inputDefaultBlockNumberFormatter, + inputBlockNumberFormatter: inputBlockNumberFormatter, + inputCallFormatter: inputCallFormatter, + inputTransactionFormatter: inputTransactionFormatter, + inputAddressFormatter: inputAddressFormatter, + inputPostFormatter: inputPostFormatter, + inputLogFormatter: inputLogFormatter, + inputSignFormatter: inputSignFormatter, + outputBigNumberFormatter: outputBigNumberFormatter, + outputTransactionFormatter: outputTransactionFormatter, + outputTransactionReceiptFormatter: outputTransactionReceiptFormatter, + outputBlockFormatter: outputBlockFormatter, + outputLogFormatter: outputLogFormatter, + outputPostFormatter: outputPostFormatter, + outputSyncingFormatter: outputSyncingFormatter +}; + + +},{"underscore":325,"web3-eth-iban":368,"web3-utils":403}],338:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var errors = require('./errors'); +var formatters = require('./formatters'); + +module.exports = { + errors: errors, + formatters: formatters +}; + + +},{"./errors":336,"./formatters":337}],339:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.js + * @author Fabian Vogelsteller + * @author Marek Kotewicz + * @date 2017 + */ + +"use strict"; + +var _ = require('underscore'); +var errors = require('web3-core-helpers').errors; +var formatters = require('web3-core-helpers').formatters; +var utils = require('web3-utils'); +var promiEvent = require('web3-core-promievent'); +var Subscriptions = require('web3-core-subscriptions').subscriptions; + +var TIMEOUTBLOCK = 50; +var POLLINGTIMEOUT = 15 * TIMEOUTBLOCK; // ~average block time (seconds) * TIMEOUTBLOCK +var CONFIRMATIONBLOCKS = 24; + +var Method = function Method(options) { + + if(!options.call || !options.name) { + throw new Error('When creating a method you need to provide at least the "name" and "call" property.'); + } + + this.name = options.name; + this.call = options.call; + this.params = options.params || 0; + this.inputFormatter = options.inputFormatter; + this.outputFormatter = options.outputFormatter; + this.transformPayload = options.transformPayload; + this.extraFormatters = options.extraFormatters; + + this.requestManager = options.requestManager; + + // reference to eth.accounts + this.accounts = options.accounts; + + this.defaultBlock = options.defaultBlock || 'latest'; + this.defaultAccount = options.defaultAccount || null; +}; + +Method.prototype.setRequestManager = function (requestManager, accounts) { + this.requestManager = requestManager; + + // reference to eth.accounts + if (accounts) { + this.accounts = accounts; + } + +}; + +Method.prototype.createFunction = function (requestManager, accounts) { + var func = this.buildCall(); + func.call = this.call; + + this.setRequestManager(requestManager || this.requestManager, accounts || this.accounts); + + return func; +}; + +Method.prototype.attachToObject = function (obj) { + var func = this.buildCall(); + func.call = this.call; + var name = this.name.split('.'); + if (name.length > 1) { + obj[name[0]] = obj[name[0]] || {}; + obj[name[0]][name[1]] = func; + } else { + obj[name[0]] = func; + } +}; + +/** + * Should be used to determine name of the jsonrpc method based on arguments + * + * @method getCall + * @param {Array} arguments + * @return {String} name of jsonrpc method + */ +Method.prototype.getCall = function (args) { + return _.isFunction(this.call) ? this.call(args) : this.call; +}; + +/** + * Should be used to extract callback from array of arguments. Modifies input param + * + * @method extractCallback + * @param {Array} arguments + * @return {Function|Null} callback, if exists + */ +Method.prototype.extractCallback = function (args) { + if (_.isFunction(args[args.length - 1])) { + return args.pop(); // modify the args array! + } +}; + +/** + * Should be called to check if the number of arguments is correct + * + * @method validateArgs + * @param {Array} arguments + * @throws {Error} if it is not + */ +Method.prototype.validateArgs = function (args) { + if (args.length !== this.params) { + throw errors.InvalidNumberOfParams(args.length, this.params, this.name); + } +}; + +/** + * Should be called to format input args of method + * + * @method formatInput + * @param {Array} + * @return {Array} + */ +Method.prototype.formatInput = function (args) { + var _this = this; + + if (!this.inputFormatter) { + return args; + } + + return this.inputFormatter.map(function (formatter, index) { + // bind this for defaultBlock, and defaultAccount + return formatter ? formatter.call(_this, args[index]) : args[index]; + }); +}; + +/** + * Should be called to format output(result) of method + * + * @method formatOutput + * @param {Object} + * @return {Object} + */ +Method.prototype.formatOutput = function (result) { + var _this = this; + + if(_.isArray(result)) { + return result.map(function(res){ + return _this.outputFormatter && res ? _this.outputFormatter(res) : res; + }); + } else { + return this.outputFormatter && result ? this.outputFormatter(result) : result; + } +}; + +/** + * Should create payload from given input args + * + * @method toPayload + * @param {Array} args + * @return {Object} + */ +Method.prototype.toPayload = function (args) { + var call = this.getCall(args); + var callback = this.extractCallback(args); + var params = this.formatInput(args); + this.validateArgs(params); + + var payload = { + method: call, + params: params, + callback: callback + }; + + if (this.transformPayload) { + payload = this.transformPayload(payload); + } + + return payload; +}; + + +Method.prototype._confirmTransaction = function (defer, result, payload) { + var method = this, + promiseResolved = false, + canUnsubscribe = true, + timeoutCount = 0, + confirmationCount = 0, + intervalId = null, + receiptJSON = '', + gasProvided = (_.isObject(payload.params[0]) && payload.params[0].gas) ? payload.params[0].gas : null, + isContractDeployment = _.isObject(payload.params[0]) && + payload.params[0].data && + payload.params[0].from && + !payload.params[0].to; + + // add custom send Methods + var _ethereumCalls = [ + new Method({ + name: 'getTransactionReceipt', + call: 'eth_getTransactionReceipt', + params: 1, + inputFormatter: [null], + outputFormatter: formatters.outputTransactionReceiptFormatter + }), + new Method({ + name: 'getCode', + call: 'eth_getCode', + params: 2, + inputFormatter: [formatters.inputAddressFormatter, formatters.inputDefaultBlockNumberFormatter] + }), + new Subscriptions({ + name: 'subscribe', + type: 'eth', + subscriptions: { + 'newBlockHeaders': { + subscriptionName: 'newHeads', // replace subscription with this name + params: 0, + outputFormatter: formatters.outputBlockFormatter + } + } + }) + ]; + // attach methods to this._ethereumCall + var _ethereumCall = {}; + _.each(_ethereumCalls, function (mthd) { + mthd.attachToObject(_ethereumCall); + mthd.requestManager = method.requestManager; // assign rather than call setRequestManager() + }); + + + // fire "receipt" and confirmation events and resolve after + var checkConfirmation = function (existingReceipt, isPolling, err, blockHeader, sub) { + if (!err) { + // create fake unsubscribe + if (!sub) { + sub = { + unsubscribe: function () { + clearInterval(intervalId); + } + }; + } + // if we have a valid receipt we don't need to send a request + return (existingReceipt ? promiEvent.resolve(existingReceipt) : _ethereumCall.getTransactionReceipt(result)) + // catch error from requesting receipt + .catch(function (err) { + sub.unsubscribe(); + promiseResolved = true; + utils._fireError({message: 'Failed to check for transaction receipt:', data: err}, defer.eventEmitter, defer.reject); + }) + // if CONFIRMATION listener exists check for confirmations, by setting canUnsubscribe = false + .then(function(receipt) { + if (!receipt || !receipt.blockHash) { + throw new Error('Receipt missing or blockHash null'); + } + + // apply extra formatters + if (method.extraFormatters && method.extraFormatters.receiptFormatter) { + receipt = method.extraFormatters.receiptFormatter(receipt); + } + + // check if confirmation listener exists + if (defer.eventEmitter.listeners('confirmation').length > 0) { + + // If there was an immediately retrieved receipt, it's already + // been confirmed by the direct call to checkConfirmation needed + // for parity instant-seal + if (existingReceipt === undefined || confirmationCount !== 0){ + defer.eventEmitter.emit('confirmation', confirmationCount, receipt); + } + + canUnsubscribe = false; + confirmationCount++; + + if (confirmationCount === CONFIRMATIONBLOCKS + 1) { // add 1 so we account for conf 0 + sub.unsubscribe(); + defer.eventEmitter.removeAllListeners(); + } + } + + return receipt; + }) + // CHECK for CONTRACT DEPLOYMENT + .then(function(receipt) { + + if (isContractDeployment && !promiseResolved) { + + if (!receipt.contractAddress) { + + if (canUnsubscribe) { + sub.unsubscribe(); + promiseResolved = true; + } + + utils._fireError(new Error('The transaction receipt didn\'t contain a contract address.'), defer.eventEmitter, defer.reject); + return; + } + + _ethereumCall.getCode(receipt.contractAddress, function (e, code) { + + if (!code) { + return; + } + + + if (code.length > 2) { + defer.eventEmitter.emit('receipt', receipt); + + // if contract, return instance instead of receipt + if (method.extraFormatters && method.extraFormatters.contractDeployFormatter) { + defer.resolve(method.extraFormatters.contractDeployFormatter(receipt)); + } else { + defer.resolve(receipt); + } + + // need to remove listeners, as they aren't removed automatically when succesfull + if (canUnsubscribe) { + defer.eventEmitter.removeAllListeners(); + } + + } else { + utils._fireError(new Error('The contract code couldn\'t be stored, please check your gas limit.'), defer.eventEmitter, defer.reject); + } + + if (canUnsubscribe) { + sub.unsubscribe(); + } + promiseResolved = true; + }); + } + + return receipt; + }) + // CHECK for normal tx check for receipt only + .then(function(receipt) { + + if (!isContractDeployment && !promiseResolved) { + + if(!receipt.outOfGas && + (!gasProvided || gasProvided !== receipt.gasUsed) && + (receipt.status === true || receipt.status === '0x1' || typeof receipt.status === 'undefined')) { + defer.eventEmitter.emit('receipt', receipt); + defer.resolve(receipt); + + // need to remove listeners, as they aren't removed automatically when succesfull + if (canUnsubscribe) { + defer.eventEmitter.removeAllListeners(); + } + + } else { + receiptJSON = JSON.stringify(receipt, null, 2); + if (receipt.status === false || receipt.status === '0x0') { + utils._fireError(new Error("Transaction has been reverted by the EVM:\n" + receiptJSON), + defer.eventEmitter, defer.reject); + } else { + utils._fireError( + new Error("Transaction ran out of gas. Please provide more gas:\n" + receiptJSON), + defer.eventEmitter, defer.reject); + } + } + + if (canUnsubscribe) { + sub.unsubscribe(); + } + promiseResolved = true; + } + + }) + // time out the transaction if not mined after 50 blocks + .catch(function () { + timeoutCount++; + + // check to see if we are http polling + if(!!isPolling) { + // polling timeout is different than TIMEOUTBLOCK blocks since we are triggering every second + if (timeoutCount - 1 >= POLLINGTIMEOUT) { + sub.unsubscribe(); + promiseResolved = true; + utils._fireError(new Error('Transaction was not mined within' + POLLINGTIMEOUT + ' seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!'), defer.eventEmitter, defer.reject); + } + } else { + if (timeoutCount - 1 >= TIMEOUTBLOCK) { + sub.unsubscribe(); + promiseResolved = true; + utils._fireError(new Error('Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!'), defer.eventEmitter, defer.reject); + } + } + }); + + + } else { + sub.unsubscribe(); + promiseResolved = true; + utils._fireError({message: 'Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.', data: err}, defer.eventEmitter, defer.reject); + } + }; + + // start watching for confirmation depending on the support features of the provider + var startWatching = function(existingReceipt) { + // if provider allows PUB/SUB + if (_.isFunction(this.requestManager.provider.on)) { + _ethereumCall.subscribe('newBlockHeaders', checkConfirmation.bind(null, existingReceipt, false)); + } else { + intervalId = setInterval(checkConfirmation.bind(null, existingReceipt, true), 1000); + } + }.bind(this); + + + // first check if we already have a confirmed transaction + _ethereumCall.getTransactionReceipt(result) + .then(function(receipt) { + if (receipt && receipt.blockHash) { + if (defer.eventEmitter.listeners('confirmation').length > 0) { + // We must keep on watching for new Blocks, if a confirmation listener is present + startWatching(receipt); + } + checkConfirmation(receipt, false); + + } else if (!promiseResolved) { + startWatching(); + } + }) + .catch(function(){ + if (!promiseResolved) startWatching(); + }); + +}; + + +var getWallet = function(from, accounts) { + var wallet = null; + + // is index given + if (_.isNumber(from)) { + wallet = accounts.wallet[from]; + + // is account given + } else if (_.isObject(from) && from.address && from.privateKey) { + wallet = from; + + // search in wallet for address + } else { + wallet = accounts.wallet[from.toLowerCase()]; + } + + return wallet; +}; + +Method.prototype.buildCall = function() { + var method = this, + isSendTx = (method.call === 'eth_sendTransaction' || method.call === 'eth_sendRawTransaction'); // || method.call === 'personal_sendTransaction' + + // actual send function + var send = function () { + var defer = promiEvent(!isSendTx), + payload = method.toPayload(Array.prototype.slice.call(arguments)); + + + // CALLBACK function + var sendTxCallback = function (err, result) { + try { + result = method.formatOutput(result); + } catch(e) { + err = e; + } + + if (result instanceof Error) { + err = result; + } + + if (!err) { + if (payload.callback) { + payload.callback(null, result); + } + } else { + if(err.error) { + err = err.error; + } + + return utils._fireError(err, defer.eventEmitter, defer.reject, payload.callback); + } + + // return PROMISE + if (!isSendTx) { + + if (!err) { + defer.resolve(result); + + } + + // return PROMIEVENT + } else { + defer.eventEmitter.emit('transactionHash', result); + + method._confirmTransaction(defer, result, payload); + } + + }; + + // SENDS the SIGNED SIGNATURE + var sendSignedTx = function(sign){ + + var signedPayload = _.extend({}, payload, { + method: 'eth_sendRawTransaction', + params: [sign.rawTransaction] + }); + + method.requestManager.send(signedPayload, sendTxCallback); + }; + + + var sendRequest = function(payload, method) { + + if (method && method.accounts && method.accounts.wallet && method.accounts.wallet.length) { + var wallet; + + // ETH_SENDTRANSACTION + if (payload.method === 'eth_sendTransaction') { + var tx = payload.params[0]; + wallet = getWallet((_.isObject(tx)) ? tx.from : null, method.accounts); + + + // If wallet was found, sign tx, and send using sendRawTransaction + if (wallet && wallet.privateKey) { + return method.accounts.signTransaction(_.omit(tx, 'from'), wallet.privateKey).then(sendSignedTx); + } + + // ETH_SIGN + } else if (payload.method === 'eth_sign') { + var data = payload.params[1]; + wallet = getWallet(payload.params[0], method.accounts); + + // If wallet was found, sign tx, and send using sendRawTransaction + if (wallet && wallet.privateKey) { + var sign = method.accounts.sign(data, wallet.privateKey); + + if (payload.callback) { + payload.callback(null, sign.signature); + } + + defer.resolve(sign.signature); + return; + } + + + } + } + + return method.requestManager.send(payload, sendTxCallback); + }; + + // Send the actual transaction + if(isSendTx && _.isObject(payload.params[0]) && typeof payload.params[0].gasPrice === 'undefined') { + + var getGasPrice = (new Method({ + name: 'getGasPrice', + call: 'eth_gasPrice', + params: 0 + })).createFunction(method.requestManager); + + getGasPrice(function (err, gasPrice) { + + if (gasPrice) { + payload.params[0].gasPrice = gasPrice; + } + sendRequest(payload, method); + }); + + } else { + sendRequest(payload, method); + } + + + return defer.eventEmitter; + }; + + // necessary to attach things to the method + send.method = method; + // necessary for batch requests + send.request = this.request.bind(this); + return send; +}; + +/** + * Should be called to create the pure JSONRPC request which can be used in a batch request + * + * @method request + * @return {Object} jsonrpc request + */ +Method.prototype.request = function () { + var payload = this.toPayload(Array.prototype.slice.call(arguments)); + payload.format = this.formatOutput.bind(this); + return payload; +}; + +module.exports = Method; + +},{"underscore":325,"web3-core-helpers":338,"web3-core-promievent":340,"web3-core-subscriptions":345,"web3-utils":403}],340:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . + */ +/** + * @file index.js + * @author Fabian Vogelsteller + * @date 2016 + */ + +"use strict"; + +var EventEmitter = require('eventemitter3'); +var Promise = require("any-promise"); + +/** + * This function generates a defer promise and adds eventEmitter functionality to it + * + * @method eventifiedPromise + */ +var PromiEvent = function PromiEvent(justPromise) { + var resolve, reject, + eventEmitter = new Promise(function() { + resolve = arguments[0]; + reject = arguments[1]; + }); + + if(justPromise) { + return { + resolve: resolve, + reject: reject, + eventEmitter: eventEmitter + }; + } + + // get eventEmitter + var emitter = new EventEmitter(); + + // add eventEmitter to the promise + eventEmitter._events = emitter._events; + eventEmitter.emit = emitter.emit; + eventEmitter.on = emitter.on; + eventEmitter.once = emitter.once; + eventEmitter.off = emitter.off; + eventEmitter.listeners = emitter.listeners; + eventEmitter.addListener = emitter.addListener; + eventEmitter.removeListener = emitter.removeListener; + eventEmitter.removeAllListeners = emitter.removeAllListeners; + + return { + resolve: resolve, + reject: reject, + eventEmitter: eventEmitter + }; +}; + +PromiEvent.resolve = function(value) { + var promise = PromiEvent(true); + promise.resolve(value); + return promise.eventEmitter; +}; + +module.exports = PromiEvent; + +},{"any-promise":2,"eventemitter3":156}],341:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file batch.js + * @author Marek Kotewicz + * @date 2015 + */ + +"use strict"; + +var Jsonrpc = require('./jsonrpc'); +var errors = require('web3-core-helpers').errors; + +var Batch = function (requestManager) { + this.requestManager = requestManager; + this.requests = []; +}; + +/** + * Should be called to add create new request to batch request + * + * @method add + * @param {Object} jsonrpc requet object + */ +Batch.prototype.add = function (request) { + this.requests.push(request); +}; + +/** + * Should be called to execute batch request + * + * @method execute + */ +Batch.prototype.execute = function () { + var requests = this.requests; + this.requestManager.sendBatch(requests, function (err, results) { + results = results || []; + requests.map(function (request, index) { + return results[index] || {}; + }).forEach(function (result, index) { + if (requests[index].callback) { + if (result && result.error) { + return requests[index].callback(errors.ErrorResponse(result)); + } + + if (!Jsonrpc.isValidResponse(result)) { + return requests[index].callback(errors.InvalidResponse(result)); + } + + try { + requests[index].callback(null, requests[index].format ? requests[index].format(result.result) : result.result); + } catch (err) { + requests[index].callback(err); + } + } + }); + }); +}; + +module.exports = Batch; + + +},{"./jsonrpc":344,"web3-core-helpers":338}],342:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . + */ +/** + * @file givenProvider.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var givenProvider = null; + +// ADD GIVEN PROVIDER +/* jshint ignore:start */ +var global = window; +// EthereumProvider +if(typeof global.ethereumProvider !== 'undefined') { + givenProvider = global.ethereumProvider; + +// Legacy web3.currentProvider +} else if(typeof global.web3 !== 'undefined' && global.web3.currentProvider) { + + if(global.web3.currentProvider.sendAsync) { + global.web3.currentProvider.send = global.web3.currentProvider.sendAsync; + delete global.web3.currentProvider.sendAsync; + } + + // if connection is 'ipcProviderWrapper', add subscription support + if(!global.web3.currentProvider.on && + global.web3.currentProvider.connection && + global.web3.currentProvider.connection.constructor.name === 'ipcProviderWrapper') { + + global.web3.currentProvider.on = function (type, callback) { + + if(typeof callback !== 'function') + throw new Error('The second parameter callback must be a function.'); + + switch(type){ + case 'data': + this.connection.on('data', function(data) { + var result = ''; + + data = data.toString(); + + try { + result = JSON.parse(data); + } catch(e) { + return callback(new Error('Couldn\'t parse response data'+ data)); + } + + // notification + if(!result.id && result.method.indexOf('_subscription') !== -1) { + callback(null, result); + } + + }); + break; + + default: + this.connection.on(type, callback); + break; + } + }; + } + + givenProvider = global.web3.currentProvider; +} +/* jshint ignore:end */ + + +module.exports = givenProvider; + +},{}],343:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + + +var _ = require('underscore'); +var errors = require('web3-core-helpers').errors; +var Jsonrpc = require('./jsonrpc.js'); +var BatchManager = require('./batch.js'); +var givenProvider = require('./givenProvider.js'); + + + + /** + * It's responsible for passing messages to providers + * It's also responsible for polling the ethereum node for incoming messages + * Default poll timeout is 1 second + * Singleton + */ +var RequestManager = function RequestManager(provider) { + this.provider = null; + this.providers = RequestManager.providers; + + this.setProvider(provider); + this.subscriptions = {}; +}; + + + +RequestManager.givenProvider = givenProvider; + +RequestManager.providers = { + WebsocketProvider: require('web3-providers-ws'), + HttpProvider: require('web3-providers-http'), + IpcProvider: require('web3-providers-ipc') +}; + + + +/** + * Should be used to set provider of request manager + * + * @method setProvider + * @param {Object} p + */ +RequestManager.prototype.setProvider = function (p, net) { + var _this = this; + + // autodetect provider + if(p && typeof p === 'string' && this.providers) { + + // HTTP + if(/^http(s)?:\/\//i.test(p)) { + p = new this.providers.HttpProvider(p); + + // WS + } else if(/^ws(s)?:\/\//i.test(p)) { + p = new this.providers.WebsocketProvider(p); + + // IPC + } else if(p && typeof net === 'object' && typeof net.connect === 'function') { + p = new this.providers.IpcProvider(p, net); + + } else if(p) { + throw new Error('Can\'t autodetect provider for "'+ p +'"'); + } + } + + // reset the old one before changing, if still connected + if(this.provider && this.provider.connected) + this.clearSubscriptions(); + + + this.provider = p || null; + + // listen to incoming notifications + if(this.provider && this.provider.on) { + this.provider.on('data', function requestManagerNotification(result, deprecatedResult){ + result = result || deprecatedResult; // this is for possible old providers, which may had the error first handler + + // check for result.method, to prevent old providers errors to pass as result + if(result.method && _this.subscriptions[result.params.subscription] && _this.subscriptions[result.params.subscription].callback) { + _this.subscriptions[result.params.subscription].callback(null, result.params.result); + } + }); + // TODO add error, end, timeout, connect?? + // this.provider.on('error', function requestManagerNotification(result){ + // Object.keys(_this.subscriptions).forEach(function(id){ + // if(_this.subscriptions[id].callback) + // _this.subscriptions[id].callback(err); + // }); + // } + } +}; + + +/** + * Should be used to asynchronously send request + * + * @method sendAsync + * @param {Object} data + * @param {Function} callback + */ +RequestManager.prototype.send = function (data, callback) { + callback = callback || function(){}; + + if (!this.provider) { + return callback(errors.InvalidProvider()); + } + + var payload = Jsonrpc.toPayload(data.method, data.params); + this.provider[this.provider.sendAsync ? 'sendAsync' : 'send'](payload, function (err, result) { + if(result && result.id && payload.id !== result.id) return callback(new Error('Wrong response id "'+ result.id +'" (expected: "'+ payload.id +'") in '+ JSON.stringify(payload))); + + if (err) { + return callback(err); + } + + if (result && result.error) { + return callback(errors.ErrorResponse(result)); + } + + if (!Jsonrpc.isValidResponse(result)) { + return callback(errors.InvalidResponse(result)); + } + + callback(null, result.result); + }); +}; + +/** + * Should be called to asynchronously send batch request + * + * @method sendBatch + * @param {Array} batch data + * @param {Function} callback + */ +RequestManager.prototype.sendBatch = function (data, callback) { + if (!this.provider) { + return callback(errors.InvalidProvider()); + } + + var payload = Jsonrpc.toBatchPayload(data); + this.provider[this.provider.sendAsync ? 'sendAsync' : 'send'](payload, function (err, results) { + if (err) { + return callback(err); + } + + if (!_.isArray(results)) { + return callback(errors.InvalidResponse(results)); + } + + callback(null, results); + }); +}; + + +/** + * Waits for notifications + * + * @method addSubscription + * @param {String} id the subscription id + * @param {String} name the subscription name + * @param {String} type the subscription namespace (eth, personal, etc) + * @param {Function} callback the callback to call for incoming notifications + */ +RequestManager.prototype.addSubscription = function (id, name, type, callback) { + if(this.provider.on) { + this.subscriptions[id] = { + callback: callback, + type: type, + name: name + }; + + } else { + throw new Error('The provider doesn\'t support subscriptions: '+ this.provider.constructor.name); + } +}; + +/** + * Waits for notifications + * + * @method removeSubscription + * @param {String} id the subscription id + * @param {Function} callback fired once the subscription is removed + */ +RequestManager.prototype.removeSubscription = function (id, callback) { + var _this = this; + + if(this.subscriptions[id]) { + + this.send({ + method: this.subscriptions[id].type + '_unsubscribe', + params: [id] + }, callback); + + // remove subscription + delete _this.subscriptions[id]; + } +}; + +/** + * Should be called to reset the subscriptions + * + * @method reset + */ +RequestManager.prototype.clearSubscriptions = function (keepIsSyncing) { + var _this = this; + + + // uninstall all subscriptions + Object.keys(this.subscriptions).forEach(function(id){ + if(!keepIsSyncing || _this.subscriptions[id].name !== 'syncing') + _this.removeSubscription(id); + }); + + + // reset notification callbacks etc. + if(this.provider.reset) + this.provider.reset(); +}; + +module.exports = { + Manager: RequestManager, + BatchManager: BatchManager +}; + +},{"./batch.js":341,"./givenProvider.js":342,"./jsonrpc.js":344,"underscore":325,"web3-core-helpers":338,"web3-providers-http":398,"web3-providers-ipc":399,"web3-providers-ws":400}],344:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file jsonrpc.js + * @authors: + * Fabian Vogelsteller + * Marek Kotewicz + * Aaron Kumavis + * @date 2015 + */ + +"use strict"; + +// Initialize Jsonrpc as a simple object with utility functions. +var Jsonrpc = { + messageId: 0 +}; + +/** + * Should be called to valid json create payload object + * + * @method toPayload + * @param {Function} method of jsonrpc call, required + * @param {Array} params, an array of method params, optional + * @returns {Object} valid jsonrpc payload object + */ +Jsonrpc.toPayload = function (method, params) { + if (!method) { + throw new Error('JSONRPC method should be specified for params: "'+ JSON.stringify(params) +'"!'); + } + + // advance message ID + Jsonrpc.messageId++; + + return { + jsonrpc: '2.0', + id: Jsonrpc.messageId, + method: method, + params: params || [] + }; +}; + +/** + * Should be called to check if jsonrpc response is valid + * + * @method isValidResponse + * @param {Object} + * @returns {Boolean} true if response is valid, otherwise false + */ +Jsonrpc.isValidResponse = function (response) { + return Array.isArray(response) ? response.every(validateSingleMessage) : validateSingleMessage(response); + + function validateSingleMessage(message){ + return !!message && + !message.error && + message.jsonrpc === '2.0' && + (typeof message.id === 'number' || typeof message.id === 'string') && + message.result !== undefined; // only undefined is not valid json object + } +}; + +/** + * Should be called to create batch payload object + * + * @method toBatchPayload + * @param {Array} messages, an array of objects with method (required) and params (optional) fields + * @returns {Array} batch payload + */ +Jsonrpc.toBatchPayload = function (messages) { + return messages.map(function (message) { + return Jsonrpc.toPayload(message.method, message.params); + }); +}; + +module.exports = Jsonrpc; + + +},{}],345:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var Subscription = require('./subscription.js'); + + +var Subscriptions = function Subscriptions(options) { + this.name = options.name; + this.type = options.type; + this.subscriptions = options.subscriptions || {}; + this.requestManager = null; +}; + + +Subscriptions.prototype.setRequestManager = function (rm) { + this.requestManager = rm; +}; + + +Subscriptions.prototype.attachToObject = function (obj) { + var func = this.buildCall(); + var name = this.name.split('.'); + if (name.length > 1) { + obj[name[0]] = obj[name[0]] || {}; + obj[name[0]][name[1]] = func; + } else { + obj[name[0]] = func; + } +}; + + +Subscriptions.prototype.buildCall = function() { + var _this = this; + + return function(){ + if(!_this.subscriptions[arguments[0]]) { + console.warn('Subscription '+ JSON.stringify(arguments[0]) +' doesn\'t exist. Subscribing anyway.'); + } + + var subscription = new Subscription({ + subscription: _this.subscriptions[arguments[0]], + requestManager: _this.requestManager, + type: _this.type + }); + + return subscription.subscribe.apply(subscription, arguments); + }; +}; + + +module.exports = { + subscriptions: Subscriptions, + subscription: Subscription +}; + +},{"./subscription.js":346}],346:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file subscription.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var _ = require('underscore'); +var errors = require('web3-core-helpers').errors; +var EventEmitter = require('eventemitter3'); + +function Subscription(options) { + EventEmitter.call(this); + + this.id = null; + this.callback = _.identity; + this.arguments = null; + this._reconnectIntervalId = null; + + this.options = { + subscription: options.subscription, + type: options.type, + requestManager: options.requestManager + }; +} + +// INHERIT +Subscription.prototype = Object.create(EventEmitter.prototype); +Subscription.prototype.constructor = Subscription; + + +/** + * Should be used to extract callback from array of arguments. Modifies input param + * + * @method extractCallback + * @param {Array} arguments + * @return {Function|Null} callback, if exists + */ + +Subscription.prototype._extractCallback = function (args) { + if (_.isFunction(args[args.length - 1])) { + return args.pop(); // modify the args array! + } +}; + +/** + * Should be called to check if the number of arguments is correct + * + * @method validateArgs + * @param {Array} arguments + * @throws {Error} if it is not + */ + +Subscription.prototype._validateArgs = function (args) { + var subscription = this.options.subscription; + + if(!subscription) + subscription = {}; + + if(!subscription.params) + subscription.params = 0; + + if (args.length !== subscription.params) { + throw errors.InvalidNumberOfParams(args.length, subscription.params + 1, args[0]); + } +}; + +/** + * Should be called to format input args of method + * + * @method formatInput + * @param {Array} + * @return {Array} + */ + +Subscription.prototype._formatInput = function (args) { + var subscription = this.options.subscription; + + if (!subscription) { + return args; + } + + if (!subscription.inputFormatter) { + return args; + } + + var formattedArgs = subscription.inputFormatter.map(function (formatter, index) { + return formatter ? formatter(args[index]) : args[index]; + }); + + return formattedArgs; +}; + +/** + * Should be called to format output(result) of method + * + * @method formatOutput + * @param {Object} + * @return {Object} + */ + +Subscription.prototype._formatOutput = function (result) { + var subscription = this.options.subscription; + + return (subscription && subscription.outputFormatter && result) ? subscription.outputFormatter(result) : result; +}; + +/** + * Should create payload from given input args + * + * @method toPayload + * @param {Array} args + * @return {Object} + */ +Subscription.prototype._toPayload = function (args) { + var params = []; + this.callback = this._extractCallback(args) || _.identity; + + if (!this.subscriptionMethod) { + this.subscriptionMethod = args.shift(); + + // replace subscription with given name + if (this.options.subscription.subscriptionName) { + this.subscriptionMethod = this.options.subscription.subscriptionName; + } + } + + if (!this.arguments) { + this.arguments = this._formatInput(args); + this._validateArgs(this.arguments); + args = []; // make empty after validation + + } + + // re-add subscriptionName + params.push(this.subscriptionMethod); + params = params.concat(this.arguments); + + + if (args.length) { + throw new Error('Only a callback is allowed as parameter on an already instantiated subscription.'); + } + + return { + method: this.options.type + '_subscribe', + params: params + }; +}; + +/** + * Unsubscribes and clears callbacks + * + * @method unsubscribe + * @return {Object} + */ +Subscription.prototype.unsubscribe = function(callback) { + this.options.requestManager.removeSubscription(this.id, callback); + this.id = null; + this.removeAllListeners(); + clearInterval(this._reconnectIntervalId); +}; + +/** + * Subscribes and watches for changes + * + * @method subscribe + * @param {String} subscription the subscription + * @param {Object} options the options object with address topics and fromBlock + * @return {Object} + */ +Subscription.prototype.subscribe = function() { + var _this = this; + var args = Array.prototype.slice.call(arguments); + var payload = this._toPayload(args); + + if(!payload) { + return this; + } + + if(!this.options.requestManager.provider) { + var err1 = new Error('No provider set.'); + this.callback(err1, null, this); + this.emit('error', err1); + return this; + } + + // throw error, if provider doesnt support subscriptions + if(!this.options.requestManager.provider.on) { + var err2 = new Error('The current provider doesn\'t support subscriptions: '+ this.options.requestManager.provider.constructor.name); + this.callback(err2, null, this); + this.emit('error', err2); + return this; + } + + // if id is there unsubscribe first + if (this.id) { + this.unsubscribe(); + } + + // store the params in the options object + this.options.params = payload.params[1]; + + // get past logs, if fromBlock is available + if(payload.params[0] === 'logs' && _.isObject(payload.params[1]) && payload.params[1].hasOwnProperty('fromBlock') && isFinite(payload.params[1].fromBlock)) { + // send the subscription request + this.options.requestManager.send({ + method: 'eth_getLogs', + params: [payload.params[1]] + }, function (err, logs) { + if(!err) { + logs.forEach(function(log){ + var output = _this._formatOutput(log); + _this.callback(null, output, _this); + _this.emit('data', output); + }); + + // TODO subscribe here? after the past logs? + + } else { + _this.callback(err, null, _this); + _this.emit('error', err); + } + }); + } + + // create subscription + // TODO move to separate function? so that past logs can go first? + + if(typeof payload.params[1] === 'object') + delete payload.params[1].fromBlock; + + this.options.requestManager.send(payload, function (err, result) { + if(!err && result) { + _this.id = result; + + // call callback on notifications + _this.options.requestManager.addSubscription(_this.id, payload.params[0] , _this.options.type, function(err, result) { + + if (!err) { + if (!_.isArray(result)) { + result = [result]; + } + + result.forEach(function(resultItem) { + var output = _this._formatOutput(resultItem); + + if (_.isFunction(_this.options.subscription.subscriptionHandler)) { + return _this.options.subscription.subscriptionHandler.call(_this, output); + } else { + _this.emit('data', output); + } + + // call the callback, last so that unsubscribe there won't affect the emit above + _this.callback(null, output, _this); + }); + } else { + // unsubscribe, but keep listeners + _this.options.requestManager.removeSubscription(_this.id); + + // re-subscribe, if connection fails + if(_this.options.requestManager.provider.once) { + _this._reconnectIntervalId = setInterval(function () { + // TODO check if that makes sense! + if (_this.options.requestManager.provider.reconnect) { + _this.options.requestManager.provider.reconnect(); + } + }, 500); + + _this.options.requestManager.provider.once('connect', function () { + clearInterval(_this._reconnectIntervalId); + _this.subscribe(_this.callback); + }); + } + _this.emit('error', err); + + // call the callback, last so that unsubscribe there won't affect the emit above + _this.callback(err, null, _this); + } + }); + } else { + _this.callback(err, null, _this); + _this.emit('error', err); + } + }); + + // return an object to cancel the subscription + return this; +}; + +module.exports = Subscription; + +},{"eventemitter3":156,"underscore":325,"web3-core-helpers":338}],347:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . + */ +/** + * @file extend.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + + +var formatters = require('web3-core-helpers').formatters; +var Method = require('web3-core-method'); +var utils = require('web3-utils'); + + +var extend = function (pckg) { + /* jshint maxcomplexity:5 */ + var ex = function (extension) { + + var extendedObject; + if (extension.property) { + if (!pckg[extension.property]) { + pckg[extension.property] = {}; + } + extendedObject = pckg[extension.property]; + } else { + extendedObject = pckg; + } + + if (extension.methods) { + extension.methods.forEach(function (method) { + if(!(method instanceof Method)) { + method = new Method(method); + } + + method.attachToObject(extendedObject); + method.setRequestManager(pckg._requestManager); + }); + } + + return pckg; + }; + + ex.formatters = formatters; + ex.utils = utils; + ex.Method = Method; + + return ex; +}; + + + +module.exports = extend; + + +},{"web3-core-helpers":338,"web3-core-method":339,"web3-utils":403}],348:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + + +var requestManager = require('web3-core-requestmanager'); +var extend = require('./extend.js'); + +module.exports = { + packageInit: function (pkg, args) { + args = Array.prototype.slice.call(args); + + if (!pkg) { + throw new Error('You need to instantiate using the "new" keyword.'); + } + + + // make property of pkg._provider, which can properly set providers + Object.defineProperty(pkg, 'currentProvider', { + get: function () { + return pkg._provider; + }, + set: function (value) { + return pkg.setProvider(value); + }, + enumerable: true, + configurable: true + }); + + // inherit from web3 umbrella package + if (args[0] && args[0]._requestManager) { + pkg._requestManager = new requestManager.Manager(args[0].currentProvider); + + // set requestmanager on package + } else { + pkg._requestManager = new requestManager.Manager(); + pkg._requestManager.setProvider(args[0], args[1]); + } + + // add givenProvider + pkg.givenProvider = requestManager.Manager.givenProvider; + pkg.providers = requestManager.Manager.providers; + + pkg._provider = pkg._requestManager.provider; + + // add SETPROVIDER function (don't overwrite if already existing) + if (!pkg.setProvider) { + pkg.setProvider = function (provider, net) { + pkg._requestManager.setProvider(provider, net); + pkg._provider = pkg._requestManager.provider; + return true; + }; + } + + // attach batch request creation + pkg.BatchRequest = requestManager.BatchManager.bind(null, pkg._requestManager); + + // attach extend function + pkg.extend = extend(pkg); + }, + addProviders: function (pkg) { + pkg.givenProvider = requestManager.Manager.givenProvider; + pkg.providers = requestManager.Manager.providers; + } +}; + + +},{"./extend.js":347,"web3-core-requestmanager":343}],349:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . + */ +/** + * @file index.js + * @author Marek Kotewicz + * @author Fabian Vogelsteller + * @date 2018 + */ + +var _ = require('underscore'); +var utils = require('web3-utils'); + +var EthersAbi = require('ethers/utils/abi-coder').AbiCoder; +var ethersAbiCoder = new EthersAbi(function (type, value) { + if (type.match(/^u?int/) && !_.isArray(value) && (!_.isObject(value) || value.constructor.name !== 'BN')) { + return value.toString(); + } + return value; +}); + +// result method +function Result() { +} + +/** + * ABICoder prototype should be used to encode/decode solidity params of any type + */ +var ABICoder = function () { +}; + +/** + * Encodes the function name to its ABI representation, which are the first 4 bytes of the sha3 of the function name including types. + * + * @method encodeFunctionSignature + * @param {String|Object} functionName + * @return {String} encoded function name + */ +ABICoder.prototype.encodeFunctionSignature = function (functionName) { + if (_.isObject(functionName)) { + functionName = utils._jsonInterfaceMethodToString(functionName); + } + + return utils.sha3(functionName).slice(0, 10); +}; + +/** + * Encodes the function name to its ABI representation, which are the first 4 bytes of the sha3 of the function name including types. + * + * @method encodeEventSignature + * @param {String|Object} functionName + * @return {String} encoded function name + */ +ABICoder.prototype.encodeEventSignature = function (functionName) { + if (_.isObject(functionName)) { + functionName = utils._jsonInterfaceMethodToString(functionName); + } + + return utils.sha3(functionName); +}; + +/** + * Should be used to encode plain param + * + * @method encodeParameter + * @param {String} type + * @param {Object} param + * @return {String} encoded plain param + */ +ABICoder.prototype.encodeParameter = function (type, param) { + return this.encodeParameters([type], [param]); +}; + +/** + * Should be used to encode list of params + * + * @method encodeParameters + * @param {Array} types + * @param {Array} params + * @return {String} encoded list of params + */ +ABICoder.prototype.encodeParameters = function (types, params) { + return ethersAbiCoder.encode(this.mapTypes(types), params); +}; + +/** + * Map types if simplified format is used + * + * @method mapTypes + * @param {Array} types + * @return {Array} + */ +ABICoder.prototype.mapTypes = function (types) { + var self = this; + var mappedTypes = []; + types.forEach(function (type) { + if (self.isSimplifiedStructFormat(type)) { + var structName = Object.keys(type)[0]; + mappedTypes.push( + Object.assign( + self.mapStructNameAndType(structName), + { + components: self.mapStructToCoderFormat(type[structName]) + } + ) + ); + + return; + } + + mappedTypes.push(type); + }); + + return mappedTypes; +}; + +/** + * Check if type is simplified struct format + * + * @method isSimplifiedStructFormat + * @param {string | Object} type + * @returns {boolean} + */ +ABICoder.prototype.isSimplifiedStructFormat = function (type) { + return typeof type === 'object' && typeof type.components === 'undefined' && typeof type.name === 'undefined'; +}; + +/** + * Maps the correct tuple type and name when the simplified format in encode/decodeParameter is used + * + * @method mapStructNameAndType + * @param {string} structName + * @return {{type: string, name: *}} + */ +ABICoder.prototype.mapStructNameAndType = function (structName) { + var type = 'tuple'; + + if (structName.indexOf('[]') > -1) { + type = 'tuple[]'; + structName = structName.slice(0, -2); + } + + return {type: type, name: structName}; +}; + +/** + * Maps the simplified format in to the expected format of the ABICoder + * + * @method mapStructToCoderFormat + * @param {Object} struct + * @return {Array} + */ +ABICoder.prototype.mapStructToCoderFormat = function (struct) { + var self = this; + var components = []; + Object.keys(struct).forEach(function (key) { + if (typeof struct[key] === 'object') { + components.push( + Object.assign( + self.mapStructNameAndType(key), + { + components: self.mapStructToCoderFormat(struct[key]) + } + ) + ); + + return; + } + + components.push({ + name: key, + type: struct[key] + }); + }); + + return components; +}; + +/** + * Encodes a function call from its json interface and parameters. + * + * @method encodeFunctionCall + * @param {Array} jsonInterface + * @param {Array} params + * @return {String} The encoded ABI for this function call + */ +ABICoder.prototype.encodeFunctionCall = function (jsonInterface, params) { + return this.encodeFunctionSignature(jsonInterface) + this.encodeParameters(jsonInterface.inputs, params).replace('0x', ''); +}; + +/** + * Should be used to decode bytes to plain param + * + * @method decodeParameter + * @param {String} type + * @param {String} bytes + * @return {Object} plain param + */ +ABICoder.prototype.decodeParameter = function (type, bytes) { + return this.decodeParameters([type], bytes)[0]; +}; + +/** + * Should be used to decode list of params + * + * @method decodeParameter + * @param {Array} outputs + * @param {String} bytes + * @return {Array} array of plain params + */ +ABICoder.prototype.decodeParameters = function (outputs, bytes) { + if (!bytes || bytes === '0x' || bytes === '0X') { + throw new Error('Returned values aren\'t valid, did it run Out of Gas?'); + } + + var res = ethersAbiCoder.decode(this.mapTypes(outputs), '0x' + bytes.replace(/0x/i, '')); + var returnValue = new Result(); + returnValue.__length__ = 0; + + outputs.forEach(function (output, i) { + var decodedValue = res[returnValue.__length__]; + decodedValue = (decodedValue === '0x') ? null : decodedValue; + + returnValue[i] = decodedValue; + + if (_.isObject(output) && output.name) { + returnValue[output.name] = decodedValue; + } + + returnValue.__length__++; + }); + + return returnValue; +}; + +/** + * Decodes events non- and indexed parameters. + * + * @method decodeLog + * @param {Object} inputs + * @param {String} data + * @param {Array} topics + * @return {Array} array of plain params + */ +ABICoder.prototype.decodeLog = function (inputs, data, topics) { + var _this = this; + topics = _.isArray(topics) ? topics : [topics]; + + data = data || ''; + + var notIndexedInputs = []; + var indexedParams = []; + var topicCount = 0; + + // TODO check for anonymous logs? + + inputs.forEach(function (input, i) { + if (input.indexed) { + indexedParams[i] = (['bool', 'int', 'uint', 'address', 'fixed', 'ufixed'].find(function (staticType) { + return input.type.indexOf(staticType) !== -1; + })) ? _this.decodeParameter(input.type, topics[topicCount]) : topics[topicCount]; + topicCount++; + } else { + notIndexedInputs[i] = input; + } + }); + + + var nonIndexedData = data; + var notIndexedParams = (nonIndexedData) ? this.decodeParameters(notIndexedInputs, nonIndexedData) : []; + + var returnValue = new Result(); + returnValue.__length__ = 0; + + + inputs.forEach(function (res, i) { + returnValue[i] = (res.type === 'string') ? '' : null; + + if (typeof notIndexedParams[i] !== 'undefined') { + returnValue[i] = notIndexedParams[i]; + } + if (typeof indexedParams[i] !== 'undefined') { + returnValue[i] = indexedParams[i]; + } + + if (res.name) { + returnValue[res.name] = returnValue[i]; + } + + returnValue.__length__++; + }); + + return returnValue; +}; + +var coder = new ABICoder(); + +module.exports = coder; + +},{"ethers/utils/abi-coder":143,"underscore":325,"web3-utils":403}],350:[function(require,module,exports){ +(function (Buffer){ +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + +var Bytes = require("./bytes"); +var Nat = require("./nat"); +var elliptic = require("elliptic"); +var rlp = require("./rlp"); +var secp256k1 = new elliptic.ec("secp256k1"); // eslint-disable-line + +var _require = require("./hash"), + keccak256 = _require.keccak256, + keccak256s = _require.keccak256s; + +var create = function create(entropy) { + var innerHex = keccak256(Bytes.concat(Bytes.random(32), entropy || Bytes.random(32))); + var middleHex = Bytes.concat(Bytes.concat(Bytes.random(32), innerHex), Bytes.random(32)); + var outerHex = keccak256(middleHex); + return fromPrivate(outerHex); +}; + +var toChecksum = function toChecksum(address) { + var addressHash = keccak256s(address.slice(2)); + var checksumAddress = "0x"; + for (var i = 0; i < 40; i++) { + checksumAddress += parseInt(addressHash[i + 2], 16) > 7 ? address[i + 2].toUpperCase() : address[i + 2]; + }return checksumAddress; +}; + +var fromPrivate = function fromPrivate(privateKey) { + var buffer = new Buffer(privateKey.slice(2), "hex"); + var ecKey = secp256k1.keyFromPrivate(buffer); + var publicKey = "0x" + ecKey.getPublic(false, 'hex').slice(2); + var publicHash = keccak256(publicKey); + var address = toChecksum("0x" + publicHash.slice(-40)); + return { + address: address, + privateKey: privateKey + }; +}; + +var encodeSignature = function encodeSignature(_ref) { + var _ref2 = _slicedToArray(_ref, 3), + v = _ref2[0], + r = Bytes.pad(32, _ref2[1]), + s = Bytes.pad(32, _ref2[2]); + + return Bytes.flatten([r, s, v]); +}; + +var decodeSignature = function decodeSignature(hex) { + return [Bytes.slice(64, Bytes.length(hex), hex), Bytes.slice(0, 32, hex), Bytes.slice(32, 64, hex)]; +}; + +var makeSigner = function makeSigner(addToV) { + return function (hash, privateKey) { + var signature = secp256k1.keyFromPrivate(new Buffer(privateKey.slice(2), "hex")).sign(new Buffer(hash.slice(2), "hex"), { canonical: true }); + return encodeSignature([Nat.fromString(Bytes.fromNumber(addToV + signature.recoveryParam)), Bytes.pad(32, Bytes.fromNat("0x" + signature.r.toString(16))), Bytes.pad(32, Bytes.fromNat("0x" + signature.s.toString(16)))]); + }; +}; + +var sign = makeSigner(27); // v=27|28 instead of 0|1... + +var recover = function recover(hash, signature) { + var vals = decodeSignature(signature); + var vrs = { v: Bytes.toNumber(vals[0]), r: vals[1].slice(2), s: vals[2].slice(2) }; + var ecPublicKey = secp256k1.recoverPubKey(new Buffer(hash.slice(2), "hex"), vrs, vrs.v < 2 ? vrs.v : 1 - vrs.v % 2); // because odd vals mean v=0... sadly that means v=0 means v=1... I hate that + var publicKey = "0x" + ecPublicKey.encode("hex", false).slice(2); + var publicHash = keccak256(publicKey); + var address = toChecksum("0x" + publicHash.slice(-40)); + return address; +}; + +module.exports = { + create: create, + toChecksum: toChecksum, + fromPrivate: fromPrivate, + sign: sign, + makeSigner: makeSigner, + recover: recover, + encodeSignature: encodeSignature, + decodeSignature: decodeSignature +}; +}).call(this,require("buffer").Buffer) +},{"./bytes":352,"./hash":353,"./nat":354,"./rlp":355,"buffer":84,"elliptic":109}],351:[function(require,module,exports){ +arguments[4][132][0].apply(exports,arguments) +},{"dup":132}],352:[function(require,module,exports){ +arguments[4][133][0].apply(exports,arguments) +},{"./array.js":351,"dup":133}],353:[function(require,module,exports){ +arguments[4][134][0].apply(exports,arguments) +},{"dup":134}],354:[function(require,module,exports){ +var BN = require("bn.js"); +var Bytes = require("./bytes"); + +var fromBN = function fromBN(bn) { + return "0x" + bn.toString("hex"); +}; + +var toBN = function toBN(str) { + return new BN(str.slice(2), 16); +}; + +var fromString = function fromString(str) { + var bn = "0x" + (str.slice(0, 2) === "0x" ? new BN(str.slice(2), 16) : new BN(str, 10)).toString("hex"); + return bn === "0x0" ? "0x" : bn; +}; + +var toEther = function toEther(wei) { + return toNumber(div(wei, fromString("10000000000"))) / 100000000; +}; + +var fromEther = function fromEther(eth) { + return mul(fromNumber(Math.floor(eth * 100000000)), fromString("10000000000")); +}; + +var toString = function toString(a) { + return toBN(a).toString(10); +}; + +var fromNumber = function fromNumber(a) { + return typeof a === "string" ? /^0x/.test(a) ? a : "0x" + a : "0x" + new BN(a).toString("hex"); +}; + +var toNumber = function toNumber(a) { + return toBN(a).toNumber(); +}; + +var toUint256 = function toUint256(a) { + return Bytes.pad(32, a); +}; + +var bin = function bin(method) { + return function (a, b) { + return fromBN(toBN(a)[method](toBN(b))); + }; +}; + +var add = bin("add"); +var mul = bin("mul"); +var div = bin("div"); +var sub = bin("sub"); + +module.exports = { + toString: toString, + fromString: fromString, + toNumber: toNumber, + fromNumber: fromNumber, + toEther: toEther, + fromEther: fromEther, + toUint256: toUint256, + add: add, + mul: mul, + div: div, + sub: sub +}; +},{"./bytes":352,"bn.js":53}],355:[function(require,module,exports){ +// The RLP format +// Serialization and deserialization for the BytesTree type, under the following grammar: +// | First byte | Meaning | +// | ---------- | -------------------------------------------------------------------------- | +// | 0 to 127 | HEX(leaf) | +// | 128 to 183 | HEX(length_of_leaf + 128) + HEX(leaf) | +// | 184 to 191 | HEX(length_of_length_of_leaf + 128 + 55) + HEX(length_of_leaf) + HEX(leaf) | +// | 192 to 247 | HEX(length_of_node + 192) + HEX(node) | +// | 248 to 255 | HEX(length_of_length_of_node + 128 + 55) + HEX(length_of_node) + HEX(node) | + +var encode = function encode(tree) { + var padEven = function padEven(str) { + return str.length % 2 === 0 ? str : "0" + str; + }; + + var uint = function uint(num) { + return padEven(num.toString(16)); + }; + + var length = function length(len, add) { + return len < 56 ? uint(add + len) : uint(add + uint(len).length / 2 + 55) + uint(len); + }; + + var dataTree = function dataTree(tree) { + if (typeof tree === "string") { + var hex = tree.slice(2); + var pre = hex.length != 2 || hex >= "80" ? length(hex.length / 2, 128) : ""; + return pre + hex; + } else { + var _hex = tree.map(dataTree).join(""); + var _pre = length(_hex.length / 2, 192); + return _pre + _hex; + } + }; + + return "0x" + dataTree(tree); +}; + +var decode = function decode(hex) { + var i = 2; + + var parseTree = function parseTree() { + if (i >= hex.length) throw ""; + var head = hex.slice(i, i + 2); + return head < "80" ? (i += 2, "0x" + head) : head < "c0" ? parseHex() : parseList(); + }; + + var parseLength = function parseLength() { + var len = parseInt(hex.slice(i, i += 2), 16) % 64; + return len < 56 ? len : parseInt(hex.slice(i, i += (len - 55) * 2), 16); + }; + + var parseHex = function parseHex() { + var len = parseLength(); + return "0x" + hex.slice(i, i += len * 2); + }; + + var parseList = function parseList() { + var lim = parseLength() * 2 + i; + var list = []; + while (i < lim) { + list.push(parseTree()); + }return list; + }; + + try { + return parseTree(); + } catch (e) { + return []; + } +}; + +module.exports = { encode: encode, decode: decode }; +},{}],356:[function(require,module,exports){ +(function (global){ + +var rng; + +if (global.crypto && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + rng = function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; +} + +if (!rng) { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var _rnds = new Array(16); + rng = function() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; +} + +module.exports = rng; + + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],357:[function(require,module,exports){ +// uuid.js +// +// Copyright (c) 2010-2012 Robert Kieffer +// MIT License - http://opensource.org/licenses/mit-license.php + +// Unique ID creation requires a high quality random # generator. We feature +// detect to determine the best RNG source, normalizing to a function that +// returns 128-bits of randomness, since that's what's usually required +var _rng = require('./rng'); + +// Maps for number <-> hex string conversion +var _byteToHex = []; +var _hexToByte = {}; +for (var i = 0; i < 256; i++) { + _byteToHex[i] = (i + 0x100).toString(16).substr(1); + _hexToByte[_byteToHex[i]] = i; +} + +// **`parse()` - Parse a UUID into it's component bytes** +function parse(s, buf, offset) { + var i = (buf && offset) || 0, ii = 0; + + buf = buf || []; + s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { + if (ii < 16) { // Don't overflow! + buf[i + ii++] = _hexToByte[oct]; + } + }); + + // Zero out remaining bytes if string was short + while (ii < 16) { + buf[i + ii++] = 0; + } + + return buf; +} + +// **`unparse()` - Convert UUID byte array (ala parse()) into a string** +function unparse(buf, offset) { + var i = offset || 0, bth = _byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]]; +} + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +// random #'s we need to init node and clockseq +var _seedBytes = _rng(); + +// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) +var _nodeId = [ + _seedBytes[0] | 0x01, + _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] +]; + +// Per 4.2.2, randomize (14 bit) clockseq +var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; + +// Previous uuid creation time +var _lastMSecs = 0, _lastNSecs = 0; + +// See https://github.com/broofa/node-uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + var node = options.node || _nodeId; + for (var n = 0; n < 6; n++) { + b[i + n] = node[n]; + } + + return buf ? buf : unparse(b); +} + +// **`v4()` - Generate random UUID** + +// See https://github.com/broofa/node-uuid for API details +function v4(options, buf, offset) { + // Deprecated - 'format' argument, as supported in v1.2 + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options == 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || _rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || unparse(rnds); +} + +// Export public API +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; +uuid.parse = parse; +uuid.unparse = unparse; + +module.exports = uuid; + +},{"./rng":356}],358:[function(require,module,exports){ +(function (global,Buffer){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . + */ +/** + * @file accounts.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var _ = require("underscore"); +var core = require('web3-core'); +var Method = require('web3-core-method'); +var Promise = require('any-promise'); +var Account = require("eth-lib/lib/account"); +var Hash = require("eth-lib/lib/hash"); +var RLP = require("eth-lib/lib/rlp"); +var Nat = require("eth-lib/lib/nat"); +var Bytes = require("eth-lib/lib/bytes"); +var cryp = (typeof global === 'undefined') ? require('crypto-browserify') : require('crypto'); +var scryptsy = require('scrypt.js'); +var uuid = require('uuid'); +var utils = require('web3-utils'); +var helpers = require('web3-core-helpers'); + +var isNot = function(value) { + return (_.isUndefined(value) || _.isNull(value)); +}; + +var trimLeadingZero = function (hex) { + while (hex && hex.startsWith('0x0')) { + hex = '0x' + hex.slice(3); + } + return hex; +}; + +var makeEven = function (hex) { + if(hex.length % 2 === 1) { + hex = hex.replace('0x', '0x0'); + } + return hex; +}; + + +var Accounts = function Accounts() { + var _this = this; + + // sets _requestmanager + core.packageInit(this, arguments); + + // remove unecessary core functions + delete this.BatchRequest; + delete this.extend; + + var _ethereumCall = [ + new Method({ + name: 'getId', + call: 'net_version', + params: 0, + outputFormatter: utils.hexToNumber + }), + new Method({ + name: 'getGasPrice', + call: 'eth_gasPrice', + params: 0 + }), + new Method({ + name: 'getTransactionCount', + call: 'eth_getTransactionCount', + params: 2, + inputFormatter: [function (address) { + if (utils.isAddress(address)) { + return address; + } else { + throw new Error('Address '+ address +' is not a valid address to get the "transactionCount".'); + } + }, function () { return 'latest'; }] + }) + ]; + // attach methods to this._ethereumCall + this._ethereumCall = {}; + _.each(_ethereumCall, function (method) { + method.attachToObject(_this._ethereumCall); + method.setRequestManager(_this._requestManager); + }); + + + this.wallet = new Wallet(this); +}; + +Accounts.prototype._addAccountFunctions = function (account) { + var _this = this; + + // add sign functions + account.signTransaction = function signTransaction(tx, callback) { + return _this.signTransaction(tx, account.privateKey, callback); + }; + account.sign = function sign(data) { + return _this.sign(data, account.privateKey); + }; + + account.encrypt = function encrypt(password, options) { + return _this.encrypt(account.privateKey, password, options); + }; + + + return account; +}; + +Accounts.prototype.create = function create(entropy) { + return this._addAccountFunctions(Account.create(entropy || utils.randomHex(32))); +}; + +Accounts.prototype.privateKeyToAccount = function privateKeyToAccount(privateKey) { + return this._addAccountFunctions(Account.fromPrivate(privateKey)); +}; + +Accounts.prototype.signTransaction = function signTransaction(tx, privateKey, callback) { + var _this = this, + error = false, + result; + + callback = callback || function () {}; + + if (!tx) { + error = new Error('No transaction object given!'); + + callback(error); + return Promise.reject(error); + } + + function signed (tx) { + + if (!tx.gas && !tx.gasLimit) { + error = new Error('"gas" is missing'); + } + + if (tx.nonce < 0 || + tx.gas < 0 || + tx.gasPrice < 0 || + tx.chainId < 0) { + error = new Error('Gas, gasPrice, nonce or chainId is lower than 0'); + } + + if (error) { + callback(error); + return Promise.reject(error); + } + + try { + tx = helpers.formatters.inputCallFormatter(tx); + + var transaction = tx; + transaction.to = tx.to || '0x'; + transaction.data = tx.data || '0x'; + transaction.value = tx.value || '0x'; + transaction.chainId = utils.numberToHex(tx.chainId); + + var rlpEncoded = RLP.encode([ + Bytes.fromNat(transaction.nonce), + Bytes.fromNat(transaction.gasPrice), + Bytes.fromNat(transaction.gas), + transaction.to.toLowerCase(), + Bytes.fromNat(transaction.value), + transaction.data, + Bytes.fromNat(transaction.chainId || "0x1"), + "0x", + "0x"]); + + + var hash = Hash.keccak256(rlpEncoded); + + var signature = Account.makeSigner(Nat.toNumber(transaction.chainId || "0x1") * 2 + 35)(Hash.keccak256(rlpEncoded), privateKey); + + var rawTx = RLP.decode(rlpEncoded).slice(0, 6).concat(Account.decodeSignature(signature)); + + rawTx[6] = makeEven(trimLeadingZero(rawTx[6])); + rawTx[7] = makeEven(trimLeadingZero(rawTx[7])); + rawTx[8] = makeEven(trimLeadingZero(rawTx[8])); + + var rawTransaction = RLP.encode(rawTx); + + var values = RLP.decode(rawTransaction); + result = { + messageHash: hash, + v: trimLeadingZero(values[6]), + r: trimLeadingZero(values[7]), + s: trimLeadingZero(values[8]), + rawTransaction: rawTransaction + }; + + } catch(e) { + callback(e); + return Promise.reject(e); + } + + callback(null, result); + return result; + } + + // Resolve immediately if nonce, chainId and price are provided + if (tx.nonce !== undefined && tx.chainId !== undefined && tx.gasPrice !== undefined) { + return Promise.resolve(signed(tx)); + } + + + // Otherwise, get the missing info from the Ethereum Node + return Promise.all([ + isNot(tx.chainId) ? _this._ethereumCall.getId() : tx.chainId, + isNot(tx.gasPrice) ? _this._ethereumCall.getGasPrice() : tx.gasPrice, + isNot(tx.nonce) ? _this._ethereumCall.getTransactionCount(_this.privateKeyToAccount(privateKey).address) : tx.nonce + ]).then(function (args) { + if (isNot(args[0]) || isNot(args[1]) || isNot(args[2])) { + throw new Error('One of the values "chainId", "gasPrice", or "nonce" couldn\'t be fetched: '+ JSON.stringify(args)); + } + return signed(_.extend(tx, {chainId: args[0], gasPrice: args[1], nonce: args[2]})); + }); +}; + +/* jshint ignore:start */ +Accounts.prototype.recoverTransaction = function recoverTransaction(rawTx) { + var values = RLP.decode(rawTx); + var signature = Account.encodeSignature(values.slice(6,9)); + var recovery = Bytes.toNumber(values[6]); + var extraData = recovery < 35 ? [] : [Bytes.fromNumber((recovery - 35) >> 1), "0x", "0x"]; + var signingData = values.slice(0,6).concat(extraData); + var signingDataHex = RLP.encode(signingData); + return Account.recover(Hash.keccak256(signingDataHex), signature); +}; +/* jshint ignore:end */ + +Accounts.prototype.hashMessage = function hashMessage(data) { + var message = utils.isHexStrict(data) ? utils.hexToBytes(data) : data; + var messageBuffer = Buffer.from(message); + var preamble = "\x19Ethereum Signed Message:\n" + message.length; + var preambleBuffer = Buffer.from(preamble); + var ethMessage = Buffer.concat([preambleBuffer, messageBuffer]); + return Hash.keccak256s(ethMessage); +}; + +Accounts.prototype.sign = function sign(data, privateKey) { + var hash = this.hashMessage(data); + var signature = Account.sign(hash, privateKey); + var vrs = Account.decodeSignature(signature); + return { + message: data, + messageHash: hash, + v: vrs[0], + r: vrs[1], + s: vrs[2], + signature: signature + }; +}; + +Accounts.prototype.recover = function recover(message, signature, preFixed) { + var args = [].slice.apply(arguments); + + + if (_.isObject(message)) { + return this.recover(message.messageHash, Account.encodeSignature([message.v, message.r, message.s]), true); + } + + if (!preFixed) { + message = this.hashMessage(message); + } + + if (args.length >= 4) { + preFixed = args.slice(-1)[0]; + preFixed = _.isBoolean(preFixed) ? !!preFixed : false; + + return this.recover(message, Account.encodeSignature(args.slice(1, 4)), preFixed); // v, r, s + } + return Account.recover(message, signature); +}; + +// Taken from https://github.com/ethereumjs/ethereumjs-wallet +Accounts.prototype.decrypt = function (v3Keystore, password, nonStrict) { + /* jshint maxcomplexity: 10 */ + + if(!_.isString(password)) { + throw new Error('No password given.'); + } + + var json = (_.isObject(v3Keystore)) ? v3Keystore : JSON.parse(nonStrict ? v3Keystore.toLowerCase() : v3Keystore); + + if (json.version !== 3) { + throw new Error('Not a valid V3 wallet'); + } + + var derivedKey; + var kdfparams; + if (json.crypto.kdf === 'scrypt') { + kdfparams = json.crypto.kdfparams; + + // FIXME: support progress reporting callback + derivedKey = scryptsy(new Buffer(password), new Buffer(kdfparams.salt, 'hex'), kdfparams.n, kdfparams.r, kdfparams.p, kdfparams.dklen); + } else if (json.crypto.kdf === 'pbkdf2') { + kdfparams = json.crypto.kdfparams; + + if (kdfparams.prf !== 'hmac-sha256') { + throw new Error('Unsupported parameters to PBKDF2'); + } + + derivedKey = cryp.pbkdf2Sync(new Buffer(password), new Buffer(kdfparams.salt, 'hex'), kdfparams.c, kdfparams.dklen, 'sha256'); + } else { + throw new Error('Unsupported key derivation scheme'); + } + + var ciphertext = new Buffer(json.crypto.ciphertext, 'hex'); + + var mac = utils.sha3(Buffer.concat([ derivedKey.slice(16, 32), ciphertext ])).replace('0x',''); + if (mac !== json.crypto.mac) { + throw new Error('Key derivation failed - possibly wrong password'); + } + + var decipher = cryp.createDecipheriv(json.crypto.cipher, derivedKey.slice(0, 16), new Buffer(json.crypto.cipherparams.iv, 'hex')); + var seed = '0x'+ Buffer.concat([ decipher.update(ciphertext), decipher.final() ]).toString('hex'); + + return this.privateKeyToAccount(seed); +}; + +Accounts.prototype.encrypt = function (privateKey, password, options) { + /* jshint maxcomplexity: 20 */ + var account = this.privateKeyToAccount(privateKey); + + options = options || {}; + var salt = options.salt || cryp.randomBytes(32); + var iv = options.iv || cryp.randomBytes(16); + + var derivedKey; + var kdf = options.kdf || 'scrypt'; + var kdfparams = { + dklen: options.dklen || 32, + salt: salt.toString('hex') + }; + + if (kdf === 'pbkdf2') { + kdfparams.c = options.c || 262144; + kdfparams.prf = 'hmac-sha256'; + derivedKey = cryp.pbkdf2Sync(new Buffer(password), salt, kdfparams.c, kdfparams.dklen, 'sha256'); + } else if (kdf === 'scrypt') { + // FIXME: support progress reporting callback + kdfparams.n = options.n || 8192; // 2048 4096 8192 16384 + kdfparams.r = options.r || 8; + kdfparams.p = options.p || 1; + derivedKey = scryptsy(new Buffer(password), salt, kdfparams.n, kdfparams.r, kdfparams.p, kdfparams.dklen); + } else { + throw new Error('Unsupported kdf'); + } + + var cipher = cryp.createCipheriv(options.cipher || 'aes-128-ctr', derivedKey.slice(0, 16), iv); + if (!cipher) { + throw new Error('Unsupported cipher'); + } + + var ciphertext = Buffer.concat([ cipher.update(new Buffer(account.privateKey.replace('0x',''), 'hex')), cipher.final() ]); + + var mac = utils.sha3(Buffer.concat([ derivedKey.slice(16, 32), new Buffer(ciphertext, 'hex') ])).replace('0x',''); + + return { + version: 3, + id: uuid.v4({ random: options.uuid || cryp.randomBytes(16) }), + address: account.address.toLowerCase().replace('0x',''), + crypto: { + ciphertext: ciphertext.toString('hex'), + cipherparams: { + iv: iv.toString('hex') + }, + cipher: options.cipher || 'aes-128-ctr', + kdf: kdf, + kdfparams: kdfparams, + mac: mac.toString('hex') + } + }; +}; + + +// Note: this is trying to follow closely the specs on +// http://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html + +function Wallet(accounts) { + this._accounts = accounts; + this.length = 0; + this.defaultKeyName = "web3js_wallet"; +} + +Wallet.prototype._findSafeIndex = function (pointer) { + pointer = pointer || 0; + if (_.has(this, pointer)) { + return this._findSafeIndex(pointer + 1); + } else { + return pointer; + } +}; + +Wallet.prototype._currentIndexes = function () { + var keys = Object.keys(this); + var indexes = keys + .map(function(key) { return parseInt(key); }) + .filter(function(n) { return (n < 9e20); }); + + return indexes; +}; + +Wallet.prototype.create = function (numberOfAccounts, entropy) { + for (var i = 0; i < numberOfAccounts; ++i) { + this.add(this._accounts.create(entropy).privateKey); + } + return this; +}; + +Wallet.prototype.add = function (account) { + + if (_.isString(account)) { + account = this._accounts.privateKeyToAccount(account); + } + if (!this[account.address]) { + account = this._accounts.privateKeyToAccount(account.privateKey); + account.index = this._findSafeIndex(); + + this[account.index] = account; + this[account.address] = account; + this[account.address.toLowerCase()] = account; + + this.length++; + + return account; + } else { + return this[account.address]; + } +}; + +Wallet.prototype.remove = function (addressOrIndex) { + var account = this[addressOrIndex]; + + if (account && account.address) { + // address + this[account.address].privateKey = null; + delete this[account.address]; + // address lowercase + this[account.address.toLowerCase()].privateKey = null; + delete this[account.address.toLowerCase()]; + // index + this[account.index].privateKey = null; + delete this[account.index]; + + this.length--; + + return true; + } else { + return false; + } +}; + +Wallet.prototype.clear = function () { + var _this = this; + var indexes = this._currentIndexes(); + + indexes.forEach(function(index) { + _this.remove(index); + }); + + return this; +}; + +Wallet.prototype.encrypt = function (password, options) { + var _this = this; + var indexes = this._currentIndexes(); + + var accounts = indexes.map(function(index) { + return _this[index].encrypt(password, options); + }); + + return accounts; +}; + + +Wallet.prototype.decrypt = function (encryptedWallet, password) { + var _this = this; + + encryptedWallet.forEach(function (keystore) { + var account = _this._accounts.decrypt(keystore, password); + + if (account) { + _this.add(account); + } else { + throw new Error('Couldn\'t decrypt accounts. Password wrong?'); + } + }); + + return this; +}; + +Wallet.prototype.save = function (password, keyName) { + localStorage.setItem(keyName || this.defaultKeyName, JSON.stringify(this.encrypt(password))); + + return true; +}; + +Wallet.prototype.load = function (password, keyName) { + var keystore = localStorage.getItem(keyName || this.defaultKeyName); + + if (keystore) { + try { + keystore = JSON.parse(keystore); + } catch(e) { + + } + } + + return this.decrypt(keystore || [], password); +}; + +if (typeof localStorage === 'undefined') { + delete Wallet.prototype.save; + delete Wallet.prototype.load; +} + + +module.exports = Accounts; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) +},{"any-promise":2,"buffer":84,"crypto":97,"crypto-browserify":97,"eth-lib/lib/account":350,"eth-lib/lib/bytes":352,"eth-lib/lib/hash":353,"eth-lib/lib/nat":354,"eth-lib/lib/rlp":355,"scrypt.js":293,"underscore":325,"uuid":357,"web3-core":348,"web3-core-helpers":338,"web3-core-method":339,"web3-utils":403}],359:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file contract.js + * + * To initialize a contract use: + * + * var Contract = require('web3-eth-contract'); + * Contract.setProvider('ws://localhost:8546'); + * var contract = new Contract(abi, address, ...); + * + * @author Fabian Vogelsteller + * @date 2017 + */ + + +"use strict"; + + +var _ = require('underscore'); +var core = require('web3-core'); +var Method = require('web3-core-method'); +var utils = require('web3-utils'); +var Subscription = require('web3-core-subscriptions').subscription; +var formatters = require('web3-core-helpers').formatters; +var errors = require('web3-core-helpers').errors; +var promiEvent = require('web3-core-promievent'); +var abi = require('web3-eth-abi'); + + +/** + * Should be called to create new contract instance + * + * @method Contract + * @constructor + * @param {Array} jsonInterface + * @param {String} address + * @param {Object} options + */ +var Contract = function Contract(jsonInterface, address, options) { + var _this = this, + args = Array.prototype.slice.call(arguments); + + if(!(this instanceof Contract)) { + throw new Error('Please use the "new" keyword to instantiate a web3.eth.contract() object!'); + } + + // sets _requestmanager + core.packageInit(this, [this.constructor.currentProvider]); + + this.clearSubscriptions = this._requestManager.clearSubscriptions; + + + + if(!jsonInterface || !(Array.isArray(jsonInterface))) { + throw new Error('You must provide the json interface of the contract when instantiating a contract object.'); + } + + + + // create the options object + this.options = {}; + + var lastArg = args[args.length - 1]; + if(_.isObject(lastArg) && !_.isArray(lastArg)) { + options = lastArg; + + this.options = _.extend(this.options, this._getOrSetDefaultOptions(options)); + if(_.isObject(address)) { + address = null; + } + } + + // set address + Object.defineProperty(this.options, 'address', { + set: function(value){ + if(value) { + _this._address = utils.toChecksumAddress(formatters.inputAddressFormatter(value)); + } + }, + get: function(){ + return _this._address; + }, + enumerable: true + }); + + // add method and event signatures, when the jsonInterface gets set + Object.defineProperty(this.options, 'jsonInterface', { + set: function(value){ + _this.methods = {}; + _this.events = {}; + + _this._jsonInterface = value.map(function(method) { + var func, + funcName; + + // make constant and payable backwards compatible + method.constant = (method.stateMutability === "view" || method.stateMutability === "pure" || method.constant); + method.payable = (method.stateMutability === "payable" || method.payable); + + + if (method.name) { + funcName = utils._jsonInterfaceMethodToString(method); + } + + + // function + if (method.type === 'function') { + method.signature = abi.encodeFunctionSignature(funcName); + func = _this._createTxObject.bind({ + method: method, + parent: _this + }); + + + // add method only if not one already exists + if(!_this.methods[method.name]) { + _this.methods[method.name] = func; + } else { + var cascadeFunc = _this._createTxObject.bind({ + method: method, + parent: _this, + nextMethod: _this.methods[method.name] + }); + _this.methods[method.name] = cascadeFunc; + } + + // definitely add the method based on its signature + _this.methods[method.signature] = func; + + // add method by name + _this.methods[funcName] = func; + + + // event + } else if (method.type === 'event') { + method.signature = abi.encodeEventSignature(funcName); + var event = _this._on.bind(_this, method.signature); + + // add method only if not already exists + if(!_this.events[method.name] || _this.events[method.name].name === 'bound ') + _this.events[method.name] = event; + + // definitely add the method based on its signature + _this.events[method.signature] = event; + + // add event by name + _this.events[funcName] = event; + } + + + return method; + }); + + // add allEvents + _this.events.allEvents = _this._on.bind(_this, 'allevents'); + + return _this._jsonInterface; + }, + get: function(){ + return _this._jsonInterface; + }, + enumerable: true + }); + + // get default account from the Class + var defaultAccount = this.constructor.defaultAccount; + var defaultBlock = this.constructor.defaultBlock || 'latest'; + + Object.defineProperty(this, 'defaultAccount', { + get: function () { + return defaultAccount; + }, + set: function (val) { + if(val) { + defaultAccount = utils.toChecksumAddress(formatters.inputAddressFormatter(val)); + } + + return val; + }, + enumerable: true + }); + Object.defineProperty(this, 'defaultBlock', { + get: function () { + return defaultBlock; + }, + set: function (val) { + defaultBlock = val; + + return val; + }, + enumerable: true + }); + + // properties + this.methods = {}; + this.events = {}; + + this._address = null; + this._jsonInterface = []; + + // set getter/setter properties + this.options.address = address; + this.options.jsonInterface = jsonInterface; + +}; + +Contract.setProvider = function(provider, accounts) { + // Contract.currentProvider = provider; + core.packageInit(this, [provider]); + + this._ethAccounts = accounts; +}; + + +/** + * Get the callback and modiufy the array if necessary + * + * @method _getCallback + * @param {Array} args + * @return {Function} the callback + */ +Contract.prototype._getCallback = function getCallback(args) { + if (args && _.isFunction(args[args.length - 1])) { + return args.pop(); // modify the args array! + } +}; + +/** + * Checks that no listener with name "newListener" or "removeListener" is added. + * + * @method _checkListener + * @param {String} type + * @param {String} event + * @return {Object} the contract instance + */ +Contract.prototype._checkListener = function(type, event){ + if(event === type) { + throw new Error('The event "'+ type +'" is a reserved event name, you can\'t use it.'); + } +}; + + +/** + * Use default values, if options are not available + * + * @method _getOrSetDefaultOptions + * @param {Object} options the options gived by the user + * @return {Object} the options with gaps filled by defaults + */ +Contract.prototype._getOrSetDefaultOptions = function getOrSetDefaultOptions(options) { + var gasPrice = options.gasPrice ? String(options.gasPrice): null; + var from = options.from ? utils.toChecksumAddress(formatters.inputAddressFormatter(options.from)) : null; + + options.data = options.data || this.options.data; + + options.from = from || this.options.from; + options.gasPrice = gasPrice || this.options.gasPrice; + options.gas = options.gas || options.gasLimit || this.options.gas; + + // TODO replace with only gasLimit? + delete options.gasLimit; + + return options; +}; + + +/** + * Should be used to encode indexed params and options to one final object + * + * @method _encodeEventABI + * @param {Object} event + * @param {Object} options + * @return {Object} everything combined together and encoded + */ +Contract.prototype._encodeEventABI = function (event, options) { + options = options || {}; + var filter = options.filter || {}, + result = {}; + + ['fromBlock', 'toBlock'].filter(function (f) { + return options[f] !== undefined; + }).forEach(function (f) { + result[f] = formatters.inputBlockNumberFormatter(options[f]); + }); + + // use given topics + if(_.isArray(options.topics)) { + result.topics = options.topics; + + // create topics based on filter + } else { + + result.topics = []; + + // add event signature + if (event && !event.anonymous && event.name !== 'ALLEVENTS') { + result.topics.push(event.signature); + } + + // add event topics (indexed arguments) + if (event.name !== 'ALLEVENTS') { + var indexedTopics = event.inputs.filter(function (i) { + return i.indexed === true; + }).map(function (i) { + var value = filter[i.name]; + if (!value) { + return null; + } + + // TODO: https://github.com/ethereum/web3.js/issues/344 + // TODO: deal properly with components + + if (_.isArray(value)) { + return value.map(function (v) { + return abi.encodeParameter(i.type, v); + }); + } + return abi.encodeParameter(i.type, value); + }); + + result.topics = result.topics.concat(indexedTopics); + } + + if(!result.topics.length) + delete result.topics; + } + + if(this.options.address) { + result.address = this.options.address.toLowerCase(); + } + + return result; +}; + +/** + * Should be used to decode indexed params and options + * + * @method _decodeEventABI + * @param {Object} data + * @return {Object} result object with decoded indexed && not indexed params + */ +Contract.prototype._decodeEventABI = function (data) { + var event = this; + + data.data = data.data || ''; + data.topics = data.topics || []; + var result = formatters.outputLogFormatter(data); + + // if allEvents get the right event + if(event.name === 'ALLEVENTS') { + event = event.jsonInterface.find(function (intf) { + return (intf.signature === data.topics[0]); + }) || {anonymous: true}; + } + + // create empty inputs if none are present (e.g. anonymous events on allEvents) + event.inputs = event.inputs || []; + + + var argTopics = event.anonymous ? data.topics : data.topics.slice(1); + + result.returnValues = abi.decodeLog(event.inputs, data.data, argTopics); + delete result.returnValues.__length__; + + // add name + result.event = event.name; + + // add signature + result.signature = (event.anonymous || !data.topics[0]) ? null : data.topics[0]; + + // move the data and topics to "raw" + result.raw = { + data: result.data, + topics: result.topics + }; + delete result.data; + delete result.topics; + + + return result; +}; + +/** + * Encodes an ABI for a method, including signature or the method. + * Or when constructor encodes only the constructor parameters. + * + * @method _encodeMethodABI + * @param {Mixed} args the arguments to encode + * @param {String} the encoded ABI + */ +Contract.prototype._encodeMethodABI = function _encodeMethodABI() { + var methodSignature = this._method.signature, + args = this.arguments || []; + + var signature = false, + paramsABI = this._parent.options.jsonInterface.filter(function (json) { + return ((methodSignature === 'constructor' && json.type === methodSignature) || + ((json.signature === methodSignature || json.signature === methodSignature.replace('0x','') || json.name === methodSignature) && json.type === 'function')); + }).map(function (json) { + var inputLength = (_.isArray(json.inputs)) ? json.inputs.length : 0; + + if (inputLength !== args.length) { + throw new Error('The number of arguments is not matching the methods required number. You need to pass '+ inputLength +' arguments.'); + } + + if (json.type === 'function') { + signature = json.signature; + } + return _.isArray(json.inputs) ? json.inputs : []; + }).map(function (inputs) { + return abi.encodeParameters(inputs, args).replace('0x',''); + })[0] || ''; + + // return constructor + if(methodSignature === 'constructor') { + if(!this._deployData) + throw new Error('The contract has no contract data option set. This is necessary to append the constructor parameters.'); + + return this._deployData + paramsABI; + + // return method + } else { + + var returnValue = (signature) ? signature + paramsABI : paramsABI; + + if(!returnValue) { + throw new Error('Couldn\'t find a matching contract method named "'+ this._method.name +'".'); + } else { + return returnValue; + } + } + +}; + + +/** + * Decode method return values + * + * @method _decodeMethodReturn + * @param {Array} outputs + * @param {String} returnValues + * @return {Object} decoded output return values + */ +Contract.prototype._decodeMethodReturn = function (outputs, returnValues) { + if (!returnValues) { + return null; + } + + returnValues = returnValues.length >= 2 ? returnValues.slice(2) : returnValues; + var result = abi.decodeParameters(outputs, returnValues); + + if (result.__length__ === 1) { + return result[0]; + } else { + delete result.__length__; + return result; + } +}; + + +/** + * Deploys a contract and fire events based on its state: transactionHash, receipt + * + * All event listeners will be removed, once the last possible event is fired ("error", or "receipt") + * + * @method deploy + * @param {Object} options + * @param {Function} callback + * @return {Object} EventEmitter possible events are "error", "transactionHash" and "receipt" + */ +Contract.prototype.deploy = function(options, callback){ + + options = options || {}; + + options.arguments = options.arguments || []; + options = this._getOrSetDefaultOptions(options); + + + // return error, if no "data" is specified + if(!options.data) { + return utils._fireError(new Error('No "data" specified in neither the given options, nor the default options.'), null, null, callback); + } + + var constructor = _.find(this.options.jsonInterface, function (method) { + return (method.type === 'constructor'); + }) || {}; + constructor.signature = 'constructor'; + + return this._createTxObject.apply({ + method: constructor, + parent: this, + deployData: options.data, + _ethAccounts: this.constructor._ethAccounts + }, options.arguments); + +}; + +/** + * Gets the event signature and outputformatters + * + * @method _generateEventOptions + * @param {Object} event + * @param {Object} options + * @param {Function} callback + * @return {Object} the event options object + */ +Contract.prototype._generateEventOptions = function() { + var args = Array.prototype.slice.call(arguments); + + // get the callback + var callback = this._getCallback(args); + + // get the options + var options = (_.isObject(args[args.length - 1])) ? args.pop() : {}; + + var event = (_.isString(args[0])) ? args[0] : 'allevents'; + event = (event.toLowerCase() === 'allevents') ? { + name: 'ALLEVENTS', + jsonInterface: this.options.jsonInterface + } : this.options.jsonInterface.find(function (json) { + return (json.type === 'event' && (json.name === event || json.signature === '0x'+ event.replace('0x',''))); + }); + + if (!event) { + throw new Error('Event "' + event.name + '" doesn\'t exist in this contract.'); + } + + if (!utils.isAddress(this.options.address)) { + throw new Error('This contract object doesn\'t have address set yet, please set an address first.'); + } + + return { + params: this._encodeEventABI(event, options), + event: event, + callback: callback + }; +}; + +/** + * Adds event listeners and creates a subscription, and remove it once its fired. + * + * @method clone + * @return {Object} the event subscription + */ +Contract.prototype.clone = function() { + return new this.constructor(this.options.jsonInterface, this.options.address, this.options); +}; + + +/** + * Adds event listeners and creates a subscription, and remove it once its fired. + * + * @method once + * @param {String} event + * @param {Object} options + * @param {Function} callback + * @return {Object} the event subscription + */ +Contract.prototype.once = function(event, options, callback) { + var args = Array.prototype.slice.call(arguments); + + // get the callback + callback = this._getCallback(args); + + if (!callback) { + throw new Error('Once requires a callback as the second parameter.'); + } + + // don't allow fromBlock + if (options) + delete options.fromBlock; + + // don't return as once shouldn't provide "on" + this._on(event, options, function (err, res, sub) { + sub.unsubscribe(); + if(_.isFunction(callback)){ + callback(err, res, sub); + } + }); + + return undefined; +}; + +/** + * Adds event listeners and creates a subscription. + * + * @method _on + * @param {String} event + * @param {Object} options + * @param {Function} callback + * @return {Object} the event subscription + */ +Contract.prototype._on = function(){ + var subOptions = this._generateEventOptions.apply(this, arguments); + + + // prevent the event "newListener" and "removeListener" from being overwritten + this._checkListener('newListener', subOptions.event.name, subOptions.callback); + this._checkListener('removeListener', subOptions.event.name, subOptions.callback); + + // TODO check if listener already exists? and reuse subscription if options are the same. + + // create new subscription + var subscription = new Subscription({ + subscription: { + params: 1, + inputFormatter: [formatters.inputLogFormatter], + outputFormatter: this._decodeEventABI.bind(subOptions.event), + // DUBLICATE, also in web3-eth + subscriptionHandler: function (output) { + if(output.removed) { + this.emit('changed', output); + } else { + this.emit('data', output); + } + + if (_.isFunction(this.callback)) { + this.callback(null, output, this); + } + } + }, + type: 'eth', + requestManager: this._requestManager + }); + subscription.subscribe('logs', subOptions.params, subOptions.callback || function () {}); + + return subscription; +}; + +/** + * Get past events from contracts + * + * @method getPastEvents + * @param {String} event + * @param {Object} options + * @param {Function} callback + * @return {Object} the promievent + */ +Contract.prototype.getPastEvents = function(){ + var subOptions = this._generateEventOptions.apply(this, arguments); + + var getPastLogs = new Method({ + name: 'getPastLogs', + call: 'eth_getLogs', + params: 1, + inputFormatter: [formatters.inputLogFormatter], + outputFormatter: this._decodeEventABI.bind(subOptions.event) + }); + getPastLogs.setRequestManager(this._requestManager); + var call = getPastLogs.buildCall(); + + getPastLogs = null; + + return call(subOptions.params, subOptions.callback); +}; + + +/** + * returns the an object with call, send, estimate functions + * + * @method _createTxObject + * @returns {Object} an object with functions to call the methods + */ +Contract.prototype._createTxObject = function _createTxObject(){ + var args = Array.prototype.slice.call(arguments); + var txObject = {}; + + if(this.method.type === 'function') { + + txObject.call = this.parent._executeMethod.bind(txObject, 'call'); + txObject.call.request = this.parent._executeMethod.bind(txObject, 'call', true); // to make batch requests + + } + + txObject.send = this.parent._executeMethod.bind(txObject, 'send'); + txObject.send.request = this.parent._executeMethod.bind(txObject, 'send', true); // to make batch requests + txObject.encodeABI = this.parent._encodeMethodABI.bind(txObject); + txObject.estimateGas = this.parent._executeMethod.bind(txObject, 'estimate'); + + if (args && this.method.inputs && args.length !== this.method.inputs.length) { + if (this.nextMethod) { + return this.nextMethod.apply(null, args); + } + throw errors.InvalidNumberOfParams(args.length, this.method.inputs.length, this.method.name); + } + + txObject.arguments = args || []; + txObject._method = this.method; + txObject._parent = this.parent; + txObject._ethAccounts = this.parent.constructor._ethAccounts || this._ethAccounts; + + if(this.deployData) { + txObject._deployData = this.deployData; + } + + return txObject; +}; + + +/** + * Generates the options for the execute call + * + * @method _processExecuteArguments + * @param {Array} args + * @param {Promise} defer + */ +Contract.prototype._processExecuteArguments = function _processExecuteArguments(args, defer) { + var processedArgs = {}; + + processedArgs.type = args.shift(); + + // get the callback + processedArgs.callback = this._parent._getCallback(args); + + // get block number to use for call + if(processedArgs.type === 'call' && args[args.length - 1] !== true && (_.isString(args[args.length - 1]) || isFinite(args[args.length - 1]))) + processedArgs.defaultBlock = args.pop(); + + // get the options + processedArgs.options = (_.isObject(args[args.length - 1])) ? args.pop() : {}; + + // get the generateRequest argument for batch requests + processedArgs.generateRequest = (args[args.length - 1] === true)? args.pop() : false; + + processedArgs.options = this._parent._getOrSetDefaultOptions(processedArgs.options); + processedArgs.options.data = this.encodeABI(); + + // add contract address + if(!this._deployData && !utils.isAddress(this._parent.options.address)) + throw new Error('This contract object doesn\'t have address set yet, please set an address first.'); + + if(!this._deployData) + processedArgs.options.to = this._parent.options.address; + + // return error, if no "data" is specified + if(!processedArgs.options.data) + return utils._fireError(new Error('Couldn\'t find a matching contract method, or the number of parameters is wrong.'), defer.eventEmitter, defer.reject, processedArgs.callback); + + return processedArgs; +}; + +/** + * Executes a call, transact or estimateGas on a contract function + * + * @method _executeMethod + * @param {String} type the type this execute function should execute + * @param {Boolean} makeRequest if true, it simply returns the request parameters, rather than executing it + */ +Contract.prototype._executeMethod = function _executeMethod(){ + var _this = this, + args = this._parent._processExecuteArguments.call(this, Array.prototype.slice.call(arguments), defer), + defer = promiEvent((args.type !== 'send')), + ethAccounts = _this.constructor._ethAccounts || _this._ethAccounts; + + // simple return request for batch requests + if(args.generateRequest) { + + var payload = { + params: [formatters.inputCallFormatter.call(this._parent, args.options)], + callback: args.callback + }; + + if(args.type === 'call') { + payload.params.push(formatters.inputDefaultBlockNumberFormatter.call(this._parent, args.defaultBlock)); + payload.method = 'eth_call'; + payload.format = this._parent._decodeMethodReturn.bind(null, this._method.outputs); + } else { + payload.method = 'eth_sendTransaction'; + } + + return payload; + + } else { + + switch (args.type) { + case 'estimate': + + var estimateGas = (new Method({ + name: 'estimateGas', + call: 'eth_estimateGas', + params: 1, + inputFormatter: [formatters.inputCallFormatter], + outputFormatter: utils.hexToNumber, + requestManager: _this._parent._requestManager, + accounts: ethAccounts, // is eth.accounts (necessary for wallet signing) + defaultAccount: _this._parent.defaultAccount, + defaultBlock: _this._parent.defaultBlock + })).createFunction(); + + return estimateGas(args.options, args.callback); + + case 'call': + + // TODO check errors: missing "from" should give error on deploy and send, call ? + + var call = (new Method({ + name: 'call', + call: 'eth_call', + params: 2, + inputFormatter: [formatters.inputCallFormatter, formatters.inputDefaultBlockNumberFormatter], + // add output formatter for decoding + outputFormatter: function (result) { + return _this._parent._decodeMethodReturn(_this._method.outputs, result); + }, + requestManager: _this._parent._requestManager, + accounts: ethAccounts, // is eth.accounts (necessary for wallet signing) + defaultAccount: _this._parent.defaultAccount, + defaultBlock: _this._parent.defaultBlock + })).createFunction(); + + return call(args.options, args.defaultBlock, args.callback); + + case 'send': + + // return error, if no "from" is specified + if(!utils.isAddress(args.options.from)) { + return utils._fireError(new Error('No "from" address specified in neither the given options, nor the default options.'), defer.eventEmitter, defer.reject, args.callback); + } + + if (_.isBoolean(this._method.payable) && !this._method.payable && args.options.value && args.options.value > 0) { + return utils._fireError(new Error('Can not send value to non-payable contract method or constructor'), defer.eventEmitter, defer.reject, args.callback); + } + + + // make sure receipt logs are decoded + var extraFormatters = { + receiptFormatter: function (receipt) { + if (_.isArray(receipt.logs)) { + + // decode logs + var events = _.map(receipt.logs, function(log) { + return _this._parent._decodeEventABI.call({ + name: 'ALLEVENTS', + jsonInterface: _this._parent.options.jsonInterface + }, log); + }); + + // make log names keys + receipt.events = {}; + var count = 0; + events.forEach(function (ev) { + if (ev.event) { + // if > 1 of the same event, don't overwrite any existing events + if (receipt.events[ev.event]) { + if (Array.isArray(receipt.events[ ev.event ])) { + receipt.events[ ev.event ].push(ev); + } else { + receipt.events[ev.event] = [receipt.events[ev.event], ev]; + } + } else { + receipt.events[ ev.event ] = ev; + } + } else { + receipt.events[count] = ev; + count++; + } + }); + + delete receipt.logs; + } + return receipt; + }, + contractDeployFormatter: function (receipt) { + var newContract = _this._parent.clone(); + newContract.options.address = receipt.contractAddress; + return newContract; + } + }; + + var sendTransaction = (new Method({ + name: 'sendTransaction', + call: 'eth_sendTransaction', + params: 1, + inputFormatter: [formatters.inputTransactionFormatter], + requestManager: _this._parent._requestManager, + accounts: _this.constructor._ethAccounts || _this._ethAccounts, // is eth.accounts (necessary for wallet signing) + defaultAccount: _this._parent.defaultAccount, + defaultBlock: _this._parent.defaultBlock, + extraFormatters: extraFormatters + })).createFunction(); + + return sendTransaction(args.options, args.callback); + + } + + } + +}; + +module.exports = Contract; + +},{"underscore":325,"web3-core":348,"web3-core-helpers":338,"web3-core-method":339,"web3-core-promievent":340,"web3-core-subscriptions":345,"web3-eth-abi":349,"web3-utils":403}],360:[function(require,module,exports){ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file ENS.js + * + * @author Samuel Furter + * @date 2018 + */ + +"use strict"; + +var config = require('./config'); +var Registry = require('./contracts/Registry'); +var ResolverMethodHandler = require('./lib/ResolverMethodHandler'); + +/** + * Constructs a new instance of ENS + * + * @method ENS + * @param {Object} eth + * @constructor + */ +function ENS(eth) { + this.eth = eth; +} + +Object.defineProperty(ENS.prototype, 'registry', { + get: function () { + return new Registry(this); + }, + enumerable: true +}); + +Object.defineProperty(ENS.prototype, 'resolverMethodHandler', { + get: function () { + return new ResolverMethodHandler(this.registry); + }, + enumerable: true +}); + +/** + * @param {string} name + * @returns {Promise} + */ +ENS.prototype.resolver = function (name) { + return this.registry.resolver(name); +}; + +/** + * Returns the address record associated with a name. + * + * @method getAddress + * @param {string} name + * @param {function} callback + * @return {eventifiedPromise} + */ +ENS.prototype.getAddress = function (name, callback) { + return this.resolverMethodHandler.method(name, 'addr', []).call(callback); +}; + +/** + * Sets a new address + * + * @method setAddress + * @param {string} name + * @param {string} address + * @param {Object} sendOptions + * @param {function} callback + * @returns {eventifiedPromise} + */ +ENS.prototype.setAddress = function (name, address, sendOptions, callback) { + return this.resolverMethodHandler.method(name, 'setAddr', [address]).send(sendOptions, callback); +}; + +/** + * Returns the public key + * + * @method getPubkey + * @param {string} name + * @param {function} callback + * @returns {eventifiedPromise} + */ +ENS.prototype.getPubkey = function (name, callback) { + return this.resolverMethodHandler.method(name, 'pubkey', [], callback).call(callback); +}; + +/** + * Set the new public key + * + * @method setPubkey + * @param {string} name + * @param {string} x + * @param {string} y + * @param {Object} sendOptions + * @param {function} callback + * @returns {eventifiedPromise} + */ +ENS.prototype.setPubkey = function (name, x, y, sendOptions, callback) { + return this.resolverMethodHandler.method(name, 'setPubkey', [x, y]).send(sendOptions, callback); +}; + +/** + * Returns the content + * + * @method getContent + * @param {string} name + * @param {function} callback + * @returns {eventifiedPromise} + */ +ENS.prototype.getContent = function (name, callback) { + return this.resolverMethodHandler.method(name, 'content', []).call(callback); +}; + +/** + * Set the content + * + * @method setContent + * @param {string} name + * @param {string} hash + * @param {function} callback + * @param {Object} sendOptions + * @returns {eventifiedPromise} + */ +ENS.prototype.setContent = function (name, hash, sendOptions, callback) { + return this.resolverMethodHandler.method(name, 'setContent', [hash]).send(sendOptions, callback); +}; + +/** + * Get the multihash + * + * @method getMultihash + * @param {string} name + * @param {function} callback + * @returns {eventifiedPromise} + */ +ENS.prototype.getMultihash = function (name, callback) { + return this.resolverMethodHandler.method(name, 'multihash', []).call(callback); +}; + +/** + * Set the multihash + * + * @method setMultihash + * @param {string} name + * @param {string} hash + * @param {Object} sendOptions + * @param {function} callback + * @returns {eventifiedPromise} + */ +ENS.prototype.setMultihash = function (name, hash, sendOptions, callback) { + return this.resolverMethodHandler.method(name, 'multihash', [hash]).send(sendOptions, callback); +}; + +/** + * Checks if the current used network is synced and looks for ENS support there. + * Throws an error if not. + * + * @returns {Promise} + */ +ENS.prototype.checkNetwork = function () { + var self = this; + return self.eth.getBlock('latest').then(function (block) { + var headAge = new Date() / 1000 - block.timestamp; + if (headAge > 3600) { + throw new Error("Network not synced; last block was " + headAge + " seconds ago"); + } + return self.eth.net.getNetworkType(); + }).then(function (networkType) { + var addr = config.addresses[networkType]; + if (typeof addr === 'undefined') { + throw new Error("ENS is not supported on network " + networkType); + } + + return addr; + }); +}; + +module.exports = ENS; + +},{"./config":361,"./contracts/Registry":362,"./lib/ResolverMethodHandler":364}],361:[function(require,module,exports){ +"use strict"; + +var config = { + addresses: { + main: "0x314159265dD8dbb310642f98f50C066173C1259b", + ropsten: "0x112234455c3a32fd11230c42e7bccd4a84e02010", + rinkeby: "0xe7410170f87102df0055eb195163a03b7f2bff4a" + }, +}; + +module.exports = config; + +},{}],362:[function(require,module,exports){ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file Registry.js + * + * @author Samuel Furter + * @date 2018 + */ + +"use strict"; + +var _ = require('underscore'); +var Contract = require('web3-eth-contract'); +var namehash = require('eth-ens-namehash'); +var PromiEvent = require('web3-core-promievent'); +var REGISTRY_ABI = require('../ressources/ABI/Registry'); +var RESOLVER_ABI = require('../ressources/ABI/Resolver'); + + +/** + * A wrapper around the ENS registry contract. + * + * @method Registry + * @param {Ens} ens + * @constructor + */ +function Registry(ens) { + var self = this; + this.ens = ens; + this.contract = ens.checkNetwork().then(function (address) { + var contract = new Contract(REGISTRY_ABI, address); + contract.setProvider(self.ens.eth.currentProvider); + + return contract; + }); +} + +/** + * Returns the address of the owner of an ENS name. + * + * @method owner + * @param {string} name + * @param {function} callback + * @return {Promise} + */ +Registry.prototype.owner = function (name, callback) { + var promiEvent = new PromiEvent(true); + + this.contract.then(function (contract) { + contract.methods.owner(namehash.hash(name)).call() + .then(function (receipt) { + promiEvent.resolve(receipt); + + if (_.isFunction(callback)) { + callback(receipt); + } + }) + .catch(function (error) { + promiEvent.reject(error); + + if (_.isFunction(callback)) { + callback(error); + } + }); + }); + + return promiEvent.eventEmitter; +}; + +/** + * Returns the resolver contract associated with a name. + * + * @method resolver + * @param {string} name + * @return {Promise} + */ +Registry.prototype.resolver = function (name) { + var self = this; + + return this.contract.then(function (contract) { + return contract.methods.resolver(namehash.hash(name)).call(); + }).then(function (address) { + var contract = new Contract(RESOLVER_ABI, address); + contract.setProvider(self.ens.eth.currentProvider); + return contract; + }); +}; + +module.exports = Registry; + +},{"../ressources/ABI/Registry":365,"../ressources/ABI/Resolver":366,"eth-ens-namehash":127,"underscore":325,"web3-core-promievent":340,"web3-eth-contract":359}],363:[function(require,module,exports){ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.js + * + * @author Samuel Furter + * @date 2018 + */ + +"use strict"; + +var ENS = require('./ENS'); + +module.exports = ENS; + +},{"./ENS":360}],364:[function(require,module,exports){ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file ResolverMethodHandler.js + * + * @author Samuel Furter + * @date 2018 + */ + +"use strict"; + +var PromiEvent = require('web3-core-promievent'); +var namehash = require('eth-ens-namehash'); +var _ = require('underscore'); + +/** + * @param {Registry} registry + * @constructor + */ +function ResolverMethodHandler(registry) { + this.registry = registry; +} + +/** + * Executes an resolver method and returns an eventifiedPromise + * + * @param {string} ensName + * @param {string} methodName + * @param {array} methodArguments + * @param {function} callback + * @returns {Object} + */ +ResolverMethodHandler.prototype.method = function (ensName, methodName, methodArguments, callback) { + return { + call: this.call.bind({ + ensName: ensName, + methodName: methodName, + methodArguments: methodArguments, + callback: callback, + parent: this + }), + send: this.send.bind({ + ensName: ensName, + methodName: methodName, + methodArguments: methodArguments, + callback: callback, + parent: this + }) + }; +}; + +/** + * Executes call + * + * @returns {eventifiedPromise} + */ +ResolverMethodHandler.prototype.call = function (callback) { + var self = this; + var promiEvent = new PromiEvent(); + var preparedArguments = this.parent.prepareArguments(this.ensName, this.methodArguments); + + this.parent.registry.resolver(this.ensName).then(function (resolver) { + self.parent.handleCall(promiEvent, resolver.methods[self.methodName], preparedArguments, callback); + }).catch(function (error) { + promiEvent.reject(error); + }); + + return promiEvent.eventEmitter; +}; + + +/** + * Executes send + * + * @param {Object} sendOptions + * @param {function} callback + * @returns {eventifiedPromise} + */ +ResolverMethodHandler.prototype.send = function (sendOptions, callback) { + var self = this; + var promiEvent = new PromiEvent(); + var preparedArguments = this.parent.prepareArguments(this.ensName, this.methodArguments); + + this.parent.registry.resolver(this.ensName).then(function (resolver) { + self.parent.handleSend(promiEvent, resolver.methods[self.methodName], preparedArguments, sendOptions, callback); + }).catch(function (error) { + promiEvent.reject(error); + }); + + return promiEvent.eventEmitter; +}; + +/** + * Handles a call method + * + * @param {eventifiedPromise} promiEvent + * @param {function} method + * @param {array} preparedArguments + * @param {function} callback + * @returns {eventifiedPromise} + */ +ResolverMethodHandler.prototype.handleCall = function (promiEvent, method, preparedArguments, callback) { + method.apply(this, preparedArguments).call() + .then(function (receipt) { + promiEvent.resolve(receipt); + + if (_.isFunction(callback)) { + callback(receipt); + } + }).catch(function (error) { + promiEvent.reject(error); + + if (_.isFunction(callback)) { + callback(error); + } + }); + + return promiEvent; +}; + +/** + * Handles a send method + * + * @param {eventifiedPromise} promiEvent + * @param {function} method + * @param {array} preparedArguments + * @param {Object} sendOptions + * @param {function} callback + * @returns {eventifiedPromise} + */ +ResolverMethodHandler.prototype.handleSend = function (promiEvent, method, preparedArguments, sendOptions, callback) { + method.apply(this, preparedArguments).send(sendOptions) + .on('transactionHash', function (hash) { + promiEvent.eventEmitter.emit('transactionHash', hash); + }) + .on('confirmation', function (confirmationNumber, receipt) { + promiEvent.eventEmitter.emit('confirmation', confirmationNumber, receipt); + }) + .on('receipt', function (receipt) { + promiEvent.eventEmitter.emit('receipt', receipt); + promiEvent.resolve(receipt); + + if (_.isFunction(callback)) { + callback(receipt); + } + }) + .on('error', function (error) { + promiEvent.eventEmitter.emit('error', error); + promiEvent.reject(error); + + if (_.isFunction(callback)) { + callback(error); + } + }); + + return promiEvent; +}; + +/** + * Adds the ENS node to the arguments + * + * @param {string} name + * @param {array} methodArguments + * @returns {array} + */ +ResolverMethodHandler.prototype.prepareArguments = function (name, methodArguments) { + var node = namehash.hash(name); + + if (methodArguments.length > 0) { + methodArguments.unshift(node); + + return methodArguments; + } + + return [node]; +}; + +module.exports = ResolverMethodHandler; + +},{"eth-ens-namehash":127,"underscore":325,"web3-core-promievent":340}],365:[function(require,module,exports){ +"use strict"; + +var REGISTRY = [ + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "resolver", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "label", + "type": "bytes32" + }, + { + "name": "owner", + "type": "address" + } + ], + "name": "setSubnodeOwner", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "ttl", + "type": "uint64" + } + ], + "name": "setTTL", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "ttl", + "outputs": [ + { + "name": "", + "type": "uint64" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "resolver", + "type": "address" + } + ], + "name": "setResolver", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "owner", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "owner", + "type": "address" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "name": "label", + "type": "bytes32" + }, + { + "indexed": false, + "name": "owner", + "type": "address" + } + ], + "name": "NewOwner", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "resolver", + "type": "address" + } + ], + "name": "NewResolver", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "ttl", + "type": "uint64" + } + ], + "name": "NewTTL", + "type": "event" + } +]; + +module.exports = REGISTRY; + +},{}],366:[function(require,module,exports){ +"use strict"; + +var RESOLVER = [ + { + "constant": true, + "inputs": [ + { + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "contentTypes", + "type": "uint256" + } + ], + "name": "ABI", + "outputs": [ + { + "name": "contentType", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "hash", + "type": "bytes" + } + ], + "name": "setMultihash", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "multihash", + "outputs": [ + { + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "x", + "type": "bytes32" + }, + { + "name": "y", + "type": "bytes32" + } + ], + "name": "setPubkey", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "content", + "outputs": [ + { + "name": "ret", + "type": "bytes32" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "addr", + "outputs": [ + { + "name": "ret", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "contentType", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "setABI", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "name", + "outputs": [ + { + "name": "ret", + "type": "string" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "name", + "type": "string" + } + ], + "name": "setName", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "hash", + "type": "bytes32" + } + ], + "name": "setContent", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "pubkey", + "outputs": [ + { + "name": "x", + "type": "bytes32" + }, + { + "name": "y", + "type": "bytes32" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "addr", + "type": "address" + } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "inputs": [ + { + "name": "ensAddr", + "type": "address" + } + ], + "payable": false, + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "a", + "type": "address" + } + ], + "name": "AddrChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "hash", + "type": "bytes32" + } + ], + "name": "ContentChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "name", + "type": "string" + } + ], + "name": "NameChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "name": "contentType", + "type": "uint256" + } + ], + "name": "ABIChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "x", + "type": "bytes32" + }, + { + "indexed": false, + "name": "y", + "type": "bytes32" + } + ], + "name": "PubkeyChanged", + "type": "event" + } +]; + +module.exports = RESOLVER; + +},{}],367:[function(require,module,exports){ +arguments[4][154][0].apply(exports,arguments) +},{"dup":154}],368:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file iban.js + * + * Details: https://github.com/ethereum/wiki/wiki/ICAP:-Inter-exchange-Client-Address-Protocol + * + * @author Marek Kotewicz + * @date 2015 + */ + +"use strict"; + +var utils = require('web3-utils'); +var BigNumber = require('bn.js'); + + +var leftPad = function (string, bytes) { + var result = string; + while (result.length < bytes * 2) { + result = '0' + result; + } + return result; +}; + +/** + * Prepare an IBAN for mod 97 computation by moving the first 4 chars to the end and transforming the letters to + * numbers (A = 10, B = 11, ..., Z = 35), as specified in ISO13616. + * + * @method iso13616Prepare + * @param {String} iban the IBAN + * @returns {String} the prepared IBAN + */ +var iso13616Prepare = function (iban) { + var A = 'A'.charCodeAt(0); + var Z = 'Z'.charCodeAt(0); + + iban = iban.toUpperCase(); + iban = iban.substr(4) + iban.substr(0,4); + + return iban.split('').map(function(n){ + var code = n.charCodeAt(0); + if (code >= A && code <= Z){ + // A = 10, B = 11, ... Z = 35 + return code - A + 10; + } else { + return n; + } + }).join(''); +}; + +/** + * Calculates the MOD 97 10 of the passed IBAN as specified in ISO7064. + * + * @method mod9710 + * @param {String} iban + * @returns {Number} + */ +var mod9710 = function (iban) { + var remainder = iban, + block; + + while (remainder.length > 2){ + block = remainder.slice(0, 9); + remainder = parseInt(block, 10) % 97 + remainder.slice(block.length); + } + + return parseInt(remainder, 10) % 97; +}; + +/** + * This prototype should be used to create iban object from iban correct string + * + * @param {String} iban + */ +var Iban = function Iban(iban) { + this._iban = iban; +}; + +/** + * This method should be used to create an ethereum address from a direct iban address + * + * @method toAddress + * @param {String} iban address + * @return {String} the ethereum address + */ +Iban.toAddress = function (ib) { + ib = new Iban(ib); + + if(!ib.isDirect()) { + throw new Error('IBAN is indirect and can\'t be converted'); + } + + return ib.toAddress(); +}; + +/** + * This method should be used to create iban address from an ethereum address + * + * @method toIban + * @param {String} address + * @return {String} the IBAN address + */ +Iban.toIban = function (address) { + return Iban.fromAddress(address).toString(); +}; + +/** + * This method should be used to create iban object from an ethereum address + * + * @method fromAddress + * @param {String} address + * @return {Iban} the IBAN object + */ +Iban.fromAddress = function (address) { + if(!utils.isAddress(address)){ + throw new Error('Provided address is not a valid address: '+ address); + } + + address = address.replace('0x','').replace('0X',''); + + var asBn = new BigNumber(address, 16); + var base36 = asBn.toString(36); + var padded = leftPad(base36, 15); + return Iban.fromBban(padded.toUpperCase()); +}; + +/** + * Convert the passed BBAN to an IBAN for this country specification. + * Please note that "generation of the IBAN shall be the exclusive responsibility of the bank/branch servicing the account". + * This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_check_digits + * + * @method fromBban + * @param {String} bban the BBAN to convert to IBAN + * @returns {Iban} the IBAN object + */ +Iban.fromBban = function (bban) { + var countryCode = 'XE'; + + var remainder = mod9710(iso13616Prepare(countryCode + '00' + bban)); + var checkDigit = ('0' + (98 - remainder)).slice(-2); + + return new Iban(countryCode + checkDigit + bban); +}; + +/** + * Should be used to create IBAN object for given institution and identifier + * + * @method createIndirect + * @param {Object} options, required options are "institution" and "identifier" + * @return {Iban} the IBAN object + */ +Iban.createIndirect = function (options) { + return Iban.fromBban('ETH' + options.institution + options.identifier); +}; + +/** + * This method should be used to check if given string is valid iban object + * + * @method isValid + * @param {String} iban string + * @return {Boolean} true if it is valid IBAN + */ +Iban.isValid = function (iban) { + var i = new Iban(iban); + return i.isValid(); +}; + +/** + * Should be called to check if iban is correct + * + * @method isValid + * @returns {Boolean} true if it is, otherwise false + */ +Iban.prototype.isValid = function () { + return /^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban) && + mod9710(iso13616Prepare(this._iban)) === 1; +}; + +/** + * Should be called to check if iban number is direct + * + * @method isDirect + * @returns {Boolean} true if it is, otherwise false + */ +Iban.prototype.isDirect = function () { + return this._iban.length === 34 || this._iban.length === 35; +}; + +/** + * Should be called to check if iban number if indirect + * + * @method isIndirect + * @returns {Boolean} true if it is, otherwise false + */ +Iban.prototype.isIndirect = function () { + return this._iban.length === 20; +}; + +/** + * Should be called to get iban checksum + * Uses the mod-97-10 checksumming protocol (ISO/IEC 7064:2003) + * + * @method checksum + * @returns {String} checksum + */ +Iban.prototype.checksum = function () { + return this._iban.substr(2, 2); +}; + +/** + * Should be called to get institution identifier + * eg. XREG + * + * @method institution + * @returns {String} institution identifier + */ +Iban.prototype.institution = function () { + return this.isIndirect() ? this._iban.substr(7, 4) : ''; +}; + +/** + * Should be called to get client identifier within institution + * eg. GAVOFYORK + * + * @method client + * @returns {String} client identifier + */ +Iban.prototype.client = function () { + return this.isIndirect() ? this._iban.substr(11) : ''; +}; + +/** + * Should be called to get client direct address + * + * @method toAddress + * @returns {String} ethereum address + */ +Iban.prototype.toAddress = function () { + if (this.isDirect()) { + var base36 = this._iban.substr(4); + var asBn = new BigNumber(base36, 36); + return utils.toChecksumAddress(asBn.toString(16, 20)); + } + + return ''; +}; + +Iban.prototype.toString = function () { + return this._iban; +}; + +module.exports = Iban; + +},{"bn.js":367,"web3-utils":403}],369:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var core = require('web3-core'); +var Method = require('web3-core-method'); +var utils = require('web3-utils'); +var Net = require('web3-net'); + +var formatters = require('web3-core-helpers').formatters; + + +var Personal = function Personal() { + var _this = this; + + // sets _requestmanager + core.packageInit(this, arguments); + + this.net = new Net(this.currentProvider); + + var defaultAccount = null; + var defaultBlock = 'latest'; + + Object.defineProperty(this, 'defaultAccount', { + get: function () { + return defaultAccount; + }, + set: function (val) { + if(val) { + defaultAccount = utils.toChecksumAddress(formatters.inputAddressFormatter(val)); + } + + // update defaultBlock + methods.forEach(function(method) { + method.defaultAccount = defaultAccount; + }); + + return val; + }, + enumerable: true + }); + Object.defineProperty(this, 'defaultBlock', { + get: function () { + return defaultBlock; + }, + set: function (val) { + defaultBlock = val; + + // update defaultBlock + methods.forEach(function(method) { + method.defaultBlock = defaultBlock; + }); + + return val; + }, + enumerable: true + }); + + + var methods = [ + new Method({ + name: 'getAccounts', + call: 'personal_listAccounts', + params: 0, + outputFormatter: utils.toChecksumAddress + }), + new Method({ + name: 'newAccount', + call: 'personal_newAccount', + params: 1, + inputFormatter: [null], + outputFormatter: utils.toChecksumAddress + }), + new Method({ + name: 'unlockAccount', + call: 'personal_unlockAccount', + params: 3, + inputFormatter: [formatters.inputAddressFormatter, null, null] + }), + new Method({ + name: 'lockAccount', + call: 'personal_lockAccount', + params: 1, + inputFormatter: [formatters.inputAddressFormatter] + }), + new Method({ + name: 'importRawKey', + call: 'personal_importRawKey', + params: 2 + }), + new Method({ + name: 'sendTransaction', + call: 'personal_sendTransaction', + params: 2, + inputFormatter: [formatters.inputTransactionFormatter, null] + }), + new Method({ + name: 'signTransaction', + call: 'personal_signTransaction', + params: 2, + inputFormatter: [formatters.inputTransactionFormatter, null] + }), + new Method({ + name: 'sign', + call: 'personal_sign', + params: 3, + inputFormatter: [formatters.inputSignFormatter, formatters.inputAddressFormatter, null] + }), + new Method({ + name: 'ecRecover', + call: 'personal_ecRecover', + params: 2, + inputFormatter: [formatters.inputSignFormatter, null] + }) + ]; + methods.forEach(function(method) { + method.attachToObject(_this); + method.setRequestManager(_this._requestManager); + method.defaultBlock = _this.defaultBlock; + method.defaultAccount = _this.defaultAccount; + }); +}; + +core.addProviders(Personal); + + + +module.exports = Personal; + + + +},{"web3-core":348,"web3-core-helpers":338,"web3-core-method":339,"web3-net":372,"web3-utils":403}],370:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . + */ +/** + * @file getNetworkType.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var _ = require('underscore'); + +var getNetworkType = function (callback) { + var _this = this, + id; + + + return this.net.getId() + .then(function (givenId) { + + id = givenId; + + return _this.getBlock(0); + }) + .then(function (genesis) { + var returnValue = 'private'; + + if (genesis.hash === '0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3' && + id === 1) { + returnValue = 'main'; + } + if (genesis.hash === '0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303' && + id === 2) { + returnValue = 'morden'; + } + if (genesis.hash === '0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d' && + id === 3) { + returnValue = 'ropsten'; + } + if (genesis.hash === '0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177' && + id === 4) { + returnValue = 'rinkeby'; + } + if (genesis.hash === '0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9' && + id === 42) { + returnValue = 'kovan'; + } + + if (_.isFunction(callback)) { + callback(null, returnValue); + } + + return returnValue; + }) + .catch(function (err) { + if (_.isFunction(callback)) { + callback(err); + } else { + throw err; + } + }); +}; + +module.exports = getNetworkType; + +},{"underscore":325}],371:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . + */ +/** + * @file index.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var _ = require('underscore'); +var core = require('web3-core'); +var helpers = require('web3-core-helpers'); +var Subscriptions = require('web3-core-subscriptions').subscriptions; +var Method = require('web3-core-method'); +var utils = require('web3-utils'); +var Net = require('web3-net'); + +var ENS = require('web3-eth-ens'); +var Personal = require('web3-eth-personal'); +var BaseContract = require('web3-eth-contract'); +var Iban = require('web3-eth-iban'); +var Accounts = require('web3-eth-accounts'); +var abi = require('web3-eth-abi'); + +var getNetworkType = require('./getNetworkType.js'); +var formatter = helpers.formatters; + + +var blockCall = function (args) { + return (_.isString(args[0]) && args[0].indexOf('0x') === 0) ? "eth_getBlockByHash" : "eth_getBlockByNumber"; +}; + +var transactionFromBlockCall = function (args) { + return (_.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getTransactionByBlockHashAndIndex' : 'eth_getTransactionByBlockNumberAndIndex'; +}; + +var uncleCall = function (args) { + return (_.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getUncleByBlockHashAndIndex' : 'eth_getUncleByBlockNumberAndIndex'; +}; + +var getBlockTransactionCountCall = function (args) { + return (_.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getBlockTransactionCountByHash' : 'eth_getBlockTransactionCountByNumber'; +}; + +var uncleCountCall = function (args) { + return (_.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getUncleCountByBlockHash' : 'eth_getUncleCountByBlockNumber'; +}; + + +var Eth = function Eth() { + var _this = this; + + // sets _requestmanager + core.packageInit(this, arguments); + + // overwrite setProvider + var setProvider = this.setProvider; + this.setProvider = function () { + setProvider.apply(_this, arguments); + _this.net.setProvider.apply(_this, arguments); + _this.personal.setProvider.apply(_this, arguments); + _this.accounts.setProvider.apply(_this, arguments); + _this.Contract.setProvider(_this.currentProvider, _this.accounts); + }; + + + var defaultAccount = null; + var defaultBlock = 'latest'; + + Object.defineProperty(this, 'defaultAccount', { + get: function () { + return defaultAccount; + }, + set: function (val) { + if(val) { + defaultAccount = utils.toChecksumAddress(formatter.inputAddressFormatter(val)); + } + + // also set on the Contract object + _this.Contract.defaultAccount = defaultAccount; + _this.personal.defaultAccount = defaultAccount; + + // update defaultBlock + methods.forEach(function(method) { + method.defaultAccount = defaultAccount; + }); + + return val; + }, + enumerable: true + }); + Object.defineProperty(this, 'defaultBlock', { + get: function () { + return defaultBlock; + }, + set: function (val) { + defaultBlock = val; + // also set on the Contract object + _this.Contract.defaultBlock = defaultBlock; + _this.personal.defaultBlock = defaultBlock; + + // update defaultBlock + methods.forEach(function(method) { + method.defaultBlock = defaultBlock; + }); + + return val; + }, + enumerable: true + }); + + + this.clearSubscriptions = _this._requestManager.clearSubscriptions; + + // add net + this.net = new Net(this.currentProvider); + // add chain detection + this.net.getNetworkType = getNetworkType.bind(this); + + // add accounts + this.accounts = new Accounts(this.currentProvider); + + // add personal + this.personal = new Personal(this.currentProvider); + this.personal.defaultAccount = this.defaultAccount; + + // create a proxy Contract type for this instance, as a Contract's provider + // is stored as a class member rather than an instance variable. If we do + // not create this proxy type, changing the provider in one instance of + // web3-eth would subsequently change the provider for _all_ contract + // instances! + var self = this; + var Contract = function Contract() { + BaseContract.apply(this, arguments); + + // when Eth.setProvider is called, call packageInit + // on all contract instances instantiated via this Eth + // instances. This will update the currentProvider for + // the contract instances + var _this = this; + var setProvider = self.setProvider; + self.setProvider = function() { + setProvider.apply(self, arguments); + core.packageInit(_this, [self.currentProvider]); + }; + }; + + Contract.setProvider = function() { + BaseContract.setProvider.apply(this, arguments); + }; + + // make our proxy Contract inherit from web3-eth-contract so that it has all + // the right functionality and so that instanceof and friends work properly + Contract.prototype = Object.create(BaseContract.prototype); + Contract.prototype.constructor = Contract; + + // add contract + this.Contract = Contract; + this.Contract.defaultAccount = this.defaultAccount; + this.Contract.defaultBlock = this.defaultBlock; + this.Contract.setProvider(this.currentProvider, this.accounts); + + // add IBAN + this.Iban = Iban; + + // add ABI + this.abi = abi; + + // add ENS + this.ens = new ENS(this); + + var methods = [ + new Method({ + name: 'getNodeInfo', + call: 'web3_clientVersion' + }), + new Method({ + name: 'getProtocolVersion', + call: 'eth_protocolVersion', + params: 0 + }), + new Method({ + name: 'getCoinbase', + call: 'eth_coinbase', + params: 0 + }), + new Method({ + name: 'isMining', + call: 'eth_mining', + params: 0 + }), + new Method({ + name: 'getHashrate', + call: 'eth_hashrate', + params: 0, + outputFormatter: utils.hexToNumber + }), + new Method({ + name: 'isSyncing', + call: 'eth_syncing', + params: 0, + outputFormatter: formatter.outputSyncingFormatter + }), + new Method({ + name: 'getGasPrice', + call: 'eth_gasPrice', + params: 0, + outputFormatter: formatter.outputBigNumberFormatter + }), + new Method({ + name: 'getAccounts', + call: 'eth_accounts', + params: 0, + outputFormatter: utils.toChecksumAddress + }), + new Method({ + name: 'getBlockNumber', + call: 'eth_blockNumber', + params: 0, + outputFormatter: utils.hexToNumber + }), + new Method({ + name: 'getBalance', + call: 'eth_getBalance', + params: 2, + inputFormatter: [formatter.inputAddressFormatter, formatter.inputDefaultBlockNumberFormatter], + outputFormatter: formatter.outputBigNumberFormatter + }), + new Method({ + name: 'getStorageAt', + call: 'eth_getStorageAt', + params: 3, + inputFormatter: [formatter.inputAddressFormatter, utils.numberToHex, formatter.inputDefaultBlockNumberFormatter] + }), + new Method({ + name: 'getCode', + call: 'eth_getCode', + params: 2, + inputFormatter: [formatter.inputAddressFormatter, formatter.inputDefaultBlockNumberFormatter] + }), + new Method({ + name: 'getBlock', + call: blockCall, + params: 2, + inputFormatter: [formatter.inputBlockNumberFormatter, function (val) { return !!val; }], + outputFormatter: formatter.outputBlockFormatter + }), + new Method({ + name: 'getUncle', + call: uncleCall, + params: 2, + inputFormatter: [formatter.inputBlockNumberFormatter, utils.numberToHex], + outputFormatter: formatter.outputBlockFormatter, + + }), + new Method({ + name: 'getBlockTransactionCount', + call: getBlockTransactionCountCall, + params: 1, + inputFormatter: [formatter.inputBlockNumberFormatter], + outputFormatter: utils.hexToNumber + }), + new Method({ + name: 'getBlockUncleCount', + call: uncleCountCall, + params: 1, + inputFormatter: [formatter.inputBlockNumberFormatter], + outputFormatter: utils.hexToNumber + }), + new Method({ + name: 'getTransaction', + call: 'eth_getTransactionByHash', + params: 1, + inputFormatter: [null], + outputFormatter: formatter.outputTransactionFormatter + }), + new Method({ + name: 'getTransactionFromBlock', + call: transactionFromBlockCall, + params: 2, + inputFormatter: [formatter.inputBlockNumberFormatter, utils.numberToHex], + outputFormatter: formatter.outputTransactionFormatter + }), + new Method({ + name: 'getTransactionReceipt', + call: 'eth_getTransactionReceipt', + params: 1, + inputFormatter: [null], + outputFormatter: formatter.outputTransactionReceiptFormatter + }), + new Method({ + name: 'getTransactionCount', + call: 'eth_getTransactionCount', + params: 2, + inputFormatter: [formatter.inputAddressFormatter, formatter.inputDefaultBlockNumberFormatter], + outputFormatter: utils.hexToNumber + }), + new Method({ + name: 'sendSignedTransaction', + call: 'eth_sendRawTransaction', + params: 1, + inputFormatter: [null] + }), + new Method({ + name: 'signTransaction', + call: 'eth_signTransaction', + params: 1, + inputFormatter: [formatter.inputTransactionFormatter] + }), + new Method({ + name: 'sendTransaction', + call: 'eth_sendTransaction', + params: 1, + inputFormatter: [formatter.inputTransactionFormatter] + }), + new Method({ + name: 'sign', + call: 'eth_sign', + params: 2, + inputFormatter: [formatter.inputSignFormatter, formatter.inputAddressFormatter], + transformPayload: function (payload) { + payload.params.reverse(); + return payload; + } + }), + new Method({ + name: 'call', + call: 'eth_call', + params: 2, + inputFormatter: [formatter.inputCallFormatter, formatter.inputDefaultBlockNumberFormatter] + }), + new Method({ + name: 'estimateGas', + call: 'eth_estimateGas', + params: 1, + inputFormatter: [formatter.inputCallFormatter], + outputFormatter: utils.hexToNumber + }), + new Method({ + name: 'submitWork', + call: 'eth_submitWork', + params: 3 + }), + new Method({ + name: 'getWork', + call: 'eth_getWork', + params: 0 + }), + new Method({ + name: 'getPastLogs', + call: 'eth_getLogs', + params: 1, + inputFormatter: [formatter.inputLogFormatter], + outputFormatter: formatter.outputLogFormatter + }), + + // subscriptions + new Subscriptions({ + name: 'subscribe', + type: 'eth', + subscriptions: { + 'newBlockHeaders': { + // TODO rename on RPC side? + subscriptionName: 'newHeads', // replace subscription with this name + params: 0, + outputFormatter: formatter.outputBlockFormatter + }, + 'pendingTransactions': { + subscriptionName: 'newPendingTransactions', // replace subscription with this name + params: 0 + }, + 'logs': { + params: 1, + inputFormatter: [formatter.inputLogFormatter], + outputFormatter: formatter.outputLogFormatter, + // DUBLICATE, also in web3-eth-contract + subscriptionHandler: function (output) { + if(output.removed) { + this.emit('changed', output); + } else { + this.emit('data', output); + } + + if (_.isFunction(this.callback)) { + this.callback(null, output, this); + } + } + }, + 'syncing': { + params: 0, + outputFormatter: formatter.outputSyncingFormatter, + subscriptionHandler: function (output) { + var _this = this; + + // fire TRUE at start + if(this._isSyncing !== true) { + this._isSyncing = true; + this.emit('changed', _this._isSyncing); + + if (_.isFunction(this.callback)) { + this.callback(null, _this._isSyncing, this); + } + + setTimeout(function () { + _this.emit('data', output); + + if (_.isFunction(_this.callback)) { + _this.callback(null, output, _this); + } + }, 0); + + // fire sync status + } else { + this.emit('data', output); + if (_.isFunction(_this.callback)) { + this.callback(null, output, this); + } + + // wait for some time before fireing the FALSE + clearTimeout(this._isSyncingTimeout); + this._isSyncingTimeout = setTimeout(function () { + if(output.currentBlock > output.highestBlock - 200) { + _this._isSyncing = false; + _this.emit('changed', _this._isSyncing); + + if (_.isFunction(_this.callback)) { + _this.callback(null, _this._isSyncing, _this); + } + } + }, 500); + } + } + } + } + }) + ]; + + methods.forEach(function(method) { + method.attachToObject(_this); + method.setRequestManager(_this._requestManager, _this.accounts); // second param means is eth.accounts (necessary for wallet signing) + method.defaultBlock = _this.defaultBlock; + method.defaultAccount = _this.defaultAccount; + }); + +}; + +core.addProviders(Eth); + + +module.exports = Eth; + + +},{"./getNetworkType.js":370,"underscore":325,"web3-core":348,"web3-core-helpers":338,"web3-core-method":339,"web3-core-subscriptions":345,"web3-eth-abi":349,"web3-eth-accounts":358,"web3-eth-contract":359,"web3-eth-ens":363,"web3-eth-iban":368,"web3-eth-personal":369,"web3-net":372,"web3-utils":403}],372:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var core = require('web3-core'); +var Method = require('web3-core-method'); +var utils = require('web3-utils'); + + +var Net = function () { + var _this = this; + + // sets _requestmanager + core.packageInit(this, arguments); + + + [ + new Method({ + name: 'getId', + call: 'net_version', + params: 0, + outputFormatter: utils.hexToNumber + }), + new Method({ + name: 'isListening', + call: 'net_listening', + params: 0 + }), + new Method({ + name: 'getPeerCount', + call: 'net_peerCount', + params: 0, + outputFormatter: utils.hexToNumber + }) + ].forEach(function(method) { + method.attachToObject(_this); + method.setRequestManager(_this._requestManager); + }); + +}; + +core.addProviders(Net); + + +module.exports = Net; + + + +},{"web3-core":348,"web3-core-method":339,"web3-utils":403}],373:[function(require,module,exports){ +const EventEmitter = require('events').EventEmitter +const inherits = require('util').inherits +const ethUtil = require('ethereumjs-util') +const EthBlockTracker = require('eth-block-tracker') +const map = require('async/map') +const eachSeries = require('async/eachSeries') +const Stoplight = require('./util/stoplight.js') +const cacheUtils = require('./util/rpc-cache-utils.js') +const createPayload = require('./util/create-payload.js') +const noop = function(){} + +module.exports = Web3ProviderEngine + + +inherits(Web3ProviderEngine, EventEmitter) + +function Web3ProviderEngine(opts) { + const self = this + EventEmitter.call(self) + self.setMaxListeners(30) + // parse options + opts = opts || {} + + // block polling + const directProvider = { sendAsync: self._handleAsync.bind(self) } + const blockTrackerProvider = opts.blockTrackerProvider || directProvider + self._blockTracker = opts.blockTracker || new EthBlockTracker({ + provider: blockTrackerProvider, + pollingInterval: opts.pollingInterval || 4000, + }) + + // handle new block + self._blockTracker.on('block', (jsonBlock) => { + const bufferBlock = toBufferBlock(jsonBlock) + self._setCurrentBlock(bufferBlock) + }) + + // emit block events from the block tracker + self._blockTracker.on('block', self.emit.bind(self, 'rawBlock')) + self._blockTracker.on('sync', self.emit.bind(self, 'sync')) + self._blockTracker.on('latest', self.emit.bind(self, 'latest')) + + // set initialization blocker + self._ready = new Stoplight() + // unblock initialization after first block + self._blockTracker.once('block', () => { + self._ready.go() + }) + // local state + self.currentBlock = null + self._providers = [] +} + +// public + +Web3ProviderEngine.prototype.start = function(cb = noop){ + const self = this + // start block polling + self._blockTracker.start().then(cb).catch(cb) +} + +Web3ProviderEngine.prototype.stop = function(){ + const self = this + // stop block polling + self._blockTracker.stop() +} + +Web3ProviderEngine.prototype.addProvider = function(source){ + const self = this + self._providers.push(source) + source.setEngine(this) +} + +Web3ProviderEngine.prototype.send = function(payload){ + throw new Error('Web3ProviderEngine does not support synchronous requests.') +} + +Web3ProviderEngine.prototype.sendAsync = function(payload, cb){ + const self = this + self._ready.await(function(){ + + if (Array.isArray(payload)) { + // handle batch + map(payload, self._handleAsync.bind(self), cb) + } else { + // handle single + self._handleAsync(payload, cb) + } + + }) +} + +// private + +Web3ProviderEngine.prototype._handleAsync = function(payload, finished) { + var self = this + var currentProvider = -1 + var result = null + var error = null + + var stack = [] + + next() + + function next(after) { + currentProvider += 1 + stack.unshift(after) + + // Bubbled down as far as we could go, and the request wasn't + // handled. Return an error. + if (currentProvider >= self._providers.length) { + end(new Error('Request for method "' + payload.method + '" not handled by any subprovider. Please check your subprovider configuration to ensure this method is handled.')) + } else { + try { + var provider = self._providers[currentProvider] + provider.handleRequest(payload, next, end) + } catch (e) { + end(e) + } + } + } + + function end(_error, _result) { + error = _error + result = _result + + eachSeries(stack, function(fn, callback) { + + if (fn) { + fn(error, result, callback) + } else { + callback() + } + }, function() { + // console.log('COMPLETED:', payload) + // console.log('RESULT: ', result) + + var resultObj = { + id: payload.id, + jsonrpc: payload.jsonrpc, + result: result + } + + if (error != null) { + resultObj.error = { + message: error.stack || error.message || error, + code: -32000 + } + // respond with both error formats + finished(error, resultObj) + } else { + finished(null, resultObj) + } + }) + } +} + +// +// from remote-data +// + +Web3ProviderEngine.prototype._setCurrentBlock = function(block){ + const self = this + self.currentBlock = block + self.emit('block', block) +} + +// util + +function toBufferBlock (jsonBlock) { + return { + number: ethUtil.toBuffer(jsonBlock.number), + hash: ethUtil.toBuffer(jsonBlock.hash), + parentHash: ethUtil.toBuffer(jsonBlock.parentHash), + nonce: ethUtil.toBuffer(jsonBlock.nonce), + mixHash: ethUtil.toBuffer(jsonBlock.mixHash), + sha3Uncles: ethUtil.toBuffer(jsonBlock.sha3Uncles), + logsBloom: ethUtil.toBuffer(jsonBlock.logsBloom), + transactionsRoot: ethUtil.toBuffer(jsonBlock.transactionsRoot), + stateRoot: ethUtil.toBuffer(jsonBlock.stateRoot), + receiptsRoot: ethUtil.toBuffer(jsonBlock.receiptRoot || jsonBlock.receiptsRoot), + miner: ethUtil.toBuffer(jsonBlock.miner), + difficulty: ethUtil.toBuffer(jsonBlock.difficulty), + totalDifficulty: ethUtil.toBuffer(jsonBlock.totalDifficulty), + size: ethUtil.toBuffer(jsonBlock.size), + extraData: ethUtil.toBuffer(jsonBlock.extraData), + gasLimit: ethUtil.toBuffer(jsonBlock.gasLimit), + gasUsed: ethUtil.toBuffer(jsonBlock.gasUsed), + timestamp: ethUtil.toBuffer(jsonBlock.timestamp), + transactions: jsonBlock.transactions, + } +} + +},{"./util/create-payload.js":391,"./util/rpc-cache-utils.js":394,"./util/stoplight.js":396,"async/eachSeries":25,"async/map":41,"eth-block-tracker":126,"ethereumjs-util":141,"events":157,"util":333}],374:[function(require,module,exports){ +var json = typeof JSON !== 'undefined' ? JSON : require('jsonify'); + +module.exports = function (obj, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var space = opts.space || ''; + if (typeof space === 'number') space = Array(space+1).join(' '); + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + var replacer = opts.replacer || function(key, value) { return value; }; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (parent, key, node, level) { + var indent = space ? ('\n' + new Array(level + 1).join(space)) : ''; + var colonSeparator = space ? ': ' : ':'; + + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + node = replacer.call(parent, key, node); + + if (node === undefined) { + return; + } + if (typeof node !== 'object' || node === null) { + return json.stringify(node); + } + if (isArray(node)) { + var out = []; + for (var i = 0; i < node.length; i++) { + var item = stringify(node, i, node[i], level+1) || json.stringify(null); + out.push(indent + space + item); + } + return '[' + out.join(',') + indent + ']'; + } + else { + if (seen.indexOf(node) !== -1) { + if (cycles) return json.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + else seen.push(node); + + var keys = objectKeys(node).sort(cmp && cmp(node)); + var out = []; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node, key, node[key], level+1); + + if(!value) continue; + + var keyValue = json.stringify(key) + + colonSeparator + + value; + ; + out.push(indent + space + keyValue); + } + seen.splice(seen.indexOf(node), 1); + return '{' + out.join(',') + indent + '}'; + } + })({ '': obj }, '', obj, 0); +}; + +var isArray = Array.isArray || function (x) { + return {}.toString.call(x) === '[object Array]'; +}; + +var objectKeys = Object.keys || function (obj) { + var has = Object.prototype.hasOwnProperty || function () { return true }; + var keys = []; + for (var key in obj) { + if (has.call(obj, key)) keys.push(key); + } + return keys; +}; + +},{"jsonify":192}],375:[function(require,module,exports){ +module.exports={ + "_from": "web3-provider-engine@14.1.0", + "_id": "web3-provider-engine@14.1.0", + "_inBundle": false, + "_integrity": "sha512-vGZtqhSUzGTiMGhJXNnB/aRDlrPZLhLnBZ2NPArkZtr8XSrwg9m08tw4+PuWg5za0TJuoE/vuPQc501HddZZWw==", + "_location": "/web3-provider-engine", + "_phantomChildren": { + "jsonify": "0.0.0" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "web3-provider-engine@14.1.0", + "name": "web3-provider-engine", + "escapedName": "web3-provider-engine", + "rawSpec": "14.1.0", + "saveSpec": null, + "fetchSpec": "14.1.0" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-14.1.0.tgz", + "_shasum": "91590020f8b8c1b65846321310cbfdb039090fc6", + "_spec": "web3-provider-engine@14.1.0", + "_where": "/Users/alexvlasov/Blockchain/web3swift/web3swiftJSProxy", + "author": "", + "browser": { + "request": false, + "ws": false + }, + "bugs": { + "url": "https://github.com/MetaMask/provider-engine/issues" + }, + "bundleDependencies": false, + "dependencies": { + "async": "^2.5.0", + "backoff": "^2.5.0", + "clone": "^2.0.0", + "cross-fetch": "^2.1.0", + "eth-block-tracker": "^3.0.0", + "eth-json-rpc-infura": "^3.1.0", + "eth-sig-util": "^1.4.2", + "ethereumjs-block": "^1.2.2", + "ethereumjs-tx": "^1.2.0", + "ethereumjs-util": "^5.1.5", + "ethereumjs-vm": "^2.3.4", + "json-rpc-error": "^2.0.0", + "json-stable-stringify": "^1.0.1", + "promise-to-callback": "^1.0.0", + "readable-stream": "^2.2.9", + "request": "^2.85.0", + "semaphore": "^1.0.3", + "ws": "^5.1.1", + "xhr": "^2.2.0", + "xtend": "^4.0.1" + }, + "deprecated": false, + "description": "[![Greenkeeper badge](https://badges.greenkeeper.io/MetaMask/provider-engine.svg)](https://greenkeeper.io/)", + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-preset-es2015": "^6.24.1", + "babel-preset-stage-0": "^6.24.1", + "browserify": "^16.1.1", + "ethjs": "^0.3.6", + "tape": "^4.4.0" + }, + "homepage": "https://github.com/MetaMask/provider-engine#readme", + "license": "MIT", + "main": "index.js", + "name": "web3-provider-engine", + "repository": { + "type": "git", + "url": "git+https://github.com/MetaMask/provider-engine.git" + }, + "scripts": { + "build": "babel zero.js index.js -d dist/es5 && babel subproviders -d dist/es5/subproviders && babel util -d dist/es5/util", + "bundle": "mkdir -p ./dist && npm run bundle-engine && npm run bundle-zero", + "bundle-engine": "browserify -s ProviderEngine -e index.js -t [ babelify --presets [ es2015 ] ] > dist/ProviderEngine.js", + "bundle-zero": "browserify -s ZeroClientProvider -e zero.js -t [ babelify --presets [ es2015 ] ] > dist/ZeroClientProvider.js", + "prepublish": "npm run build && npm run bundle", + "test": "node test/index.js" + }, + "version": "14.1.0" +} + +},{}],376:[function(require,module,exports){ +const inherits = require('util').inherits +const ethUtil = require('ethereumjs-util') +const BN = ethUtil.BN +const clone = require('clone') +const cacheUtils = require('../util/rpc-cache-utils.js') +const Stoplight = require('../util/stoplight.js') +const Subprovider = require('./subprovider.js') + +module.exports = BlockCacheProvider + +inherits(BlockCacheProvider, Subprovider) + +function BlockCacheProvider(opts) { + const self = this + opts = opts || {} + // set initialization blocker + self._ready = new Stoplight() + self.strategies = { + perma: new ConditionalPermaCacheStrategy({ + eth_getTransactionByHash: containsBlockhash, + eth_getTransactionReceipt: containsBlockhash, + }), + block: new BlockCacheStrategy(self), + fork: new BlockCacheStrategy(self), + } +} + +// setup a block listener on 'setEngine' +BlockCacheProvider.prototype.setEngine = function(engine) { + const self = this + self.engine = engine + // unblock initialization after first block + engine.once('block', function(block) { + self.currentBlock = block + self._ready.go() + // from now on, empty old cache every block + engine.on('block', clearOldCache) + }) + + function clearOldCache(newBlock) { + var previousBlock = self.currentBlock + self.currentBlock = newBlock + if (!previousBlock) return + self.strategies.block.cacheRollOff(previousBlock) + self.strategies.fork.cacheRollOff(previousBlock) + } +} + +BlockCacheProvider.prototype.handleRequest = function(payload, next, end){ + const self = this + + // skip cache if told to do so + if (payload.skipCache) { + // console.log('CACHE SKIP - skip cache if told to do so') + return next() + } + + // Ignore block polling requests. + if (payload.method === 'eth_getBlockByNumber' && payload.params[0] === 'latest') { + // console.log('CACHE SKIP - Ignore block polling requests.') + return next() + } + + // wait for first block + self._ready.await(function(){ + // actually handle the request + self._handleRequest(payload, next, end) + }) +} + +BlockCacheProvider.prototype._handleRequest = function(payload, next, end){ + const self = this + + var type = cacheUtils.cacheTypeForPayload(payload) + var strategy = this.strategies[type] + + // If there's no strategy in place, pass it down the chain. + if (!strategy) { + return next() + } + + // If the strategy can't cache this request, ignore it. + if (!strategy.canCache(payload)) { + return next() + } + + var blockTag = cacheUtils.blockTagForPayload(payload) + if (!blockTag) blockTag = 'latest' + var requestedBlockNumber + + if (blockTag === 'earliest') { + requestedBlockNumber = '0x00' + } else if (blockTag === 'latest') { + requestedBlockNumber = ethUtil.bufferToHex(self.currentBlock.number) + } else { + // We have a hex number + requestedBlockNumber = blockTag + } + + //console.log('REQUEST at block 0x' + requestedBlockNumber.toString('hex')) + + // end on a hit, continue on a miss + strategy.hitCheck(payload, requestedBlockNumber, end, function() { + // miss fallthrough to provider chain, caching the result on the way back up. + next(function(err, result, cb) { + // err is already handled by engine + if (err) return cb() + strategy.cacheResult(payload, result, requestedBlockNumber, cb) + }) + }) +} + +// +// Cache Strategies +// + +function PermaCacheStrategy() { + var self = this + self.cache = {} + // clear cache every ten minutes + var timeout = setInterval(function(){ + self.cache = {} + }, 10 * 60 * 1e3) + // do not require the Node.js event loop to remain active + if (timeout.unref) timeout.unref() +} + +PermaCacheStrategy.prototype.hitCheck = function(payload, requestedBlockNumber, hit, miss) { + var identifier = cacheUtils.cacheIdentifierForPayload(payload) + var cached = this.cache[identifier] + + if (!cached) return miss() + + // If the block number we're requesting at is greater than or + // equal to the block where we cached a previous response, + // the cache is valid. If it's from earlier than the cache, + // send it back down to the client (where it will be recached.) + var cacheIsEarlyEnough = compareHex(requestedBlockNumber, cached.blockNumber) >= 0 + if (cacheIsEarlyEnough) { + var clonedValue = clone(cached.result) + return hit(null, clonedValue) + } else { + return miss() + } +} + +PermaCacheStrategy.prototype.cacheResult = function(payload, result, requestedBlockNumber, callback) { + var identifier = cacheUtils.cacheIdentifierForPayload(payload) + + if (result) { + var clonedValue = clone(result) + this.cache[identifier] = { + blockNumber: requestedBlockNumber, + result: clonedValue, + } + } + + callback() +} + +PermaCacheStrategy.prototype.canCache = function(payload) { + return cacheUtils.canCache(payload) +} + +// +// ConditionalPermaCacheStrategy +// + +function ConditionalPermaCacheStrategy(conditionals) { + this.strategy = new PermaCacheStrategy() + this.conditionals = conditionals +} + +ConditionalPermaCacheStrategy.prototype.hitCheck = function(payload, requestedBlockNumber, hit, miss) { + return this.strategy.hitCheck(payload, requestedBlockNumber, hit, miss) +} + +ConditionalPermaCacheStrategy.prototype.cacheResult = function(payload, result, requestedBlockNumber, callback) { + var conditional = this.conditionals[payload.method] + + if (conditional) { + if (conditional(result)) { + this.strategy.cacheResult(payload, result, requestedBlockNumber, callback) + } else { + callback() + } + } else { + // Cache all requests that don't have a conditional + this.strategy.cacheResult(payload, result, requestedBlockNumber, callback) + } +} + +ConditionalPermaCacheStrategy.prototype.canCache = function(payload) { + return this.strategy.canCache(payload) +} + +// +// BlockCacheStrategy +// + +function BlockCacheStrategy() { + this.cache = {} +} + +BlockCacheStrategy.prototype.getBlockCacheForPayload = function(payload, blockNumberHex) { + const blockNumber = Number.parseInt(blockNumberHex, 16) + let blockCache = this.cache[blockNumber] + // create new cache if necesary + if (!blockCache) { + const newCache = {} + this.cache[blockNumber] = newCache + blockCache = newCache + } + return blockCache +} + +BlockCacheStrategy.prototype.hitCheck = function(payload, requestedBlockNumber, hit, miss) { + var blockCache = this.getBlockCacheForPayload(payload, requestedBlockNumber) + + if (!blockCache) { + return miss() + } + + var identifier = cacheUtils.cacheIdentifierForPayload(payload) + var cached = blockCache[identifier] + + if (cached) { + return hit(null, cached) + } else { + return miss() + } +} + +BlockCacheStrategy.prototype.cacheResult = function(payload, result, requestedBlockNumber, callback) { + if (result) { + var blockCache = this.getBlockCacheForPayload(payload, requestedBlockNumber) + var identifier = cacheUtils.cacheIdentifierForPayload(payload) + blockCache[identifier] = result + } + callback() +} + +BlockCacheStrategy.prototype.canCache = function(payload) { + if (!cacheUtils.canCache(payload)) { + return false + } + + var blockTag = cacheUtils.blockTagForPayload(payload) + + return (blockTag !== 'pending') +} + +// naively removes older block caches +BlockCacheStrategy.prototype.cacheRollOff = function(previousBlock){ + const self = this + const previousHex = ethUtil.bufferToHex(previousBlock.number) + const oldBlockNumber = Number.parseInt(previousHex, 16) + // clear old caches + Object.keys(self.cache) + .map(Number) + .filter(num => num <= oldBlockNumber) + .forEach(num => delete self.cache[num]) +} + + +// util + +function compareHex(hexA, hexB){ + var numA = parseInt(hexA, 16) + var numB = parseInt(hexB, 16) + return numA === numB ? 0 : (numA > numB ? 1 : -1 ) +} + +function hexToBN(hex){ + return new BN(ethUtil.toBuffer(hex)) +} + +function containsBlockhash(result) { + if (!result) return false + if (!result.blockHash) return false + const hasNonZeroHash = hexToBN(result.blockHash).gt(new BN(0)) + return hasNonZeroHash +} + +},{"../util/rpc-cache-utils.js":394,"../util/stoplight.js":396,"./subprovider.js":387,"clone":87,"ethereumjs-util":141,"util":333}],377:[function(require,module,exports){ +const inherits = require('util').inherits +const extend = require('xtend') +const FixtureProvider = require('./fixture.js') +const version = require('../package.json').version + +module.exports = DefaultFixtures + +inherits(DefaultFixtures, FixtureProvider) + +function DefaultFixtures(opts) { + const self = this + opts = opts || {} + var responses = extend({ + web3_clientVersion: 'ProviderEngine/v'+version+'/javascript', + net_listening: true, + eth_hashrate: '0x00', + eth_mining: false, + }, opts) + FixtureProvider.call(self, responses) +} + +},{"../package.json":375,"./fixture.js":380,"util":333,"xtend":423}],378:[function(require,module,exports){ +const fetch = require('cross-fetch') +const inherits = require('util').inherits +const retry = require('async/retry') +const waterfall = require('async/waterfall') +const asyncify = require('async/asyncify') +const JsonRpcError = require('json-rpc-error') +const promiseToCallback = require('promise-to-callback') +const createPayload = require('../util/create-payload.js') +const Subprovider = require('./subprovider.js') + +const RETRIABLE_ERRORS = [ + // ignore server overload errors + 'Gateway timeout', + 'ETIMEDOUT', + // ignore server sent html error pages + // or truncated json responses + 'SyntaxError', +] + +module.exports = RpcSource + +inherits(RpcSource, Subprovider) + +function RpcSource (opts) { + const self = this + self.rpcUrl = opts.rpcUrl + self.originHttpHeaderKey = opts.originHttpHeaderKey +} + +RpcSource.prototype.handleRequest = function (payload, next, end) { + const self = this + const originDomain = payload.origin + + // overwrite id to not conflict with other concurrent users + const newPayload = createPayload(payload) + // remove extra parameter from request + delete newPayload.origin + + const reqParams = { + method: 'POST', + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + }, + body: JSON.stringify(newPayload) + } + + if (self.originHttpHeaderKey && originDomain) { + reqParams.headers[self.originHttpHeaderKey] = originDomain + } + + retry({ + times: 5, + interval: 1000, + errorFilter: isErrorRetriable, + }, + (cb) => self._submitRequest(reqParams, cb), + (err, result) => { + // ends on retriable error + if (err && isErrorRetriable(err)) { + const errMsg = `FetchSubprovider - cannot complete request. All retries exhausted.\nOriginal Error:\n${err.toString()}\n\n` + const retriesExhaustedErr = new Error(errMsg) + return end(retriesExhaustedErr) + } + // otherwise continue normally + return end(err, result) + }) +} + +RpcSource.prototype._submitRequest = function (reqParams, cb) { + const self = this + const targetUrl = self.rpcUrl + + promiseToCallback(fetch(targetUrl, reqParams))((err, res) => { + if (err) return cb(err) + + // continue parsing result + waterfall([ + checkForHttpErrors, + // buffer body + (cb) => promiseToCallback(res.text())(cb), + // parse body + asyncify((rawBody) => JSON.parse(rawBody)), + parseResponse + ], cb) + + function checkForHttpErrors (cb) { + // check for errors + switch (res.status) { + case 405: + return cb(new JsonRpcError.MethodNotFound()) + + case 418: + return cb(createRatelimitError()) + + case 503: + case 504: + return cb(createTimeoutError()) + + default: + return cb() + } + } + + function parseResponse (body, cb) { + // check for error code + if (res.status !== 200) { + return cb(new JsonRpcError.InternalError(body)) + } + // check for rpc error + if (body.error) return cb(new JsonRpcError.InternalError(body.error)) + // return successful result + cb(null, body.result) + } + }) +} + +function isErrorRetriable(err){ + const errMsg = err.toString() + return RETRIABLE_ERRORS.some(phrase => errMsg.includes(phrase)) +} + +function createRatelimitError () { + let msg = `Request is being rate limited.` + const err = new Error(msg) + return new JsonRpcError.InternalError(err) +} + +function createTimeoutError () { + let msg = `Gateway timeout. The request took too long to process. ` + msg += `This can happen when querying logs over too wide a block range.` + const err = new Error(msg) + return new JsonRpcError.InternalError(err) +} + +},{"../util/create-payload.js":391,"./subprovider.js":387,"async/asyncify":20,"async/retry":43,"async/waterfall":44,"cross-fetch":96,"json-rpc-error":189,"promise-to-callback":258,"util":333}],379:[function(require,module,exports){ +const async = require('async') +const inherits = require('util').inherits +const ethUtil = require('ethereumjs-util') +const Subprovider = require('./subprovider.js') +const Stoplight = require('../util/stoplight.js') +const EventEmitter = require('events').EventEmitter + +module.exports = FilterSubprovider + +// handles the following RPC methods: +// eth_newBlockFilter +// eth_newPendingTransactionFilter +// eth_newFilter +// eth_getFilterChanges +// eth_uninstallFilter +// eth_getFilterLogs + +inherits(FilterSubprovider, Subprovider) + +function FilterSubprovider(opts) { + opts = opts || {} + const self = this + self.filterIndex = 0 + self.filters = {} + self.filterDestroyHandlers = {} + self.asyncBlockHandlers = {} + self.asyncPendingBlockHandlers = {} + self._ready = new Stoplight() + self._ready.setMaxListeners(opts.maxFilters || 25) + self._ready.go() + self.pendingBlockTimeout = opts.pendingBlockTimeout || 4000 + self.checkForPendingBlocksActive = false + + // we dont have engine immeditately + setTimeout(function(){ + // asyncBlockHandlers require locking provider until updates are completed + self.engine.on('block', function(block){ + // pause processing + self._ready.stop() + // update filters + var updaters = valuesFor(self.asyncBlockHandlers) + .map(function(fn){ return fn.bind(null, block) }) + async.parallel(updaters, function(err){ + if (err) console.error(err) + // unpause processing + self._ready.go() + }) + }) + }) + +} + +FilterSubprovider.prototype.handleRequest = function(payload, next, end){ + const self = this + switch(payload.method){ + + case 'eth_newBlockFilter': + self.newBlockFilter(end) + return + + case 'eth_newPendingTransactionFilter': + self.newPendingTransactionFilter(end) + self.checkForPendingBlocks() + return + + case 'eth_newFilter': + self.newLogFilter(payload.params[0], end) + return + + case 'eth_getFilterChanges': + self._ready.await(function(){ + self.getFilterChanges(payload.params[0], end) + }) + return + + case 'eth_getFilterLogs': + self._ready.await(function(){ + self.getFilterLogs(payload.params[0], end) + }) + return + + case 'eth_uninstallFilter': + self._ready.await(function(){ + self.uninstallFilter(payload.params[0], end) + }) + return + + default: + next() + return + } +} + +FilterSubprovider.prototype.newBlockFilter = function(cb) { + const self = this + + self._getBlockNumber(function(err, blockNumber){ + if (err) return cb(err) + + var filter = new BlockFilter({ + blockNumber: blockNumber, + }) + + var newBlockHandler = filter.update.bind(filter) + self.engine.on('block', newBlockHandler) + var destroyHandler = function(){ + self.engine.removeListener('block', newBlockHandler) + } + + self.filterIndex++ + self.filters[self.filterIndex] = filter + self.filterDestroyHandlers[self.filterIndex] = destroyHandler + + var hexFilterIndex = intToHex(self.filterIndex) + cb(null, hexFilterIndex) + }) +} + +FilterSubprovider.prototype.newLogFilter = function(opts, cb) { + const self = this + + self._getBlockNumber(function(err, blockNumber){ + if (err) return cb(err) + + var filter = new LogFilter(opts) + var newLogHandler = filter.update.bind(filter) + var blockHandler = function(block, cb){ + self._logsForBlock(block, function(err, logs){ + if (err) return cb(err) + newLogHandler(logs) + cb() + }) + } + + self.filterIndex++ + self.asyncBlockHandlers[self.filterIndex] = blockHandler + self.filters[self.filterIndex] = filter + + var hexFilterIndex = intToHex(self.filterIndex) + cb(null, hexFilterIndex) + }) +} + +FilterSubprovider.prototype.newPendingTransactionFilter = function(cb) { + const self = this + + var filter = new PendingTransactionFilter() + var newTxHandler = filter.update.bind(filter) + var blockHandler = function(block, cb){ + self._txHashesForBlock(block, function(err, txs){ + if (err) return cb(err) + newTxHandler(txs) + cb() + }) + } + + self.filterIndex++ + self.asyncPendingBlockHandlers[self.filterIndex] = blockHandler + self.filters[self.filterIndex] = filter + + var hexFilterIndex = intToHex(self.filterIndex) + cb(null, hexFilterIndex) +} + +FilterSubprovider.prototype.getFilterChanges = function(hexFilterId, cb) { + const self = this + + var filterId = Number.parseInt(hexFilterId, 16) + var filter = self.filters[filterId] + if (!filter) console.warn('FilterSubprovider - no filter with that id:', hexFilterId) + if (!filter) return cb(null, []) + var results = filter.getChanges() + filter.clearChanges() + cb(null, results) +} + +FilterSubprovider.prototype.getFilterLogs = function(hexFilterId, cb) { + const self = this + + var filterId = Number.parseInt(hexFilterId, 16) + var filter = self.filters[filterId] + if (!filter) console.warn('FilterSubprovider - no filter with that id:', hexFilterId) + if (!filter) return cb(null, []) + if (filter.type === 'log') { + self.emitPayload({ + method: 'eth_getLogs', + params: [{ + fromBlock: filter.fromBlock, + toBlock: filter.toBlock, + address: filter.address, + topics: filter.topics, + }], + }, function(err, res){ + if (err) return cb(err) + cb(null, res.result) + }) + } else { + var results = [] + cb(null, results) + } +} + +FilterSubprovider.prototype.uninstallFilter = function(hexFilterId, cb) { + const self = this + + var filterId = Number.parseInt(hexFilterId, 16) + var filter = self.filters[filterId] + if (!filter) { + cb(null, false) + return + } + + self.filters[filterId].removeAllListeners() + + var destroyHandler = self.filterDestroyHandlers[filterId] + delete self.filters[filterId] + delete self.asyncBlockHandlers[filterId] + delete self.asyncPendingBlockHandlers[filterId] + delete self.filterDestroyHandlers[filterId] + if (destroyHandler) destroyHandler() + + cb(null, true) +} + +// private + +// check for pending blocks +FilterSubprovider.prototype.checkForPendingBlocks = function(){ + const self = this + if (self.checkForPendingBlocksActive) return + var activePendingTxFilters = !!Object.keys(self.asyncPendingBlockHandlers).length + if (activePendingTxFilters) { + self.checkForPendingBlocksActive = true + self.emitPayload({ + method: 'eth_getBlockByNumber', + params: ['pending', true], + }, function(err, res){ + if (err) { + self.checkForPendingBlocksActive = false + console.error(err) + return + } + self.onNewPendingBlock(res.result, function(err){ + if (err) console.error(err) + self.checkForPendingBlocksActive = false + setTimeout(self.checkForPendingBlocks.bind(self), self.pendingBlockTimeout) + }) + }) + } +} + +FilterSubprovider.prototype.onNewPendingBlock = function(block, cb){ + const self = this + // update filters + var updaters = valuesFor(self.asyncPendingBlockHandlers) + .map(function(fn){ return fn.bind(null, block) }) + async.parallel(updaters, cb) +} + +FilterSubprovider.prototype._getBlockNumber = function(cb) { + const self = this + var blockNumber = bufferToNumberHex(self.engine.currentBlock.number) + cb(null, blockNumber) +} + +FilterSubprovider.prototype._logsForBlock = function(block, cb) { + const self = this + var blockNumber = bufferToNumberHex(block.number) + self.emitPayload({ + method: 'eth_getLogs', + params: [{ + fromBlock: blockNumber, + toBlock: blockNumber, + }], + }, function(err, response){ + if (err) return cb(err) + if (response.error) return cb(response.error) + cb(null, response.result) + }) + +} + +FilterSubprovider.prototype._txHashesForBlock = function(block, cb) { + const self = this + var txs = block.transactions + // short circuit if empty + if (txs.length === 0) return cb(null, []) + // txs are already hashes + if ('string' === typeof txs[0]) { + cb(null, txs) + // txs are obj, need to map to hashes + } else { + var results = txs.map((tx) => tx.hash) + cb(null, results) + } +} + +// +// BlockFilter +// + +inherits(BlockFilter, EventEmitter) + +function BlockFilter(opts) { + // console.log('BlockFilter - new') + const self = this + EventEmitter.apply(self) + self.type = 'block' + self.engine = opts.engine + self.blockNumber = opts.blockNumber + self.updates = [] +} + +BlockFilter.prototype.update = function(block){ + // console.log('BlockFilter - update') + const self = this + var blockHash = bufferToHex(block.hash) + self.updates.push(blockHash) + self.emit('data', block) +} + +BlockFilter.prototype.getChanges = function(){ + const self = this + var results = self.updates + // console.log('BlockFilter - getChanges:', results.length) + return results +} + +BlockFilter.prototype.clearChanges = function(){ + // console.log('BlockFilter - clearChanges') + const self = this + self.updates = [] +} + +// +// LogFilter +// + +inherits(LogFilter, EventEmitter) + +function LogFilter(opts) { + // console.log('LogFilter - new') + const self = this + EventEmitter.apply(self) + self.type = 'log' + self.fromBlock = (opts.fromBlock !== undefined) ? opts.fromBlock : 'latest' + self.toBlock = (opts.toBlock !== undefined) ? opts.toBlock : 'latest' + var expectedAddress = opts.address && (Array.isArray(opts.address) ? opts.address : [opts.address]); + self.address = expectedAddress && expectedAddress.map(normalizeHex); + self.topics = opts.topics || [] + self.updates = [] + self.allResults = [] +} + +LogFilter.prototype.validateLog = function(log){ + // console.log('LogFilter - validateLog:', log) + const self = this + + // check if block number in bounds: + // console.log('LogFilter - validateLog - blockNumber', self.fromBlock, self.toBlock) + if (blockTagIsNumber(self.fromBlock) && hexToInt(self.fromBlock) >= hexToInt(log.blockNumber)) return false + if (blockTagIsNumber(self.toBlock) && hexToInt(self.toBlock) <= hexToInt(log.blockNumber)) return false + + // address is correct: + // console.log('LogFilter - validateLog - address', self.address) + if (self.address && !(self.address.map((a) => a.toLowerCase()).includes( + log.address.toLowerCase()))) return false + + // topics match: + // topics are position-dependant + // topics can be nested to represent `or` [[a || b], c] + // topics can be null, representing a wild card for that position + // console.log('LogFilter - validateLog - topics', log.topics) + // console.log('LogFilter - validateLog - against topics', self.topics) + var topicsMatch = self.topics.reduce(function(previousMatched, topicPattern, index){ + // abort in progress + if (!previousMatched) return false + // wild card + if (!topicPattern) return true + // pattern is longer than actual topics + var logTopic = log.topics[index] + if (!logTopic) return false + // check each possible matching topic + var subtopicsToMatch = Array.isArray(topicPattern) ? topicPattern : [topicPattern] + var topicDoesMatch = subtopicsToMatch.filter(function(subTopic) { + return logTopic.toLowerCase() === subTopic.toLowerCase() + }).length > 0 + return topicDoesMatch + }, true) + + // console.log('LogFilter - validateLog - '+(topicsMatch ? 'approved!' : 'denied!')+' ==============') + return topicsMatch +} + +LogFilter.prototype.update = function(logs){ + // console.log('LogFilter - update') + const self = this + // validate filter match + var validLogs = [] + logs.forEach(function(log) { + var validated = self.validateLog(log) + if (!validated) return + // add to results + validLogs.push(log) + self.updates.push(log) + self.allResults.push(log) + }) + if (validLogs.length > 0) { + self.emit('data', validLogs) + } +} + +LogFilter.prototype.getChanges = function(){ + // console.log('LogFilter - getChanges') + const self = this + var results = self.updates + return results +} + +LogFilter.prototype.getAllResults = function(){ + // console.log('LogFilter - getAllResults') + const self = this + var results = self.allResults + return results +} + +LogFilter.prototype.clearChanges = function(){ + // console.log('LogFilter - clearChanges') + const self = this + self.updates = [] +} + +// +// PendingTxFilter +// + +inherits(PendingTransactionFilter, EventEmitter) + +function PendingTransactionFilter(){ + // console.log('PendingTransactionFilter - new') + const self = this + EventEmitter.apply(self) + self.type = 'pendingTx' + self.updates = [] + self.allResults = [] +} + +PendingTransactionFilter.prototype.validateUnique = function(tx){ + const self = this + return self.allResults.indexOf(tx) === -1 +} + +PendingTransactionFilter.prototype.update = function(txs){ + // console.log('PendingTransactionFilter - update') + const self = this + var validTxs = [] + txs.forEach(function (tx) { + // validate filter match + var validated = self.validateUnique(tx) + if (!validated) return + // add to results + validTxs.push(tx) + self.updates.push(tx) + self.allResults.push(tx) + }) + if (validTxs.length > 0) { + self.emit('data', validTxs) + } +} + +PendingTransactionFilter.prototype.getChanges = function(){ + // console.log('PendingTransactionFilter - getChanges') + const self = this + var results = self.updates + return results +} + +PendingTransactionFilter.prototype.getAllResults = function(){ + // console.log('PendingTransactionFilter - getAllResults') + const self = this + var results = self.allResults + return results +} + +PendingTransactionFilter.prototype.clearChanges = function(){ + // console.log('PendingTransactionFilter - clearChanges') + const self = this + self.updates = [] +} + +// util + +function normalizeHex(hexString) { + return hexString.slice(0, 2) === '0x' ? hexString : '0x'+hexString +} + +function intToHex(value) { + return ethUtil.intToHex(value) +} + +function hexToInt(hexString) { + return Number(hexString) +} + +function bufferToHex(buffer) { + return '0x'+buffer.toString('hex') +} + +function bufferToNumberHex(buffer) { + return stripLeadingZero(buffer.toString('hex')) +} + +function stripLeadingZero(hexNum) { + let stripped = ethUtil.stripHexPrefix(hexNum) + while (stripped[0] === '0') { + stripped = stripped.substr(1) + } + return `0x${stripped}` +} + +function blockTagIsNumber(blockTag){ + return blockTag && ['earliest', 'latest', 'pending'].indexOf(blockTag) === -1 +} + +function valuesFor(obj){ + return Object.keys(obj).map(function(key){ return obj[key] }) +} + +},{"../util/stoplight.js":396,"./subprovider.js":387,"async":21,"ethereumjs-util":141,"events":157,"util":333}],380:[function(require,module,exports){ +const inherits = require('util').inherits +const Subprovider = require('./subprovider.js') + +module.exports = FixtureProvider + +inherits(FixtureProvider, Subprovider) + +function FixtureProvider(staticResponses){ + const self = this + staticResponses = staticResponses || {} + self.staticResponses = staticResponses +} + +FixtureProvider.prototype.handleRequest = function(payload, next, end){ + const self = this + var staticResponse = self.staticResponses[payload.method] + // async function + if ('function' === typeof staticResponse) { + staticResponse(payload, next, end) + // static response - null is valid response + } else if (staticResponse !== undefined) { + // return result asynchronously + setTimeout(() => end(null, staticResponse)) + // no prepared response - skip + } else { + next() + } +} + +},{"./subprovider.js":387,"util":333}],381:[function(require,module,exports){ +/* + * Emulate 'eth_accounts' / 'eth_sendTransaction' using 'eth_sendRawTransaction' + * + * The two callbacks a user needs to implement are: + * - getAccounts() -- array of addresses supported + * - signTransaction(tx) -- sign a raw transaction object + */ + +const waterfall = require('async/waterfall') +const parallel = require('async/parallel') +const inherits = require('util').inherits +const ethUtil = require('ethereumjs-util') +const sigUtil = require('eth-sig-util') +const extend = require('xtend') +const Semaphore = require('semaphore') +const Subprovider = require('./subprovider.js') +const estimateGas = require('../util/estimate-gas.js') +const hexRegex = /^[0-9A-Fa-f]+$/g + +module.exports = HookedWalletSubprovider + +// handles the following RPC methods: +// eth_coinbase +// eth_accounts +// eth_sendTransaction +// eth_sign +// eth_signTypedData +// personal_sign +// personal_ecRecover +// parity_postTransaction +// parity_checkRequest +// parity_defaultAccount + +// +// Tx Signature Flow +// +// handleRequest: eth_sendTransaction +// validateTransaction (basic validity check) +// validateSender (checks that sender is in accounts) +// processTransaction (sign tx and submit to network) +// approveTransaction (UI approval hook) +// checkApproval +// finalizeAndSubmitTx (tx signing) +// nonceLock.take (bottle neck to ensure atomic nonce) +// fillInTxExtras (set fallback gasPrice, nonce, etc) +// signTransaction (perform the signature) +// publishTransaction (publish signed tx to network) +// + + +inherits(HookedWalletSubprovider, Subprovider) + +function HookedWalletSubprovider(opts){ + const self = this + // control flow + self.nonceLock = Semaphore(1) + + // data lookup + if (opts.getAccounts) self.getAccounts = opts.getAccounts + // high level override + if (opts.processTransaction) self.processTransaction = opts.processTransaction + if (opts.processMessage) self.processMessage = opts.processMessage + if (opts.processPersonalMessage) self.processPersonalMessage = opts.processPersonalMessage + if (opts.processTypedMessage) self.processTypedMessage = opts.processTypedMessage + // approval hooks + self.approveTransaction = opts.approveTransaction || self.autoApprove + self.approveMessage = opts.approveMessage || self.autoApprove + self.approvePersonalMessage = opts.approvePersonalMessage || self.autoApprove + self.approveTypedMessage = opts.approveTypedMessage || self.autoApprove + // actually perform the signature + if (opts.signTransaction) self.signTransaction = opts.signTransaction || mustProvideInConstructor('signTransaction') + if (opts.signMessage) self.signMessage = opts.signMessage || mustProvideInConstructor('signMessage') + if (opts.signPersonalMessage) self.signPersonalMessage = opts.signPersonalMessage || mustProvideInConstructor('signPersonalMessage') + if (opts.signTypedMessage) self.signTypedMessage = opts.signTypedMessage || mustProvideInConstructor('signTypedMessage') + if (opts.recoverPersonalSignature) self.recoverPersonalSignature = opts.recoverPersonalSignature + // publish to network + if (opts.publishTransaction) self.publishTransaction = opts.publishTransaction +} + +HookedWalletSubprovider.prototype.handleRequest = function(payload, next, end){ + const self = this + self._parityRequests = {} + self._parityRequestCount = 0 + + // switch statement is not block scoped + // sp we cant repeat var declarations + let txParams, msgParams, extraParams + let message, address + + switch(payload.method) { + + case 'eth_coinbase': + // process normally + self.getAccounts(function(err, accounts){ + if (err) return end(err) + let result = accounts[0] || null + end(null, result) + }) + return + + case 'eth_accounts': + // process normally + self.getAccounts(function(err, accounts){ + if (err) return end(err) + end(null, accounts) + }) + return + + case 'eth_sendTransaction': + txParams = payload.params[0] + waterfall([ + (cb) => self.validateTransaction(txParams, cb), + (cb) => self.processTransaction(txParams, cb), + ], end) + return + + case 'eth_signTransaction': + txParams = payload.params[0] + waterfall([ + (cb) => self.validateTransaction(txParams, cb), + (cb) => self.processSignTransaction(txParams, cb), + ], end) + return + + case 'eth_sign': + // process normally + address = payload.params[0] + message = payload.params[1] + // non-standard "extraParams" to be appended to our "msgParams" obj + // good place for metadata + extraParams = payload.params[2] || {} + msgParams = extend(extraParams, { + from: address, + data: message, + }) + waterfall([ + (cb) => self.validateMessage(msgParams, cb), + (cb) => self.processMessage(msgParams, cb), + ], end) + return + + case 'personal_sign': + // process normally + const first = payload.params[0] + const second = payload.params[1] + + // We initially incorrectly ordered these parameters. + // To gracefully respect users who adopted this API early, + // we are currently gracefully recovering from the wrong param order + // when it is clearly identifiable. + // + // That means when the first param is definitely an address, + // and the second param is definitely not, but is hex. + if (resemblesData(second) && resemblesAddress(first)) { + let warning = `The eth_personalSign method requires params ordered ` + warning += `[message, address]. This was previously handled incorrectly, ` + warning += `and has been corrected automatically. ` + warning += `Please switch this param order for smooth behavior in the future.` + console.warn(warning) + + address = payload.params[0] + message = payload.params[1] + } else { + message = payload.params[0] + address = payload.params[1] + } + + // non-standard "extraParams" to be appended to our "msgParams" obj + // good place for metadata + extraParams = payload.params[2] || {} + msgParams = extend(extraParams, { + from: address, + data: message, + }) + waterfall([ + (cb) => self.validatePersonalMessage(msgParams, cb), + (cb) => self.processPersonalMessage(msgParams, cb), + ], end) + return + + case 'personal_ecRecover': + message = payload.params[0] + let signature = payload.params[1] + // non-standard "extraParams" to be appended to our "msgParams" obj + // good place for metadata + extraParams = payload.params[2] || {} + msgParams = extend(extraParams, { + sig: signature, + data: message, + }) + self.recoverPersonalSignature(msgParams, end) + return + + case 'eth_signTypedData': + // process normally + message = payload.params[0] + address = payload.params[1] + extraParams = payload.params[2] || {} + msgParams = extend(extraParams, { + from: address, + data: message, + }) + waterfall([ + (cb) => self.validateTypedMessage(msgParams, cb), + (cb) => self.processTypedMessage(msgParams, cb), + ], end) + return + + case 'parity_postTransaction': + txParams = payload.params[0] + self.parityPostTransaction(txParams, end) + return + + case 'parity_postSign': + address = payload.params[0] + message = payload.params[1] + self.parityPostSign(address, message, end) + return + + case 'parity_checkRequest': + const requestId = payload.params[0] + self.parityCheckRequest(requestId, end) + return + + case 'parity_defaultAccount': + self.getAccounts(function(err, accounts){ + if (err) return end(err) + const account = accounts[0] || null + end(null, account) + }) + return + + default: + next() + return + + } +} + +// +// data lookup +// + +HookedWalletSubprovider.prototype.getAccounts = function(cb) { + cb(null, []) +} + + +// +// "process" high level flow +// + +HookedWalletSubprovider.prototype.processTransaction = function(txParams, cb) { + const self = this + waterfall([ + (cb) => self.approveTransaction(txParams, cb), + (didApprove, cb) => self.checkApproval('transaction', didApprove, cb), + (cb) => self.finalizeAndSubmitTx(txParams, cb), + ], cb) +} + + +HookedWalletSubprovider.prototype.processSignTransaction = function(txParams, cb) { + const self = this + waterfall([ + (cb) => self.approveTransaction(txParams, cb), + (didApprove, cb) => self.checkApproval('transaction', didApprove, cb), + (cb) => self.finalizeTx(txParams, cb), + ], cb) +} + +HookedWalletSubprovider.prototype.processMessage = function(msgParams, cb) { + const self = this + waterfall([ + (cb) => self.approveMessage(msgParams, cb), + (didApprove, cb) => self.checkApproval('message', didApprove, cb), + (cb) => self.signMessage(msgParams, cb), + ], cb) +} + +HookedWalletSubprovider.prototype.processPersonalMessage = function(msgParams, cb) { + const self = this + waterfall([ + (cb) => self.approvePersonalMessage(msgParams, cb), + (didApprove, cb) => self.checkApproval('message', didApprove, cb), + (cb) => self.signPersonalMessage(msgParams, cb), + ], cb) +} + +HookedWalletSubprovider.prototype.processTypedMessage = function(msgParams, cb) { + const self = this + waterfall([ + (cb) => self.approveTypedMessage(msgParams, cb), + (didApprove, cb) => self.checkApproval('message', didApprove, cb), + (cb) => self.signTypedMessage(msgParams, cb), + ], cb) +} + +// +// approval +// + +HookedWalletSubprovider.prototype.autoApprove = function(txParams, cb) { + cb(null, true) +} + +HookedWalletSubprovider.prototype.checkApproval = function(type, didApprove, cb) { + cb( didApprove ? null : new Error('User denied '+type+' signature.') ) +} + +// +// parity +// + +HookedWalletSubprovider.prototype.parityPostTransaction = function(txParams, cb) { + const self = this + + // get next id + const count = self._parityRequestCount + const reqId = `0x${count.toString(16)}` + self._parityRequestCount++ + + self.emitPayload({ + method: 'eth_sendTransaction', + params: [txParams], + }, function(error, res){ + if (error) { + self._parityRequests[reqId] = { error } + return + } + const txHash = res.result + self._parityRequests[reqId] = txHash + }) + + cb(null, reqId) +} + + +HookedWalletSubprovider.prototype.parityPostSign = function(address, message, cb) { + const self = this + + // get next id + const count = self._parityRequestCount + const reqId = `0x${count.toString(16)}` + self._parityRequestCount++ + + self.emitPayload({ + method: 'eth_sign', + params: [address, message], + }, function(error, res){ + if (error) { + self._parityRequests[reqId] = { error } + return + } + const result = res.result + self._parityRequests[reqId] = result + }) + + cb(null, reqId) +} + +HookedWalletSubprovider.prototype.parityCheckRequest = function(reqId, cb) { + const self = this + const result = self._parityRequests[reqId] || null + // tx not handled yet + if (!result) return cb(null, null) + // tx was rejected (or other error) + if (result.error) return cb(result.error) + // tx sent + cb(null, result) +} + +// +// signature and recovery +// + +HookedWalletSubprovider.prototype.recoverPersonalSignature = function(msgParams, cb) { + let senderHex + try { + senderHex = sigUtil.recoverPersonalSignature(msgParams) + } catch (err) { + return cb(err) + } + cb(null, senderHex) +} + +// +// validation +// + +HookedWalletSubprovider.prototype.validateTransaction = function(txParams, cb){ + const self = this + // shortcut: undefined sender is invalid + if (txParams.from === undefined) return cb(new Error(`Undefined address - from address required to sign transaction.`)) + self.validateSender(txParams.from, function(err, senderIsValid){ + if (err) return cb(err) + if (!senderIsValid) return cb(new Error(`Unknown address - unable to sign transaction for this address: "${txParams.from}"`)) + cb() + }) +} + +HookedWalletSubprovider.prototype.validateMessage = function(msgParams, cb){ + const self = this + if (msgParams.from === undefined) return cb(new Error(`Undefined address - from address required to sign message.`)) + self.validateSender(msgParams.from, function(err, senderIsValid){ + if (err) return cb(err) + if (!senderIsValid) return cb(new Error(`Unknown address - unable to sign message for this address: "${msgParams.from}"`)) + cb() + }) +} + +HookedWalletSubprovider.prototype.validatePersonalMessage = function(msgParams, cb){ + const self = this + if (msgParams.from === undefined) return cb(new Error(`Undefined address - from address required to sign personal message.`)) + if (msgParams.data === undefined) return cb(new Error(`Undefined message - message required to sign personal message.`)) + if (!isValidHex(msgParams.data)) return cb(new Error(`HookedWalletSubprovider - validateMessage - message was not encoded as hex.`)) + self.validateSender(msgParams.from, function(err, senderIsValid){ + if (err) return cb(err) + if (!senderIsValid) return cb(new Error(`Unknown address - unable to sign message for this address: "${msgParams.from}"`)) + cb() + }) +} + +HookedWalletSubprovider.prototype.validateTypedMessage = function(msgParams, cb){ + if (msgParams.from === undefined) return cb(new Error(`Undefined address - from address required to sign typed data.`)) + if (msgParams.data === undefined) return cb(new Error(`Undefined data - message required to sign typed data.`)) + this.validateSender(msgParams.from, function(err, senderIsValid){ + if (err) return cb(err) + if (!senderIsValid) return cb(new Error(`Unknown address - unable to sign message for this address: "${msgParams.from}"`)) + cb() + }) +} + +HookedWalletSubprovider.prototype.validateSender = function(senderAddress, cb){ + const self = this + // shortcut: undefined sender is invalid + if (!senderAddress) return cb(null, false) + self.getAccounts(function(err, accounts){ + if (err) return cb(err) + const senderIsValid = (accounts.map(toLowerCase).indexOf(senderAddress.toLowerCase()) !== -1) + cb(null, senderIsValid) + }) +} + +// +// tx helpers +// + +HookedWalletSubprovider.prototype.finalizeAndSubmitTx = function(txParams, cb) { + const self = this + // can only allow one tx to pass through this flow at a time + // so we can atomically consume a nonce + self.nonceLock.take(function(){ + waterfall([ + self.fillInTxExtras.bind(self, txParams), + self.signTransaction.bind(self), + self.publishTransaction.bind(self), + ], function(err, txHash){ + self.nonceLock.leave() + if (err) return cb(err) + cb(null, txHash) + }) + }) +} + +HookedWalletSubprovider.prototype.finalizeTx = function(txParams, cb) { + const self = this + // can only allow one tx to pass through this flow at a time + // so we can atomically consume a nonce + self.nonceLock.take(function(){ + waterfall([ + self.fillInTxExtras.bind(self, txParams), + self.signTransaction.bind(self), + ], function(err, signedTx){ + self.nonceLock.leave() + if (err) return cb(err) + cb(null, {raw: signedTx, tx: txParams}) + }) + }) +} + +HookedWalletSubprovider.prototype.publishTransaction = function(rawTx, cb) { + const self = this + self.emitPayload({ + method: 'eth_sendRawTransaction', + params: [rawTx], + }, function(err, res){ + if (err) return cb(err) + cb(null, res.result) + }) +} + +HookedWalletSubprovider.prototype.fillInTxExtras = function(txParams, cb){ + const self = this + const address = txParams.from + // console.log('fillInTxExtras - address:', address) + + const reqs = {} + + if (txParams.gasPrice === undefined) { + // console.log("need to get gasprice") + reqs.gasPrice = self.emitPayload.bind(self, { method: 'eth_gasPrice', params: [] }) + } + + if (txParams.nonce === undefined) { + // console.log("need to get nonce") + reqs.nonce = self.emitPayload.bind(self, { method: 'eth_getTransactionCount', params: [address, 'pending'] }) + } + + if (txParams.gas === undefined) { + // console.log("need to get gas") + reqs.gas = estimateGas.bind(null, self.engine, cloneTxParams(txParams)) + } + + parallel(reqs, function(err, result) { + if (err) return cb(err) + // console.log('fillInTxExtras - result:', result) + + const res = {} + if (result.gasPrice) res.gasPrice = result.gasPrice.result + if (result.nonce) res.nonce = result.nonce.result + if (result.gas) res.gas = result.gas + + cb(null, extend(txParams, res)) + }) +} + +// util + +// we use this to clean any custom params from the txParams +function cloneTxParams(txParams){ + return { + from: txParams.from, + to: txParams.to, + value: txParams.value, + data: txParams.data, + gas: txParams.gas, + gasPrice: txParams.gasPrice, + nonce: txParams.nonce, + } +} + +function toLowerCase(string){ + return string.toLowerCase() +} + +function resemblesAddress (string) { + const fixed = ethUtil.addHexPrefix(string) + const isValid = ethUtil.isValidAddress(fixed) + return isValid +} + +// Returns true if resembles hex data +// but definitely not a valid address. +function resemblesData (string) { + const fixed = ethUtil.addHexPrefix(string) + const isValidAddress = ethUtil.isValidAddress(fixed) + return !isValidAddress && isValidHex(string) +} + +function isValidHex(data) { + const isString = typeof data === 'string' + if (!isString) return false + const isHexPrefixed = data.slice(0,2) === '0x' + if (!isHexPrefixed) return false + const nonPrefixed = data.slice(2) + const isValid = nonPrefixed.match(hexRegex) + return isValid +} + +function mustProvideInConstructor(methodName) { + return function(params, cb) { + cb(new Error('ProviderEngine - HookedWalletSubprovider - Must provide "' + methodName + '" fn in constructor options')) + } +} + +},{"../util/estimate-gas.js":392,"./subprovider.js":387,"async/parallel":42,"async/waterfall":44,"eth-sig-util":136,"ethereumjs-util":141,"semaphore":301,"util":333,"xtend":423}],382:[function(require,module,exports){ +const cacheIdentifierForPayload = require('../util/rpc-cache-utils.js').cacheIdentifierForPayload +const Subprovider = require('./subprovider.js') + + +class InflightCacheSubprovider extends Subprovider { + + constructor (opts) { + super() + this.inflightRequests = {} + } + + addEngine (engine) { + this.engine = engine + } + + handleRequest (req, next, end) { + const cacheId = cacheIdentifierForPayload(req, { includeBlockRef: true }) + + // if not cacheable, skip + if (!cacheId) return next() + + // check for matching requests + let activeRequestHandlers = this.inflightRequests[cacheId] + + if (!activeRequestHandlers) { + // create inflight cache for cacheId + activeRequestHandlers = [] + this.inflightRequests[cacheId] = activeRequestHandlers + + next((err, result, cb) => { + // complete inflight for cacheId + delete this.inflightRequests[cacheId] + activeRequestHandlers.forEach((handler) => handler(err, result)) + cb(err, result) + }) + + } else { + // hit inflight cache for cacheId + // setup the response listener + activeRequestHandlers.push(end) + } + + } +} + +module.exports = InflightCacheSubprovider + + +},{"../util/rpc-cache-utils.js":394,"./subprovider.js":387}],383:[function(require,module,exports){ +const createInfuraProvider = require('eth-json-rpc-infura/src/createProvider') +const ProviderSubprovider = require('./provider.js') + +class InfuraSubprovider extends ProviderSubprovider { + constructor(opts = {}) { + const provider = createInfuraProvider(opts) + super(provider) + } +} + +module.exports = InfuraSubprovider + +},{"./provider.js":385,"eth-json-rpc-infura/src/createProvider":129}],384:[function(require,module,exports){ +(function (Buffer){ +const inherits = require('util').inherits +const Transaction = require('ethereumjs-tx') +const ethUtil = require('ethereumjs-util') +const Subprovider = require('./subprovider.js') +const blockTagForPayload = require('../util/rpc-cache-utils').blockTagForPayload + +module.exports = NonceTrackerSubprovider + +// handles the following RPC methods: +// eth_getTransactionCount (pending only) +// observes the following RPC methods: +// eth_sendRawTransaction + + +inherits(NonceTrackerSubprovider, Subprovider) + +function NonceTrackerSubprovider(opts){ + const self = this + + self.nonceCache = {} +} + +NonceTrackerSubprovider.prototype.handleRequest = function(payload, next, end){ + const self = this + + switch(payload.method) { + + case 'eth_getTransactionCount': + var blockTag = blockTagForPayload(payload) + var address = payload.params[0].toLowerCase() + var cachedResult = self.nonceCache[address] + // only handle requests against the 'pending' blockTag + if (blockTag === 'pending') { + // has a result + if (cachedResult) { + end(null, cachedResult) + // fallthrough then populate cache + } else { + next(function(err, result, cb){ + if (err) return cb() + if (self.nonceCache[address] === undefined) { + self.nonceCache[address] = result + } + cb() + }) + } + } else { + next() + } + return + + case 'eth_sendRawTransaction': + // allow the request to continue normally + next(function(err, result, cb){ + // only update local nonce if tx was submitted correctly + if (err) return cb() + // parse raw tx + var rawTx = payload.params[0] + var stripped = ethUtil.stripHexPrefix(rawTx) + var rawData = new Buffer(ethUtil.stripHexPrefix(rawTx), 'hex') + var tx = new Transaction(new Buffer(ethUtil.stripHexPrefix(rawTx), 'hex')) + // extract address + var address = '0x'+tx.getSenderAddress().toString('hex').toLowerCase() + // extract nonce and increment + var nonce = ethUtil.bufferToInt(tx.nonce) + nonce++ + // hexify and normalize + var hexNonce = nonce.toString(16) + if (hexNonce.length%2) hexNonce = '0'+hexNonce + hexNonce = '0x'+hexNonce + // dont update our record on the nonce until the submit was successful + // update cache + self.nonceCache[address] = hexNonce + cb() + }) + return + + default: + next() + return + + } +} +}).call(this,require("buffer").Buffer) +},{"../util/rpc-cache-utils":394,"./subprovider.js":387,"buffer":84,"ethereumjs-tx":140,"ethereumjs-util":141,"util":333}],385:[function(require,module,exports){ +const inherits = require('util').inherits +const Subprovider = require('./subprovider.js') + +// wraps a provider in a subprovider interface + +module.exports = ProviderSubprovider + +inherits(ProviderSubprovider, Subprovider) + +function ProviderSubprovider(provider){ + if (!provider) throw new Error('ProviderSubprovider - no provider specified') + if (!provider.sendAsync) throw new Error('ProviderSubprovider - specified provider does not have a sendAsync method') + this.provider = provider +} + +ProviderSubprovider.prototype.handleRequest = function(payload, next, end){ + this.provider.sendAsync(payload, function(err, response) { + if (err) return end(err) + if (response.error) return end(new Error(response.error.message)) + end(null, response.result) + }) +} + +},{"./subprovider.js":387,"util":333}],386:[function(require,module,exports){ +/* Sanitization Subprovider + * For Parity compatibility + * removes irregular keys + */ + +const inherits = require('util').inherits +const Subprovider = require('./subprovider.js') +const extend = require('xtend') +const ethUtil = require('ethereumjs-util') + +module.exports = SanitizerSubprovider + +inherits(SanitizerSubprovider, Subprovider) + +function SanitizerSubprovider(opts){ + const self = this +} + +SanitizerSubprovider.prototype.handleRequest = function(payload, next, end){ + var txParams = payload.params[0] + + if (typeof txParams === 'object' && !Array.isArray(txParams)) { + var sanitized = cloneTxParams(txParams) + payload.params[0] = sanitized + } + + next() +} + +// we use this to clean any custom params from the txParams +var permitted = [ + 'from', + 'to', + 'value', + 'data', + 'gas', + 'gasPrice', + 'nonce', + 'fromBlock', + 'toBlock', + 'address', + 'topics', +] + +function cloneTxParams(txParams){ + var sanitized = permitted.reduce(function(copy, permitted) { + if (permitted in txParams) { + if (Array.isArray(txParams[permitted])) { + copy[permitted] = txParams[permitted] + .map(function(item) { + return sanitize(item) + }) + } else { + copy[permitted] = sanitize(txParams[permitted]) + } + } + return copy + }, {}) + + return sanitized +} + +function sanitize(value) { + switch (value) { + case 'latest': + return value + case 'pending': + return value + case 'earliest': + return value + default: + if (typeof value === 'string') { + return ethUtil.addHexPrefix(value.toLowerCase()) + } else { + return value + } + } +} + +},{"./subprovider.js":387,"ethereumjs-util":141,"util":333,"xtend":423}],387:[function(require,module,exports){ +const createPayload = require('../util/create-payload.js') + +module.exports = SubProvider + +// this is the base class for a subprovider -- mostly helpers + + +function SubProvider() { + +} + +SubProvider.prototype.setEngine = function(engine) { + const self = this + self.engine = engine + engine.on('block', function(block) { + self.currentBlock = block + }) +} + +SubProvider.prototype.handleRequest = function(payload, next, end) { + throw new Error('Subproviders should override `handleRequest`.') +} + +SubProvider.prototype.emitPayload = function(payload, cb){ + const self = this + self.engine.sendAsync(createPayload(payload), cb) +} +},{"../util/create-payload.js":391}],388:[function(require,module,exports){ +const EventEmitter = require('events').EventEmitter +const FilterSubprovider = require('./filters.js') +const from = require('../util/rpc-hex-encoding.js') +const inherits = require('util').inherits +const utils = require('ethereumjs-util') + +function SubscriptionSubprovider(opts) { + const self = this + + opts = opts || {} + + EventEmitter.apply(this, Array.prototype.slice.call(arguments)) + FilterSubprovider.apply(this, [opts]) + + this.subscriptions = {} +} + +inherits(SubscriptionSubprovider, FilterSubprovider) + +// a cheap crack at multiple inheritance +// I don't really care if `instanceof EventEmitter` passes... +Object.assign(SubscriptionSubprovider.prototype, EventEmitter.prototype) + +// preserve our constructor, though +SubscriptionSubprovider.prototype.constructor = SubscriptionSubprovider + +SubscriptionSubprovider.prototype.eth_subscribe = function(payload, cb) { + const self = this + let createSubscriptionFilter = () => {} + let subscriptionType = payload.params[0] + + switch (subscriptionType) { + case 'logs': + let options = payload.params[1] + + createSubscriptionFilter = self.newLogFilter.bind(self, options) + break + case 'newPendingTransactions': + createSubscriptionFilter = self.newPendingTransactionFilter.bind(self) + break + case 'newHeads': + createSubscriptionFilter = self.newBlockFilter.bind(self) + break + case 'syncing': + default: + cb(new Error('unsupported subscription type')) + return + } + + createSubscriptionFilter(function(err, hexId) { + if (err) return cb(err) + + const id = Number.parseInt(hexId, 16) + self.subscriptions[id] = subscriptionType + + self.filters[id].on('data', function(results) { + if (!Array.isArray(results)) { + results = [results] + } + + var notificationHandler = self._notificationHandler.bind(self, hexId, subscriptionType) + results.forEach(notificationHandler) + self.filters[id].clearChanges() + }) + if (subscriptionType === 'newPendingTransactions') { + self.checkForPendingBlocks() + } + cb(null, hexId) + }) +} + +SubscriptionSubprovider.prototype.eth_unsubscribe = function(payload, cb) { + const self = this + let hexId = payload.params[0] + const id = Number.parseInt(hexId, 16) + if (!self.subscriptions[id]) { + cb(new Error(`Subscription ID ${hexId} not found.`)) + } else { + let subscriptionType = self.subscriptions[id] + self.uninstallFilter(hexId, function (err, result) { + delete self.subscriptions[id] + cb(err, result) + }) + } +} + + +SubscriptionSubprovider.prototype._notificationHandler = function (hexId, subscriptionType, result) { + const self = this + if (subscriptionType === 'newHeads') { + result = self._notificationResultFromBlock(result) + } + + // it seems that web3 doesn't expect there to be a separate error event + // so we must emit null along with the result object + self.emit('data', null, { + jsonrpc: "2.0", + method: "eth_subscription", + params: { + subscription: hexId, + result: result, + }, + }) +} + +SubscriptionSubprovider.prototype._notificationResultFromBlock = function(block) { + return { + hash: utils.bufferToHex(block.hash), + parentHash: utils.bufferToHex(block.parentHash), + sha3Uncles: utils.bufferToHex(block.sha3Uncles), + miner: utils.bufferToHex(block.miner), + stateRoot: utils.bufferToHex(block.stateRoot), + transactionsRoot: utils.bufferToHex(block.transactionsRoot), + receiptsRoot: utils.bufferToHex(block.receiptsRoot), + logsBloom: utils.bufferToHex(block.logsBloom), + difficulty: from.intToQuantityHex(utils.bufferToInt(block.difficulty)), + number: from.intToQuantityHex(utils.bufferToInt(block.number)), + gasLimit: from.intToQuantityHex(utils.bufferToInt(block.gasLimit)), + gasUsed: from.intToQuantityHex(utils.bufferToInt(block.gasUsed)), + nonce: block.nonce ? utils.bufferToHex(block.nonce): null, + mixHash: utils.bufferToHex(block.mixHash), + timestamp: from.intToQuantityHex(utils.bufferToInt(block.timestamp)), + extraData: utils.bufferToHex(block.extraData) + } +} + +SubscriptionSubprovider.prototype.handleRequest = function(payload, next, end) { + switch(payload.method){ + case 'eth_subscribe': + this.eth_subscribe(payload, end) + break + case 'eth_unsubscribe': + this.eth_unsubscribe(payload, end) + break + default: + FilterSubprovider.prototype.handleRequest.apply(this, Array.prototype.slice.call(arguments)) + } +} + +module.exports = SubscriptionSubprovider + +},{"../util/rpc-hex-encoding.js":395,"./filters.js":379,"ethereumjs-util":141,"events":157,"util":333}],389:[function(require,module,exports){ +(function (global){ +const Backoff = require('backoff') +const EventEmitter = require('events') +const inherits = require('util').inherits +const WebSocket = global.WebSocket || require('ws') +const Subprovider = require('./subprovider') +const createPayload = require('../util/create-payload') + +class WebsocketSubprovider + extends Subprovider { + constructor({ rpcUrl, debug, origin }) { + super() + + // inherit from EventEmitter + EventEmitter.call(this) + + Object.defineProperties(this, { + _backoff: { + value: Backoff.exponential({ + randomisationFactor: 0.2, + maxDelay: 5000 + }) + }, + _connectTime: { + value: null, + writable: true + }, + _log: { + value: debug + ? (...args) => console.info.apply(console, ['[WSProvider]', ...args]) + : () => { } + }, + _origin: { + value: origin + }, + _pendingRequests: { + value: new Map() + }, + _socket: { + value: null, + writable: true + }, + _unhandledRequests: { + value: [] + }, + _url: { + value: rpcUrl + } + }) + + this._handleSocketClose = this._handleSocketClose.bind(this) + this._handleSocketMessage = this._handleSocketMessage.bind(this) + this._handleSocketOpen = this._handleSocketOpen.bind(this) + + // Called when a backoff timeout has finished. Time to try reconnecting. + this._backoff.on('ready', () => { + this._openSocket() + }) + + this._openSocket() + } + + handleRequest(payload, next, end) { + if (!this._socket || this._socket.readyState !== WebSocket.OPEN) { + this._unhandledRequests.push(Array.from(arguments)) + this._log('Socket not open. Request queued.') + return + } + + this._pendingRequests.set(payload.id, [payload, end]) + + const newPayload = createPayload(payload) + delete newPayload.origin + + this._socket.send(JSON.stringify(newPayload)) + this._log(`Sent: ${newPayload.method} #${newPayload.id}`) + } + + _handleSocketClose({ reason, code }) { + this._log(`Socket closed, code ${code} (${reason || 'no reason'})`) + // If the socket has been open for longer than 5 seconds, reset the backoff + if (this._connectTime && Date.now() - this._connectTime > 5000) { + this._backoff.reset() + } + + this._socket.removeEventListener('close', this._handleSocketClose) + this._socket.removeEventListener('message', this._handleSocketMessage) + this._socket.removeEventListener('open', this._handleSocketOpen) + + this._socket = null + this._backoff.backoff() + } + + _handleSocketMessage(message) { + let payload + + try { + payload = JSON.parse(message.data) + } catch (e) { + this._log('Received a message that is not valid JSON:', payload) + return + } + + // check if server-sent notification + if (payload.id === undefined) { + return this.emit('data', null, payload) + } + + // ignore if missing + if (!this._pendingRequests.has(payload.id)) { + return + } + + // retrieve payload + arguments + const [originalReq, end] = this._pendingRequests.get(payload.id) + this._pendingRequests.delete(payload.id) + + this._log(`Received: ${originalReq.method} #${payload.id}`) + + // forward response + if (payload.error) { + return end(new Error(payload.error.message)) + } + end(null, payload.result) + } + + _handleSocketOpen() { + this._log('Socket open.') + this._connectTime = Date.now() + + // Any pending requests need to be resent because our session was lost + // and will not get responses for them in our new session. + this._pendingRequests.forEach(([payload, end]) => { + this._unhandledRequests.push([payload, null, end]) + }) + this._pendingRequests.clear() + + const unhandledRequests = this._unhandledRequests.splice(0, this._unhandledRequests.length) + unhandledRequests.forEach(request => { + this.handleRequest.apply(this, request) + }) + } + + _openSocket() { + this._log('Opening socket...') + this._socket = new WebSocket(this._url, null, {origin: this._origin}) + this._socket.addEventListener('close', this._handleSocketClose) + this._socket.addEventListener('message', this._handleSocketMessage) + this._socket.addEventListener('open', this._handleSocketOpen) + } +} + +// multiple inheritance +Object.assign(WebsocketSubprovider.prototype, EventEmitter.prototype) + +module.exports = WebsocketSubprovider + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"../util/create-payload":391,"./subprovider":387,"backoff":45,"events":157,"util":333,"ws":55}],390:[function(require,module,exports){ +module.exports = assert + +function assert(condition, message) { + if (!condition) { + throw message || "Assertion failed"; + } +} + +},{}],391:[function(require,module,exports){ +const getRandomId = require('./random-id.js') +const extend = require('xtend') + +module.exports = createPayload + + +function createPayload(data){ + return extend({ + // defaults + id: getRandomId(), + jsonrpc: '2.0', + params: [], + // user-specified + }, data) +} + +},{"./random-id.js":393,"xtend":423}],392:[function(require,module,exports){ +const createPayload = require('./create-payload.js') + +module.exports = estimateGas + +/* + +This is a work around for https://github.com/ethereum/go-ethereum/issues/2577 + +*/ + + +function estimateGas(provider, txParams, cb) { + provider.sendAsync(createPayload({ + method: 'eth_estimateGas', + params: [txParams] + }), function(err, res){ + if (err) { + // handle simple value transfer case + if (err.message === 'no contract code at given address') { + return cb(null, '0xcf08') + } else { + return cb(err) + } + } + cb(null, res.result) + }) +} +},{"./create-payload.js":391}],393:[function(require,module,exports){ +// gotta keep it within MAX_SAFE_INTEGER +const extraDigits = 3 + +module.exports = createRandomId + + +function createRandomId(){ + // 13 time digits + var datePart = new Date().getTime()*Math.pow(10, extraDigits) + // 3 random digits + var extraPart = Math.floor(Math.random()*Math.pow(10, extraDigits)) + // 16 digits + return datePart+extraPart +} +},{}],394:[function(require,module,exports){ +const stringify = require('json-stable-stringify') + +module.exports = { + cacheIdentifierForPayload: cacheIdentifierForPayload, + canCache: canCache, + blockTagForPayload: blockTagForPayload, + paramsWithoutBlockTag: paramsWithoutBlockTag, + blockTagParamIndex: blockTagParamIndex, + cacheTypeForPayload: cacheTypeForPayload, +} + +function cacheIdentifierForPayload(payload, opts = {}){ + if (!canCache(payload)) return null + const { includeBlockRef } = opts + const params = includeBlockRef ? payload.params : paramsWithoutBlockTag(payload) + return payload.method + ':' + stringify(params) +} + +function canCache(payload){ + return cacheTypeForPayload(payload) !== 'never' +} + +function blockTagForPayload(payload){ + var index = blockTagParamIndex(payload); + + // Block tag param not passed. + if (index >= payload.params.length) { + return null; + } + + return payload.params[index]; +} + +function paramsWithoutBlockTag(payload){ + var index = blockTagParamIndex(payload); + + // Block tag param not passed. + if (index >= payload.params.length) { + return payload.params; + } + + // eth_getBlockByNumber has the block tag first, then the optional includeTx? param + if (payload.method === 'eth_getBlockByNumber') { + return payload.params.slice(1); + } + + return payload.params.slice(0,index); +} + +function blockTagParamIndex(payload){ + switch(payload.method) { + // blockTag is third param + case 'eth_getStorageAt': + return 2 + // blockTag is second param + case 'eth_getBalance': + case 'eth_getCode': + case 'eth_getTransactionCount': + case 'eth_call': + case 'eth_estimateGas': + return 1 + // blockTag is first param + case 'eth_getBlockByNumber': + return 0 + // there is no blockTag + default: + return undefined + } +} + +function cacheTypeForPayload(payload) { + switch (payload.method) { + // cache permanently + case 'web3_clientVersion': + case 'web3_sha3': + case 'eth_protocolVersion': + case 'eth_getBlockTransactionCountByHash': + case 'eth_getUncleCountByBlockHash': + case 'eth_getCode': + case 'eth_getBlockByHash': + case 'eth_getTransactionByHash': + case 'eth_getTransactionByBlockHashAndIndex': + case 'eth_getTransactionReceipt': + case 'eth_getUncleByBlockHashAndIndex': + case 'eth_getCompilers': + case 'eth_compileLLL': + case 'eth_compileSolidity': + case 'eth_compileSerpent': + case 'shh_version': + return 'perma' + + // cache until fork + case 'eth_getBlockByNumber': + case 'eth_getBlockTransactionCountByNumber': + case 'eth_getUncleCountByBlockNumber': + case 'eth_getTransactionByBlockNumberAndIndex': + case 'eth_getUncleByBlockNumberAndIndex': + return 'fork' + + // cache for block + case 'eth_gasPrice': + case 'eth_blockNumber': + case 'eth_getBalance': + case 'eth_getStorageAt': + case 'eth_getTransactionCount': + case 'eth_call': + case 'eth_estimateGas': + case 'eth_getFilterLogs': + case 'eth_getLogs': + case 'net_peerCount': + return 'block' + + // never cache + case 'net_version': + case 'net_peerCount': + case 'net_listening': + case 'eth_syncing': + case 'eth_sign': + case 'eth_coinbase': + case 'eth_mining': + case 'eth_hashrate': + case 'eth_accounts': + case 'eth_sendTransaction': + case 'eth_sendRawTransaction': + case 'eth_newFilter': + case 'eth_newBlockFilter': + case 'eth_newPendingTransactionFilter': + case 'eth_uninstallFilter': + case 'eth_getFilterChanges': + case 'eth_getWork': + case 'eth_submitWork': + case 'eth_submitHashrate': + case 'db_putString': + case 'db_getString': + case 'db_putHex': + case 'db_getHex': + case 'shh_post': + case 'shh_newIdentity': + case 'shh_hasIdentity': + case 'shh_newGroup': + case 'shh_addToGroup': + case 'shh_newFilter': + case 'shh_uninstallFilter': + case 'shh_getFilterChanges': + case 'shh_getMessages': + return 'never' + } +} + +},{"json-stable-stringify":374}],395:[function(require,module,exports){ +(function (Buffer){ +const ethUtil = require('ethereumjs-util') +const assert = require('./assert.js') + +module.exports = { + intToQuantityHex: intToQuantityHex, + quantityHexToInt: quantityHexToInt, +} + +/* + * As per https://github.com/ethereum/wiki/wiki/JSON-RPC#hex-value-encoding + * Quanities should be represented by the most compact hex representation possible + * This means that no leading zeroes are allowed. There helpers make it easy + * to convert to and from integers and their compact hex representation + */ + +function intToQuantityHex(n){ + assert(typeof n === 'number' && n === Math.floor(n), 'intToQuantityHex arg must be an integer') + var nHex = ethUtil.toBuffer(n).toString('hex') + if (nHex[0] === '0') { + nHex = nHex.substring(1) + } + return ethUtil.addHexPrefix(nHex) +} + +function quantityHexToInt(prefixedQuantityHex) { + assert(typeof prefixedQuantityHex === 'string', 'arg to quantityHexToInt must be a string') + var quantityHex = ethUtil.stripHexPrefix(prefixedQuantityHex) + var isEven = quantityHex.length % 2 === 0 + if (!isEven) { + quantityHex = '0' + quantityHex + } + var buf = new Buffer(quantityHex, 'hex') + return ethUtil.bufferToInt(buf) +} + +}).call(this,require("buffer").Buffer) +},{"./assert.js":390,"buffer":84,"ethereumjs-util":141}],396:[function(require,module,exports){ +const EventEmitter = require('events').EventEmitter +const inherits = require('util').inherits + +module.exports = Stoplight + + +inherits(Stoplight, EventEmitter) + +function Stoplight(){ + const self = this + EventEmitter.call(self) + self.isLocked = true +} + +Stoplight.prototype.go = function(){ + const self = this + self.isLocked = false + self.emit('unlock') +} + +Stoplight.prototype.stop = function(){ + const self = this + self.isLocked = true + self.emit('lock') +} + +Stoplight.prototype.await = function(fn){ + const self = this + if (self.isLocked) { + self.once('unlock', fn) + } else { + setTimeout(fn) + } +} +},{"events":157,"util":333}],397:[function(require,module,exports){ +const ProviderEngine = require('./index.js') +const DefaultFixture = require('./subproviders/default-fixture.js') +const NonceTrackerSubprovider = require('./subproviders/nonce-tracker.js') +const CacheSubprovider = require('./subproviders/cache.js') +const FilterSubprovider = require('./subproviders/filters.js') +const SubscriptionSubprovider = require('./subproviders/subscriptions') +const InflightCacheSubprovider = require('./subproviders/inflight-cache') +const HookedWalletSubprovider = require('./subproviders/hooked-wallet.js') +const SanitizingSubprovider = require('./subproviders/sanitizer.js') +const InfuraSubprovider = require('./subproviders/infura.js') +const FetchSubprovider = require('./subproviders/fetch.js') +const WebSocketSubprovider = require('./subproviders/websocket.js') + + +module.exports = ZeroClientProvider + + +function ZeroClientProvider(opts = {}){ + const connectionType = getConnectionType(opts) + + const engine = new ProviderEngine(opts.engineParams) + + // static + const staticSubprovider = new DefaultFixture(opts.static) + engine.addProvider(staticSubprovider) + + // nonce tracker + engine.addProvider(new NonceTrackerSubprovider()) + + // sanitization + const sanitizer = new SanitizingSubprovider() + engine.addProvider(sanitizer) + + // cache layer + const cacheSubprovider = new CacheSubprovider() + engine.addProvider(cacheSubprovider) + + // filters + subscriptions + // for websockets, only polyfill filters + if (connectionType === 'ws') { + const filterSubprovider = new FilterSubprovider() + engine.addProvider(filterSubprovider) + // otherwise, polyfill both subscriptions and filters + } else { + const filterAndSubsSubprovider = new SubscriptionSubprovider() + // forward subscription events through provider + filterAndSubsSubprovider.on('data', (err, notification) => { + engine.emit('data', err, notification) + }) + engine.addProvider(filterAndSubsSubprovider) + } + + // inflight cache + const inflightCache = new InflightCacheSubprovider() + engine.addProvider(inflightCache) + + // id mgmt + const idmgmtSubprovider = new HookedWalletSubprovider({ + // accounts + getAccounts: opts.getAccounts, + // transactions + processTransaction: opts.processTransaction, + approveTransaction: opts.approveTransaction, + signTransaction: opts.signTransaction, + publishTransaction: opts.publishTransaction, + // messages + // old eth_sign + processMessage: opts.processMessage, + approveMessage: opts.approveMessage, + signMessage: opts.signMessage, + // new personal_sign + processPersonalMessage: opts.processPersonalMessage, + processTypedMessage: opts.processTypedMessage, + approvePersonalMessage: opts.approvePersonalMessage, + approveTypedMessage: opts.approveTypedMessage, + signPersonalMessage: opts.signPersonalMessage, + signTypedMessage: opts.signTypedMessage, + personalRecoverSigner: opts.personalRecoverSigner, + }) + engine.addProvider(idmgmtSubprovider) + + // data source + const dataSubprovider = opts.dataSubprovider || createDataSubprovider(connectionType, opts) + // for websockets, forward subscription events through provider + if (connectionType === 'ws') { + dataSubprovider.on('data', (err, notification) => { + engine.emit('data', err, notification) + }) + } + engine.addProvider(dataSubprovider) + + // start polling + if (!opts.stopped) { + engine.start() + } + + return engine + +} + +function createDataSubprovider(connectionType, opts) { + const { rpcUrl, debug } = opts + + // default to infura + if (!connectionType) { + return new InfuraSubprovider() + } + if (connectionType === 'http') { + return new FetchSubprovider({ rpcUrl, debug }) + } + if (connectionType === 'ws') { + return new WebSocketSubprovider({ rpcUrl, debug }) + } + + throw new Error(`ProviderEngine - unrecognized connectionType "${connectionType}"`) +} + +function getConnectionType({ rpcUrl }) { + if (!rpcUrl) return undefined + + const protocol = rpcUrl.split(':')[0].toLowerCase() + switch (protocol) { + case 'http': + case 'https': + return 'http' + case 'ws': + case 'wss': + return 'ws' + default: + throw new Error(`ProviderEngine - unrecognized protocol in "${rpcUrl}"`) + } +} + +},{"./index.js":373,"./subproviders/cache.js":376,"./subproviders/default-fixture.js":377,"./subproviders/fetch.js":378,"./subproviders/filters.js":379,"./subproviders/hooked-wallet.js":381,"./subproviders/inflight-cache":382,"./subproviders/infura.js":383,"./subproviders/nonce-tracker.js":384,"./subproviders/sanitizer.js":386,"./subproviders/subscriptions":388,"./subproviders/websocket.js":389}],398:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file httpprovider.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * Fabian Vogelsteller + * @date 2015 + */ + +var errors = require('web3-core-helpers').errors; +var XHR2 = require('xhr2-cookies').XMLHttpRequest // jshint ignore: line +var http = require('http'); +var https = require('https'); + + +/** + * HttpProvider should be used to send rpc calls over http + */ +var HttpProvider = function HttpProvider(host, options) { + options = options || {}; + this.host = host || 'http://localhost:8545'; + if (this.host.substring(0,5) === "https"){ + this.httpsAgent = new https.Agent({ keepAlive: true }); + }else{ + this.httpAgent = new http.Agent({ keepAlive: true }); + } + this.timeout = options.timeout || 0; + this.headers = options.headers; + this.connected = false; +}; + +HttpProvider.prototype._prepareRequest = function(){ + var request = new XHR2(); + request.nodejsSet({ + httpsAgent:this.httpsAgent, + httpAgent:this.httpAgent + }); + + request.open('POST', this.host, true); + request.setRequestHeader('Content-Type','application/json'); + request.timeout = this.timeout && this.timeout !== 1 ? this.timeout : 0; + request.withCredentials = true; + + if(this.headers) { + this.headers.forEach(function(header) { + request.setRequestHeader(header.name, header.value); + }); + } + + return request; +}; + +/** + * Should be used to make async request + * + * @method send + * @param {Object} payload + * @param {Function} callback triggered on end with (err, result) + */ +HttpProvider.prototype.send = function (payload, callback) { + var _this = this; + var request = this._prepareRequest(); + + request.onreadystatechange = function() { + if (request.readyState === 4 && request.timeout !== 1) { + var result = request.responseText; + var error = null; + + try { + result = JSON.parse(result); + } catch(e) { + error = errors.InvalidResponse(request.responseText); + } + + _this.connected = true; + callback(error, result); + } + }; + + request.ontimeout = function() { + _this.connected = false; + callback(errors.ConnectionTimeout(this.timeout)); + }; + + try { + request.send(JSON.stringify(payload)); + } catch(error) { + this.connected = false; + callback(errors.InvalidConnection(this.host)); + } +}; + +HttpProvider.prototype.disconnect = function () { + //NO OP +}; + + +module.exports = HttpProvider; + +},{"http":312,"https":175,"web3-core-helpers":338,"xhr2-cookies":418}],399:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file index.js + * @authors: + * Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var _ = require('underscore'); +var errors = require('web3-core-helpers').errors; +var oboe = require('oboe'); + + +var IpcProvider = function IpcProvider(path, net) { + var _this = this; + this.responseCallbacks = {}; + this.notificationCallbacks = []; + this.path = path; + this.connected = false; + + this.connection = net.connect({path: this.path}); + + this.addDefaultEvents(); + + // LISTEN FOR CONNECTION RESPONSES + var callback = function(result) { + /*jshint maxcomplexity: 6 */ + + var id = null; + + // get the id which matches the returned id + if(_.isArray(result)) { + result.forEach(function(load){ + if(_this.responseCallbacks[load.id]) + id = load.id; + }); + } else { + id = result.id; + } + + // notification + if(!id && result.method.indexOf('_subscription') !== -1) { + _this.notificationCallbacks.forEach(function(callback){ + if(_.isFunction(callback)) + callback(result); + }); + + // fire the callback + } else if(_this.responseCallbacks[id]) { + _this.responseCallbacks[id](null, result); + delete _this.responseCallbacks[id]; + } + }; + + // use oboe.js for Sockets + if (net.constructor.name === 'Socket') { + oboe(this.connection) + .done(callback); + } else { + this.connection.on('data', function(data){ + _this._parseResponse(data.toString()).forEach(callback); + }); + } +}; + +/** +Will add the error and end event to timeout existing calls + +@method addDefaultEvents +*/ +IpcProvider.prototype.addDefaultEvents = function(){ + var _this = this; + + this.connection.on('connect', function(){ + _this.connected = true; + }); + + this.connection.on('close', function(){ + _this.connected = false; + }); + + this.connection.on('error', function(){ + _this._timeout(); + }); + + this.connection.on('end', function(){ + _this._timeout(); + }); + + this.connection.on('timeout', function(){ + _this._timeout(); + }); +}; + + +/** + Will parse the response and make an array out of it. + + NOTE, this exists for backwards compatibility reasons. + + @method _parseResponse + @param {String} data + */ +IpcProvider.prototype._parseResponse = function(data) { + var _this = this, + returnValues = []; + + // DE-CHUNKER + var dechunkedData = data + .replace(/\}[\n\r]?\{/g,'}|--|{') // }{ + .replace(/\}\][\n\r]?\[\{/g,'}]|--|[{') // }][{ + .replace(/\}[\n\r]?\[\{/g,'}|--|[{') // }[{ + .replace(/\}\][\n\r]?\{/g,'}]|--|{') // }]{ + .split('|--|'); + + dechunkedData.forEach(function(data){ + + // prepend the last chunk + if(_this.lastChunk) + data = _this.lastChunk + data; + + var result = null; + + try { + result = JSON.parse(data); + + } catch(e) { + + _this.lastChunk = data; + + // start timeout to cancel all requests + clearTimeout(_this.lastChunkTimeout); + _this.lastChunkTimeout = setTimeout(function(){ + _this._timeout(); + throw errors.InvalidResponse(data); + }, 1000 * 15); + + return; + } + + // cancel timeout and set chunk to null + clearTimeout(_this.lastChunkTimeout); + _this.lastChunk = null; + + if(result) + returnValues.push(result); + }); + + return returnValues; +}; + + +/** +Get the adds a callback to the responseCallbacks object, +which will be called if a response matching the response Id will arrive. + +@method _addResponseCallback +*/ +IpcProvider.prototype._addResponseCallback = function(payload, callback) { + var id = payload.id || payload[0].id; + var method = payload.method || payload[0].method; + + this.responseCallbacks[id] = callback; + this.responseCallbacks[id].method = method; +}; + +/** +Timeout all requests when the end/error event is fired + +@method _timeout +*/ +IpcProvider.prototype._timeout = function() { + for(var key in this.responseCallbacks) { + if(this.responseCallbacks.hasOwnProperty(key)){ + this.responseCallbacks[key](errors.InvalidConnection('on IPC')); + delete this.responseCallbacks[key]; + } + } +}; + +/** + Try to reconnect + + @method reconnect + */ +IpcProvider.prototype.reconnect = function() { + this.connection.connect({path: this.path}); +}; + + +IpcProvider.prototype.send = function (payload, callback) { + // try reconnect, when connection is gone + if(!this.connection.writable) + this.connection.connect({path: this.path}); + + + this.connection.write(JSON.stringify(payload)); + this._addResponseCallback(payload, callback); +}; + +/** +Subscribes to provider events.provider + +@method on +@param {String} type 'notification', 'connect', 'error', 'end' or 'data' +@param {Function} callback the callback to call +*/ +IpcProvider.prototype.on = function (type, callback) { + + if(typeof callback !== 'function') + throw new Error('The second parameter callback must be a function.'); + + switch(type){ + case 'data': + this.notificationCallbacks.push(callback); + break; + + // adds error, end, timeout, connect + default: + this.connection.on(type, callback); + break; + } +}; + +/** + Subscribes to provider events.provider + + @method on + @param {String} type 'connect', 'error', 'end' or 'data' + @param {Function} callback the callback to call + */ +IpcProvider.prototype.once = function (type, callback) { + + if(typeof callback !== 'function') + throw new Error('The second parameter callback must be a function.'); + + this.connection.once(type, callback); +}; + +/** +Removes event listener + +@method removeListener +@param {String} type 'data', 'connect', 'error', 'end' or 'data' +@param {Function} callback the callback to call +*/ +IpcProvider.prototype.removeListener = function (type, callback) { + var _this = this; + + switch(type){ + case 'data': + this.notificationCallbacks.forEach(function(cb, index){ + if(cb === callback) + _this.notificationCallbacks.splice(index, 1); + }); + break; + + default: + this.connection.removeListener(type, callback); + break; + } +}; + +/** +Removes all event listeners + +@method removeAllListeners +@param {String} type 'data', 'connect', 'error', 'end' or 'data' +*/ +IpcProvider.prototype.removeAllListeners = function (type) { + switch(type){ + case 'data': + this.notificationCallbacks = []; + break; + + default: + this.connection.removeAllListeners(type); + break; + } +}; + +/** +Resets the providers, clears all callbacks + +@method reset +*/ +IpcProvider.prototype.reset = function () { + this._timeout(); + this.notificationCallbacks = []; + + this.connection.removeAllListeners('error'); + this.connection.removeAllListeners('end'); + this.connection.removeAllListeners('timeout'); + + this.addDefaultEvents(); +}; + +module.exports = IpcProvider; + + +},{"oboe":239,"underscore":325,"web3-core-helpers":338}],400:[function(require,module,exports){ +(function (Buffer){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . + */ +/** @file WebsocketProvider.js + * @authors: + * Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var _ = require('underscore'); +var errors = require('web3-core-helpers').errors; + +var Ws = null; +var _btoa = null; +var parseURL = null; +if (typeof window !== 'undefined' && typeof window.WebSocket !== 'undefined') { + Ws = function(url, protocols) { + return new window.WebSocket(url, protocols); + }; + _btoa = btoa; + parseURL = function(url) { + return new URL(url); + }; +} else { + Ws = require('websocket').w3cwebsocket; + _btoa = function(str) { + return Buffer(str).toString('base64'); + }; + var url = require('url'); + if (url.URL) { + // Use the new Node 6+ API for parsing URLs that supports username/password + var newURL = url.URL; + parseURL = function(url) { + return new newURL(url); + }; + } + else { + // Web3 supports Node.js 5, so fall back to the legacy URL API if necessary + parseURL = require('url').parse; + } +} +// Default connection ws://localhost:8546 + + + + +var WebsocketProvider = function WebsocketProvider(url, options) { + var _this = this; + this.responseCallbacks = {}; + this.notificationCallbacks = []; + + options = options || {}; + this._customTimeout = options.timeout; + + // The w3cwebsocket implementation does not support Basic Auth + // username/password in the URL. So generate the basic auth header, and + // pass through with any additional headers supplied in constructor + var parsedURL = parseURL(url); + var headers = options.headers || {}; + var protocol = options.protocol || undefined; + if (parsedURL.username && parsedURL.password) { + headers.authorization = 'Basic ' + _btoa(parsedURL.username + ':' + parsedURL.password); + } + + // Allow a custom client configuration + var clientConfig = options.clientConfig || undefined; + + // When all node core implementations that do not have the + // WHATWG compatible URL parser go out of service this line can be removed. + if (parsedURL.auth) { + headers.authorization = 'Basic ' + _btoa(parsedURL.auth); + } + this.connection = new Ws(url, protocol, undefined, headers, undefined, clientConfig); + + this.addDefaultEvents(); + + + // LISTEN FOR CONNECTION RESPONSES + this.connection.onmessage = function(e) { + /*jshint maxcomplexity: 6 */ + var data = (typeof e.data === 'string') ? e.data : ''; + + _this._parseResponse(data).forEach(function(result){ + + var id = null; + + // get the id which matches the returned id + if(_.isArray(result)) { + result.forEach(function(load){ + if(_this.responseCallbacks[load.id]) + id = load.id; + }); + } else { + id = result.id; + } + + // notification + if(!id && result && result.method && result.method.indexOf('_subscription') !== -1) { + _this.notificationCallbacks.forEach(function(callback){ + if(_.isFunction(callback)) + callback(result); + }); + + // fire the callback + } else if(_this.responseCallbacks[id]) { + _this.responseCallbacks[id](null, result); + delete _this.responseCallbacks[id]; + } + }); + }; + + // make property `connected` which will return the current connection status + Object.defineProperty(this, 'connected', { + get: function () { + return this.connection && this.connection.readyState === this.connection.OPEN; + }, + enumerable: true, + }); +}; + +/** + Will add the error and end event to timeout existing calls + + @method addDefaultEvents + */ +WebsocketProvider.prototype.addDefaultEvents = function(){ + var _this = this; + + this.connection.onerror = function(){ + _this._timeout(); + }; + + this.connection.onclose = function(){ + _this._timeout(); + + // reset all requests and callbacks + _this.reset(); + }; + + // this.connection.on('timeout', function(){ + // _this._timeout(); + // }); +}; + +/** + Will parse the response and make an array out of it. + + @method _parseResponse + @param {String} data + */ +WebsocketProvider.prototype._parseResponse = function(data) { + var _this = this, + returnValues = []; + + // DE-CHUNKER + var dechunkedData = data + .replace(/\}[\n\r]?\{/g,'}|--|{') // }{ + .replace(/\}\][\n\r]?\[\{/g,'}]|--|[{') // }][{ + .replace(/\}[\n\r]?\[\{/g,'}|--|[{') // }[{ + .replace(/\}\][\n\r]?\{/g,'}]|--|{') // }]{ + .split('|--|'); + + dechunkedData.forEach(function(data){ + + // prepend the last chunk + if(_this.lastChunk) + data = _this.lastChunk + data; + + var result = null; + + try { + result = JSON.parse(data); + + } catch(e) { + + _this.lastChunk = data; + + // start timeout to cancel all requests + clearTimeout(_this.lastChunkTimeout); + _this.lastChunkTimeout = setTimeout(function(){ + _this._timeout(); + throw errors.InvalidResponse(data); + }, 1000 * 15); + + return; + } + + // cancel timeout and set chunk to null + clearTimeout(_this.lastChunkTimeout); + _this.lastChunk = null; + + if(result) + returnValues.push(result); + }); + + return returnValues; +}; + + +/** + Adds a callback to the responseCallbacks object, + which will be called if a response matching the response Id will arrive. + + @method _addResponseCallback + */ +WebsocketProvider.prototype._addResponseCallback = function(payload, callback) { + var id = payload.id || payload[0].id; + var method = payload.method || payload[0].method; + + this.responseCallbacks[id] = callback; + this.responseCallbacks[id].method = method; + + var _this = this; + + // schedule triggering the error response if a custom timeout is set + if (this._customTimeout) { + setTimeout(function () { + if (_this.responseCallbacks[id]) { + _this.responseCallbacks[id](errors.ConnectionTimeout(_this._customTimeout)); + delete _this.responseCallbacks[id]; + } + }, this._customTimeout); + } +}; + +/** + Timeout all requests when the end/error event is fired + + @method _timeout + */ +WebsocketProvider.prototype._timeout = function() { + for(var key in this.responseCallbacks) { + if(this.responseCallbacks.hasOwnProperty(key)){ + this.responseCallbacks[key](errors.InvalidConnection('on WS')); + delete this.responseCallbacks[key]; + } + } +}; + + +WebsocketProvider.prototype.send = function (payload, callback) { + var _this = this; + + if (this.connection.readyState === this.connection.CONNECTING) { + setTimeout(function () { + _this.send(payload, callback); + }, 10); + return; + } + + // try reconnect, when connection is gone + // if(!this.connection.writable) + // this.connection.connect({url: this.url}); + if (this.connection.readyState !== this.connection.OPEN) { + console.error('connection not open on send()'); + if (typeof this.connection.onerror === 'function') { + this.connection.onerror(new Error('connection not open')); + } else { + console.error('no error callback'); + } + callback(new Error('connection not open')); + return; + } + + this.connection.send(JSON.stringify(payload)); + this._addResponseCallback(payload, callback); +}; + +/** + Subscribes to provider events.provider + + @method on + @param {String} type 'notifcation', 'connect', 'error', 'end' or 'data' + @param {Function} callback the callback to call + */ +WebsocketProvider.prototype.on = function (type, callback) { + + if(typeof callback !== 'function') + throw new Error('The second parameter callback must be a function.'); + + switch(type){ + case 'data': + this.notificationCallbacks.push(callback); + break; + + case 'connect': + this.connection.onopen = callback; + break; + + case 'end': + this.connection.onclose = callback; + break; + + case 'error': + this.connection.onerror = callback; + break; + + // default: + // this.connection.on(type, callback); + // break; + } +}; + +// TODO add once + +/** + Removes event listener + + @method removeListener + @param {String} type 'notifcation', 'connect', 'error', 'end' or 'data' + @param {Function} callback the callback to call + */ +WebsocketProvider.prototype.removeListener = function (type, callback) { + var _this = this; + + switch(type){ + case 'data': + this.notificationCallbacks.forEach(function(cb, index){ + if(cb === callback) + _this.notificationCallbacks.splice(index, 1); + }); + break; + + // TODO remvoving connect missing + + // default: + // this.connection.removeListener(type, callback); + // break; + } +}; + +/** + Removes all event listeners + + @method removeAllListeners + @param {String} type 'notifcation', 'connect', 'error', 'end' or 'data' + */ +WebsocketProvider.prototype.removeAllListeners = function (type) { + switch(type){ + case 'data': + this.notificationCallbacks = []; + break; + + // TODO remvoving connect properly missing + + case 'connect': + this.connection.onopen = null; + break; + + case 'end': + this.connection.onclose = null; + break; + + case 'error': + this.connection.onerror = null; + break; + + default: + // this.connection.removeAllListeners(type); + break; + } +}; + +/** + Resets the providers, clears all callbacks + + @method reset + */ +WebsocketProvider.prototype.reset = function () { + this._timeout(); + this.notificationCallbacks = []; + + // this.connection.removeAllListeners('error'); + // this.connection.removeAllListeners('end'); + // this.connection.removeAllListeners('timeout'); + + this.addDefaultEvents(); +}; + +WebsocketProvider.prototype.disconnect = function () { + if (this.connection) { + this.connection.close(); + } +}; + +module.exports = WebsocketProvider; + +}).call(this,require("buffer").Buffer) +},{"buffer":84,"underscore":325,"url":327,"web3-core-helpers":338,"websocket":408}],401:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +"use strict"; + +var core = require('web3-core'); +var Subscriptions = require('web3-core-subscriptions').subscriptions; +var Method = require('web3-core-method'); +// var formatters = require('web3-core-helpers').formatters; +var Net = require('web3-net'); + + +var Shh = function Shh() { + var _this = this; + + // sets _requestmanager + core.packageInit(this, arguments); + + // overwrite setProvider + var setProvider = this.setProvider; + this.setProvider = function () { + setProvider.apply(_this, arguments); + _this.net.setProvider.apply(_this, arguments); + }; + + this.clearSubscriptions = _this._requestManager.clearSubscriptions; + + this.net = new Net(this.currentProvider); + + + [ + new Subscriptions({ + name: 'subscribe', + type: 'shh', + subscriptions: { + 'messages': { + params: 1 + // inputFormatter: [formatters.inputPostFormatter], + // outputFormatter: formatters.outputPostFormatter + } + } + }), + + new Method({ + name: 'getVersion', + call: 'shh_version', + params: 0 + }), + new Method({ + name: 'getInfo', + call: 'shh_info', + params: 0 + }), + new Method({ + name: 'setMaxMessageSize', + call: 'shh_setMaxMessageSize', + params: 1 + }), + new Method({ + name: 'setMinPoW', + call: 'shh_setMinPoW', + params: 1 + }), + new Method({ + name: 'markTrustedPeer', + call: 'shh_markTrustedPeer', + params: 1 + }), + new Method({ + name: 'newKeyPair', + call: 'shh_newKeyPair', + params: 0 + }), + new Method({ + name: 'addPrivateKey', + call: 'shh_addPrivateKey', + params: 1 + }), + new Method({ + name: 'deleteKeyPair', + call: 'shh_deleteKeyPair', + params: 1 + }), + new Method({ + name: 'hasKeyPair', + call: 'shh_hasKeyPair', + params: 1 + }), + new Method({ + name: 'getPublicKey', + call: 'shh_getPublicKey', + params: 1 + }), + new Method({ + name: 'getPrivateKey', + call: 'shh_getPrivateKey', + params: 1 + }), + new Method({ + name: 'newSymKey', + call: 'shh_newSymKey', + params: 0 + }), + new Method({ + name: 'addSymKey', + call: 'shh_addSymKey', + params: 1 + }), + new Method({ + name: 'generateSymKeyFromPassword', + call: 'shh_generateSymKeyFromPassword', + params: 1 + }), + new Method({ + name: 'hasSymKey', + call: 'shh_hasSymKey', + params: 1 + }), + new Method({ + name: 'getSymKey', + call: 'shh_getSymKey', + params: 1 + }), + new Method({ + name: 'deleteSymKey', + call: 'shh_deleteSymKey', + params: 1 + }), + + new Method({ + name: 'newMessageFilter', + call: 'shh_newMessageFilter', + params: 1 + }), + new Method({ + name: 'getFilterMessages', + call: 'shh_getFilterMessages', + params: 1 + }), + new Method({ + name: 'deleteMessageFilter', + call: 'shh_deleteMessageFilter', + params: 1 + }), + + new Method({ + name: 'post', + call: 'shh_post', + params: 1, + inputFormatter: [null] + }), + + new Method({ + name: 'unsubscribe', + call: 'shh_unsubscribe', + params: 1 + }) + ].forEach(function(method) { + method.attachToObject(_this); + method.setRequestManager(_this._requestManager); + }); +}; + +core.addProviders(Shh); + + + +module.exports = Shh; + + + +},{"web3-core":348,"web3-core-method":339,"web3-core-subscriptions":345,"web3-net":372}],402:[function(require,module,exports){ +arguments[4][154][0].apply(exports,arguments) +},{"dup":154}],403:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . + */ +/** + * @file utils.js + * @author Marek Kotewicz + * @author Fabian Vogelsteller + * @date 2017 + */ + + +var _ = require('underscore'); +var ethjsUnit = require('ethjs-unit'); +var utils = require('./utils.js'); +var soliditySha3 = require('./soliditySha3.js'); +var randomHex = require('randomhex'); + + + +/** + * Fires an error in an event emitter and callback and returns the eventemitter + * + * @method _fireError + * @param {Object} error a string, a error, or an object with {message, data} + * @param {Object} emitter + * @param {Function} reject + * @param {Function} callback + * @return {Object} the emitter + */ +var _fireError = function (error, emitter, reject, callback) { + /*jshint maxcomplexity: 10 */ + + // add data if given + if(_.isObject(error) && !(error instanceof Error) && error.data) { + if(_.isObject(error.data) || _.isArray(error.data)) { + error.data = JSON.stringify(error.data, null, 2); + } + + error = error.message +"\n"+ error.data; + } + + if(_.isString(error)) { + error = new Error(error); + } + + if (_.isFunction(callback)) { + callback(error); + } + if (_.isFunction(reject)) { + // suppress uncatched error if an error listener is present + // OR suppress uncatched error if an callback listener is present + if (emitter && + (_.isFunction(emitter.listeners) && + emitter.listeners('error').length) || _.isFunction(callback)) { + emitter.catch(function(){}); + } + // reject later, to be able to return emitter + setTimeout(function () { + reject(error); + }, 1); + } + + if(emitter && _.isFunction(emitter.emit)) { + // emit later, to be able to return emitter + setTimeout(function () { + emitter.emit('error', error); + emitter.removeAllListeners(); + }, 1); + } + + return emitter; +}; + +/** + * Should be used to create full function/event name from json abi + * + * @method _jsonInterfaceMethodToString + * @param {Object} json + * @return {String} full function/event name + */ +var _jsonInterfaceMethodToString = function (json) { + if (_.isObject(json) && json.name && json.name.indexOf('(') !== -1) { + return json.name; + } + + return json.name + '(' + _flattenTypes(false, json.inputs).join(',') + ')'; +}; + + +/** + * Should be used to flatten json abi inputs/outputs into an array of type-representing-strings + * + * @method _flattenTypes + * @param {bool} includeTuple + * @param {Object} puts + * @return {Array} parameters as strings + */ +var _flattenTypes = function(includeTuple, puts) +{ + // console.log("entered _flattenTypes. inputs/outputs: " + puts) + var types = []; + + puts.forEach(function(param) { + if (typeof param.components === 'object') { + if (param.type.substring(0, 5) !== 'tuple') { + throw new Error('components found but type is not tuple; report on GitHub'); + } + var suffix = ''; + var arrayBracket = param.type.indexOf('['); + if (arrayBracket >= 0) { suffix = param.type.substring(arrayBracket); } + var result = _flattenTypes(includeTuple, param.components); + // console.log("result should have things: " + result) + if(_.isArray(result) && includeTuple) { + // console.log("include tuple word, and its an array. joining...: " + result.types) + types.push('tuple(' + result.join(',') + ')' + suffix); + } + else if(!includeTuple) { + // console.log("don't include tuple, but its an array. joining...: " + result) + types.push('(' + result.join(',') + ')' + suffix); + } + else { + // console.log("its a single type within a tuple: " + result.types) + types.push('(' + result + ')'); + } + } else { + // console.log("its a type and not directly in a tuple: " + param.type) + types.push(param.type); + } + }); + + return types; +}; + + +/** + * Should be called to get ascii from it's hex representation + * + * @method hexToAscii + * @param {String} hex + * @returns {String} ascii string representation of hex value + */ +var hexToAscii = function(hex) { + if (!utils.isHexStrict(hex)) + throw new Error('The parameter must be a valid HEX string.'); + + var str = ""; + var i = 0, l = hex.length; + if (hex.substring(0, 2) === '0x') { + i = 2; + } + for (; i < l; i+=2) { + var code = parseInt(hex.substr(i, 2), 16); + str += String.fromCharCode(code); + } + + return str; +}; + +/** + * Should be called to get hex representation (prefixed by 0x) of ascii string + * + * @method asciiToHex + * @param {String} str + * @returns {String} hex representation of input string + */ +var asciiToHex = function(str) { + if(!str) + return "0x00"; + var hex = ""; + for(var i = 0; i < str.length; i++) { + var code = str.charCodeAt(i); + var n = code.toString(16); + hex += n.length < 2 ? '0' + n : n; + } + + return "0x" + hex; +}; + + + +/** + * Returns value of unit in Wei + * + * @method getUnitValue + * @param {String} unit the unit to convert to, default ether + * @returns {BN} value of the unit (in Wei) + * @throws error if the unit is not correct:w + */ +var getUnitValue = function (unit) { + unit = unit ? unit.toLowerCase() : 'ether'; + if (!ethjsUnit.unitMap[unit]) { + throw new Error('This unit "'+ unit +'" doesn\'t exist, please use the one of the following units' + JSON.stringify(ethjsUnit.unitMap, null, 2)); + } + return unit; +}; + +/** + * Takes a number of wei and converts it to any other ether unit. + * + * Possible units are: + * SI Short SI Full Effigy Other + * - kwei femtoether babbage + * - mwei picoether lovelace + * - gwei nanoether shannon nano + * - -- microether szabo micro + * - -- milliether finney milli + * - ether -- -- + * - kether -- grand + * - mether + * - gether + * - tether + * + * @method fromWei + * @param {Number|String} number can be a number, number string or a HEX of a decimal + * @param {String} unit the unit to convert to, default ether + * @return {String|Object} When given a BN object it returns one as well, otherwise a number + */ +var fromWei = function(number, unit) { + unit = getUnitValue(unit); + + if(!utils.isBN(number) && !_.isString(number)) { + throw new Error('Please pass numbers as strings or BigNumber objects to avoid precision errors.'); + } + + return utils.isBN(number) ? ethjsUnit.fromWei(number, unit) : ethjsUnit.fromWei(number, unit).toString(10); +}; + +/** + * Takes a number of a unit and converts it to wei. + * + * Possible units are: + * SI Short SI Full Effigy Other + * - kwei femtoether babbage + * - mwei picoether lovelace + * - gwei nanoether shannon nano + * - -- microether szabo micro + * - -- microether szabo micro + * - -- milliether finney milli + * - ether -- -- + * - kether -- grand + * - mether + * - gether + * - tether + * + * @method toWei + * @param {Number|String|BN} number can be a number, number string or a HEX of a decimal + * @param {String} unit the unit to convert from, default ether + * @return {String|Object} When given a BN object it returns one as well, otherwise a number + */ +var toWei = function(number, unit) { + unit = getUnitValue(unit); + + if(!utils.isBN(number) && !_.isString(number)) { + throw new Error('Please pass numbers as strings or BigNumber objects to avoid precision errors.'); + } + + return utils.isBN(number) ? ethjsUnit.toWei(number, unit) : ethjsUnit.toWei(number, unit).toString(10); +}; + + + + +/** + * Converts to a checksum address + * + * @method toChecksumAddress + * @param {String} address the given HEX address + * @return {String} + */ +var toChecksumAddress = function (address) { + if (typeof address === 'undefined') return ''; + + if(!/^(0x)?[0-9a-f]{40}$/i.test(address)) + throw new Error('Given address "'+ address +'" is not a valid Ethereum address.'); + + + + address = address.toLowerCase().replace(/^0x/i,''); + var addressHash = utils.sha3(address).replace(/^0x/i,''); + var checksumAddress = '0x'; + + for (var i = 0; i < address.length; i++ ) { + // If ith character is 9 to f then make it uppercase + if (parseInt(addressHash[i], 16) > 7) { + checksumAddress += address[i].toUpperCase(); + } else { + checksumAddress += address[i]; + } + } + return checksumAddress; +}; + + + +module.exports = { + _fireError: _fireError, + _jsonInterfaceMethodToString: _jsonInterfaceMethodToString, + _flattenTypes: _flattenTypes, + // extractDisplayName: extractDisplayName, + // extractTypeName: extractTypeName, + randomHex: randomHex, + _: _, + BN: utils.BN, + isBN: utils.isBN, + isBigNumber: utils.isBigNumber, + isHex: utils.isHex, + isHexStrict: utils.isHexStrict, + sha3: utils.sha3, + keccak256: utils.sha3, + soliditySha3: soliditySha3, + isAddress: utils.isAddress, + checkAddressChecksum: utils.checkAddressChecksum, + toChecksumAddress: toChecksumAddress, + toHex: utils.toHex, + toBN: utils.toBN, + + bytesToHex: utils.bytesToHex, + hexToBytes: utils.hexToBytes, + + hexToNumberString: utils.hexToNumberString, + + hexToNumber: utils.hexToNumber, + toDecimal: utils.hexToNumber, // alias + + numberToHex: utils.numberToHex, + fromDecimal: utils.numberToHex, // alias + + hexToUtf8: utils.hexToUtf8, + hexToString: utils.hexToUtf8, + toUtf8: utils.hexToUtf8, + + utf8ToHex: utils.utf8ToHex, + stringToHex: utils.utf8ToHex, + fromUtf8: utils.utf8ToHex, + + hexToAscii: hexToAscii, + toAscii: hexToAscii, + asciiToHex: asciiToHex, + fromAscii: asciiToHex, + + unitMap: ethjsUnit.unitMap, + toWei: toWei, + fromWei: fromWei, + + padLeft: utils.leftPad, + leftPad: utils.leftPad, + padRight: utils.rightPad, + rightPad: utils.rightPad, + toTwosComplement: utils.toTwosComplement +}; + + +},{"./soliditySha3.js":404,"./utils.js":405,"ethjs-unit":153,"randomhex":274,"underscore":325}],404:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . + */ +/** + * @file soliditySha3.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +var _ = require('underscore'); +var BN = require('bn.js'); +var utils = require('./utils.js'); + + +var _elementaryName = function (name) { + /*jshint maxcomplexity:false */ + + if (name.startsWith('int[')) { + return 'int256' + name.slice(3); + } else if (name === 'int') { + return 'int256'; + } else if (name.startsWith('uint[')) { + return 'uint256' + name.slice(4); + } else if (name === 'uint') { + return 'uint256'; + } else if (name.startsWith('fixed[')) { + return 'fixed128x128' + name.slice(5); + } else if (name === 'fixed') { + return 'fixed128x128'; + } else if (name.startsWith('ufixed[')) { + return 'ufixed128x128' + name.slice(6); + } else if (name === 'ufixed') { + return 'ufixed128x128'; + } + return name; +}; + +// Parse N from type +var _parseTypeN = function (type) { + var typesize = /^\D+(\d+).*$/.exec(type); + return typesize ? parseInt(typesize[1], 10) : null; +}; + +// Parse N from type[] +var _parseTypeNArray = function (type) { + var arraySize = /^\D+\d*\[(\d+)\]$/.exec(type); + return arraySize ? parseInt(arraySize[1], 10) : null; +}; + +var _parseNumber = function (arg) { + var type = typeof arg; + if (type === 'string') { + if (utils.isHexStrict(arg)) { + return new BN(arg.replace(/0x/i,''), 16); + } else { + return new BN(arg, 10); + } + } else if (type === 'number') { + return new BN(arg); + } else if (utils.isBigNumber(arg)) { + return new BN(arg.toString(10)); + } else if (utils.isBN(arg)) { + return arg; + } else { + throw new Error(arg +' is not a number'); + } +}; + +var _solidityPack = function (type, value, arraySize) { + /*jshint maxcomplexity:false */ + + var size, num; + type = _elementaryName(type); + + + if (type === 'bytes') { + + if (value.replace(/^0x/i,'').length % 2 !== 0) { + throw new Error('Invalid bytes characters '+ value.length); + } + + return value; + } else if (type === 'string') { + return utils.utf8ToHex(value); + } else if (type === 'bool') { + return value ? '01' : '00'; + } else if (type.startsWith('address')) { + if(arraySize) { + size = 64; + } else { + size = 40; + } + + if(!utils.isAddress(value)) { + throw new Error(value +' is not a valid address, or the checksum is invalid.'); + } + + return utils.leftPad(value.toLowerCase(), size); + } + + size = _parseTypeN(type); + + if (type.startsWith('bytes')) { + + if(!size) { + throw new Error('bytes[] not yet supported in solidity'); + } + + // must be 32 byte slices when in an array + if(arraySize) { + size = 32; + } + + if (size < 1 || size > 32 || size < value.replace(/^0x/i,'').length / 2 ) { + throw new Error('Invalid bytes' + size +' for '+ value); + } + + return utils.rightPad(value, size * 2); + } else if (type.startsWith('uint')) { + + if ((size % 8) || (size < 8) || (size > 256)) { + throw new Error('Invalid uint'+size+' size'); + } + + num = _parseNumber(value); + if (num.bitLength() > size) { + throw new Error('Supplied uint exceeds width: ' + size + ' vs ' + num.bitLength()); + } + + if(num.lt(new BN(0))) { + throw new Error('Supplied uint '+ num.toString() +' is negative'); + } + + return size ? utils.leftPad(num.toString('hex'), size/8 * 2) : num; + } else if (type.startsWith('int')) { + + if ((size % 8) || (size < 8) || (size > 256)) { + throw new Error('Invalid int'+size+' size'); + } + + num = _parseNumber(value); + if (num.bitLength() > size) { + throw new Error('Supplied int exceeds width: ' + size + ' vs ' + num.bitLength()); + } + + if(num.lt(new BN(0))) { + return num.toTwos(size).toString('hex'); + } else { + return size ? utils.leftPad(num.toString('hex'), size/8 * 2) : num; + } + + } else { + // FIXME: support all other types + throw new Error('Unsupported or invalid type: ' + type); + } +}; + + +var _processSoliditySha3Args = function (arg) { + /*jshint maxcomplexity:false */ + + if(_.isArray(arg)) { + throw new Error('Autodetection of array types is not supported.'); + } + + var type, value = ''; + var hexArg, arraySize; + + // if type is given + if (_.isObject(arg) && (arg.hasOwnProperty('v') || arg.hasOwnProperty('t') || arg.hasOwnProperty('value') || arg.hasOwnProperty('type'))) { + type = arg.hasOwnProperty('t') ? arg.t : arg.type; + value = arg.hasOwnProperty('v') ? arg.v : arg.value; + + // otherwise try to guess the type + } else { + + type = utils.toHex(arg, true); + value = utils.toHex(arg); + + if (!type.startsWith('int') && !type.startsWith('uint')) { + type = 'bytes'; + } + } + + if ((type.startsWith('int') || type.startsWith('uint')) && typeof value === 'string' && !/^(-)?0x/i.test(value)) { + value = new BN(value); + } + + // get the array size + if(_.isArray(value)) { + arraySize = _parseTypeNArray(type); + if(arraySize && value.length !== arraySize) { + throw new Error(type +' is not matching the given array '+ JSON.stringify(value)); + } else { + arraySize = value.length; + } + } + + + if (_.isArray(value)) { + hexArg = value.map(function (val) { + return _solidityPack(type, val, arraySize).toString('hex').replace('0x',''); + }); + return hexArg.join(''); + } else { + hexArg = _solidityPack(type, value, arraySize); + return hexArg.toString('hex').replace('0x',''); + } + +}; + +/** + * Hashes solidity values to a sha3 hash using keccak 256 + * + * @method soliditySha3 + * @return {Object} the sha3 + */ +var soliditySha3 = function () { + /*jshint maxcomplexity:false */ + + var args = Array.prototype.slice.call(arguments); + + var hexArgs = _.map(args, _processSoliditySha3Args); + + // console.log(args, hexArgs); + // console.log('0x'+ hexArgs.join('')); + + return utils.sha3('0x'+ hexArgs.join('')); +}; + + +module.exports = soliditySha3; + +},{"./utils.js":405,"bn.js":402,"underscore":325}],405:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . + */ +/** + * @file utils.js + * @author Fabian Vogelsteller + * @date 2017 + */ + +var _ = require('underscore'); +var BN = require('bn.js'); +var numberToBN = require('number-to-bn'); +var utf8 = require('utf8'); +var Hash = require("eth-lib/lib/hash"); + + +/** + * Returns true if object is BN, otherwise false + * + * @method isBN + * @param {Object} object + * @return {Boolean} + */ +var isBN = function (object) { + return object instanceof BN || + (object && object.constructor && object.constructor.name === 'BN'); +}; + +/** + * Returns true if object is BigNumber, otherwise false + * + * @method isBigNumber + * @param {Object} object + * @return {Boolean} + */ +var isBigNumber = function (object) { + return object && object.constructor && object.constructor.name === 'BigNumber'; +}; + +/** + * Takes an input and transforms it into an BN + * + * @method toBN + * @param {Number|String|BN} number, string, HEX string or BN + * @return {BN} BN + */ +var toBN = function(number){ + try { + return numberToBN.apply(null, arguments); + } catch(e) { + throw new Error(e + ' Given value: "'+ number +'"'); + } +}; + + +/** + * Takes and input transforms it into BN and if it is negative value, into two's complement + * + * @method toTwosComplement + * @param {Number|String|BN} number + * @return {String} + */ +var toTwosComplement = function (number) { + return '0x'+ toBN(number).toTwos(256).toString(16, 64); +}; + +/** + * Checks if the given string is an address + * + * @method isAddress + * @param {String} address the given HEX address + * @return {Boolean} + */ +var isAddress = function (address) { + // check if it has the basic requirements of an address + if (!/^(0x)?[0-9a-f]{40}$/i.test(address)) { + return false; + // If it's ALL lowercase or ALL upppercase + } else if (/^(0x|0X)?[0-9a-f]{40}$/.test(address) || /^(0x|0X)?[0-9A-F]{40}$/.test(address)) { + return true; + // Otherwise check each case + } else { + return checkAddressChecksum(address); + } +}; + + + +/** + * Checks if the given string is a checksummed address + * + * @method checkAddressChecksum + * @param {String} address the given HEX address + * @return {Boolean} + */ +var checkAddressChecksum = function (address) { + // Check each case + address = address.replace(/^0x/i,''); + var addressHash = sha3(address.toLowerCase()).replace(/^0x/i,''); + + for (var i = 0; i < 40; i++ ) { + // the nth letter should be uppercase if the nth digit of casemap is 1 + if ((parseInt(addressHash[i], 16) > 7 && address[i].toUpperCase() !== address[i]) || (parseInt(addressHash[i], 16) <= 7 && address[i].toLowerCase() !== address[i])) { + return false; + } + } + return true; +}; + +/** + * Should be called to pad string to expected length + * + * @method leftPad + * @param {String} string to be padded + * @param {Number} chars that result string should have + * @param {String} sign, by default 0 + * @returns {String} right aligned string + */ +var leftPad = function (string, chars, sign) { + var hasPrefix = /^0x/i.test(string) || typeof string === 'number'; + string = string.toString(16).replace(/^0x/i,''); + + var padding = (chars - string.length + 1 >= 0) ? chars - string.length + 1 : 0; + + return (hasPrefix ? '0x' : '') + new Array(padding).join(sign ? sign : "0") + string; +}; + +/** + * Should be called to pad string to expected length + * + * @method rightPad + * @param {String} string to be padded + * @param {Number} chars that result string should have + * @param {String} sign, by default 0 + * @returns {String} right aligned string + */ +var rightPad = function (string, chars, sign) { + var hasPrefix = /^0x/i.test(string) || typeof string === 'number'; + string = string.toString(16).replace(/^0x/i,''); + + var padding = (chars - string.length + 1 >= 0) ? chars - string.length + 1 : 0; + + return (hasPrefix ? '0x' : '') + string + (new Array(padding).join(sign ? sign : "0")); +}; + + +/** + * Should be called to get hex representation (prefixed by 0x) of utf8 string + * + * @method utf8ToHex + * @param {String} str + * @returns {String} hex representation of input string + */ +var utf8ToHex = function(str) { + str = utf8.encode(str); + var hex = ""; + + // remove \u0000 padding from either side + str = str.replace(/^(?:\u0000)*/,''); + str = str.split("").reverse().join(""); + str = str.replace(/^(?:\u0000)*/,''); + str = str.split("").reverse().join(""); + + for(var i = 0; i < str.length; i++) { + var code = str.charCodeAt(i); + // if (code !== 0) { + var n = code.toString(16); + hex += n.length < 2 ? '0' + n : n; + // } + } + + return "0x" + hex; +}; + +/** + * Should be called to get utf8 from it's hex representation + * + * @method hexToUtf8 + * @param {String} hex + * @returns {String} ascii string representation of hex value + */ +var hexToUtf8 = function(hex) { + if (!isHexStrict(hex)) + throw new Error('The parameter "'+ hex +'" must be a valid HEX string.'); + + var str = ""; + var code = 0; + hex = hex.replace(/^0x/i,''); + + // remove 00 padding from either side + hex = hex.replace(/^(?:00)*/,''); + hex = hex.split("").reverse().join(""); + hex = hex.replace(/^(?:00)*/,''); + hex = hex.split("").reverse().join(""); + + var l = hex.length; + + for (var i=0; i < l; i+=2) { + code = parseInt(hex.substr(i, 2), 16); + // if (code !== 0) { + str += String.fromCharCode(code); + // } + } + + return utf8.decode(str); +}; + + +/** + * Converts value to it's number representation + * + * @method hexToNumber + * @param {String|Number|BN} value + * @return {String} + */ +var hexToNumber = function (value) { + if (!value) { + return value; + } + + return toBN(value).toNumber(); +}; + +/** + * Converts value to it's decimal representation in string + * + * @method hexToNumberString + * @param {String|Number|BN} value + * @return {String} + */ +var hexToNumberString = function (value) { + if (!value) return value; + + return toBN(value).toString(10); +}; + + +/** + * Converts value to it's hex representation + * + * @method numberToHex + * @param {String|Number|BN} value + * @return {String} + */ +var numberToHex = function (value) { + if (_.isNull(value) || _.isUndefined(value)) { + return value; + } + + if (!isFinite(value) && !isHexStrict(value)) { + throw new Error('Given input "'+value+'" is not a number.'); + } + + var number = toBN(value); + var result = number.toString(16); + + return number.lt(new BN(0)) ? '-0x' + result.substr(1) : '0x' + result; +}; + + +/** + * Convert a byte array to a hex string + * + * Note: Implementation from crypto-js + * + * @method bytesToHex + * @param {Array} bytes + * @return {String} the hex string + */ +var bytesToHex = function(bytes) { + for (var hex = [], i = 0; i < bytes.length; i++) { + /* jshint ignore:start */ + hex.push((bytes[i] >>> 4).toString(16)); + hex.push((bytes[i] & 0xF).toString(16)); + /* jshint ignore:end */ + } + return '0x'+ hex.join(""); +}; + +/** + * Convert a hex string to a byte array + * + * Note: Implementation from crypto-js + * + * @method hexToBytes + * @param {string} hex + * @return {Array} the byte array + */ +var hexToBytes = function(hex) { + hex = hex.toString(16); + + if (!isHexStrict(hex)) { + throw new Error('Given value "'+ hex +'" is not a valid hex string.'); + } + + hex = hex.replace(/^0x/i,''); + + for (var bytes = [], c = 0; c < hex.length; c += 2) + bytes.push(parseInt(hex.substr(c, 2), 16)); + return bytes; +}; + +/** + * Auto converts any given value into it's hex representation. + * + * And even stringifys objects before. + * + * @method toHex + * @param {String|Number|BN|Object} value + * @param {Boolean} returnType + * @return {String} + */ +var toHex = function (value, returnType) { + /*jshint maxcomplexity: false */ + + if (isAddress(value)) { + return returnType ? 'address' : '0x'+ value.toLowerCase().replace(/^0x/i,''); + } + + if (_.isBoolean(value)) { + return returnType ? 'bool' : value ? '0x01' : '0x00'; + } + + + if (_.isObject(value) && !isBigNumber(value) && !isBN(value)) { + return returnType ? 'string' : utf8ToHex(JSON.stringify(value)); + } + + // if its a negative number, pass it through numberToHex + if (_.isString(value)) { + if (value.indexOf('-0x') === 0 || value.indexOf('-0X') === 0) { + return returnType ? 'int256' : numberToHex(value); + } else if(value.indexOf('0x') === 0 || value.indexOf('0X') === 0) { + return returnType ? 'bytes' : value; + } else if (!isFinite(value)) { + return returnType ? 'string' : utf8ToHex(value); + } + } + + return returnType ? (value < 0 ? 'int256' : 'uint256') : numberToHex(value); +}; + + +/** + * Check if string is HEX, requires a 0x in front + * + * @method isHexStrict + * @param {String} hex to be checked + * @returns {Boolean} + */ +var isHexStrict = function (hex) { + return ((_.isString(hex) || _.isNumber(hex)) && /^(-)?0x[0-9a-f]*$/i.test(hex)); +}; + +/** + * Check if string is HEX + * + * @method isHex + * @param {String} hex to be checked + * @returns {Boolean} + */ +var isHex = function (hex) { + return ((_.isString(hex) || _.isNumber(hex)) && /^(-0x|0x)?[0-9a-f]*$/i.test(hex)); +}; + + +/** + * Returns true if given string is a valid Ethereum block header bloom. + * + * TODO UNDOCUMENTED + * + * @method isBloom + * @param {String} hex encoded bloom filter + * @return {Boolean} + */ +var isBloom = function (bloom) { + if (!/^(0x)?[0-9a-f]{512}$/i.test(bloom)) { + return false; + } else if (/^(0x)?[0-9a-f]{512}$/.test(bloom) || /^(0x)?[0-9A-F]{512}$/.test(bloom)) { + return true; + } + return false; +}; + +/** + * Returns true if given string is a valid log topic. + * + * TODO UNDOCUMENTED + * + * @method isTopic + * @param {String} hex encoded topic + * @return {Boolean} + */ +var isTopic = function (topic) { + if (!/^(0x)?[0-9a-f]{64}$/i.test(topic)) { + return false; + } else if (/^(0x)?[0-9a-f]{64}$/.test(topic) || /^(0x)?[0-9A-F]{64}$/.test(topic)) { + return true; + } + return false; +}; + + +/** + * Hashes values to a sha3 hash using keccak 256 + * + * To hash a HEX string the hex must have 0x in front. + * + * @method sha3 + * @return {String} the sha3 string + */ +var SHA3_NULL_S = '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'; + +var sha3 = function (value) { + if (isHexStrict(value) && /^0x/i.test((value).toString())) { + value = hexToBytes(value); + } + + var returnValue = Hash.keccak256(value); // jshint ignore:line + + if(returnValue === SHA3_NULL_S) { + return null; + } else { + return returnValue; + } +}; +// expose the under the hood keccak256 +sha3._Hash = Hash; + + +module.exports = { + BN: BN, + isBN: isBN, + isBigNumber: isBigNumber, + toBN: toBN, + isAddress: isAddress, + isBloom: isBloom, // TODO UNDOCUMENTED + isTopic: isTopic, // TODO UNDOCUMENTED + checkAddressChecksum: checkAddressChecksum, + utf8ToHex: utf8ToHex, + hexToUtf8: hexToUtf8, + hexToNumber: hexToNumber, + hexToNumberString: hexToNumberString, + numberToHex: numberToHex, + toHex: toHex, + hexToBytes: hexToBytes, + bytesToHex: bytesToHex, + isHex: isHex, + isHexStrict: isHexStrict, + leftPad: leftPad, + rightPad: rightPad, + toTwosComplement: toTwosComplement, + sha3: sha3 +}; + +},{"bn.js":402,"eth-lib/lib/hash":134,"number-to-bn":237,"underscore":325,"utf8":329}],406:[function(require,module,exports){ +module.exports={ + "_from": "web3@1.0.0-beta.36", + "_id": "web3@1.0.0-beta.36", + "_inBundle": false, + "_integrity": "sha512-fZDunw1V0AQS27r5pUN3eOVP7u8YAvyo6vOapdgVRolAu5LgaweP7jncYyLINqIX9ZgWdS5A090bt+ymgaYHsw==", + "_location": "/web3", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "web3@1.0.0-beta.36", + "name": "web3", + "escapedName": "web3", + "rawSpec": "1.0.0-beta.36", + "saveSpec": null, + "fetchSpec": "1.0.0-beta.36" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.36.tgz", + "_shasum": "2954da9e431124c88396025510d840ba731c8373", + "_spec": "web3@1.0.0-beta.36", + "_where": "/Users/alexvlasov/Blockchain/web3swift/web3swiftJSProxy", + "author": { + "name": "ethereum.org" + }, + "authors": [ + { + "name": "Fabian Vogelsteller", + "email": "fabian@ethereum.org", + "homepage": "http://frozeman.de" + }, + { + "name": "Marek Kotewicz", + "email": "marek@parity.io", + "url": "https://github.com/debris" + }, + { + "name": "Marian Oancea", + "url": "https://github.com/cubedro" + }, + { + "name": "Gav Wood", + "email": "g@parity.io", + "homepage": "http://gavwood.com" + }, + { + "name": "Jeffery Wilcke", + "email": "jeffrey.wilcke@ethereum.org", + "url": "https://github.com/obscuren" + } + ], + "bugs": { + "url": "https://github.com/ethereum/web3.js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "web3-bzz": "1.0.0-beta.36", + "web3-core": "1.0.0-beta.36", + "web3-eth": "1.0.0-beta.36", + "web3-eth-personal": "1.0.0-beta.36", + "web3-net": "1.0.0-beta.36", + "web3-shh": "1.0.0-beta.36", + "web3-utils": "1.0.0-beta.36" + }, + "deprecated": false, + "description": "Ethereum JavaScript API", + "keywords": [ + "Ethereum", + "JavaScript", + "API" + ], + "license": "LGPL-3.0", + "main": "src/index.js", + "name": "web3", + "namespace": "ethereum", + "repository": { + "type": "git", + "url": "https://github.com/ethereum/web3.js/tree/master/packages/web3" + }, + "version": "1.0.0-beta.36" +} + +},{}],407:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.js + * @authors: + * Fabian Vogelsteller + * Gav Wood + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * @date 2017 + */ + +"use strict"; + + +var version = require('../package.json').version; +var core = require('web3-core'); +var Eth = require('web3-eth'); +var Net = require('web3-net'); +var Personal = require('web3-eth-personal'); +var Shh = require('web3-shh'); +var Bzz = require('web3-bzz'); +var utils = require('web3-utils'); + +var Web3 = function Web3() { + var _this = this; + + // sets _requestmanager etc + core.packageInit(this, arguments); + + this.version = version; + this.utils = utils; + + this.eth = new Eth(this); + this.shh = new Shh(this); + this.bzz = new Bzz(this); + + // overwrite package setProvider + var setProvider = this.setProvider; + this.setProvider = function (provider, net) { + setProvider.apply(_this, arguments); + + this.eth.setProvider(provider, net); + this.shh.setProvider(provider, net); + this.bzz.setProvider(provider); + + return true; + }; +}; + +Web3.version = version; +Web3.utils = utils; +Web3.modules = { + Eth: Eth, + Net: Net, + Personal: Personal, + Shh: Shh, + Bzz: Bzz +}; + +core.addProviders(Web3); + +module.exports = Web3; + + +},{"../package.json":406,"web3-bzz":335,"web3-core":348,"web3-eth":371,"web3-eth-personal":369,"web3-net":372,"web3-shh":401,"web3-utils":403}],408:[function(require,module,exports){ +var _global = (function() { return this || {}; })(); +var NativeWebSocket = _global.WebSocket || _global.MozWebSocket; +var websocket_version = require('./version'); + + +/** + * Expose a W3C WebSocket class with just one or two arguments. + */ +function W3CWebSocket(uri, protocols) { + var native_instance; + + if (protocols) { + native_instance = new NativeWebSocket(uri, protocols); + } + else { + native_instance = new NativeWebSocket(uri); + } + + /** + * 'native_instance' is an instance of nativeWebSocket (the browser's WebSocket + * class). Since it is an Object it will be returned as it is when creating an + * instance of W3CWebSocket via 'new W3CWebSocket()'. + * + * ECMAScript 5: http://bclary.com/2004/11/07/#a-13.2.2 + */ + return native_instance; +} +if (NativeWebSocket) { + ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'].forEach(function(prop) { + Object.defineProperty(W3CWebSocket, prop, { + get: function() { return NativeWebSocket[prop]; } + }); + }); +} + +/** + * Module exports. + */ +module.exports = { + 'w3cwebsocket' : NativeWebSocket ? W3CWebSocket : null, + 'version' : websocket_version +}; + +},{"./version":409}],409:[function(require,module,exports){ +module.exports = require('../package.json').version; + +},{"../package.json":410}],410:[function(require,module,exports){ +module.exports={ + "_from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "_id": "websocket@1.0.26", + "_inBundle": false, + "_integrity": "", + "_location": "/websocket", + "_phantomChildren": {}, + "_requested": { + "type": "git", + "raw": "websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "name": "websocket", + "escapedName": "websocket", + "rawSpec": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "saveSpec": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "fetchSpec": "git://github.com/frozeman/WebSocket-Node.git", + "gitCommittish": "browserifyCompatible" + }, + "_requiredBy": [ + "/web3-providers-ws" + ], + "_resolved": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", + "_spec": "websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "_where": "/Users/alexvlasov/Blockchain/web3swift/web3swiftJSProxy/node_modules/web3-providers-ws", + "author": { + "name": "Brian McKelvey", + "email": "brian@worlize.com", + "url": "https://www.worlize.com/" + }, + "browser": "lib/browser.js", + "bugs": { + "url": "https://github.com/theturtle32/WebSocket-Node/issues" + }, + "bundleDependencies": false, + "config": { + "verbose": false + }, + "contributors": [ + { + "name": "Iñaki Baz Castillo", + "email": "ibc@aliax.net", + "url": "http://dev.sipdoc.net" + } + ], + "dependencies": { + "debug": "^2.2.0", + "nan": "^2.3.3", + "typedarray-to-buffer": "^3.1.2", + "yaeti": "^0.0.6" + }, + "deprecated": false, + "description": "Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.", + "devDependencies": { + "buffer-equal": "^1.0.0", + "faucet": "^0.0.1", + "gulp": "git+https://github.com/gulpjs/gulp.git#4.0", + "gulp-jshint": "^2.0.4", + "jshint": "^2.0.0", + "jshint-stylish": "^2.2.1", + "tape": "^4.0.1" + }, + "directories": { + "lib": "./lib" + }, + "engines": { + "node": ">=0.10.0" + }, + "homepage": "https://github.com/theturtle32/WebSocket-Node", + "keywords": [ + "websocket", + "websockets", + "socket", + "networking", + "comet", + "push", + "RFC-6455", + "realtime", + "server", + "client" + ], + "license": "Apache-2.0", + "main": "index", + "name": "websocket", + "repository": { + "type": "git", + "url": "git+https://github.com/theturtle32/WebSocket-Node.git" + }, + "scripts": { + "gulp": "gulp", + "install": "(node-gyp rebuild 2> builderror.log) || (exit 0)", + "test": "faucet test/unit" + }, + "version": "1.0.26" +} + +},{}],411:[function(require,module,exports){ +var request = require('xhr-request') + +module.exports = function (url, options) { + return new Promise(function (resolve, reject) { + request(url, options, function (err, data) { + if (err) reject(err); + else resolve(data); + }); + }); +}; + +},{"xhr-request":412}],412:[function(require,module,exports){ +var queryString = require('query-string') +var setQuery = require('url-set-query') +var assign = require('object-assign') +var ensureHeader = require('./lib/ensure-header.js') + +// this is replaced in the browser +var request = require('./lib/request.js') + +var mimeTypeJson = 'application/json' +var noop = function () {} + +module.exports = xhrRequest +function xhrRequest (url, opt, cb) { + if (!url || typeof url !== 'string') { + throw new TypeError('must specify a URL') + } + if (typeof opt === 'function') { + cb = opt + opt = {} + } + if (cb && typeof cb !== 'function') { + throw new TypeError('expected cb to be undefined or a function') + } + + cb = cb || noop + opt = opt || {} + + var defaultResponse = opt.json ? 'json' : 'text' + opt = assign({ responseType: defaultResponse }, opt) + + var headers = opt.headers || {} + var method = (opt.method || 'GET').toUpperCase() + var query = opt.query + if (query) { + if (typeof query !== 'string') { + query = queryString.stringify(query) + } + url = setQuery(url, query) + } + + // allow json response + if (opt.responseType === 'json') { + ensureHeader(headers, 'Accept', mimeTypeJson) + } + + // if body content is json + if (opt.json && method !== 'GET' && method !== 'HEAD') { + ensureHeader(headers, 'Content-Type', mimeTypeJson) + opt.body = JSON.stringify(opt.body) + } + + opt.method = method + opt.url = url + opt.headers = headers + delete opt.query + delete opt.json + + return request(opt, cb) +} + +},{"./lib/ensure-header.js":413,"./lib/request.js":415,"object-assign":238,"query-string":266,"url-set-query":326}],413:[function(require,module,exports){ +module.exports = ensureHeader +function ensureHeader (headers, key, value) { + var lower = key.toLowerCase() + if (!headers[key] && !headers[lower]) { + headers[key] = value + } +} + +},{}],414:[function(require,module,exports){ +module.exports = getResponse +function getResponse (opt, resp) { + if (!resp) return null + return { + statusCode: resp.statusCode, + headers: resp.headers, + method: opt.method, + url: opt.url, + // the XHR object in browser, http response in Node + rawRequest: resp.rawRequest ? resp.rawRequest : resp + } +} + +},{}],415:[function(require,module,exports){ +var xhr = require('xhr') +var normalize = require('./normalize-response') +var noop = function () {} + +module.exports = xhrRequest +function xhrRequest (opt, cb) { + delete opt.uri + + // for better JSON.parse error handling than xhr module + var useJson = false + if (opt.responseType === 'json') { + opt.responseType = 'text' + useJson = true + } + + var req = xhr(opt, function xhrRequestResult (err, resp, body) { + if (useJson && !err) { + try { + var text = resp.rawRequest.responseText + body = JSON.parse(text) + } catch (e) { + err = e + } + } + + resp = normalize(opt, resp) + if (err) cb(err, null, resp) + else cb(err, body, resp) + cb = noop + }) + + // Patch abort() so that it also calls the callback, but with an error + var onabort = req.onabort + req.onabort = function () { + var ret = onabort.apply(req, Array.prototype.slice.call(arguments)) + cb(new Error('XHR Aborted')) + cb = noop + return ret + } + + return req +} + +},{"./normalize-response":414,"xhr":416}],416:[function(require,module,exports){ +"use strict"; +var window = require("global/window") +var isFunction = require("is-function") +var parseHeaders = require("parse-headers") +var xtend = require("xtend") + +module.exports = createXHR +// Allow use of default import syntax in TypeScript +module.exports.default = createXHR; +createXHR.XMLHttpRequest = window.XMLHttpRequest || noop +createXHR.XDomainRequest = "withCredentials" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest + +forEachArray(["get", "put", "post", "patch", "head", "delete"], function(method) { + createXHR[method === "delete" ? "del" : method] = function(uri, options, callback) { + options = initParams(uri, options, callback) + options.method = method.toUpperCase() + return _createXHR(options) + } +}) + +function forEachArray(array, iterator) { + for (var i = 0; i < array.length; i++) { + iterator(array[i]) + } +} + +function isEmpty(obj){ + for(var i in obj){ + if(obj.hasOwnProperty(i)) return false + } + return true +} + +function initParams(uri, options, callback) { + var params = uri + + if (isFunction(options)) { + callback = options + if (typeof uri === "string") { + params = {uri:uri} + } + } else { + params = xtend(options, {uri: uri}) + } + + params.callback = callback + return params +} + +function createXHR(uri, options, callback) { + options = initParams(uri, options, callback) + return _createXHR(options) +} + +function _createXHR(options) { + if(typeof options.callback === "undefined"){ + throw new Error("callback argument missing") + } + + var called = false + var callback = function cbOnce(err, response, body){ + if(!called){ + called = true + options.callback(err, response, body) + } + } + + function readystatechange() { + if (xhr.readyState === 4) { + setTimeout(loadFunc, 0) + } + } + + function getBody() { + // Chrome with requestType=blob throws errors arround when even testing access to responseText + var body = undefined + + if (xhr.response) { + body = xhr.response + } else { + body = xhr.responseText || getXml(xhr) + } + + if (isJson) { + try { + body = JSON.parse(body) + } catch (e) {} + } + + return body + } + + function errorFunc(evt) { + clearTimeout(timeoutTimer) + if(!(evt instanceof Error)){ + evt = new Error("" + (evt || "Unknown XMLHttpRequest Error") ) + } + evt.statusCode = 0 + return callback(evt, failureResponse) + } + + // will load the data & process the response in a special response object + function loadFunc() { + if (aborted) return + var status + clearTimeout(timeoutTimer) + if(options.useXDR && xhr.status===undefined) { + //IE8 CORS GET successful response doesn't have a status field, but body is fine + status = 200 + } else { + status = (xhr.status === 1223 ? 204 : xhr.status) + } + var response = failureResponse + var err = null + + if (status !== 0){ + response = { + body: getBody(), + statusCode: status, + method: method, + headers: {}, + url: uri, + rawRequest: xhr + } + if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE + response.headers = parseHeaders(xhr.getAllResponseHeaders()) + } + } else { + err = new Error("Internal XMLHttpRequest Error") + } + return callback(err, response, response.body) + } + + var xhr = options.xhr || null + + if (!xhr) { + if (options.cors || options.useXDR) { + xhr = new createXHR.XDomainRequest() + }else{ + xhr = new createXHR.XMLHttpRequest() + } + } + + var key + var aborted + var uri = xhr.url = options.uri || options.url + var method = xhr.method = options.method || "GET" + var body = options.body || options.data + var headers = xhr.headers = options.headers || {} + var sync = !!options.sync + var isJson = false + var timeoutTimer + var failureResponse = { + body: undefined, + headers: {}, + statusCode: 0, + method: method, + url: uri, + rawRequest: xhr + } + + if ("json" in options && options.json !== false) { + isJson = true + headers["accept"] || headers["Accept"] || (headers["Accept"] = "application/json") //Don't override existing accept header declared by user + if (method !== "GET" && method !== "HEAD") { + headers["content-type"] || headers["Content-Type"] || (headers["Content-Type"] = "application/json") //Don't override existing accept header declared by user + body = JSON.stringify(options.json === true ? body : options.json) + } + } + + xhr.onreadystatechange = readystatechange + xhr.onload = loadFunc + xhr.onerror = errorFunc + // IE9 must have onprogress be set to a unique function. + xhr.onprogress = function () { + // IE must die + } + xhr.onabort = function(){ + aborted = true; + } + xhr.ontimeout = errorFunc + xhr.open(method, uri, !sync, options.username, options.password) + //has to be after open + if(!sync) { + xhr.withCredentials = !!options.withCredentials + } + // Cannot set timeout with sync request + // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly + // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent + if (!sync && options.timeout > 0 ) { + timeoutTimer = setTimeout(function(){ + if (aborted) return + aborted = true//IE9 may still call readystatechange + xhr.abort("timeout") + var e = new Error("XMLHttpRequest timeout") + e.code = "ETIMEDOUT" + errorFunc(e) + }, options.timeout ) + } + + if (xhr.setRequestHeader) { + for(key in headers){ + if(headers.hasOwnProperty(key)){ + xhr.setRequestHeader(key, headers[key]) + } + } + } else if (options.headers && !isEmpty(options.headers)) { + throw new Error("Headers cannot be set on an XDomainRequest object") + } + + if ("responseType" in options) { + xhr.responseType = options.responseType + } + + if ("beforeSend" in options && + typeof options.beforeSend === "function" + ) { + options.beforeSend(xhr) + } + + // Microsoft Edge browser sends "undefined" when send is called with undefined value. + // XMLHttpRequest spec says to pass null as body to indicate no body + // See https://github.com/naugtur/xhr/issues/100. + xhr.send(body || null) + + return xhr + + +} + +function getXml(xhr) { + // xhr.responseXML will throw Exception "InvalidStateError" or "DOMException" + // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML. + try { + if (xhr.responseType === "document") { + return xhr.responseXML + } + var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === "parsererror" + if (xhr.responseType === "" && !firefoxBugTakenEffect) { + return xhr.responseXML + } + } catch (e) {} + + return null +} + +function noop() {} + +},{"global/window":160,"is-function":184,"parse-headers":246,"xtend":423}],417:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var SecurityError = /** @class */ (function (_super) { + __extends(SecurityError, _super); + function SecurityError() { + return _super !== null && _super.apply(this, arguments) || this; + } + return SecurityError; +}(Error)); +exports.SecurityError = SecurityError; +var InvalidStateError = /** @class */ (function (_super) { + __extends(InvalidStateError, _super); + function InvalidStateError() { + return _super !== null && _super.apply(this, arguments) || this; + } + return InvalidStateError; +}(Error)); +exports.InvalidStateError = InvalidStateError; +var NetworkError = /** @class */ (function (_super) { + __extends(NetworkError, _super); + function NetworkError() { + return _super !== null && _super.apply(this, arguments) || this; + } + return NetworkError; +}(Error)); +exports.NetworkError = NetworkError; +var SyntaxError = /** @class */ (function (_super) { + __extends(SyntaxError, _super); + function SyntaxError() { + return _super !== null && _super.apply(this, arguments) || this; + } + return SyntaxError; +}(Error)); +exports.SyntaxError = SyntaxError; + +},{}],418:[function(require,module,exports){ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./xml-http-request")); +var xml_http_request_event_target_1 = require("./xml-http-request-event-target"); +exports.XMLHttpRequestEventTarget = xml_http_request_event_target_1.XMLHttpRequestEventTarget; + +},{"./xml-http-request":422,"./xml-http-request-event-target":420}],419:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var ProgressEvent = /** @class */ (function () { + function ProgressEvent(type) { + this.type = type; + this.bubbles = false; + this.cancelable = false; + this.loaded = 0; + this.lengthComputable = false; + this.total = 0; + } + return ProgressEvent; +}()); +exports.ProgressEvent = ProgressEvent; + +},{}],420:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var XMLHttpRequestEventTarget = /** @class */ (function () { + function XMLHttpRequestEventTarget() { + this.listeners = {}; + } + XMLHttpRequestEventTarget.prototype.addEventListener = function (eventType, listener) { + eventType = eventType.toLowerCase(); + this.listeners[eventType] = this.listeners[eventType] || []; + this.listeners[eventType].push(listener.handleEvent || listener); + }; + XMLHttpRequestEventTarget.prototype.removeEventListener = function (eventType, listener) { + eventType = eventType.toLowerCase(); + if (!this.listeners[eventType]) { + return; + } + var index = this.listeners[eventType].indexOf(listener.handleEvent || listener); + if (index < 0) { + return; + } + this.listeners[eventType].splice(index, 1); + }; + XMLHttpRequestEventTarget.prototype.dispatchEvent = function (event) { + var eventType = event.type.toLowerCase(); + event.target = this; // TODO: set event.currentTarget? + if (this.listeners[eventType]) { + for (var _i = 0, _a = this.listeners[eventType]; _i < _a.length; _i++) { + var listener_1 = _a[_i]; + listener_1.call(this, event); + } + } + var listener = this["on" + eventType]; + if (listener) { + listener.call(this, event); + } + return true; + }; + return XMLHttpRequestEventTarget; +}()); +exports.XMLHttpRequestEventTarget = XMLHttpRequestEventTarget; + +},{}],421:[function(require,module,exports){ +(function (Buffer){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var xml_http_request_event_target_1 = require("./xml-http-request-event-target"); +var XMLHttpRequestUpload = /** @class */ (function (_super) { + __extends(XMLHttpRequestUpload, _super); + function XMLHttpRequestUpload() { + var _this = _super.call(this) || this; + _this._contentType = null; + _this._body = null; + _this._reset(); + return _this; + } + XMLHttpRequestUpload.prototype._reset = function () { + this._contentType = null; + this._body = null; + }; + XMLHttpRequestUpload.prototype._setData = function (data) { + if (data == null) { + return; + } + if (typeof data === 'string') { + if (data.length !== 0) { + this._contentType = 'text/plain;charset=UTF-8'; + } + this._body = new Buffer(data, 'utf-8'); + } + else if (Buffer.isBuffer(data)) { + this._body = data; + } + else if (data instanceof ArrayBuffer) { + var body = new Buffer(data.byteLength); + var view = new Uint8Array(data); + for (var i = 0; i < data.byteLength; i++) { + body[i] = view[i]; + } + this._body = body; + } + else if (data.buffer && data.buffer instanceof ArrayBuffer) { + var body = new Buffer(data.byteLength); + var offset = data.byteOffset; + var view = new Uint8Array(data.buffer); + for (var i = 0; i < data.byteLength; i++) { + body[i] = view[i + offset]; + } + this._body = body; + } + else { + throw new Error("Unsupported send() data " + data); + } + }; + XMLHttpRequestUpload.prototype._finalizeHeaders = function (headers, loweredHeaders) { + if (this._contentType && !loweredHeaders['content-type']) { + headers['Content-Type'] = this._contentType; + } + if (this._body) { + headers['Content-Length'] = this._body.length.toString(); + } + }; + XMLHttpRequestUpload.prototype._startUpload = function (request) { + if (this._body) { + request.write(this._body); + } + request.end(); + }; + return XMLHttpRequestUpload; +}(xml_http_request_event_target_1.XMLHttpRequestEventTarget)); +exports.XMLHttpRequestUpload = XMLHttpRequestUpload; + +}).call(this,require("buffer").Buffer) +},{"./xml-http-request-event-target":420,"buffer":84}],422:[function(require,module,exports){ +(function (process,Buffer){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var http = require("http"); +var https = require("https"); +var os = require("os"); +var url = require("url"); +var progress_event_1 = require("./progress-event"); +var errors_1 = require("./errors"); +var xml_http_request_event_target_1 = require("./xml-http-request-event-target"); +var xml_http_request_upload_1 = require("./xml-http-request-upload"); +var Cookie = require("cookiejar"); +var XMLHttpRequest = /** @class */ (function (_super) { + __extends(XMLHttpRequest, _super); + function XMLHttpRequest(options) { + if (options === void 0) { options = {}; } + var _this = _super.call(this) || this; + _this.UNSENT = XMLHttpRequest.UNSENT; + _this.OPENED = XMLHttpRequest.OPENED; + _this.HEADERS_RECEIVED = XMLHttpRequest.HEADERS_RECEIVED; + _this.LOADING = XMLHttpRequest.LOADING; + _this.DONE = XMLHttpRequest.DONE; + _this.onreadystatechange = null; + _this.readyState = XMLHttpRequest.UNSENT; + _this.response = null; + _this.responseText = ''; + _this.responseType = ''; + _this.status = 0; // TODO: UNSENT? + _this.statusText = ''; + _this.timeout = 0; + _this.upload = new xml_http_request_upload_1.XMLHttpRequestUpload(); + _this.responseUrl = ''; + _this.withCredentials = false; + _this._method = null; + _this._url = null; + _this._sync = false; + _this._headers = {}; + _this._loweredHeaders = {}; + _this._mimeOverride = null; // TODO: is type right? + _this._request = null; + _this._response = null; + _this._responseParts = null; + _this._responseHeaders = null; + _this._aborting = null; // TODO: type? + _this._error = null; // TODO: type? + _this._loadedBytes = 0; + _this._totalBytes = 0; + _this._lengthComputable = false; + _this._restrictedMethods = { CONNECT: true, TRACE: true, TRACK: true }; + _this._restrictedHeaders = { + 'accept-charset': true, + 'accept-encoding': true, + 'access-control-request-headers': true, + 'access-control-request-method': true, + connection: true, + 'content-length': true, + cookie: true, + cookie2: true, + date: true, + dnt: true, + expect: true, + host: true, + 'keep-alive': true, + origin: true, + referer: true, + te: true, + trailer: true, + 'transfer-encoding': true, + upgrade: true, + 'user-agent': true, + via: true + }; + _this._privateHeaders = { 'set-cookie': true, 'set-cookie2': true }; + _this._userAgent = "Mozilla/5.0 (" + os.type() + " " + os.arch() + ") node.js/" + process.versions.node + " v8/" + process.versions.v8; + _this._anonymous = options.anon || false; + return _this; + } + XMLHttpRequest.prototype.open = function (method, url, async, user, password) { + if (async === void 0) { async = true; } + method = method.toUpperCase(); + if (this._restrictedMethods[method]) { + throw new XMLHttpRequest.SecurityError("HTTP method " + method + " is not allowed in XHR"); + } + ; + var xhrUrl = this._parseUrl(url, user, password); + if (this.readyState === XMLHttpRequest.HEADERS_RECEIVED || this.readyState === XMLHttpRequest.LOADING) { + // TODO(pwnall): terminate abort(), terminate send() + } + this._method = method; + this._url = xhrUrl; + this._sync = !async; + this._headers = {}; + this._loweredHeaders = {}; + this._mimeOverride = null; + this._setReadyState(XMLHttpRequest.OPENED); + this._request = null; + this._response = null; + this.status = 0; + this.statusText = ''; + this._responseParts = []; + this._responseHeaders = null; + this._loadedBytes = 0; + this._totalBytes = 0; + this._lengthComputable = false; + }; + XMLHttpRequest.prototype.setRequestHeader = function (name, value) { + if (this.readyState !== XMLHttpRequest.OPENED) { + throw new XMLHttpRequest.InvalidStateError('XHR readyState must be OPENED'); + } + var loweredName = name.toLowerCase(); + if (this._restrictedHeaders[loweredName] || /^sec-/.test(loweredName) || /^proxy-/.test(loweredName)) { + console.warn("Refused to set unsafe header \"" + name + "\""); + return; + } + value = value.toString(); + if (this._loweredHeaders[loweredName] != null) { + name = this._loweredHeaders[loweredName]; + this._headers[name] = this._headers[name] + ", " + value; + } + else { + this._loweredHeaders[loweredName] = name; + this._headers[name] = value; + } + }; + XMLHttpRequest.prototype.send = function (data) { + if (this.readyState !== XMLHttpRequest.OPENED) { + throw new XMLHttpRequest.InvalidStateError('XHR readyState must be OPENED'); + } + if (this._request) { + throw new XMLHttpRequest.InvalidStateError('send() already called'); + } + switch (this._url.protocol) { + case 'file:': + return this._sendFile(data); + case 'http:': + case 'https:': + return this._sendHttp(data); + default: + throw new XMLHttpRequest.NetworkError("Unsupported protocol " + this._url.protocol); + } + }; + XMLHttpRequest.prototype.abort = function () { + if (this._request == null) { + return; + } + this._request.abort(); + this._setError(); + this._dispatchProgress('abort'); + this._dispatchProgress('loadend'); + }; + XMLHttpRequest.prototype.getResponseHeader = function (name) { + if (this._responseHeaders == null || name == null) { + return null; + } + var loweredName = name.toLowerCase(); + return this._responseHeaders.hasOwnProperty(loweredName) + ? this._responseHeaders[name.toLowerCase()] + : null; + }; + XMLHttpRequest.prototype.getAllResponseHeaders = function () { + var _this = this; + if (this._responseHeaders == null) { + return ''; + } + return Object.keys(this._responseHeaders).map(function (key) { return key + ": " + _this._responseHeaders[key]; }).join('\r\n'); + }; + XMLHttpRequest.prototype.overrideMimeType = function (mimeType) { + if (this.readyState === XMLHttpRequest.LOADING || this.readyState === XMLHttpRequest.DONE) { + throw new XMLHttpRequest.InvalidStateError('overrideMimeType() not allowed in LOADING or DONE'); + } + this._mimeOverride = mimeType.toLowerCase(); + }; + XMLHttpRequest.prototype.nodejsSet = function (options) { + this.nodejsHttpAgent = options.httpAgent || this.nodejsHttpAgent; + this.nodejsHttpsAgent = options.httpsAgent || this.nodejsHttpsAgent; + if (options.hasOwnProperty('baseUrl')) { + if (options.baseUrl != null) { + var parsedUrl = url.parse(options.baseUrl, false, true); + if (!parsedUrl.protocol) { + throw new XMLHttpRequest.SyntaxError("baseUrl must be an absolute URL"); + } + } + this.nodejsBaseUrl = options.baseUrl; + } + }; + XMLHttpRequest.nodejsSet = function (options) { + XMLHttpRequest.prototype.nodejsSet(options); + }; + XMLHttpRequest.prototype._setReadyState = function (readyState) { + this.readyState = readyState; + this.dispatchEvent(new progress_event_1.ProgressEvent('readystatechange')); + }; + XMLHttpRequest.prototype._sendFile = function (data) { + // TODO + throw new Error('Protocol file: not implemented'); + }; + XMLHttpRequest.prototype._sendHttp = function (data) { + if (this._sync) { + throw new Error('Synchronous XHR processing not implemented'); + } + if (data && (this._method === 'GET' || this._method === 'HEAD')) { + console.warn("Discarding entity body for " + this._method + " requests"); + data = null; + } + else { + data = data || ''; + } + this.upload._setData(data); + this._finalizeHeaders(); + this._sendHxxpRequest(); + }; + XMLHttpRequest.prototype._sendHxxpRequest = function () { + var _this = this; + if (this.withCredentials) { + var cookie = XMLHttpRequest.cookieJar + .getCookies(Cookie.CookieAccessInfo(this._url.hostname, this._url.pathname, this._url.protocol === 'https:')).toValueString(); + this._headers.cookie = this._headers.cookie2 = cookie; + } + var _a = this._url.protocol === 'http:' ? [http, this.nodejsHttpAgent] : [https, this.nodejsHttpsAgent], hxxp = _a[0], agent = _a[1]; + var requestMethod = hxxp.request.bind(hxxp); + var request = requestMethod({ + hostname: this._url.hostname, + port: +this._url.port, + path: this._url.path, + auth: this._url.auth, + method: this._method, + headers: this._headers, + agent: agent + }); + this._request = request; + if (this.timeout) { + request.setTimeout(this.timeout, function () { return _this._onHttpTimeout(request); }); + } + request.on('response', function (response) { return _this._onHttpResponse(request, response); }); + request.on('error', function (error) { return _this._onHttpRequestError(request, error); }); + this.upload._startUpload(request); + if (this._request === request) { + this._dispatchProgress('loadstart'); + } + }; + XMLHttpRequest.prototype._finalizeHeaders = function () { + this._headers = __assign({}, this._headers, { Connection: 'keep-alive', Host: this._url.host, 'User-Agent': this._userAgent }, this._anonymous ? { Referer: 'about:blank' } : {}); + this.upload._finalizeHeaders(this._headers, this._loweredHeaders); + }; + XMLHttpRequest.prototype._onHttpResponse = function (request, response) { + var _this = this; + if (this._request !== request) { + return; + } + if (this.withCredentials && (response.headers['set-cookie'] || response.headers['set-cookie2'])) { + XMLHttpRequest.cookieJar + .setCookies(response.headers['set-cookie'] || response.headers['set-cookie2']); + } + if ([301, 302, 303, 307, 308].indexOf(response.statusCode) >= 0) { + this._url = this._parseUrl(response.headers.location); + this._method = 'GET'; + if (this._loweredHeaders['content-type']) { + delete this._headers[this._loweredHeaders['content-type']]; + delete this._loweredHeaders['content-type']; + } + if (this._headers['Content-Type'] != null) { + delete this._headers['Content-Type']; + } + delete this._headers['Content-Length']; + this.upload._reset(); + this._finalizeHeaders(); + this._sendHxxpRequest(); + return; + } + this._response = response; + this._response.on('data', function (data) { return _this._onHttpResponseData(response, data); }); + this._response.on('end', function () { return _this._onHttpResponseEnd(response); }); + this._response.on('close', function () { return _this._onHttpResponseClose(response); }); + this.responseUrl = this._url.href.split('#')[0]; + this.status = response.statusCode; + this.statusText = http.STATUS_CODES[this.status]; + this._parseResponseHeaders(response); + var lengthString = this._responseHeaders['content-length'] || ''; + this._totalBytes = +lengthString; + this._lengthComputable = !!lengthString; + this._setReadyState(XMLHttpRequest.HEADERS_RECEIVED); + }; + XMLHttpRequest.prototype._onHttpResponseData = function (response, data) { + if (this._response !== response) { + return; + } + this._responseParts.push(new Buffer(data)); + this._loadedBytes += data.length; + if (this.readyState !== XMLHttpRequest.LOADING) { + this._setReadyState(XMLHttpRequest.LOADING); + } + this._dispatchProgress('progress'); + }; + XMLHttpRequest.prototype._onHttpResponseEnd = function (response) { + if (this._response !== response) { + return; + } + this._parseResponse(); + this._request = null; + this._response = null; + this._setReadyState(XMLHttpRequest.DONE); + this._dispatchProgress('load'); + this._dispatchProgress('loadend'); + }; + XMLHttpRequest.prototype._onHttpResponseClose = function (response) { + if (this._response !== response) { + return; + } + var request = this._request; + this._setError(); + request.abort(); + this._setReadyState(XMLHttpRequest.DONE); + this._dispatchProgress('error'); + this._dispatchProgress('loadend'); + }; + XMLHttpRequest.prototype._onHttpTimeout = function (request) { + if (this._request !== request) { + return; + } + this._setError(); + request.abort(); + this._setReadyState(XMLHttpRequest.DONE); + this._dispatchProgress('timeout'); + this._dispatchProgress('loadend'); + }; + XMLHttpRequest.prototype._onHttpRequestError = function (request, error) { + if (this._request !== request) { + return; + } + this._setError(); + request.abort(); + this._setReadyState(XMLHttpRequest.DONE); + this._dispatchProgress('error'); + this._dispatchProgress('loadend'); + }; + XMLHttpRequest.prototype._dispatchProgress = function (eventType) { + var event = new XMLHttpRequest.ProgressEvent(eventType); + event.lengthComputable = this._lengthComputable; + event.loaded = this._loadedBytes; + event.total = this._totalBytes; + this.dispatchEvent(event); + }; + XMLHttpRequest.prototype._setError = function () { + this._request = null; + this._response = null; + this._responseHeaders = null; + this._responseParts = null; + }; + XMLHttpRequest.prototype._parseUrl = function (urlString, user, password) { + var absoluteUrl = this.nodejsBaseUrl == null ? urlString : url.resolve(this.nodejsBaseUrl, urlString); + var xhrUrl = url.parse(absoluteUrl, false, true); + xhrUrl.hash = null; + var _a = (xhrUrl.auth || '').split(':'), xhrUser = _a[0], xhrPassword = _a[1]; + if (xhrUser || xhrPassword || user || password) { + xhrUrl.auth = (user || xhrUser || '') + ":" + (password || xhrPassword || ''); + } + return xhrUrl; + }; + XMLHttpRequest.prototype._parseResponseHeaders = function (response) { + this._responseHeaders = {}; + for (var name_1 in response.headers) { + var loweredName = name_1.toLowerCase(); + if (this._privateHeaders[loweredName]) { + continue; + } + this._responseHeaders[loweredName] = response.headers[name_1]; + } + if (this._mimeOverride != null) { + this._responseHeaders['content-type'] = this._mimeOverride; + } + }; + XMLHttpRequest.prototype._parseResponse = function () { + var buffer = Buffer.concat(this._responseParts); + this._responseParts = null; + switch (this.responseType) { + case 'json': + this.responseText = null; + try { + this.response = JSON.parse(buffer.toString('utf-8')); + } + catch (_a) { + this.response = null; + } + return; + case 'buffer': + this.responseText = null; + this.response = buffer; + return; + case 'arraybuffer': + this.responseText = null; + var arrayBuffer = new ArrayBuffer(buffer.length); + var view = new Uint8Array(arrayBuffer); + for (var i = 0; i < buffer.length; i++) { + view[i] = buffer[i]; + } + this.response = arrayBuffer; + return; + case 'text': + default: + try { + this.responseText = buffer.toString(this._parseResponseEncoding()); + } + catch (_b) { + this.responseText = buffer.toString('binary'); + } + this.response = this.responseText; + } + }; + XMLHttpRequest.prototype._parseResponseEncoding = function () { + return /;\s*charset=(.*)$/.exec(this._responseHeaders['content-type'] || '')[1] || 'utf-8'; + }; + XMLHttpRequest.ProgressEvent = progress_event_1.ProgressEvent; + XMLHttpRequest.InvalidStateError = errors_1.InvalidStateError; + XMLHttpRequest.NetworkError = errors_1.NetworkError; + XMLHttpRequest.SecurityError = errors_1.SecurityError; + XMLHttpRequest.SyntaxError = errors_1.SyntaxError; + XMLHttpRequest.XMLHttpRequestUpload = xml_http_request_upload_1.XMLHttpRequestUpload; + XMLHttpRequest.UNSENT = 0; + XMLHttpRequest.OPENED = 1; + XMLHttpRequest.HEADERS_RECEIVED = 2; + XMLHttpRequest.LOADING = 3; + XMLHttpRequest.DONE = 4; + XMLHttpRequest.cookieJar = Cookie.CookieJar(); + return XMLHttpRequest; +}(xml_http_request_event_target_1.XMLHttpRequestEventTarget)); +exports.XMLHttpRequest = XMLHttpRequest; +XMLHttpRequest.prototype.nodejsHttpAgent = http.globalAgent; +XMLHttpRequest.prototype.nodejsHttpsAgent = https.globalAgent; +XMLHttpRequest.prototype.nodejsBaseUrl = null; + +}).call(this,require('_process'),require("buffer").Buffer) +},{"./errors":417,"./progress-event":419,"./xml-http-request-event-target":420,"./xml-http-request-upload":421,"_process":257,"buffer":84,"cookiejar":88,"http":312,"https":175,"os":240,"url":327}],423:[function(require,module,exports){ +module.exports = extend + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend() { + var target = {} + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i] + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + } + + return target +} + +},{}],424:[function(require,module,exports){ +"use strict"; +(function() { + if (window.isIOS) { + return; + } + window.isIOS = function() { + return navigator && navigator.userAgent && (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)); + }; +}()); +(function() { + if (window.bridge) { + return; + } + window.bridge = function() { + var callbacks = [], + callbackID = 0, + registerHandlers = []; + document.addEventListener('PacificDidReceiveNativeCallback', function(e) { + if (e.detail) { + var detail = e.detail; + var id = isNaN(parseInt(detail.id)) ? -1 : parseInt(detail.id); + if (id != -1) { + callbacks[id] && callbacks[id](detail.parameters, detail.error); + delete callbacks[id]; + } + } + }, false); + document.addEventListener('PacificDidReceiveNativeBroadcast', function(e) { + if (e.detail) { + var detail = e.detail; + var name = detail.name; + if (name !== undefined && registerHandlers[name]) { + var namedListeners = registerHandlers[name]; + if (namedListeners instanceof Array) { + var parameters = detail.parameters; + namedListeners.forEach(function(handler) { + handler(parameters); + }); + } + } + } + }, false); + return { + 'post': function(action, parameters, callback, print) { + var id = callbackID++; + callbacks[id] = callback; + if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.pacific) { + window.webkit.messageHandlers.pacific.postMessage({ + 'action': action, + 'parameters': parameters, + 'callback': id, + 'print': print || 0 + }); + } + }, + 'on': function(name, callback) { + var namedListeners = registerHandlers[name]; + if (!namedListeners) { + registerHandlers[name] = namedListeners = []; + } + namedListeners.push(callback); + return function() { + namedListeners[indexOf(namedListeners, callback)] = null; + }; + }, + 'off': function(name) { + delete registerHandlers[name]; + } + }; + }(); +}()); + +//# sourceURL=/Users/alexvlasov/Blockchain/web3swift/web3swiftJSProxy/wk.bridge.js +},{}]},{},[1]); diff --git a/Example/web3swiftBrowser/web3swiftBrowser/Web3Swift.min.js b/Example/web3swiftBrowser/web3swiftBrowser/Web3Swift.min.js new file mode 100644 index 000000000..f838d4a4b --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser/Web3Swift.min.js @@ -0,0 +1,2 @@ +!function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[a]={exports:{}};t[a][0].call(f.exports,function(e){var r=t[a][1][e];return i(r||e)},f,f.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a0&&(window.web3.eth.defaultAccount=t[0])})}window.ethereum=s}}},console.log("JS bridging rpc url access"),"undefined"!=typeof window&&window.bridge?window.bridge.post("getRPCurl",{},function(e,r){r&&t(r.description,null),t(null,e.rpcURL)}):(console.log("No bridge to native code is found"),t(!0,null))}()},{"./wk.bridge":424,web3:407,"web3-provider-engine/zero.js":397}],2:[function(e,t,r){t.exports=e("./register")().Promise},{"./register":4}],3:[function(e,t,r){"use strict";var n=null;t.exports=function(e,t){return function(r,i){r=r||null;var o=!1!==(i=i||{}).global;if(null===n&&o&&(n=e["@@any-promise/REGISTRATION"]||null),null!==n&&null!==r&&n.implementation!==r)throw new Error('any-promise already defined as "'+n.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===n&&(n=null!==r&&void 0!==i.Promise?{Promise:i.Promise,implementation:r}:t(r),o&&(e["@@any-promise/REGISTRATION"]=n)),n}}},{}],4:[function(e,t,r){"use strict";t.exports=e("./loader")(window,function(){if(void 0===window.Promise)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}})},{"./loader":3}],5:[function(e,t,r){var n=r;n.bignum=e("bn.js"),n.define=e("./asn1/api").define,n.base=e("./asn1/base"),n.constants=e("./asn1/constants"),n.decoders=e("./asn1/decoders"),n.encoders=e("./asn1/encoders")},{"./asn1/api":6,"./asn1/base":8,"./asn1/constants":12,"./asn1/decoders":14,"./asn1/encoders":17,"bn.js":53}],6:[function(e,t,r){var n=e("../asn1"),i=e("inherits");function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}r.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){r=function(e){this._initNamed(e)}}return i(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":5,inherits:180,vm:334}],7:[function(e,t,r){var n=e("inherits"),i=e("../base").Reporter,o=e("buffer").Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),r.DecoderBuffer=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=s,s.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":8,buffer:84,inherits:180}],8:[function(e,t,r){var n=r;n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":7,"./node":9,"./reporter":10}],9:[function(e,t,r){var n=e("../base").Reporter,i=e("../base").EncoderBuffer,o=e("../base").DecoderBuffer,a=e("minimalistic-assert"),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=c;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};f.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){var e=this._baseState;u.forEach(function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},c.prototype._init=function(e){var t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),a.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),s.forEach(function(e){c.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}}),c.prototype.use=function(e){a(e);var t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},c.prototype.contains=function(e){var t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(a=this._peekTag(e,u,r.any),e.isError(a))return a}else{var c=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(c)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){var f=this._decodeTag(e,r.explicit);if(e.isError(f))return f;e=f}var h=e.offset;if(null===r.use&&null===r.choice){if(r.any)c=e.save();var l=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(l))return l;r.any?i=e.raw(c):e=l}if(t&&t.track&&null!==r.tag&&t.track(e.path(),h,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(d,t)}}return r.obj&&a&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some(function(o){var a=e.save(),s=r.choice[o];try{var u=s._decode(e,t);if(e.isError(u))return!1;n={type:o,value:u},i=!0}catch(t){return e.restore(a),!1}return!0},this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},c.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)a=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i},this).filter(function(e){return e}),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)},u))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,f=null===i.implicit?"universal":"context";null===c?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(c,s,f,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":8,"minimalistic-assert":234}],10:[function(e,t,r){var n=e("inherits");function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}r.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:180}],11:[function(e,t,r){var n=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=n._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=n._reverse(r.tag)},{"../constants":12}],12:[function(e,t,r){var n=r;n._reverse=function(e){var t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r}),t},n.der=e("./der")},{"./der":11}],13:[function(e,t,r){var n=e("inherits"),i=e("../../asn1"),o=i.base,a=i.bignum,s=i.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function f(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=s.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function h(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=s.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=a,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var u=1,c=n.length;c>=256;c>>=8)u++;(o=new i(2+u))[0]=a,o[1]=128|u;c=1+u;for(var f=n.length;f>0;c--,f>>=8)o[c]=255&f;return this._createEncoderBuffer([o,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(n=0;n=128;a>>=7)o++}var s=new i(o),u=s.length-1;for(n=e.length-1;n>=0;n--){a=e[n];for(s[u--]=127&a;(a>>=7)>0;)s[u--]=128|127&a}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[f(n.getFullYear()),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[f(n.getFullYear()%100),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new i(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var a=e;a>=256;a>>=8)n++;for(a=(o=new Array(n)).length-1;a>=0;a--)o[a]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n=0;c--)if(f[c]!==h[c])return!1;for(c=f.length-1;c>=0;c--)if(u=f[c],!v(e[u],t[u],r,n))return!1;return!0}(e,t,r,a))}return r?e===t:e==t}function g(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function _(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&y(i,r,"Missing expected exception"+n);var a="string"==typeof n,s=!e&&i&&!r;if((!e&&o.isError(i)&&a&&w(i,r)||s)&&y(i,r,"Got unwanted exception"+n),e&&i&&r&&!w(i,r)||!e&&i)throw i}h.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=p(b((t=this).actual),128)+" "+t.operator+" "+p(b(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=d(r),a=i.indexOf("\n"+o);if(a>=0){var s=i.indexOf("\n",a+1);i=i.substring(s+1)}this.stack=i}}},o.inherits(h.AssertionError,Error),h.fail=y,h.ok=m,h.equal=function(e,t,r){e!=t&&y(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&y(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){v(e,t,!1)||y(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){v(e,t,!0)||y(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){v(e,t,!1)&&y(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){v(t,r,!0)&&y(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&y(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&y(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){_(!0,e,t,r)},h.doesNotThrow=function(e,t,r){_(!1,e,t,r)},h.ifError=function(e){if(e)throw e};var A=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":333}],20:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return(0,i.default)(function(t,r){var i;try{i=e.apply(this,t)}catch(e){return r(e)}(0,n.default)(i)&&"function"==typeof i.then?i.then(function(e){s(r,null,e)},function(e){s(r,e.message?e:new Error(e))}):r(null,i)})};var n=a(e("lodash/isObject")),i=a(e("./internal/initialParams")),o=a(e("./internal/setImmediate"));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){try{e(t,r)}catch(e){(0,o.default)(u,e)}}function u(e){throw e}t.exports=r.default},{"./internal/initialParams":31,"./internal/setImmediate":37,"lodash/isObject":225}],21:[function(e,t,r){(function(e,n){!function(e,n){"object"==typeof r&&void 0!==t?n(r):"function"==typeof define&&define.amd?define(["exports"],n):n(e.async=e.async||{})}(this,function(r){"use strict";function i(e,t){t|=0;for(var r=Math.max(e.length-t,0),n=Array(r),i=0;i-1&&e%1==0&&e<=L}function D(e){return null!=e&&O(e.length)&&!function(e){if(!s(e))return!1;var t=B(e);return t==C||t==N||t==P||t==R}(e)}var F={};function q(){}function H(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}}var z="function"==typeof Symbol&&Symbol.iterator,K=function(e){return z&&e[z]&&e[z]()};function V(e){return null!=e&&"object"==typeof e}var G="[object Arguments]";function W(e){return V(e)&&B(e)==G}var Y=Object.prototype,X=Y.hasOwnProperty,Z=Y.propertyIsEnumerable,J=W(function(){return arguments}())?W:function(e){return V(e)&&X.call(e,"callee")&&!Z.call(e,"callee")},$=Array.isArray;var Q="object"==typeof r&&r&&!r.nodeType&&r,ee=Q&&"object"==typeof t&&t&&!t.nodeType&&t,te=ee&&ee.exports===Q?A.Buffer:void 0,re=(te?te.isBuffer:void 0)||function(){return!1},ne=9007199254740991,ie=/^(?:0|[1-9]\d*)$/;function oe(e,t){return!!(t=null==t?ne:t)&&("number"==typeof e||ie.test(e))&&e>-1&&e%1==0&&e2&&(n=i(arguments,1)),t){var c={};Fe(o,function(e,t){c[t]=e}),c[e]=n,s=!0,u=Object.create(null),r(t,c)}else o[e]=n,Le(u[e]||[],function(e){e()}),d()});a++;var c=v(t[t.length-1]);t.length>1?c(o,n):c(n)}(e,t)})}function d(){if(0===c.length&&0===a)return r(null,o);for(;c.length&&a=0&&r.push(n)}),r}Fe(e,function(t,r){if(!$(t))return l(r,[t]),void f.push(r);var n=t.slice(0,t.length-1),i=n.length;if(0===i)return l(r,t),void f.push(r);h[r]=i,Le(n,function(o){if(!e[o])throw new Error("async.auto task `"+r+"` has a non-existent dependency `"+o+"` in "+n.join(", "));!function(e,t){var r=u[e];r||(r=u[e]=[]);r.push(t)}(o,function(){0===--i&&l(r,t)})})}),function(){var e,t=0;for(;f.length;)e=f.pop(),t++,Le(p(e),function(e){0==--h[e]&&f.push(e)});if(t!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),d()};function Ke(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r=n?e:function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n-1;);return r}(i,o),function(e,t){for(var r=e.length;r--&&He(t,e[r],0)>-1;);return r}(i,o)+1).join("")}var ht=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,lt=/,/,dt=/(=.+)?(\s*)$/,pt=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function bt(e,t){var r={};Fe(e,function(e,t){var n,i,o=m(e),a=!o&&1===e.length||o&&0===e.length;if($(e))n=e.slice(0,-1),e=e[e.length-1],r[t]=n.concat(n.length>0?s:e);else if(a)r[t]=e;else{if(n=i=(i=(i=(i=(i=e).toString().replace(pt,"")).match(ht)[2].replace(" ",""))?i.split(lt):[]).map(function(e){return ft(e.replace(dt,""))}),0===e.length&&!o&&0===n.length)throw new Error("autoInject task functions require explicit parameters.");o||n.pop(),r[t]=n.concat(s)}function s(t,r){var i=Ke(n,function(e){return t[e]});i.push(r),v(e).apply(null,i)}}),ze(r,t)}function yt(){this.head=this.tail=null,this.length=0}function mt(e,t){e.length=1,e.head=e.tail=t}function vt(e,t,r){if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var n=v(e),i=0,o=[],a=!1;function s(e,t,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(f.started=!0,$(e)||(e=[e]),0===e.length&&f.idle())return l(function(){f.drain()});for(var n=0,i=e.length;n0&&o.splice(s,1),a.callback.apply(a,arguments),null!=t&&f.error(t,a.data)}i<=f.concurrency-f.buffer&&f.unsaturated(),f.idle()&&f.drain(),f.process()}}var c=!1,f={_tasks:new yt,concurrency:t,payload:r,saturated:q,unsaturated:q,buffer:t/4,empty:q,drain:q,error:q,started:!1,paused:!1,push:function(e,t){s(e,!1,t)},kill:function(){f.drain=q,f._tasks.empty()},unshift:function(e,t){s(e,!0,t)},remove:function(e){f._tasks.remove(e)},process:function(){if(!c){for(c=!0;!f.paused&&i2&&(o=i(arguments,1)),n[t]=o,r(e)})},function(e){r(e,n)})}function br(e,t){pr(Ie,e,t)}function yr(e,t,r){pr(Ee(t),e,r)}var mr=function(e,t){var r=v(e);return vt(function(e,t){r(e[0],t)},t,1)},vr=function(e,t){var r=mr(e,t);return r.push=function(e,t,n){if(null==n&&(n=q),"function"!=typeof n)throw new Error("task callback must be a function");if(r.started=!0,$(e)||(e=[e]),0===e.length)return l(function(){r.drain()});t=t||0;for(var i=r._tasks.head;i&&t>=i.priority;)i=i.next;for(var o=0,a=e.length;on?1:0}je(e,function(e,t){n(e,function(r,n){if(r)return t(r);t(null,{value:e,criteria:n})})},function(e,t){if(e)return r(e);r(null,Ke(t.sort(i),Zt("value")))})}function Nr(e,t,r){var n=v(e);return a(function(i,o){var a,s=!1;i.push(function(){s||(o.apply(null,arguments),clearTimeout(a))}),a=setTimeout(function(){var t=e.name||"anonymous",n=new Error('Callback function "'+t+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r),s=!0,o(n)},t),n.apply(null,i)})}var Rr=Math.ceil,Lr=Math.max;function Or(e,t,r,n){var i=v(r);Ce(function(e,t,r,n){for(var i=-1,o=Lr(Rr((t-e)/(r||1)),0),a=Array(o);o--;)a[n?o:++i]=e,e+=r;return a}(0,e,1),t,i,n)}var Dr=ke(Or,1/0),Fr=ke(Or,1);function qr(e,t,r,n){arguments.length<=3&&(n=r,r=t,t=$(e)?[]:{}),n=H(n||q);var i=v(r);Ie(e,function(e,r,n){i(t,e,r,n)},function(e){n(e,t)})}function Hr(e,t){var r,n=null;t=t||q,Kt(e,function(e,t){v(e)(function(e,o){r=arguments.length>2?i(arguments,1):o,n=e,t(!e)})},function(){t(n,r)})}function zr(e){return function(){return(e.unmemoized||e).apply(null,arguments)}}function Kr(e,t,r){r=Ae(r||q);var n=v(t);if(!e())return r(null);var o=function(t){if(t)return r(t);if(e())return n(o);var a=i(arguments,1);r.apply(null,[null].concat(a))};n(o)}function Vr(e,t,r){Kr(function(){return!e.apply(this,arguments)},t,r)}var Gr=function(e,t){if(t=H(t||q),!$(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(t){var n=v(e[r++]);t.push(Ae(o)),n.apply(null,t)}function o(o){if(o||r===e.length)return t.apply(null,arguments);n(i(arguments,1))}n([])},Wr={apply:o,applyEach:Be,applyEachSeries:Re,asyncify:d,auto:ze,autoInject:bt,cargo:gt,compose:Et,concat:St,concatLimit:kt,concatSeries:Mt,constant:It,detect:Bt,detectLimit:Pt,detectSeries:Ct,dir:Rt,doDuring:Lt,doUntil:Dt,doWhilst:Ot,during:Ft,each:Ht,eachLimit:zt,eachOf:Ie,eachOfLimit:xe,eachOfSeries:wt,eachSeries:Kt,ensureAsync:Vt,every:Wt,everyLimit:Yt,everySeries:Xt,filter:er,filterLimit:tr,filterSeries:rr,forever:nr,groupBy:or,groupByLimit:ir,groupBySeries:ar,log:sr,map:je,mapLimit:Ce,mapSeries:Ne,mapValues:cr,mapValuesLimit:ur,mapValuesSeries:fr,memoize:lr,nextTick:dr,parallel:br,parallelLimit:yr,priorityQueue:vr,queue:mr,race:gr,reduce:_t,reduceRight:wr,reflect:_r,reflectAll:Ar,reject:xr,rejectLimit:kr,rejectSeries:Sr,retry:Ir,retryable:Tr,seq:At,series:Ur,setImmediate:l,some:jr,someLimit:Br,someSeries:Pr,sortBy:Cr,timeout:Nr,times:Dr,timesLimit:Or,timesSeries:Fr,transform:qr,tryEach:Hr,unmemoize:zr,until:Vr,waterfall:Gr,whilst:Kr,all:Wt,allLimit:Yt,allSeries:Xt,any:jr,anyLimit:Br,anySeries:Pr,find:Bt,findLimit:Pt,findSeries:Ct,forEach:Ht,forEachSeries:Kt,forEachLimit:zt,forEachOf:Ie,forEachOfSeries:wt,forEachOfLimit:xe,inject:_t,foldl:_t,foldr:wr,select:er,selectLimit:tr,selectSeries:rr,wrapSync:d};r.default=Wr,r.apply=o,r.applyEach=Be,r.applyEachSeries=Re,r.asyncify=d,r.auto=ze,r.autoInject=bt,r.cargo=gt,r.compose=Et,r.concat=St,r.concatLimit=kt,r.concatSeries=Mt,r.constant=It,r.detect=Bt,r.detectLimit=Pt,r.detectSeries=Ct,r.dir=Rt,r.doDuring=Lt,r.doUntil=Dt,r.doWhilst=Ot,r.during=Ft,r.each=Ht,r.eachLimit=zt,r.eachOf=Ie,r.eachOfLimit=xe,r.eachOfSeries=wt,r.eachSeries=Kt,r.ensureAsync=Vt,r.every=Wt,r.everyLimit=Yt,r.everySeries=Xt,r.filter=er,r.filterLimit=tr,r.filterSeries=rr,r.forever=nr,r.groupBy=or,r.groupByLimit=ir,r.groupBySeries=ar,r.log=sr,r.map=je,r.mapLimit=Ce,r.mapSeries=Ne,r.mapValues=cr,r.mapValuesLimit=ur,r.mapValuesSeries=fr,r.memoize=lr,r.nextTick=dr,r.parallel=br,r.parallelLimit=yr,r.priorityQueue=vr,r.queue=mr,r.race=gr,r.reduce=_t,r.reduceRight=wr,r.reflect=_r,r.reflectAll=Ar,r.reject=xr,r.rejectLimit=kr,r.rejectSeries=Sr,r.retry=Ir,r.retryable=Tr,r.seq=At,r.series=Ur,r.setImmediate=l,r.some=jr,r.someLimit=Br,r.someSeries=Pr,r.sortBy=Cr,r.timeout=Nr,r.times=Dr,r.timesLimit=Or,r.timesSeries=Fr,r.transform=qr,r.tryEach=Hr,r.unmemoize=zr,r.until=Vr,r.waterfall=Gr,r.whilst=Kr,r.all=Wt,r.allLimit=Yt,r.allSeries=Xt,r.any=jr,r.anyLimit=Br,r.anySeries=Pr,r.find=Bt,r.findLimit=Pt,r.findSeries=Ct,r.forEach=Ht,r.forEachSeries=Kt,r.forEachLimit=zt,r.forEachOf=Ie,r.forEachOfSeries=wt,r.forEachOfLimit=xe,r.inject=_t,r.foldl=_t,r.foldr=wr,r.select=er,r.selectLimit=tr,r.selectSeries=rr,r.wrapSync=d,Object.defineProperty(r,"__esModule",{value:!0})})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:257}],22:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t,r,a){(0,n.default)(t)(e,(0,i.default)((0,o.default)(r)),a)};var n=a(e("./internal/eachOfLimit")),i=a(e("./internal/withoutIndex")),o=a(e("./internal/wrapAsync"));function a(e){return e&&e.__esModule?e:{default:e}}t.exports=r.default},{"./internal/eachOfLimit":29,"./internal/withoutIndex":39,"./internal/wrapAsync":40}],23:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t,r){((0,n.default)(e)?l:d)(e,(0,f.default)(t),r)};var n=h(e("lodash/isArrayLike")),i=h(e("./internal/breakLoop")),o=h(e("./eachOfLimit")),a=h(e("./internal/doLimit")),s=h(e("lodash/noop")),u=h(e("./internal/once")),c=h(e("./internal/onlyOnce")),f=h(e("./internal/wrapAsync"));function h(e){return e&&e.__esModule?e:{default:e}}function l(e,t,r){r=(0,u.default)(r||s.default);var n=0,o=0,a=e.length;function f(e,t){e?r(e):++o!==a&&t!==i.default||r(null)}for(0===a&&r(null);n2&&(n=(0,o.default)(arguments,1)),s[t]=n,r(e)})},function(e){r(e,s)})};var n=s(e("lodash/noop")),i=s(e("lodash/isArrayLike")),o=s(e("./slice")),a=s(e("./wrapAsync"));function s(e){return e&&e.__esModule?e:{default:e}}t.exports=r.default},{"./slice":38,"./wrapAsync":40,"lodash/isArrayLike":221,"lodash/noop":229}],37:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.hasNextTick=r.hasSetImmediate=void 0,r.fallback=c,r.wrap=f;var n,i=e("./slice"),o=(n=i)&&n.__esModule?n:{default:n};var a,s=r.hasSetImmediate="function"==typeof setImmediate&&setImmediate,u=r.hasNextTick="object"==typeof t&&"function"==typeof t.nextTick;function c(e){setTimeout(e,0)}function f(e){return function(t){var r=(0,o.default)(arguments,1);e(function(){t.apply(null,r)})}}a=s?setImmediate:u?t.nextTick:c,r.default=f(a)}).call(this,e("_process"))},{"./slice":38,_process:257}],38:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){t|=0;for(var r=Math.max(e.length-t,0),n=Array(r),i=0;i0,"Expected a maximum number of retry greater than 0 but got %s.",e),this.maxNumberOfRetry_=e},o.prototype.backoff=function(e){i.checkState(-1===this.timeoutID_,"Backoff in progress."),this.backoffNumber_===this.maxNumberOfRetry_?(this.emit("fail",e),this.reset()):(this.backoffDelay_=this.backoffStrategy_.next(),this.timeoutID_=setTimeout(this.handlers.backoff,this.backoffDelay_),this.emit("backoff",this.backoffNumber_,this.backoffDelay_,e))},o.prototype.onBackoff_=function(){this.timeoutID_=-1,this.emit("ready",this.backoffNumber_,this.backoffDelay_),this.backoffNumber_++},o.prototype.reset=function(){this.backoffNumber_=0,this.backoffStrategy_.reset(),clearTimeout(this.timeoutID_),this.timeoutID_=-1},t.exports=o},{events:157,precond:253,util:333}],47:[function(e,t,r){var n=e("events"),i=e("precond"),o=e("util"),a=e("./backoff"),s=e("./strategy/fibonacci");function u(e,t,r){n.EventEmitter.call(this),i.checkIsFunction(e,"Expected fn to be a function."),i.checkIsArray(t,"Expected args to be an array."),i.checkIsFunction(r,"Expected callback to be a function."),this.function_=e,this.arguments_=t,this.callback_=r,this.lastResult_=[],this.numRetries_=0,this.backoff_=null,this.strategy_=null,this.failAfter_=-1,this.retryPredicate_=u.DEFAULT_RETRY_PREDICATE_,this.state_=u.State_.PENDING}o.inherits(u,n.EventEmitter),u.State_={PENDING:0,RUNNING:1,COMPLETED:2,ABORTED:3},u.DEFAULT_RETRY_PREDICATE_=function(e){return!0},u.prototype.isPending=function(){return this.state_==u.State_.PENDING},u.prototype.isRunning=function(){return this.state_==u.State_.RUNNING},u.prototype.isCompleted=function(){return this.state_==u.State_.COMPLETED},u.prototype.isAborted=function(){return this.state_==u.State_.ABORTED},u.prototype.setStrategy=function(e){return i.checkState(this.isPending(),"FunctionCall in progress."),this.strategy_=e,this},u.prototype.retryIf=function(e){return i.checkState(this.isPending(),"FunctionCall in progress."),this.retryPredicate_=e,this},u.prototype.getLastResult=function(){return this.lastResult_.concat()},u.prototype.getNumRetries=function(){return this.numRetries_},u.prototype.failAfter=function(e){return i.checkState(this.isPending(),"FunctionCall in progress."),this.failAfter_=e,this},u.prototype.abort=function(){this.isCompleted()||this.isAborted()||(this.isRunning()&&this.backoff_.reset(),this.state_=u.State_.ABORTED,this.lastResult_=[new Error("Backoff aborted.")],this.emit("abort"),this.doCallback_())},u.prototype.start=function(e){i.checkState(!this.isAborted(),"FunctionCall is aborted."),i.checkState(this.isPending(),"FunctionCall already started.");var t=this.strategy_||new s;this.backoff_=e?e(t):new a(t),this.backoff_.on("ready",this.doCall_.bind(this,!0)),this.backoff_.on("fail",this.doCallback_.bind(this)),this.backoff_.on("backoff",this.handleBackoff_.bind(this)),this.failAfter_>0&&this.backoff_.failAfter(this.failAfter_),this.state_=u.State_.RUNNING,this.doCall_(!1)},u.prototype.doCall_=function(e){e&&this.numRetries_++;var t=["call"].concat(this.arguments_);n.EventEmitter.prototype.emit.apply(this,t);var r=this.handleFunctionCallback_.bind(this);this.function_.apply(null,this.arguments_.concat(r))},u.prototype.doCallback_=function(){this.callback_.apply(null,this.lastResult_)},u.prototype.handleFunctionCallback_=function(){if(!this.isAborted()){var e=Array.prototype.slice.call(arguments);this.lastResult_=e,n.EventEmitter.prototype.emit.apply(this,["callback"].concat(e));var t=e[0];t&&this.retryPredicate_(t)?this.backoff_.backoff(t):(this.state_=u.State_.COMPLETED,this.doCallback_())}},u.prototype.handleBackoff_=function(e,t,r){this.emit("backoff",e,t,r)},t.exports=u},{"./backoff":46,"./strategy/fibonacci":49,events:157,precond:253,util:333}],48:[function(e,t,r){var n=e("util"),i=e("precond"),o=e("./strategy");function a(e){o.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay(),this.factor_=a.DEFAULT_FACTOR,e&&void 0!==e.factor&&(i.checkArgument(e.factor>1,"Exponential factor should be greater than 1 but got %s.",e.factor),this.factor_=e.factor)}n.inherits(a,o),a.DEFAULT_FACTOR=2,a.prototype.next_=function(){return this.backoffDelay_=Math.min(this.nextBackoffDelay_,this.getMaxDelay()),this.nextBackoffDelay_=this.backoffDelay_*this.factor_,this.backoffDelay_},a.prototype.reset_=function(){this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()},t.exports=a},{"./strategy":50,precond:253,util:333}],49:[function(e,t,r){var n=e("util"),i=e("./strategy");function o(e){i.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}n.inherits(o,i),o.prototype.next_=function(){var e=Math.min(this.nextBackoffDelay_,this.getMaxDelay());return this.nextBackoffDelay_+=this.backoffDelay_,this.backoffDelay_=e,e},o.prototype.reset_=function(){this.nextBackoffDelay_=this.getInitialDelay(),this.backoffDelay_=0},t.exports=o},{"./strategy":50,util:333}],50:[function(e,t,r){e("events"),e("util");function n(e){return null!=e}function i(e){if(n((e=e||{}).initialDelay)&&e.initialDelay<1)throw new Error("The initial timeout must be greater than 0.");if(n(e.maxDelay)&&e.maxDelay<1)throw new Error("The maximal timeout must be greater than 0.");if(this.initialDelay_=e.initialDelay||100,this.maxDelay_=e.maxDelay||1e4,this.maxDelay_<=this.initialDelay_)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");if(n(e.randomisationFactor)&&(e.randomisationFactor<0||e.randomisationFactor>1))throw new Error("The randomisation factor must be between 0 and 1.");this.randomisationFactor_=e.randomisationFactor||0}i.prototype.getMaxDelay=function(){return this.maxDelay_},i.prototype.getInitialDelay=function(){return this.initialDelay_},i.prototype.next=function(){var e=this.next_(),t=1+Math.random()*this.randomisationFactor_;return Math.round(e*t)},i.prototype.next_=function(){throw new Error("BackoffStrategy.next_() unimplemented.")},i.prototype.reset=function(){this.reset_()},i.prototype.reset_=function(){throw new Error("BackoffStrategy.reset_() unimplemented.")},t.exports=i},{events:157,util:333}],51:[function(e,t,r){"use strict";r.byteLength=function(e){return 3*e.length/4-c(e)},r.toByteArray=function(e){var t,r,n,a,s,u=e.length;a=c(e),s=new o(3*u/4-a),r=a>0?u-4:u;var f=0;for(t=0;t>16&255,s[f++]=n>>8&255,s[f++]=255&n;2===a?(n=i[e.charCodeAt(t)]<<2|i[e.charCodeAt(t+1)]>>4,s[f++]=255&n):1===a&&(n=i[e.charCodeAt(t)]<<10|i[e.charCodeAt(t+1)]<<4|i[e.charCodeAt(t+2)]>>2,s[f++]=n>>8&255,s[f++]=255&n);return s},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o="",a=[],s=0,u=r-i;su?u:s+16383));1===i?(t=e[r-1],o+=n[t>>2],o+=n[t<<4&63],o+="=="):2===i&&(t=(e[r-2]<<8)+e[r-1],o+=n[t>>10],o+=n[t>>4&63],o+=n[t<<2&63],o+="=");return a.push(o),a.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function f(e,t,r){for(var i,o,a=[],s=t;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],52:[function(e,t,r){var n=e("safe-buffer").Buffer;t.exports={check:function(e){if(e.length<8)return!1;if(e.length>72)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-2)return!1;if(2!==e[2])return!1;var t=e[3];if(0===t)return!1;if(5+t>=e.length)return!1;if(2!==e[4+t])return!1;var r=e[5+t];return!(0===r||6+t+r!==e.length||128&e[4]||t>1&&0===e[4]&&!(128&e[5])||128&e[t+6]||r>1&&0===e[t+6]&&!(128&e[t+7]))},decode:function(e){if(e.length<8)throw new Error("DER sequence length is too short");if(e.length>72)throw new Error("DER sequence length is too long");if(48!==e[0])throw new Error("Expected DER sequence");if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid");if(2!==e[2])throw new Error("Expected DER integer");var t=e[3];if(0===t)throw new Error("R length is zero");if(5+t>=e.length)throw new Error("R length is too long");if(2!==e[4+t])throw new Error("Expected DER integer (2)");var r=e[5+t];if(0===r)throw new Error("S length is zero");if(6+t+r!==e.length)throw new Error("S length is invalid");if(128&e[4])throw new Error("R value is negative");if(t>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded");if(128&e[t+6])throw new Error("S value is negative");if(r>1&&0===e[t+6]&&!(128&e[t+7]))throw new Error("S value excessively padded");return{r:e.slice(4,4+t),s:e.slice(6+t)}},encode:function(e,t){var r=e.length,i=t.length;if(0===r)throw new Error("R length is zero");if(0===i)throw new Error("S length is zero");if(r>33)throw new Error("R length is too long");if(i>33)throw new Error("S length is too long");if(128&e[0])throw new Error("R value is negative");if(128&t[0])throw new Error("S value is negative");if(r>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded");if(i>1&&0===t[0]&&!(128&t[1]))throw new Error("S value excessively padded");var o=n.allocUnsafe(6+r+i);return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=e.length,e.copy(o,4),o[4+r]=2,o[5+r]=t.length,t.copy(o,6+r),o}}},{"safe-buffer":290}],53:[function(e,t,r){!function(t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof t?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;try{a=e("buffer").Buffer}catch(e){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+h)/67108864|0,h=67108863&a}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?b+r:c[l-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,b=d>>>13,y=0|a[2],m=8191&y,v=y>>>13,g=0|a[3],w=8191&g,_=g>>>13,A=0|a[4],E=8191&A,x=A>>>13,k=0|a[5],S=8191&k,M=k>>>13,I=0|a[6],T=8191&I,U=I>>>13,j=0|a[7],B=8191&j,P=j>>>13,C=0|a[8],N=8191&C,R=C>>>13,L=0|a[9],O=8191&L,D=L>>>13,F=0|s[0],q=8191&F,H=F>>>13,z=0|s[1],K=8191&z,V=z>>>13,G=0|s[2],W=8191&G,Y=G>>>13,X=0|s[3],Z=8191&X,J=X>>>13,$=0|s[4],Q=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,be=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,H))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,H))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,H))+Math.imul(b,q)|0,o=Math.imul(b,H);var me=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,q),i=(i=Math.imul(m,H))+Math.imul(v,q)|0,o=Math.imul(v,H),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0;var ve=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,W)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,H))+Math.imul(_,q)|0,o=Math.imul(_,H),n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0;var ge=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(l,Z)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,H))+Math.imul(x,q)|0,o=Math.imul(x,H),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Y)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,H))+Math.imul(M,q)|0,o=Math.imul(M,H),n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,H))+Math.imul(U,q)|0,o=Math.imul(U,H),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Ae=(c+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ae)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,H))+Math.imul(P,q)|0,o=Math.imul(P,H),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(U,K)|0,o=o+Math.imul(U,V)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Ee=(c+(n=n+Math.imul(h,ue)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,H))+Math.imul(R,q)|0,o=Math.imul(R,H),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,V)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Y)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0;var xe=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,le)|0)+Math.imul(l,he)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,H))+Math.imul(D,q)|0,o=Math.imul(D,H),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(U,Z)|0,o=o+Math.imul(U,J)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,le)|0;var ke=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,be)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(O,K),i=(i=Math.imul(O,V))+Math.imul(D,K)|0,o=Math.imul(D,V),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(m,he)|0,i=(i=i+Math.imul(m,le)|0)+Math.imul(v,he)|0,o=o+Math.imul(v,le)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(O,W),i=(i=Math.imul(O,Y))+Math.imul(D,W)|0,o=Math.imul(D,Y),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(U,re)|0,o=o+Math.imul(U,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,le)|0;var Me=(c+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(O,Z),i=(i=Math.imul(O,J))+Math.imul(D,Z)|0,o=Math.imul(D,J),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(U,oe)|0,o=o+Math.imul(U,ae)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(E,he)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,le)|0;var Ie=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(O,Q),i=(i=Math.imul(O,ee))+Math.imul(D,Q)|0,o=Math.imul(D,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(U,ue)|0,o=o+Math.imul(U,ce)|0,n=n+Math.imul(S,he)|0,i=(i=i+Math.imul(S,le)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,le)|0;var Te=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(O,re),i=(i=Math.imul(O,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(T,he)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(U,he)|0,o=o+Math.imul(U,le)|0;var Ue=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,be)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,be)|0)+(i>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(O,oe),i=(i=Math.imul(O,ae))+Math.imul(D,oe)|0,o=Math.imul(D,ae),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(B,he)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(P,he)|0,o=o+Math.imul(P,le)|0;var je=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(U,pe)|0))<<13)|0;c=((o=o+Math.imul(U,be)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(O,ue),i=(i=Math.imul(O,ce))+Math.imul(D,ue)|0,o=Math.imul(D,ce),n=n+Math.imul(N,he)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(R,he)|0,o=o+Math.imul(R,le)|0;var Be=(c+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,be)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,be)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(O,he),i=(i=Math.imul(O,le))+Math.imul(D,he)|0,o=Math.imul(D,le);var Pe=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,be)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ce=(c+(n=Math.imul(O,pe))|0)+((8191&(i=(i=Math.imul(O,be))+Math.imul(D,pe)|0))<<13)|0;return c=((o=Math.imul(D,be))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,u[0]=ye,u[1]=me,u[2]=ve,u[3]=ge,u[4]=we,u[5]=_e,u[6]=Ae,u[7]=Ee,u[8]=xe,u[9]=ke,u[10]=Se,u[11]=Me,u[12]=Ie,u[13]=Te,u[14]=Ue,u[15]=je,u[16]=Be,u[17]=Pe,u[18]=Ce,0!==c&&(u[19]=c,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(d=l),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):r<63?l(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=t.clone();!t.isZero();){for(var l=0,d=1;0==(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function g(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(v,m),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new g;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var b=d,y=0;0!==b.cmp(s);y++)b=b.redSqr();n(y=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,A),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:55}],54:[function(e,t,r){var n;function i(e){this.rand=e}if(t.exports=function(e){return n||(n=new i(null)),n.generate(e)},t.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^f[p>>>16&255]^h[b>>>8&255]^l[255&y]^t[m++],a=c[p>>>24]^f[b>>>16&255]^h[y>>>8&255]^l[255&d]^t[m++],s=c[b>>>24]^f[y>>>16&255]^h[d>>>8&255]^l[255&p]^t[m++],u=c[y>>>24]^f[d>>>16&255]^h[p>>>8&255]^l[255&b]^t[m++],d=o,p=a,b=s,y=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&y])^t[m++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[y>>>8&255]<<8|n[255&d])^t[m++],s=(n[b>>>24]<<24|n[y>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[m++],u=(n[y>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^t[m++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var f=e[a],h=e[f],l=e[h],d=257*e[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*l^65537*h^257*f^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=f^e[e[e[l^f]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],f=0;f>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},{"safe-buffer":290}],57:[function(e,t,r){var n=e("./aes"),i=e("safe-buffer").Buffer,o=e("cipher-base"),a=e("inherits"),s=e("./ghash"),u=e("buffer-xor"),c=e("./incr32");function f(e,t,r,a){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var f=this._cipher.encryptBlock(u);this._ghash=new s(f),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),o=t.length,a=o%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var u=8*o,f=i.alloc(8);f.writeUIntBE(u,0,8),n.update(f),e._finID=n.state;var h=i.from(e._finID);return c(h),h}(this,r,f),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(f,o),f.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return l(e,n.key,n.iv)},r.createDecipheriv=l},{"./aes":56,"./authCipher":57,"./modes":69,"./streamCipher":72,"cipher-base":86,evp_bytestokey:158,inherits:180,"safe-buffer":290}],60:[function(e,t,r){var n=e("./modes"),i=e("./authCipher"),o=e("safe-buffer").Buffer,a=e("./streamCipher"),s=e("cipher-base"),u=e("./aes"),c=e("evp_bytestokey");function f(e,t,r){s.call(this),this._cache=new l,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}e("inherits")(f,s),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var h=o.alloc(16,16);function l(){this.cache=o.allocUnsafe(0)}function d(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new f(s.module,t,r)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=o.concat([this.cache,e])},l.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},t.exports=a},{"safe-buffer":290}],62:[function(e,t,r){t.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},{}],63:[function(e,t,r){var n=e("buffer-xor");r.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},{"buffer-xor":83}],64:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("buffer-xor");function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}r.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)]);break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},{"buffer-xor":83,"safe-buffer":290}],65:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(e,t,r){for(var n,i,a=-1,s=0;++a<8;)n=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}r.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new n(i(t));return r}t.exports=o,o.getr=a}).call(this,e("buffer").Buffer)},{"bn.js":53,buffer:84,randombytes:270}],77:[function(e,t,r){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":78}],78:[function(e,t,r){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],79:[function(e,t,r){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],80:[function(e,t,r){(function(r){var n=e("create-hash"),i=e("stream"),o=e("inherits"),a=e("./sign"),s=e("./verify"),u=e("./algorithms.json");function c(e){i.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){i.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new c(e)}function l(e){return new f(e)}Object.keys(u).forEach(function(e){u[e].id=new r(u[e].id,"hex"),u[e.toLowerCase()]=u[e]}),o(c,i.Writable),c.prototype._write=function(e,t,r){this._hash.update(e),r()},c.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},c.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=a(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},o(f,i.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},f.prototype.verify=function(e,t,n){"string"==typeof t&&(t=new r(t,n)),this.end();var i=this._hash.digest();return s(t,i,e,this._signType,this._tag)},t.exports={Sign:h,Verify:l,createSign:h,createVerify:l}}).call(this,e("buffer").Buffer)},{"./algorithms.json":78,"./sign":81,"./verify":82,buffer:84,"create-hash":91,inherits:180,stream:311}],81:[function(e,t,r){(function(r){var n=e("create-hmac"),i=e("browserify-rsa"),o=e("elliptic").ec,a=e("bn.js"),s=e("parse-asn1"),u=e("./curves.json");function c(e,t,i,o){if((e=new r(e.toArray())).length0&&r.ishrn(n),r}function h(e,t,i){var o,a;do{for(o=new r(0);8*o.length=t)throw new Error("invalid sig")}t.exports=function(e,t,u,c,f){var h=o(u);if("ec"===h.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var o=new i(n),s=r.data.subjectPrivateKey.data;return o.verify(t,e,s)}(e,t,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var i=r.data.p,a=r.data.q,u=r.data.g,c=r.data.pub_key,f=o.signature.decode(e,"der"),h=f.s,l=f.r;s(h,a),s(l,a);var d=n.mont(i),p=h.invm(a);return 0===u.toRed(d).redPow(new n(t).mul(p).mod(a)).fromRed().mul(c.toRed(d).redPow(l.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(l)}(e,t,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=r.concat([f,t]);for(var l=h.modulus.byteLength(),d=[1],p=0;t.length+d.length+2o)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(e)}return u(e,t,r)}function u(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return F(e)?function(e,t,r){if(t<0||e.byteLength=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if(q(e)||F(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return O(e).length;default:if(n)return L(e).length;t=(""+t).toLowerCase(),n=!0}}function p(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var h=!0,l=0;li&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,h=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=h}return function(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},s.prototype.compare=function(e,t,r,n,i){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),u=Math.min(o,a),c=this.slice(n,i),f=e.slice(t,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":return g(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function S(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function B(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(e,t,r,n,o){return t=+t,r>>>=0,o||B(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function C(e,t,r,n,o){return t=+t,r>>>=0,o||B(e,0,r,8),i.write(e,t,r,n,52,8),r+8}s.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||U(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||U(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||U(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||U(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||U(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||U(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||U(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||U(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||U(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||U(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||U(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||U(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||U(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return C(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return C(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function O(e){return n.toByteArray(function(e){if((e=e.trim().replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function F(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function q(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function H(e){return e!=e}},{"base64-js":51,ieee754:178}],85:[function(e,t,r){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],86:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("stream").Transform,o=e("string_decoder").StringDecoder;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},t.exports=a},{inherits:180,"safe-buffer":290,stream:311,string_decoder:317}],87:[function(e,t,r){(function(e){var r=function(){"use strict";function t(e,t){return null!=t&&e instanceof t}var r,n,i;try{r=Map}catch(e){r=function(){}}try{n=Set}catch(e){n=function(){}}try{i=Promise}catch(e){i=function(){}}function o(a,u,c,f,h){"object"==typeof u&&(c=u.depth,f=u.prototype,h=u.includeNonEnumerable,u=u.circular);var l=[],d=[],p=void 0!==e;return void 0===u&&(u=!0),void 0===c&&(c=1/0),function a(c,b){if(null===c)return null;if(0===b)return c;var y,m;if("object"!=typeof c)return c;if(t(c,r))y=new r;else if(t(c,n))y=new n;else if(t(c,i))y=new i(function(e,t){c.then(function(t){e(a(t,b-1))},function(e){t(a(e,b-1))})});else if(o.__isArray(c))y=[];else if(o.__isRegExp(c))y=new RegExp(c.source,s(c)),c.lastIndex&&(y.lastIndex=c.lastIndex);else if(o.__isDate(c))y=new Date(c.getTime());else{if(p&&e.isBuffer(c))return y=e.allocUnsafe?e.allocUnsafe(c.length):new e(c.length),c.copy(y),y;t(c,Error)?y=Object.create(c):void 0===f?(m=Object.getPrototypeOf(c),y=Object.create(m)):(y=Object.create(f),m=f)}if(u){var v=l.indexOf(c);if(-1!=v)return d[v];l.push(c),d.push(y)}for(var g in t(c,r)&&c.forEach(function(e,t){var r=a(t,b-1),n=a(e,b-1);y.set(r,n)}),t(c,n)&&c.forEach(function(e){var t=a(e,b-1);y.add(t)}),c){var w;m&&(w=Object.getOwnPropertyDescriptor(m,g)),w&&null==w.set||(y[g]=a(c[g],b-1))}if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(c);for(g=0;g<_.length;g++){var A=_[g];(!(x=Object.getOwnPropertyDescriptor(c,A))||x.enumerable||h)&&(y[A]=a(c[A],b-1),x.enumerable||Object.defineProperty(y,A,{enumerable:!1}))}}if(h){var E=Object.getOwnPropertyNames(c);for(g=0;g>>2),a=0,s=0;a>5]|=128<>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,h=0;h>>32-s,r);var a,s}function a(e,t,r,n,i,a,s){return o(t&r|~t&n,e,t,i,a,s)}function s(e,t,r,n,i,a,s){return o(t&n|r&~n,e,t,i,a,s)}function u(e,t,r,n,i,a,s){return o(t^r^n,e,t,i,a,s)}function c(e,t,r,n,i,a,s){return o(r^(t|~n),e,t,i,a,s)}function f(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}t.exports=function(e){return n(e,i)}},{"./make-hash":92}],94:[function(e,t,r){"use strict";var n=e("inherits"),i=e("./legacy"),o=e("cipher-base"),a=e("safe-buffer").Buffer,s=e("create-hash/md5"),u=e("ripemd160"),c=e("sha.js"),f=a.alloc(128);function h(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new u:c(e)).update(t).digest():t.lengths?t=e(t):t.length-1};f.prototype.append=function(e,t){e=s(e),t=u(t);var r=this.map[e];this.map[e]=r?r+","+t:t},f.prototype.delete=function(e){delete this.map[s(e)]},f.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},f.prototype.set=function(e,t){this.map[s(e)]=u(t)},f.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},f.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),c(e)},f.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),c(e)},f.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),c(e)},t.iterable&&(f.prototype[Symbol.iterator]=f.prototype.entries);var o=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},b.call(y.prototype),b.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var a=[301,302,303,307,308];v.redirect=function(e,t){if(-1===a.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.Headers=f,e.Request=y,e.Response=v,e.fetch=function(e,r){return new Promise(function(n,i){var o=new y(e,r),a=new XMLHttpRequest;a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}}),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;n(new v(i,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&t.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(r[Symbol.iterator]=function(){return r}),r}function f(e){this.map={},e instanceof f?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function l(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function d(e){var t=new FileReader,r=l(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(t.arrayBuffer&&t.blob&&n(e))this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!t.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!i(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=p(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,r,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=l(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function m(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}}(void 0!==e?e:this)}).call(n,void 0);var i=n.fetch;i.Response=n.Response,i.Request=n.Request,i.Headers=n.Headers;"object"==typeof t&&t.exports&&(t.exports=i,t.exports.default=i)},{}],97:[function(e,t,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes"),r.createHash=r.Hash=e("create-hash"),r.createHmac=r.Hmac=e("create-hmac");var n=e("browserify-sign/algos"),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);r.getHashes=function(){return o};var a=e("pbkdf2");r.pbkdf2=a.pbkdf2,r.pbkdf2Sync=a.pbkdf2Sync;var s=e("browserify-cipher");r.Cipher=s.Cipher,r.createCipher=s.createCipher,r.Cipheriv=s.Cipheriv,r.createCipheriv=s.createCipheriv,r.Decipher=s.Decipher,r.createDecipher=s.createDecipher,r.Decipheriv=s.Decipheriv,r.createDecipheriv=s.createDecipheriv,r.getCiphers=s.getCiphers,r.listCiphers=s.listCiphers;var u=e("diffie-hellman");r.DiffieHellmanGroup=u.DiffieHellmanGroup,r.createDiffieHellmanGroup=u.createDiffieHellmanGroup,r.getDiffieHellman=u.getDiffieHellman,r.createDiffieHellman=u.createDiffieHellman,r.DiffieHellman=u.DiffieHellman;var c=e("browserify-sign");r.createSign=c.createSign,r.Sign=c.Sign,r.createVerify=c.createVerify,r.Verify=c.Verify,r.createECDH=e("create-ecdh");var f=e("public-encrypt");r.publicEncrypt=f.publicEncrypt,r.privateEncrypt=f.privateEncrypt,r.publicDecrypt=f.publicDecrypt,r.privateDecrypt=f.privateDecrypt;var h=e("randomfill");r.randomFill=h.randomFill,r.randomFillSync=h.randomFillSync,r.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},r.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":73,"browserify-sign":80,"browserify-sign/algos":77,"create-ecdh":90,"create-hash":91,"create-hmac":94,"diffie-hellman":105,pbkdf2:247,"public-encrypt":259,randombytes:270,randomfill:271}],98:[function(e,t,r){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function o(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],o(r),o(n))}function a(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(n),r=1;r0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=a.r28shl(r,s),i=a.r28shl(i,s),a.pc2(r,i,e.keys,o)}},u.prototype._update=function(e,t,r,n){var i=this._desState,o=a.readUInt32BE(e,t),s=a.readUInt32BE(e,t+4);a.ip(o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,s,i.tmp,0):this._decrypt(i,o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],a.writeUInt32BE(r,o,n),a.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,o=l}a.rip(s,o,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var o=r,s=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],f=e.keys[u+1];a.expand(o,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var h=a.substitute(c,f),l=o;o=(s^a.permute(h))>>>0,s=l}a.rip(o,s,n,i)}},{"../des":99,inherits:180,"minimalistic-assert":234}],103:[function(e,t,r){"use strict";var n=e("minimalistic-assert"),i=e("inherits"),o=e("../des"),a=o.Cipher,s=o.DES;function u(e){a.call(this,e);var t=new function(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}(this.type,this.options.key);this._edeState=t}i(u,a),t.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},{"../des":99,inherits:180,"minimalistic-assert":234}],104:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},r.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,i){for(var o=0,a=0,s=n.length>>>1,u=0;u>>n[u]&1;for(u=s;u>>n[u]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},r.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r>>o[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var n=e.toString(2);n.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(f).cmp(h);)r.iadd(d)}else for(;r.mod(o).cmp(l);)r.iadd(d);if(y(p=r.shrn(1))&&y(r)&&m(p)&&m(r)&&a.test(p)&&a.test(r))return r}}},{"bn.js":53,"miller-rabin":233,randombytes:270}],108:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],109:[function(e,t,r){"use strict";var n=r;n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":124,"./elliptic/curve":112,"./elliptic/curves":115,"./elliptic/ec":116,"./elliptic/eddsa":119,"./elliptic/utils":123,brorand:54}],110:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("../../elliptic").utils,o=i.getNAF,a=i.getJSF,s=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1),i=(1<=u;t--)c=(c<<1)+n[t];a.push(c)}for(var f=this.jpoint(null,null,null),h=this.jpoint(null,null,null),l=i;l>0;l--){for(u=0;u=0;c--){for(t=0;c>=0&&0===a[c];c--)t++;if(c>=0&&t++,u=u.dblp(t),c<0)break;var f=a[c];s(0!==f),u="affine"===e.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,f=0,h=0;h=1;h-=2){var d=h-1,p=h;if(1===s[d]&&1===s[p]){var b=[t[d],null,null,t[p]];0===t[d].y.cmp(t[p].y)?(b[1]=t[d].add(t[p]),b[2]=t[d].toJ().mixedAdd(t[p].neg())):0===t[d].y.cmp(t[p].y.redNeg())?(b[1]=t[d].toJ().mixedAdd(t[p]),b[2]=t[d].add(t[p].neg())):(b[1]=t[d].toJ().mixedAdd(t[p]),b[2]=t[d].toJ().mixedAdd(t[p].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],m=a(r[d],r[p]);f=Math.max(m[0].length,f),c[d]=new Array(f),c[p]=new Array(f);for(var v=0;v=0;h--){for(var E=0;h>=0;){var x=!0;for(v=0;v=0&&E++,_=_.dblp(E),h<0)break;for(v=0;v0?k=u[v][S-1>>1]:S<0&&(k=u[v][-S-1>>1].neg()),_="affine"===k.type?_.mixedAdd(k):_.add(k))}}for(h=0;h=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),h=a.redMul(o);return this.curve.point(u,c,h,f)},f.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(c=this.curve._mulA(i)).redAdd(o);if(this.zOne)e=n.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),t=a.redMul(c.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),u=a.redSub(s).redISub(s);e=n.redSub(i).redISub(o).redMul(u),t=a.redMul(c.redSub(o)),r=a.redMul(u)}}else{var c=i.redAdd(o);s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=c.redSub(s).redSub(s);e=this.curve._mulC(n.redISub(c)).redMul(u),t=this.curve._mulC(c).redMul(i.redISub(o)),r=c.redMul(u)}return this.curve.point(e,t,r)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),f=s.redMul(u),h=o.redMul(u),l=a.redMul(s);return this.curve.point(c,f,l,h)},f.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),h=n.redMul(u).redMul(f);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(h,t,r)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},f.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},{"../../elliptic":109,"../curve":112,"bn.js":53,inherits:180}],112:[function(e,t,r){"use strict";var n=r;n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":110,"./edwards":111,"./mont":113,"./short":114}],113:[function(e,t,r){"use strict";var n=e("../curve"),i=e("bn.js"),o=e("inherits"),a=n.base,s=e("../../elliptic").utils;function u(e){a.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){a.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(u,a),t.exports=u,u.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},o(c,a.BasePoint),u.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},u.prototype.point=function(e,t){return new c(this,e,t)},u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":109,"../curve":112,"bn.js":53,inherits:180}],114:[function(e,t,r){"use strict";var n=e("../curve"),i=e("../../elliptic"),o=e("bn.js"),a=e("inherits"),s=n.base,u=i.utils.assert;function c(e){s.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function h(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(r,16),this.z=new o(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}a(c,s),t.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new o(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new o(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],u(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new o(e.a,16),b:new o(e.b,16)}}):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:o.mont(e),r=new o(2).toRed(t).redInvm(),n=r.redNeg(),i=new o(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,i,a,s,u,c,f,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,d=this.n.clone(),p=new o(1),b=new o(0),y=new o(0),m=new o(1),v=0;0!==l.cmpn(0);){var g=d.div(l);c=d.sub(g.mul(l)),f=y.sub(g.mul(p));var w=m.sub(g.mul(b));if(!n&&c.cmp(h)<0)t=u.neg(),r=p,n=c.neg(),i=f;else if(n&&2==++v)break;u=c,d=l,l=c,y=p,p=f,m=b,b=w}a=c.neg(),s=f;var _=n.sqr().add(i.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a:a,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},c.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},f.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new o(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},f.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},f.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(h,s.BasePoint),c.prototype.jpoint=function(e,t,r){return new h(this,e,t,r)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),h=n.redMul(c),l=u.redSqr().redIAdd(f).redISub(h).redISub(h),d=u.redMul(h.redISub(l)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,d,p)},h.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),h=s.redSqr().redIAdd(c).redISub(f).redISub(f),l=s.redMul(f.redISub(h)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(h,l,d)},h.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":109,"../curve":112,"bn.js":53,inherits:180}],115:[function(e,t,r){"use strict";var n,i=r,o=e("hash.js"),a=e("../elliptic"),s=a.utils.assert;function u(e){"short"===e.type?this.curve=new a.curve.short(e):"edwards"===e.type?this.curve=new a.curve.edwards(e):this.curve=new a.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=e("./precomputed/secp256k1")}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"../elliptic":109,"./precomputed/secp256k1":122,"hash.js":162}],116:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("hmac-drbg"),o=e("../../elliptic"),a=o.utils.assert,s=e("./key"),u=e("./signature");function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(a(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}t.exports=c,c.prototype.keyPair=function(e){return new s(this,e)},c.prototype.keyFromPrivate=function(e,t){return s.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return s.fromPublic(this,e,t)},c.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new n(2));;){var s=new n(t.generate(r));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},c.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},c.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),f=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new n(1)),l=0;;l++){var d=o.k?o.k(l):new n(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(h)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var b=p.getX(),y=b.umod(this.n);if(0!==y.cmpn(0)){var m=d.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==b.cmp(y)?2:0);return o.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),v^=1),new u({r:y,s:m,recoveryParam:v})}}}}}},c.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),f=c.mul(e).umod(this.n),h=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(f,r.getPublic(),h)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(f,r.getPublic(),h)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(e,t,r,i){a((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,s=new n(e),c=t.r,f=t.s,h=1&r,l=r>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");c=l?this.curve.pointFromX(c.add(this.curve.n),h):this.curve.pointFromX(c,h);var d=t.r.invm(o),p=o.sub(s).mul(d).umod(o),b=f.mul(d).umod(o);return this.g.mulAdd(p,c,b)},c.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":109,"./key":117,"./signature":118,"bn.js":53,"hmac-drbg":174}],117:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("../../elliptic").utils.assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}t.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},{"../../elliptic":109,"bn.js":53}],118:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("../../elliptic").utils,o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,a=t.place;o>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}t.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new function(){this.place=0};if(48!==e[r.place++])return!1;if(s(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=s(e,r),a=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var u=s(e,r);if(e.length!==u+r.place)return!1;var c=e.slice(r.place,u+r.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new n(a),this.s=new n(c),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var o=n.concat(r),a=[48];return c(a,o.length),a=a.concat(o),i.encode(a,e)}},{"../../elliptic":109,"bn.js":53}],119:[function(e,t,r){"use strict";var n=e("hash.js"),i=e("../../elliptic"),o=i.utils,a=o.assert,s=o.parseBytes,u=e("./key"),c=e("./signature");function f(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}t.exports=f,f.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=0;){var o;if(i.isOdd()){var a=i.andln(n-1);o=a>(n>>1)-1?(n>>1)-a:a,i.isubn(o)}else o=0;r.push(o);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,u=1;u0||t.cmpn(-i)>0;){var o,a,s,u=e.andln(3)+n&3,c=t.andln(3)+i&3;3===u&&(u=-1),3===c&&(c=-1),o=0==(1&u)?0:3!=(s=e.andln(7)+n&7)&&5!==s||2!==c?u:-u,r[0].push(o),a=0==(1&c)?0:3!=(s=t.andln(7)+i&7)&&5!==s||2!==u?c:-c,r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},{"bn.js":53,"minimalistic-assert":234,"minimalistic-crypto-utils":235}],124:[function(e,t,r){t.exports={_from:"elliptic@^6.0.0",_id:"elliptic@6.4.0",_inBundle:!1,_integrity:"sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.0.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.0.0",saveSpec:null,fetchSpec:"^6.0.0"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_spec:"elliptic@^6.0.0",_where:"/Users/alexvlasov/Blockchain/web3swift_jsproxy/node_modules/browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],125:[function(e,t,r){"use strict";const n=e("ethjs-util");function i(e){let t=n.stripHexPrefix(e);for(;"0"===t[0];)t=t.substr(1);return`0x${t}`}t.exports={incrementHexNumber:function(e){return i(n.intToHex(parseInt(e,16)+1))},formatHex:i}},{"ethjs-util":155}],126:[function(e,t,r){const n=e("eth-query"),i=e("events"),o=e("pify"),a=e("./hexUtils"),s=a.incrementHexNumber,u=1e3,c=60*u;t.exports=class extends i{constructor(e={}){if(super(),!e.provider)throw new Error("RpcBlockTracker - no provider specified.");this._provider=e.provider,this._query=new n(e.provider),this._pollingInterval=e.pollingInterval||4*u,this._syncingTimeout=e.syncingTimeout||1*c,this._trackingBlock=null,this._trackingBlockTimestamp=null,this._currentBlock=null,this._isRunning=!1,this._performSync=this._performSync.bind(this),this._handleNewBlockNotification=this._handleNewBlockNotification.bind(this)}getTrackingBlock(){return this._trackingBlock}getCurrentBlock(){return this._currentBlock}async awaitCurrentBlock(){return this._currentBlock?this._currentBlock:(await new Promise(e=>this.once("latest",e)),this._currentBlock)}async start(e={}){this._isRunning||(this._isRunning=!0,e.fromBlock?await this._setTrackingBlock(await this._fetchBlockByNumber(e.fromBlock)):await this._setTrackingBlock(await this._fetchLatestBlock()),this._provider.on?await this._initSubscription():this._performSync().catch(e=>{e&&console.error(e)}))}async stop(){this._isRunning=!1,this._provider.on&&await this._removeSubscription()}async _setTrackingBlock(e){if(this._trackingBlock&&this._trackingBlock.hash===e.hash)return;const t=this._trackingBlockTimestamp,r=Date.now();t&&r-t>this._syncingTimeout?(this._trackingBlockTimestamp=null,await this._warpToLatest()):(this._trackingBlock=e,this._trackingBlockTimestamp=r,this.emit("block",e))}async _setCurrentBlock(e){if(this._currentBlock&&this._currentBlock.hash===e.hash)return;const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{newBlock:e,oldBlock:t})}async _warpToLatest(){await this._setTrackingBlock(await this._fetchLatestBlock())}async _pollForNextBlock(){setTimeout(()=>this._performSync(),this._pollingInterval)}async _performSync(){if(!this._isRunning)return;const e=this.getTrackingBlock();if(!e)throw new Error("RpcBlockTracker - tracking block is missing");const t=s(e.number);try{const r=await this._fetchBlockByNumber(t);r?(await this._setTrackingBlock(r),this._performSync()):(await this._setCurrentBlock(e),this._pollForNextBlock())}catch(t){t.message.includes("index out of range")||t.message.includes("Couldn't find block by reference")?(await this._setCurrentBlock(e),this._pollForNextBlock()):(console.error(t),this._pollForNextBlock())}}async _handleNewBlockNotification(e,t){t.id==this._subscriptionId&&(e&&(this.emit("error",e),await this._removeSubscription()),await this._setTrackingBlock(await this._fetchBlockByNumber(t.result.number)))}async _initSubscription(){this._provider.on("data",this._handleNewBlockNotification);let e=await o(this._provider.sendAsync||this._provider.send)({jsonrpc:"2.0",id:(new Date).getTime(),method:"eth_subscribe",params:["newHeads"]});this._subscriptionId=e.result}async _removeSubscription(){if(!this._subscriptionId)throw new Error("Not subscribed.");this._provider.removeListener("data",this._handleNewBlockNotification),await o(this._provider.sendAsync||this._provider.send)({jsonrpc:"2.0",id:(new Date).getTime(),method:"eth_unsubscribe",params:[this._subscriptionId]}),delete this._subscriptionId}_fetchLatestBlock(){return o(this._query.getBlockByNumber).call(this._query,"latest",!0)}_fetchBlockByNumber(e){const t=a.formatHex(e);return o(this._query.getBlockByNumber).call(this._query,t,!0)}}},{"./hexUtils":125,"eth-query":135,events:157,pify:252}],127:[function(e,t,r){(function(t){var n=e("js-sha3").keccak_256,i=e("idna-uts46-hx");function o(e){return e?i.toUnicode(e,{useStd3ASCII:!0,transitional:!1}):e}r.hash=function(e){for(var r="",i=0;i<32;i++)r+="00";if(name=o(e),name){var a=name.split(".");for(i=a.length-1;i>=0;i--){var s=n(a[i]);r=n(new t(r+s,"hex"))}}return"0x"+r},r.normalize=o}).call(this,e("buffer").Buffer)},{buffer:84,"idna-uts46-hx":177,"js-sha3":128}],128:[function(e,t,r){(function(e,r){!function(){"use strict";var n="object"==typeof window?window:{};!n.JS_SHA3_NO_NODE_JS&&"object"==typeof e&&e.versions&&e.versions.node&&(n=r);for(var i=!n.JS_SHA3_NO_COMMON_JS&&"object"==typeof t&&t.exports,o="0123456789abcdef".split(""),a=[0,8,16,24],s=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],u=[224,256,384,512],c=["hex","buffer","arrayBuffer","array"],f=function(e,t,r){return function(n){return new _(e,t,e).update(n)[r]()}},h=function(e,t,r){return function(n,i){return new _(e,t,i).update(n)[r]()}},l=function(e,t){var r=f(e,t,"hex");r.create=function(){return new _(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}_.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,o=this.blocks,s=this.byteCount,u=this.blockCount,c=0,f=this.s;c>2]|=e[c]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(o[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=s){for(this.start=r-s,this.block=o[u],r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+o[15&e]+o[e>>12&15]+o[e>>8&15]+o[e>>20&15]+o[e>>16&15]+o[e>>28&15]+o[e>>24&15];s%t==0&&(A(r),a=0)}return i&&(e=r[a],i>0&&(u+=o[e>>4&15]+o[15&e]),i>1&&(u+=o[e>>12&15]+o[e>>8&15]),i>2&&(u+=o[e>>20&15]+o[e>>16&15])),u},_.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&A(n)}return o&&(e=s<<2,t=n[a],o>0&&(u[e]=255&t),o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u};var A=function(e){var t,r,n,i,o,a,u,c,f,h,l,d,p,b,y,m,v,g,w,_,A,E,x,k,S,M,I,T,U,j,B,P,C,N,R,L,O,D,F,q,H,z,K,V,G,W,Y,X,Z,J,$,Q,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],h=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|f>>>31),r=o^(f<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(h<<1|l>>>31),r=u^(l<<1|h>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|p>>>31),r=f^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=h^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,U=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,R=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,j=e[33]<<13|e[32]>>>19,B=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,O=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,A=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,V=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,M=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,x=e[49]<<14|e[48]>>>18,e[0]=b^~m&g,e[1]=y^~v&w,e[10]=k^~M&T,e[11]=S^~I&U,e[20]=N^~L&D,e[21]=R^~O&F,e[30]=V^~W&X,e[31]=G^~Y&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=m^~g&_,e[3]=v^~w&A,e[12]=M^~T&j,e[13]=I^~U&B,e[22]=L^~D&q,e[23]=O^~F&H,e[32]=W^~X&J,e[33]=Y^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=g^~_&E,e[5]=w^~A&x,e[14]=T^~j&P,e[15]=U^~B&C,e[24]=D^~q&z,e[25]=F^~H&K,e[34]=X^~J&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=_^~E&b,e[7]=A^~x&y,e[16]=j^~P&k,e[17]=B^~C&S,e[26]=q^~z&N,e[27]=H^~K&R,e[36]=J^~Q&V,e[37]=$^~ee&G,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=E^~b&m,e[9]=x^~y&v,e[18]=P^~k&M,e[19]=C^~S&I,e[28]=z^~N&L,e[29]=K^~R&O,e[38]=Q^~V&W,e[39]=ee^~G&Y,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=s[n],e[1]^=s[n+1]};if(i)t.exports=p;else for(y=0;y{setTimeout(t,e)})}function c(e){const t=e.toString();return s.some(e=>t.includes(e))}async function f(e,t,r){const{fetchUrl:n,fetchParams:a}=h({network:e,req:t}),s=await o(n,a),u=await s.text();if(!s.ok)switch(s.status){case 405:throw new i.MethodNotFound;case 418:throw l("Request is being rate limited.");case 503:case 504:throw function(){let e="Gateway timeout. The request took too long to process. ";return e+="This can happen when querying logs over too wide a block range.",l("Gateway timeout. The request took too long to process. This can happen when querying logs over too wide a block range.")}();default:throw l(u)}if("eth_getBlockByNumber"===t.method&&"Not Found"===u)return void(r.result=null);const c=JSON.parse(u);r.result=c.result,r.error=c.error}function h({network:e,req:t}){const r=function(e){return{id:e.id,jsonrpc:e.jsonrpc,method:e.method,params:e.params}}(t),{method:n,params:i}=r,o={};let s=`https://api.infura.io/v1/jsonrpc/${e}`;if(a.includes(n))o.method="POST",o.headers={Accept:"application/json","Content-Type":"application/json"},o.body=JSON.stringify(r);else{o.method="GET",s+=`/${n}?params=${encodeURIComponent(JSON.stringify(i))}`}return{fetchUrl:s,fetchParams:o}}function l(e){const t=new Error(e);return new i.InternalError(t)}t.exports=function(e={}){const t=e.network||"mainnet",r=e.maxAttempts||5;if(!r)throw new Error(`Invalid value for 'maxAttempts': "${r}" (${typeof r})`);return n(async(e,n,i)=>{for(let i=1;i<=r;i++)try{await f(t,e,n);break}catch(e){if(!c(e))throw e;const t=r-i;if(!t){const t=`InfuraProvider - cannot complete request. All retries exhausted.\nOriginal Error:\n${e.toString()}\n\n`,r=new Error(t);throw r}await u(1e3)}})},t.exports.fetchConfigFromReq=h},{"cross-fetch":96,"json-rpc-engine/src/createAsyncMiddleware":187,"json-rpc-error":189}],131:[function(e,t,r){t.exports=function(e){return{sendAsync:e.handle.bind(e)}}},{}],132:[function(e,t,r){var n=function(e,t){for(var r=[],n=0;n>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},{"./array.js":132}],134:[function(e,t,r){var n="0123456789abcdef".split(""),i=[1,256,65536,16777216],o=[0,8,16,24],a=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],s=function(e){var t,r,n,i,o,s,u,c,f,h,l,d,p,b,y,m,v,g,w,_,A,E,x,k,S,M,I,T,U,j,B,P,C,N,R,L,O,D,F,q,H,z,K,V,G,W,Y,X,Z,J,$,Q,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],h=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|f>>>31),r=o^(f<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(h<<1|l>>>31),r=u^(l<<1|h>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|p>>>31),r=f^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=h^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,U=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,R=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,j=e[33]<<13|e[32]>>>19,B=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,O=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,A=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,V=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,M=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,x=e[49]<<14|e[48]>>>18,e[0]=b^~m&g,e[1]=y^~v&w,e[10]=k^~M&T,e[11]=S^~I&U,e[20]=N^~L&D,e[21]=R^~O&F,e[30]=V^~W&X,e[31]=G^~Y&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=m^~g&_,e[3]=v^~w&A,e[12]=M^~T&j,e[13]=I^~U&B,e[22]=L^~D&q,e[23]=O^~F&H,e[32]=W^~X&J,e[33]=Y^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=g^~_&E,e[5]=w^~A&x,e[14]=T^~j&P,e[15]=U^~B&C,e[24]=D^~q&z,e[25]=F^~H&K,e[34]=X^~J&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=_^~E&b,e[7]=A^~x&y,e[16]=j^~P&k,e[17]=B^~C&S,e[26]=q^~z&N,e[27]=H^~K&R,e[36]=J^~Q&V,e[37]=$^~ee&G,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=E^~b&m,e[9]=x^~y&v,e[18]=P^~k&M,e[19]=C^~S&I,e[28]=z^~N&L,e[29]=K^~R&O,e[38]=Q^~V&W,e[39]=ee^~G&Y,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=a[n],e[1]^=a[n+1]},u=function(e){return function(t){var r;if("0x"===t.slice(0,2)){r=[];for(var a=2,u=t.length;a>2]|=t[d]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|63&r)<=57344?(u[y>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<=c){for(e.start=y-c,e.block=u[f],y=0;y>2]|=i[3&y],e.lastByteIndex===c)for(u[0]=u[f],y=1;y>4&15]+n[15&p]+n[p>>12&15]+n[p>>8&15]+n[p>>20&15]+n[p>>16&15]+n[p>>28&15]+n[p>>24&15];m%f==0&&(s(l),y=0)}return"0x"+b}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),r)}};t.exports={keccak256:u(256),keccak512:u(512),keccak256s:u(256),keccak512s:u(512)}},{}],135:[function(e,t,r){const n=e("xtend"),i=e("json-rpc-random-id")();function o(e){this.currentProvider=e}function a(e){return function(){var t=[].slice.call(arguments),r=t.pop();this.sendAsync({method:e,params:t},r)}}function s(e,t){return function(){var r=[].slice.call(arguments),n=r.pop();r.lengtho)throw new Error("Elements exceed array size: "+o);for(d in h=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof t&&(t=JSON.parse(t)),t)h.push(l(e,t[d]));if("dynamic"===o){var p=l("uint256",t.length);h.unshift(p)}return r.concat(h)}if("bytes"===e)return t=new r(t),h=r.concat([l("uint256",t.length),t]),t.length%32!=0&&(h=r.concat([h,n.zeros(32-t.length%32)])),h;if(e.startsWith("bytes")){if((o=s(e))<1||o>32)throw new Error("Invalid bytes width: "+o);return n.setLengthRight(t,32)}if(e.startsWith("uint")){if((o=s(e))%8||o<8||o>256)throw new Error("Invalid uint width: "+o);if((a=f(t)).bitLength()>o)throw new Error("Supplied uint exceeds width: "+o+" vs "+a.bitLength());if(a<0)throw new Error("Supplied uint is negative");return a.toArrayLike(r,"be",32)}if(e.startsWith("int")){if((o=s(e))%8||o<8||o>256)throw new Error("Invalid int width: "+o);if((a=f(t)).bitLength()>o)throw new Error("Supplied int exceeds width: "+o+" vs "+a.bitLength());return a.toTwos(256).toArrayLike(r,"be",32)}if(e.startsWith("ufixed")){if(o=u(e),(a=f(t))<0)throw new Error("Supplied ufixed is negative");return l("uint256",a.mul(new i(2).pow(new i(o[1]))))}if(e.startsWith("fixed"))return o=u(e),l("int256",f(t).mul(new i(2).pow(new i(o[1]))));throw new Error("Unsupported or invalid type: "+e)}function d(e,t,n){var o,a,s,u;if("string"==typeof e&&(e=p(e)),"address"===e.name)return d(e.rawType,t,n).toArrayLike(r,"be",20).toString("hex");if("bool"===e.name)return d(e.rawType,t,n).toString()===new i(1).toString();if("string"===e.name){var c=d(e.rawType,t,n);return new r(c,"utf8").toString()}if(e.isArray){for(s=[],o=e.size,"dynamic"===e.size&&(o=d("uint256",t,n=d("uint256",t,n).toNumber()).toNumber(),n+=32),u=0;ue.size)throw new Error("Decoded int exceeds width: "+e.size+" vs "+a.bitLength());return a}if(e.name.startsWith("int")){if((a=new i(t.slice(n,n+32),16,"be").fromTwos(256)).bitLength()>e.size)throw new Error("Decoded uint exceeds width: "+e.size+" vs "+a.bitLength());return a}if(e.name.startsWith("ufixed")){if(o=new i(2).pow(new i(e.size[1])),!(a=d("uint256",t,n)).mod(o).isZero())throw new Error("Decimals not supported yet");return a.div(o)}if(e.name.startsWith("fixed")){if(o=new i(2).pow(new i(e.size[1])),!(a=d("int256",t,n)).mod(o).isZero())throw new Error("Decimals not supported yet");return a.div(o)}throw new Error("Unsupported or invalid type: "+e.name)}function p(e){var t,r,n;if(y(e)){t=c(e);var i=e.slice(0,e.lastIndexOf("["));return i=p(i),r={isArray:!0,name:e,size:t,memoryUsage:"dynamic"===t?32:i.memoryUsage*t,subArray:i}}switch(e){case"address":n="uint160";break;case"bool":n="uint8";break;case"string":n="bytes"}if(r={rawType:n,name:e,memoryUsage:32},e.startsWith("bytes")&&"bytes"!==e||e.startsWith("uint")||e.startsWith("int")?r.size=s(e):(e.startsWith("ufixed")||e.startsWith("fixed"))&&(r.size=u(e)),e.startsWith("bytes")&&"bytes"!==e&&(r.size<1||r.size>32))throw new Error("Invalid bytes width: "+r.size);if((e.startsWith("uint")||e.startsWith("int"))&&(r.size%8||r.size<8||r.size>256))throw new Error("Invalid int/uint width: "+r.size);return r}function b(e){return"string"===e||"bytes"===e||"dynamic"===c(e)}function y(e){return e.lastIndexOf("]")===e.length-1}function m(e,t){return e.startsWith("address")||e.startsWith("bytes")?"0x"+t.toString("hex"):t.toString()}o.eventID=function(e,t){var i=e+"("+t.map(a).join(",")+")";return n.sha3(new r(i))},o.methodID=function(e,t){return o.eventID(e,t).slice(0,4)},o.rawEncode=function(e,t){var n=[],i=[],o=0;e.forEach(function(e){if(y(e)){var t=c(e);o+="dynamic"!==t?32*t:32}else o+=32});for(var s=0;s32)throw new Error("Invalid bytes width: "+i);u.push(n.setLengthRight(l,i))}else if(h.startsWith("uint")){if((i=s(h))%8||i<8||i>256)throw new Error("Invalid uint width: "+i);if((o=f(l)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+o.bitLength());u.push(o.toArrayLike(r,"be",i/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((i=s(h))%8||i<8||i>256)throw new Error("Invalid int width: "+i);if((o=f(l)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+o.bitLength());u.push(o.toTwos(i).toArrayLike(r,"be",i/8))}}return r.concat(u)},o.soliditySHA3=function(e,t){return n.sha3(o.solidityPack(e,t))},o.soliditySHA256=function(e,t){return n.sha256(o.solidityPack(e,t))},o.solidityRIPEMD160=function(e,t){return n.ripemd160(o.solidityPack(e,t),!0)},o.fromSerpent=function(e){for(var t,r=[],n=0;n="0"&&t<="9");)o+=e[a]-"0",a++;n=a-1,r.push(o)}else if("i"===i)r.push("int256");else{if("a"!==i)throw new Error("Unsupported or invalid type: "+i);r.push("int256[]")}}return r},o.toSerpent=function(e){for(var t=[],r=0;r0){var r=this.raw.slice();this.v=this._chainId,this.r=0,this.s=0,t=this.raw,this.raw=r}else t=this.raw.slice(0,6);return n.rlphash(t)},e.prototype.getChainId=function(){return this._chainId},e.prototype.getSenderAddress=function(){if(this._from)return this._from;var e=this.getSenderPublicKey();return this._from=n.publicToAddress(e),this._from},e.prototype.getSenderPublicKey=function(){if(!(this._senderPubKey&&this._senderPubKey.length||this.verifySignature()))throw new Error("Invalid Signature");return this._senderPubKey},e.prototype.verifySignature=function(){var e=this.hash(!1);if(this._homestead&&1===new o(this.s).cmp(a))return!1;try{var t=n.bufferToInt(this.v);this._chainId>0&&(t-=2*this._chainId+8),this._senderPubKey=n.ecrecover(e,t,this.r,this.s)}catch(e){return!1}return!!this._senderPubKey},e.prototype.sign=function(e){var t=this.hash(!1),r=n.ecsign(t,e);this._chainId>0&&(r.v+=2*this._chainId+8),Object.assign(this,r)},e.prototype.getDataFee=function(){for(var e=this.raw[5],t=new o(0),r=0;r0&&t.push(["gas limit is too low. Need at least "+this.getBaseFee()]),void 0===e||!1===e?0===t.length:t.join(" ")},e}();t.exports=s}).call(this,e("buffer").Buffer)},{buffer:84,"ethereum-common/params.json":137,"ethereumjs-util":141}],141:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("keccak"),o=e("secp256k1"),a=e("assert"),s=e("rlp"),u=e("bn.js"),c=e("create-hash"),f=e("safe-buffer").Buffer;Object.assign(r,e("ethjs-util")),r.MAX_INTEGER=new u("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),r.TWO_POW256=new u("10000000000000000000000000000000000000000000000000000000000000000",16),r.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",r.SHA3_NULL_S=r.KECCAK256_NULL_S,r.KECCAK256_NULL=f.from(r.KECCAK256_NULL_S,"hex"),r.SHA3_NULL=r.KECCAK256_NULL,r.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",r.SHA3_RLP_ARRAY_S=r.KECCAK256_RLP_ARRAY_S,r.KECCAK256_RLP_ARRAY=f.from(r.KECCAK256_RLP_ARRAY_S,"hex"),r.SHA3_RLP_ARRAY=r.KECCAK256_RLP_ARRAY,r.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",r.SHA3_RLP_S=r.KECCAK256_RLP_S,r.KECCAK256_RLP=f.from(r.KECCAK256_RLP_S,"hex"),r.SHA3_RLP=r.KECCAK256_RLP,r.BN=u,r.rlp=s,r.secp256k1=o,r.zeros=function(e){return f.allocUnsafe(e).fill(0)},r.zeroAddress=function(){var e=r.zeros(20);return r.bufferToHex(e)},r.setLengthLeft=r.setLength=function(e,t,n){var i=r.zeros(t);return e=r.toBuffer(e),n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},r.toBuffer=function(e){if(!f.isBuffer(e))if(Array.isArray(e))e=f.from(e);else if("string"==typeof e)e=r.isHexString(e)?f.from(r.padToEven(r.stripHexPrefix(e)),"hex"):f.from(e);else if("number"==typeof e)e=r.intToBuffer(e);else if(null==e)e=f.allocUnsafe(0);else if(u.isBN(e))e=e.toArrayLike(f);else{if(!e.toArray)throw new Error("invalid type");e=f.from(e.toArray())}return e},r.bufferToInt=function(e){return new u(r.toBuffer(e)).toNumber()},r.bufferToHex=function(e){return"0x"+(e=r.toBuffer(e)).toString("hex")},r.fromSigned=function(e){return new u(e).fromTwos(256)},r.toUnsigned=function(e){return f.from(e.toTwos(256).toArray())},r.keccak=function(e,t){return e=r.toBuffer(e),t||(t=256),i("keccak"+t).update(e).digest()},r.keccak256=function(e){return r.keccak(e)},r.sha3=r.keccak,r.sha256=function(e){return e=r.toBuffer(e),c("sha256").update(e).digest()},r.ripemd160=function(e,t){e=r.toBuffer(e);var n=c("rmd160").update(e).digest();return!0===t?r.setLength(n,32):n},r.rlphash=function(e){return r.keccak(s.encode(e))},r.isValidPrivate=function(e){return o.privateKeyVerify(e)},r.isValidPublic=function(e,t){return 64===e.length?o.publicKeyVerify(f.concat([f.from([4]),e])):!!t&&o.publicKeyVerify(e)},r.pubToAddress=r.publicToAddress=function(e,t){return e=r.toBuffer(e),t&&64!==e.length&&(e=o.publicKeyConvert(e,!1).slice(1)),a(64===e.length),r.keccak(e).slice(-20)};var h=r.privateToPublic=function(e){return e=r.toBuffer(e),o.publicKeyCreate(e,!1).slice(1)};r.importPublic=function(e){return 64!==(e=r.toBuffer(e)).length&&(e=o.publicKeyConvert(e,!1).slice(1)),e},r.ecsign=function(e,t){var r=o.sign(e,t),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},r.hashPersonalMessage=function(e){var t=r.toBuffer("Ethereum Signed Message:\n"+e.length.toString());return r.keccak(f.concat([t,e]))},r.ecrecover=function(e,t,n,i){var a=f.concat([r.setLength(n,32),r.setLength(i,32)],64),s=t-27;if(0!==s&&1!==s)throw new Error("Invalid signature v value");var u=o.recover(e,a,s);return o.publicKeyConvert(u,!1).slice(1)},r.toRpcSig=function(e,t,n){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return r.bufferToHex(f.concat([r.setLengthLeft(t,32),r.setLengthLeft(n,32),r.toBuffer(e-27)]))},r.fromRpcSig=function(e){if(65!==(e=r.toBuffer(e)).length)throw new Error("Invalid signature length");var t=e[64];return t<27&&(t+=27),{v:t,r:e.slice(0,32),s:e.slice(32,64)}},r.privateToAddress=function(e){return r.publicToAddress(h(e))},r.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},r.isZeroAddress=function(e){return r.zeroAddress()===r.addHexPrefix(e)},r.toChecksumAddress=function(e){e=r.stripHexPrefix(e).toLowerCase();for(var t=r.keccak(e).toString("hex"),n="0x",i=0;i=8?n+=e[i].toUpperCase():n+=e[i];return n},r.isValidChecksumAddress=function(e){return r.isValidAddress(e)&&r.toChecksumAddress(e)===e},r.generateAddress=function(e,t){return e=r.toBuffer(e),t=(t=new u(t)).isZero()?null:f.from(t.toArray()),r.rlphash([e,t]).slice(-20)},r.isPrecompiled=function(e){var t=r.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},r.addHexPrefix=function(e){return"string"!=typeof e?e:r.isHexPrefixed(e)?e:"0x"+e},r.isValidSignature=function(e,t,r,n){var i=new u("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new u("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===r.length&&((27===e||28===e)&&(t=new u(t),r=new u(r),!(t.isZero()||t.gt(o)||r.isZero()||r.gt(o))&&(!1!==n||1!==new u(r).cmp(i))))},r.baToJSON=function(e){if(f.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var t=[],n=0;n=i.length,"The field "+t.name+" must not have more "+t.length+" bytes")):t.allowZero&&0===i.length||!t.length||a(t.length===i.length,"The field "+t.name+" must have byte length of "+t.length),e.raw[n]=i}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:i,set:o}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:o,get:i})}),i)if("string"==typeof i&&(i=f.from(r.stripHexPrefix(i),"hex")),f.isBuffer(i)&&(i=s.decode(i)),Array.isArray(i)){if(i.length>e._fields.length)throw new Error("wrong number of fields in data");i.forEach(function(t,n){e[e._fields[n]]=r.toBuffer(t)})}else{if("object"!==(void 0===i?"undefined":n(i)))throw new Error("invalid data");var o=Object.keys(i);t.forEach(function(t){-1!==o.indexOf(t.name)&&(e[t.name]=i[t.name]),-1!==o.indexOf(t.alias)&&(e[t.alias]=i[t.alias])})}}},{assert:19,"bn.js":53,"create-hash":91,"ethjs-util":155,keccak:195,rlp:289,"safe-buffer":290,secp256k1:295}],142:[function(e,t,r){arguments[4][128][0].apply(r,arguments)},{_process:257,dup:128}],143:[function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(r,"__esModule",{value:!0});var a=e("./address"),s=e("./bignumber"),u=e("./bytes"),c=e("./utf8"),f=e("./properties"),h=o(e("./errors")),l=new RegExp(/^bytes([0-9]*)$/),d=new RegExp(/^(u?int)([0-9]*)$/),p=new RegExp(/^(.*)\[([0-9]*)\]$/);r.defaultCoerceFunc=function(e,t){var r=e.match(d);return r&&parseInt(r[2])<=48?t.toNumber():t};var b=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"),y=new RegExp("^[A-Za-z_][A-Za-z0-9_]*$");function m(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}function v(e,t){function r(t){throw new Error('unexpected character "'+e[t]+'" at position '+t+' in "'+e+'"')}for(var n={type:"",name:"",state:{allowType:!0}},i=n,o=0;o1){var i=r[1].match(b);if(""!=i[1].trim()||""!=i[3].trim())throw new Error("unexpected tokens");L(i[2]).forEach(function(e){t.outputs.push(v(e))})}return t}(e.trim()));throw new Error("unknown signature")};var w=function(){return function(e,t,r,n,i){this.coerceFunc=e,this.name=t,this.type=r,this.localName=n,this.dynamic=i}}(),_=function(e){function t(t){var r=e.call(this,t.coerceFunc,t.name,t.type,void 0,t.dynamic)||this;return f.defineReadOnly(r,"coder",t),r}return i(t,e),t.prototype.encode=function(e){return this.coder.encode(e)},t.prototype.decode=function(e,t){return this.coder.decode(e,t)},t}(w),A=function(e){function t(t,r){return e.call(this,t,"null","",r,!1)||this}return i(t,e),t.prototype.encode=function(e){return u.arrayify([])},t.prototype.decode=function(e,t){if(t>e.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}},t}(w),E=function(e){function t(t,r,n,i){var o=this,a=(n?"int":"uint")+8*r;return(o=e.call(this,t,a,a,i,!1)||this).size=r,o.signed=n,o}return i(t,e),t.prototype.encode=function(e){try{var t=s.bigNumberify(e);return t=t.toTwos(8*this.size).maskn(8*this.size),this.signed&&(t=t.fromTwos(8*this.size).toTwos(256)),u.padZeros(u.arrayify(t),32)}catch(t){h.throwError("invalid number value",h.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:e})}return null},t.prototype.decode=function(e,t){e.length32)throw new Error;t.set(r)}catch(t){h.throwError("invalid "+this.name+" value",h.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:t.value||e})}return t},t.prototype.decode=function(e,t){return e.length=0?n:"")+"]",s=-1===n||r.dynamic;return(o=e.call(this,t,"array",a,i,s)||this).coder=r,o.length=n,o}return i(t,e),t.prototype.encode=function(e){Array.isArray(e)||h.throwError("expected array value",h.INVALID_ARGUMENT,{arg:this.localName,coderType:"array",value:e});var t=this.length,r=new Uint8Array(0);-1===t&&(t=e.length,r=x.encode(t)),h.checkArgumentCount(t,e.length,"in coder array"+(this.localName?" "+this.localName:""));for(var n=[],i=0;i256||i%8!=0)&&h.throwError("invalid "+r[1]+" bit length",h.INVALID_ARGUMENT,{arg:"param",value:t}),new E(e,i/8,"int"===r[1],t.name);if(r=t.type.match(l))return(0===(i=parseInt(r[1]))||i>32)&&h.throwError("invalid bytes length",h.INVALID_ARGUMENT,{arg:"param",value:t}),new S(e,i,t.name);if(r=t.type.match(p)){var i=parseInt(r[2]||"-1");return(t=f.jsonCopy(t)).type=r[1],new N(e,D(e,t),i,t.name)}return"tuple"===t.type.substring(0,5)?function(e,t,r){t||(t=[]);var n=[];return t.forEach(function(t){n.push(D(e,t))}),new R(e,n,r)}(e,t.components,t.name):""===t.type?new A(e,t.name):(h.throwError("invalid type",h.INVALID_ARGUMENT,{arg:"type",value:t.type}),null)}var F=function(){function e(t){h.checkNew(this,e),t||(t=r.defaultCoerceFunc),f.defineReadOnly(this,"coerceFunc",t)}return e.prototype.encode=function(e,t){e.length!==t.length&&h.throwError("types/values length mismatch",h.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var r=[];return e.forEach(function(e){var t=null;t="string"==typeof e?v(e):e,r.push(D(this.coerceFunc,t))},this),u.hexlify(new R(this.coerceFunc,r,"_").encode(t))},e.prototype.decode=function(e,t){var r=[];return e.forEach(function(e){var t=null;t="string"==typeof e?v(e):f.jsonCopy(e),r.push(D(this.coerceFunc,t))},this),new R(this.coerceFunc,r,"_").decode(u.arrayify(t),0).value},e}();r.AbiCoder=F,r.defaultAbiCoder=new F},{"./address":144,"./bignumber":145,"./bytes":146,"./errors":147,"./properties":149,"./utf8":152}],144:[function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var i=n(e("bn.js")),o=e("./bytes"),a=e("./keccak256"),s=e("./rlp"),u=e("./errors");function c(e){"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]{40}$/)||u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:e});for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=t[n].charCodeAt(0);r=o.arrayify(a.keccak256(r));for(var i=0;i<40;i+=2)r[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&r[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}for(var f={},h=0;h<10;h++)f[String(h)]=String(h);for(h=0;h<26;h++)f[String.fromCharCode(65+h)]=String(10+h);var l,d=Math.floor((l=9007199254740991,Math.log10?Math.log10(l):Math.log(l)/Math.LN10));function p(e){e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00";var t="";for(e.split("").forEach(function(e){t+=f[e]});t.length>=d;){var r=t.substring(0,d);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function b(e){var t=null;if("string"!=typeof e&&u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:e}),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=c(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.throwError("bad address checksum",u.INVALID_ARGUMENT,{arg:"address",value:e});else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==p(e)&&u.throwError("bad icap checksum",u.INVALID_ARGUMENT,{arg:"address",value:e}),t=new i.default.BN(e.substring(4),36).toString(16);t.length<40;)t="0"+t;t=c("0x"+t)}else u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:e});return t}r.getAddress=b,r.getIcapAddress=function(e){for(var t=new i.default.BN(b(e).substring(2),16).toString(36).toUpperCase();t.length<30;)t="0"+t;return"XE"+p("XE00"+t)+t},r.getContractAddress=function(e){if(!e.from)throw new Error("missing from address");var t=e.nonce;return b("0x"+a.keccak256(s.encode([b(e.from),o.stripZeros(o.hexlify(t))])).substring(26))}},{"./bytes":146,"./errors":147,"./keccak256":148,"./rlp":150,"bn.js":53}],145:[function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(r,"__esModule",{value:!0});var s=o(e("bn.js")),u=e("./bytes"),c=e("./properties"),f=e("./types"),h=a(e("./errors")),l=new s.default.BN(-1);function d(e){var t=e.toString(16);return"-"===t[0]?t.length%2==0?"-0x0"+t.substring(1):"-0x"+t.substring(1):t.length%2==1?"0x0"+t:"0x"+t}function p(e){return m(e)._bn}function b(e){return new y(d(e))}var y=function(e){function t(r){var n=e.call(this)||this;if(h.checkNew(n,t),"string"==typeof r)u.isHexString(r)?("0x"==r&&(r="0x0"),c.defineReadOnly(n,"_hex",r)):"-"===r[0]&&u.isHexString(r.substring(1))?c.defineReadOnly(n,"_hex",r):r.match(/^-?[0-9]*$/)?(""==r&&(r="0"),c.defineReadOnly(n,"_hex",d(new s.default.BN(r)))):h.throwError("invalid BigNumber string value",h.INVALID_ARGUMENT,{arg:"value",value:r});else if("number"==typeof r){parseInt(String(r))!==r&&h.throwError("underflow",h.NUMERIC_FAULT,{operation:"setValue",fault:"underflow",value:r,outputValue:parseInt(String(r))});try{c.defineReadOnly(n,"_hex",d(new s.default.BN(r)))}catch(e){h.throwError("overflow",h.NUMERIC_FAULT,{operation:"setValue",fault:"overflow",details:e.message})}}else r instanceof t?c.defineReadOnly(n,"_hex",r._hex):r.toHexString?c.defineReadOnly(n,"_hex",d(p(r.toHexString()))):u.isArrayish(r)?c.defineReadOnly(n,"_hex",d(new s.default.BN(u.hexlify(r).substring(2),16))):h.throwError("invalid BigNumber value",h.INVALID_ARGUMENT,{arg:"value",value:r});return n}return i(t,e),Object.defineProperty(t.prototype,"_bn",{get:function(){return"-"===this._hex[0]?new s.default.BN(this._hex.substring(3),16).mul(l):new s.default.BN(this._hex.substring(2),16)},enumerable:!0,configurable:!0}),t.prototype.fromTwos=function(e){return b(this._bn.fromTwos(e))},t.prototype.toTwos=function(e){return b(this._bn.toTwos(e))},t.prototype.add=function(e){return b(this._bn.add(p(e)))},t.prototype.sub=function(e){return b(this._bn.sub(p(e)))},t.prototype.div=function(e){return m(e).isZero()&&h.throwError("division by zero",h.NUMERIC_FAULT,{operation:"divide",fault:"division by zero"}),b(this._bn.div(p(e)))},t.prototype.mul=function(e){return b(this._bn.mul(p(e)))},t.prototype.mod=function(e){return b(this._bn.mod(p(e)))},t.prototype.pow=function(e){return b(this._bn.pow(p(e)))},t.prototype.maskn=function(e){return b(this._bn.maskn(e))},t.prototype.eq=function(e){return this._bn.eq(p(e))},t.prototype.lt=function(e){return this._bn.lt(p(e))},t.prototype.lte=function(e){return this._bn.lte(p(e))},t.prototype.gt=function(e){return this._bn.gt(p(e))},t.prototype.gte=function(e){return this._bn.gte(p(e))},t.prototype.isZero=function(){return this._bn.isZero()},t.prototype.toNumber=function(){try{return this._bn.toNumber()}catch(e){h.throwError("overflow",h.NUMERIC_FAULT,{operation:"setValue",fault:"overflow",details:e.message})}return null},t.prototype.toString=function(){return this._bn.toString(10)},t.prototype.toHexString=function(){return this._hex},t}(f.BigNumber);function m(e){return e instanceof y?e:new y(e)}r.bigNumberify=m,r.ConstantNegativeOne=m(-1),r.ConstantZero=m(0),r.ConstantOne=m(1),r.ConstantTwo=m(2),r.ConstantWeiPerEther=m("1000000000000000000")},{"./bytes":146,"./errors":147,"./properties":149,"./types":151,"bn.js":53}],146:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./errors");function i(e){return!!e._bn}function o(e){return e.slice?e:(e.slice=function(){var t=Array.prototype.slice.call(arguments);return new Uint8Array(Array.prototype.slice.apply(e,t))},e)}function a(e){if(!e||parseInt(String(e.length))!=e.length||"string"==typeof e)return!1;for(var t=0;t=256||parseInt(String(r))!=r)return!1}return!0}function s(e){if(null==e&&n.throwError("cannot convert null value to array",n.INVALID_ARGUMENT,{arg:"value",value:e}),i(e)&&(e=e.toHexString()),"string"==typeof e){var t=e.match(/^(0x)?[0-9a-fA-F]*$/);t||n.throwError("invalid hexidecimal string",n.INVALID_ARGUMENT,{arg:"value",value:e}),"0x"!==t[1]&&n.throwError("hex string must have 0x prefix",n.INVALID_ARGUMENT,{arg:"value",value:e}),(e=e.substring(2)).length%2&&(e="0"+e);for(var r=[],s=0;s>4]+f[15&u])}return"0x"+o.join("")}return n.throwError("invalid hexlify value",null,{arg:"value",value:e}),"never"}function l(e,t){for(c(e)||n.throwError("invalid hex string",n.INVALID_ARGUMENT,{arg:"value",value:e});e.length<2*t+2;)e="0x0"+e.substring(2);return e}function d(e){var t,r=0,i="0x",o="0x";if((t=e)&&null!=t.r&&null!=t.s){null==e.v&&null==e.recoveryParam&&n.throwError("at least on of recoveryParam or v must be specified",n.INVALID_ARGUMENT,{argument:"signature",value:e}),i=l(e.r,32),o=l(e.s,32),"string"==typeof(r=e.v)&&(r=parseInt(r,16));var a=e.recoveryParam;null==a&&null!=e.v&&(a=1-r%2),r=27+a}else{var u=s(e);if(65!==u.length)throw new Error("invalid signature");i=h(u.slice(0,32)),o=h(u.slice(32,64)),27!==(r=u[64])&&28!==r&&(r=27+r%2)}return{r:i,s:o,recoveryParam:r-27,v:r}}r.hexlify=h,r.hexDataLength=function(e){return c(e)&&e.length%2==0?(e.length-2)/2:null},r.hexDataSlice=function(e,t,r){return c(e)||n.throwError("invalid hex data",n.INVALID_ARGUMENT,{arg:"value",value:e}),e.length%2!=0&&n.throwError("hex data length must be even",n.INVALID_ARGUMENT,{arg:"value",value:e}),t=2+2*t,null!=r?"0x"+e.substring(t,t+2*r):"0x"+e.substring(t)},r.hexStripZeros=function(e){for(c(e)||n.throwError("invalid hex string",n.INVALID_ARGUMENT,{arg:"value",value:e});e.length>3&&"0x0"===e.substring(0,3);)e="0x"+e.substring(3);return e},r.hexZeroPad=l,r.splitSignature=d,r.joinSignature=function(e){return h(u([(e=d(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},{"./errors":147}],147:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.MISSING_NEW="MISSING_NEW",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.NUMERIC_FAULT="NUMERIC_FAULT",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION";var n=!1,i=!1;function o(e,t,n){if(i)throw new Error("unknown error");t||(t=r.UNKNOWN_ERROR),n||(n={});var o=[];Object.keys(n).forEach(function(e){try{o.push(e+"="+JSON.stringify(n[e]))}catch(t){o.push(e+"="+JSON.stringify(n[e].toString()))}});var a=e;o.length&&(e+=" ("+o.join(", ")+")");var s=new Error(e);throw s.reason=a,s.code=t,Object.keys(n).forEach(function(e){s[e]=n[e]}),s}r.throwError=o,r.checkNew=function(e,t){e instanceof t||o("missing new",r.MISSING_NEW,{name:t.name})},r.checkArgumentCount=function(e,t,n){n||(n=""),et&&o("too many arguments"+n,r.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})},r.setCensorship=function(e,t){n&&o("error censorship permanent",r.UNSUPPORTED_OPERATION,{operation:"setCersorship"}),i=!!e,n=!!t}},{}],148:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("js-sha3"),i=e("./bytes");r.keccak256=function(e){return"0x"+n.keccak_256(i.arrayify(e))}},{"./bytes":146,"js-sha3":142}],149:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.defineReadOnly=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})},r.defineFrozen=function(e,t,r){var n=JSON.stringify(r);Object.defineProperty(e,t,{enumerable:!0,get:function(){return JSON.parse(n)}})},r.resolveProperties=function(e){var t={},r=[];return Object.keys(e).forEach(function(n){var i=e[n];i instanceof Promise?r.push(i.then(function(e){return t[n]=e,null})):t[n]=i}),Promise.all(r).then(function(){return t})},r.shallowCopy=function(e){var t={};for(var r in e)t[r]=e[r];return t},r.jsonCopy=function(e){return JSON.parse(JSON.stringify(e))}},{}],150:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./bytes");function i(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function o(e,t,r){for(var n=0,i=0;it+1+n)throw new Error("invalid rlp")}return{consumed:1+n,result:i}}function s(e,t){if(0===e.length)throw new Error("invalid rlp data");if(e[t]>=248){if(t+1+(r=e[t]-247)>e.length)throw new Error("too short");if(t+1+r+(i=o(e,t+1,r))>e.length)throw new Error("to short");return a(e,t,t+1+r,r+i)}if(e[t]>=192){if(t+1+(i=e[t]-192)>e.length)throw new Error("invalid rlp data");return a(e,t,t+1,i)}if(e[t]>=184){var r;if(t+1+(r=e[t]-183)>e.length)throw new Error("invalid rlp data");if(t+1+r+(i=o(e,t+1,r))>e.length)throw new Error("invalid rlp data");return{consumed:1+r+i,result:n.hexlify(e.slice(t+1+r,t+1+r+i))}}if(e[t]>=128){var i;if(t+1+(i=e[t]-128)>e.length)throw new Error("invlaid rlp data");return{consumed:1+i,result:n.hexlify(e.slice(t+1,t+1+i))}}return{consumed:1,result:n.hexlify(e[t])}}r.encode=function(e){return n.hexlify(function e(t){if(Array.isArray(t)){var r=[];return t.forEach(function(t){r=r.concat(e(t))}),r.length<=55?(r.unshift(192+r.length),r):((o=i(r.length)).unshift(247+o.length),o.concat(r))}var o,a=Array.prototype.slice.call(n.arrayify(t));return 1===a.length&&a[0]<=127?a:a.length<=55?(a.unshift(128+a.length),a):((o=i(a.length)).unshift(183+o.length),o.concat(a))}(e))},r.decode=function(e){var t=n.arrayify(e),r=s(t,0);if(r.consumed!==t.length)throw new Error("invalid rlp data");return r.result}},{"./bytes":146}],151:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){return function(){}}();r.BigNumber=n;var i=function(){return function(){}}();r.Indexed=i;var o=function(){return function(){}}();r.MinimalProvider=o;var a=function(){return function(){}}();r.Signer=a;var s=function(){return function(){}}();r.HDNode=s},{}],152:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("./bytes");!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n=r.UnicodeNormalizationForm||(r.UnicodeNormalizationForm={})),r.toUtf8Bytes=function(e,t){void 0===t&&(t=n.current),t!=n.current&&(e=e.normalize(t));for(var r=[],o=0,a=0;a>6|192,r[o++]=63&s|128):55296==(64512&s)&&a+1>18|240,r[o++]=s>>12&63|128,r[o++]=s>>6&63|128,r[o++]=63&s|128):(r[o++]=s>>12|224,r[o++]=s>>6&63|128,r[o++]=63&s|128)}return i.arrayify(r)},r.toUtf8String=function(e){e=i.arrayify(e);for(var t="",r=0;r>7!=0){if(n>>6!=2){var o=null;if(n>>5==6)o=1;else if(n>>4==14)o=2;else if(n>>3==30)o=3;else if(n>>2==62)o=4;else{if(n>>1!=126)continue;o=5}if(r+o>e.length){for(;r>6==2;r++);if(r!=e.length)continue;return t}var a,s=n&(1<<8-o-1)-1;for(a=0;a>6!=2)break;s=s<<6|63&u}a==o?s<=65535?t+=String.fromCharCode(s):(s-=65536,t+=String.fromCharCode(55296+(s>>10&1023),56320+(1023&s))):r--}}else t+=String.fromCharCode(n)}return t}},{"./bytes":146}],153:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("number-to-bn"),o=new n(0),a=new n(-1),s={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function u(e){var t=e?e.toLowerCase():"ether",r=s[t];if("string"!=typeof r)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(s,null,2));return new n(r,10)}function c(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"==typeof e&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+typeof e+".")}t.exports={unitMap:s,numberToString:c,getValueOfUnit:u,fromWei:function(e,t,r){var n=i(e),c=n.lt(o),f=u(t),h=s[t].length-1||1,l=r||{};c&&(n=n.mul(a));for(var d=n.mod(f).toString(10);d.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var l=h[0],d=h[1];if(l||(l="0"),d||(d="0"),d.length>o)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;d.length=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+h)/67108864|0,h=67108863&a}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?b+r:c[l-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,b=d>>>13,y=0|a[2],m=8191&y,v=y>>>13,g=0|a[3],w=8191&g,_=g>>>13,A=0|a[4],E=8191&A,x=A>>>13,k=0|a[5],S=8191&k,M=k>>>13,I=0|a[6],T=8191&I,U=I>>>13,j=0|a[7],B=8191&j,P=j>>>13,C=0|a[8],N=8191&C,R=C>>>13,L=0|a[9],O=8191&L,D=L>>>13,F=0|s[0],q=8191&F,H=F>>>13,z=0|s[1],K=8191&z,V=z>>>13,G=0|s[2],W=8191&G,Y=G>>>13,X=0|s[3],Z=8191&X,J=X>>>13,$=0|s[4],Q=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,be=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,H))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,H))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,H))+Math.imul(b,q)|0,o=Math.imul(b,H);var me=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,q),i=(i=Math.imul(m,H))+Math.imul(v,q)|0,o=Math.imul(v,H),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0;var ve=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,W)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,H))+Math.imul(_,q)|0,o=Math.imul(_,H),n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0;var ge=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(l,Z)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,H))+Math.imul(x,q)|0,o=Math.imul(x,H),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Y)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,H))+Math.imul(M,q)|0,o=Math.imul(M,H),n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,H))+Math.imul(U,q)|0,o=Math.imul(U,H),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Ae=(c+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ae)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,H))+Math.imul(P,q)|0,o=Math.imul(P,H),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(U,K)|0,o=o+Math.imul(U,V)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Ee=(c+(n=n+Math.imul(h,ue)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,H))+Math.imul(R,q)|0,o=Math.imul(R,H),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,V)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Y)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0;var xe=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,le)|0)+Math.imul(l,he)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,H))+Math.imul(D,q)|0,o=Math.imul(D,H),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(U,Z)|0,o=o+Math.imul(U,J)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,le)|0;var ke=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,be)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(O,K),i=(i=Math.imul(O,V))+Math.imul(D,K)|0,o=Math.imul(D,V),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(m,he)|0,i=(i=i+Math.imul(m,le)|0)+Math.imul(v,he)|0,o=o+Math.imul(v,le)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(O,W),i=(i=Math.imul(O,Y))+Math.imul(D,W)|0,o=Math.imul(D,Y),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(U,re)|0,o=o+Math.imul(U,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,le)|0;var Me=(c+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(O,Z),i=(i=Math.imul(O,J))+Math.imul(D,Z)|0,o=Math.imul(D,J),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(U,oe)|0,o=o+Math.imul(U,ae)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(E,he)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,le)|0;var Ie=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(O,Q),i=(i=Math.imul(O,ee))+Math.imul(D,Q)|0,o=Math.imul(D,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(U,ue)|0,o=o+Math.imul(U,ce)|0,n=n+Math.imul(S,he)|0,i=(i=i+Math.imul(S,le)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,le)|0;var Te=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(O,re),i=(i=Math.imul(O,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(T,he)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(U,he)|0,o=o+Math.imul(U,le)|0;var Ue=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,be)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,be)|0)+(i>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(O,oe),i=(i=Math.imul(O,ae))+Math.imul(D,oe)|0,o=Math.imul(D,ae),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(B,he)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(P,he)|0,o=o+Math.imul(P,le)|0;var je=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(U,pe)|0))<<13)|0;c=((o=o+Math.imul(U,be)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(O,ue),i=(i=Math.imul(O,ce))+Math.imul(D,ue)|0,o=Math.imul(D,ce),n=n+Math.imul(N,he)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(R,he)|0,o=o+Math.imul(R,le)|0;var Be=(c+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,be)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,be)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(O,he),i=(i=Math.imul(O,le))+Math.imul(D,he)|0,o=Math.imul(D,le);var Pe=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,be)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ce=(c+(n=Math.imul(O,pe))|0)+((8191&(i=(i=Math.imul(O,be))+Math.imul(D,pe)|0))<<13)|0;return c=((o=Math.imul(D,be))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,u[0]=ye,u[1]=me,u[2]=ve,u[3]=ge,u[4]=we,u[5]=_e,u[6]=Ae,u[7]=Ee,u[8]=xe,u[9]=ke,u[10]=Se,u[11]=Me,u[12]=Ie,u[13]=Te,u[14]=Ue,u[15]=je,u[16]=Be,u[17]=Pe,u[18]=Ce,0!==c&&(u[19]=c,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(d=l),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):r<63?l(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=t.clone();!t.isZero();){for(var l=0,d=1;0==(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function g(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(v,m),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new g;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var b=d,y=0;0!==b.cmp(s);y++)b=b.redSqr();n(y=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,A),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{}],155:[function(e,t,r){(function(r){"use strict";var n=e("is-hex-prefixed"),i=e("strip-hex-prefix");function o(e){var t=e;if("string"!=typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function a(e){return"0x"+e.toString(16)}t.exports={arrayContainsArray:function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(r)?"some":"every"](function(t){return e.indexOf(t)>=0})},intToBuffer:function(e){var t=a(e);return new r(o(t.slice(2)),"hex")},getBinarySize:function(e){if("string"!=typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return r.byteLength(e,"utf8")},isHexPrefixed:n,stripHexPrefix:i,padToEven:o,intToHex:a,fromAscii:function(e){for(var t="",r=0;r0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var r,n,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(r=this._events[e]).length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(s=a;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],158:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("md5.js");t.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var f=new i;f.update(c),f.update(e),t&&f.update(t),c=f.digest();var h=0;if(a>0){var l=s.length-a;h=Math.min(a,c.length),c.copy(s,l,0,h),a-=h}if(h0){var d=u.length-o,p=Math.min(o,c.length-h);c.copy(u,d,h,h+p),o-=p}}return c.fill(0),{key:s,iv:u}}},{"md5.js":231,"safe-buffer":290}],159:[function(e,t,r){"use strict";var n=e("is-callable"),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},i.prototype._update=function(e){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i}).call(this,e("buffer").Buffer)},{buffer:84,inherits:180,stream:311}],162:[function(e,t,r){var n=r;n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":163,"./hash/hmac":164,"./hash/ripemd":165,"./hash/sha":166,"./hash/utils":173}],163:[function(e,t,r){"use strict";var n=e("./utils"),i=e("minimalistic-assert");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}r.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3},r.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},{"../utils":173}],173:[function(e,t,r){"use strict";var n=e("minimalistic-assert"),i=e("inherits");function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,a=255&i;o?r.push(o,a):r.push(a)}else for(n=0;n>>0}return a},r.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},r.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},r.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},r.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},r.sum64_lo=function(e,t,r,n){return t+n>>>0},r.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)>>0)>>0)>>0},r.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},r.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var f=0,h=t;return f+=(h=h+n>>>0)>>0)>>0)>>0)>>0},r.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:180,"minimalistic-assert":234}],174:[function(e,t,r){"use strict";var n=e("hash.js"),i=e("minimalistic-crypto-utils"),o=e("minimalistic-assert");function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}t.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length\\$%@ءؤة\"'^|~⦅⦆・ゥャ¢£¬¦¥₩│←↑→↓■○𐐨𐐩𐐪𐐫𐐬𐐭𐐮𐐯𐐰𐐱𐐲𐐳𐐴𐐵𐐶𐐷𐐸𐐹𐐺𐐻𐐼𐐽𐐾𐐿𐑀𐑁𐑂𐑃𐑄𐑅𐑆𐑇𐑈𐑉𐑊𐑋𐑌𐑍𐑎𐑏𐓘𐓙𐓚𐓛𐓜𐓝𐓞𐓟𐓠𐓡𐓢𐓣𐓤𐓥𐓦𐓧𐓨𐓩𐓪𐓫𐓬𐓭𐓮𐓯𐓰𐓱𐓲𐓳𐓴𐓵𐓶𐓷𐓸𐓹𐓺𐓻𐳀𐳁𐳂𐳃𐳄𐳅𐳆𐳇𐳈𐳉𐳊𐳋𐳌𐳍𐳎𐳏𐳐𐳑𐳒𐳓𐳔𐳕𐳖𐳗𐳘𐳙𐳚𐳛𐳜𐳝𐳞𐳟𐳠𐳡𐳢𐳣𐳤𐳥𐳦𐳧𐳨𐳩𐳪𐳫𐳬𐳭𐳮𐳯𐳰𐳱𐳲𑣀𑣁𑣂𑣃𑣄𑣅𑣆𑣇𑣈𑣉𑣊𑣋𑣌𑣍𑣎𑣏𑣐𑣑𑣒𑣓𑣔𑣕𑣖𑣗𑣘𑣙𑣚𑣛𑣜𑣝𑣞𑣟ıȷ∇∂𞤢𞤣𞤤𞤥𞤦𞤧𞤨𞤩𞤪𞤫𞤬𞤭𞤮𞤯𞤰𞤱𞤲𞤳𞤴𞤵𞤶𞤷𞤸𞤹𞤺𞤻𞤼𞤽𞤾𞤿𞥀𞥁𞥂𞥃ٮڡٯ字双多解交映無前後再新初終販声吹演投捕遊指禁空合満申割営配得可丽丸乁𠄢你侻倂偺備像㒞𠘺兔兤具𠔜㒹內𠕋冗冤仌冬𩇟刃㓟刻剆剷㔕包匆卉博即卽卿𠨬灰及叟𠭣叫叱吆咞吸呈周咢哶唐啓啣善喫喳嗂圖圗噑噴壮城埴堍型堲報墬𡓤売壷夆夢奢𡚨𡛪姬娛娧姘婦㛮嬈嬾𡧈寃寘寳𡬘寿将㞁屠峀岍𡷤嵃𡷦嵮嵫嵼巡巢㠯巽帨帽幩㡢𢆃㡼庰庳庶𪎒𢌱舁弢㣇𣊸𦇚形彫㣣徚忍志忹悁㤺㤜𢛔惇慈慌慺憲憤憯懞戛扝抱拔捐𢬌挽拼捨掃揤𢯱搢揅掩㨮摩摾撝摷㩬敬𣀊旣書晉㬙㬈㫤冒冕最暜肭䏙朡杞杓𣏃㭉柺枅桒𣑭梎栟椔楂榣槪檨𣚣櫛㰘次𣢧歔㱎歲殟殻𣪍𡴋𣫺汎𣲼沿泍汧洖派浩浸涅𣴞洴港湮㴳滇𣻑淹潮𣽞𣾎濆瀹瀛㶖灊災灷炭𠔥煅𤉣熜爨牐𤘈犀犕𤜵𤠔獺王㺬玥㺸瑇瑜璅瓊㼛甤𤰶甾𤲒𢆟瘐𤾡𤾸𥁄㿼䀈𥃳𥃲𥄙𥄳眞真瞋䁆䂖𥐝硎䃣𥘦𥚚𥛅秫䄯穊穏𥥼𥪧䈂𥮫篆築䈧𥲀糒䊠糨糣紀𥾆絣䌁緇縂繅䌴𦈨𦉇䍙𦋙罺𦌾羕翺𦓚𦔣聠𦖨聰𣍟䏕育脃䐋脾媵𦞧𦞵𣎓𣎜舄辞䑫芑芋芝劳花芳芽苦𦬼茝荣莭茣莽菧荓菊菌菜𦰶𦵫𦳕䔫蓱蓳蔖𧏊蕤𦼬䕝䕡𦾱𧃒䕫虐虧虩蚩蚈蜎蛢蜨蝫螆蟡蠁䗹衠𧙧裗裞䘵裺㒻𧢮𧥦䚾䛇誠𧲨貫賁贛起𧼯𠠄跋趼跰𠣞軔𨗒𨗭邔郱鄑𨜮鄛鈸鋗鋘鉼鏹鐕𨯺開䦕閷𨵷䧦雃嶲霣𩅅𩈚䩮䩶韠𩐊䪲𩒖頩𩖶飢䬳餩馧駂駾䯎𩬰鱀鳽䳎䳭鵧𪃎䳸𪄅𪈎𪊑䵖黾鼅鼏鼖𪘀",mapChar:function(r){return r>=196608?r>=917760&&r<=917999?18874368:0:e[t[r>>4]][15&r]}}},"function"==typeof define&&define.amd?define([],function(){return i()}):"object"==typeof r?t.exports=i():n.uts46_map=i()},{}],177:[function(e,t,r){var n,i;n=this,i=function(e,t){function r(r,n,i){for(var o=[],a=e.ucs2.decode(r),s=0;s>23,l=f>>21&3,d=f>>5&65535,p=31&f,b=t.mapStr.substr(d,p);if(0===l||n&&1&h)throw new Error("Illegal char "+c);1===l?o.push(b):2===l?o.push(i?b:c):3===l&&o.push(c)}return o.join("").normalize("NFC")}function n(t,n,o){void 0===o&&(o=!1);var a=r(t,o,n).split(".");return(a=a.map(function(t){return t.startsWith("xn--")?i(t=e.decode(t.substring(4)),o,!1):i(t,o,n),t})).join(".")}function i(e,n,i){if("-"===e[2]&&"-"===e[3])throw new Error("Failed to validate "+e);if(e.startsWith("-")||e.endsWith("-"))throw new Error("Failed to validate "+e);if(e.includes("."))throw new Error("Failed to validate "+e);if(r(e,n,i)!==e)throw new Error("Failed to validate "+e);var o=e.codePointAt(0);if(t.mapChar(o)&2<<23)throw new Error("Label contains illegal character: "+o)}return{toUnicode:function(e,t){return void 0===t&&(t={}),n(e,!1,"useStd3ASCII"in t&&t.useStd3ASCII)},toAscii:function(t,r){void 0===r&&(r={});var i,o=!("transitional"in r)||r.transitional,a="useStd3ASCII"in r&&r.useStd3ASCII,s="verifyDnsLength"in r&&r.verifyDnsLength,u=n(t,o,a).split(".").map(e.toASCII),c=u.join(".");if(s){if(c.length<1||c.length>253)throw new Error("DNS name has wrong length: "+c);for(i=0;i63)throw new Error("DNS label has wrong length: "+f)}}return c}}},"function"==typeof define&&define.amd?define(["punycode","./idna-map"],function(e,t){return i(e,t)}):"object"==typeof r?t.exports=i(e("punycode"),e("./idna-map")):n.uts46=i(n.punycode,n.idna_map)},{"./idna-map":176,punycode:265}],178:[function(e,t,r){r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,f=-7,h=r?i-1:0,l=r?-1:1,d=e[t+h];for(h+=l,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+e[t+h],h+=l,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+h],h+=l,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=f?(s=0,a=f):a+h>=1?(s=(t*u-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*b}},{}],179:[function(e,t,r){var n=[].indexOf;t.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r-32e3)throw new Error("Invalid error code");if(!(this instanceof f))return new f(e);i.call(this,"Server error",e)};n(f,i),i.ParseError=o,i.InvalidRequest=a,i.MethodNotFound=s,i.InvalidParams=u,i.InternalError=c,i.ServerError=f,t.exports=i},{inherits:180}],191:[function(e,t,r){t.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==e.start?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}},{}],192:[function(e,t,r){r.parse=e("./lib/parse"),r.stringify=e("./lib/stringify")},{"./lib/parse":193,"./lib/stringify":194}],193:[function(e,t,r){var n,i,o,a,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},u=function(e){throw{name:"SyntaxError",message:e,at:n,text:o}},c=function(e){return e&&e!==i&&u("Expected '"+e+"' instead of '"+i+"'"),i=o.charAt(n),n+=1,i},f=function(){var e,t="";for("-"===i&&(t="-",c("-"));i>="0"&&i<="9";)t+=i,c();if("."===i)for(t+=".";c()&&i>="0"&&i<="9";)t+=i;if("e"===i||"E"===i)for(t+=i,c(),"-"!==i&&"+"!==i||(t+=i,c());i>="0"&&i<="9";)t+=i,c();if(e=+t,isFinite(e))return e;u("Bad number")},h=function(){var e,t,r,n="";if('"'===i)for(;c();){if('"'===i)return c(),n;if("\\"===i)if(c(),"u"===i){for(r=0,t=0;t<4&&(e=parseInt(c(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!=typeof s[i])break;n+=s[i]}else n+=i}u("Bad string")},l=function(){for(;i&&i<=" ";)c()};a=function(){switch(l(),i){case"{":return function(){var e,t={};if("{"===i){if(c("{"),l(),"}"===i)return c("}"),t;for(;i;){if(e=h(),l(),c(":"),Object.hasOwnProperty.call(t,e)&&u('Duplicate key "'+e+'"'),t[e]=a(),l(),"}"===i)return c("}"),t;c(","),l()}}u("Bad object")}();case"[":return function(){var e=[];if("["===i){if(c("["),l(),"]"===i)return c("]"),e;for(;i;){if(e.push(a()),l(),"]"===i)return c("]"),e;c(","),l()}}u("Bad array")}();case'"':return h();case"-":return f();default:return i>="0"&&i<="9"?f():function(){switch(i){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null}u("Unexpected '"+i+"'")}()}},t.exports=function(e,t){var r;return o=e,n=0,i=" ",r=a(),l(),i&&u("Syntax error"),"function"==typeof t?function e(r,n){var i,o,a=r[n];if(a&&"object"==typeof a)for(i in a)Object.prototype.hasOwnProperty.call(a,i)&&(void 0!==(o=e(a,i))?a[i]=o:delete a[i]);return t.call(r,n,a)}({"":r},""):r}},{}],194:[function(e,t,r){var n,i,o,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function u(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}t.exports=function(e,t,r){var a;if(n="",i="","number"==typeof r)for(a=0;a>>31),p=l^(a<<1|o>>>31),b=e[0]^d,y=e[1]^p,m=e[10]^d,v=e[11]^p,g=e[20]^d,w=e[21]^p,_=e[30]^d,A=e[31]^p,E=e[40]^d,x=e[41]^p;d=r^(s<<1|u>>>31),p=i^(u<<1|s>>>31);var k=e[2]^d,S=e[3]^p,M=e[12]^d,I=e[13]^p,T=e[22]^d,U=e[23]^p,j=e[32]^d,B=e[33]^p,P=e[42]^d,C=e[43]^p;d=o^(c<<1|f>>>31),p=a^(f<<1|c>>>31);var N=e[4]^d,R=e[5]^p,L=e[14]^d,O=e[15]^p,D=e[24]^d,F=e[25]^p,q=e[34]^d,H=e[35]^p,z=e[44]^d,K=e[45]^p;d=s^(h<<1|l>>>31),p=u^(l<<1|h>>>31);var V=e[6]^d,G=e[7]^p,W=e[16]^d,Y=e[17]^p,X=e[26]^d,Z=e[27]^p,J=e[36]^d,$=e[37]^p,Q=e[46]^d,ee=e[47]^p;d=c^(r<<1|i>>>31),p=f^(i<<1|r>>>31);var te=e[8]^d,re=e[9]^p,ne=e[18]^d,ie=e[19]^p,oe=e[28]^d,ae=e[29]^p,se=e[38]^d,ue=e[39]^p,ce=e[48]^d,fe=e[49]^p,he=b,le=y,de=v<<4|m>>>28,pe=m<<4|v>>>28,be=g<<3|w>>>29,ye=w<<3|g>>>29,me=A<<9|_>>>23,ve=_<<9|A>>>23,ge=E<<18|x>>>14,we=x<<18|E>>>14,_e=k<<1|S>>>31,Ae=S<<1|k>>>31,Ee=I<<12|M>>>20,xe=M<<12|I>>>20,ke=T<<10|U>>>22,Se=U<<10|T>>>22,Me=B<<13|j>>>19,Ie=j<<13|B>>>19,Te=P<<2|C>>>30,Ue=C<<2|P>>>30,je=R<<30|N>>>2,Be=N<<30|R>>>2,Pe=L<<6|O>>>26,Ce=O<<6|L>>>26,Ne=F<<11|D>>>21,Re=D<<11|F>>>21,Le=q<<15|H>>>17,Oe=H<<15|q>>>17,De=K<<29|z>>>3,Fe=z<<29|K>>>3,qe=V<<28|G>>>4,He=G<<28|V>>>4,ze=Y<<23|W>>>9,Ke=W<<23|Y>>>9,Ve=X<<25|Z>>>7,Ge=Z<<25|X>>>7,We=J<<21|$>>>11,Ye=$<<21|J>>>11,Xe=ee<<24|Q>>>8,Ze=Q<<24|ee>>>8,Je=te<<27|re>>>5,$e=re<<27|te>>>5,Qe=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,nt=se<<8|ue>>>24,it=ue<<8|se>>>24,ot=ce<<14|fe>>>18,at=fe<<14|ce>>>18;e[0]=he^~Ee&Ne,e[1]=le^~xe&Re,e[10]=qe^~Qe&be,e[11]=He^~et&ye,e[20]=_e^~Pe&Ve,e[21]=Ae^~Ce&Ge,e[30]=Je^~de&ke,e[31]=$e^~pe&Se,e[40]=je^~ze&tt,e[41]=Be^~Ke&rt,e[2]=Ee^~Ne&We,e[3]=xe^~Re&Ye,e[12]=Qe^~be&Me,e[13]=et^~ye&Ie,e[22]=Pe^~Ve&nt,e[23]=Ce^~Ge&it,e[32]=de^~ke&Le,e[33]=pe^~Se&Oe,e[42]=ze^~tt&me,e[43]=Ke^~rt&ve,e[4]=Ne^~We&ot,e[5]=Re^~Ye&at,e[14]=be^~Me&De,e[15]=ye^~Ie&Fe,e[24]=Ve^~nt&ge,e[25]=Ge^~it&we,e[34]=ke^~Le&Xe,e[35]=Se^~Oe&Ze,e[44]=tt^~me&Te,e[45]=rt^~ve&Ue,e[6]=We^~ot&he,e[7]=Ye^~at&le,e[16]=Me^~De&qe,e[17]=Ie^~Fe&He,e[26]=nt^~ge&_e,e[27]=it^~we&Ae,e[36]=Le^~Xe&Je,e[37]=Oe^~Ze&$e,e[46]=me^~Te&je,e[47]=ve^~Ue&Be,e[8]=ot^~he&Ee,e[9]=at^~le&xe,e[18]=De^~qe&Qe,e[19]=Fe^~He&et,e[28]=ge^~_e&Pe,e[29]=we^~Ae&Ce,e[38]=Xe^~Je&de,e[39]=Ze^~$e&pe,e[48]=Te^~je&ze,e[49]=Ue^~Be&Ke,e[0]^=n[2*t],e[1]^=n[2*t+1]}}},{}],200:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("./keccak-state-unroll");function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(e){for(var t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return t},o.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},t.exports=o},{"./keccak-state-unroll":199,"safe-buffer":290}],201:[function(e,t,r){var n=e("./_root").Symbol;t.exports=n},{"./_root":217}],202:[function(e,t,r){var n=e("./_baseTimes"),i=e("./isArguments"),o=e("./isArray"),a=e("./isBuffer"),s=e("./_isIndex"),u=e("./isTypedArray"),c=Object.prototype.hasOwnProperty;t.exports=function(e,t){var r=o(e),f=!r&&i(e),h=!r&&!f&&a(e),l=!r&&!f&&!h&&u(e),d=r||f||h||l,p=d?n(e.length,String):[],b=p.length;for(var y in e)!t&&!c.call(e,y)||d&&("length"==y||h&&("offset"==y||"parent"==y)||l&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,b))||p.push(y);return p}},{"./_baseTimes":207,"./_isIndex":211,"./isArguments":219,"./isArray":220,"./isBuffer":222,"./isTypedArray":227}],203:[function(e,t,r){var n=e("./_Symbol"),i=e("./_getRawTag"),o=e("./_objectToString"),a="[object Null]",s="[object Undefined]",u=n?n.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?s:a:u&&u in Object(e)?i(e):o(e)}},{"./_Symbol":201,"./_getRawTag":210,"./_objectToString":215}],204:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObjectLike"),o="[object Arguments]";t.exports=function(e){return i(e)&&n(e)==o}},{"./_baseGetTag":203,"./isObjectLike":226}],205:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isLength"),o=e("./isObjectLike"),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(e){return o(e)&&i(e.length)&&!!a[n(e)]}},{"./_baseGetTag":203,"./isLength":224,"./isObjectLike":226}],206:[function(e,t,r){var n=e("./_isPrototype"),i=e("./_nativeKeys"),o=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},{"./_isPrototype":212,"./_nativeKeys":213}],207:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=Array(e);++r-1&&e%1==0&&e-1&&e%1==0&&e<=n}},{}],225:[function(e,t,r){t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},{}],226:[function(e,t,r){t.exports=function(e){return null!=e&&"object"==typeof e}},{}],227:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),o=e("./_nodeUtil"),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},{"./_baseIsTypedArray":205,"./_baseUnary":208,"./_nodeUtil":214}],228:[function(e,t,r){var n=e("./_arrayLikeKeys"),i=e("./_baseKeys"),o=e("./isArrayLike");t.exports=function(e){return o(e)?n(e):i(e)}},{"./_arrayLikeKeys":202,"./_baseKeys":206,"./isArrayLike":221}],229:[function(e,t,r){t.exports=function(){}},{}],230:[function(e,t,r){t.exports=function(){return!1}},{}],231:[function(e,t,r){(function(r){"use strict";var n=e("inherits"),i=e("hash-base"),o=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(e,t){return e<>>32-t}function u(e,t,r,n,i,o,a){return s(e+(t&r|~t&n)+i+o|0,a)+t|0}function c(e,t,r,n,i,o,a){return s(e+(t&n|r&~n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return s(e+(t^r^n)+i+o|0,a)+t|0}function h(e,t,r,n,i,o,a){return s(e+(r^(t|~n))+i+o|0,a)+t|0}n(a,i),a.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,a=this._d;n=h(n=h(n=h(n=h(n=f(n=f(n=f(n=f(n=c(n=c(n=c(n=c(n=u(n=u(n=u(n=u(n,i=u(i,a=u(a,r=u(r,n,i,a,e[0],3614090360,7),n,i,e[1],3905402710,12),r,n,e[2],606105819,17),a,r,e[3],3250441966,22),i=u(i,a=u(a,r=u(r,n,i,a,e[4],4118548399,7),n,i,e[5],1200080426,12),r,n,e[6],2821735955,17),a,r,e[7],4249261313,22),i=u(i,a=u(a,r=u(r,n,i,a,e[8],1770035416,7),n,i,e[9],2336552879,12),r,n,e[10],4294925233,17),a,r,e[11],2304563134,22),i=u(i,a=u(a,r=u(r,n,i,a,e[12],1804603682,7),n,i,e[13],4254626195,12),r,n,e[14],2792965006,17),a,r,e[15],1236535329,22),i=c(i,a=c(a,r=c(r,n,i,a,e[1],4129170786,5),n,i,e[6],3225465664,9),r,n,e[11],643717713,14),a,r,e[0],3921069994,20),i=c(i,a=c(a,r=c(r,n,i,a,e[5],3593408605,5),n,i,e[10],38016083,9),r,n,e[15],3634488961,14),a,r,e[4],3889429448,20),i=c(i,a=c(a,r=c(r,n,i,a,e[9],568446438,5),n,i,e[14],3275163606,9),r,n,e[3],4107603335,14),a,r,e[8],1163531501,20),i=c(i,a=c(a,r=c(r,n,i,a,e[13],2850285829,5),n,i,e[2],4243563512,9),r,n,e[7],1735328473,14),a,r,e[12],2368359562,20),i=f(i,a=f(a,r=f(r,n,i,a,e[5],4294588738,4),n,i,e[8],2272392833,11),r,n,e[11],1839030562,16),a,r,e[14],4259657740,23),i=f(i,a=f(a,r=f(r,n,i,a,e[1],2763975236,4),n,i,e[4],1272893353,11),r,n,e[7],4139469664,16),a,r,e[10],3200236656,23),i=f(i,a=f(a,r=f(r,n,i,a,e[13],681279174,4),n,i,e[0],3936430074,11),r,n,e[3],3572445317,16),a,r,e[6],76029189,23),i=f(i,a=f(a,r=f(r,n,i,a,e[9],3654602809,4),n,i,e[12],3873151461,11),r,n,e[15],530742520,16),a,r,e[2],3299628645,23),i=h(i,a=h(a,r=h(r,n,i,a,e[0],4096336452,6),n,i,e[7],1126891415,10),r,n,e[14],2878612391,15),a,r,e[5],4237533241,21),i=h(i,a=h(a,r=h(r,n,i,a,e[12],1700485571,6),n,i,e[3],2399980690,10),r,n,e[10],4293915773,15),a,r,e[1],2240044497,21),i=h(i,a=h(a,r=h(r,n,i,a,e[8],1873313359,6),n,i,e[15],4264355552,10),r,n,e[6],2734768916,15),a,r,e[13],1309151649,21),i=h(i,a=h(a,r=h(r,n,i,a,e[4],4149444226,6),n,i,e[11],3174756917,10),r,n,e[2],718787259,15),a,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+a|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new r(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=a}).call(this,e("buffer").Buffer)},{buffer:84,"hash-base":232,inherits:180}],232:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("stream").Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},{inherits:180,"safe-buffer":290,stream:311}],233:[function(e,t,r){var n=e("bn.js"),i=e("brorand");function o(e){this.rand=e||new i.Rand}t.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var c=e.shrn(u),f=s.toRed(o);t>0;t--){var h=this._randrange(new n(2),s);r&&r(h);var l=h.toRed(o).redPow(c);if(0!==l.cmp(a)&&0!==l.cmp(f)){for(var d=1;d0;t--){var f=this._randrange(new n(2),a),h=e.gcd(f);if(0!==h.cmpn(1))return h;var l=f.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(c)){for(var d=1;d>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},{}],236:[function(e,t,r){arguments[4][154][0].apply(r,arguments)},{dup:154}],237:[function(e,t,r){var n=e("bn.js"),i=e("strip-hex-prefix");t.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new n(1),r=String(e).toLowerCase().trim(),o="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),a=i(r);if("-"===a.substr(0,1)&&(a=i(a.slice(1)),t=new n(-1,10)),!(a=""===a?"0":a).match(/^-?[0-9]+$/)&&a.match(/^[0-9A-Fa-f]+$/)||a.match(/^[a-fA-F]+$/)||!0===o&&a.match(/^[0-9A-Fa-f]+$/))return new n(a,16).mul(t);if((a.match(/^-?[0-9]+$/)||""===a)&&!1===o)return new n(a,10).mul(t)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new n(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},{"bn.js":236,"strip-hex-prefix":318}],238:[function(e,t,r){"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u0;)if(q+=r,r=e.charAt(o++),4===H?(N+=String.fromCharCode(parseInt(q,16)),H=0,c=o-1):H++,!r)break e;if('"'===r&&!L){D=F.pop()||p,N+=e.substring(c,o-1);break}if(!("\\"!==r||L||(L=!0,N+=e.substring(c,o-1),r=e.charAt(o++))))break;if(L){if(L=!1,"n"===r?N+="\n":"r"===r?N+="\r":"t"===r?N+="\t":"f"===r?N+="\f":"b"===r?N+="\b":"u"===r?(H=1,q=""):N+=r,r=e.charAt(o++),c=o-1,r)continue;break}h.lastIndex=o;var l=h.exec(e);if(!l){o=e.length+1,N+=e.substring(c,o-1);break}if(o=l.index+1,!(r=e.charAt(l.index))){N+=e.substring(c,o-1);break}}continue;case A:if(!r)continue;if("r"!==r)return W("Invalid true started with t"+r);D=E;continue;case E:if(!r)continue;if("u"!==r)return W("Invalid true started with tr"+r);D=x;continue;case x:if(!r)continue;if("e"!==r)return W("Invalid true started with tru"+r);a(!0),u(),D=F.pop()||p;continue;case k:if(!r)continue;if("a"!==r)return W("Invalid false started with f"+r);D=S;continue;case S:if(!r)continue;if("l"!==r)return W("Invalid false started with fa"+r);D=M;continue;case M:if(!r)continue;if("s"!==r)return W("Invalid false started with fal"+r);D=I;continue;case I:if(!r)continue;if("e"!==r)return W("Invalid false started with fals"+r);a(!1),u(),D=F.pop()||p;continue;case T:if(!r)continue;if("u"!==r)return W("Invalid null started with n"+r);D=U;continue;case U:if(!r)continue;if("l"!==r)return W("Invalid null started with nu"+r);D=j;continue;case j:if(!r)continue;if("l"!==r)return W("Invalid null started with nul"+r);a(null),u(),D=F.pop()||p;continue;case B:if("."!==r)return W("Leading zero not followed by .");R+=r,D=P;continue;case P:if(-1!=="0123456789".indexOf(r))R+=r;else if("."===r){if(-1!==R.indexOf("."))return W("Invalid number has two dots");R+=r}else if("e"===r||"E"===r){if(-1!==R.indexOf("e")||-1!==R.indexOf("E"))return W("Invalid number has two exponential");R+=r}else if("+"===r||"-"===r){if("e"!==n&&"E"!==n)return W("Invalid symbol in number");R+=r}else R&&(a(parseFloat(R)),u(),R=""),o--,D=F.pop()||p;continue;default:return W("Unknown state: "+D)}K>=C&&(X=0,N!==s&&N.length>f&&(W("Max buffer length exceeded: textNode"),X=Math.max(X,N.length)),R.length>f&&(W("Max buffer length exceeded: numberNode"),X=Math.max(X,R.length)),C=f-X+K);var X}),e(ce).on(function(){if(D==d)return a({}),u(),void(O=!0);D===p&&0===z||W("Unexpected end");N!==s&&(a(N),u(),N=s);O=!0})}var C,N,R,L,O,D,F,q,H,z,K,V=(C=d(function(e){return e.unshift(/^/),(t=RegExp(e.map(f("source")).join(""))).exec.bind(t);var t}),L=C(N=/(\$?)/,/([\w-_]+|\*)/,R=/(?:{([\w ]*?)})?/),O=C(N,/\["([^"]+)"\]/,R),D=C(N,/\[(\d+|\*)\]/,R),F=C(N,/()/,/{([\w ]*?)}/),q=C(/\.\./),H=C(/\./),z=C(N,/!/),K=C(/$/),function(e){return e(h(L,O,D,F),q,H,z,K)});function G(e,t){return{key:e,node:t}}var W=f("key"),Y=f("node"),X={};function Z(e){var t=e(ee).emit,r=e(te).emit,n=e(ae).emit,o=e(oe).emit;function a(e,t,r){Y(x(e))[t]=r}function s(e,r,n){e&&a(e,r,n);var i=A(G(r,n),e);return t(i),i}var u={};return u[le]=function(e,t){if(!e)return n(t),s(e,X,t);var r=function(e,t){var r=Y(x(e));return m(i,r)?s(e,v(r),t):e}(e,t),o=k(r),u=W(x(r));return a(o,u,t),A(G(u,t),o)},u[de]=function(e){return r(e),k(e)||o(Y(x(e)))},u[he]=s,u}var J=V(function(e,t,r,n,i){var a=1,s=2,f=3,l=c(W,x),d=c(Y,x);function b(e,t){return!!t[a]?p(e,x):e}function m(e){if(e==y)return y;return p(function(e){return l(e)!=X},c(e,k))}function g(){return function(e){return l(e)==X}}function w(e,t,r,n,i){var o=e(r);if(o){var a=function(e,t,r){return U(function(e,t){return t(e,r)},t,e)}(t,n,o);return i(r.substr(v(o[0])),a)}}function A(e,t){return u(w,e,t)}var E=h(A(e,M(b,function(e,t){var r=t[f];return r?p(c(u(_,S(r.split(/\W+/))),d),e):e},function(e,t){var r=t[s];return p(r&&"*"!=r?function(e){return l(e)==r}:y,e)},m)),A(t,M(function(e){if(e==y)return y;var t=g(),r=e,n=m(function(e){return i(e)}),i=h(t,r,n);return i})),A(r,M()),A(n,M(b,g)),A(i,M(function(e){return function(t){var r=e(t);return!0===r?x(t):r}})),function(e){throw o('"'+e+'" could not be tokenised')});function I(e,t){return t}function T(e,t){return E(e,t,e?T:I)}return function(e){try{return T(e,y)}catch(t){throw o('Could not compile "'+e+'" because '+t.message)}}});function $(e,t,r){var n,i;function o(e){return function(t){return t.id==e}}return{on:function(r,o){var a={listener:r,id:o||r};return t&&t.emit(e,r,a.id),n=A(a,n),i=A(r,i),this},emit:function(){!function e(t,r){t&&(x(t).apply(null,r),e(k(t),r))}(i,arguments)},un:function(t){var a;n=j(n,o(t),function(e){a=e}),a&&(i=j(i,function(e){return e==a.listener}),r&&r.emit(e,a.listener,a.id))},listeners:function(){return i},hasListener:function(e){return w(function e(t,r){return r&&(t(x(r))?x(r):e(t,k(r)))}(e?o(e):y,n))}}}var Q=1,ee=Q++,te=Q++,re=Q++,ne=Q++,ie="fail",oe=Q++,ae=Q++,se="start",ue="data",ce="end",fe=Q++,he=Q++,le=Q++,de=Q++;function pe(e,t,r){try{var n=a.parse(t)}catch(e){}return{statusCode:e,body:t,jsonBody:n,thrown:r}}function be(e,t){var r={node:e(te),path:e(ee)};function n(t,r,n){var i=e(t).emit;r.on(function(e){var t=n(e);!1!==t&&function(e,t,r){var n=B(r);e(t,I(k(T(W,n))),I(T(Y,n)))}(i,Y(t),e)},t),e("removeListener").on(function(n){n==t&&(e(n).listeners()||r.un(t))})}e("newListener").on(function(e){var i=/(node|path):(.*)/.exec(e);if(i){var o=r[i[1]];o.hasListener(e)||n(e,o,t(i[2]))}})}function ye(e,t){var r,n=/^(node|path):./,i=e(oe),o=e(ne).emit,a=e(re).emit,s=d(function(t,i){if(r[t])l(i,r[t]);else{var o=e(t),a=i[0];n.test(t)?c(o,a):o.on(a)}return r});function c(e,t,n){n=n||t;var i=f(t);return e.on(function(){var t=!1;r.forget=function(){t=!0},l(arguments,i),delete r.forget,t&&e.un(n)},n),r}function f(e){return function(){try{return e.apply(r,arguments)}catch(e){setTimeout(function(){throw e})}}}function h(t,r,n){var i;i="node"==t?function(e){return function(){var t=e.apply(this,arguments);w(t)&&(t==ge.drop?o():a(t))}}(n):n,c(function(t,r){return e(t+":"+r)}(t,r),i,n)}function p(e,t,n){return g(t)?h(e,t,n):function(e,t){for(var r in t)h(e,r,t[r])}(e,t),r}return e(ae).on(function(e){var t;r.root=(t=e,function(){return t})}),e(se).on(function(e,t){r.header=function(e){return e?t[e]:t}}),r={on:s,addListener:s,removeListener:function(t,n,o){if("done"==t)i.un(n);else if("node"==t||"path"==t)e.un(t+":"+n,o);else{var a=n;e(t).un(a)}return r},emit:e.emit,node:u(p,"node"),path:u(p,"path"),done:u(c,i),start:u(function(t,n){return e(t).on(f(n),n),r},se),fail:e(ie).on,abort:e(fe).emit,header:b,root:b,source:t}}function me(t,r,n,i,o){var a=function(){var e={},t=n("newListener"),r=n("removeListener");function n(n){return e[n]=$(n,t,r)}function i(t){return e[t]||n(t)}return["emit","on","un"].forEach(function(e){i[e]=d(function(t,r){l(r,i(t)[e])})}),i}();return r&&function(t,r,n,i,o,a,c){"use strict";var f=t(ue).emit,h=t(ie).emit,l=0,d=!0;function p(){var e=r.responseText,t=e.substr(l);t&&f(t),l=v(e)}t(fe).on(function(){r.onreadystatechange=null,r.abort()}),"onprogress"in r&&(r.onprogress=p),r.onreadystatechange=function(){function e(){try{d&&t(se).emit(r.status,(e=r.getAllResponseHeaders(),n={},e&&e.split("\r\n").forEach(function(e){var t=e.indexOf(": ");n[e.substring(0,t)]=e.substring(t+2)}),n)),d=!1}catch(e){}var e,n}switch(r.readyState){case 2:case 3:return e();case 4:e(),2==String(r.status)[0]?(p(),t(ce).emit()):h(pe(r.status,r.responseText))}};try{for(var b in r.open(n,i,!0),a)r.setRequestHeader(b,a[b]);(function(e,t){function r(t){return t.port||{"http:":80,"https:":443}[t.protocol||e.protocol]}return!!(t.protocol&&t.protocol!=e.protocol||t.host&&t.host!=e.host||t.host&&r(t)!=r(e))})(e.location,function(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e)||[];return{protocol:t[1]||"",host:t[2]||"",port:t[3]||""}}(i))||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=c,r.send(o)}catch(t){e.setTimeout(u(h,pe(s,s,t)),0)}}(a,new XMLHttpRequest,t,r,n,i,o),P(a),function(e,t){"use strict";var r,n={};function i(e){return function(t){r=e(r,t)}}for(var o in t)e(o).on(i(t[o]),n);e(re).on(function(e){var t=x(r),n=W(t),i=k(r);i&&(Y(x(i))[n]=e)}),e(ne).on(function(){var e=x(r),t=W(e),n=k(r);n&&delete Y(x(n))[t]}),e(fe).on(function(){for(var r in t)e(r).un(n)})}(a,Z(a)),be(a,J),ye(a,r)}function ve(e,t,r,n,i,o,s){return i=i?a.parse(a.stringify(i)):{},n?g(n)||(n=a.stringify(n),i["Content-Type"]=i["Content-Type"]||"application/json"):n=null,e(r||"GET",function(e,t){return!1===t&&(-1==e.indexOf("?")?e+="?":e+="&",e+="_="+(new Date).getTime()),e}(t,s),n,i,o||!1)}function ge(e){var t=M("resume","pause","pipe"),r=u(_,t);return e?r(e)||g(e)?ve(me,e):ve(me,e.url,e.method,e.body,e.headers,e.withCredentials,e.cached):me()}ge.drop=function(){return ge.drop},"function"==typeof define&&define.amd?define("oboe",[],function(){return ge}):"object"==typeof r?t.exports=ge:e.oboe=ge}(function(){try{return window}catch(e){return self}}(),Object,Array,Error,JSON)},{}],240:[function(e,t,r){r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n",r.homedir=function(){return"/"}},{}],241:[function(e,t,r){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],242:[function(e,t,r){"use strict";var n=e("asn1.js");r.certificate=e("./certificate");var i=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});r.RSAPrivateKey=i;var o=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});r.PublicKey=a;var s=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),u=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});r.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});r.EncryptedPrivateKey=c;var f=n.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});r.DSAPrivateKey=f,r.DSAparam=n.define("DSAparam",function(){this.int()});var h=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=h;var l=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":243,"asn1.js":5}],243:[function(e,t,r){"use strict";var n=e("asn1.js"),i=n.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=n.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),a=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),s=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}),u=n.define("RelativeDistinguishedName",function(){this.setof(o)}),c=n.define("RDNSequence",function(){this.seqof(u)}),f=n.define("Name",function(){this.choice({rdnSequence:this.use(c)})}),h=n.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),l=n.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=n.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(h),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())}),p=n.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())});t.exports=p},{"asn1.js":5}],244:[function(e,t,r){(function(r){var n=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m,i=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m,o=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m,a=e("evp_bytestokey"),s=e("browserify-aes");t.exports=function(e,t){var u,c=e.toString(),f=c.match(n);if(f){var h="aes"+f[1],l=new r(f[2],"hex"),d=new r(f[3].replace(/\r?\n/g,""),"base64"),p=a(t,l.slice(0,8),parseInt(f[1],10)).key,b=[],y=s.createDecipheriv(h,p,l);b.push(y.update(d)),b.push(y.final()),u=r.concat(b)}else{var m=c.match(o);u=new r(m[2].replace(/\r?\n/g,""),"base64")}return{tag:c.match(i)[1],data:u}}}).call(this,e("buffer").Buffer)},{"browserify-aes":58,buffer:84,evp_bytestokey:158}],245:[function(e,t,r){(function(r){var n=e("./asn1"),i=e("./aesid.json"),o=e("./fixProc"),a=e("browserify-aes"),s=e("pbkdf2");function u(e){var t;"object"!=typeof e||r.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=new r(e));var u,c,f=o(e,t),h=f.tag,l=f.data;switch(h){case"CERTIFICATE":c=n.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(l,"der")),u=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+h);case"ENCRYPTED PRIVATE KEY":l=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,o=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),u=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,h=parseInt(u.split("-")[1],10)/8,l=s.pbkdf2Sync(t,n,o,h),d=a.createDecipheriv(u,l,c),p=[];return p.push(d.update(f)),p.push(d.final()),r.concat(p)}(l=n.EncryptedPrivateKey.decode(l,"der"),t);case"PRIVATE KEY":switch(u=(c=n.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+h);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=n.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+h)}}t.exports=u,u.signature=n.signature}).call(this,e("buffer").Buffer)},{"./aesid.json":241,"./asn1":242,"./fixProc":244,"browserify-aes":58,buffer:84,pbkdf2:247}],246:[function(e,t,r){var n=e("trim"),i=e("for-each");t.exports=function(e){if(!e)return{};var t={};return i(n(e).split("\n"),function(e){var r,i=e.indexOf(":"),o=n(e.slice(0,i)).toLowerCase(),a=n(e.slice(i+1));void 0===t[o]?t[o]=a:(r=t[o],"[object Array]"===Object.prototype.toString.call(r)?t[o].push(a):t[o]=[t[o],a])}),t}},{"for-each":159,trim:324}],247:[function(e,t,r){r.pbkdf2=e("./lib/async"),r.pbkdf2Sync=e("./lib/sync")},{"./lib/async":248,"./lib/sync":251}],248:[function(e,t,r){(function(r,n){var i,o=e("./precondition"),a=e("./default-encoding"),s=e("./sync"),u=e("safe-buffer").Buffer,c=n.crypto&&n.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function l(e,t,r,n,i){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)}).then(function(e){return u.from(e)})}t.exports=function(e,t,d,p,b,y){if(u.isBuffer(e)||(e=u.from(e,a)),u.isBuffer(t)||(t=u.from(t,a)),o(d,p),"function"==typeof b&&(y=b,b=void 0),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");var m=f[(b=b||"sha1").toLowerCase()];if(!m||"function"!=typeof n.Promise)return r.nextTick(function(){var r;try{r=s(e,t,d,p,b)}catch(e){return y(e)}y(null,r)});!function(e,t){e.then(function(e){r.nextTick(function(){t(null,e)})},function(e){r.nextTick(function(){t(e)})})}(function(e){if(n.process&&!n.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var t=l(i=i||u.alloc(8),i,10,128,e).then(function(){return!0}).catch(function(){return!1});return h[e]=t,t}(m).then(function(r){return r?l(e,t,d,p,m):s(e,t,d,p,b)}),y)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":249,"./precondition":250,"./sync":251,_process:257,"safe-buffer":290}],249:[function(e,t,r){(function(e){var r;e.browser?r="utf-8":r=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";t.exports=r}).call(this,e("_process"))},{_process:257}],250:[function(e,t,r){var n=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>n||t!=t)throw new TypeError("Bad key length")}},{}],251:[function(e,t,r){var n=e("create-hash/md5"),i=e("ripemd160"),o=e("sha.js"),a=e("./precondition"),s=e("./default-encoding"),u=e("safe-buffer").Buffer,c=u.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,r){var a=function(e){return"rmd160"===e||"ripemd160"===e?i:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=a(t):t.length1)for(var r=1;rp||new a(t).cmp(d.modulus)>=0)throw new Error("decryption error");l=f?c(new a(t),d):s(t,d);var b=new r(p-l.length);if(b.fill(0),l=r.concat([b,l],p),4===h)return function(e,t){e.modulus;var n=e.modulus.byteLength(),a=(t.length,u("sha1").update(new r("")).digest()),s=a.length;if(0!==t[0])throw new Error("decryption error");var c=t.slice(1,s+1),f=t.slice(s+1),h=o(c,i(f,s)),l=o(f,i(h,n-s-1));if(function(e,t){e=new r(e),t=new r(t);var n=0,i=e.length;e.length!==t.length&&(n++,i=Math.min(e.length,t.length));var o=-1;for(;++o=t.length){o++;break}var a=t.slice(2,i-1);t.slice(i-1,i);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,l,f);if(3===h)return l;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":260,"./withPublic":263,"./xor":264,"bn.js":53,"browserify-rsa":76,buffer:84,"create-hash":91,"parse-asn1":245}],262:[function(e,t,r){(function(r){var n=e("parse-asn1"),i=e("randombytes"),o=e("create-hash"),a=e("./mgf"),s=e("./xor"),u=e("bn.js"),c=e("./withPublic"),f=e("browserify-rsa");t.exports=function(e,t,h){var l;l=e.padding?e.padding:h?1:4;var d,p=n(e);if(4===l)d=function(e,t){var n=e.modulus.byteLength(),c=t.length,f=o("sha1").update(new r("")).digest(),h=f.length,l=2*h;if(c>n-l-2)throw new Error("message too long");var d=new r(n-c-l-2);d.fill(0);var p=n-h-1,b=i(h),y=s(r.concat([f,d,new r([1]),t],p),a(b,p)),m=s(b,a(y,h));return new u(r.concat([new r([0]),m,y],n))}(p,t);else if(1===l)d=function(e,t,n){var o,a=t.length,s=e.modulus.byteLength();if(a>s-11)throw new Error("message too long");n?(o=new r(s-a-3)).fill(255):o=function(e,t){var n,o=new r(e),a=0,s=i(2*e),u=0;for(;a=0)throw new Error("data too long for modulus")}return h?f(d,p):c(d,p)}}).call(this,e("buffer").Buffer)},{"./mgf":260,"./withPublic":263,"./xor":264,"bn.js":53,"browserify-rsa":76,buffer:84,"create-hash":91,"parse-asn1":245,randombytes:270}],263:[function(e,t,r){(function(r){var n=e("bn.js");t.exports=function(e,t){return new r(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}}).call(this,e("buffer").Buffer)},{"bn.js":53,buffer:84}],264:[function(e,t,r){t.exports=function(e,t){for(var r=e.length,n=-1;++n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=f-h,E=Math.floor,x=String.fromCharCode;function k(e){throw new RangeError(_[e])}function S(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function M(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+S((e=e.replace(w,".")).split("."),t).join(".")}function I(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=x(e)}).join("")}function U(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function j(e,t,r){var n=0;for(e=r?E(e/p):e>>1,e+=E(e/t);e>A*l>>1;n+=f)e=E(e/A);return E(n+(A+1)*e/(e+d))}function B(e){var t,r,n,i,o,a,s,u,d,p,v,g=[],w=e.length,_=0,A=y,x=b;for((r=e.lastIndexOf(m))<0&&(r=0),n=0;n=128&&k("not-basic"),g.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=w&&k("invalid-input"),((u=(v=e.charCodeAt(i++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:f)>=f||u>E((c-_)/a))&&k("overflow"),_+=u*a,!(u<(d=s<=x?h:s>=x+l?l:s-x));s+=f)a>E(c/(p=f-d))&&k("overflow"),a*=p;x=j(_-o,t=g.length+1,0==o),E(_/t)>c-A&&k("overflow"),A+=E(_/t),_%=t,g.splice(_++,0,A)}return T(g)}function P(e){var t,r,n,i,o,a,s,u,d,p,v,g,w,_,A,S=[];for(g=(e=I(e)).length,t=y,r=0,o=b,a=0;a=t&&vE((c-r)/(w=n+1))&&k("overflow"),r+=(s-t)*w,t=s,a=0;ac&&k("overflow"),v==t){for(u=r,d=f;!(u<(p=d<=o?h:d>=o+l?l:d-o));d+=f)A=u-p,_=f-p,S.push(x(U(p+A%_,0))),u=E(A/_);S.push(x(U(u,0))),o=j(r,w,n==i),r=0,++n}++r,++t}return S.join("")}if(s={version:"1.4.1",ucs2:{decode:I,encode:T},decode:B,encode:P,toASCII:function(e){return M(e,function(e){return g.test(e)?"xn--"+P(e):e})},toUnicode:function(e){return M(e,function(e){return v.test(e)?B(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return s});else if(i&&o)if(t.exports==i)o.exports=s;else for(u in s)s.hasOwnProperty(u)&&(i[u]=s[u]);else n.punycode=s}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],266:[function(e,t,r){"use strict";var n=e("strict-uri-encode"),i=e("object-assign"),o=e("decode-uri-component");function a(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function s(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function u(e,t){var r=function(e){var t;switch(e.arrayFormat){case"index":return function(e,r,n){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return function(e,r,n){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};default:return function(e,t,r){void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t=i({arrayFormat:"none"},t)),n=Object.create(null);return"string"!=typeof e?n:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach(function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),a=t.length>0?t.join("="):void 0;a=void 0===a?null:o(a),r(o(i),a,n)}),Object.keys(n).sort().reduce(function(e,t){var r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort(function(e,t){return Number(e)-Number(t)}).map(function(e){return t[e]}):t}(r):e[t]=r,e},Object.create(null))):n}r.extract=s,r.parse=u,r.stringify=function(e,t){!1===(t=i({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var r=function(e){switch(e.arrayFormat){case"index":return function(t,r,n){return null===r?[a(t,e),"[",n,"]"].join(""):[a(t,e),"[",a(n,e),"]=",a(r,e)].join("")};case"bracket":return function(t,r){return null===r?a(t,e):[a(t,e),"[]=",a(r,e)].join("")};default:return function(t,r){return null===r?a(t,e):[a(t,e),"=",a(r,e)].join("")}}}(t);return e?Object.keys(e).sort(t.sort).map(function(n){var i=e[n];if(void 0===i)return"";if(null===i)return a(n,t);if(Array.isArray(i)){var o=[];return i.slice().forEach(function(e){void 0!==e&&o.push(r(n,e,o.length))}),o.join("&")}return a(n,t)+"="+a(i,t)}).filter(function(e){return e.length>0}).join("&"):""},r.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:u(s(e),t)}}},{"decode-uri-component":98,"object-assign":238,"strict-uri-encode":316}],267:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,o){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var f=0;f=0?(h=b.substr(0,y),l=b.substr(y+1)):(h=b,l=""),d=decodeURIComponent(h),p=decodeURIComponent(l),n(a,d)?i(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],268:[function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),function(a){var s=encodeURIComponent(n(a))+r;return i(e[a])?o(e[a],function(e){return s+encodeURIComponent(n(e))}).join(t):s+encodeURIComponent(n(e[a]))}).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n65536)throw new Error("requested too many random bytes");var a=new n.Uint8Array(e);e>0&&o.getRandomValues(a);var s=i.from(a.buffer);if("function"==typeof t)return r.nextTick(function(){t(null,s)});return s}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:257,"safe-buffer":290}],271:[function(e,t,r){(function(t,n){"use strict";function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=e("safe-buffer"),a=e("randombytes"),s=o.Buffer,u=o.kMaxLength,c=n.crypto||n.msCrypto,f=Math.pow(2,32)-1;function h(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>f||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function l(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function d(e,r,n,i){if(t.browser){var o=e.buffer,s=new Uint8Array(o,r,n);return c.getRandomValues(s),i?void t.nextTick(function(){i(null,e)}):e}if(!i)return a(n).copy(e,r),e;a(n,function(t,n){if(t)return i(t);n.copy(e,r),i(null,e)})}c&&c.getRandomValues||!t.browser?(r.randomFill=function(e,t,r,i){if(!(s.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(t,e.length),l(r,t,e.length),d(e,t,r,i)},r.randomFillSync=function(e,t,r){void 0===t&&(t=0);if(!(s.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(t,e.length),void 0===r&&(r=e.length-t);return l(r,t,e.length),d(e,t,r)}):(r.randomFill=i,r.randomFillSync=i)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:257,randombytes:270,"safe-buffer":290}],272:[function(e,t,r){t.exports=window.crypto},{}],273:[function(e,t,r){t.exports=e("crypto")},{crypto:272}],274:[function(e,t,r){t.exports=function(t,r){var n=e("./crypto.js"),i="function"==typeof r;if(t>65536){if(!i)throw new Error("Requested too many random bytes.");r(new Error("Requested too many random bytes."))}if(void 0!==n&&n.randomBytes){if(!i)return"0x"+n.randomBytes(t).toString("hex");n.randomBytes(t,function(e,t){e?r(u):r(null,"0x"+t.toString("hex"))})}else{var o;if(void 0!==n?o=n:"undefined"!=typeof msCrypto&&(o=msCrypto),o&&o.getRandomValues){var a=o.getRandomValues(new Uint8Array(t)),s="0x"+Array.from(a).map(function(e){return e.toString(16)}).join("");if(!i)return s;r(null,s)}else{var u=new Error('No "crypto" object available. This Browser doesn\'t support generating secure random bytes.');if(!i)throw u;r(u)}}}},{"./crypto.js":273}],275:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":276}],276:[function(e,t,r){"use strict";var n=e("process-nextick-args").nextTick,i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=h;var o=e("core-util-is");o.inherits=e("inherits");var a=e("./_stream_readable"),s=e("./_stream_writable");o.inherits(h,a);for(var u=i(s.prototype),c=0;c0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?_(e,a,t,!1):S(e,a)):_(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=A?e=A:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i(k,e):k(e))}function k(e){d("emit readable"),e.emit("readable"),U(e)}function S(e,t){t.readingMore||(t.readingMore=!0,i(M,e,t))}function M(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function B(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i(P,t,e))}function P(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function C(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):x(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e0?j(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?f:g;function c(t,r){d("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),e.removeListener("close",m),e.removeListener("finish",v),e.removeListener("drain",h),e.removeListener("error",y),e.removeListener("unpipe",c),n.removeListener("end",f),n.removeListener("end",g),n.removeListener("data",b),l=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function f(){d("onend"),e.end()}o.endEmitted?i(u):n.once("end",u),e.on("unpipe",c);var h=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,U(e))}}(n);e.on("drain",h);var l=!1;var p=!1;function b(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==C(o.pipes,e))&&!l&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function y(t){d("onerror",t),g(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",v),g()}function v(){d("onfinish"),e.removeListener("close",m),g()}function g(){d("unpipe"),n.unpipe(e)}return n.on("data",b),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",m),e.once("finish",v),e.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),e},g.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?setImmediate:i;m.WritableState=y;var u=e("core-util-is");u.inherits=e("inherits");var c={deprecate:e("util-deprecate")},f=e("./internal/streams/stream"),h=e("safe-buffer").Buffer,l=n.Uint8Array||function(){};var d,p=e("./internal/streams/destroy");function b(){}function y(t,r){a=a||e("./_stream_duplex"),t=t||{};var n=r instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,c=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i(o,n),i(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,o);else{var a=_(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),n?s(g,e,r,a,o):g(e,r,a,o)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function m(t){if(a=a||e("./_stream_duplex"),!(d.call(m,this)||this instanceof a))return new m(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function v(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function g(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,v(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,h=r.callback;if(v(e,t,!1,t.objectMode?1:c.length,c,f,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function A(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)})}function E(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i(A,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(m,f),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===m&&(e&&e._writableState instanceof y)}})):d=function(e){return e instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,h.isBuffer(n)||n instanceof l);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=b),o.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i(t,r)}(this,r):(s||function(e,t,r,n){var o=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i(n,a),o=!1),o}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},m.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?i(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),m.prototype.destroy=p.destroy,m.prototype._undestroy=p.undestroy,m.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":276,"./internal/streams/destroy":282,"./internal/streams/stream":283,_process:257,"core-util-is":89,inherits:180,"process-nextick-args":256,"safe-buffer":290,"util-deprecate":330}],281:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,i=s,t.copy(r,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":290,util:55}],282:[function(e,t,r){"use strict";var n=e("process-nextick-args").nextTick;function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(n(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":256}],283:[function(e,t,r){t.exports=e("events").EventEmitter},{events:157}],284:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":285}],285:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":276,"./lib/_stream_passthrough.js":277,"./lib/_stream_readable.js":278,"./lib/_stream_transform.js":279,"./lib/_stream_writable.js":280}],286:[function(e,t,r){t.exports=e("./readable").Transform},{"./readable":285}],287:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":280}],288:[function(e,t,r){(function(r){"use strict";var n=e("inherits"),i=e("hash-base");function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function a(e,t){return e<>>32-t}function s(e,t,r,n,i,o,s,u){return a(e+(t^r^n)+o+s|0,u)+i|0}function u(e,t,r,n,i,o,s,u){return a(e+(t&r|~t&n)+o+s|0,u)+i|0}function c(e,t,r,n,i,o,s,u){return a(e+((t|~r)^n)+o+s|0,u)+i|0}function f(e,t,r,n,i,o,s,u){return a(e+(t&n|r&~n)+o+s|0,u)+i|0}function h(e,t,r,n,i,o,s,u){return a(e+(t^(r|~n))+o+s|0,u)+i|0}n(o,i),o.prototype._update=function(){for(var e=new Array(16),t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d,l=this._e;l=s(l,r=s(r,n,i,o,l,e[0],0,11),n,i=a(i,10),o,e[1],0,14),n=s(n=a(n,10),i=s(i,o=s(o,l,r,n,i,e[2],0,15),l,r=a(r,10),n,e[3],0,12),o,l=a(l,10),r,e[4],0,5),o=s(o=a(o,10),l=s(l,r=s(r,n,i,o,l,e[5],0,8),n,i=a(i,10),o,e[6],0,7),r,n=a(n,10),i,e[7],0,9),r=s(r=a(r,10),n=s(n,i=s(i,o,l,r,n,e[8],0,11),o,l=a(l,10),r,e[9],0,13),i,o=a(o,10),l,e[10],0,14),i=s(i=a(i,10),o=s(o,l=s(l,r,n,i,o,e[11],0,15),r,n=a(n,10),i,e[12],0,6),l,r=a(r,10),n,e[13],0,7),l=u(l=a(l,10),r=s(r,n=s(n,i,o,l,r,e[14],0,9),i,o=a(o,10),l,e[15],0,8),n,i=a(i,10),o,e[7],1518500249,7),n=u(n=a(n,10),i=u(i,o=u(o,l,r,n,i,e[4],1518500249,6),l,r=a(r,10),n,e[13],1518500249,8),o,l=a(l,10),r,e[1],1518500249,13),o=u(o=a(o,10),l=u(l,r=u(r,n,i,o,l,e[10],1518500249,11),n,i=a(i,10),o,e[6],1518500249,9),r,n=a(n,10),i,e[15],1518500249,7),r=u(r=a(r,10),n=u(n,i=u(i,o,l,r,n,e[3],1518500249,15),o,l=a(l,10),r,e[12],1518500249,7),i,o=a(o,10),l,e[0],1518500249,12),i=u(i=a(i,10),o=u(o,l=u(l,r,n,i,o,e[9],1518500249,15),r,n=a(n,10),i,e[5],1518500249,9),l,r=a(r,10),n,e[2],1518500249,11),l=u(l=a(l,10),r=u(r,n=u(n,i,o,l,r,e[14],1518500249,7),i,o=a(o,10),l,e[11],1518500249,13),n,i=a(i,10),o,e[8],1518500249,12),n=c(n=a(n,10),i=c(i,o=c(o,l,r,n,i,e[3],1859775393,11),l,r=a(r,10),n,e[10],1859775393,13),o,l=a(l,10),r,e[14],1859775393,6),o=c(o=a(o,10),l=c(l,r=c(r,n,i,o,l,e[4],1859775393,7),n,i=a(i,10),o,e[9],1859775393,14),r,n=a(n,10),i,e[15],1859775393,9),r=c(r=a(r,10),n=c(n,i=c(i,o,l,r,n,e[8],1859775393,13),o,l=a(l,10),r,e[1],1859775393,15),i,o=a(o,10),l,e[2],1859775393,14),i=c(i=a(i,10),o=c(o,l=c(l,r,n,i,o,e[7],1859775393,8),r,n=a(n,10),i,e[0],1859775393,13),l,r=a(r,10),n,e[6],1859775393,6),l=c(l=a(l,10),r=c(r,n=c(n,i,o,l,r,e[13],1859775393,5),i,o=a(o,10),l,e[11],1859775393,12),n,i=a(i,10),o,e[5],1859775393,7),n=f(n=a(n,10),i=f(i,o=c(o,l,r,n,i,e[12],1859775393,5),l,r=a(r,10),n,e[1],2400959708,11),o,l=a(l,10),r,e[9],2400959708,12),o=f(o=a(o,10),l=f(l,r=f(r,n,i,o,l,e[11],2400959708,14),n,i=a(i,10),o,e[10],2400959708,15),r,n=a(n,10),i,e[0],2400959708,14),r=f(r=a(r,10),n=f(n,i=f(i,o,l,r,n,e[8],2400959708,15),o,l=a(l,10),r,e[12],2400959708,9),i,o=a(o,10),l,e[4],2400959708,8),i=f(i=a(i,10),o=f(o,l=f(l,r,n,i,o,e[13],2400959708,9),r,n=a(n,10),i,e[3],2400959708,14),l,r=a(r,10),n,e[7],2400959708,5),l=f(l=a(l,10),r=f(r,n=f(n,i,o,l,r,e[15],2400959708,6),i,o=a(o,10),l,e[14],2400959708,8),n,i=a(i,10),o,e[5],2400959708,6),n=h(n=a(n,10),i=f(i,o=f(o,l,r,n,i,e[6],2400959708,5),l,r=a(r,10),n,e[2],2400959708,12),o,l=a(l,10),r,e[4],2840853838,9),o=h(o=a(o,10),l=h(l,r=h(r,n,i,o,l,e[0],2840853838,15),n,i=a(i,10),o,e[5],2840853838,5),r,n=a(n,10),i,e[9],2840853838,11),r=h(r=a(r,10),n=h(n,i=h(i,o,l,r,n,e[7],2840853838,6),o,l=a(l,10),r,e[12],2840853838,8),i,o=a(o,10),l,e[2],2840853838,13),i=h(i=a(i,10),o=h(o,l=h(l,r,n,i,o,e[10],2840853838,12),r,n=a(n,10),i,e[14],2840853838,5),l,r=a(r,10),n,e[1],2840853838,12),l=h(l=a(l,10),r=h(r,n=h(n,i,o,l,r,e[3],2840853838,13),i,o=a(o,10),l,e[8],2840853838,14),n,i=a(i,10),o,e[11],2840853838,11),n=h(n=a(n,10),i=h(i,o=h(o,l,r,n,i,e[6],2840853838,8),l,r=a(r,10),n,e[15],2840853838,5),o,l=a(l,10),r,e[13],2840853838,6),o=a(o,10);var d=this._a,p=this._b,b=this._c,y=this._d,m=this._e;m=h(m,d=h(d,p,b,y,m,e[5],1352829926,8),p,b=a(b,10),y,e[14],1352829926,9),p=h(p=a(p,10),b=h(b,y=h(y,m,d,p,b,e[7],1352829926,9),m,d=a(d,10),p,e[0],1352829926,11),y,m=a(m,10),d,e[9],1352829926,13),y=h(y=a(y,10),m=h(m,d=h(d,p,b,y,m,e[2],1352829926,15),p,b=a(b,10),y,e[11],1352829926,15),d,p=a(p,10),b,e[4],1352829926,5),d=h(d=a(d,10),p=h(p,b=h(b,y,m,d,p,e[13],1352829926,7),y,m=a(m,10),d,e[6],1352829926,7),b,y=a(y,10),m,e[15],1352829926,8),b=h(b=a(b,10),y=h(y,m=h(m,d,p,b,y,e[8],1352829926,11),d,p=a(p,10),b,e[1],1352829926,14),m,d=a(d,10),p,e[10],1352829926,14),m=f(m=a(m,10),d=h(d,p=h(p,b,y,m,d,e[3],1352829926,12),b,y=a(y,10),m,e[12],1352829926,6),p,b=a(b,10),y,e[6],1548603684,9),p=f(p=a(p,10),b=f(b,y=f(y,m,d,p,b,e[11],1548603684,13),m,d=a(d,10),p,e[3],1548603684,15),y,m=a(m,10),d,e[7],1548603684,7),y=f(y=a(y,10),m=f(m,d=f(d,p,b,y,m,e[0],1548603684,12),p,b=a(b,10),y,e[13],1548603684,8),d,p=a(p,10),b,e[5],1548603684,9),d=f(d=a(d,10),p=f(p,b=f(b,y,m,d,p,e[10],1548603684,11),y,m=a(m,10),d,e[14],1548603684,7),b,y=a(y,10),m,e[15],1548603684,7),b=f(b=a(b,10),y=f(y,m=f(m,d,p,b,y,e[8],1548603684,12),d,p=a(p,10),b,e[12],1548603684,7),m,d=a(d,10),p,e[4],1548603684,6),m=f(m=a(m,10),d=f(d,p=f(p,b,y,m,d,e[9],1548603684,15),b,y=a(y,10),m,e[1],1548603684,13),p,b=a(b,10),y,e[2],1548603684,11),p=c(p=a(p,10),b=c(b,y=c(y,m,d,p,b,e[15],1836072691,9),m,d=a(d,10),p,e[5],1836072691,7),y,m=a(m,10),d,e[1],1836072691,15),y=c(y=a(y,10),m=c(m,d=c(d,p,b,y,m,e[3],1836072691,11),p,b=a(b,10),y,e[7],1836072691,8),d,p=a(p,10),b,e[14],1836072691,6),d=c(d=a(d,10),p=c(p,b=c(b,y,m,d,p,e[6],1836072691,6),y,m=a(m,10),d,e[9],1836072691,14),b,y=a(y,10),m,e[11],1836072691,12),b=c(b=a(b,10),y=c(y,m=c(m,d,p,b,y,e[8],1836072691,13),d,p=a(p,10),b,e[12],1836072691,5),m,d=a(d,10),p,e[2],1836072691,14),m=c(m=a(m,10),d=c(d,p=c(p,b,y,m,d,e[10],1836072691,13),b,y=a(y,10),m,e[0],1836072691,13),p,b=a(b,10),y,e[4],1836072691,7),p=u(p=a(p,10),b=u(b,y=c(y,m,d,p,b,e[13],1836072691,5),m,d=a(d,10),p,e[8],2053994217,15),y,m=a(m,10),d,e[6],2053994217,5),y=u(y=a(y,10),m=u(m,d=u(d,p,b,y,m,e[4],2053994217,8),p,b=a(b,10),y,e[1],2053994217,11),d,p=a(p,10),b,e[3],2053994217,14),d=u(d=a(d,10),p=u(p,b=u(b,y,m,d,p,e[11],2053994217,14),y,m=a(m,10),d,e[15],2053994217,6),b,y=a(y,10),m,e[0],2053994217,14),b=u(b=a(b,10),y=u(y,m=u(m,d,p,b,y,e[5],2053994217,6),d,p=a(p,10),b,e[12],2053994217,9),m,d=a(d,10),p,e[2],2053994217,12),m=u(m=a(m,10),d=u(d,p=u(p,b,y,m,d,e[13],2053994217,9),b,y=a(y,10),m,e[9],2053994217,12),p,b=a(b,10),y,e[7],2053994217,5),p=s(p=a(p,10),b=u(b,y=u(y,m,d,p,b,e[10],2053994217,15),m,d=a(d,10),p,e[14],2053994217,8),y,m=a(m,10),d,e[12],0,8),y=s(y=a(y,10),m=s(m,d=s(d,p,b,y,m,e[15],0,5),p,b=a(b,10),y,e[10],0,12),d,p=a(p,10),b,e[4],0,9),d=s(d=a(d,10),p=s(p,b=s(b,y,m,d,p,e[1],0,12),y,m=a(m,10),d,e[5],0,5),b,y=a(y,10),m,e[8],0,14),b=s(b=a(b,10),y=s(y,m=s(m,d,p,b,y,e[7],0,6),d,p=a(p,10),b,e[6],0,8),m,d=a(d,10),p,e[2],0,13),m=s(m=a(m,10),d=s(d,p=s(p,b,y,m,d,e[13],0,6),b,y=a(y,10),m,e[14],0,5),p,b=a(b,10),y,e[0],0,15),p=s(p=a(p,10),b=s(b,y=s(y,m,d,p,b,e[3],0,13),m,d=a(d,10),p,e[9],0,11),y,m=a(m,10),d,e[11],0,11),y=a(y,10);var v=this._b+i+y|0;this._b=this._c+o+m|0,this._c=this._d+l+d|0,this._d=this._e+r+p|0,this._e=this._a+n+b|0,this._a=v},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=o}).call(this,e("buffer").Buffer)},{buffer:84,"hash-base":161,inherits:180}],289:[function(e,t,r){const n=e("assert"),i=e("safe-buffer").Buffer;function o(e,t){if("00"===e.slice(0,2))throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function a(e,t){if(e<56)return i.from([e+t]);var r=u(e),n=u(t+55+r.length/2);return i.from(n+r,"hex")}function s(e){return"0x"===e.slice(0,2)}function u(e){var t=e.toString(16);return t.length%2&&(t="0"+t),t}function c(e){if(!i.isBuffer(e))if("string"==typeof e)e=s(e)?i.from(((r="string"!=typeof(n=e)?n:s(n)?n.slice(2):n).length%2&&(r="0"+r),r),"hex"):i.from(e);else if("number"==typeof e)e?(t=u(e),e=i.from(t,"hex")):e=i.from([]);else if(null==e)e=i.from([]);else{if(!e.toArray)throw new Error("invalid type");e=i.from(e.toArray())}var t,r,n;return e}r.encode=function(e){if(e instanceof Array){for(var t=[],n=0;nt.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(s=t.slice(n,h)).length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)u=e(s),c.push(u.data),s=u.remainder;return{data:c,remainder:t.slice(h)}}(e=c(e));return t?r:(n.equal(r.remainder.length,0,"invalid remainder"),r.data)},r.getLength=function(e){if(!e||0===e.length)return i.from([]);var t=(e=c(e))[0];if(t<=127)return e.length;if(t<=183)return t-127;if(t<=191)return t-182;if(t<=247)return t-191;var r=t-246;return r+o(e.slice(1,r).toString("hex"),16)}},{assert:19,"safe-buffer":290}],290:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:84}],291:[function(e,t,r){const n=e("util"),i=e("events/");var o="object"==typeof Reflect?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};function s(){i.call(this)}function u(e,t,r){try{a(e,t,r)}catch(e){setTimeout(()=>{throw e})}}t.exports=s,n.inherits(s,i),s.prototype.emit=function(e){for(var t=[],r=1;r0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)u(s,this,t);else{var c=s.length,f=function(e,t){for(var r=new Array(t),n=0;n0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=function(){for(var e=[],t=0;t0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var c=u.length,f=p(u,c);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return l(this,e,!0)},s.prototype.rawListeners=function(e){return l(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],293:[function(e,t,r){t.exports=e("scryptsy")},{scryptsy:294}],294:[function(e,t,r){(function(r){var n=e("pbkdf2").pbkdf2Sync,i=2147483647;function o(e,t,n,i,o){if(r.isBuffer(e)&&r.isBuffer(n))e.copy(n,i,t,t+o);else for(;o--;)n[i++]=e[t++]}t.exports=function(e,t,a,s,u,c,f){if(0===a||0!=(a&a-1))throw Error("N must be > 0 and a power of 2");if(a>i/128/s)throw Error("Parameter N is too large");if(s>i/128/u)throw Error("Parameter r is too large");var h,l=new r(256*s),d=new r(128*s*a),p=new Int32Array(16),b=new Int32Array(16),y=new r(64),m=n(e,t,1,128*u*s,"sha256");if(f){var v=u*a*2,g=0;h=function(){++g%1e3==0&&f({current:g,total:v,percent:g/v*100})}}for(var w=0;w>>32-t}function x(e){var t;for(t=0;t<16;t++)p[t]=(255&e[4*t+0])<<0,p[t]|=(255&e[4*t+1])<<8,p[t]|=(255&e[4*t+2])<<16,p[t]|=(255&e[4*t+3])<<24;for(o(p,0,b,0,16),t=8;t>0;t-=2)b[4]^=E(b[0]+b[12],7),b[8]^=E(b[4]+b[0],9),b[12]^=E(b[8]+b[4],13),b[0]^=E(b[12]+b[8],18),b[9]^=E(b[5]+b[1],7),b[13]^=E(b[9]+b[5],9),b[1]^=E(b[13]+b[9],13),b[5]^=E(b[1]+b[13],18),b[14]^=E(b[10]+b[6],7),b[2]^=E(b[14]+b[10],9),b[6]^=E(b[2]+b[14],13),b[10]^=E(b[6]+b[2],18),b[3]^=E(b[15]+b[11],7),b[7]^=E(b[3]+b[15],9),b[11]^=E(b[7]+b[3],13),b[15]^=E(b[11]+b[7],18),b[1]^=E(b[0]+b[3],7),b[2]^=E(b[1]+b[0],9),b[3]^=E(b[2]+b[1],13),b[0]^=E(b[3]+b[2],18),b[6]^=E(b[5]+b[4],7),b[7]^=E(b[6]+b[5],9),b[4]^=E(b[7]+b[6],13),b[5]^=E(b[4]+b[7],18),b[11]^=E(b[10]+b[9],7),b[8]^=E(b[11]+b[10],9),b[9]^=E(b[8]+b[11],13),b[10]^=E(b[9]+b[8],18),b[12]^=E(b[15]+b[14],7),b[13]^=E(b[12]+b[15],9),b[14]^=E(b[13]+b[12],13),b[15]^=E(b[14]+b[13],18);for(t=0;t<16;++t)p[t]=b[t]+p[t];for(t=0;t<16;t++){var r=4*t;e[r+0]=p[t]>>0&255,e[r+1]=p[t]>>8&255,e[r+2]=p[t]>>16&255,e[r+3]=p[t]>>24&255}}function k(e,t,r,n,i){for(var o=0;o=r)throw RangeError(n)}}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":181}],297:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("bip66"),o=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),a=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);r.privateKeyExport=function(e,t,r){var i=n.from(r?o:a);return e.copy(i,r?8:9),t.copy(i,r?181:214),i},r.privateKeyImport=function(e){var t=e.length,r=0;if(!(t2||t1?e[r+n-2]<<8:0);if(!(t<(r+=n)+i||t32||t1&&0===t[o]&&!(128&t[o+1]);--r,++o);for(var a=n.concat([n.from([0]),e.s]),s=33,u=0;s>1&&0===a[u]&&!(128&a[u+1]);--s,++u);return i.encode(t.slice(o),a.slice(u))},r.signatureImport=function(e){var t=n.alloc(32,0),r=n.alloc(32,0);try{var o=i.decode(e);if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long");if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(e){return}return o.r.copy(t,32-o.r.length),o.s.copy(r,32-o.s.length),{r:t,s:r}},r.signatureImportLax=function(e){var t=n.alloc(32,0),r=n.alloc(32,0),i=e.length,o=0;if(48===e[o++]){var a=e[o++];if(!(128&a&&(o+=a-128)>i)&&2===e[o++]){var s=e[o++];if(128&s){if(o+(a=s-128)>i)return;for(;a>0&&0===e[o];o+=1,a-=1);for(s=0;a>0;o+=1,a-=1)s=(s<<8)+e[o]}if(!(s>i-o)){var u=o;if(o+=s,2===e[o++]){var c=e[o++];if(128&c){if(o+(a=c-128)>i)return;for(;a>0&&0===e[o];o+=1,a-=1);for(c=0;a>0;o+=1,a-=1)c=(c<<8)+e[o]}if(!(c>i-o)){var f=o;for(o+=c;s>0&&0===e[u];s-=1,u+=1);if(!(s>32)){var h=e.slice(u,u+s);for(h.copy(t,32-h.length);c>0&&0===e[f];c-=1,f+=1);if(!(c>32)){var l=e.slice(f,f+c);return l.copy(r,32-l.length),{r:t,s:r}}}}}}}}}},{bip66:52,"safe-buffer":290}],298:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("create-hash"),o=e("bn.js"),a=e("elliptic").ec,s=e("../messages.json"),u=new a("secp256k1"),c=u.curve;function f(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(c.p)>=0)return null;var n=(r=r.toRed(c.red)).redSqr().redIMul(r).redIAdd(c.b).redSqrt();return 3===e!==n.isOdd()&&(n=n.redNeg()),u.keyPair({pub:{x:r,y:n}})}(t,e.slice(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var n=new o(t),i=new o(r);if(n.cmp(c.p)>=0||i.cmp(c.p)>=0)return null;if(n=n.toRed(c.red),i=i.toRed(c.red),(6===e||7===e)&&i.isOdd()!==(7===e))return null;var a=n.redSqr().redIMul(n);return i.redSqr().redISub(a.redIAdd(c.b)).isZero()?u.keyPair({pub:{x:n,y:i}}):null}(t,e.slice(1,33),e.slice(33,65));default:return null}}r.privateKeyVerify=function(e){var t=new o(e);return t.cmp(c.n)<0&&!t.isZero()},r.privateKeyExport=function(e,t){var r=new o(e);if(r.cmp(c.n)>=0||r.isZero())throw new Error(s.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return n.from(u.keyFromPrivate(e).getPublic(t,!0))},r.privateKeyNegate=function(e){var t=new o(e);return t.isZero()?n.alloc(32):c.n.sub(t).umod(c.n).toArrayLike(n,"be",32)},r.privateKeyModInverse=function(e){var t=new o(e);if(t.cmp(c.n)>=0||t.isZero())throw new Error(s.EC_PRIVATE_KEY_RANGE_INVALID);return t.invm(c.n).toArrayLike(n,"be",32)},r.privateKeyTweakAdd=function(e,t){var r=new o(t);if(r.cmp(c.n)>=0)throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(r.iadd(new o(e)),r.cmp(c.n)>=0&&r.isub(c.n),r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return r.toArrayLike(n,"be",32)},r.privateKeyTweakMul=function(e,t){var r=new o(t);if(r.cmp(c.n)>=0||r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);return r.imul(new o(e)),r.cmp(c.n)&&(r=r.umod(c.n)),r.toArrayLike(n,"be",32)},r.publicKeyCreate=function(e,t){var r=new o(e);if(r.cmp(c.n)>=0||r.isZero())throw new Error(s.EC_PUBLIC_KEY_CREATE_FAIL);return n.from(u.keyFromPrivate(e).getPublic(t,!0))},r.publicKeyConvert=function(e,t){var r=f(e);if(null===r)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);return n.from(r.getPublic(t,!0))},r.publicKeyVerify=function(e){return null!==f(e)},r.publicKeyTweakAdd=function(e,t,r){var i=f(e);if(null===i)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((t=new o(t)).cmp(c.n)>=0)throw new Error(s.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return n.from(c.g.mul(t).add(i.pub).encode(!0,r))},r.publicKeyTweakMul=function(e,t,r){var i=f(e);if(null===i)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((t=new o(t)).cmp(c.n)>=0||t.isZero())throw new Error(s.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return n.from(i.pub.mul(t).encode(!0,r))},r.publicKeyCombine=function(e,t){for(var r=new Array(e.length),i=0;i=0||r.cmp(c.n)>=0)throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);var i=n.from(e);return 1===r.cmp(u.nh)&&c.n.sub(r).toArrayLike(n,"be",32).copy(i,32),i},r.signatureExport=function(e){var t=e.slice(0,32),r=e.slice(32,64);if(new o(t).cmp(c.n)>=0||new o(r).cmp(c.n)>=0)throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);return{r:t,s:r}},r.signatureImport=function(e){var t=new o(e.r);t.cmp(c.n)>=0&&(t=new o(0));var r=new o(e.s);return r.cmp(c.n)>=0&&(r=new o(0)),n.concat([t.toArrayLike(n,"be",32),r.toArrayLike(n,"be",32)])},r.sign=function(e,t,r,i){if("function"==typeof r){var a=r;r=function(r){var u=a(e,t,null,i,r);if(!n.isBuffer(u)||32!==u.length)throw new Error(s.ECDSA_SIGN_FAIL);return new o(u)}}var f=new o(t);if(f.cmp(c.n)>=0||f.isZero())throw new Error(s.ECDSA_SIGN_FAIL);var h=u.sign(e,t,{canonical:!0,k:r,pers:i});return{signature:n.concat([h.r.toArrayLike(n,"be",32),h.s.toArrayLike(n,"be",32)]),recovery:h.recoveryParam}},r.verify=function(e,t,r){var n={r:t.slice(0,32),s:t.slice(32,64)},i=new o(n.r),a=new o(n.s);if(i.cmp(c.n)>=0||a.cmp(c.n)>=0)throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);if(1===a.cmp(u.nh)||i.isZero()||a.isZero())return!1;var h=f(r);if(null===h)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);return u.verify(e,n,{x:h.pub.x,y:h.pub.y})},r.recover=function(e,t,r,i){var a={r:t.slice(0,32),s:t.slice(32,64)},f=new o(a.r),h=new o(a.s);if(f.cmp(c.n)>=0||h.cmp(c.n)>=0)throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);try{if(f.isZero()||h.isZero())throw new Error;var l=u.recoverPubKey(e,a,r);return n.from(l.encode(!0,i))}catch(e){throw new Error(s.ECDSA_RECOVER_FAIL)}},r.ecdh=function(e,t){var n=r.ecdhUnsafe(e,t,!0);return i("sha256").update(n).digest()},r.ecdhUnsafe=function(e,t,r){var i=f(e);if(null===i)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);var a=new o(t);if(a.cmp(c.n)>=0||a.isZero())throw new Error(s.ECDH_FAIL);return n.from(i.pub.mul(a).encode(!0,r))}},{"../messages.json":300,"bn.js":53,"create-hash":91,elliptic:109,"safe-buffer":290}],299:[function(e,t,r){"use strict";var n=e("./assert"),i=e("./der"),o=e("./messages.json");function a(e,t){return void 0===e?t:(n.isBoolean(e,o.COMPRESSED_TYPE_INVALID),e)}t.exports=function(e){return{privateKeyVerify:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),32===t.length&&e.privateKeyVerify(t)},privateKeyExport:function(t,r){n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=a(r,!0);var s=e.privateKeyExport(t,r);return i.privateKeyExport(t,s,r)},privateKeyImport:function(t){if(n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),(t=i.privateKeyImport(t))&&32===t.length&&e.privateKeyVerify(t))return t;throw new Error(o.EC_PRIVATE_KEY_IMPORT_DER_FAIL)},privateKeyNegate:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyNegate(t)},privateKeyModInverse:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyModInverse(t)},privateKeyTweakAdd:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakAdd(t,r)},privateKeyTweakMul:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakMul(t,r)},publicKeyCreate:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=a(r,!0),e.publicKeyCreate(t,r)},publicKeyConvert:function(t,r){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),r=a(r,!0),e.publicKeyConvert(t,r)},publicKeyVerify:function(t){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),e.publicKeyVerify(t)},publicKeyTweakAdd:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=a(i,!0),e.publicKeyTweakAdd(t,r,i)},publicKeyTweakMul:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=a(i,!0),e.publicKeyTweakMul(t,r,i)},publicKeyCombine:function(t,r){n.isArray(t,o.EC_PUBLIC_KEYS_TYPE_INVALID),n.isLengthGTZero(t,o.EC_PUBLIC_KEYS_LENGTH_INVALID);for(var i=0;i=2&&("function"==typeof arguments[1]?r.task=arguments[1]:r.n=arguments[1]);var n=r.task;if(r.task=function(){n(t.leave)},t.current+r.n-e>t.capacity)return 1===e&&(t.current--,t.firstHere=!1),t.queue.push(r);t.current+=r.n-e,r.task(t.leave),1===e&&(t.firstHere=!1)},leave:function(e){if(e=e||1,t.current-=e,t.queue.length){var r=t.queue[0];r.n+t.current>t.capacity||(t.queue.shift(),t.current+=r.n,i(r.task))}else if(t.current<0)throw new Error("leave called too many times.")},available:function(e){return e=e||1,t.current+e<=t.capacity}};return t}void 0!==e&&e&&"function"==typeof e.nextTick&&(i=e.nextTick),"object"==typeof r?t.exports=o:"function"==typeof define&&define.amd?define(function(){return o}):n.semaphore=o}(this)}).call(this,e("_process"))},{_process:257}],302:[function(e,t,r){"use strict";t.exports="function"==typeof setImmediate?setImmediate:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}},{}],303:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":290}],304:[function(e,t,r){(r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":305,"./sha1":306,"./sha224":307,"./sha256":308,"./sha384":309,"./sha512":310}],305:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var l=0;l<80;++l){var d=~~(l/20),p=0|((t=n)<<5|t>>>27)+f(d,i,o,s)+u+r[l]+a[d];u=s,s=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=u},{"./hash":303,inherits:180,"safe-buffer":290}],306:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=(t=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|t>>>31;for(var d=0;d<80;++d){var p=~~(d/20),b=c(n)+h(p,i,o,s)+u+r[d]+a[p]|0;u=s,s=o,o=f(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=u},{"./hash":303,inherits:180,"safe-buffer":290}],307:[function(e,t,r){var n=e("inherits"),i=e("./sha256"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=u},{"./hash":303,"./sha256":308,inherits:180,"safe-buffer":290}],308:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,b=0|this._g,y=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+d(r[m-15])+r[m-16];for(var v=0;v<64;++v){var g=y+l(u)+c(u,p,b)+a[v]+r[v]|0,w=h(n)+f(n,i,o)|0;y=b,b=p,p=u,u=s+g|0,s=o,o=i,i=n,n=g+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=u},{"./hash":303,inherits:180,"safe-buffer":290}],309:[function(e,t,r){var n=e("inherits"),i=e("./sha512"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=u},{"./hash":303,"./sha512":310,inherits:180,"safe-buffer":290}],310:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,v=0|this._gh,g=0|this._hh,w=0|this._al,_=0|this._bl,A=0|this._cl,E=0|this._dl,x=0|this._el,k=0|this._fl,S=0|this._gl,M=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var T=t[I-30],U=t[I-30+1],j=d(T,U),B=p(U,T),P=b(T=t[I-4],U=t[I-4+1]),C=y(U,T),N=t[I-14],R=t[I-14+1],L=t[I-32],O=t[I-32+1],D=B+R|0,F=j+N+m(D,B)|0;F=(F=F+P+m(D=D+C|0,C)|0)+L+m(D=D+O|0,O)|0,t[I]=F,t[I+1]=D}for(var q=0;q<160;q+=2){F=t[q],D=t[q+1];var H=f(r,n,i),z=f(w,_,A),K=h(r,w),V=h(w,r),G=l(s,x),W=l(x,s),Y=a[q],X=a[q+1],Z=c(s,u,v),J=c(x,k,S),$=M+W|0,Q=g+G+m($,M)|0;Q=(Q=(Q=Q+Z+m($=$+J|0,J)|0)+Y+m($=$+X|0,X)|0)+F+m($=$+D|0,D)|0;var ee=V+z|0,te=K+H+m(ee,V)|0;g=v,M=S,v=u,S=k,u=s,k=x,s=o+Q+m(x=E+$|0,E)|0,o=i,E=A,i=n,A=_,n=r,_=w,r=Q+te+m(w=$+ee|0,$)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+A|0,this._dl=this._dl+E|0,this._el=this._el+x|0,this._fl=this._fl+k|0,this._gl=this._gl+S|0,this._hl=this._hl+M|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,A)|0,this._dh=this._dh+o+m(this._dl,E)|0,this._eh=this._eh+s+m(this._el,x)|0,this._fh=this._fh+u+m(this._fl,k)|0,this._gh=this._gh+v+m(this._gl,S)|0,this._hh=this._hh+g+m(this._hl,M)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=u},{"./hash":303,inherits:180,"safe-buffer":290}],311:[function(e,t,r){t.exports=i;var n=e("events").EventEmitter;function i(){n.call(this)}e("inherits")(i,n),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",c),e.on("error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},{events:157,inherits:180,"readable-stream/duplex.js":275,"readable-stream/passthrough.js":284,"readable-stream/readable.js":285,"readable-stream/transform.js":286,"readable-stream/writable.js":287}],312:[function(e,t,r){(function(t){var n=e("./lib/request"),i=e("./lib/response"),o=e("xtend"),a=e("builtin-status-codes"),s=e("url"),u=r;u.request=function(e,r){e="string"==typeof e?s.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,c=e.port,f=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+f,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var h=new n(e);return r&&h.on("response",r),h},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":314,"./lib/response":315,"builtin-status-codes":85,url:327,xtend:423}],313:[function(e,t,r){(function(e){r.fetch=s(e.fetch)&&s(e.ReadableStream),r.writableStream=s(e.WritableStream),r.abortController=s(e.AbortController),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(e){}var t;function n(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function i(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var o=void 0!==e.ArrayBuffer,a=o&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}r.arraybuffer=r.fetch||o&&i("arraybuffer"),r.msstream=!r.fetch&&a&&i("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&o&&i("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!n()&&s(n().overrideMimeType),r.vbArray=s(e.VBArray),t=null}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],314:[function(e,t,r){(function(r,n,i){var o=e("./capability"),a=e("inherits"),s=e("./response"),u=e("readable-stream"),c=e("to-arraybuffer"),f=s.IncomingMessage,h=s.readyStates;var l=t.exports=function(e){var t,r=this;u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+new i(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){r.setHeader(t,e.headers[t])});var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":o.vbArray&&e?"text:vbarray":"text"}(t,n),r.on("finish",function(){r._onFinish()})};a(l,u.Writable),l.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===d.indexOf(r)&&(this._headers[r]={name:e,value:t})},l.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},l.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},l.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,a=e._headers,s=null;"GET"!==t.method&&"HEAD"!==t.method&&(s=o.arraybuffer?c(i.concat(e._body)):o.blobConstructor?new n.Blob(e._body.map(function(e){return c(e)}),{type:(a["content-type"]||{}).value||""}):i.concat(e._body).toString());var u=[];if(Object.keys(a).forEach(function(e){var t=a[e].name,r=a[e].value;Array.isArray(r)?r.forEach(function(e){u.push([t,e])}):u.push([t,r])}),"fetch"===e._mode){var f=null;if(o.abortController){var l=new AbortController;f=l.signal,e._fetchAbortController=l,"requestTimeout"in t&&0!==t.requestTimeout&&n.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout)}n.fetch(e._opts.url,{method:e._opts.method,headers:u,body:s||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:f}).then(function(t){e._fetchResponse=t,e._connect()},function(t){e.emit("error",t)})}else{var d=e._xhr=new n.XMLHttpRequest;try{d.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}"responseType"in d&&(d.responseType=e._mode.split(":")[0]),"withCredentials"in d&&(d.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(d.timeout=t.requestTimeout,d.ontimeout=function(){e.emit("requestTimeout")}),u.forEach(function(e){d.setRequestHeader(e[0],e[1])}),e._response=null,d.onreadystatechange=function(){switch(d.readyState){case h.LOADING:case h.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(d.onprogress=function(){e._onXHRProgress()}),d.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{d.send(s)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}}}},l.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},l.prototype._connect=function(){var e=this;e._destroyed||(e._response=new f(e._xhr,e._fetchResponse,e._mode),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},l.prototype._write=function(e,t,r){this._body.push(e),r()},l.prototype.abort=l.prototype.destroy=function(){this._destroyed=!0,this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},l.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},l.prototype.flushHeaders=function(){},l.prototype.setTimeout=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":313,"./response":315,_process:257,buffer:84,inherits:180,"readable-stream":285,"to-arraybuffer":323}],315:[function(e,t,r){(function(t,n,i){var o=e("./capability"),a=e("inherits"),s=e("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=r.IncomingMessage=function(e,r,n){var a=this;if(s.Readable.call(a),a._mode=n,a.headers={},a.rawHeaders=[],a.trailers={},a.rawTrailers=[],a.on("end",function(){t.nextTick(function(){a.emit("close")})}),"fetch"===n){if(a._fetchResponse=r,a.url=r.url,a.statusCode=r.status,a.statusMessage=r.statusText,r.headers.forEach(function(e,t){a.headers[t.toLowerCase()]=e,a.rawHeaders.push(t,e)}),o.writableStream){var u=new WritableStream({write:function(e){return new Promise(function(t,r){a._destroyed||(a.push(new i(e))?t():a._resumeFetch=t)})},close:function(){a._destroyed||a.push(null)},abort:function(e){a._destroyed||a.emit("error",e)}});try{return void r.body.pipeTo(u)}catch(e){}}var c=r.body.getReader();!function e(){c.read().then(function(t){a._destroyed||(t.done?a.push(null):(a.push(new i(t.value)),e()))}).catch(function(e){a._destroyed||a.emit("error",e)})}()}else{if(a._xhr=e,a._pos=0,a.url=e.responseURL,a.statusCode=e.status,a.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===a.headers[r]&&(a.headers[r]=[]),a.headers[r].push(t[2])):void 0!==a.headers[r]?a.headers[r]+=", "+t[2]:a.headers[r]=t[2],a.rawHeaders.push(t[1],t[2])}}),a._charset="x-user-defined",!o.overrideMimeType){var f=a.rawHeaders["mime-type"];if(f){var h=f.match(/;\s*charset=([^;])(;|$)/);h&&(a._charset=h[1].toLowerCase())}a._charset||(a._charset="utf-8")}}};a(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new i(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var o=r.substr(e._pos);if("x-user-defined"===e._charset){for(var a=new i(o.length),s=0;se._pos&&(e.push(new i(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(r)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":313,_process:257,buffer:84,inherits:180,"readable-stream":285}],316:[function(e,t,r){"use strict";t.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},{}],317:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=h,t=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(r);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(r+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(r+2)}}(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":290}],318:[function(e,t,r){var n=e("is-hex-prefixed");t.exports=function(e){return"string"!=typeof e?e:n(e)?e.slice(2):e}},{"is-hex-prefixed":185}],319:[function(e,t,r){var n=function(){throw"This swarm.js function isn't available on the browser."},i={readFile:n},o={download:n,safeDownloadArchived:n,directoryTree:n},a={platform:n,arch:n},s={join:n,slice:n},u={spawn:n},c={lookup:n},f=e("xhr-request-promise"),h=e("eth-lib/lib/bytes"),l=e("./swarm-hash.js"),d=e("./pick.js"),p=e("./swarm");t.exports=p({fsp:i,files:o,os:a,path:s,child_process:u,defaultArchives:{},mimetype:c,request:f,downloadUrl:null,bytes:h,hash:l,pick:d})},{"./pick.js":320,"./swarm":322,"./swarm-hash.js":321,"eth-lib/lib/bytes":133,"xhr-request-promise":411}],320:[function(e,t,r){var n=function(e){return function(){return new Promise(function(t,r){var n=function(r){var n={},i=r.target.files.length,o=0;[].map.call(r.target.files,function(r){var a=new FileReader;a.onload=function(a){var s=new Uint8Array(a.target.result);if("directory"===e){var u=r.webkitRelativePath;n[u.slice(u.indexOf("/")+1)]={type:"text/plain",data:s},++o===i&&t(n)}else if("file"===e){var c=r.webkitRelativePath;t({type:mimetype.lookup(c),data:s})}else t(s)},a.readAsArrayBuffer(r)})},i=void 0;"directory"===e?((i=document.createElement("input")).addEventListener("change",n),i.type="file",i.webkitdirectory=!0,i.mozdirectory=!0,i.msdirectory=!0,i.odirectory=!0,i.directory=!0):((i=document.createElement("input")).addEventListener("change",n),i.type="file");var o=document.createEvent("MouseEvents");o.initEvent("click",!0,!1),i.dispatchEvent(o)})}};t.exports={data:n("data"),file:n("file"),directory:n("directory")}},{}],321:[function(e,t,r){var n=e("eth-lib/lib/hash").keccak256,i=e("eth-lib/lib/bytes"),o=function(e,t){var r=i.reverse(i.pad(6,i.fromNumber(e))),o=i.flatten([r,"0x0000",t]);return n(o).slice(2)};t.exports=function e(t){"string"==typeof t&&"0x"!==t.slice(0,2)?t=i.fromString(t):"string"!=typeof t&&void 0!==t.length&&(t=i.fromUint8Array(t));var r=i.length(t);if(r<=4096)return o(r,t);for(var n=4096;128*n0){var a=i.join(r,o);n.push(g(e)(t[o])(a))}return Promise.all(n).then(function(){return r})})}}},_=function(e){return function(t){return u(e+"/bzzr:/",{body:"string"==typeof t?L(t):t,method:"POST"})}},A=function(e){return function(t){return function(r){return function(n){return function i(o){var a="/"===r[0]?r:"/"+r,s=e+"/bzz:/"+t+a,c={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return u(s,c).then(function(e){if(-1!==e.indexOf("error"))throw e;return e}).catch(function(e){return o>0&&i(o-1)})}(3)}}}},E=function(e){return function(t){return k(e)({"":t})}},x=function(e){return function(r){return t.readFile(r).then(function(t){return E(e)({type:a.lookup(r),data:t})})}},k=function(e){return function(t){return _(e)("{}").then(function(r){return Object.keys(t).reduce(function(r,n){return r.then(function(r){return function(n){return A(e)(n)(r)(t[r])}}(n))},Promise.resolve(r))})}},S=function(e){return function(r){return t.readFile(r).then(_(e))}},M=function(e){return function(n){return function(i){return r.directoryTree(i).then(function(e){return Promise.all(e.map(function(e){return t.readFile(e)})).then(function(t){var r=e.map(function(e){return e.slice(i.length)}),n=e.map(function(e){return a.lookup(e)||"text/plain"});return d(r)(t.map(function(e,t){return{type:n[t],data:e}}))})}).then(function(e){return(t=n?{"":e[n]}:{},function(e){var r={};for(var n in t)r[n]=t[n];for(var i in e)r[i]=e[i];return r})(e);var t}).then(k(e))}}},I=function(e){return function(t){if("data"===t.pick)return l.data().then(_(e));if("file"===t.pick)return l.file().then(E(e));if("directory"===t.pick)return l.directory().then(k(e));if(t.path)switch(t.kind){case"data":return S(e)(t.path);case"file":return x(e)(t.path);case"directory":return M(e)(t.defaultFile)(t.path)}else{if(t.length||"string"==typeof t)return _(e)(t);if(t instanceof Object)return k(e)(t)}return Promise.reject(new Error("Bad arguments"))}},T=function(e){return function(t){return function(r){return C(e)(t).then(function(n){return n?r?w(e)(t)(r):v(e)(t):r?g(e)(t)(r):b(e)(t)})}}},U=function(e,t){var i=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),o=(t||s)[i],a=c+o.archive+".tar.gz",u=o.archiveMD5,f=o.binaryMD5;return r.safeDownloadArchived(a)(u)(f)(e)},j=function(e){return new Promise(function(t,r){var n=o.spawn,i=function(e){return function(t){return-1!==(""+t).indexOf(e)}},a=e.account,s=e.password,u=e.dataDir,c=e.ensApi,f=e.privateKey,h=0,l=n(e.binPath,["--bzzaccount",a||f,"--datadir",u,"--ens-api",c]),d=function(e){0===h&&i("Passphrase")(e)?setTimeout(function(){h=1,l.stdin.write(s+"\n")},500):i("Swarm http proxy started")(e)&&(h=2,clearTimeout(p),t(l))};l.stdout.on("data",d),l.stderr.on("data",d);var p=setTimeout(function(){return r(new Error("Couldn't start swarm process."))},2e4)})},B=function(e){return new Promise(function(t,r){e.stderr.removeAllListeners("data"),e.stdout.removeAllListeners("data"),e.stdin.removeAllListeners("error"),e.removeAllListeners("error"),e.removeAllListeners("exit"),e.kill("SIGINT");var n=setTimeout(function(){return e.kill("SIGKILL")},8e3);e.once("close",function(){clearTimeout(n),t()})})},P=function(e){return _(e)("test").then(function(e){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===e}).catch(function(){return!1})},C=function(e){return function(t){return b(e)(t).then(function(e){try{return!!JSON.parse(R(e)).entries}catch(e){return!1}})}},N=function(e){return function(t,r,n,i,o){var a;return void 0!==t&&(a=e(t)),void 0!==r&&(a=e(r)),void 0!==n&&(a=e(n)),void 0!==i&&(a=e(i)),void 0!==o&&(a=e(o)),a}},R=function(e){return f.toString(f.fromUint8Array(e))},L=function(e){return f.toUint8Array(f.fromString(e))},O=function(e){return{download:function(t,r){return T(e)(t)(r)},downloadData:N(b(e)),downloadDataToDisk:N(g(e)),downloadDirectory:N(v(e)),downloadDirectoryToDisk:N(w(e)),downloadEntries:N(y(e)),downloadRoutes:N(m(e)),isAvailable:function(){return P(e)},upload:function(t){return I(e)(t)},uploadData:N(_(e)),uploadFile:N(E(e)),uploadFileFromDisk:N(E(e)),uploadDataFromDisk:N(S(e)),uploadDirectory:N(k(e)),uploadDirectoryFromDisk:N(M(e)),uploadToManifest:N(A(e)),pick:l,hash:h,fromString:L,toString:R}};return{at:O,local:function(e){return function(t){return P("http://localhost:8500").then(function(r){return r?t(O("http://localhost:8500")).then(function(){}):U(e.binPath,e.archives).onData(function(t){return(e.onProgress||function(){})(t.length)}).then(function(){return j(e)}).then(function(e){return t(O("http://localhost:8500")).then(function(){return e})}).then(B)})}},download:T,downloadBinary:U,downloadData:b,downloadDataToDisk:g,downloadDirectory:v,downloadDirectoryToDisk:w,downloadEntries:y,downloadRoutes:m,isAvailable:P,startProcess:j,stopProcess:B,upload:I,uploadData:_,uploadDataFromDisk:S,uploadFile:E,uploadFileFromDisk:x,uploadDirectory:k,uploadDirectoryFromDisk:M,uploadToManifest:A,pick:l,hash:h,fromString:L,toString:R}}},{}],323:[function(e,t,r){var n=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,i=0;i=0&&t<=A};function k(e){return function(t,r,n,i){r=m(r,i,4);var o=!x(t)&&y.keys(t),a=(o||t).length,s=e>0?0:a-1;return arguments.length<3&&(n=t[o?o[s]:s],s+=e),function(t,r,n,i,o,a){for(;o>=0&&o=0},y.invoke=function(e,t){var r=u.call(arguments,2),n=y.isFunction(t);return y.map(e,function(e){var i=n?t:e[t];return null==i?i:i.apply(e,r)})},y.pluck=function(e,t){return y.map(e,y.property(t))},y.where=function(e,t){return y.filter(e,y.matcher(t))},y.findWhere=function(e,t){return y.find(e,y.matcher(t))},y.max=function(e,t,r){var n,i,o=-1/0,a=-1/0;if(null==t&&null!=e)for(var s=0,u=(e=x(e)?e:y.values(e)).length;so&&(o=n);else t=v(t,r),y.each(e,function(e,r,n){((i=t(e,r,n))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)});return o},y.min=function(e,t,r){var n,i,o=1/0,a=1/0;if(null==t&&null!=e)for(var s=0,u=(e=x(e)?e:y.values(e)).length;sn||void 0===r)return 1;if(r0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(r&&o&&s)return n[o=r(n,i)]===i?o:-1;if(i!=i)return(o=t(u.call(n,a,s),y.isNaN))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&ot?(a&&(clearTimeout(a),a=null),s=c,o=e.apply(n,i),a||(n=i=null)):a||!1===r.trailing||(a=setTimeout(u,f)),o}},y.debounce=function(e,t,r){var n,i,o,a,s,u=function(){var c=y.now()-a;c=0?n=setTimeout(u,t-c):(n=null,r||(s=e.apply(o,i),n||(o=i=null)))};return function(){o=this,i=arguments,a=y.now();var c=r&&!n;return n||(n=setTimeout(u,t)),c&&(s=e.apply(o,i),o=i=null),s}},y.wrap=function(e,t){return y.partial(t,e)},y.negate=function(e){return function(){return!e.apply(this,arguments)}},y.compose=function(){var e=arguments,t=e.length-1;return function(){for(var r=t,n=e[t].apply(this,arguments);r--;)n=e[r].call(this,n);return n}},y.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},y.before=function(e,t){var r;return function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=null),r}},y.once=y.partial(y.before,2);var j=!{toString:null}.propertyIsEnumerable("toString"),B=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function P(e,t){var r=B.length,n=e.constructor,i=y.isFunction(n)&&n.prototype||o,a="constructor";for(y.has(e,a)&&!y.contains(t,a)&&t.push(a);r--;)(a=B[r])in e&&e[a]!==i[a]&&!y.contains(t,a)&&t.push(a)}y.keys=function(e){if(!y.isObject(e))return[];if(l)return l(e);var t=[];for(var r in e)y.has(e,r)&&t.push(r);return j&&P(e,t),t},y.allKeys=function(e){if(!y.isObject(e))return[];var t=[];for(var r in e)t.push(r);return j&&P(e,t),t},y.values=function(e){for(var t=y.keys(e),r=t.length,n=Array(r),i=0;i":">",'"':""","'":"'","`":"`"},R=y.invert(N),L=function(e){var t=function(t){return e[t]},r="(?:"+y.keys(e).join("|")+")",n=RegExp(r),i=RegExp(r,"g");return function(e){return e=null==e?"":""+e,n.test(e)?e.replace(i,t):e}};y.escape=L(N),y.unescape=L(R),y.result=function(e,t,r){var n=null==e?void 0:e[t];return void 0===n&&(n=r),y.isFunction(n)?n.call(e):n};var O=0;y.uniqueId=function(e){var t=++O+"";return e?e+t:t},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var D=/(.)^/,F={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},q=/\\|'|\r|\n|\u2028|\u2029/g,H=function(e){return"\\"+F[e]};y.template=function(e,t,r){!t&&r&&(t=r),t=y.defaults({},t,y.templateSettings);var n=RegExp([(t.escape||D).source,(t.interpolate||D).source,(t.evaluate||D).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(n,function(t,r,n,a,s){return o+=e.slice(i,s).replace(q,H),i=s+t.length,r?o+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t}),o+="';\n",t.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(t.variable||"obj","_",o)}catch(e){throw e.source=o,e}var s=function(e){return a.call(this,e,y)},u=t.variable||"obj";return s.source="function("+u+"){\n"+o+"}",s},y.chain=function(e){var t=y(e);return t._chain=!0,t};var z=function(e,t){return e._chain?y(t).chain():t};y.mixin=function(e){y.each(y.functions(e),function(t){var r=y[t]=e[t];y.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),z(this,r.apply(y,e))}})},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=i[e];y.prototype[e]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==e&&"splice"!==e||0!==r.length||delete r[0],z(this,r)}}),y.each(["concat","join","slice"],function(e){var t=i[e];y.prototype[e]=function(){return z(this,t.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return y})}).call(this)},{}],326:[function(e,t,r){t.exports=function(e,t){if(t){t=(t=t.trim().replace(/^(\?|#|&)/,""))?"?"+t:t;var r=e.split(/[\?\#]/),n=r[0];t&&/\:\/\/[^\/]*$/.test(n)&&(n+="/");var i=e.match(/(\#.*)$/);e=n+t,i&&(e+=i[0])}return e}},{}],327:[function(e,t,r){"use strict";var n=e("punycode"),i=e("./util");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=g,r.resolve=function(e,t){return g(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?g(e,!1,!0).resolveObject(t):t},r.format=function(e){i.isString(e)&&(e=g(e));return e instanceof o?e.format():o.prototype.format.call(e)},r.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(c),h=["%","/","?",";","#"].concat(f),l=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=e("querystring");function g(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o127?P+="x":P+=B[C];if(!P.match(d)){var R=U.slice(0,M),L=U.slice(M+1),O=B.match(p);O&&(R.push(O[1]),L.unshift(O[2])),L.length&&(g="/"+L.join(".")+g),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+D,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==g[0]&&(g="/"+g))}if(!b[A])for(M=0,j=f.length;M0)&&r.host.split("@"))&&(r.auth=T.shift(),r.host=r.hostname=T.shift());return r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=E.slice(-1)[0],S=(r.host||e.host||E.length>1)&&("."===k||".."===k)||""===k,M=0,I=E.length;I>=0;I--)"."===(k=E[I])?E.splice(I,1):".."===k?(E.splice(I,1),M++):M&&(E.splice(I,1),M--);if(!_&&!A)for(;M--;M)E.unshift("..");!_||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),S&&"/"!==E.join("/").substr(-1)&&E.push("");var T,U=""===E[0]||E[0]&&"/"===E[0].charAt(0);x&&(r.hostname=r.host=U?"":E.length?E.shift():"",(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.host=r.hostname=T.shift()));return(_=_||r.host&&E.length)&&!U&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":328,punycode:265,querystring:269}],328:[function(e,t,r){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],329:[function(e,t,r){(function(e){!function(n){var i="object"==typeof r&&r,o="object"==typeof t&&t&&t.exports==i&&t,a="object"==typeof e&&e;a.global!==a&&a.window!==a||(n=a);var s,u,c,f=String.fromCharCode;function h(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function d(e,t){return f(e>>t&63|128)}function p(e){if(0==(4294967168&e))return f(e);var t="";return 0==(4294965248&e)?t=f(e>>6&31|192):0==(4294901760&e)?(l(e),t=f(e>>12&15|224),t+=d(e,6)):0==(4292870144&e)&&(t=f(e>>18&7|240),t+=d(e,12),t+=d(e,6)),t+=f(63&e|128)}function b(){if(c>=u)throw Error("Invalid byte index");var e=255&s[c];if(c++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function y(){var e,t;if(c>u)throw Error("Invalid byte index");if(c==u)return!1;if(e=255&s[c],c++,0==(128&e))return e;if(192==(224&e)){if((t=(31&e)<<6|b())>=128)return t;throw Error("Invalid continuation byte")}if(224==(240&e)){if((t=(15&e)<<12|b()<<6|b())>=2048)return l(t),t;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=(15&e)<<18|b()<<12|b()<<6|b())>=65536&&t<=1114111)return t;throw Error("Invalid UTF-8 detected")}var m={version:"2.0.0",encode:function(e){for(var t=h(e),r=t.length,n=-1,i="";++n65535&&(i+=f((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=f(t);return i}(r)}};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return m});else if(i&&!i.nodeType)if(o)o.exports=m;else{var v={}.hasOwnProperty;for(var g in m)v.call(m,g)&&(i[g]=m[g])}else n.utf8=m}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],330:[function(e,t,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],331:[function(e,t,r){arguments[4][180][0].apply(r,arguments)},{dup:180}],332:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],333:[function(e,t,r){(function(t,n){var i=/%[sdj%]/g;r.format=function(e){if(!m(e)){for(var t=[],r=0;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,e,n.depth)}function u(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function f(e,t,n){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return m(i)||(i=f(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(y(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(b(t))return e.stylize("null","null")}(e,t);if(o)return o;var a=Object.keys(t),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),A(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(t);if(0===a.length){if(E(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(g(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(_(t))return e.stylize(Date.prototype.toString.call(t),"date");if(A(t))return h(t)}var c,w="",x=!1,k=["{","}"];(d(t)&&(x=!0,k=["[","]"]),E(t))&&(w=" [Function"+(t.name?": "+t.name:"")+"]");return g(t)&&(w=" "+RegExp.prototype.toString.call(t)),_(t)&&(w=" "+Date.prototype.toUTCString.call(t)),A(t)&&(w=" "+h(t)),0!==a.length||x&&0!=t.length?n<0?g(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=x?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,w,k)):k[0]+w+k[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),M(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=b(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function b(e){return null===e}function y(e){return"number"==typeof e}function m(e){return"string"==typeof e}function v(e){return void 0===e}function g(e){return w(e)&&"[object RegExp]"===x(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===x(e)}function A(e){return w(e)&&("[object Error]"===x(e)||e instanceof Error)}function E(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(v(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var n=t.pid;a[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else a[e]=function(){};return a[e]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=p,r.isNull=b,r.isNullOrUndefined=function(e){return null==e},r.isNumber=y,r.isString=m,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=v,r.isRegExp=g,r.isObject=w,r.isDate=_,r.isError=A,r.isFunction=E,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){var e,t;console.log("%s - %s",(e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":"),[e.getDate(),S[e.getMonth()],t].join(" ")),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":332,_process:257,inherits:331}],334:[function(require,module,exports){var indexOf=require("indexof"),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},c.prototype.getCall=function(e){return n.isFunction(this.call)?this.call(e):this.call},c.prototype.extractCallback=function(e){if(n.isFunction(e[e.length-1]))return e.pop()},c.prototype.validateArgs=function(e){if(e.length!==this.params)throw i.InvalidNumberOfParams(e.length,this.params,this.name)},c.prototype.formatInput=function(e){var t=this;return this.inputFormatter?this.inputFormatter.map(function(r,n){return r?r.call(t,e[n]):e[n]}):e},c.prototype.formatOutput=function(e){var t=this;return n.isArray(e)?e.map(function(e){return t.outputFormatter&&e?t.outputFormatter(e):e}):this.outputFormatter&&e?this.outputFormatter(e):e},c.prototype.toPayload=function(e){var t=this.getCall(e),r=this.extractCallback(e),n=this.formatInput(e);this.validateArgs(n);var i={method:t,params:n,callback:r};return this.transformPayload&&(i=this.transformPayload(i)),i},c.prototype._confirmTransaction=function(e,t,r){var i=this,f=!1,h=!0,l=0,d=0,p=null,b="",y=n.isObject(r.params[0])&&r.params[0].gas?r.params[0].gas:null,m=n.isObject(r.params[0])&&r.params[0].data&&r.params[0].from&&!r.params[0].to,v=[new c({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:o.outputTransactionReceiptFormatter}),new c({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter]}),new u({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:o.outputBlockFormatter}}})],g={};n.each(v,function(e){e.attachToObject(g),e.requestManager=i.requestManager});var w=function(r,n,o,u,c){if(!o)return c||(c={unsubscribe:function(){clearInterval(p)}}),(r?s.resolve(r):g.getTransactionReceipt(t)).catch(function(t){c.unsubscribe(),f=!0,a._fireError({message:"Failed to check for transaction receipt:",data:t},e.eventEmitter,e.reject)}).then(function(t){if(!t||!t.blockHash)throw new Error("Receipt missing or blockHash null");return i.extraFormatters&&i.extraFormatters.receiptFormatter&&(t=i.extraFormatters.receiptFormatter(t)),e.eventEmitter.listeners("confirmation").length>0&&(void 0!==r&&0===d||e.eventEmitter.emit("confirmation",d,t),h=!1,25===++d&&(c.unsubscribe(),e.eventEmitter.removeAllListeners())),t}).then(function(t){if(m&&!f){if(!t.contractAddress)return h&&(c.unsubscribe(),f=!0),void a._fireError(new Error("The transaction receipt didn't contain a contract address."),e.eventEmitter,e.reject);g.getCode(t.contractAddress,function(r,n){n&&(n.length>2?(e.eventEmitter.emit("receipt",t),i.extraFormatters&&i.extraFormatters.contractDeployFormatter?e.resolve(i.extraFormatters.contractDeployFormatter(t)):e.resolve(t),h&&e.eventEmitter.removeAllListeners()):a._fireError(new Error("The contract code couldn't be stored, please check your gas limit."),e.eventEmitter,e.reject),h&&c.unsubscribe(),f=!0)})}return t}).then(function(t){m||f||(t.outOfGas||y&&y===t.gasUsed||!0!==t.status&&"0x1"!==t.status&&void 0!==t.status?(b=JSON.stringify(t,null,2),!1===t.status||"0x0"===t.status?a._fireError(new Error("Transaction has been reverted by the EVM:\n"+b),e.eventEmitter,e.reject):a._fireError(new Error("Transaction ran out of gas. Please provide more gas:\n"+b),e.eventEmitter,e.reject)):(e.eventEmitter.emit("receipt",t),e.resolve(t),h&&e.eventEmitter.removeAllListeners()),h&&c.unsubscribe(),f=!0)}).catch(function(){l++,n?l-1>=750&&(c.unsubscribe(),f=!0,a._fireError(new Error("Transaction was not mined within750 seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject)):l-1>=50&&(c.unsubscribe(),f=!0,a._fireError(new Error("Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject))});c.unsubscribe(),f=!0,a._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:o},e.eventEmitter,e.reject)},_=function(e){n.isFunction(this.requestManager.provider.on)?g.subscribe("newBlockHeaders",w.bind(null,e,!1)):p=setInterval(w.bind(null,e,!0),1e3)}.bind(this);g.getTransactionReceipt(t).then(function(t){t&&t.blockHash?(e.eventEmitter.listeners("confirmation").length>0&&_(t),w(t,!1)):f||_()}).catch(function(){f||_()})};var f=function(e,t){return n.isNumber(e)?t.wallet[e]:n.isObject(e)&&e.address&&e.privateKey?e:t.wallet[e.toLowerCase()]};c.prototype.buildCall=function(){var e=this,t="eth_sendTransaction"===e.call||"eth_sendRawTransaction"===e.call,r=function(){var r=s(!t),i=e.toPayload(Array.prototype.slice.call(arguments)),o=function(n,o){try{o=e.formatOutput(o)}catch(e){n=e}if(o instanceof Error&&(n=o),n)return n.error&&(n=n.error),a._fireError(n,r.eventEmitter,r.reject,i.callback);i.callback&&i.callback(null,o),t?(r.eventEmitter.emit("transactionHash",o),e._confirmTransaction(r,o,i)):n||r.resolve(o)},u=function(t){var r=n.extend({},i,{method:"eth_sendRawTransaction",params:[t.rawTransaction]});e.requestManager.send(r,o)},h=function(e,t){var i;if(t&&t.accounts&&t.accounts.wallet&&t.accounts.wallet.length)if("eth_sendTransaction"===e.method){var a=e.params[0];if((i=f(n.isObject(a)?a.from:null,t.accounts))&&i.privateKey)return t.accounts.signTransaction(n.omit(a,"from"),i.privateKey).then(u)}else if("eth_sign"===e.method){var s=e.params[1];if((i=f(e.params[0],t.accounts))&&i.privateKey){var c=t.accounts.sign(s,i.privateKey);return e.callback&&e.callback(null,c.signature),void r.resolve(c.signature)}}return t.requestManager.send(e,o)};t&&n.isObject(i.params[0])&&void 0===i.params[0].gasPrice?new c({name:"getGasPrice",call:"eth_gasPrice",params:0}).createFunction(e.requestManager)(function(t,r){r&&(i.params[0].gasPrice=r),h(i,e)}):h(i,e);return r.eventEmitter};return r.method=e,r.request=this.request.bind(this),r},c.prototype.request=function(){var e=this.toPayload(Array.prototype.slice.call(arguments));return e.format=this.formatOutput.bind(this),e},t.exports=c},{underscore:325,"web3-core-helpers":338,"web3-core-promievent":340,"web3-core-subscriptions":345,"web3-utils":403}],340:[function(e,t,r){"use strict";var n=e("eventemitter3"),i=e("any-promise"),o=function(e){var t,r,o=new i(function(){t=arguments[0],r=arguments[1]});if(e)return{resolve:t,reject:r,eventEmitter:o};var a=new n;return o._events=a._events,o.emit=a.emit,o.on=a.on,o.once=a.once,o.off=a.off,o.listeners=a.listeners,o.addListener=a.addListener,o.removeListener=a.removeListener,o.removeAllListeners=a.removeAllListeners,{resolve:t,reject:r,eventEmitter:o}};o.resolve=function(e){var t=o(!0);return t.resolve(e),t.eventEmitter},t.exports=o},{"any-promise":2,eventemitter3:156}],341:[function(e,t,r){"use strict";var n=e("./jsonrpc"),i=e("web3-core-helpers").errors,o=function(e){this.requestManager=e,this.requests=[]};o.prototype.add=function(e){this.requests.push(e)},o.prototype.execute=function(){var e=this.requests;this.requestManager.sendBatch(e,function(t,r){r=r||[],e.map(function(e,t){return r[t]||{}}).forEach(function(t,r){if(e[r].callback){if(t&&t.error)return e[r].callback(i.ErrorResponse(t));if(!n.isValidResponse(t))return e[r].callback(i.InvalidResponse(t));try{e[r].callback(null,e[r].format?e[r].format(t.result):t.result)}catch(t){e[r].callback(t)}}})})},t.exports=o},{"./jsonrpc":344,"web3-core-helpers":338}],342:[function(e,t,r){"use strict";var n=null,i=window;void 0!==i.ethereumProvider?n=i.ethereumProvider:void 0!==i.web3&&i.web3.currentProvider&&(i.web3.currentProvider.sendAsync&&(i.web3.currentProvider.send=i.web3.currentProvider.sendAsync,delete i.web3.currentProvider.sendAsync),!i.web3.currentProvider.on&&i.web3.currentProvider.connection&&"ipcProviderWrapper"===i.web3.currentProvider.connection.constructor.name&&(i.web3.currentProvider.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");switch(e){case"data":this.connection.on("data",function(e){var r="";e=e.toString();try{r=JSON.parse(e)}catch(r){return t(new Error("Couldn't parse response data"+e))}r.id||-1===r.method.indexOf("_subscription")||t(null,r)});break;default:this.connection.on(e,t)}}),n=i.web3.currentProvider),t.exports=n},{}],343:[function(e,t,r){"use strict";var n=e("underscore"),i=e("web3-core-helpers").errors,o=e("./jsonrpc.js"),a=e("./batch.js"),s=e("./givenProvider.js"),u=function e(t){this.provider=null,this.providers=e.providers,this.setProvider(t),this.subscriptions={}};u.givenProvider=s,u.providers={WebsocketProvider:e("web3-providers-ws"),HttpProvider:e("web3-providers-http"),IpcProvider:e("web3-providers-ipc")},u.prototype.setProvider=function(e,t){var r=this;if(e&&"string"==typeof e&&this.providers)if(/^http(s)?:\/\//i.test(e))e=new this.providers.HttpProvider(e);else if(/^ws(s)?:\/\//i.test(e))e=new this.providers.WebsocketProvider(e);else if(e&&"object"==typeof t&&"function"==typeof t.connect)e=new this.providers.IpcProvider(e,t);else if(e)throw new Error("Can't autodetect provider for \""+e+'"');this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=e||null,this.provider&&this.provider.on&&this.provider.on("data",function(e,t){(e=e||t).method&&r.subscriptions[e.params.subscription]&&r.subscriptions[e.params.subscription].callback&&r.subscriptions[e.params.subscription].callback(null,e.params.result)})},u.prototype.send=function(e,t){if(t=t||function(){},!this.provider)return t(i.InvalidProvider());var r=o.toPayload(e.method,e.params);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,function(e,n){return n&&n.id&&r.id!==n.id?t(new Error('Wrong response id "'+n.id+'" (expected: "'+r.id+'") in '+JSON.stringify(r))):e?t(e):n&&n.error?t(i.ErrorResponse(n)):o.isValidResponse(n)?void t(null,n.result):t(i.InvalidResponse(n))})},u.prototype.sendBatch=function(e,t){if(!this.provider)return t(i.InvalidProvider());var r=o.toBatchPayload(e);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,function(e,r){return e?t(e):n.isArray(r)?void t(null,r):t(i.InvalidResponse(r))})},u.prototype.addSubscription=function(e,t,r,n){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions[e]={callback:n,type:r,name:t}},u.prototype.removeSubscription=function(e,t){this.subscriptions[e]&&(this.send({method:this.subscriptions[e].type+"_unsubscribe",params:[e]},t),delete this.subscriptions[e])},u.prototype.clearSubscriptions=function(e){var t=this;Object.keys(this.subscriptions).forEach(function(r){e&&"syncing"===t.subscriptions[r].name||t.removeSubscription(r)}),this.provider.reset&&this.provider.reset()},t.exports={Manager:u,BatchManager:a}},{"./batch.js":341,"./givenProvider.js":342,"./jsonrpc.js":344,underscore:325,"web3-core-helpers":338,"web3-providers-http":398,"web3-providers-ipc":399,"web3-providers-ws":400}],344:[function(e,t,r){"use strict";var n={messageId:0,toPayload:function(e,t){if(!e)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(t)+'"!');return n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:e,params:t||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!(!e||e.error||"2.0"!==e.jsonrpc||"number"!=typeof e.id&&"string"!=typeof e.id||void 0===e.result)}},toBatchPayload:function(e){return e.map(function(e){return n.toPayload(e.method,e.params)})}};t.exports=n},{}],345:[function(e,t,r){"use strict";var n=e("./subscription.js"),i=function(e){this.name=e.name,this.type=e.type,this.subscriptions=e.subscriptions||{},this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.attachToObject=function(e){var t=this.buildCall(),r=this.name.split(".");r.length>1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},i.prototype.buildCall=function(){var e=this;return function(){e.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var t=new n({subscription:e.subscriptions[arguments[0]],requestManager:e.requestManager,type:e.type});return t.subscribe.apply(t,arguments)}},t.exports={subscriptions:i,subscription:n}},{"./subscription.js":346}],346:[function(e,t,r){"use strict";var n=e("underscore"),i=e("web3-core-helpers").errors,o=e("eventemitter3");function a(e){o.call(this),this.id=null,this.callback=n.identity,this.arguments=null,this._reconnectIntervalId=null,this.options={subscription:e.subscription,type:e.type,requestManager:e.requestManager}}a.prototype=Object.create(o.prototype),a.prototype.constructor=a,a.prototype._extractCallback=function(e){if(n.isFunction(e[e.length-1]))return e.pop()},a.prototype._validateArgs=function(e){var t=this.options.subscription;if(t||(t={}),t.params||(t.params=0),e.length!==t.params)throw i.InvalidNumberOfParams(e.length,t.params+1,e[0])},a.prototype._formatInput=function(e){var t=this.options.subscription;return t&&t.inputFormatter?t.inputFormatter.map(function(t,r){return t?t(e[r]):e[r]}):e},a.prototype._formatOutput=function(e){var t=this.options.subscription;return t&&t.outputFormatter&&e?t.outputFormatter(e):e},a.prototype._toPayload=function(e){var t=[];if(this.callback=this._extractCallback(e)||n.identity,this.subscriptionMethod||(this.subscriptionMethod=e.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(e),this._validateArgs(this.arguments),e=[]),t.push(this.subscriptionMethod),t=t.concat(this.arguments),e.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:t}},a.prototype.unsubscribe=function(e){this.options.requestManager.removeSubscription(this.id,e),this.id=null,this.removeAllListeners(),clearInterval(this._reconnectIntervalId)},a.prototype.subscribe=function(){var e=this,t=Array.prototype.slice.call(arguments),r=this._toPayload(t);if(!r)return this;if(!this.options.requestManager.provider){var i=new Error("No provider set.");return this.callback(i,null,this),this.emit("error",i),this}if(!this.options.requestManager.provider.on){var o=new Error("The current provider doesn't support subscriptions: "+this.options.requestManager.provider.constructor.name);return this.callback(o,null,this),this.emit("error",o),this}return this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&n.isObject(r.params[1])&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)&&this.options.requestManager.send({method:"eth_getLogs",params:[r.params[1]]},function(t,r){t?(e.callback(t,null,e),e.emit("error",t)):r.forEach(function(t){var r=e._formatOutput(t);e.callback(null,r,e),e.emit("data",r)})}),"object"==typeof r.params[1]&&delete r.params[1].fromBlock,this.options.requestManager.send(r,function(t,i){!t&&i?(e.id=i,e.options.requestManager.addSubscription(e.id,r.params[0],e.options.type,function(t,r){t?(e.options.requestManager.removeSubscription(e.id),e.options.requestManager.provider.once&&(e._reconnectIntervalId=setInterval(function(){e.options.requestManager.provider.reconnect&&e.options.requestManager.provider.reconnect()},500),e.options.requestManager.provider.once("connect",function(){clearInterval(e._reconnectIntervalId),e.subscribe(e.callback)})),e.emit("error",t),e.callback(t,null,e)):(n.isArray(r)||(r=[r]),r.forEach(function(t){var r=e._formatOutput(t);if(n.isFunction(e.options.subscription.subscriptionHandler))return e.options.subscription.subscriptionHandler.call(e,r);e.emit("data",r),e.callback(null,r,e)}))})):(e.callback(t,null,e),e.emit("error",t))}),this},t.exports=a},{eventemitter3:156,underscore:325,"web3-core-helpers":338}],347:[function(e,t,r){"use strict";var n=e("web3-core-helpers").formatters,i=e("web3-core-method"),o=e("web3-utils");t.exports=function(e){var t=function(t){var r;return t.property?(e[t.property]||(e[t.property]={}),r=e[t.property]):r=e,t.methods&&t.methods.forEach(function(t){t instanceof i||(t=new i(t)),t.attachToObject(r),t.setRequestManager(e._requestManager)}),e};return t.formatters=n,t.utils=o,t.Method=i,t}},{"web3-core-helpers":338,"web3-core-method":339,"web3-utils":403}],348:[function(e,t,r){"use strict";var n=e("web3-core-requestmanager"),i=e("./extend.js");t.exports={packageInit:function(e,t){if(t=Array.prototype.slice.call(t),!e)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(e,"currentProvider",{get:function(){return e._provider},set:function(t){return e.setProvider(t)},enumerable:!0,configurable:!0}),t[0]&&t[0]._requestManager?e._requestManager=new n.Manager(t[0].currentProvider):(e._requestManager=new n.Manager,e._requestManager.setProvider(t[0],t[1])),e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers,e._provider=e._requestManager.provider,e.setProvider||(e.setProvider=function(t,r){return e._requestManager.setProvider(t,r),e._provider=e._requestManager.provider,!0}),e.BatchRequest=n.BatchManager.bind(null,e._requestManager),e.extend=i(e)},addProviders:function(e){e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers}}},{"./extend.js":347,"web3-core-requestmanager":343}],349:[function(e,t,r){var n=e("underscore"),i=e("web3-utils"),o=new(0,e("ethers/utils/abi-coder").AbiCoder)(function(e,t){return!e.match(/^u?int/)||n.isArray(t)||n.isObject(t)&&"BN"===t.constructor.name?t:t.toString()});function a(){}var s=function(){};s.prototype.encodeFunctionSignature=function(e){return n.isObject(e)&&(e=i._jsonInterfaceMethodToString(e)),i.sha3(e).slice(0,10)},s.prototype.encodeEventSignature=function(e){return n.isObject(e)&&(e=i._jsonInterfaceMethodToString(e)),i.sha3(e)},s.prototype.encodeParameter=function(e,t){return this.encodeParameters([e],[t])},s.prototype.encodeParameters=function(e,t){return o.encode(this.mapTypes(e),t)},s.prototype.mapTypes=function(e){var t=this,r=[];return e.forEach(function(e){if(t.isSimplifiedStructFormat(e)){var n=Object.keys(e)[0];r.push(Object.assign(t.mapStructNameAndType(n),{components:t.mapStructToCoderFormat(e[n])}))}else r.push(e)}),r},s.prototype.isSimplifiedStructFormat=function(e){return"object"==typeof e&&void 0===e.components&&void 0===e.name},s.prototype.mapStructNameAndType=function(e){var t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}},s.prototype.mapStructToCoderFormat=function(e){var t=this,r=[];return Object.keys(e).forEach(function(n){"object"!=typeof e[n]?r.push({name:n,type:e[n]}):r.push(Object.assign(t.mapStructNameAndType(n),{components:t.mapStructToCoderFormat(e[n])}))}),r},s.prototype.encodeFunctionCall=function(e,t){return this.encodeFunctionSignature(e)+this.encodeParameters(e.inputs,t).replace("0x","")},s.prototype.decodeParameter=function(e,t){return this.decodeParameters([e],t)[0]},s.prototype.decodeParameters=function(e,t){if(!t||"0x"===t||"0X"===t)throw new Error("Returned values aren't valid, did it run Out of Gas?");var r=o.decode(this.mapTypes(e),"0x"+t.replace(/0x/i,"")),i=new a;return i.__length__=0,e.forEach(function(e,t){var o=r[i.__length__];o="0x"===o?null:o,i[t]=o,n.isObject(e)&&e.name&&(i[e.name]=o),i.__length__++}),i},s.prototype.decodeLog=function(e,t,r){var i=this;r=n.isArray(r)?r:[r],t=t||"";var o=[],s=[],u=0;e.forEach(function(e,t){e.indexed?(s[t]=["bool","int","uint","address","fixed","ufixed"].find(function(t){return-1!==e.type.indexOf(t)})?i.decodeParameter(e.type,r[u]):r[u],u++):o[t]=e});var c=t,f=c?this.decodeParameters(o,c):[],h=new a;return h.__length__=0,e.forEach(function(e,t){h[t]="string"===e.type?"":null,void 0!==f[t]&&(h[t]=f[t]),void 0!==s[t]&&(h[t]=s[t]),e.name&&(h[e.name]=h[t]),h.__length__++}),h};var u=new s;t.exports=u},{"ethers/utils/abi-coder":143,underscore:325,"web3-utils":403}],350:[function(e,t,r){(function(r){var n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=e("./bytes"),o=e("./nat"),a=e("elliptic"),s=(e("./rlp"),new a.ec("secp256k1")),u=e("./hash"),c=u.keccak256,f=u.keccak256s,h=function(e){for(var t=f(e.slice(2)),r="0x",n=0;n<40;n++)r+=parseInt(t[n+2],16)>7?e[n+2].toUpperCase():e[n+2];return r},l=function(e){var t=new r(e.slice(2),"hex"),n="0x"+s.keyFromPrivate(t).getPublic(!1,"hex").slice(2),i=c(n);return{address:h("0x"+i.slice(-40)),privateKey:e}},d=function(e){var t=n(e,3),r=t[0],o=i.pad(32,t[1]),a=i.pad(32,t[2]);return i.flatten([o,a,r])},p=function(e){return[i.slice(64,i.length(e),e),i.slice(0,32,e),i.slice(32,64,e)]},b=function(e){return function(t,n){var a=s.keyFromPrivate(new r(n.slice(2),"hex")).sign(new r(t.slice(2),"hex"),{canonical:!0});return d([o.fromString(i.fromNumber(e+a.recoveryParam)),i.pad(32,i.fromNat("0x"+a.r.toString(16))),i.pad(32,i.fromNat("0x"+a.s.toString(16)))])}},y=b(27);t.exports={create:function(e){var t=c(i.concat(i.random(32),e||i.random(32))),r=i.concat(i.concat(i.random(32),t),i.random(32)),n=c(r);return l(n)},toChecksum:h,fromPrivate:l,sign:y,makeSigner:b,recover:function(e,t){var n=p(t),o={v:i.toNumber(n[0]),r:n[1].slice(2),s:n[2].slice(2)},a="0x"+s.recoverPubKey(new r(e.slice(2),"hex"),o,o.v<2?o.v:1-o.v%2).encode("hex",!1).slice(2),u=c(a);return h("0x"+u.slice(-40))},encodeSignature:d,decodeSignature:p}}).call(this,e("buffer").Buffer)},{"./bytes":352,"./hash":353,"./nat":354,"./rlp":355,buffer:84,elliptic:109}],351:[function(e,t,r){arguments[4][132][0].apply(r,arguments)},{dup:132}],352:[function(e,t,r){arguments[4][133][0].apply(r,arguments)},{"./array.js":351,dup:133}],353:[function(e,t,r){arguments[4][134][0].apply(r,arguments)},{dup:134}],354:[function(e,t,r){var n=e("bn.js"),i=e("./bytes"),o=function(e){return new n(e.slice(2),16)},a=function(e){var t="0x"+("0x"===e.slice(0,2)?new n(e.slice(2),16):new n(e,10)).toString("hex");return"0x0"===t?"0x":t},s=function(e){return"string"==typeof e?/^0x/.test(e)?e:"0x"+e:"0x"+new n(e).toString("hex")},u=function(e){return o(e).toNumber()},c=function(e){return function(t,r){return"0x"+o(t)[e](o(r)).toString("hex")}},f=c("add"),h=c("mul"),l=c("div"),d=c("sub");t.exports={toString:function(e){return o(e).toString(10)},fromString:a,toNumber:u,fromNumber:s,toEther:function(e){return u(l(e,a("10000000000")))/1e8},fromEther:function(e){return h(s(Math.floor(1e8*e)),a("10000000000"))},toUint256:function(e){return i.pad(32,e)},add:f,mul:h,div:l,sub:d}},{"./bytes":352,"bn.js":53}],355:[function(e,t,r){t.exports={encode:function(e){var t=function(e){return(t=e.toString(16)).length%2==0?t:"0"+t;var t},r=function(e,r){return e<56?t(r+e):t(r+t(e).length/2+55)+t(e)};return"0x"+function e(t){if("string"==typeof t){var n=t.slice(2);return(2!=n.length||n>="80"?r(n.length/2,128):"")+n}var i=t.map(e).join("");return r(i.length/2,192)+i}(e)},decode:function(e){var t=2,r=function(){if(t>=e.length)throw"";var r=e.slice(t,t+2);return r<"80"?(t+=2,"0x"+r):r<"c0"?i():o()},n=function(){var r=parseInt(e.slice(t,t+=2),16)%64;return r<56?r:parseInt(e.slice(t,t+=2*(r-55)),16)},i=function(){var r=n();return"0x"+e.slice(t,t+=2*r)},o=function(){for(var e=2*n()+t,i=[];t>>((3&t)<<3)&255;return i}}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],357:[function(e,t,r){for(var n=e("./rng"),i=[],o={},a=0;a<256;a++)i[a]=(a+256).toString(16).substr(1),o[i[a]]=a;function s(e,t){var r=t||0,n=i;return n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]}var u=n(),c=[1|u[0],u[1],u[2],u[3],u[4],u[5]],f=16383&(u[6]<<8|u[7]),h=0,l=0;function d(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;a<16;a++)t[i+a]=o[a];return t||s(o)}var p=d;p.v1=function(e,t,r){var n=t&&r||0,i=t||[],o=void 0!==(e=e||{}).clockseq?e.clockseq:f,a=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:l+1,d=a-h+(u-l)/1e4;if(d<0&&void 0===e.clockseq&&(o=o+1&16383),(d<0||a>h)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=a,l=u,f=o;var p=(1e4*(268435455&(a+=122192928e5))+u)%4294967296;i[n++]=p>>>24&255,i[n++]=p>>>16&255,i[n++]=p>>>8&255,i[n++]=255&p;var b=a/4294967296*1e4&268435455;i[n++]=b>>>8&255,i[n++]=255&b,i[n++]=b>>>24&15|16,i[n++]=b>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o;for(var y=e.node||c,m=0;m<6;m++)i[n+m]=y[m];return t||s(i)},p.v4=d,p.parse=function(e,t,r){var n=t&&r||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){i<16&&(t[n+i++]=o[e])});i<16;)t[n+i++]=0;return t},p.unparse=s,t.exports=p},{"./rng":356}],358:[function(e,t,r){(function(r,n){"use strict";var i=e("underscore"),o=e("web3-core"),a=e("web3-core-method"),s=e("any-promise"),u=e("eth-lib/lib/account"),c=e("eth-lib/lib/hash"),f=e("eth-lib/lib/rlp"),h=e("eth-lib/lib/nat"),l=e("eth-lib/lib/bytes"),d=e(void 0===r?"crypto-browserify":"crypto"),p=e("scrypt.js"),b=e("uuid"),y=e("web3-utils"),m=e("web3-core-helpers"),v=function(e){return i.isUndefined(e)||i.isNull(e)},g=function(e){for(;e&&e.startsWith("0x0");)e="0x"+e.slice(3);return e},w=function(e){return e.length%2==1&&(e=e.replace("0x","0x0")),e},_=function(){var e=this;o.packageInit(this,arguments),delete this.BatchRequest,delete this.extend;var t=[new a({name:"getId",call:"net_version",params:0,outputFormatter:y.hexToNumber}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[function(e){if(y.isAddress(e))return e;throw new Error("Address "+e+' is not a valid address to get the "transactionCount".')},function(){return"latest"}]})];this._ethereumCall={},i.each(t,function(t){t.attachToObject(e._ethereumCall),t.setRequestManager(e._requestManager)}),this.wallet=new A(this)};function A(e){this._accounts=e,this.length=0,this.defaultKeyName="web3js_wallet"}_.prototype._addAccountFunctions=function(e){var t=this;return e.signTransaction=function(r,n){return t.signTransaction(r,e.privateKey,n)},e.sign=function(r){return t.sign(r,e.privateKey)},e.encrypt=function(r,n){return t.encrypt(e.privateKey,r,n)},e},_.prototype.create=function(e){return this._addAccountFunctions(u.create(e||y.randomHex(32)))},_.prototype.privateKeyToAccount=function(e){return this._addAccountFunctions(u.fromPrivate(e))},_.prototype.signTransaction=function(e,t,r){var n,o=!1;if(r=r||function(){},!e)return o=new Error("No transaction object given!"),r(o),s.reject(o);function a(e){if(e.gas||e.gasLimit||(o=new Error('"gas" is missing')),(e.nonce<0||e.gas<0||e.gasPrice<0||e.chainId<0)&&(o=new Error("Gas, gasPrice, nonce or chainId is lower than 0")),o)return r(o),s.reject(o);try{var i=e=m.formatters.inputCallFormatter(e);i.to=e.to||"0x",i.data=e.data||"0x",i.value=e.value||"0x",i.chainId=y.numberToHex(e.chainId);var a=f.encode([l.fromNat(i.nonce),l.fromNat(i.gasPrice),l.fromNat(i.gas),i.to.toLowerCase(),l.fromNat(i.value),i.data,l.fromNat(i.chainId||"0x1"),"0x","0x"]),d=c.keccak256(a),p=u.makeSigner(2*h.toNumber(i.chainId||"0x1")+35)(c.keccak256(a),t),b=f.decode(a).slice(0,6).concat(u.decodeSignature(p));b[6]=w(g(b[6])),b[7]=w(g(b[7])),b[8]=w(g(b[8]));var v=f.encode(b),_=f.decode(v);n={messageHash:d,v:g(_[6]),r:g(_[7]),s:g(_[8]),rawTransaction:v}}catch(e){return r(e),s.reject(e)}return r(null,n),n}return void 0!==e.nonce&&void 0!==e.chainId&&void 0!==e.gasPrice?s.resolve(a(e)):s.all([v(e.chainId)?this._ethereumCall.getId():e.chainId,v(e.gasPrice)?this._ethereumCall.getGasPrice():e.gasPrice,v(e.nonce)?this._ethereumCall.getTransactionCount(this.privateKeyToAccount(t).address):e.nonce]).then(function(t){if(v(t[0])||v(t[1])||v(t[2]))throw new Error('One of the values "chainId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(t));return a(i.extend(e,{chainId:t[0],gasPrice:t[1],nonce:t[2]}))})},_.prototype.recoverTransaction=function(e){var t=f.decode(e),r=u.encodeSignature(t.slice(6,9)),n=l.toNumber(t[6]),i=n<35?[]:[l.fromNumber(n-35>>1),"0x","0x"],o=t.slice(0,6).concat(i),a=f.encode(o);return u.recover(c.keccak256(a),r)},_.prototype.hashMessage=function(e){var t=y.isHexStrict(e)?y.hexToBytes(e):e,r=n.from(t),i="Ethereum Signed Message:\n"+t.length,o=n.from(i),a=n.concat([o,r]);return c.keccak256s(a)},_.prototype.sign=function(e,t){var r=this.hashMessage(e),n=u.sign(r,t),i=u.decodeSignature(n);return{message:e,messageHash:r,v:i[0],r:i[1],s:i[2],signature:n}},_.prototype.recover=function(e,t,r){var n=[].slice.apply(arguments);return i.isObject(e)?this.recover(e.messageHash,u.encodeSignature([e.v,e.r,e.s]),!0):(r||(e=this.hashMessage(e)),n.length>=4?(r=n.slice(-1)[0],r=!!i.isBoolean(r)&&!!r,this.recover(e,u.encodeSignature(n.slice(1,4)),r)):u.recover(e,t))},_.prototype.decrypt=function(e,t,r){if(!i.isString(t))throw new Error("No password given.");var o,a,s=i.isObject(e)?e:JSON.parse(r?e.toLowerCase():e);if(3!==s.version)throw new Error("Not a valid V3 wallet");if("scrypt"===s.crypto.kdf)a=s.crypto.kdfparams,o=p(new n(t),new n(a.salt,"hex"),a.n,a.r,a.p,a.dklen);else{if("pbkdf2"!==s.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(a=s.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");o=d.pbkdf2Sync(new n(t),new n(a.salt,"hex"),a.c,a.dklen,"sha256")}var u=new n(s.crypto.ciphertext,"hex");if(y.sha3(n.concat([o.slice(16,32),u])).replace("0x","")!==s.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var c=d.createDecipheriv(s.crypto.cipher,o.slice(0,16),new n(s.crypto.cipherparams.iv,"hex")),f="0x"+n.concat([c.update(u),c.final()]).toString("hex");return this.privateKeyToAccount(f)},_.prototype.encrypt=function(e,t,r){var i,o=this.privateKeyToAccount(e),a=(r=r||{}).salt||d.randomBytes(32),s=r.iv||d.randomBytes(16),u=r.kdf||"scrypt",c={dklen:r.dklen||32,salt:a.toString("hex")};if("pbkdf2"===u)c.c=r.c||262144,c.prf="hmac-sha256",i=d.pbkdf2Sync(new n(t),a,c.c,c.dklen,"sha256");else{if("scrypt"!==u)throw new Error("Unsupported kdf");c.n=r.n||8192,c.r=r.r||8,c.p=r.p||1,i=p(new n(t),a,c.n,c.r,c.p,c.dklen)}var f=d.createCipheriv(r.cipher||"aes-128-ctr",i.slice(0,16),s);if(!f)throw new Error("Unsupported cipher");var h=n.concat([f.update(new n(o.privateKey.replace("0x",""),"hex")),f.final()]),l=y.sha3(n.concat([i.slice(16,32),new n(h,"hex")])).replace("0x","");return{version:3,id:b.v4({random:r.uuid||d.randomBytes(16)}),address:o.address.toLowerCase().replace("0x",""),crypto:{ciphertext:h.toString("hex"),cipherparams:{iv:s.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:u,kdfparams:c,mac:l.toString("hex")}}},A.prototype._findSafeIndex=function(e){return e=e||0,i.has(this,e)?this._findSafeIndex(e+1):e},A.prototype._currentIndexes=function(){return Object.keys(this).map(function(e){return parseInt(e)}).filter(function(e){return e<9e20})},A.prototype.create=function(e,t){for(var r=0;r=2?t.slice(2):t;var r=h.decodeParameters(e,t);return 1===r.__length__?r[0]:(delete r.__length__,r)},l.prototype.deploy=function(e,t){if((e=e||{}).arguments=e.arguments||[],!(e=this._getOrSetDefaultOptions(e)).data)return a._fireError(new Error('No "data" specified in neither the given options, nor the default options.'),null,null,t);var r=n.find(this.options.jsonInterface,function(e){return"constructor"===e.type})||{};return r.signature="constructor",this._createTxObject.apply({method:r,parent:this,deployData:e.data,_ethAccounts:this.constructor._ethAccounts},e.arguments)},l.prototype._generateEventOptions=function(){var e=Array.prototype.slice.call(arguments),t=this._getCallback(e),r=n.isObject(e[e.length-1])?e.pop():{},i=n.isString(e[0])?e[0]:"allevents";if(!(i="allevents"===i.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find(function(e){return"event"===e.type&&(e.name===i||e.signature==="0x"+i.replace("0x",""))})))throw new Error('Event "'+i.name+"\" doesn't exist in this contract.");if(!a.isAddress(this.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return{params:this._encodeEventABI(i,r),event:i,callback:t}},l.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},l.prototype.once=function(e,t,r){var i=Array.prototype.slice.call(arguments);if(!(r=this._getCallback(i)))throw new Error("Once requires a callback as the second parameter.");t&&delete t.fromBlock,this._on(e,t,function(e,t,i){i.unsubscribe(),n.isFunction(r)&&r(e,t,i)})},l.prototype._on=function(){var e=this._generateEventOptions.apply(this,arguments);this._checkListener("newListener",e.event.name,e.callback),this._checkListener("removeListener",e.event.name,e.callback);var t=new s({subscription:{params:1,inputFormatter:[u.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event),subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),n.isFunction(this.callback)&&this.callback(null,e,this)}},type:"eth",requestManager:this._requestManager});return t.subscribe("logs",e.params,e.callback||function(){}),t},l.prototype.getPastEvents=function(){var e=this._generateEventOptions.apply(this,arguments),t=new o({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[u.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event)});t.setRequestManager(this._requestManager);var r=t.buildCall();return t=null,r(e.params,e.callback)},l.prototype._createTxObject=function(){var e=Array.prototype.slice.call(arguments),t={};if("function"===this.method.type&&(t.call=this.parent._executeMethod.bind(t,"call"),t.call.request=this.parent._executeMethod.bind(t,"call",!0)),t.send=this.parent._executeMethod.bind(t,"send"),t.send.request=this.parent._executeMethod.bind(t,"send",!0),t.encodeABI=this.parent._encodeMethodABI.bind(t),t.estimateGas=this.parent._executeMethod.bind(t,"estimate"),e&&this.method.inputs&&e.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,e);throw c.InvalidNumberOfParams(e.length,this.method.inputs.length,this.method.name)}return t.arguments=e||[],t._method=this.method,t._parent=this.parent,t._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(t._deployData=this.deployData),t},l.prototype._processExecuteArguments=function(e,t){var r={};if(r.type=e.shift(),r.callback=this._parent._getCallback(e),"call"===r.type&&!0!==e[e.length-1]&&(n.isString(e[e.length-1])||isFinite(e[e.length-1]))&&(r.defaultBlock=e.pop()),r.options=n.isObject(e[e.length-1])?e.pop():{},r.generateRequest=!0===e[e.length-1]&&e.pop(),r.options=this._parent._getOrSetDefaultOptions(r.options),r.options.data=this.encodeABI(),!this._deployData&&!a.isAddress(this._parent.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return this._deployData||(r.options.to=this._parent.options.address),r.options.data?r:a._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),t.eventEmitter,t.reject,r.callback)},l.prototype._executeMethod=function(){var e=this,t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),r),r=f("send"!==t.type),i=e.constructor._ethAccounts||e._ethAccounts;if(t.generateRequest){var s={params:[u.inputCallFormatter.call(this._parent,t.options)],callback:t.callback};return"call"===t.type?(s.params.push(u.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)),s.method="eth_call",s.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):s.method="eth_sendTransaction",s}switch(t.type){case"estimate":return new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[u.inputCallFormatter],outputFormatter:a.hexToNumber,requestManager:e._parent._requestManager,accounts:i,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback);case"call":return new o({name:"call",call:"eth_call",params:2,inputFormatter:[u.inputCallFormatter,u.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:i,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.defaultBlock,t.callback);case"send":if(!a.isAddress(t.options.from))return a._fireError(new Error('No "from" address specified in neither the given options, nor the default options.'),r.eventEmitter,r.reject,t.callback);if(n.isBoolean(this._method.payable)&&!this._method.payable&&t.options.value&&t.options.value>0)return a._fireError(new Error("Can not send value to non-payable contract method or constructor"),r.eventEmitter,r.reject,t.callback);var c={receiptFormatter:function(t){if(n.isArray(t.logs)){var r=n.map(t.logs,function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)});t.events={};var i=0;r.forEach(function(e){e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[i]=e,i++)}),delete t.logs}return t},contractDeployFormatter:function(t){var r=e._parent.clone();return r.options.address=t.contractAddress,r}};return new o({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[u.inputTransactionFormatter],requestManager:e._parent._requestManager,accounts:e.constructor._ethAccounts||e._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,extraFormatters:c}).createFunction()(t.options,t.callback)}},t.exports=l},{underscore:325,"web3-core":348,"web3-core-helpers":338,"web3-core-method":339,"web3-core-promievent":340,"web3-core-subscriptions":345,"web3-eth-abi":349,"web3-utils":403}],360:[function(e,t,r){"use strict";var n=e("./config"),i=e("./contracts/Registry"),o=e("./lib/ResolverMethodHandler");function a(e){this.eth=e}Object.defineProperty(a.prototype,"registry",{get:function(){return new i(this)},enumerable:!0}),Object.defineProperty(a.prototype,"resolverMethodHandler",{get:function(){return new o(this.registry)},enumerable:!0}),a.prototype.resolver=function(e){return this.registry.resolver(e)},a.prototype.getAddress=function(e,t){return this.resolverMethodHandler.method(e,"addr",[]).call(t)},a.prototype.setAddress=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setAddr",[t]).send(r,n)},a.prototype.getPubkey=function(e,t){return this.resolverMethodHandler.method(e,"pubkey",[],t).call(t)},a.prototype.setPubkey=function(e,t,r,n,i){return this.resolverMethodHandler.method(e,"setPubkey",[t,r]).send(n,i)},a.prototype.getContent=function(e,t){return this.resolverMethodHandler.method(e,"content",[]).call(t)},a.prototype.setContent=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setContent",[t]).send(r,n)},a.prototype.getMultihash=function(e,t){return this.resolverMethodHandler.method(e,"multihash",[]).call(t)},a.prototype.setMultihash=function(e,t,r,n){return this.resolverMethodHandler.method(e,"multihash",[t]).send(r,n)},a.prototype.checkNetwork=function(){var e=this;return e.eth.getBlock("latest").then(function(t){var r=new Date/1e3-t.timestamp;if(r>3600)throw new Error("Network not synced; last block was "+r+" seconds ago");return e.eth.net.getNetworkType()}).then(function(e){var t=n.addresses[e];if(void 0===t)throw new Error("ENS is not supported on network "+e);return t})},t.exports=a},{"./config":361,"./contracts/Registry":362,"./lib/ResolverMethodHandler":364}],361:[function(e,t,r){"use strict";t.exports={addresses:{main:"0x314159265dD8dbb310642f98f50C066173C1259b",ropsten:"0x112234455c3a32fd11230c42e7bccd4a84e02010",rinkeby:"0xe7410170f87102df0055eb195163a03b7f2bff4a"}}},{}],362:[function(e,t,r){"use strict";var n=e("underscore"),i=e("web3-eth-contract"),o=e("eth-ens-namehash"),a=e("web3-core-promievent"),s=e("../ressources/ABI/Registry"),u=e("../ressources/ABI/Resolver");function c(e){var t=this;this.ens=e,this.contract=e.checkNetwork().then(function(e){var r=new i(s,e);return r.setProvider(t.ens.eth.currentProvider),r})}c.prototype.owner=function(e,t){var r=new a(!0);return this.contract.then(function(i){i.methods.owner(o.hash(e)).call().then(function(e){r.resolve(e),n.isFunction(t)&&t(e)}).catch(function(e){r.reject(e),n.isFunction(t)&&t(e)})}),r.eventEmitter},c.prototype.resolver=function(e){var t=this;return this.contract.then(function(t){return t.methods.resolver(o.hash(e)).call()}).then(function(e){var r=new i(u,e);return r.setProvider(t.ens.eth.currentProvider),r})},t.exports=c},{"../ressources/ABI/Registry":365,"../ressources/ABI/Resolver":366,"eth-ens-namehash":127,underscore:325,"web3-core-promievent":340,"web3-eth-contract":359}],363:[function(e,t,r){"use strict";var n=e("./ENS");t.exports=n},{"./ENS":360}],364:[function(e,t,r){"use strict";var n=e("web3-core-promievent"),i=e("eth-ens-namehash"),o=e("underscore");function a(e){this.registry=e}a.prototype.method=function(e,t,r,n){return{call:this.call.bind({ensName:e,methodName:t,methodArguments:r,callback:n,parent:this}),send:this.send.bind({ensName:e,methodName:t,methodArguments:r,callback:n,parent:this})}},a.prototype.call=function(e){var t=this,r=new n,i=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.resolver(this.ensName).then(function(n){t.parent.handleCall(r,n.methods[t.methodName],i,e)}).catch(function(e){r.reject(e)}),r.eventEmitter},a.prototype.send=function(e,t){var r=this,i=new n,o=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.resolver(this.ensName).then(function(n){r.parent.handleSend(i,n.methods[r.methodName],o,e,t)}).catch(function(e){i.reject(e)}),i.eventEmitter},a.prototype.handleCall=function(e,t,r,n){return t.apply(this,r).call().then(function(t){e.resolve(t),o.isFunction(n)&&n(t)}).catch(function(t){e.reject(t),o.isFunction(n)&&n(t)}),e},a.prototype.handleSend=function(e,t,r,n,i){return t.apply(this,r).send(n).on("transactionHash",function(t){e.eventEmitter.emit("transactionHash",t)}).on("confirmation",function(t,r){e.eventEmitter.emit("confirmation",t,r)}).on("receipt",function(t){e.eventEmitter.emit("receipt",t),e.resolve(t),o.isFunction(i)&&i(t)}).on("error",function(t){e.eventEmitter.emit("error",t),e.reject(t),o.isFunction(i)&&i(t)}),e},a.prototype.prepareArguments=function(e,t){var r=i.hash(e);return t.length>0?(t.unshift(r),t):[r]},t.exports=a},{"eth-ens-namehash":127,underscore:325,"web3-core-promievent":340}],365:[function(e,t,r){"use strict";t.exports=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"}]},{}],366:[function(e,t,r){"use strict";t.exports=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setMultihash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"multihash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"}]},{}],367:[function(e,t,r){arguments[4][154][0].apply(r,arguments)},{dup:154}],368:[function(e,t,r){"use strict";var n=e("web3-utils"),i=e("bn.js"),o=function(e){var t="A".charCodeAt(0),r="Z".charCodeAt(0);return(e=(e=e.toUpperCase()).substr(4)+e.substr(0,4)).split("").map(function(e){var n=e.charCodeAt(0);return n>=t&&n<=r?n-t+10:e}).join("")},a=function(e){for(var t,r=e;r.length>2;)t=r.slice(0,9),r=parseInt(t,10)%97+r.slice(t.length);return parseInt(r,10)%97},s=function(e){this._iban=e};s.toAddress=function(e){if(!(e=new s(e)).isDirect())throw new Error("IBAN is indirect and can't be converted");return e.toAddress()},s.toIban=function(e){return s.fromAddress(e).toString()},s.fromAddress=function(e){if(!n.isAddress(e))throw new Error("Provided address is not a valid address: "+e);e=e.replace("0x","").replace("0X","");var t=function(e,t){for(var r=e;r.length<2*t;)r="0"+r;return r}(new i(e,16).toString(36),15);return s.fromBban(t.toUpperCase())},s.fromBban=function(e){var t=("0"+(98-a(o("XE00"+e)))).slice(-2);return new s("XE"+t+e)},s.createIndirect=function(e){return s.fromBban("ETH"+e.institution+e.identifier)},s.isValid=function(e){return new s(e).isValid()},s.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===a(o(this._iban))},s.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},s.prototype.isIndirect=function(){return 20===this._iban.length},s.prototype.checksum=function(){return this._iban.substr(2,2)},s.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},s.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},s.prototype.toAddress=function(){if(this.isDirect()){var e=this._iban.substr(4),t=new i(e,36);return n.toChecksumAddress(t.toString(16,20))}return""},s.prototype.toString=function(){return this._iban},t.exports=s},{"bn.js":367,"web3-utils":403}],369:[function(e,t,r){"use strict";var n=e("web3-core"),i=e("web3-core-method"),o=e("web3-utils"),a=e("web3-net"),s=e("web3-core-helpers").formatters,u=function(){var e=this;n.packageInit(this,arguments),this.net=new a(this.currentProvider);var t=null,r="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return t},set:function(e){return e&&(t=o.toChecksumAddress(s.inputAddressFormatter(e))),u.forEach(function(e){e.defaultAccount=t}),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return r},set:function(e){return r=e,u.forEach(function(e){e.defaultBlock=r}),e},enumerable:!0});var u=[new i({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:o.toChecksumAddress}),new i({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:o.toChecksumAddress}),new i({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[s.inputAddressFormatter,null,null]}),new i({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[s.inputAddressFormatter]}),new i({name:"importRawKey",call:"personal_importRawKey",params:2}),new i({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"signTransaction",call:"personal_signTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"sign",call:"personal_sign",params:3,inputFormatter:[s.inputSignFormatter,s.inputAddressFormatter,null]}),new i({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[s.inputSignFormatter,null]})];u.forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount})};n.addProviders(u),t.exports=u},{"web3-core":348,"web3-core-helpers":338,"web3-core-method":339,"web3-net":372,"web3-utils":403}],370:[function(e,t,r){"use strict";var n=e("underscore");t.exports=function(e){var t,r=this;return this.net.getId().then(function(e){return t=e,r.getBlock(0)}).then(function(r){var i="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===r.hash&&1===t&&(i="main"),"0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303"===r.hash&&2===t&&(i="morden"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===r.hash&&3===t&&(i="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===r.hash&&4===t&&(i="rinkeby"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===r.hash&&42===t&&(i="kovan"),n.isFunction(e)&&e(null,i),i}).catch(function(t){if(!n.isFunction(e))throw t;e(t)})}},{underscore:325}],371:[function(e,t,r){"use strict";var n=e("underscore"),i=e("web3-core"),o=e("web3-core-helpers"),a=e("web3-core-subscriptions").subscriptions,s=e("web3-core-method"),u=e("web3-utils"),c=e("web3-net"),f=e("web3-eth-ens"),h=e("web3-eth-personal"),l=e("web3-eth-contract"),d=e("web3-eth-iban"),p=e("web3-eth-accounts"),b=e("web3-eth-abi"),y=e("./getNetworkType.js"),m=o.formatters,v=function(e){return n.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},g=function(e){return n.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},w=function(e){return n.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},_=function(e){return n.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},A=function(e){return n.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},E=function(){var e=this;i.packageInit(this,arguments);var t=this.setProvider;this.setProvider=function(){t.apply(e,arguments),e.net.setProvider.apply(e,arguments),e.personal.setProvider.apply(e,arguments),e.accounts.setProvider.apply(e,arguments),e.Contract.setProvider(e.currentProvider,e.accounts)};var r=null,o="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return r},set:function(t){return t&&(r=u.toChecksumAddress(m.inputAddressFormatter(t))),e.Contract.defaultAccount=r,e.personal.defaultAccount=r,k.forEach(function(e){e.defaultAccount=r}),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return o},set:function(t){return o=t,e.Contract.defaultBlock=o,e.personal.defaultBlock=o,k.forEach(function(e){e.defaultBlock=o}),t},enumerable:!0}),this.clearSubscriptions=e._requestManager.clearSubscriptions,this.net=new c(this.currentProvider),this.net.getNetworkType=y.bind(this),this.accounts=new p(this.currentProvider),this.personal=new h(this.currentProvider),this.personal.defaultAccount=this.defaultAccount;var E=this,x=function(){l.apply(this,arguments);var e=this,t=E.setProvider;E.setProvider=function(){t.apply(E,arguments),i.packageInit(e,[E.currentProvider])}};x.setProvider=function(){l.setProvider.apply(this,arguments)},(x.prototype=Object.create(l.prototype)).constructor=x,this.Contract=x,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.setProvider(this.currentProvider,this.accounts),this.Iban=d,this.abi=b,this.ens=new f(this);var k=[new s({name:"getNodeInfo",call:"web3_clientVersion"}),new s({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new s({name:"getCoinbase",call:"eth_coinbase",params:0}),new s({name:"isMining",call:"eth_mining",params:0}),new s({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:u.hexToNumber}),new s({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:m.outputSyncingFormatter}),new s({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:m.outputBigNumberFormatter}),new s({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:u.toChecksumAddress}),new s({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:u.hexToNumber}),new s({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputBigNumberFormatter}),new s({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[m.inputAddressFormatter,u.numberToHex,m.inputDefaultBlockNumberFormatter]}),new s({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter]}),new s({name:"getBlock",call:v,params:2,inputFormatter:[m.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:m.outputBlockFormatter}),new s({name:"getUncle",call:w,params:2,inputFormatter:[m.inputBlockNumberFormatter,u.numberToHex],outputFormatter:m.outputBlockFormatter}),new s({name:"getBlockTransactionCount",call:_,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"getBlockUncleCount",call:A,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionFormatter}),new s({name:"getTransactionFromBlock",call:g,params:2,inputFormatter:[m.inputBlockNumberFormatter,u.numberToHex],outputFormatter:m.outputTransactionFormatter}),new s({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionReceiptFormatter}),new s({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),new s({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[m.inputTransactionFormatter]}),new s({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[m.inputTransactionFormatter]}),new s({name:"sign",call:"eth_sign",params:2,inputFormatter:[m.inputSignFormatter,m.inputAddressFormatter],transformPayload:function(e){return e.params.reverse(),e}}),new s({name:"call",call:"eth_call",params:2,inputFormatter:[m.inputCallFormatter,m.inputDefaultBlockNumberFormatter]}),new s({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[m.inputCallFormatter],outputFormatter:u.hexToNumber}),new s({name:"submitWork",call:"eth_submitWork",params:3}),new s({name:"getWork",call:"eth_getWork",params:0}),new s({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter}),new a({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:m.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter,subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),n.isFunction(this.callback)&&this.callback(null,e,this)}},syncing:{params:0,outputFormatter:m.outputSyncingFormatter,subscriptionHandler:function(e){var t=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",t._isSyncing),n.isFunction(this.callback)&&this.callback(null,t._isSyncing,this),setTimeout(function(){t.emit("data",e),n.isFunction(t.callback)&&t.callback(null,e,t)},0)):(this.emit("data",e),n.isFunction(t.callback)&&this.callback(null,e,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout(function(){e.currentBlock>e.highestBlock-200&&(t._isSyncing=!1,t.emit("changed",t._isSyncing),n.isFunction(t.callback)&&t.callback(null,t._isSyncing,t))},500))}}}})];k.forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager,e.accounts),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount})};i.addProviders(E),t.exports=E},{"./getNetworkType.js":370,underscore:325,"web3-core":348,"web3-core-helpers":338,"web3-core-method":339,"web3-core-subscriptions":345,"web3-eth-abi":349,"web3-eth-accounts":358,"web3-eth-contract":359,"web3-eth-ens":363,"web3-eth-iban":368,"web3-eth-personal":369,"web3-net":372,"web3-utils":403}],372:[function(e,t,r){"use strict";var n=e("web3-core"),i=e("web3-core-method"),o=e("web3-utils"),a=function(){var e=this;n.packageInit(this,arguments),[new i({name:"getId",call:"net_version",params:0,outputFormatter:o.hexToNumber}),new i({name:"isListening",call:"net_listening",params:0}),new i({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:o.hexToNumber})].forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})};n.addProviders(a),t.exports=a},{"web3-core":348,"web3-core-method":339,"web3-utils":403}],373:[function(e,t,r){const n=e("events").EventEmitter,i=e("util").inherits,o=e("ethereumjs-util"),a=e("eth-block-tracker"),s=e("async/map"),u=e("async/eachSeries"),c=e("./util/stoplight.js");e("./util/rpc-cache-utils.js"),e("./util/create-payload.js");function f(e){const t=this;n.call(t),t.setMaxListeners(30),e=e||{};const r={sendAsync:t._handleAsync.bind(t)},i=e.blockTrackerProvider||r;t._blockTracker=e.blockTracker||new a({provider:i,pollingInterval:e.pollingInterval||4e3}),t._blockTracker.on("block",e=>{const r=function(e){return{number:o.toBuffer(e.number),hash:o.toBuffer(e.hash),parentHash:o.toBuffer(e.parentHash),nonce:o.toBuffer(e.nonce),mixHash:o.toBuffer(e.mixHash),sha3Uncles:o.toBuffer(e.sha3Uncles),logsBloom:o.toBuffer(e.logsBloom),transactionsRoot:o.toBuffer(e.transactionsRoot),stateRoot:o.toBuffer(e.stateRoot),receiptsRoot:o.toBuffer(e.receiptRoot||e.receiptsRoot),miner:o.toBuffer(e.miner),difficulty:o.toBuffer(e.difficulty),totalDifficulty:o.toBuffer(e.totalDifficulty),size:o.toBuffer(e.size),extraData:o.toBuffer(e.extraData),gasLimit:o.toBuffer(e.gasLimit),gasUsed:o.toBuffer(e.gasUsed),timestamp:o.toBuffer(e.timestamp),transactions:e.transactions}}(e);t._setCurrentBlock(r)}),t._blockTracker.on("block",t.emit.bind(t,"rawBlock")),t._blockTracker.on("sync",t.emit.bind(t,"sync")),t._blockTracker.on("latest",t.emit.bind(t,"latest")),t._ready=new c,t._blockTracker.once("block",()=>{t._ready.go()}),t.currentBlock=null,t._providers=[]}t.exports=f,i(f,n),f.prototype.start=function(e=function(){}){this._blockTracker.start().then(e).catch(e)},f.prototype.stop=function(){this._blockTracker.stop()},f.prototype.addProvider=function(e){this._providers.push(e),e.setEngine(this)},f.prototype.send=function(e){throw new Error("Web3ProviderEngine does not support synchronous requests.")},f.prototype.sendAsync=function(e,t){const r=this;r._ready.await(function(){Array.isArray(e)?s(e,r._handleAsync.bind(r),t):r._handleAsync(e,t)})},f.prototype._handleAsync=function(e,t){var r=this,n=-1,i=null,o=null,a=[];function s(r,n){o=r,i=n,u(a,function(e,t){e?e(o,i,t):t()},function(){var r={id:e.id,jsonrpc:e.jsonrpc,result:i};null!=o?(r.error={message:o.stack||o.message||o,code:-32e3},t(o,r)):t(null,r)})}!function t(i){n+=1;a.unshift(i);if(n>=r._providers.length)s(new Error('Request for method "'+e.method+'" not handled by any subprovider. Please check your subprovider configuration to ensure this method is handled.'));else try{var o=r._providers[n];o.handleRequest(e,t,s)}catch(e){s(e)}}()},f.prototype._setCurrentBlock=function(e){this.currentBlock=e,this.emit("block",e)}},{"./util/create-payload.js":391,"./util/rpc-cache-utils.js":394,"./util/stoplight.js":396,"async/eachSeries":25,"async/map":41,"eth-block-tracker":126,"ethereumjs-util":141,events:157,util:333}],374:[function(e,t,r){var n="undefined"!=typeof JSON?JSON:e("jsonify");t.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r=t.space||"";"number"==typeof r&&(r=Array(r+1).join(" "));var a,s="boolean"==typeof t.cycles&&t.cycles,u=t.replacer||function(e,t){return t},c=t.cmp&&(a=t.cmp,function(e){return function(t,r){var n={key:t,value:e[t]},i={key:r,value:e[r]};return a(n,i)}}),f=[];return function e(t,a,h,l){var d=r?"\n"+new Array(l+1).join(r):"",p=r?": ":":";if(h&&h.toJSON&&"function"==typeof h.toJSON&&(h=h.toJSON()),void 0!==(h=u.call(t,a,h))){if("object"!=typeof h||null===h)return n.stringify(h);if(i(h)){for(var b=[],y=0;y dist/ProviderEngine.js","bundle-zero":"browserify -s ZeroClientProvider -e zero.js -t [ babelify --presets [ es2015 ] ] > dist/ZeroClientProvider.js",prepublish:"npm run build && npm run bundle",test:"node test/index.js"},version:"14.1.0"}},{}],376:[function(e,t,r){const n=e("util").inherits,i=e("ethereumjs-util"),o=i.BN,a=e("clone"),s=e("../util/rpc-cache-utils.js"),u=e("../util/stoplight.js"),c=e("./subprovider.js");function f(e){e=e||{},this._ready=new u,this.strategies={perma:new l({eth_getTransactionByHash:p,eth_getTransactionReceipt:p}),block:new d(this),fork:new d(this)}}function h(){var e=this;e.cache={};var t=setInterval(function(){e.cache={}},6e5);t.unref&&t.unref()}function l(e){this.strategy=new h,this.conditionals=e}function d(){this.cache={}}function p(e){if(!e)return!1;if(!e.blockHash)return!1;var t;return(t=e.blockHash,new o(i.toBuffer(t))).gt(new o(0))}t.exports=f,n(f,c),f.prototype.setEngine=function(e){const t=this;function r(e){var r=t.currentBlock;t.currentBlock=e,r&&(t.strategies.block.cacheRollOff(r),t.strategies.fork.cacheRollOff(r))}t.engine=e,e.once("block",function(n){t.currentBlock=n,t._ready.go(),e.on("block",r)})},f.prototype.handleRequest=function(e,t,r){const n=this;return e.skipCache?t():"eth_getBlockByNumber"===e.method&&"latest"===e.params[0]?t():void n._ready.await(function(){n._handleRequest(e,t,r)})},f.prototype._handleRequest=function(e,t,r){const n=this;var o=s.cacheTypeForPayload(e),a=this.strategies[o];if(!a)return t();if(!a.canCache(e))return t();var u,c=s.blockTagForPayload(e);c||(c="latest"),u="earliest"===c?"0x00":"latest"===c?i.bufferToHex(n.currentBlock.number):c,a.hitCheck(e,u,r,function(){t(function(t,r,n){if(t)return n();a.cacheResult(e,r,u,n)})})},h.prototype.hitCheck=function(e,t,r,n){var i,o,u,c,f=s.cacheIdentifierForPayload(e),h=this.cache[f];return h&&(i=t,o=h.blockNumber,u=parseInt(i,16),c=parseInt(o,16),(u===c?0:u>c?1:-1)>=0)?r(null,a(h.result)):n()},h.prototype.cacheResult=function(e,t,r,n){var i=s.cacheIdentifierForPayload(e);if(t){var o=a(t);this.cache[i]={blockNumber:r,result:o}}n()},h.prototype.canCache=function(e){return s.canCache(e)},l.prototype.hitCheck=function(e,t,r,n){return this.strategy.hitCheck(e,t,r,n)},l.prototype.cacheResult=function(e,t,r,n){var i=this.conditionals[e.method];i?i(t)?this.strategy.cacheResult(e,t,r,n):n():this.strategy.cacheResult(e,t,r,n)},l.prototype.canCache=function(e){return this.strategy.canCache(e)},d.prototype.getBlockCacheForPayload=function(e,t){const r=Number.parseInt(t,16);let n=this.cache[r];if(!n){const e={};this.cache[r]=e,n=e}return n},d.prototype.hitCheck=function(e,t,r,n){var i=this.getBlockCacheForPayload(e,t);if(!i)return n();var o=i[s.cacheIdentifierForPayload(e)];return o?r(null,o):n()},d.prototype.cacheResult=function(e,t,r,n){t&&(this.getBlockCacheForPayload(e,r)[s.cacheIdentifierForPayload(e)]=t);n()},d.prototype.canCache=function(e){return!!s.canCache(e)&&"pending"!==s.blockTagForPayload(e)},d.prototype.cacheRollOff=function(e){const t=this,r=i.bufferToHex(e.number),n=Number.parseInt(r,16);Object.keys(t.cache).map(Number).filter(e=>e<=n).forEach(e=>delete t.cache[e])}},{"../util/rpc-cache-utils.js":394,"../util/stoplight.js":396,"./subprovider.js":387,clone:87,"ethereumjs-util":141,util:333}],377:[function(e,t,r){const n=e("util").inherits,i=e("xtend"),o=e("./fixture.js"),a=e("../package.json").version;function s(e){var t=i({web3_clientVersion:"ProviderEngine/v"+a+"/javascript",net_listening:!0,eth_hashrate:"0x00",eth_mining:!1},e=e||{});o.call(this,t)}t.exports=s,n(s,o)},{"../package.json":375,"./fixture.js":380,util:333,xtend:423}],378:[function(e,t,r){const n=e("cross-fetch"),i=e("util").inherits,o=e("async/retry"),a=e("async/waterfall"),s=e("async/asyncify"),u=e("json-rpc-error"),c=e("promise-to-callback"),f=e("../util/create-payload.js"),h=e("./subprovider.js"),l=["Gateway timeout","ETIMEDOUT","SyntaxError"];function d(e){this.rpcUrl=e.rpcUrl,this.originHttpHeaderKey=e.originHttpHeaderKey}function p(e){const t=e.toString();return l.some(e=>t.includes(e))}t.exports=d,i(d,h),d.prototype.handleRequest=function(e,t,r){const n=this,i=e.origin,a=f(e);delete a.origin;const s={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)};n.originHttpHeaderKey&&i&&(s.headers[n.originHttpHeaderKey]=i),o({times:5,interval:1e3,errorFilter:p},e=>n._submitRequest(s,e),(e,t)=>{if(e&&p(e)){const t=`FetchSubprovider - cannot complete request. All retries exhausted.\nOriginal Error:\n${e.toString()}\n\n`,n=new Error(t);return r(n)}return r(e,t)})},d.prototype._submitRequest=function(e,t){const r=this.rpcUrl;c(n(r,e))((e,r)=>{if(e)return t(e);a([function(e){switch(r.status){case 405:return e(new u.MethodNotFound);case 418:return e(function(){const e=new Error("Request is being rate limited.");return new u.InternalError(e)}());case 503:case 504:return e(function(){let e="Gateway timeout. The request took too long to process. ";const t=new Error(e+="This can happen when querying logs over too wide a block range.");return new u.InternalError(t)}());default:return e()}},e=>c(r.text())(e),s(e=>JSON.parse(e)),function(e,t){if(200!==r.status)return t(new u.InternalError(e));if(e.error)return t(new u.InternalError(e.error));t(null,e.result)}],t)})}},{"../util/create-payload.js":391,"./subprovider.js":387,"async/asyncify":20,"async/retry":43,"async/waterfall":44,"cross-fetch":96,"json-rpc-error":189,"promise-to-callback":258,util:333}],379:[function(e,t,r){const n=e("async"),i=e("util").inherits,o=e("ethereumjs-util"),a=e("./subprovider.js"),s=e("../util/stoplight.js"),u=e("events").EventEmitter;function c(e){e=e||{};const t=this;t.filterIndex=0,t.filters={},t.filterDestroyHandlers={},t.asyncBlockHandlers={},t.asyncPendingBlockHandlers={},t._ready=new s,t._ready.setMaxListeners(e.maxFilters||25),t._ready.go(),t.pendingBlockTimeout=e.pendingBlockTimeout||4e3,t.checkForPendingBlocksActive=!1,setTimeout(function(){t.engine.on("block",function(e){t._ready.stop();var r=v(t.asyncBlockHandlers).map(function(t){return t.bind(null,e)});n.parallel(r,function(e){e&&console.error(e),t._ready.go()})})})}function f(e){u.apply(this),this.type="block",this.engine=e.engine,this.blockNumber=e.blockNumber,this.updates=[]}function h(e){u.apply(this),this.type="log",this.fromBlock=void 0!==e.fromBlock?e.fromBlock:"latest",this.toBlock=void 0!==e.toBlock?e.toBlock:"latest";var t=e.address&&(Array.isArray(e.address)?e.address:[e.address]);this.address=t&&t.map(d),this.topics=e.topics||[],this.updates=[],this.allResults=[]}function l(){u.apply(this),this.type="pendingTx",this.updates=[],this.allResults=[]}function d(e){return"0x"===e.slice(0,2)?e:"0x"+e}function p(e){return o.intToHex(e)}function b(e){return Number(e)}function y(e){return function(e){let t=o.stripHexPrefix(e);for(;"0"===t[0];)t=t.substr(1);return`0x${t}`}(e.toString("hex"))}function m(e){return e&&-1===["earliest","latest","pending"].indexOf(e)}function v(e){return Object.keys(e).map(function(t){return e[t]})}t.exports=c,i(c,a),c.prototype.handleRequest=function(e,t,r){const n=this;switch(e.method){case"eth_newBlockFilter":return void n.newBlockFilter(r);case"eth_newPendingTransactionFilter":return n.newPendingTransactionFilter(r),void n.checkForPendingBlocks();case"eth_newFilter":return void n.newLogFilter(e.params[0],r);case"eth_getFilterChanges":return void n._ready.await(function(){n.getFilterChanges(e.params[0],r)});case"eth_getFilterLogs":return void n._ready.await(function(){n.getFilterLogs(e.params[0],r)});case"eth_uninstallFilter":return void n._ready.await(function(){n.uninstallFilter(e.params[0],r)});default:return void t()}},c.prototype.newBlockFilter=function(e){const t=this;t._getBlockNumber(function(r,n){if(r)return e(r);var i=new f({blockNumber:n}),o=i.update.bind(i);t.engine.on("block",o);t.filterIndex++,t.filters[t.filterIndex]=i,t.filterDestroyHandlers[t.filterIndex]=function(){t.engine.removeListener("block",o)};var a=p(t.filterIndex);e(null,a)})},c.prototype.newLogFilter=function(e,t){const r=this;r._getBlockNumber(function(n,i){if(n)return t(n);var o=new h(e),a=o.update.bind(o);r.filterIndex++,r.asyncBlockHandlers[r.filterIndex]=function(e,t){r._logsForBlock(e,function(e,r){if(e)return t(e);a(r),t()})},r.filters[r.filterIndex]=o;var s=p(r.filterIndex);t(null,s)})},c.prototype.newPendingTransactionFilter=function(e){const t=this;var r=new l,n=r.update.bind(r);t.filterIndex++,t.asyncPendingBlockHandlers[t.filterIndex]=function(e,r){t._txHashesForBlock(e,function(e,t){if(e)return r(e);n(t),r()})},t.filters[t.filterIndex]=r,e(null,p(t.filterIndex))},c.prototype.getFilterChanges=function(e,t){var r=Number.parseInt(e,16),n=this.filters[r];if(n||console.warn("FilterSubprovider - no filter with that id:",e),!n)return t(null,[]);var i=n.getChanges();n.clearChanges(),t(null,i)},c.prototype.getFilterLogs=function(e,t){const r=this;var n=Number.parseInt(e,16),i=r.filters[n];if(i||console.warn("FilterSubprovider - no filter with that id:",e),!i)return t(null,[]);if("log"===i.type)r.emitPayload({method:"eth_getLogs",params:[{fromBlock:i.fromBlock,toBlock:i.toBlock,address:i.address,topics:i.topics}]},function(e,r){if(e)return t(e);t(null,r.result)});else{t(null,[])}},c.prototype.uninstallFilter=function(e,t){var r=Number.parseInt(e,16);if(this.filters[r]){this.filters[r].removeAllListeners();var n=this.filterDestroyHandlers[r];delete this.filters[r],delete this.asyncBlockHandlers[r],delete this.asyncPendingBlockHandlers[r],delete this.filterDestroyHandlers[r],n&&n(),t(null,!0)}else t(null,!1)},c.prototype.checkForPendingBlocks=function(){const e=this;e.checkForPendingBlocksActive||!!Object.keys(e.asyncPendingBlockHandlers).length&&(e.checkForPendingBlocksActive=!0,e.emitPayload({method:"eth_getBlockByNumber",params:["pending",!0]},function(t,r){if(t)return e.checkForPendingBlocksActive=!1,void console.error(t);e.onNewPendingBlock(r.result,function(t){t&&console.error(t),e.checkForPendingBlocksActive=!1,setTimeout(e.checkForPendingBlocks.bind(e),e.pendingBlockTimeout)})}))},c.prototype.onNewPendingBlock=function(e,t){var r=v(this.asyncPendingBlockHandlers).map(function(t){return t.bind(null,e)});n.parallel(r,t)},c.prototype._getBlockNumber=function(e){e(null,y(this.engine.currentBlock.number))},c.prototype._logsForBlock=function(e,t){var r=y(e.number);this.emitPayload({method:"eth_getLogs",params:[{fromBlock:r,toBlock:r}]},function(e,r){return e?t(e):r.error?t(r.error):void t(null,r.result)})},c.prototype._txHashesForBlock=function(e,t){var r=e.transactions;if(0===r.length)return t(null,[]);"string"==typeof r[0]?t(null,r):t(null,r.map(e=>e.hash))},i(f,u),f.prototype.update=function(e){var t="0x"+e.hash.toString("hex");this.updates.push(t),this.emit("data",e)},f.prototype.getChanges=function(){return this.updates},f.prototype.clearChanges=function(){this.updates=[]},i(h,u),h.prototype.validateLog=function(e){return!(m(this.fromBlock)&&b(this.fromBlock)>=b(e.blockNumber))&&(!(m(this.toBlock)&&b(this.toBlock)<=b(e.blockNumber))&&(!(this.address&&!this.address.map(e=>e.toLowerCase()).includes(e.address.toLowerCase()))&&this.topics.reduce(function(t,r,n){if(!t)return!1;if(!r)return!0;var i=e.topics[n];return!!i&&(Array.isArray(r)?r:[r]).filter(function(e){return i.toLowerCase()===e.toLowerCase()}).length>0},!0)))},h.prototype.update=function(e){const t=this;var r=[];e.forEach(function(e){t.validateLog(e)&&(r.push(e),t.updates.push(e),t.allResults.push(e))}),r.length>0&&t.emit("data",r)},h.prototype.getChanges=function(){return this.updates},h.prototype.getAllResults=function(){return this.allResults},h.prototype.clearChanges=function(){this.updates=[]},i(l,u),l.prototype.validateUnique=function(e){return-1===this.allResults.indexOf(e)},l.prototype.update=function(e){const t=this;var r=[];e.forEach(function(e){t.validateUnique(e)&&(r.push(e),t.updates.push(e),t.allResults.push(e))}),r.length>0&&t.emit("data",r)},l.prototype.getChanges=function(){return this.updates},l.prototype.getAllResults=function(){return this.allResults},l.prototype.clearChanges=function(){this.updates=[]}},{"../util/stoplight.js":396,"./subprovider.js":387,async:21,"ethereumjs-util":141,events:157,util:333}],380:[function(e,t,r){const n=e("util").inherits,i=e("./subprovider.js");function o(e){e=e||{},this.staticResponses=e}t.exports=o,n(o,i),o.prototype.handleRequest=function(e,t,r){var n=this.staticResponses[e.method];"function"==typeof n?n(e,t,r):void 0!==n?setTimeout(()=>r(null,n)):t()}},{"./subprovider.js":387,util:333}],381:[function(e,t,r){const n=e("async/waterfall"),i=e("async/parallel"),o=e("util").inherits,a=e("ethereumjs-util"),s=e("eth-sig-util"),u=e("xtend"),c=e("semaphore"),f=e("./subprovider.js"),h=e("../util/estimate-gas.js"),l=/^[0-9A-Fa-f]+$/g;function d(e){this.nonceLock=c(1),e.getAccounts&&(this.getAccounts=e.getAccounts),e.processTransaction&&(this.processTransaction=e.processTransaction),e.processMessage&&(this.processMessage=e.processMessage),e.processPersonalMessage&&(this.processPersonalMessage=e.processPersonalMessage),e.processTypedMessage&&(this.processTypedMessage=e.processTypedMessage),this.approveTransaction=e.approveTransaction||this.autoApprove,this.approveMessage=e.approveMessage||this.autoApprove,this.approvePersonalMessage=e.approvePersonalMessage||this.autoApprove,this.approveTypedMessage=e.approveTypedMessage||this.autoApprove,e.signTransaction&&(this.signTransaction=e.signTransaction||y("signTransaction")),e.signMessage&&(this.signMessage=e.signMessage||y("signMessage")),e.signPersonalMessage&&(this.signPersonalMessage=e.signPersonalMessage||y("signPersonalMessage")),e.signTypedMessage&&(this.signTypedMessage=e.signTypedMessage||y("signTypedMessage")),e.recoverPersonalSignature&&(this.recoverPersonalSignature=e.recoverPersonalSignature),e.publishTransaction&&(this.publishTransaction=e.publishTransaction)}function p(e){return e.toLowerCase()}function b(e){return"string"==typeof e&&("0x"===e.slice(0,2)&&e.slice(2).match(l))}function y(e){return function(t,r){r(new Error('ProviderEngine - HookedWalletSubprovider - Must provide "'+e+'" fn in constructor options'))}}t.exports=d,o(d,f),d.prototype.handleRequest=function(e,t,r){const i=this;let o,s,c,f,h;switch(i._parityRequests={},i._parityRequestCount=0,e.method){case"eth_coinbase":return void i.getAccounts(function(e,t){if(e)return r(e);let n=t[0]||null;r(null,n)});case"eth_accounts":return void i.getAccounts(function(e,t){if(e)return r(e);r(null,t)});case"eth_sendTransaction":return o=e.params[0],void n([e=>i.validateTransaction(o,e),e=>i.processTransaction(o,e)],r);case"eth_signTransaction":return o=e.params[0],void n([e=>i.validateTransaction(o,e),e=>i.processSignTransaction(o,e)],r);case"eth_sign":return h=e.params[0],f=e.params[1],c=e.params[2]||{},s=u(c,{from:h,data:f}),void n([e=>i.validateMessage(s,e),e=>i.processMessage(s,e)],r);case"personal_sign":const l=e.params[0];if(function(e){const t=a.addHexPrefix(e);return!a.isValidAddress(t)&&b(e)}(e.params[1])&&function(e){const t=a.addHexPrefix(e);return a.isValidAddress(t)}(l)){let t="The eth_personalSign method requires params ordered ";t+="[message, address]. This was previously handled incorrectly, ",t+="and has been corrected automatically. ",t+="Please switch this param order for smooth behavior in the future.",console.warn(t),h=e.params[0],f=e.params[1]}else f=e.params[0],h=e.params[1];return c=e.params[2]||{},s=u(c,{from:h,data:f}),void n([e=>i.validatePersonalMessage(s,e),e=>i.processPersonalMessage(s,e)],r);case"personal_ecRecover":f=e.params[0];let d=e.params[1];return c=e.params[2]||{},s=u(c,{sig:d,data:f}),void i.recoverPersonalSignature(s,r);case"eth_signTypedData":return f=e.params[0],h=e.params[1],c=e.params[2]||{},s=u(c,{from:h,data:f}),void n([e=>i.validateTypedMessage(s,e),e=>i.processTypedMessage(s,e)],r);case"parity_postTransaction":return o=e.params[0],void i.parityPostTransaction(o,r);case"parity_postSign":return h=e.params[0],f=e.params[1],void i.parityPostSign(h,f,r);case"parity_checkRequest":const p=e.params[0];return void i.parityCheckRequest(p,r);case"parity_defaultAccount":return void i.getAccounts(function(e,t){if(e)return r(e);const n=t[0]||null;r(null,n)});default:return void t()}},d.prototype.getAccounts=function(e){e(null,[])},d.prototype.processTransaction=function(e,t){const r=this;n([t=>r.approveTransaction(e,t),(e,t)=>r.checkApproval("transaction",e,t),t=>r.finalizeAndSubmitTx(e,t)],t)},d.prototype.processSignTransaction=function(e,t){const r=this;n([t=>r.approveTransaction(e,t),(e,t)=>r.checkApproval("transaction",e,t),t=>r.finalizeTx(e,t)],t)},d.prototype.processMessage=function(e,t){const r=this;n([t=>r.approveMessage(e,t),(e,t)=>r.checkApproval("message",e,t),t=>r.signMessage(e,t)],t)},d.prototype.processPersonalMessage=function(e,t){const r=this;n([t=>r.approvePersonalMessage(e,t),(e,t)=>r.checkApproval("message",e,t),t=>r.signPersonalMessage(e,t)],t)},d.prototype.processTypedMessage=function(e,t){const r=this;n([t=>r.approveTypedMessage(e,t),(e,t)=>r.checkApproval("message",e,t),t=>r.signTypedMessage(e,t)],t)},d.prototype.autoApprove=function(e,t){t(null,!0)},d.prototype.checkApproval=function(e,t,r){r(t?null:new Error("User denied "+e+" signature."))},d.prototype.parityPostTransaction=function(e,t){const r=this,n=`0x${r._parityRequestCount.toString(16)}`;r._parityRequestCount++,r.emitPayload({method:"eth_sendTransaction",params:[e]},function(e,t){if(e)return void(r._parityRequests[n]={error:e});const i=t.result;r._parityRequests[n]=i}),t(null,n)},d.prototype.parityPostSign=function(e,t,r){const n=this,i=`0x${n._parityRequestCount.toString(16)}`;n._parityRequestCount++,n.emitPayload({method:"eth_sign",params:[e,t]},function(e,t){if(e)return void(n._parityRequests[i]={error:e});const r=t.result;n._parityRequests[i]=r}),r(null,i)},d.prototype.parityCheckRequest=function(e,t){const r=this._parityRequests[e]||null;return r?r.error?t(r.error):void t(null,r):t(null,null)},d.prototype.recoverPersonalSignature=function(e,t){let r;try{r=s.recoverPersonalSignature(e)}catch(e){return t(e)}t(null,r)},d.prototype.validateTransaction=function(e,t){if(void 0===e.from)return t(new Error("Undefined address - from address required to sign transaction."));this.validateSender(e.from,function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign transaction for this address: "${e.from}"`))})},d.prototype.validateMessage=function(e,t){if(void 0===e.from)return t(new Error("Undefined address - from address required to sign message."));this.validateSender(e.from,function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign message for this address: "${e.from}"`))})},d.prototype.validatePersonalMessage=function(e,t){return void 0===e.from?t(new Error("Undefined address - from address required to sign personal message.")):void 0===e.data?t(new Error("Undefined message - message required to sign personal message.")):b(e.data)?void this.validateSender(e.from,function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign message for this address: "${e.from}"`))}):t(new Error("HookedWalletSubprovider - validateMessage - message was not encoded as hex."))},d.prototype.validateTypedMessage=function(e,t){return void 0===e.from?t(new Error("Undefined address - from address required to sign typed data.")):void 0===e.data?t(new Error("Undefined data - message required to sign typed data.")):void this.validateSender(e.from,function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign message for this address: "${e.from}"`))})},d.prototype.validateSender=function(e,t){if(!e)return t(null,!1);this.getAccounts(function(r,n){if(r)return t(r);const i=-1!==n.map(p).indexOf(e.toLowerCase());t(null,i)})},d.prototype.finalizeAndSubmitTx=function(e,t){const r=this;r.nonceLock.take(function(){n([r.fillInTxExtras.bind(r,e),r.signTransaction.bind(r),r.publishTransaction.bind(r)],function(e,n){if(r.nonceLock.leave(),e)return t(e);t(null,n)})})},d.prototype.finalizeTx=function(e,t){const r=this;r.nonceLock.take(function(){n([r.fillInTxExtras.bind(r,e),r.signTransaction.bind(r)],function(n,i){if(r.nonceLock.leave(),n)return t(n);t(null,{raw:i,tx:e})})})},d.prototype.publishTransaction=function(e,t){this.emitPayload({method:"eth_sendRawTransaction",params:[e]},function(e,r){if(e)return t(e);t(null,r.result)})},d.prototype.fillInTxExtras=function(e,t){const r=this,n=e.from,o={};void 0===e.gasPrice&&(o.gasPrice=r.emitPayload.bind(r,{method:"eth_gasPrice",params:[]})),void 0===e.nonce&&(o.nonce=r.emitPayload.bind(r,{method:"eth_getTransactionCount",params:[n,"pending"]})),void 0===e.gas&&(o.gas=h.bind(null,r.engine,function(e){return{from:e.from,to:e.to,value:e.value,data:e.data,gas:e.gas,gasPrice:e.gasPrice,nonce:e.nonce}}(e))),i(o,function(r,n){if(r)return t(r);const i={};n.gasPrice&&(i.gasPrice=n.gasPrice.result),n.nonce&&(i.nonce=n.nonce.result),n.gas&&(i.gas=n.gas),t(null,u(e,i))})}},{"../util/estimate-gas.js":392,"./subprovider.js":387,"async/parallel":42,"async/waterfall":44,"eth-sig-util":136,"ethereumjs-util":141,semaphore:301,util:333,xtend:423}],382:[function(e,t,r){const n=e("../util/rpc-cache-utils.js").cacheIdentifierForPayload,i=e("./subprovider.js");t.exports=class extends i{constructor(e){super(),this.inflightRequests={}}addEngine(e){this.engine=e}handleRequest(e,t,r){const i=n(e,{includeBlockRef:!0});if(!i)return t();let o=this.inflightRequests[i];o?o.push(r):(o=[],this.inflightRequests[i]=o,t((e,t,r)=>{delete this.inflightRequests[i],o.forEach(r=>r(e,t)),r(e,t)}))}}},{"../util/rpc-cache-utils.js":394,"./subprovider.js":387}],383:[function(e,t,r){const n=e("eth-json-rpc-infura/src/createProvider"),i=e("./provider.js");t.exports=class extends i{constructor(e={}){super(n(e))}}},{"./provider.js":385,"eth-json-rpc-infura/src/createProvider":129}],384:[function(e,t,r){(function(r){const n=e("util").inherits,i=e("ethereumjs-tx"),o=e("ethereumjs-util"),a=e("./subprovider.js"),s=e("../util/rpc-cache-utils").blockTagForPayload;function u(e){this.nonceCache={}}t.exports=u,n(u,a),u.prototype.handleRequest=function(e,t,n){const a=this;switch(e.method){case"eth_getTransactionCount":var u=s(e),c=e.params[0].toLowerCase(),f=a.nonceCache[c];return void("pending"===u?f?n(null,f):t(function(e,t,r){if(e)return r();void 0===a.nonceCache[c]&&(a.nonceCache[c]=t),r()}):t());case"eth_sendRawTransaction":return void t(function(t,n,s){if(t)return s();var u=e.params[0],c=(o.stripHexPrefix(u),new r(o.stripHexPrefix(u),"hex"),new i(new r(o.stripHexPrefix(u),"hex"))),f="0x"+c.getSenderAddress().toString("hex").toLowerCase(),h=o.bufferToInt(c.nonce),l=(++h).toString(16);l.length%2&&(l="0"+l),l="0x"+l,a.nonceCache[f]=l,s()});default:return void t()}}}).call(this,e("buffer").Buffer)},{"../util/rpc-cache-utils":394,"./subprovider.js":387,buffer:84,"ethereumjs-tx":140,"ethereumjs-util":141,util:333}],385:[function(e,t,r){const n=e("util").inherits,i=e("./subprovider.js");function o(e){if(!e)throw new Error("ProviderSubprovider - no provider specified");if(!e.sendAsync)throw new Error("ProviderSubprovider - specified provider does not have a sendAsync method");this.provider=e}t.exports=o,n(o,i),o.prototype.handleRequest=function(e,t,r){this.provider.sendAsync(e,function(e,t){return e?r(e):t.error?r(new Error(t.error.message)):void r(null,t.result)})}},{"./subprovider.js":387,util:333}],386:[function(e,t,r){const n=e("util").inherits,i=e("./subprovider.js"),o=(e("xtend"),e("ethereumjs-util"));function a(e){}t.exports=a,n(a,i),a.prototype.handleRequest=function(e,t,r){var n=e.params[0];if("object"==typeof n&&!Array.isArray(n)){var i=function(e){return s.reduce(function(t,r){return r in e&&(Array.isArray(e[r])?t[r]=e[r].map(function(e){return u(e)}):t[r]=u(e[r])),t},{})}(n);e.params[0]=i}t()};var s=["from","to","value","data","gas","gasPrice","nonce","fromBlock","toBlock","address","topics"];function u(e){switch(e){case"latest":case"pending":case"earliest":return e;default:return"string"==typeof e?o.addHexPrefix(e.toLowerCase()):e}}},{"./subprovider.js":387,"ethereumjs-util":141,util:333,xtend:423}],387:[function(e,t,r){const n=e("../util/create-payload.js");function i(){}t.exports=i,i.prototype.setEngine=function(e){const t=this;t.engine=e,e.on("block",function(e){t.currentBlock=e})},i.prototype.handleRequest=function(e,t,r){throw new Error("Subproviders should override `handleRequest`.")},i.prototype.emitPayload=function(e,t){this.engine.sendAsync(n(e),t)}},{"../util/create-payload.js":391}],388:[function(e,t,r){const n=e("events").EventEmitter,i=e("./filters.js"),o=e("../util/rpc-hex-encoding.js"),a=e("util").inherits,s=e("ethereumjs-util");function u(e){e=e||{},n.apply(this,Array.prototype.slice.call(arguments)),i.apply(this,[e]),this.subscriptions={}}a(u,i),Object.assign(u.prototype,n.prototype),u.prototype.constructor=u,u.prototype.eth_subscribe=function(e,t){const r=this;let n=()=>{},i=e.params[0];switch(i){case"logs":let o=e.params[1];n=r.newLogFilter.bind(r,o);break;case"newPendingTransactions":n=r.newPendingTransactionFilter.bind(r);break;case"newHeads":n=r.newBlockFilter.bind(r);break;case"syncing":default:return void t(new Error("unsupported subscription type"))}n(function(e,n){if(e)return t(e);const o=Number.parseInt(n,16);r.subscriptions[o]=i,r.filters[o].on("data",function(e){Array.isArray(e)||(e=[e]);var t=r._notificationHandler.bind(r,n,i);e.forEach(t),r.filters[o].clearChanges()}),"newPendingTransactions"===i&&r.checkForPendingBlocks(),t(null,n)})},u.prototype.eth_unsubscribe=function(e,t){const r=this;let n=e.params[0];const i=Number.parseInt(n,16);if(r.subscriptions[i]){r.subscriptions[i];r.uninstallFilter(n,function(e,n){delete r.subscriptions[i],t(e,n)})}else t(new Error(`Subscription ID ${n} not found.`))},u.prototype._notificationHandler=function(e,t,r){const n=this;"newHeads"===t&&(r=n._notificationResultFromBlock(r)),n.emit("data",null,{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:e,result:r}})},u.prototype._notificationResultFromBlock=function(e){return{hash:s.bufferToHex(e.hash),parentHash:s.bufferToHex(e.parentHash),sha3Uncles:s.bufferToHex(e.sha3Uncles),miner:s.bufferToHex(e.miner),stateRoot:s.bufferToHex(e.stateRoot),transactionsRoot:s.bufferToHex(e.transactionsRoot),receiptsRoot:s.bufferToHex(e.receiptsRoot),logsBloom:s.bufferToHex(e.logsBloom),difficulty:o.intToQuantityHex(s.bufferToInt(e.difficulty)),number:o.intToQuantityHex(s.bufferToInt(e.number)),gasLimit:o.intToQuantityHex(s.bufferToInt(e.gasLimit)),gasUsed:o.intToQuantityHex(s.bufferToInt(e.gasUsed)),nonce:e.nonce?s.bufferToHex(e.nonce):null,mixHash:s.bufferToHex(e.mixHash),timestamp:o.intToQuantityHex(s.bufferToInt(e.timestamp)),extraData:s.bufferToHex(e.extraData)}},u.prototype.handleRequest=function(e,t,r){switch(e.method){case"eth_subscribe":this.eth_subscribe(e,r);break;case"eth_unsubscribe":this.eth_unsubscribe(e,r);break;default:i.prototype.handleRequest.apply(this,Array.prototype.slice.call(arguments))}},t.exports=u},{"../util/rpc-hex-encoding.js":395,"./filters.js":379,"ethereumjs-util":141,events:157,util:333}],389:[function(e,t,r){(function(r){const n=e("backoff"),i=e("events"),o=(e("util").inherits,r.WebSocket||e("ws")),a=e("./subprovider"),s=e("../util/create-payload");class u extends a{constructor({rpcUrl:e,debug:t,origin:r}){super(),i.call(this),Object.defineProperties(this,{_backoff:{value:n.exponential({randomisationFactor:.2,maxDelay:5e3})},_connectTime:{value:null,writable:!0},_log:{value:t?(...e)=>console.info.apply(console,["[WSProvider]",...e]):()=>{}},_origin:{value:r},_pendingRequests:{value:new Map},_socket:{value:null,writable:!0},_unhandledRequests:{value:[]},_url:{value:e}}),this._handleSocketClose=this._handleSocketClose.bind(this),this._handleSocketMessage=this._handleSocketMessage.bind(this),this._handleSocketOpen=this._handleSocketOpen.bind(this),this._backoff.on("ready",()=>{this._openSocket()}),this._openSocket()}handleRequest(e,t,r){if(!this._socket||this._socket.readyState!==o.OPEN)return this._unhandledRequests.push(Array.from(arguments)),void this._log("Socket not open. Request queued.");this._pendingRequests.set(e.id,[e,r]);const n=s(e);delete n.origin,this._socket.send(JSON.stringify(n)),this._log(`Sent: ${n.method} #${n.id}`)}_handleSocketClose({reason:e,code:t}){this._log(`Socket closed, code ${t} (${e||"no reason"})`),this._connectTime&&Date.now()-this._connectTime>5e3&&this._backoff.reset(),this._socket.removeEventListener("close",this._handleSocketClose),this._socket.removeEventListener("message",this._handleSocketMessage),this._socket.removeEventListener("open",this._handleSocketOpen),this._socket=null,this._backoff.backoff()}_handleSocketMessage(e){let t;try{t=JSON.parse(e.data)}catch(e){return void this._log("Received a message that is not valid JSON:",t)}if(void 0===t.id)return this.emit("data",null,t);if(!this._pendingRequests.has(t.id))return;const[r,n]=this._pendingRequests.get(t.id);if(this._pendingRequests.delete(t.id),this._log(`Received: ${r.method} #${t.id}`),t.error)return n(new Error(t.error.message));n(null,t.result)}_handleSocketOpen(){this._log("Socket open."),this._connectTime=Date.now(),this._pendingRequests.forEach(([e,t])=>{this._unhandledRequests.push([e,null,t])}),this._pendingRequests.clear(),this._unhandledRequests.splice(0,this._unhandledRequests.length).forEach(e=>{this.handleRequest.apply(this,e)})}_openSocket(){this._log("Opening socket..."),this._socket=new o(this._url,null,{origin:this._origin}),this._socket.addEventListener("close",this._handleSocketClose),this._socket.addEventListener("message",this._handleSocketMessage),this._socket.addEventListener("open",this._handleSocketOpen)}}Object.assign(u.prototype,i.prototype),t.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util/create-payload":391,"./subprovider":387,backoff:45,events:157,util:333,ws:55}],390:[function(e,t,r){t.exports=function(e,t){if(!e)throw t||"Assertion failed"}},{}],391:[function(e,t,r){const n=e("./random-id.js"),i=e("xtend");t.exports=function(e){return i({id:n(),jsonrpc:"2.0",params:[]},e)}},{"./random-id.js":393,xtend:423}],392:[function(e,t,r){const n=e("./create-payload.js");t.exports=function(e,t,r){e.sendAsync(n({method:"eth_estimateGas",params:[t]}),function(e,t){if(e)return"no contract code at given address"===e.message?r(null,"0xcf08"):r(e);r(null,t.result)})}},{"./create-payload.js":391}],393:[function(e,t,r){const n=3;t.exports=function(){var e=(new Date).getTime()*Math.pow(10,n),t=Math.floor(Math.random()*Math.pow(10,n));return e+t}},{}],394:[function(e,t,r){const n=e("json-stable-stringify");function i(e){return"never"!==s(e)}function o(e){var t=a(e);return t>=e.params.length?e.params:"eth_getBlockByNumber"===e.method?e.params.slice(1):e.params.slice(0,t)}function a(e){switch(e.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":return 1;case"eth_getBlockByNumber":return 0;default:return}}function s(e){switch(e.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":return"fork";case"eth_gasPrice":case"eth_blockNumber":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"net_peerCount":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":return"never"}}t.exports={cacheIdentifierForPayload:function(e,t={}){if(!i(e))return null;const{includeBlockRef:r}=t,a=r?e.params:o(e);return e.method+":"+n(a)},canCache:i,blockTagForPayload:function(e){var t=a(e);if(t>=e.params.length)return null;return e.params[t]},paramsWithoutBlockTag:o,blockTagParamIndex:a,cacheTypeForPayload:s}},{"json-stable-stringify":374}],395:[function(e,t,r){(function(r){const n=e("ethereumjs-util"),i=e("./assert.js");t.exports={intToQuantityHex:function(e){i("number"==typeof e&&e===Math.floor(e),"intToQuantityHex arg must be an integer");var t=n.toBuffer(e).toString("hex");"0"===t[0]&&(t=t.substring(1));return n.addHexPrefix(t)},quantityHexToInt:function(e){i("string"==typeof e,"arg to quantityHexToInt must be a string");var t=n.stripHexPrefix(e);t.length%2!=0&&(t="0"+t);var o=new r(t,"hex");return n.bufferToInt(o)}}}).call(this,e("buffer").Buffer)},{"./assert.js":390,buffer:84,"ethereumjs-util":141}],396:[function(e,t,r){const n=e("events").EventEmitter,i=e("util").inherits;function o(){n.call(this),this.isLocked=!0}t.exports=o,i(o,n),o.prototype.go=function(){this.isLocked=!1,this.emit("unlock")},o.prototype.stop=function(){this.isLocked=!0,this.emit("lock")},o.prototype.await=function(e){const t=this;t.isLocked?t.once("unlock",e):setTimeout(e)}},{events:157,util:333}],397:[function(e,t,r){const n=e("./index.js"),i=e("./subproviders/default-fixture.js"),o=e("./subproviders/nonce-tracker.js"),a=e("./subproviders/cache.js"),s=e("./subproviders/filters.js"),u=e("./subproviders/subscriptions"),c=e("./subproviders/inflight-cache"),f=e("./subproviders/hooked-wallet.js"),h=e("./subproviders/sanitizer.js"),l=e("./subproviders/infura.js"),d=e("./subproviders/fetch.js"),p=e("./subproviders/websocket.js");t.exports=function(e={}){const t=function({rpcUrl:e}){if(!e)return;switch(e.split(":")[0].toLowerCase()){case"http":case"https":return"http";case"ws":case"wss":return"ws";default:throw new Error(`ProviderEngine - unrecognized protocol in "${e}"`)}}(e),r=new n(e.engineParams),b=new i(e.static);r.addProvider(b),r.addProvider(new o);const y=new h;r.addProvider(y);const m=new a;if(r.addProvider(m),"ws"===t){const e=new s;r.addProvider(e)}else{const e=new u;e.on("data",(e,t)=>{r.emit("data",e,t)}),r.addProvider(e)}const v=new c;r.addProvider(v);const g=new f({getAccounts:e.getAccounts,processTransaction:e.processTransaction,approveTransaction:e.approveTransaction,signTransaction:e.signTransaction,publishTransaction:e.publishTransaction,processMessage:e.processMessage,approveMessage:e.approveMessage,signMessage:e.signMessage,processPersonalMessage:e.processPersonalMessage,processTypedMessage:e.processTypedMessage,approvePersonalMessage:e.approvePersonalMessage,approveTypedMessage:e.approveTypedMessage,signPersonalMessage:e.signPersonalMessage,signTypedMessage:e.signTypedMessage,personalRecoverSigner:e.personalRecoverSigner});r.addProvider(g);const w=e.dataSubprovider||function(e,t){const{rpcUrl:r,debug:n}=t;if(!e)return new l;if("http"===e)return new d({rpcUrl:r,debug:n});if("ws"===e)return new p({rpcUrl:r,debug:n});throw new Error(`ProviderEngine - unrecognized connectionType "${e}"`)}(t,e);"ws"===t&&w.on("data",(e,t)=>{r.emit("data",e,t)});r.addProvider(w),e.stopped||r.start();return r}},{"./index.js":373,"./subproviders/cache.js":376,"./subproviders/default-fixture.js":377,"./subproviders/fetch.js":378,"./subproviders/filters.js":379,"./subproviders/hooked-wallet.js":381,"./subproviders/inflight-cache":382,"./subproviders/infura.js":383,"./subproviders/nonce-tracker.js":384,"./subproviders/sanitizer.js":386,"./subproviders/subscriptions":388,"./subproviders/websocket.js":389}],398:[function(e,t,r){var n=e("web3-core-helpers").errors,i=e("xhr2-cookies").XMLHttpRequest,o=e("http"),a=e("https"),s=function(e,t){t=t||{},this.host=e||"http://localhost:8545","https"===this.host.substring(0,5)?this.httpsAgent=new a.Agent({keepAlive:!0}):this.httpAgent=new o.Agent({keepAlive:!0}),this.timeout=t.timeout||0,this.headers=t.headers,this.connected=!1};s.prototype._prepareRequest=function(){var e=new i;return e.nodejsSet({httpsAgent:this.httpsAgent,httpAgent:this.httpAgent}),e.open("POST",this.host,!0),e.setRequestHeader("Content-Type","application/json"),e.timeout=this.timeout&&1!==this.timeout?this.timeout:0,e.withCredentials=!0,this.headers&&this.headers.forEach(function(t){e.setRequestHeader(t.name,t.value)}),e},s.prototype.send=function(e,t){var r=this,i=this._prepareRequest();i.onreadystatechange=function(){if(4===i.readyState&&1!==i.timeout){var e=i.responseText,o=null;try{e=JSON.parse(e)}catch(e){o=n.InvalidResponse(i.responseText)}r.connected=!0,t(o,e)}},i.ontimeout=function(){r.connected=!1,t(n.ConnectionTimeout(this.timeout))};try{i.send(JSON.stringify(e))}catch(e){this.connected=!1,t(n.InvalidConnection(this.host))}},s.prototype.disconnect=function(){},t.exports=s},{http:312,https:175,"web3-core-helpers":338,"xhr2-cookies":418}],399:[function(e,t,r){"use strict";var n=e("underscore"),i=e("web3-core-helpers").errors,o=e("oboe"),a=function(e,t){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=e,this.connected=!1,this.connection=t.connect({path:this.path}),this.addDefaultEvents();var i=function(e){var t=null;n.isArray(e)?e.forEach(function(e){r.responseCallbacks[e.id]&&(t=e.id)}):t=e.id,t||-1===e.method.indexOf("_subscription")?r.responseCallbacks[t]&&(r.responseCallbacks[t](null,e),delete r.responseCallbacks[t]):r.notificationCallbacks.forEach(function(t){n.isFunction(t)&&t(e)})};"Socket"===t.constructor.name?o(this.connection).done(i):this.connection.on("data",function(e){r._parseResponse(e.toString()).forEach(i)})};a.prototype.addDefaultEvents=function(){var e=this;this.connection.on("connect",function(){e.connected=!0}),this.connection.on("close",function(){e.connected=!1}),this.connection.on("error",function(){e._timeout()}),this.connection.on("end",function(){e._timeout()}),this.connection.on("timeout",function(){e._timeout()})},a.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(e){t.lastChunk&&(e=t.lastChunk+e);var n=null;try{n=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout(function(){throw t._timeout(),i.InvalidResponse(e)},15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,n&&r.push(n)}),r},a.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,n=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=n},a.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](i.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},a.prototype.reconnect=function(){this.connection.connect({path:this.path})},a.prototype.send=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},a.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");switch(e){case"data":this.notificationCallbacks.push(t);break;default:this.connection.on(e,t)}},a.prototype.once=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");this.connection.once(e,t)},a.prototype.removeListener=function(e,t){var r=this;switch(e){case"data":this.notificationCallbacks.forEach(function(e,n){e===t&&r.notificationCallbacks.splice(n,1)});break;default:this.connection.removeListener(e,t)}},a.prototype.removeAllListeners=function(e){switch(e){case"data":this.notificationCallbacks=[];break;default:this.connection.removeAllListeners(e)}},a.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},t.exports=a},{oboe:239,underscore:325,"web3-core-helpers":338}],400:[function(e,t,r){(function(r){"use strict";var n=e("underscore"),i=e("web3-core-helpers").errors,o=null,a=null,s=null;if("undefined"!=typeof window&&void 0!==window.WebSocket)o=function(e,t){return new window.WebSocket(e,t)},a=btoa,s=function(e){return new URL(e)};else{o=e("websocket").w3cwebsocket,a=function(e){return r(e).toString("base64")};var u=e("url");if(u.URL){var c=u.URL;s=function(e){return new c(e)}}else s=e("url").parse}var f=function(e,t){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],t=t||{},this._customTimeout=t.timeout;var i=s(e),u=t.headers||{},c=t.protocol||void 0;i.username&&i.password&&(u.authorization="Basic "+a(i.username+":"+i.password));var f=t.clientConfig||void 0;i.auth&&(u.authorization="Basic "+a(i.auth)),this.connection=new o(e,c,void 0,u,void 0,f),this.addDefaultEvents(),this.connection.onmessage=function(e){var t="string"==typeof e.data?e.data:"";r._parseResponse(t).forEach(function(e){var t=null;n.isArray(e)?e.forEach(function(e){r.responseCallbacks[e.id]&&(t=e.id)}):t=e.id,!t&&e&&e.method&&-1!==e.method.indexOf("_subscription")?r.notificationCallbacks.forEach(function(t){n.isFunction(t)&&t(e)}):r.responseCallbacks[t]&&(r.responseCallbacks[t](null,e),delete r.responseCallbacks[t])})},Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0})};f.prototype.addDefaultEvents=function(){var e=this;this.connection.onerror=function(){e._timeout()},this.connection.onclose=function(){e._timeout(),e.reset()}},f.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(e){t.lastChunk&&(e=t.lastChunk+e);var n=null;try{n=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout(function(){throw t._timeout(),i.InvalidResponse(e)},15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,n&&r.push(n)}),r},f.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,n=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=n;var o=this;this._customTimeout&&setTimeout(function(){o.responseCallbacks[r]&&(o.responseCallbacks[r](i.ConnectionTimeout(o._customTimeout)),delete o.responseCallbacks[r])},this._customTimeout)},f.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](i.InvalidConnection("on WS")),delete this.responseCallbacks[e])},f.prototype.send=function(e,t){var r=this;if(this.connection.readyState!==this.connection.CONNECTING){if(this.connection.readyState!==this.connection.OPEN)return console.error("connection not open on send()"),"function"==typeof this.connection.onerror?this.connection.onerror(new Error("connection not open")):console.error("no error callback"),void t(new Error("connection not open"));this.connection.send(JSON.stringify(e)),this._addResponseCallback(e,t)}else setTimeout(function(){r.send(e,t)},10)},f.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");switch(e){case"data":this.notificationCallbacks.push(t);break;case"connect":this.connection.onopen=t;break;case"end":this.connection.onclose=t;break;case"error":this.connection.onerror=t}},f.prototype.removeListener=function(e,t){var r=this;switch(e){case"data":this.notificationCallbacks.forEach(function(e,n){e===t&&r.notificationCallbacks.splice(n,1)})}},f.prototype.removeAllListeners=function(e){switch(e){case"data":this.notificationCallbacks=[];break;case"connect":this.connection.onopen=null;break;case"end":this.connection.onclose=null;break;case"error":this.connection.onerror=null}},f.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.addDefaultEvents()},f.prototype.disconnect=function(){this.connection&&this.connection.close()},t.exports=f}).call(this,e("buffer").Buffer)},{buffer:84,underscore:325,url:327,"web3-core-helpers":338,websocket:408}],401:[function(e,t,r){"use strict";var n=e("web3-core"),i=e("web3-core-subscriptions").subscriptions,o=e("web3-core-method"),a=e("web3-net"),s=function(){var e=this;n.packageInit(this,arguments);var t=this.setProvider;this.setProvider=function(){t.apply(e,arguments),e.net.setProvider.apply(e,arguments)},this.clearSubscriptions=e._requestManager.clearSubscriptions,this.net=new a(this.currentProvider),[new i({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new o({name:"getVersion",call:"shh_version",params:0}),new o({name:"getInfo",call:"shh_info",params:0}),new o({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new o({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new o({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new o({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new o({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new o({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new o({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new o({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new o({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new o({name:"newSymKey",call:"shh_newSymKey",params:0}),new o({name:"addSymKey",call:"shh_addSymKey",params:1}),new o({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new o({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new o({name:"getSymKey",call:"shh_getSymKey",params:1}),new o({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new o({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new o({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new o({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new o({name:"post",call:"shh_post",params:1,inputFormatter:[null]}),new o({name:"unsubscribe",call:"shh_unsubscribe",params:1})].forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})};n.addProviders(s),t.exports=s},{"web3-core":348,"web3-core-method":339,"web3-core-subscriptions":345,"web3-net":372}],402:[function(e,t,r){arguments[4][154][0].apply(r,arguments)},{dup:154}],403:[function(e,t,r){var n=e("underscore"),i=e("ethjs-unit"),o=e("./utils.js"),a=e("./soliditySha3.js"),s=e("randomhex"),u=function(e,t){var r=[];return t.forEach(function(t){if("object"==typeof t.components){if("tuple"!==t.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var i="",o=t.type.indexOf("[");o>=0&&(i=t.type.substring(o));var a=u(e,t.components);n.isArray(a)&&e?r.push("tuple("+a.join(",")+")"+i):e?r.push("("+a+")"):r.push("("+a.join(",")+")"+i)}else r.push(t.type)}),r},c=function(e){if(!o.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r7?r+=e[n].toUpperCase():r+=e[n];return r},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:c,toAscii:c,asciiToHex:f,fromAscii:f,unitMap:i.unitMap,toWei:function(e,t){if(t=h(t),!o.isBN(e)&&!n.isString(e))throw new Error("Please pass numbers as strings or BigNumber objects to avoid precision errors.");return o.isBN(e)?i.toWei(e,t):i.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=h(t),!o.isBN(e)&&!n.isString(e))throw new Error("Please pass numbers as strings or BigNumber objects to avoid precision errors.");return o.isBN(e)?i.fromWei(e,t):i.fromWei(e,t).toString(10)},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement}},{"./soliditySha3.js":404,"./utils.js":405,"ethjs-unit":153,randomhex:274,underscore:325}],404:[function(e,t,r){var n=e("underscore"),i=e("bn.js"),o=e("./utils.js"),a=function(e){var t=typeof e;if("string"===t)return o.isHexStrict(e)?new i(e.replace(/0x/i,""),16):new i(e,10);if("number"===t)return new i(e);if(o.isBigNumber(e))return new i(e.toString(10));if(o.isBN(e))return e;throw new Error(e+" is not a number")},s=function(e,t,r){var n,s,u;if("bytes"===(e=(u=e).startsWith("int[")?"int256"+u.slice(3):"int"===u?"int256":u.startsWith("uint[")?"uint256"+u.slice(4):"uint"===u?"uint256":u.startsWith("fixed[")?"fixed128x128"+u.slice(5):"fixed"===u?"fixed128x128":u.startsWith("ufixed[")?"ufixed128x128"+u.slice(6):"ufixed"===u?"ufixed128x128":u)){if(t.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+t.length);return t}if("string"===e)return o.utf8ToHex(t);if("bool"===e)return t?"01":"00";if(e.startsWith("address")){if(n=r?64:40,!o.isAddress(t))throw new Error(t+" is not a valid address, or the checksum is invalid.");return o.leftPad(t.toLowerCase(),n)}if(n=function(e){var t=/^\D+(\d+).*$/.exec(e);return t?parseInt(t[1],10):null}(e),e.startsWith("bytes")){if(!n)throw new Error("bytes[] not yet supported in solidity");if(r&&(n=32),n<1||n>32||n256)throw new Error("Invalid uint"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s.lt(new i(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return n?o.leftPad(s.toString("hex"),n/8*2):s}if(e.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.lt(new i(0))?s.toTwos(n).toString("hex"):n?o.leftPad(s.toString("hex"),n/8*2):s}throw new Error("Unsupported or invalid type: "+e)},u=function(e){if(n.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,r,a="";if(n.isObject(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,a=e.hasOwnProperty("v")?e.v:e.value):(t=o.toHex(e,!0),a=o.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof a||/^(-)?0x/i.test(a)||(a=new i(a)),n.isArray(a)){if((r=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e);return t?parseInt(t[1],10):null}(t))&&a.length!==r)throw new Error(t+" is not matching the given array "+JSON.stringify(a));r=a.length}return n.isArray(a)?a.map(function(e){return s(t,e,r).toString("hex").replace("0x","")}).join(""):s(t,a,r).toString("hex").replace("0x","")};t.exports=function(){var e=Array.prototype.slice.call(arguments),t=n.map(e,u);return o.sha3("0x"+t.join(""))}},{"./utils.js":405,"bn.js":402,underscore:325}],405:[function(e,t,r){var n=e("underscore"),i=e("bn.js"),o=e("number-to-bn"),a=e("utf8"),s=e("eth-lib/lib/hash"),u=function(e){return e instanceof i||e&&e.constructor&&"BN"===e.constructor.name},c=function(e){return e&&e.constructor&&"BigNumber"===e.constructor.name},f=function(e){try{return o.apply(null,arguments)}catch(t){throw new Error(t+' Given value: "'+e+'"')}},h=function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(e)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(e))||l(e))},l=function(e){e=e.replace(/^0x/i,"");for(var t=m(e.toLowerCase()).replace(/^0x/i,""),r=0;r<40;r++)if(parseInt(t[r],16)>7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1;return!0},d=function(e){var t="";e=(e=(e=(e=(e=a.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x"+t.join("")},isHex:function(e){return(n.isString(e)||n.isNumber(e))&&/^(-0x|0x)?[0-9a-f]*$/i.test(e)},isHexStrict:y,leftPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+new Array(i).join(r||"0")+e},rightPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(i).join(r||"0")},toTwosComplement:function(e){return"0x"+f(e).toTwos(256).toString(16,64)},sha3:m}},{"bn.js":402,"eth-lib/lib/hash":134,"number-to-bn":237,underscore:325,utf8:329}],406:[function(e,t,r){t.exports={_from:"web3@1.0.0-beta.36",_id:"web3@1.0.0-beta.36",_inBundle:!1,_integrity:"sha512-fZDunw1V0AQS27r5pUN3eOVP7u8YAvyo6vOapdgVRolAu5LgaweP7jncYyLINqIX9ZgWdS5A090bt+ymgaYHsw==",_location:"/web3",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"web3@1.0.0-beta.36",name:"web3",escapedName:"web3",rawSpec:"1.0.0-beta.36",saveSpec:null,fetchSpec:"1.0.0-beta.36"},_requiredBy:["#USER","/"],_resolved:"https://registry.npmjs.org/web3/-/web3-1.0.0-beta.36.tgz",_shasum:"2954da9e431124c88396025510d840ba731c8373",_spec:"web3@1.0.0-beta.36",_where:"/Users/alexvlasov/Blockchain/web3swift/web3swiftJSProxy",author:{name:"ethereum.org"},authors:[{name:"Fabian Vogelsteller",email:"fabian@ethereum.org",homepage:"http://frozeman.de"},{name:"Marek Kotewicz",email:"marek@parity.io",url:"https://github.com/debris"},{name:"Marian Oancea",url:"https://github.com/cubedro"},{name:"Gav Wood",email:"g@parity.io",homepage:"http://gavwood.com"},{name:"Jeffery Wilcke",email:"jeffrey.wilcke@ethereum.org",url:"https://github.com/obscuren"}],bugs:{url:"https://github.com/ethereum/web3.js/issues"},bundleDependencies:!1,dependencies:{"web3-bzz":"1.0.0-beta.36","web3-core":"1.0.0-beta.36","web3-eth":"1.0.0-beta.36","web3-eth-personal":"1.0.0-beta.36","web3-net":"1.0.0-beta.36","web3-shh":"1.0.0-beta.36","web3-utils":"1.0.0-beta.36"},deprecated:!1,description:"Ethereum JavaScript API",keywords:["Ethereum","JavaScript","API"],license:"LGPL-3.0",main:"src/index.js",name:"web3",namespace:"ethereum",repository:{type:"git",url:"https://github.com/ethereum/web3.js/tree/master/packages/web3"},version:"1.0.0-beta.36"}},{}],407:[function(e,t,r){"use strict";var n=e("../package.json").version,i=e("web3-core"),o=e("web3-eth"),a=e("web3-net"),s=e("web3-eth-personal"),u=e("web3-shh"),c=e("web3-bzz"),f=e("web3-utils"),h=function(){var e=this;i.packageInit(this,arguments),this.version=n,this.utils=f,this.eth=new o(this),this.shh=new u(this),this.bzz=new c(this);var t=this.setProvider;this.setProvider=function(r,n){return t.apply(e,arguments),this.eth.setProvider(r,n),this.shh.setProvider(r,n),this.bzz.setProvider(r),!0}};h.version=n,h.utils=f,h.modules={Eth:o,Net:a,Personal:s,Shh:u,Bzz:c},i.addProviders(h),t.exports=h},{"../package.json":406,"web3-bzz":335,"web3-core":348,"web3-eth":371,"web3-eth-personal":369,"web3-net":372,"web3-shh":401,"web3-utils":403}],408:[function(e,t,r){var n=function(){return this||{}}(),i=n.WebSocket||n.MozWebSocket,o=e("./version");function a(e,t){return t?new i(e,t):new i(e)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach(function(e){Object.defineProperty(a,e,{get:function(){return i[e]}})}),t.exports={w3cwebsocket:i?a:null,version:o}},{"./version":409}],409:[function(e,t,r){t.exports=e("../package.json").version},{"../package.json":410}],410:[function(e,t,r){t.exports={_from:"git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",_id:"websocket@1.0.26",_inBundle:!1,_integrity:"",_location:"/websocket",_phantomChildren:{},_requested:{type:"git",raw:"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",name:"websocket",escapedName:"websocket",rawSpec:"git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",saveSpec:"git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",fetchSpec:"git://github.com/frozeman/WebSocket-Node.git",gitCommittish:"browserifyCompatible"},_requiredBy:["/web3-providers-ws"],_resolved:"git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",_spec:"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",_where:"/Users/alexvlasov/Blockchain/web3swift/web3swiftJSProxy/node_modules/web3-providers-ws",author:{name:"Brian McKelvey",email:"brian@worlize.com",url:"https://www.worlize.com/"},browser:"lib/browser.js",bugs:{url:"https://github.com/theturtle32/WebSocket-Node/issues"},bundleDependencies:!1,config:{verbose:!1},contributors:[{name:"Iñaki Baz Castillo",email:"ibc@aliax.net",url:"http://dev.sipdoc.net"}],dependencies:{debug:"^2.2.0",nan:"^2.3.3","typedarray-to-buffer":"^3.1.2",yaeti:"^0.0.6"},deprecated:!1,description:"Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.",devDependencies:{"buffer-equal":"^1.0.0",faucet:"^0.0.1",gulp:"git+https://github.com/gulpjs/gulp.git#4.0","gulp-jshint":"^2.0.4",jshint:"^2.0.0","jshint-stylish":"^2.2.1",tape:"^4.0.1"},directories:{lib:"./lib"},engines:{node:">=0.10.0"},homepage:"https://github.com/theturtle32/WebSocket-Node",keywords:["websocket","websockets","socket","networking","comet","push","RFC-6455","realtime","server","client"],license:"Apache-2.0",main:"index",name:"websocket",repository:{type:"git",url:"git+https://github.com/theturtle32/WebSocket-Node.git"},scripts:{gulp:"gulp",install:"(node-gyp rebuild 2> builderror.log) || (exit 0)",test:"faucet test/unit"},version:"1.0.26"}},{}],411:[function(e,t,r){var n=e("xhr-request");t.exports=function(e,t){return new Promise(function(r,i){n(e,t,function(e,t){e?i(e):r(t)})})}},{"xhr-request":412}],412:[function(e,t,r){var n=e("query-string"),i=e("url-set-query"),o=e("object-assign"),a=e("./lib/ensure-header.js"),s=e("./lib/request.js"),u="application/json",c=function(){};t.exports=function(e,t,r){if(!e||"string"!=typeof e)throw new TypeError("must specify a URL");"function"==typeof t&&(r=t,t={});if(r&&"function"!=typeof r)throw new TypeError("expected cb to be undefined or a function");r=r||c;var f=(t=t||{}).json?"json":"text",h=(t=o({responseType:f},t)).headers||{},l=(t.method||"GET").toUpperCase(),d=t.query;d&&("string"!=typeof d&&(d=n.stringify(d)),e=i(e,d));"json"===t.responseType&&a(h,"Accept",u);t.json&&"GET"!==l&&"HEAD"!==l&&(a(h,"Content-Type",u),t.body=JSON.stringify(t.body));return t.method=l,t.url=e,t.headers=h,delete t.query,delete t.json,s(t,r)}},{"./lib/ensure-header.js":413,"./lib/request.js":415,"object-assign":238,"query-string":266,"url-set-query":326}],413:[function(e,t,r){t.exports=function(e,t,r){var n=t.toLowerCase();e[t]||e[n]||(e[t]=r)}},{}],414:[function(e,t,r){t.exports=function(e,t){return t?{statusCode:t.statusCode,headers:t.headers,method:e.method,url:e.url,rawRequest:t.rawRequest?t.rawRequest:t}:null}},{}],415:[function(e,t,r){var n=e("xhr"),i=e("./normalize-response"),o=function(){};t.exports=function(e,t){delete e.uri;var r=!1;"json"===e.responseType&&(e.responseType="text",r=!0);var a=n(e,function(n,a,s){if(r&&!n)try{var u=a.rawRequest.responseText;s=JSON.parse(u)}catch(e){n=e}a=i(e,a),t(n,n?null:s,a),t=o}),s=a.onabort;return a.onabort=function(){var e=s.apply(a,Array.prototype.slice.call(arguments));return t(new Error("XHR Aborted")),t=o,e},a}},{"./normalize-response":414,xhr:416}],416:[function(e,t,r){"use strict";var n=e("global/window"),i=e("is-function"),o=e("parse-headers"),a=e("xtend");function s(e,t,r){var n=e;return i(t)?(r=t,"string"==typeof e&&(n={uri:e})):n=a(t,{uri:e}),n.callback=r,n}function u(e,t,r){return c(t=s(e,t,r))}function c(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,r=function(r,n,i){t||(t=!0,e.callback(r,n,i))};function n(e){return clearTimeout(f),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,r(e,m)}function i(){if(!s){var t;clearTimeout(f),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var n=m,i=null;return 0!==t?(n={body:function(){var e=void 0;if(e=c.response?c.response:c.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(c),y)try{e=JSON.parse(e)}catch(e){}return e}(),statusCode:t,method:l,headers:{},url:h,rawRequest:c},c.getAllResponseHeaders&&(n.headers=o(c.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),r(i,n,n.body)}}var a,s,c=e.xhr||null;c||(c=e.cors||e.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var f,h=c.url=e.uri||e.url,l=c.method=e.method||"GET",d=e.body||e.data,p=c.headers=e.headers||{},b=!!e.sync,y=!1,m={body:void 0,headers:{},statusCode:0,method:l,url:h,rawRequest:c};if("json"in e&&!1!==e.json&&(y=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==l&&"HEAD"!==l&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),d=JSON.stringify(!0===e.json?d:e.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(i,0)},c.onload=i,c.onerror=n,c.onprogress=function(){},c.onabort=function(){s=!0},c.ontimeout=n,c.open(l,h,!b,e.username,e.password),b||(c.withCredentials=!!e.withCredentials),!b&&e.timeout>0&&(f=setTimeout(function(){if(!s){s=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",n(e)}},e.timeout)),c.setRequestHeader)for(a in p)p.hasOwnProperty(a)&&c.setRequestHeader(a,p[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(c.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(c),c.send(d||null),c}t.exports=u,t.exports.default=u,u.XMLHttpRequest=n.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var r=0;r=0)return this._url=this._parseUrl(t.headers.location),this._method="GET",this._loweredHeaders["content-type"]&&(delete this._headers[this._loweredHeaders["content-type"]],delete this._loweredHeaders["content-type"]),null!=this._headers["Content-Type"]&&delete this._headers["Content-Type"],delete this._headers["Content-Length"],this.upload._reset(),this._finalizeHeaders(),void this._sendHxxpRequest();this._response=t,this._response.on("data",function(e){return n._onHttpResponseData(t,e)}),this._response.on("end",function(){return n._onHttpResponseEnd(t)}),this._response.on("close",function(){return n._onHttpResponseClose(t)}),this.responseUrl=this._url.href.split("#")[0],this.status=t.statusCode,this.statusText=s.STATUS_CODES[this.status],this._parseResponseHeaders(t);var i=this._responseHeaders["content-length"]||"";this._totalBytes=+i,this._lengthComputable=!!i,this._setReadyState(r.HEADERS_RECEIVED)}},r.prototype._onHttpResponseData=function(e,t){this._response===e&&(this._responseParts.push(new n(t)),this._loadedBytes+=t.length,this.readyState!==r.LOADING&&this._setReadyState(r.LOADING),this._dispatchProgress("progress"))},r.prototype._onHttpResponseEnd=function(e){this._response===e&&(this._parseResponse(),this._request=null,this._response=null,this._setReadyState(r.DONE),this._dispatchProgress("load"),this._dispatchProgress("loadend"))},r.prototype._onHttpResponseClose=function(e){if(this._response===e){var t=this._request;this._setError(),t.abort(),this._setReadyState(r.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend")}},r.prototype._onHttpTimeout=function(e){this._request===e&&(this._setError(),e.abort(),this._setReadyState(r.DONE),this._dispatchProgress("timeout"),this._dispatchProgress("loadend"))},r.prototype._onHttpRequestError=function(e,t){this._request===e&&(this._setError(),e.abort(),this._setReadyState(r.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend"))},r.prototype._dispatchProgress=function(e){var t=new r.ProgressEvent(e);t.lengthComputable=this._lengthComputable,t.loaded=this._loadedBytes,t.total=this._totalBytes,this.dispatchEvent(t)},r.prototype._setError=function(){this._request=null,this._response=null,this._responseHeaders=null,this._responseParts=null},r.prototype._parseUrl=function(e,t,r){var n=null==this.nodejsBaseUrl?e:f.resolve(this.nodejsBaseUrl,e),i=f.parse(n,!1,!0);i.hash=null;var o=(i.auth||"").split(":"),a=o[0],s=o[1];return(a||s||t||r)&&(i.auth=(t||a||"")+":"+(r||s||"")),i},r.prototype._parseResponseHeaders=function(e){for(var t in this._responseHeaders={},e.headers){var r=t.toLowerCase();this._privateHeaders[r]||(this._responseHeaders[r]=e.headers[t])}null!=this._mimeOverride&&(this._responseHeaders["content-type"]=this._mimeOverride)},r.prototype._parseResponse=function(){var e=n.concat(this._responseParts);switch(this._responseParts=null,this.responseType){case"json":this.responseText=null;try{this.response=JSON.parse(e.toString("utf-8"))}catch(e){this.response=null}return;case"buffer":return this.responseText=null,void(this.response=e);case"arraybuffer":this.responseText=null;for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),i=0;i0&&(window.web3.eth.defaultAccount=t[0])})}window.ethereum=s}}},console.log("JS bridging rpc url access"),"undefined"!=typeof window&&window.bridge?window.bridge.post("getRPCurl",{},function(e,r){r&&t(r.description,null),t(null,e.rpcURL)}):(console.log("No bridge to native code is found"),t(!0,null))}()},{"./wk.bridge":424,web3:407,"web3-provider-engine/zero.js":397}],2:[function(e,t,r){t.exports=e("./register")().Promise},{"./register":4}],3:[function(e,t,r){"use strict";var n=null;t.exports=function(e,t){return function(r,i){r=r||null;var o=!1!==(i=i||{}).global;if(null===n&&o&&(n=e["@@any-promise/REGISTRATION"]||null),null!==n&&null!==r&&n.implementation!==r)throw new Error('any-promise already defined as "'+n.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===n&&(n=null!==r&&void 0!==i.Promise?{Promise:i.Promise,implementation:r}:t(r),o&&(e["@@any-promise/REGISTRATION"]=n)),n}}},{}],4:[function(e,t,r){"use strict";t.exports=e("./loader")(window,function(){if(void 0===window.Promise)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}})},{"./loader":3}],5:[function(e,t,r){var n=r;n.bignum=e("bn.js"),n.define=e("./asn1/api").define,n.base=e("./asn1/base"),n.constants=e("./asn1/constants"),n.decoders=e("./asn1/decoders"),n.encoders=e("./asn1/encoders")},{"./asn1/api":6,"./asn1/base":8,"./asn1/constants":12,"./asn1/decoders":14,"./asn1/encoders":17,"bn.js":53}],6:[function(e,t,r){var n=e("../asn1"),i=e("inherits");function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}r.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){r=function(e){this._initNamed(e)}}return i(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":5,inherits:180,vm:334}],7:[function(e,t,r){var n=e("inherits"),i=e("../base").Reporter,o=e("buffer").Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),r.DecoderBuffer=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=s,s.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":8,buffer:84,inherits:180}],8:[function(e,t,r){var n=r;n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":7,"./node":9,"./reporter":10}],9:[function(e,t,r){var n=e("../base").Reporter,i=e("../base").EncoderBuffer,o=e("../base").DecoderBuffer,a=e("minimalistic-assert"),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=c;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};f.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){var e=this._baseState;u.forEach(function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},c.prototype._init=function(e){var t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),a.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),s.forEach(function(e){c.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}}),c.prototype.use=function(e){a(e);var t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},c.prototype.contains=function(e){var t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(a=this._peekTag(e,u,r.any),e.isError(a))return a}else{var c=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(c)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){var f=this._decodeTag(e,r.explicit);if(e.isError(f))return f;e=f}var h=e.offset;if(null===r.use&&null===r.choice){if(r.any)c=e.save();var l=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(l))return l;r.any?i=e.raw(c):e=l}if(t&&t.track&&null!==r.tag&&t.track(e.path(),h,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(d,t)}}return r.obj&&a&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some(function(o){var a=e.save(),s=r.choice[o];try{var u=s._decode(e,t);if(e.isError(u))return!1;n={type:o,value:u},i=!0}catch(t){return e.restore(a),!1}return!0},this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},c.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)a=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i},this).filter(function(e){return e}),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)},u))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,f=null===i.implicit?"universal":"context";null===c?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(c,s,f,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":8,"minimalistic-assert":234}],10:[function(e,t,r){var n=e("inherits");function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}r.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:180}],11:[function(e,t,r){var n=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=n._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=n._reverse(r.tag)},{"../constants":12}],12:[function(e,t,r){var n=r;n._reverse=function(e){var t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r}),t},n.der=e("./der")},{"./der":11}],13:[function(e,t,r){var n=e("inherits"),i=e("../../asn1"),o=i.base,a=i.bignum,s=i.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function f(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=s.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function h(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=s.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=a,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var u=1,c=n.length;c>=256;c>>=8)u++;(o=new i(2+u))[0]=a,o[1]=128|u;c=1+u;for(var f=n.length;f>0;c--,f>>=8)o[c]=255&f;return this._createEncoderBuffer([o,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(n=0;n=128;a>>=7)o++}var s=new i(o),u=s.length-1;for(n=e.length-1;n>=0;n--){a=e[n];for(s[u--]=127&a;(a>>=7)>0;)s[u--]=128|127&a}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[f(n.getFullYear()),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[f(n.getFullYear()%100),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new i(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var a=e;a>=256;a>>=8)n++;for(a=(o=new Array(n)).length-1;a>=0;a--)o[a]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n=0;c--)if(f[c]!==h[c])return!1;for(c=f.length-1;c>=0;c--)if(u=f[c],!v(e[u],t[u],r,n))return!1;return!0}(e,t,r,a))}return r?e===t:e==t}function g(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function _(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&y(i,r,"Missing expected exception"+n);var a="string"==typeof n,s=!e&&i&&!r;if((!e&&o.isError(i)&&a&&w(i,r)||s)&&y(i,r,"Got unwanted exception"+n),e&&i&&r&&!w(i,r)||!e&&i)throw i}h.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=p(b((t=this).actual),128)+" "+t.operator+" "+p(b(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=d(r),a=i.indexOf("\n"+o);if(a>=0){var s=i.indexOf("\n",a+1);i=i.substring(s+1)}this.stack=i}}},o.inherits(h.AssertionError,Error),h.fail=y,h.ok=m,h.equal=function(e,t,r){e!=t&&y(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&y(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){v(e,t,!1)||y(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){v(e,t,!0)||y(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){v(e,t,!1)&&y(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){v(t,r,!0)&&y(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&y(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&y(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){_(!0,e,t,r)},h.doesNotThrow=function(e,t,r){_(!1,e,t,r)},h.ifError=function(e){if(e)throw e};var A=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":333}],20:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return(0,i.default)(function(t,r){var i;try{i=e.apply(this,t)}catch(e){return r(e)}(0,n.default)(i)&&"function"==typeof i.then?i.then(function(e){s(r,null,e)},function(e){s(r,e.message?e:new Error(e))}):r(null,i)})};var n=a(e("lodash/isObject")),i=a(e("./internal/initialParams")),o=a(e("./internal/setImmediate"));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){try{e(t,r)}catch(e){(0,o.default)(u,e)}}function u(e){throw e}t.exports=r.default},{"./internal/initialParams":31,"./internal/setImmediate":37,"lodash/isObject":225}],21:[function(e,t,r){(function(e,n){!function(e,n){"object"==typeof r&&void 0!==t?n(r):"function"==typeof define&&define.amd?define(["exports"],n):n(e.async=e.async||{})}(this,function(r){"use strict";function i(e,t){t|=0;for(var r=Math.max(e.length-t,0),n=Array(r),i=0;i-1&&e%1==0&&e<=L}function D(e){return null!=e&&O(e.length)&&!function(e){if(!s(e))return!1;var t=B(e);return t==C||t==N||t==P||t==R}(e)}var F={};function q(){}function H(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}}var z="function"==typeof Symbol&&Symbol.iterator,K=function(e){return z&&e[z]&&e[z]()};function V(e){return null!=e&&"object"==typeof e}var G="[object Arguments]";function W(e){return V(e)&&B(e)==G}var Y=Object.prototype,X=Y.hasOwnProperty,Z=Y.propertyIsEnumerable,J=W(function(){return arguments}())?W:function(e){return V(e)&&X.call(e,"callee")&&!Z.call(e,"callee")},$=Array.isArray;var Q="object"==typeof r&&r&&!r.nodeType&&r,ee=Q&&"object"==typeof t&&t&&!t.nodeType&&t,te=ee&&ee.exports===Q?A.Buffer:void 0,re=(te?te.isBuffer:void 0)||function(){return!1},ne=9007199254740991,ie=/^(?:0|[1-9]\d*)$/;function oe(e,t){return!!(t=null==t?ne:t)&&("number"==typeof e||ie.test(e))&&e>-1&&e%1==0&&e2&&(n=i(arguments,1)),t){var c={};Fe(o,function(e,t){c[t]=e}),c[e]=n,s=!0,u=Object.create(null),r(t,c)}else o[e]=n,Le(u[e]||[],function(e){e()}),d()});a++;var c=v(t[t.length-1]);t.length>1?c(o,n):c(n)}(e,t)})}function d(){if(0===c.length&&0===a)return r(null,o);for(;c.length&&a=0&&r.push(n)}),r}Fe(e,function(t,r){if(!$(t))return l(r,[t]),void f.push(r);var n=t.slice(0,t.length-1),i=n.length;if(0===i)return l(r,t),void f.push(r);h[r]=i,Le(n,function(o){if(!e[o])throw new Error("async.auto task `"+r+"` has a non-existent dependency `"+o+"` in "+n.join(", "));!function(e,t){var r=u[e];r||(r=u[e]=[]);r.push(t)}(o,function(){0===--i&&l(r,t)})})}),function(){var e,t=0;for(;f.length;)e=f.pop(),t++,Le(p(e),function(e){0==--h[e]&&f.push(e)});if(t!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),d()};function Ke(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r=n?e:function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n-1;);return r}(i,o),function(e,t){for(var r=e.length;r--&&He(t,e[r],0)>-1;);return r}(i,o)+1).join("")}var ht=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,lt=/,/,dt=/(=.+)?(\s*)$/,pt=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function bt(e,t){var r={};Fe(e,function(e,t){var n,i,o=m(e),a=!o&&1===e.length||o&&0===e.length;if($(e))n=e.slice(0,-1),e=e[e.length-1],r[t]=n.concat(n.length>0?s:e);else if(a)r[t]=e;else{if(n=i=(i=(i=(i=(i=e).toString().replace(pt,"")).match(ht)[2].replace(" ",""))?i.split(lt):[]).map(function(e){return ft(e.replace(dt,""))}),0===e.length&&!o&&0===n.length)throw new Error("autoInject task functions require explicit parameters.");o||n.pop(),r[t]=n.concat(s)}function s(t,r){var i=Ke(n,function(e){return t[e]});i.push(r),v(e).apply(null,i)}}),ze(r,t)}function yt(){this.head=this.tail=null,this.length=0}function mt(e,t){e.length=1,e.head=e.tail=t}function vt(e,t,r){if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var n=v(e),i=0,o=[],a=!1;function s(e,t,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(f.started=!0,$(e)||(e=[e]),0===e.length&&f.idle())return l(function(){f.drain()});for(var n=0,i=e.length;n0&&o.splice(s,1),a.callback.apply(a,arguments),null!=t&&f.error(t,a.data)}i<=f.concurrency-f.buffer&&f.unsaturated(),f.idle()&&f.drain(),f.process()}}var c=!1,f={_tasks:new yt,concurrency:t,payload:r,saturated:q,unsaturated:q,buffer:t/4,empty:q,drain:q,error:q,started:!1,paused:!1,push:function(e,t){s(e,!1,t)},kill:function(){f.drain=q,f._tasks.empty()},unshift:function(e,t){s(e,!0,t)},remove:function(e){f._tasks.remove(e)},process:function(){if(!c){for(c=!0;!f.paused&&i2&&(o=i(arguments,1)),n[t]=o,r(e)})},function(e){r(e,n)})}function br(e,t){pr(Ie,e,t)}function yr(e,t,r){pr(Ee(t),e,r)}var mr=function(e,t){var r=v(e);return vt(function(e,t){r(e[0],t)},t,1)},vr=function(e,t){var r=mr(e,t);return r.push=function(e,t,n){if(null==n&&(n=q),"function"!=typeof n)throw new Error("task callback must be a function");if(r.started=!0,$(e)||(e=[e]),0===e.length)return l(function(){r.drain()});t=t||0;for(var i=r._tasks.head;i&&t>=i.priority;)i=i.next;for(var o=0,a=e.length;on?1:0}je(e,function(e,t){n(e,function(r,n){if(r)return t(r);t(null,{value:e,criteria:n})})},function(e,t){if(e)return r(e);r(null,Ke(t.sort(i),Zt("value")))})}function Nr(e,t,r){var n=v(e);return a(function(i,o){var a,s=!1;i.push(function(){s||(o.apply(null,arguments),clearTimeout(a))}),a=setTimeout(function(){var t=e.name||"anonymous",n=new Error('Callback function "'+t+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r),s=!0,o(n)},t),n.apply(null,i)})}var Rr=Math.ceil,Lr=Math.max;function Or(e,t,r,n){var i=v(r);Ce(function(e,t,r,n){for(var i=-1,o=Lr(Rr((t-e)/(r||1)),0),a=Array(o);o--;)a[n?o:++i]=e,e+=r;return a}(0,e,1),t,i,n)}var Dr=ke(Or,1/0),Fr=ke(Or,1);function qr(e,t,r,n){arguments.length<=3&&(n=r,r=t,t=$(e)?[]:{}),n=H(n||q);var i=v(r);Ie(e,function(e,r,n){i(t,e,r,n)},function(e){n(e,t)})}function Hr(e,t){var r,n=null;t=t||q,Kt(e,function(e,t){v(e)(function(e,o){r=arguments.length>2?i(arguments,1):o,n=e,t(!e)})},function(){t(n,r)})}function zr(e){return function(){return(e.unmemoized||e).apply(null,arguments)}}function Kr(e,t,r){r=Ae(r||q);var n=v(t);if(!e())return r(null);var o=function(t){if(t)return r(t);if(e())return n(o);var a=i(arguments,1);r.apply(null,[null].concat(a))};n(o)}function Vr(e,t,r){Kr(function(){return!e.apply(this,arguments)},t,r)}var Gr=function(e,t){if(t=H(t||q),!$(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(t){var n=v(e[r++]);t.push(Ae(o)),n.apply(null,t)}function o(o){if(o||r===e.length)return t.apply(null,arguments);n(i(arguments,1))}n([])},Wr={apply:o,applyEach:Be,applyEachSeries:Re,asyncify:d,auto:ze,autoInject:bt,cargo:gt,compose:Et,concat:St,concatLimit:kt,concatSeries:Mt,constant:It,detect:Bt,detectLimit:Pt,detectSeries:Ct,dir:Rt,doDuring:Lt,doUntil:Dt,doWhilst:Ot,during:Ft,each:Ht,eachLimit:zt,eachOf:Ie,eachOfLimit:xe,eachOfSeries:wt,eachSeries:Kt,ensureAsync:Vt,every:Wt,everyLimit:Yt,everySeries:Xt,filter:er,filterLimit:tr,filterSeries:rr,forever:nr,groupBy:or,groupByLimit:ir,groupBySeries:ar,log:sr,map:je,mapLimit:Ce,mapSeries:Ne,mapValues:cr,mapValuesLimit:ur,mapValuesSeries:fr,memoize:lr,nextTick:dr,parallel:br,parallelLimit:yr,priorityQueue:vr,queue:mr,race:gr,reduce:_t,reduceRight:wr,reflect:_r,reflectAll:Ar,reject:xr,rejectLimit:kr,rejectSeries:Sr,retry:Ir,retryable:Tr,seq:At,series:Ur,setImmediate:l,some:jr,someLimit:Br,someSeries:Pr,sortBy:Cr,timeout:Nr,times:Dr,timesLimit:Or,timesSeries:Fr,transform:qr,tryEach:Hr,unmemoize:zr,until:Vr,waterfall:Gr,whilst:Kr,all:Wt,allLimit:Yt,allSeries:Xt,any:jr,anyLimit:Br,anySeries:Pr,find:Bt,findLimit:Pt,findSeries:Ct,forEach:Ht,forEachSeries:Kt,forEachLimit:zt,forEachOf:Ie,forEachOfSeries:wt,forEachOfLimit:xe,inject:_t,foldl:_t,foldr:wr,select:er,selectLimit:tr,selectSeries:rr,wrapSync:d};r.default=Wr,r.apply=o,r.applyEach=Be,r.applyEachSeries=Re,r.asyncify=d,r.auto=ze,r.autoInject=bt,r.cargo=gt,r.compose=Et,r.concat=St,r.concatLimit=kt,r.concatSeries=Mt,r.constant=It,r.detect=Bt,r.detectLimit=Pt,r.detectSeries=Ct,r.dir=Rt,r.doDuring=Lt,r.doUntil=Dt,r.doWhilst=Ot,r.during=Ft,r.each=Ht,r.eachLimit=zt,r.eachOf=Ie,r.eachOfLimit=xe,r.eachOfSeries=wt,r.eachSeries=Kt,r.ensureAsync=Vt,r.every=Wt,r.everyLimit=Yt,r.everySeries=Xt,r.filter=er,r.filterLimit=tr,r.filterSeries=rr,r.forever=nr,r.groupBy=or,r.groupByLimit=ir,r.groupBySeries=ar,r.log=sr,r.map=je,r.mapLimit=Ce,r.mapSeries=Ne,r.mapValues=cr,r.mapValuesLimit=ur,r.mapValuesSeries=fr,r.memoize=lr,r.nextTick=dr,r.parallel=br,r.parallelLimit=yr,r.priorityQueue=vr,r.queue=mr,r.race=gr,r.reduce=_t,r.reduceRight=wr,r.reflect=_r,r.reflectAll=Ar,r.reject=xr,r.rejectLimit=kr,r.rejectSeries=Sr,r.retry=Ir,r.retryable=Tr,r.seq=At,r.series=Ur,r.setImmediate=l,r.some=jr,r.someLimit=Br,r.someSeries=Pr,r.sortBy=Cr,r.timeout=Nr,r.times=Dr,r.timesLimit=Or,r.timesSeries=Fr,r.transform=qr,r.tryEach=Hr,r.unmemoize=zr,r.until=Vr,r.waterfall=Gr,r.whilst=Kr,r.all=Wt,r.allLimit=Yt,r.allSeries=Xt,r.any=jr,r.anyLimit=Br,r.anySeries=Pr,r.find=Bt,r.findLimit=Pt,r.findSeries=Ct,r.forEach=Ht,r.forEachSeries=Kt,r.forEachLimit=zt,r.forEachOf=Ie,r.forEachOfSeries=wt,r.forEachOfLimit=xe,r.inject=_t,r.foldl=_t,r.foldr=wr,r.select=er,r.selectLimit=tr,r.selectSeries=rr,r.wrapSync=d,Object.defineProperty(r,"__esModule",{value:!0})})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:257}],22:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t,r,a){(0,n.default)(t)(e,(0,i.default)((0,o.default)(r)),a)};var n=a(e("./internal/eachOfLimit")),i=a(e("./internal/withoutIndex")),o=a(e("./internal/wrapAsync"));function a(e){return e&&e.__esModule?e:{default:e}}t.exports=r.default},{"./internal/eachOfLimit":29,"./internal/withoutIndex":39,"./internal/wrapAsync":40}],23:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t,r){((0,n.default)(e)?l:d)(e,(0,f.default)(t),r)};var n=h(e("lodash/isArrayLike")),i=h(e("./internal/breakLoop")),o=h(e("./eachOfLimit")),a=h(e("./internal/doLimit")),s=h(e("lodash/noop")),u=h(e("./internal/once")),c=h(e("./internal/onlyOnce")),f=h(e("./internal/wrapAsync"));function h(e){return e&&e.__esModule?e:{default:e}}function l(e,t,r){r=(0,u.default)(r||s.default);var n=0,o=0,a=e.length;function f(e,t){e?r(e):++o!==a&&t!==i.default||r(null)}for(0===a&&r(null);n2&&(n=(0,o.default)(arguments,1)),s[t]=n,r(e)})},function(e){r(e,s)})};var n=s(e("lodash/noop")),i=s(e("lodash/isArrayLike")),o=s(e("./slice")),a=s(e("./wrapAsync"));function s(e){return e&&e.__esModule?e:{default:e}}t.exports=r.default},{"./slice":38,"./wrapAsync":40,"lodash/isArrayLike":221,"lodash/noop":229}],37:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.hasNextTick=r.hasSetImmediate=void 0,r.fallback=c,r.wrap=f;var n,i=e("./slice"),o=(n=i)&&n.__esModule?n:{default:n};var a,s=r.hasSetImmediate="function"==typeof setImmediate&&setImmediate,u=r.hasNextTick="object"==typeof t&&"function"==typeof t.nextTick;function c(e){setTimeout(e,0)}function f(e){return function(t){var r=(0,o.default)(arguments,1);e(function(){t.apply(null,r)})}}a=s?setImmediate:u?t.nextTick:c,r.default=f(a)}).call(this,e("_process"))},{"./slice":38,_process:257}],38:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){t|=0;for(var r=Math.max(e.length-t,0),n=Array(r),i=0;i0,"Expected a maximum number of retry greater than 0 but got %s.",e),this.maxNumberOfRetry_=e},o.prototype.backoff=function(e){i.checkState(-1===this.timeoutID_,"Backoff in progress."),this.backoffNumber_===this.maxNumberOfRetry_?(this.emit("fail",e),this.reset()):(this.backoffDelay_=this.backoffStrategy_.next(),this.timeoutID_=setTimeout(this.handlers.backoff,this.backoffDelay_),this.emit("backoff",this.backoffNumber_,this.backoffDelay_,e))},o.prototype.onBackoff_=function(){this.timeoutID_=-1,this.emit("ready",this.backoffNumber_,this.backoffDelay_),this.backoffNumber_++},o.prototype.reset=function(){this.backoffNumber_=0,this.backoffStrategy_.reset(),clearTimeout(this.timeoutID_),this.timeoutID_=-1},t.exports=o},{events:157,precond:253,util:333}],47:[function(e,t,r){var n=e("events"),i=e("precond"),o=e("util"),a=e("./backoff"),s=e("./strategy/fibonacci");function u(e,t,r){n.EventEmitter.call(this),i.checkIsFunction(e,"Expected fn to be a function."),i.checkIsArray(t,"Expected args to be an array."),i.checkIsFunction(r,"Expected callback to be a function."),this.function_=e,this.arguments_=t,this.callback_=r,this.lastResult_=[],this.numRetries_=0,this.backoff_=null,this.strategy_=null,this.failAfter_=-1,this.retryPredicate_=u.DEFAULT_RETRY_PREDICATE_,this.state_=u.State_.PENDING}o.inherits(u,n.EventEmitter),u.State_={PENDING:0,RUNNING:1,COMPLETED:2,ABORTED:3},u.DEFAULT_RETRY_PREDICATE_=function(e){return!0},u.prototype.isPending=function(){return this.state_==u.State_.PENDING},u.prototype.isRunning=function(){return this.state_==u.State_.RUNNING},u.prototype.isCompleted=function(){return this.state_==u.State_.COMPLETED},u.prototype.isAborted=function(){return this.state_==u.State_.ABORTED},u.prototype.setStrategy=function(e){return i.checkState(this.isPending(),"FunctionCall in progress."),this.strategy_=e,this},u.prototype.retryIf=function(e){return i.checkState(this.isPending(),"FunctionCall in progress."),this.retryPredicate_=e,this},u.prototype.getLastResult=function(){return this.lastResult_.concat()},u.prototype.getNumRetries=function(){return this.numRetries_},u.prototype.failAfter=function(e){return i.checkState(this.isPending(),"FunctionCall in progress."),this.failAfter_=e,this},u.prototype.abort=function(){this.isCompleted()||this.isAborted()||(this.isRunning()&&this.backoff_.reset(),this.state_=u.State_.ABORTED,this.lastResult_=[new Error("Backoff aborted.")],this.emit("abort"),this.doCallback_())},u.prototype.start=function(e){i.checkState(!this.isAborted(),"FunctionCall is aborted."),i.checkState(this.isPending(),"FunctionCall already started.");var t=this.strategy_||new s;this.backoff_=e?e(t):new a(t),this.backoff_.on("ready",this.doCall_.bind(this,!0)),this.backoff_.on("fail",this.doCallback_.bind(this)),this.backoff_.on("backoff",this.handleBackoff_.bind(this)),this.failAfter_>0&&this.backoff_.failAfter(this.failAfter_),this.state_=u.State_.RUNNING,this.doCall_(!1)},u.prototype.doCall_=function(e){e&&this.numRetries_++;var t=["call"].concat(this.arguments_);n.EventEmitter.prototype.emit.apply(this,t);var r=this.handleFunctionCallback_.bind(this);this.function_.apply(null,this.arguments_.concat(r))},u.prototype.doCallback_=function(){this.callback_.apply(null,this.lastResult_)},u.prototype.handleFunctionCallback_=function(){if(!this.isAborted()){var e=Array.prototype.slice.call(arguments);this.lastResult_=e,n.EventEmitter.prototype.emit.apply(this,["callback"].concat(e));var t=e[0];t&&this.retryPredicate_(t)?this.backoff_.backoff(t):(this.state_=u.State_.COMPLETED,this.doCallback_())}},u.prototype.handleBackoff_=function(e,t,r){this.emit("backoff",e,t,r)},t.exports=u},{"./backoff":46,"./strategy/fibonacci":49,events:157,precond:253,util:333}],48:[function(e,t,r){var n=e("util"),i=e("precond"),o=e("./strategy");function a(e){o.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay(),this.factor_=a.DEFAULT_FACTOR,e&&void 0!==e.factor&&(i.checkArgument(e.factor>1,"Exponential factor should be greater than 1 but got %s.",e.factor),this.factor_=e.factor)}n.inherits(a,o),a.DEFAULT_FACTOR=2,a.prototype.next_=function(){return this.backoffDelay_=Math.min(this.nextBackoffDelay_,this.getMaxDelay()),this.nextBackoffDelay_=this.backoffDelay_*this.factor_,this.backoffDelay_},a.prototype.reset_=function(){this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()},t.exports=a},{"./strategy":50,precond:253,util:333}],49:[function(e,t,r){var n=e("util"),i=e("./strategy");function o(e){i.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}n.inherits(o,i),o.prototype.next_=function(){var e=Math.min(this.nextBackoffDelay_,this.getMaxDelay());return this.nextBackoffDelay_+=this.backoffDelay_,this.backoffDelay_=e,e},o.prototype.reset_=function(){this.nextBackoffDelay_=this.getInitialDelay(),this.backoffDelay_=0},t.exports=o},{"./strategy":50,util:333}],50:[function(e,t,r){e("events"),e("util");function n(e){return null!=e}function i(e){if(n((e=e||{}).initialDelay)&&e.initialDelay<1)throw new Error("The initial timeout must be greater than 0.");if(n(e.maxDelay)&&e.maxDelay<1)throw new Error("The maximal timeout must be greater than 0.");if(this.initialDelay_=e.initialDelay||100,this.maxDelay_=e.maxDelay||1e4,this.maxDelay_<=this.initialDelay_)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");if(n(e.randomisationFactor)&&(e.randomisationFactor<0||e.randomisationFactor>1))throw new Error("The randomisation factor must be between 0 and 1.");this.randomisationFactor_=e.randomisationFactor||0}i.prototype.getMaxDelay=function(){return this.maxDelay_},i.prototype.getInitialDelay=function(){return this.initialDelay_},i.prototype.next=function(){var e=this.next_(),t=1+Math.random()*this.randomisationFactor_;return Math.round(e*t)},i.prototype.next_=function(){throw new Error("BackoffStrategy.next_() unimplemented.")},i.prototype.reset=function(){this.reset_()},i.prototype.reset_=function(){throw new Error("BackoffStrategy.reset_() unimplemented.")},t.exports=i},{events:157,util:333}],51:[function(e,t,r){"use strict";r.byteLength=function(e){return 3*e.length/4-c(e)},r.toByteArray=function(e){var t,r,n,a,s,u=e.length;a=c(e),s=new o(3*u/4-a),r=a>0?u-4:u;var f=0;for(t=0;t>16&255,s[f++]=n>>8&255,s[f++]=255&n;2===a?(n=i[e.charCodeAt(t)]<<2|i[e.charCodeAt(t+1)]>>4,s[f++]=255&n):1===a&&(n=i[e.charCodeAt(t)]<<10|i[e.charCodeAt(t+1)]<<4|i[e.charCodeAt(t+2)]>>2,s[f++]=n>>8&255,s[f++]=255&n);return s},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o="",a=[],s=0,u=r-i;su?u:s+16383));1===i?(t=e[r-1],o+=n[t>>2],o+=n[t<<4&63],o+="=="):2===i&&(t=(e[r-2]<<8)+e[r-1],o+=n[t>>10],o+=n[t>>4&63],o+=n[t<<2&63],o+="=");return a.push(o),a.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function f(e,t,r){for(var i,o,a=[],s=t;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],52:[function(e,t,r){var n=e("safe-buffer").Buffer;t.exports={check:function(e){if(e.length<8)return!1;if(e.length>72)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-2)return!1;if(2!==e[2])return!1;var t=e[3];if(0===t)return!1;if(5+t>=e.length)return!1;if(2!==e[4+t])return!1;var r=e[5+t];return!(0===r||6+t+r!==e.length||128&e[4]||t>1&&0===e[4]&&!(128&e[5])||128&e[t+6]||r>1&&0===e[t+6]&&!(128&e[t+7]))},decode:function(e){if(e.length<8)throw new Error("DER sequence length is too short");if(e.length>72)throw new Error("DER sequence length is too long");if(48!==e[0])throw new Error("Expected DER sequence");if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid");if(2!==e[2])throw new Error("Expected DER integer");var t=e[3];if(0===t)throw new Error("R length is zero");if(5+t>=e.length)throw new Error("R length is too long");if(2!==e[4+t])throw new Error("Expected DER integer (2)");var r=e[5+t];if(0===r)throw new Error("S length is zero");if(6+t+r!==e.length)throw new Error("S length is invalid");if(128&e[4])throw new Error("R value is negative");if(t>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded");if(128&e[t+6])throw new Error("S value is negative");if(r>1&&0===e[t+6]&&!(128&e[t+7]))throw new Error("S value excessively padded");return{r:e.slice(4,4+t),s:e.slice(6+t)}},encode:function(e,t){var r=e.length,i=t.length;if(0===r)throw new Error("R length is zero");if(0===i)throw new Error("S length is zero");if(r>33)throw new Error("R length is too long");if(i>33)throw new Error("S length is too long");if(128&e[0])throw new Error("R value is negative");if(128&t[0])throw new Error("S value is negative");if(r>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded");if(i>1&&0===t[0]&&!(128&t[1]))throw new Error("S value excessively padded");var o=n.allocUnsafe(6+r+i);return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=e.length,e.copy(o,4),o[4+r]=2,o[5+r]=t.length,t.copy(o,6+r),o}}},{"safe-buffer":290}],53:[function(e,t,r){!function(t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof t?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;try{a=e("buffer").Buffer}catch(e){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+h)/67108864|0,h=67108863&a}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?b+r:c[l-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,b=d>>>13,y=0|a[2],m=8191&y,v=y>>>13,g=0|a[3],w=8191&g,_=g>>>13,A=0|a[4],E=8191&A,x=A>>>13,k=0|a[5],S=8191&k,M=k>>>13,I=0|a[6],T=8191&I,U=I>>>13,j=0|a[7],B=8191&j,P=j>>>13,C=0|a[8],N=8191&C,R=C>>>13,L=0|a[9],O=8191&L,D=L>>>13,F=0|s[0],q=8191&F,H=F>>>13,z=0|s[1],K=8191&z,V=z>>>13,G=0|s[2],W=8191&G,Y=G>>>13,X=0|s[3],Z=8191&X,J=X>>>13,$=0|s[4],Q=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,be=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,H))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,H))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,H))+Math.imul(b,q)|0,o=Math.imul(b,H);var me=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,q),i=(i=Math.imul(m,H))+Math.imul(v,q)|0,o=Math.imul(v,H),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0;var ve=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,W)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,H))+Math.imul(_,q)|0,o=Math.imul(_,H),n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0;var ge=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(l,Z)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,H))+Math.imul(x,q)|0,o=Math.imul(x,H),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Y)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,H))+Math.imul(M,q)|0,o=Math.imul(M,H),n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,H))+Math.imul(U,q)|0,o=Math.imul(U,H),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Ae=(c+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ae)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,H))+Math.imul(P,q)|0,o=Math.imul(P,H),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(U,K)|0,o=o+Math.imul(U,V)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Ee=(c+(n=n+Math.imul(h,ue)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,H))+Math.imul(R,q)|0,o=Math.imul(R,H),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,V)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Y)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0;var xe=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,le)|0)+Math.imul(l,he)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,H))+Math.imul(D,q)|0,o=Math.imul(D,H),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(U,Z)|0,o=o+Math.imul(U,J)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,le)|0;var ke=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,be)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(O,K),i=(i=Math.imul(O,V))+Math.imul(D,K)|0,o=Math.imul(D,V),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(m,he)|0,i=(i=i+Math.imul(m,le)|0)+Math.imul(v,he)|0,o=o+Math.imul(v,le)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(O,W),i=(i=Math.imul(O,Y))+Math.imul(D,W)|0,o=Math.imul(D,Y),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(U,re)|0,o=o+Math.imul(U,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,le)|0;var Me=(c+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(O,Z),i=(i=Math.imul(O,J))+Math.imul(D,Z)|0,o=Math.imul(D,J),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(U,oe)|0,o=o+Math.imul(U,ae)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(E,he)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,le)|0;var Ie=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(O,Q),i=(i=Math.imul(O,ee))+Math.imul(D,Q)|0,o=Math.imul(D,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(U,ue)|0,o=o+Math.imul(U,ce)|0,n=n+Math.imul(S,he)|0,i=(i=i+Math.imul(S,le)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,le)|0;var Te=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(O,re),i=(i=Math.imul(O,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(T,he)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(U,he)|0,o=o+Math.imul(U,le)|0;var Ue=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,be)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,be)|0)+(i>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(O,oe),i=(i=Math.imul(O,ae))+Math.imul(D,oe)|0,o=Math.imul(D,ae),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(B,he)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(P,he)|0,o=o+Math.imul(P,le)|0;var je=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(U,pe)|0))<<13)|0;c=((o=o+Math.imul(U,be)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(O,ue),i=(i=Math.imul(O,ce))+Math.imul(D,ue)|0,o=Math.imul(D,ce),n=n+Math.imul(N,he)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(R,he)|0,o=o+Math.imul(R,le)|0;var Be=(c+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,be)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,be)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(O,he),i=(i=Math.imul(O,le))+Math.imul(D,he)|0,o=Math.imul(D,le);var Pe=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,be)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ce=(c+(n=Math.imul(O,pe))|0)+((8191&(i=(i=Math.imul(O,be))+Math.imul(D,pe)|0))<<13)|0;return c=((o=Math.imul(D,be))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,u[0]=ye,u[1]=me,u[2]=ve,u[3]=ge,u[4]=we,u[5]=_e,u[6]=Ae,u[7]=Ee,u[8]=xe,u[9]=ke,u[10]=Se,u[11]=Me,u[12]=Ie,u[13]=Te,u[14]=Ue,u[15]=je,u[16]=Be,u[17]=Pe,u[18]=Ce,0!==c&&(u[19]=c,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(d=l),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):r<63?l(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=t.clone();!t.isZero();){for(var l=0,d=1;0==(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function g(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(v,m),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new g;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var b=d,y=0;0!==b.cmp(s);y++)b=b.redSqr();n(y=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,A),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:55}],54:[function(e,t,r){var n;function i(e){this.rand=e}if(t.exports=function(e){return n||(n=new i(null)),n.generate(e)},t.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^f[p>>>16&255]^h[b>>>8&255]^l[255&y]^t[m++],a=c[p>>>24]^f[b>>>16&255]^h[y>>>8&255]^l[255&d]^t[m++],s=c[b>>>24]^f[y>>>16&255]^h[d>>>8&255]^l[255&p]^t[m++],u=c[y>>>24]^f[d>>>16&255]^h[p>>>8&255]^l[255&b]^t[m++],d=o,p=a,b=s,y=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&y])^t[m++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[y>>>8&255]<<8|n[255&d])^t[m++],s=(n[b>>>24]<<24|n[y>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[m++],u=(n[y>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^t[m++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var f=e[a],h=e[f],l=e[h],d=257*e[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*l^65537*h^257*f^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=f^e[e[e[l^f]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],f=0;f>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},{"safe-buffer":290}],57:[function(e,t,r){var n=e("./aes"),i=e("safe-buffer").Buffer,o=e("cipher-base"),a=e("inherits"),s=e("./ghash"),u=e("buffer-xor"),c=e("./incr32");function f(e,t,r,a){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var f=this._cipher.encryptBlock(u);this._ghash=new s(f),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),o=t.length,a=o%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var u=8*o,f=i.alloc(8);f.writeUIntBE(u,0,8),n.update(f),e._finID=n.state;var h=i.from(e._finID);return c(h),h}(this,r,f),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(f,o),f.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return l(e,n.key,n.iv)},r.createDecipheriv=l},{"./aes":56,"./authCipher":57,"./modes":69,"./streamCipher":72,"cipher-base":86,evp_bytestokey:158,inherits:180,"safe-buffer":290}],60:[function(e,t,r){var n=e("./modes"),i=e("./authCipher"),o=e("safe-buffer").Buffer,a=e("./streamCipher"),s=e("cipher-base"),u=e("./aes"),c=e("evp_bytestokey");function f(e,t,r){s.call(this),this._cache=new l,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}e("inherits")(f,s),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var h=o.alloc(16,16);function l(){this.cache=o.allocUnsafe(0)}function d(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new f(s.module,t,r)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=o.concat([this.cache,e])},l.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},t.exports=a},{"safe-buffer":290}],62:[function(e,t,r){t.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},{}],63:[function(e,t,r){var n=e("buffer-xor");r.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},{"buffer-xor":83}],64:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("buffer-xor");function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}r.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)]);break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},{"buffer-xor":83,"safe-buffer":290}],65:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(e,t,r){for(var n,i,a=-1,s=0;++a<8;)n=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}r.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new n(i(t));return r}t.exports=o,o.getr=a}).call(this,e("buffer").Buffer)},{"bn.js":53,buffer:84,randombytes:270}],77:[function(e,t,r){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":78}],78:[function(e,t,r){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],79:[function(e,t,r){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],80:[function(e,t,r){(function(r){var n=e("create-hash"),i=e("stream"),o=e("inherits"),a=e("./sign"),s=e("./verify"),u=e("./algorithms.json");function c(e){i.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){i.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new c(e)}function l(e){return new f(e)}Object.keys(u).forEach(function(e){u[e].id=new r(u[e].id,"hex"),u[e.toLowerCase()]=u[e]}),o(c,i.Writable),c.prototype._write=function(e,t,r){this._hash.update(e),r()},c.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},c.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=a(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},o(f,i.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},f.prototype.verify=function(e,t,n){"string"==typeof t&&(t=new r(t,n)),this.end();var i=this._hash.digest();return s(t,i,e,this._signType,this._tag)},t.exports={Sign:h,Verify:l,createSign:h,createVerify:l}}).call(this,e("buffer").Buffer)},{"./algorithms.json":78,"./sign":81,"./verify":82,buffer:84,"create-hash":91,inherits:180,stream:311}],81:[function(e,t,r){(function(r){var n=e("create-hmac"),i=e("browserify-rsa"),o=e("elliptic").ec,a=e("bn.js"),s=e("parse-asn1"),u=e("./curves.json");function c(e,t,i,o){if((e=new r(e.toArray())).length0&&r.ishrn(n),r}function h(e,t,i){var o,a;do{for(o=new r(0);8*o.length=t)throw new Error("invalid sig")}t.exports=function(e,t,u,c,f){var h=o(u);if("ec"===h.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var o=new i(n),s=r.data.subjectPrivateKey.data;return o.verify(t,e,s)}(e,t,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var i=r.data.p,a=r.data.q,u=r.data.g,c=r.data.pub_key,f=o.signature.decode(e,"der"),h=f.s,l=f.r;s(h,a),s(l,a);var d=n.mont(i),p=h.invm(a);return 0===u.toRed(d).redPow(new n(t).mul(p).mod(a)).fromRed().mul(c.toRed(d).redPow(l.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(l)}(e,t,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=r.concat([f,t]);for(var l=h.modulus.byteLength(),d=[1],p=0;t.length+d.length+2o)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(e)}return u(e,t,r)}function u(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return F(e)?function(e,t,r){if(t<0||e.byteLength=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if(q(e)||F(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return O(e).length;default:if(n)return L(e).length;t=(""+t).toLowerCase(),n=!0}}function p(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var h=!0,l=0;li&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,h=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=h}return function(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},s.prototype.compare=function(e,t,r,n,i){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),u=Math.min(o,a),c=this.slice(n,i),f=e.slice(t,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":return g(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function S(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function B(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(e,t,r,n,o){return t=+t,r>>>=0,o||B(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function C(e,t,r,n,o){return t=+t,r>>>=0,o||B(e,0,r,8),i.write(e,t,r,n,52,8),r+8}s.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||U(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||U(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||U(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||U(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||U(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||U(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||U(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||U(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||U(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||U(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||U(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||U(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||U(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return C(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return C(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function O(e){return n.toByteArray(function(e){if((e=e.trim().replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function F(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function q(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function H(e){return e!=e}},{"base64-js":51,ieee754:178}],85:[function(e,t,r){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],86:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("stream").Transform,o=e("string_decoder").StringDecoder;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},t.exports=a},{inherits:180,"safe-buffer":290,stream:311,string_decoder:317}],87:[function(e,t,r){(function(e){var r=function(){"use strict";function t(e,t){return null!=t&&e instanceof t}var r,n,i;try{r=Map}catch(e){r=function(){}}try{n=Set}catch(e){n=function(){}}try{i=Promise}catch(e){i=function(){}}function o(a,u,c,f,h){"object"==typeof u&&(c=u.depth,f=u.prototype,h=u.includeNonEnumerable,u=u.circular);var l=[],d=[],p=void 0!==e;return void 0===u&&(u=!0),void 0===c&&(c=1/0),function a(c,b){if(null===c)return null;if(0===b)return c;var y,m;if("object"!=typeof c)return c;if(t(c,r))y=new r;else if(t(c,n))y=new n;else if(t(c,i))y=new i(function(e,t){c.then(function(t){e(a(t,b-1))},function(e){t(a(e,b-1))})});else if(o.__isArray(c))y=[];else if(o.__isRegExp(c))y=new RegExp(c.source,s(c)),c.lastIndex&&(y.lastIndex=c.lastIndex);else if(o.__isDate(c))y=new Date(c.getTime());else{if(p&&e.isBuffer(c))return y=e.allocUnsafe?e.allocUnsafe(c.length):new e(c.length),c.copy(y),y;t(c,Error)?y=Object.create(c):void 0===f?(m=Object.getPrototypeOf(c),y=Object.create(m)):(y=Object.create(f),m=f)}if(u){var v=l.indexOf(c);if(-1!=v)return d[v];l.push(c),d.push(y)}for(var g in t(c,r)&&c.forEach(function(e,t){var r=a(t,b-1),n=a(e,b-1);y.set(r,n)}),t(c,n)&&c.forEach(function(e){var t=a(e,b-1);y.add(t)}),c){var w;m&&(w=Object.getOwnPropertyDescriptor(m,g)),w&&null==w.set||(y[g]=a(c[g],b-1))}if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(c);for(g=0;g<_.length;g++){var A=_[g];(!(x=Object.getOwnPropertyDescriptor(c,A))||x.enumerable||h)&&(y[A]=a(c[A],b-1),x.enumerable||Object.defineProperty(y,A,{enumerable:!1}))}}if(h){var E=Object.getOwnPropertyNames(c);for(g=0;g>>2),a=0,s=0;a>5]|=128<>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,h=0;h>>32-s,r);var a,s}function a(e,t,r,n,i,a,s){return o(t&r|~t&n,e,t,i,a,s)}function s(e,t,r,n,i,a,s){return o(t&n|r&~n,e,t,i,a,s)}function u(e,t,r,n,i,a,s){return o(t^r^n,e,t,i,a,s)}function c(e,t,r,n,i,a,s){return o(r^(t|~n),e,t,i,a,s)}function f(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}t.exports=function(e){return n(e,i)}},{"./make-hash":92}],94:[function(e,t,r){"use strict";var n=e("inherits"),i=e("./legacy"),o=e("cipher-base"),a=e("safe-buffer").Buffer,s=e("create-hash/md5"),u=e("ripemd160"),c=e("sha.js"),f=a.alloc(128);function h(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new u:c(e)).update(t).digest():t.lengths?t=e(t):t.length-1};f.prototype.append=function(e,t){e=s(e),t=u(t);var r=this.map[e];this.map[e]=r?r+","+t:t},f.prototype.delete=function(e){delete this.map[s(e)]},f.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},f.prototype.set=function(e,t){this.map[s(e)]=u(t)},f.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},f.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),c(e)},f.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),c(e)},f.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),c(e)},t.iterable&&(f.prototype[Symbol.iterator]=f.prototype.entries);var o=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},b.call(y.prototype),b.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var a=[301,302,303,307,308];v.redirect=function(e,t){if(-1===a.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.Headers=f,e.Request=y,e.Response=v,e.fetch=function(e,r){return new Promise(function(n,i){var o=new y(e,r),a=new XMLHttpRequest;a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}}),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;n(new v(i,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&t.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(r[Symbol.iterator]=function(){return r}),r}function f(e){this.map={},e instanceof f?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function l(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function d(e){var t=new FileReader,r=l(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(t.arrayBuffer&&t.blob&&n(e))this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!t.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!i(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=p(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,r,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=l(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function m(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}}(void 0!==e?e:this)}).call(n,void 0);var i=n.fetch;i.Response=n.Response,i.Request=n.Request,i.Headers=n.Headers;"object"==typeof t&&t.exports&&(t.exports=i,t.exports.default=i)},{}],97:[function(e,t,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes"),r.createHash=r.Hash=e("create-hash"),r.createHmac=r.Hmac=e("create-hmac");var n=e("browserify-sign/algos"),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);r.getHashes=function(){return o};var a=e("pbkdf2");r.pbkdf2=a.pbkdf2,r.pbkdf2Sync=a.pbkdf2Sync;var s=e("browserify-cipher");r.Cipher=s.Cipher,r.createCipher=s.createCipher,r.Cipheriv=s.Cipheriv,r.createCipheriv=s.createCipheriv,r.Decipher=s.Decipher,r.createDecipher=s.createDecipher,r.Decipheriv=s.Decipheriv,r.createDecipheriv=s.createDecipheriv,r.getCiphers=s.getCiphers,r.listCiphers=s.listCiphers;var u=e("diffie-hellman");r.DiffieHellmanGroup=u.DiffieHellmanGroup,r.createDiffieHellmanGroup=u.createDiffieHellmanGroup,r.getDiffieHellman=u.getDiffieHellman,r.createDiffieHellman=u.createDiffieHellman,r.DiffieHellman=u.DiffieHellman;var c=e("browserify-sign");r.createSign=c.createSign,r.Sign=c.Sign,r.createVerify=c.createVerify,r.Verify=c.Verify,r.createECDH=e("create-ecdh");var f=e("public-encrypt");r.publicEncrypt=f.publicEncrypt,r.privateEncrypt=f.privateEncrypt,r.publicDecrypt=f.publicDecrypt,r.privateDecrypt=f.privateDecrypt;var h=e("randomfill");r.randomFill=h.randomFill,r.randomFillSync=h.randomFillSync,r.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},r.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":73,"browserify-sign":80,"browserify-sign/algos":77,"create-ecdh":90,"create-hash":91,"create-hmac":94,"diffie-hellman":105,pbkdf2:247,"public-encrypt":259,randombytes:270,randomfill:271}],98:[function(e,t,r){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function o(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],o(r),o(n))}function a(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(n),r=1;r0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=a.r28shl(r,s),i=a.r28shl(i,s),a.pc2(r,i,e.keys,o)}},u.prototype._update=function(e,t,r,n){var i=this._desState,o=a.readUInt32BE(e,t),s=a.readUInt32BE(e,t+4);a.ip(o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,s,i.tmp,0):this._decrypt(i,o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],a.writeUInt32BE(r,o,n),a.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,o=l}a.rip(s,o,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var o=r,s=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],f=e.keys[u+1];a.expand(o,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var h=a.substitute(c,f),l=o;o=(s^a.permute(h))>>>0,s=l}a.rip(o,s,n,i)}},{"../des":99,inherits:180,"minimalistic-assert":234}],103:[function(e,t,r){"use strict";var n=e("minimalistic-assert"),i=e("inherits"),o=e("../des"),a=o.Cipher,s=o.DES;function u(e){a.call(this,e);var t=new function(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}(this.type,this.options.key);this._edeState=t}i(u,a),t.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},{"../des":99,inherits:180,"minimalistic-assert":234}],104:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},r.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,i){for(var o=0,a=0,s=n.length>>>1,u=0;u>>n[u]&1;for(u=s;u>>n[u]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},r.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r>>o[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var n=e.toString(2);n.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(f).cmp(h);)r.iadd(d)}else for(;r.mod(o).cmp(l);)r.iadd(d);if(y(p=r.shrn(1))&&y(r)&&m(p)&&m(r)&&a.test(p)&&a.test(r))return r}}},{"bn.js":53,"miller-rabin":233,randombytes:270}],108:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],109:[function(e,t,r){"use strict";var n=r;n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":124,"./elliptic/curve":112,"./elliptic/curves":115,"./elliptic/ec":116,"./elliptic/eddsa":119,"./elliptic/utils":123,brorand:54}],110:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("../../elliptic").utils,o=i.getNAF,a=i.getJSF,s=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1),i=(1<=u;t--)c=(c<<1)+n[t];a.push(c)}for(var f=this.jpoint(null,null,null),h=this.jpoint(null,null,null),l=i;l>0;l--){for(u=0;u=0;c--){for(t=0;c>=0&&0===a[c];c--)t++;if(c>=0&&t++,u=u.dblp(t),c<0)break;var f=a[c];s(0!==f),u="affine"===e.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,f=0,h=0;h=1;h-=2){var d=h-1,p=h;if(1===s[d]&&1===s[p]){var b=[t[d],null,null,t[p]];0===t[d].y.cmp(t[p].y)?(b[1]=t[d].add(t[p]),b[2]=t[d].toJ().mixedAdd(t[p].neg())):0===t[d].y.cmp(t[p].y.redNeg())?(b[1]=t[d].toJ().mixedAdd(t[p]),b[2]=t[d].add(t[p].neg())):(b[1]=t[d].toJ().mixedAdd(t[p]),b[2]=t[d].toJ().mixedAdd(t[p].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],m=a(r[d],r[p]);f=Math.max(m[0].length,f),c[d]=new Array(f),c[p]=new Array(f);for(var v=0;v=0;h--){for(var E=0;h>=0;){var x=!0;for(v=0;v=0&&E++,_=_.dblp(E),h<0)break;for(v=0;v0?k=u[v][S-1>>1]:S<0&&(k=u[v][-S-1>>1].neg()),_="affine"===k.type?_.mixedAdd(k):_.add(k))}}for(h=0;h=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),h=a.redMul(o);return this.curve.point(u,c,h,f)},f.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(c=this.curve._mulA(i)).redAdd(o);if(this.zOne)e=n.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),t=a.redMul(c.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),u=a.redSub(s).redISub(s);e=n.redSub(i).redISub(o).redMul(u),t=a.redMul(c.redSub(o)),r=a.redMul(u)}}else{var c=i.redAdd(o);s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=c.redSub(s).redSub(s);e=this.curve._mulC(n.redISub(c)).redMul(u),t=this.curve._mulC(c).redMul(i.redISub(o)),r=c.redMul(u)}return this.curve.point(e,t,r)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),f=s.redMul(u),h=o.redMul(u),l=a.redMul(s);return this.curve.point(c,f,l,h)},f.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),h=n.redMul(u).redMul(f);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(h,t,r)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},f.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},{"../../elliptic":109,"../curve":112,"bn.js":53,inherits:180}],112:[function(e,t,r){"use strict";var n=r;n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":110,"./edwards":111,"./mont":113,"./short":114}],113:[function(e,t,r){"use strict";var n=e("../curve"),i=e("bn.js"),o=e("inherits"),a=n.base,s=e("../../elliptic").utils;function u(e){a.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){a.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(u,a),t.exports=u,u.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},o(c,a.BasePoint),u.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},u.prototype.point=function(e,t){return new c(this,e,t)},u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":109,"../curve":112,"bn.js":53,inherits:180}],114:[function(e,t,r){"use strict";var n=e("../curve"),i=e("../../elliptic"),o=e("bn.js"),a=e("inherits"),s=n.base,u=i.utils.assert;function c(e){s.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function h(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(r,16),this.z=new o(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}a(c,s),t.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new o(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new o(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],u(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new o(e.a,16),b:new o(e.b,16)}}):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:o.mont(e),r=new o(2).toRed(t).redInvm(),n=r.redNeg(),i=new o(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,i,a,s,u,c,f,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,d=this.n.clone(),p=new o(1),b=new o(0),y=new o(0),m=new o(1),v=0;0!==l.cmpn(0);){var g=d.div(l);c=d.sub(g.mul(l)),f=y.sub(g.mul(p));var w=m.sub(g.mul(b));if(!n&&c.cmp(h)<0)t=u.neg(),r=p,n=c.neg(),i=f;else if(n&&2==++v)break;u=c,d=l,l=c,y=p,p=f,m=b,b=w}a=c.neg(),s=f;var _=n.sqr().add(i.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a:a,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},c.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},f.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new o(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},f.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},f.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(h,s.BasePoint),c.prototype.jpoint=function(e,t,r){return new h(this,e,t,r)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),h=n.redMul(c),l=u.redSqr().redIAdd(f).redISub(h).redISub(h),d=u.redMul(h.redISub(l)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,d,p)},h.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),h=s.redSqr().redIAdd(c).redISub(f).redISub(f),l=s.redMul(f.redISub(h)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(h,l,d)},h.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":109,"../curve":112,"bn.js":53,inherits:180}],115:[function(e,t,r){"use strict";var n,i=r,o=e("hash.js"),a=e("../elliptic"),s=a.utils.assert;function u(e){"short"===e.type?this.curve=new a.curve.short(e):"edwards"===e.type?this.curve=new a.curve.edwards(e):this.curve=new a.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=e("./precomputed/secp256k1")}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"../elliptic":109,"./precomputed/secp256k1":122,"hash.js":162}],116:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("hmac-drbg"),o=e("../../elliptic"),a=o.utils.assert,s=e("./key"),u=e("./signature");function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(a(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}t.exports=c,c.prototype.keyPair=function(e){return new s(this,e)},c.prototype.keyFromPrivate=function(e,t){return s.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return s.fromPublic(this,e,t)},c.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new n(2));;){var s=new n(t.generate(r));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},c.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},c.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),f=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new n(1)),l=0;;l++){var d=o.k?o.k(l):new n(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(h)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var b=p.getX(),y=b.umod(this.n);if(0!==y.cmpn(0)){var m=d.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==b.cmp(y)?2:0);return o.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),v^=1),new u({r:y,s:m,recoveryParam:v})}}}}}},c.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),f=c.mul(e).umod(this.n),h=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(f,r.getPublic(),h)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(f,r.getPublic(),h)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(e,t,r,i){a((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,s=new n(e),c=t.r,f=t.s,h=1&r,l=r>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");c=l?this.curve.pointFromX(c.add(this.curve.n),h):this.curve.pointFromX(c,h);var d=t.r.invm(o),p=o.sub(s).mul(d).umod(o),b=f.mul(d).umod(o);return this.g.mulAdd(p,c,b)},c.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":109,"./key":117,"./signature":118,"bn.js":53,"hmac-drbg":174}],117:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("../../elliptic").utils.assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}t.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},{"../../elliptic":109,"bn.js":53}],118:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("../../elliptic").utils,o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,a=t.place;o>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}t.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new function(){this.place=0};if(48!==e[r.place++])return!1;if(s(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=s(e,r),a=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var u=s(e,r);if(e.length!==u+r.place)return!1;var c=e.slice(r.place,u+r.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new n(a),this.s=new n(c),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var o=n.concat(r),a=[48];return c(a,o.length),a=a.concat(o),i.encode(a,e)}},{"../../elliptic":109,"bn.js":53}],119:[function(e,t,r){"use strict";var n=e("hash.js"),i=e("../../elliptic"),o=i.utils,a=o.assert,s=o.parseBytes,u=e("./key"),c=e("./signature");function f(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}t.exports=f,f.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=0;){var o;if(i.isOdd()){var a=i.andln(n-1);o=a>(n>>1)-1?(n>>1)-a:a,i.isubn(o)}else o=0;r.push(o);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,u=1;u0||t.cmpn(-i)>0;){var o,a,s,u=e.andln(3)+n&3,c=t.andln(3)+i&3;3===u&&(u=-1),3===c&&(c=-1),o=0==(1&u)?0:3!=(s=e.andln(7)+n&7)&&5!==s||2!==c?u:-u,r[0].push(o),a=0==(1&c)?0:3!=(s=t.andln(7)+i&7)&&5!==s||2!==u?c:-c,r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},{"bn.js":53,"minimalistic-assert":234,"minimalistic-crypto-utils":235}],124:[function(e,t,r){t.exports={_from:"elliptic@^6.0.0",_id:"elliptic@6.4.0",_inBundle:!1,_integrity:"sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.0.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.0.0",saveSpec:null,fetchSpec:"^6.0.0"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_spec:"elliptic@^6.0.0",_where:"/Users/alexvlasov/Blockchain/web3swift_jsproxy/node_modules/browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],125:[function(e,t,r){"use strict";const n=e("ethjs-util");function i(e){let t=n.stripHexPrefix(e);for(;"0"===t[0];)t=t.substr(1);return`0x${t}`}t.exports={incrementHexNumber:function(e){return i(n.intToHex(parseInt(e,16)+1))},formatHex:i}},{"ethjs-util":155}],126:[function(e,t,r){const n=e("eth-query"),i=e("events"),o=e("pify"),a=e("./hexUtils"),s=a.incrementHexNumber,u=1e3,c=60*u;t.exports=class extends i{constructor(e={}){if(super(),!e.provider)throw new Error("RpcBlockTracker - no provider specified.");this._provider=e.provider,this._query=new n(e.provider),this._pollingInterval=e.pollingInterval||4*u,this._syncingTimeout=e.syncingTimeout||1*c,this._trackingBlock=null,this._trackingBlockTimestamp=null,this._currentBlock=null,this._isRunning=!1,this._performSync=this._performSync.bind(this),this._handleNewBlockNotification=this._handleNewBlockNotification.bind(this)}getTrackingBlock(){return this._trackingBlock}getCurrentBlock(){return this._currentBlock}async awaitCurrentBlock(){return this._currentBlock?this._currentBlock:(await new Promise(e=>this.once("latest",e)),this._currentBlock)}async start(e={}){this._isRunning||(this._isRunning=!0,e.fromBlock?await this._setTrackingBlock(await this._fetchBlockByNumber(e.fromBlock)):await this._setTrackingBlock(await this._fetchLatestBlock()),this._provider.on?await this._initSubscription():this._performSync().catch(e=>{e&&console.error(e)}))}async stop(){this._isRunning=!1,this._provider.on&&await this._removeSubscription()}async _setTrackingBlock(e){if(this._trackingBlock&&this._trackingBlock.hash===e.hash)return;const t=this._trackingBlockTimestamp,r=Date.now();t&&r-t>this._syncingTimeout?(this._trackingBlockTimestamp=null,await this._warpToLatest()):(this._trackingBlock=e,this._trackingBlockTimestamp=r,this.emit("block",e))}async _setCurrentBlock(e){if(this._currentBlock&&this._currentBlock.hash===e.hash)return;const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{newBlock:e,oldBlock:t})}async _warpToLatest(){await this._setTrackingBlock(await this._fetchLatestBlock())}async _pollForNextBlock(){setTimeout(()=>this._performSync(),this._pollingInterval)}async _performSync(){if(!this._isRunning)return;const e=this.getTrackingBlock();if(!e)throw new Error("RpcBlockTracker - tracking block is missing");const t=s(e.number);try{const r=await this._fetchBlockByNumber(t);r?(await this._setTrackingBlock(r),this._performSync()):(await this._setCurrentBlock(e),this._pollForNextBlock())}catch(t){t.message.includes("index out of range")||t.message.includes("Couldn't find block by reference")?(await this._setCurrentBlock(e),this._pollForNextBlock()):(console.error(t),this._pollForNextBlock())}}async _handleNewBlockNotification(e,t){t.id==this._subscriptionId&&(e&&(this.emit("error",e),await this._removeSubscription()),await this._setTrackingBlock(await this._fetchBlockByNumber(t.result.number)))}async _initSubscription(){this._provider.on("data",this._handleNewBlockNotification);let e=await o(this._provider.sendAsync||this._provider.send)({jsonrpc:"2.0",id:(new Date).getTime(),method:"eth_subscribe",params:["newHeads"]});this._subscriptionId=e.result}async _removeSubscription(){if(!this._subscriptionId)throw new Error("Not subscribed.");this._provider.removeListener("data",this._handleNewBlockNotification),await o(this._provider.sendAsync||this._provider.send)({jsonrpc:"2.0",id:(new Date).getTime(),method:"eth_unsubscribe",params:[this._subscriptionId]}),delete this._subscriptionId}_fetchLatestBlock(){return o(this._query.getBlockByNumber).call(this._query,"latest",!0)}_fetchBlockByNumber(e){const t=a.formatHex(e);return o(this._query.getBlockByNumber).call(this._query,t,!0)}}},{"./hexUtils":125,"eth-query":135,events:157,pify:252}],127:[function(e,t,r){(function(t){var n=e("js-sha3").keccak_256,i=e("idna-uts46-hx");function o(e){return e?i.toUnicode(e,{useStd3ASCII:!0,transitional:!1}):e}r.hash=function(e){for(var r="",i=0;i<32;i++)r+="00";if(name=o(e),name){var a=name.split(".");for(i=a.length-1;i>=0;i--){var s=n(a[i]);r=n(new t(r+s,"hex"))}}return"0x"+r},r.normalize=o}).call(this,e("buffer").Buffer)},{buffer:84,"idna-uts46-hx":177,"js-sha3":128}],128:[function(e,t,r){(function(e,r){!function(){"use strict";var n="object"==typeof window?window:{};!n.JS_SHA3_NO_NODE_JS&&"object"==typeof e&&e.versions&&e.versions.node&&(n=r);for(var i=!n.JS_SHA3_NO_COMMON_JS&&"object"==typeof t&&t.exports,o="0123456789abcdef".split(""),a=[0,8,16,24],s=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],u=[224,256,384,512],c=["hex","buffer","arrayBuffer","array"],f=function(e,t,r){return function(n){return new _(e,t,e).update(n)[r]()}},h=function(e,t,r){return function(n,i){return new _(e,t,i).update(n)[r]()}},l=function(e,t){var r=f(e,t,"hex");r.create=function(){return new _(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}_.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,o=this.blocks,s=this.byteCount,u=this.blockCount,c=0,f=this.s;c>2]|=e[c]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(o[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=s){for(this.start=r-s,this.block=o[u],r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+o[15&e]+o[e>>12&15]+o[e>>8&15]+o[e>>20&15]+o[e>>16&15]+o[e>>28&15]+o[e>>24&15];s%t==0&&(A(r),a=0)}return i&&(e=r[a],i>0&&(u+=o[e>>4&15]+o[15&e]),i>1&&(u+=o[e>>12&15]+o[e>>8&15]),i>2&&(u+=o[e>>20&15]+o[e>>16&15])),u},_.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&A(n)}return o&&(e=s<<2,t=n[a],o>0&&(u[e]=255&t),o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u};var A=function(e){var t,r,n,i,o,a,u,c,f,h,l,d,p,b,y,m,v,g,w,_,A,E,x,k,S,M,I,T,U,j,B,P,C,N,R,L,O,D,F,q,H,z,K,V,G,W,Y,X,Z,J,$,Q,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],h=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|f>>>31),r=o^(f<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(h<<1|l>>>31),r=u^(l<<1|h>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|p>>>31),r=f^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=h^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,U=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,R=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,j=e[33]<<13|e[32]>>>19,B=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,O=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,A=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,V=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,M=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,x=e[49]<<14|e[48]>>>18,e[0]=b^~m&g,e[1]=y^~v&w,e[10]=k^~M&T,e[11]=S^~I&U,e[20]=N^~L&D,e[21]=R^~O&F,e[30]=V^~W&X,e[31]=G^~Y&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=m^~g&_,e[3]=v^~w&A,e[12]=M^~T&j,e[13]=I^~U&B,e[22]=L^~D&q,e[23]=O^~F&H,e[32]=W^~X&J,e[33]=Y^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=g^~_&E,e[5]=w^~A&x,e[14]=T^~j&P,e[15]=U^~B&C,e[24]=D^~q&z,e[25]=F^~H&K,e[34]=X^~J&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=_^~E&b,e[7]=A^~x&y,e[16]=j^~P&k,e[17]=B^~C&S,e[26]=q^~z&N,e[27]=H^~K&R,e[36]=J^~Q&V,e[37]=$^~ee&G,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=E^~b&m,e[9]=x^~y&v,e[18]=P^~k&M,e[19]=C^~S&I,e[28]=z^~N&L,e[29]=K^~R&O,e[38]=Q^~V&W,e[39]=ee^~G&Y,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=s[n],e[1]^=s[n+1]};if(i)t.exports=p;else for(y=0;y{setTimeout(t,e)})}function c(e){const t=e.toString();return s.some(e=>t.includes(e))}async function f(e,t,r){const{fetchUrl:n,fetchParams:a}=h({network:e,req:t}),s=await o(n,a),u=await s.text();if(!s.ok)switch(s.status){case 405:throw new i.MethodNotFound;case 418:throw l("Request is being rate limited.");case 503:case 504:throw function(){let e="Gateway timeout. The request took too long to process. ";return e+="This can happen when querying logs over too wide a block range.",l("Gateway timeout. The request took too long to process. This can happen when querying logs over too wide a block range.")}();default:throw l(u)}if("eth_getBlockByNumber"===t.method&&"Not Found"===u)return void(r.result=null);const c=JSON.parse(u);r.result=c.result,r.error=c.error}function h({network:e,req:t}){const r=function(e){return{id:e.id,jsonrpc:e.jsonrpc,method:e.method,params:e.params}}(t),{method:n,params:i}=r,o={};let s=`https://api.infura.io/v1/jsonrpc/${e}`;if(a.includes(n))o.method="POST",o.headers={Accept:"application/json","Content-Type":"application/json"},o.body=JSON.stringify(r);else{o.method="GET",s+=`/${n}?params=${encodeURIComponent(JSON.stringify(i))}`}return{fetchUrl:s,fetchParams:o}}function l(e){const t=new Error(e);return new i.InternalError(t)}t.exports=function(e={}){const t=e.network||"mainnet",r=e.maxAttempts||5;if(!r)throw new Error(`Invalid value for 'maxAttempts': "${r}" (${typeof r})`);return n(async(e,n,i)=>{for(let i=1;i<=r;i++)try{await f(t,e,n);break}catch(e){if(!c(e))throw e;const t=r-i;if(!t){const t=`InfuraProvider - cannot complete request. All retries exhausted.\nOriginal Error:\n${e.toString()}\n\n`,r=new Error(t);throw r}await u(1e3)}})},t.exports.fetchConfigFromReq=h},{"cross-fetch":96,"json-rpc-engine/src/createAsyncMiddleware":187,"json-rpc-error":189}],131:[function(e,t,r){t.exports=function(e){return{sendAsync:e.handle.bind(e)}}},{}],132:[function(e,t,r){var n=function(e,t){for(var r=[],n=0;n>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},{"./array.js":132}],134:[function(e,t,r){var n="0123456789abcdef".split(""),i=[1,256,65536,16777216],o=[0,8,16,24],a=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],s=function(e){var t,r,n,i,o,s,u,c,f,h,l,d,p,b,y,m,v,g,w,_,A,E,x,k,S,M,I,T,U,j,B,P,C,N,R,L,O,D,F,q,H,z,K,V,G,W,Y,X,Z,J,$,Q,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],h=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|f>>>31),r=o^(f<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(h<<1|l>>>31),r=u^(l<<1|h>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|p>>>31),r=f^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=h^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,U=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,R=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,j=e[33]<<13|e[32]>>>19,B=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,O=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,A=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,V=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,M=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,x=e[49]<<14|e[48]>>>18,e[0]=b^~m&g,e[1]=y^~v&w,e[10]=k^~M&T,e[11]=S^~I&U,e[20]=N^~L&D,e[21]=R^~O&F,e[30]=V^~W&X,e[31]=G^~Y&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=m^~g&_,e[3]=v^~w&A,e[12]=M^~T&j,e[13]=I^~U&B,e[22]=L^~D&q,e[23]=O^~F&H,e[32]=W^~X&J,e[33]=Y^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=g^~_&E,e[5]=w^~A&x,e[14]=T^~j&P,e[15]=U^~B&C,e[24]=D^~q&z,e[25]=F^~H&K,e[34]=X^~J&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=_^~E&b,e[7]=A^~x&y,e[16]=j^~P&k,e[17]=B^~C&S,e[26]=q^~z&N,e[27]=H^~K&R,e[36]=J^~Q&V,e[37]=$^~ee&G,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=E^~b&m,e[9]=x^~y&v,e[18]=P^~k&M,e[19]=C^~S&I,e[28]=z^~N&L,e[29]=K^~R&O,e[38]=Q^~V&W,e[39]=ee^~G&Y,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=a[n],e[1]^=a[n+1]},u=function(e){return function(t){var r;if("0x"===t.slice(0,2)){r=[];for(var a=2,u=t.length;a>2]|=t[d]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|63&r)<=57344?(u[y>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<=c){for(e.start=y-c,e.block=u[f],y=0;y>2]|=i[3&y],e.lastByteIndex===c)for(u[0]=u[f],y=1;y>4&15]+n[15&p]+n[p>>12&15]+n[p>>8&15]+n[p>>20&15]+n[p>>16&15]+n[p>>28&15]+n[p>>24&15];m%f==0&&(s(l),y=0)}return"0x"+b}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),r)}};t.exports={keccak256:u(256),keccak512:u(512),keccak256s:u(256),keccak512s:u(512)}},{}],135:[function(e,t,r){const n=e("xtend"),i=e("json-rpc-random-id")();function o(e){this.currentProvider=e}function a(e){return function(){var t=[].slice.call(arguments),r=t.pop();this.sendAsync({method:e,params:t},r)}}function s(e,t){return function(){var r=[].slice.call(arguments),n=r.pop();r.lengtho)throw new Error("Elements exceed array size: "+o);for(d in h=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof t&&(t=JSON.parse(t)),t)h.push(l(e,t[d]));if("dynamic"===o){var p=l("uint256",t.length);h.unshift(p)}return r.concat(h)}if("bytes"===e)return t=new r(t),h=r.concat([l("uint256",t.length),t]),t.length%32!=0&&(h=r.concat([h,n.zeros(32-t.length%32)])),h;if(e.startsWith("bytes")){if((o=s(e))<1||o>32)throw new Error("Invalid bytes width: "+o);return n.setLengthRight(t,32)}if(e.startsWith("uint")){if((o=s(e))%8||o<8||o>256)throw new Error("Invalid uint width: "+o);if((a=f(t)).bitLength()>o)throw new Error("Supplied uint exceeds width: "+o+" vs "+a.bitLength());if(a<0)throw new Error("Supplied uint is negative");return a.toArrayLike(r,"be",32)}if(e.startsWith("int")){if((o=s(e))%8||o<8||o>256)throw new Error("Invalid int width: "+o);if((a=f(t)).bitLength()>o)throw new Error("Supplied int exceeds width: "+o+" vs "+a.bitLength());return a.toTwos(256).toArrayLike(r,"be",32)}if(e.startsWith("ufixed")){if(o=u(e),(a=f(t))<0)throw new Error("Supplied ufixed is negative");return l("uint256",a.mul(new i(2).pow(new i(o[1]))))}if(e.startsWith("fixed"))return o=u(e),l("int256",f(t).mul(new i(2).pow(new i(o[1]))));throw new Error("Unsupported or invalid type: "+e)}function d(e,t,n){var o,a,s,u;if("string"==typeof e&&(e=p(e)),"address"===e.name)return d(e.rawType,t,n).toArrayLike(r,"be",20).toString("hex");if("bool"===e.name)return d(e.rawType,t,n).toString()===new i(1).toString();if("string"===e.name){var c=d(e.rawType,t,n);return new r(c,"utf8").toString()}if(e.isArray){for(s=[],o=e.size,"dynamic"===e.size&&(o=d("uint256",t,n=d("uint256",t,n).toNumber()).toNumber(),n+=32),u=0;ue.size)throw new Error("Decoded int exceeds width: "+e.size+" vs "+a.bitLength());return a}if(e.name.startsWith("int")){if((a=new i(t.slice(n,n+32),16,"be").fromTwos(256)).bitLength()>e.size)throw new Error("Decoded uint exceeds width: "+e.size+" vs "+a.bitLength());return a}if(e.name.startsWith("ufixed")){if(o=new i(2).pow(new i(e.size[1])),!(a=d("uint256",t,n)).mod(o).isZero())throw new Error("Decimals not supported yet");return a.div(o)}if(e.name.startsWith("fixed")){if(o=new i(2).pow(new i(e.size[1])),!(a=d("int256",t,n)).mod(o).isZero())throw new Error("Decimals not supported yet");return a.div(o)}throw new Error("Unsupported or invalid type: "+e.name)}function p(e){var t,r,n;if(y(e)){t=c(e);var i=e.slice(0,e.lastIndexOf("["));return i=p(i),r={isArray:!0,name:e,size:t,memoryUsage:"dynamic"===t?32:i.memoryUsage*t,subArray:i}}switch(e){case"address":n="uint160";break;case"bool":n="uint8";break;case"string":n="bytes"}if(r={rawType:n,name:e,memoryUsage:32},e.startsWith("bytes")&&"bytes"!==e||e.startsWith("uint")||e.startsWith("int")?r.size=s(e):(e.startsWith("ufixed")||e.startsWith("fixed"))&&(r.size=u(e)),e.startsWith("bytes")&&"bytes"!==e&&(r.size<1||r.size>32))throw new Error("Invalid bytes width: "+r.size);if((e.startsWith("uint")||e.startsWith("int"))&&(r.size%8||r.size<8||r.size>256))throw new Error("Invalid int/uint width: "+r.size);return r}function b(e){return"string"===e||"bytes"===e||"dynamic"===c(e)}function y(e){return e.lastIndexOf("]")===e.length-1}function m(e,t){return e.startsWith("address")||e.startsWith("bytes")?"0x"+t.toString("hex"):t.toString()}o.eventID=function(e,t){var i=e+"("+t.map(a).join(",")+")";return n.sha3(new r(i))},o.methodID=function(e,t){return o.eventID(e,t).slice(0,4)},o.rawEncode=function(e,t){var n=[],i=[],o=0;e.forEach(function(e){if(y(e)){var t=c(e);o+="dynamic"!==t?32*t:32}else o+=32});for(var s=0;s32)throw new Error("Invalid bytes width: "+i);u.push(n.setLengthRight(l,i))}else if(h.startsWith("uint")){if((i=s(h))%8||i<8||i>256)throw new Error("Invalid uint width: "+i);if((o=f(l)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+o.bitLength());u.push(o.toArrayLike(r,"be",i/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((i=s(h))%8||i<8||i>256)throw new Error("Invalid int width: "+i);if((o=f(l)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+o.bitLength());u.push(o.toTwos(i).toArrayLike(r,"be",i/8))}}return r.concat(u)},o.soliditySHA3=function(e,t){return n.sha3(o.solidityPack(e,t))},o.soliditySHA256=function(e,t){return n.sha256(o.solidityPack(e,t))},o.solidityRIPEMD160=function(e,t){return n.ripemd160(o.solidityPack(e,t),!0)},o.fromSerpent=function(e){for(var t,r=[],n=0;n="0"&&t<="9");)o+=e[a]-"0",a++;n=a-1,r.push(o)}else if("i"===i)r.push("int256");else{if("a"!==i)throw new Error("Unsupported or invalid type: "+i);r.push("int256[]")}}return r},o.toSerpent=function(e){for(var t=[],r=0;r0){var r=this.raw.slice();this.v=this._chainId,this.r=0,this.s=0,t=this.raw,this.raw=r}else t=this.raw.slice(0,6);return n.rlphash(t)},e.prototype.getChainId=function(){return this._chainId},e.prototype.getSenderAddress=function(){if(this._from)return this._from;var e=this.getSenderPublicKey();return this._from=n.publicToAddress(e),this._from},e.prototype.getSenderPublicKey=function(){if(!(this._senderPubKey&&this._senderPubKey.length||this.verifySignature()))throw new Error("Invalid Signature");return this._senderPubKey},e.prototype.verifySignature=function(){var e=this.hash(!1);if(this._homestead&&1===new o(this.s).cmp(a))return!1;try{var t=n.bufferToInt(this.v);this._chainId>0&&(t-=2*this._chainId+8),this._senderPubKey=n.ecrecover(e,t,this.r,this.s)}catch(e){return!1}return!!this._senderPubKey},e.prototype.sign=function(e){var t=this.hash(!1),r=n.ecsign(t,e);this._chainId>0&&(r.v+=2*this._chainId+8),Object.assign(this,r)},e.prototype.getDataFee=function(){for(var e=this.raw[5],t=new o(0),r=0;r0&&t.push(["gas limit is too low. Need at least "+this.getBaseFee()]),void 0===e||!1===e?0===t.length:t.join(" ")},e}();t.exports=s}).call(this,e("buffer").Buffer)},{buffer:84,"ethereum-common/params.json":137,"ethereumjs-util":141}],141:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("keccak"),o=e("secp256k1"),a=e("assert"),s=e("rlp"),u=e("bn.js"),c=e("create-hash"),f=e("safe-buffer").Buffer;Object.assign(r,e("ethjs-util")),r.MAX_INTEGER=new u("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),r.TWO_POW256=new u("10000000000000000000000000000000000000000000000000000000000000000",16),r.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",r.SHA3_NULL_S=r.KECCAK256_NULL_S,r.KECCAK256_NULL=f.from(r.KECCAK256_NULL_S,"hex"),r.SHA3_NULL=r.KECCAK256_NULL,r.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",r.SHA3_RLP_ARRAY_S=r.KECCAK256_RLP_ARRAY_S,r.KECCAK256_RLP_ARRAY=f.from(r.KECCAK256_RLP_ARRAY_S,"hex"),r.SHA3_RLP_ARRAY=r.KECCAK256_RLP_ARRAY,r.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",r.SHA3_RLP_S=r.KECCAK256_RLP_S,r.KECCAK256_RLP=f.from(r.KECCAK256_RLP_S,"hex"),r.SHA3_RLP=r.KECCAK256_RLP,r.BN=u,r.rlp=s,r.secp256k1=o,r.zeros=function(e){return f.allocUnsafe(e).fill(0)},r.zeroAddress=function(){var e=r.zeros(20);return r.bufferToHex(e)},r.setLengthLeft=r.setLength=function(e,t,n){var i=r.zeros(t);return e=r.toBuffer(e),n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},r.toBuffer=function(e){if(!f.isBuffer(e))if(Array.isArray(e))e=f.from(e);else if("string"==typeof e)e=r.isHexString(e)?f.from(r.padToEven(r.stripHexPrefix(e)),"hex"):f.from(e);else if("number"==typeof e)e=r.intToBuffer(e);else if(null==e)e=f.allocUnsafe(0);else if(u.isBN(e))e=e.toArrayLike(f);else{if(!e.toArray)throw new Error("invalid type");e=f.from(e.toArray())}return e},r.bufferToInt=function(e){return new u(r.toBuffer(e)).toNumber()},r.bufferToHex=function(e){return"0x"+(e=r.toBuffer(e)).toString("hex")},r.fromSigned=function(e){return new u(e).fromTwos(256)},r.toUnsigned=function(e){return f.from(e.toTwos(256).toArray())},r.keccak=function(e,t){return e=r.toBuffer(e),t||(t=256),i("keccak"+t).update(e).digest()},r.keccak256=function(e){return r.keccak(e)},r.sha3=r.keccak,r.sha256=function(e){return e=r.toBuffer(e),c("sha256").update(e).digest()},r.ripemd160=function(e,t){e=r.toBuffer(e);var n=c("rmd160").update(e).digest();return!0===t?r.setLength(n,32):n},r.rlphash=function(e){return r.keccak(s.encode(e))},r.isValidPrivate=function(e){return o.privateKeyVerify(e)},r.isValidPublic=function(e,t){return 64===e.length?o.publicKeyVerify(f.concat([f.from([4]),e])):!!t&&o.publicKeyVerify(e)},r.pubToAddress=r.publicToAddress=function(e,t){return e=r.toBuffer(e),t&&64!==e.length&&(e=o.publicKeyConvert(e,!1).slice(1)),a(64===e.length),r.keccak(e).slice(-20)};var h=r.privateToPublic=function(e){return e=r.toBuffer(e),o.publicKeyCreate(e,!1).slice(1)};r.importPublic=function(e){return 64!==(e=r.toBuffer(e)).length&&(e=o.publicKeyConvert(e,!1).slice(1)),e},r.ecsign=function(e,t){var r=o.sign(e,t),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},r.hashPersonalMessage=function(e){var t=r.toBuffer("Ethereum Signed Message:\n"+e.length.toString());return r.keccak(f.concat([t,e]))},r.ecrecover=function(e,t,n,i){var a=f.concat([r.setLength(n,32),r.setLength(i,32)],64),s=t-27;if(0!==s&&1!==s)throw new Error("Invalid signature v value");var u=o.recover(e,a,s);return o.publicKeyConvert(u,!1).slice(1)},r.toRpcSig=function(e,t,n){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return r.bufferToHex(f.concat([r.setLengthLeft(t,32),r.setLengthLeft(n,32),r.toBuffer(e-27)]))},r.fromRpcSig=function(e){if(65!==(e=r.toBuffer(e)).length)throw new Error("Invalid signature length");var t=e[64];return t<27&&(t+=27),{v:t,r:e.slice(0,32),s:e.slice(32,64)}},r.privateToAddress=function(e){return r.publicToAddress(h(e))},r.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},r.isZeroAddress=function(e){return r.zeroAddress()===r.addHexPrefix(e)},r.toChecksumAddress=function(e){e=r.stripHexPrefix(e).toLowerCase();for(var t=r.keccak(e).toString("hex"),n="0x",i=0;i=8?n+=e[i].toUpperCase():n+=e[i];return n},r.isValidChecksumAddress=function(e){return r.isValidAddress(e)&&r.toChecksumAddress(e)===e},r.generateAddress=function(e,t){return e=r.toBuffer(e),t=(t=new u(t)).isZero()?null:f.from(t.toArray()),r.rlphash([e,t]).slice(-20)},r.isPrecompiled=function(e){var t=r.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},r.addHexPrefix=function(e){return"string"!=typeof e?e:r.isHexPrefixed(e)?e:"0x"+e},r.isValidSignature=function(e,t,r,n){var i=new u("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new u("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===r.length&&((27===e||28===e)&&(t=new u(t),r=new u(r),!(t.isZero()||t.gt(o)||r.isZero()||r.gt(o))&&(!1!==n||1!==new u(r).cmp(i))))},r.baToJSON=function(e){if(f.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var t=[],n=0;n=i.length,"The field "+t.name+" must not have more "+t.length+" bytes")):t.allowZero&&0===i.length||!t.length||a(t.length===i.length,"The field "+t.name+" must have byte length of "+t.length),e.raw[n]=i}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:i,set:o}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:o,get:i})}),i)if("string"==typeof i&&(i=f.from(r.stripHexPrefix(i),"hex")),f.isBuffer(i)&&(i=s.decode(i)),Array.isArray(i)){if(i.length>e._fields.length)throw new Error("wrong number of fields in data");i.forEach(function(t,n){e[e._fields[n]]=r.toBuffer(t)})}else{if("object"!==(void 0===i?"undefined":n(i)))throw new Error("invalid data");var o=Object.keys(i);t.forEach(function(t){-1!==o.indexOf(t.name)&&(e[t.name]=i[t.name]),-1!==o.indexOf(t.alias)&&(e[t.alias]=i[t.alias])})}}},{assert:19,"bn.js":53,"create-hash":91,"ethjs-util":155,keccak:195,rlp:289,"safe-buffer":290,secp256k1:295}],142:[function(e,t,r){arguments[4][128][0].apply(r,arguments)},{_process:257,dup:128}],143:[function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(r,"__esModule",{value:!0});var a=e("./address"),s=e("./bignumber"),u=e("./bytes"),c=e("./utf8"),f=e("./properties"),h=o(e("./errors")),l=new RegExp(/^bytes([0-9]*)$/),d=new RegExp(/^(u?int)([0-9]*)$/),p=new RegExp(/^(.*)\[([0-9]*)\]$/);r.defaultCoerceFunc=function(e,t){var r=e.match(d);return r&&parseInt(r[2])<=48?t.toNumber():t};var b=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"),y=new RegExp("^[A-Za-z_][A-Za-z0-9_]*$");function m(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}function v(e,t){function r(t){throw new Error('unexpected character "'+e[t]+'" at position '+t+' in "'+e+'"')}for(var n={type:"",name:"",state:{allowType:!0}},i=n,o=0;o1){var i=r[1].match(b);if(""!=i[1].trim()||""!=i[3].trim())throw new Error("unexpected tokens");L(i[2]).forEach(function(e){t.outputs.push(v(e))})}return t}(e.trim()));throw new Error("unknown signature")};var w=function(){return function(e,t,r,n,i){this.coerceFunc=e,this.name=t,this.type=r,this.localName=n,this.dynamic=i}}(),_=function(e){function t(t){var r=e.call(this,t.coerceFunc,t.name,t.type,void 0,t.dynamic)||this;return f.defineReadOnly(r,"coder",t),r}return i(t,e),t.prototype.encode=function(e){return this.coder.encode(e)},t.prototype.decode=function(e,t){return this.coder.decode(e,t)},t}(w),A=function(e){function t(t,r){return e.call(this,t,"null","",r,!1)||this}return i(t,e),t.prototype.encode=function(e){return u.arrayify([])},t.prototype.decode=function(e,t){if(t>e.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}},t}(w),E=function(e){function t(t,r,n,i){var o=this,a=(n?"int":"uint")+8*r;return(o=e.call(this,t,a,a,i,!1)||this).size=r,o.signed=n,o}return i(t,e),t.prototype.encode=function(e){try{var t=s.bigNumberify(e);return t=t.toTwos(8*this.size).maskn(8*this.size),this.signed&&(t=t.fromTwos(8*this.size).toTwos(256)),u.padZeros(u.arrayify(t),32)}catch(t){h.throwError("invalid number value",h.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:e})}return null},t.prototype.decode=function(e,t){e.length32)throw new Error;t.set(r)}catch(t){h.throwError("invalid "+this.name+" value",h.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:t.value||e})}return t},t.prototype.decode=function(e,t){return e.length=0?n:"")+"]",s=-1===n||r.dynamic;return(o=e.call(this,t,"array",a,i,s)||this).coder=r,o.length=n,o}return i(t,e),t.prototype.encode=function(e){Array.isArray(e)||h.throwError("expected array value",h.INVALID_ARGUMENT,{arg:this.localName,coderType:"array",value:e});var t=this.length,r=new Uint8Array(0);-1===t&&(t=e.length,r=x.encode(t)),h.checkArgumentCount(t,e.length,"in coder array"+(this.localName?" "+this.localName:""));for(var n=[],i=0;i256||i%8!=0)&&h.throwError("invalid "+r[1]+" bit length",h.INVALID_ARGUMENT,{arg:"param",value:t}),new E(e,i/8,"int"===r[1],t.name);if(r=t.type.match(l))return(0===(i=parseInt(r[1]))||i>32)&&h.throwError("invalid bytes length",h.INVALID_ARGUMENT,{arg:"param",value:t}),new S(e,i,t.name);if(r=t.type.match(p)){var i=parseInt(r[2]||"-1");return(t=f.jsonCopy(t)).type=r[1],new N(e,D(e,t),i,t.name)}return"tuple"===t.type.substring(0,5)?function(e,t,r){t||(t=[]);var n=[];return t.forEach(function(t){n.push(D(e,t))}),new R(e,n,r)}(e,t.components,t.name):""===t.type?new A(e,t.name):(h.throwError("invalid type",h.INVALID_ARGUMENT,{arg:"type",value:t.type}),null)}var F=function(){function e(t){h.checkNew(this,e),t||(t=r.defaultCoerceFunc),f.defineReadOnly(this,"coerceFunc",t)}return e.prototype.encode=function(e,t){e.length!==t.length&&h.throwError("types/values length mismatch",h.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var r=[];return e.forEach(function(e){var t=null;t="string"==typeof e?v(e):e,r.push(D(this.coerceFunc,t))},this),u.hexlify(new R(this.coerceFunc,r,"_").encode(t))},e.prototype.decode=function(e,t){var r=[];return e.forEach(function(e){var t=null;t="string"==typeof e?v(e):f.jsonCopy(e),r.push(D(this.coerceFunc,t))},this),new R(this.coerceFunc,r,"_").decode(u.arrayify(t),0).value},e}();r.AbiCoder=F,r.defaultAbiCoder=new F},{"./address":144,"./bignumber":145,"./bytes":146,"./errors":147,"./properties":149,"./utf8":152}],144:[function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var i=n(e("bn.js")),o=e("./bytes"),a=e("./keccak256"),s=e("./rlp"),u=e("./errors");function c(e){"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]{40}$/)||u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:e});for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=t[n].charCodeAt(0);r=o.arrayify(a.keccak256(r));for(var i=0;i<40;i+=2)r[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&r[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}for(var f={},h=0;h<10;h++)f[String(h)]=String(h);for(h=0;h<26;h++)f[String.fromCharCode(65+h)]=String(10+h);var l,d=Math.floor((l=9007199254740991,Math.log10?Math.log10(l):Math.log(l)/Math.LN10));function p(e){e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00";var t="";for(e.split("").forEach(function(e){t+=f[e]});t.length>=d;){var r=t.substring(0,d);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function b(e){var t=null;if("string"!=typeof e&&u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:e}),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=c(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.throwError("bad address checksum",u.INVALID_ARGUMENT,{arg:"address",value:e});else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==p(e)&&u.throwError("bad icap checksum",u.INVALID_ARGUMENT,{arg:"address",value:e}),t=new i.default.BN(e.substring(4),36).toString(16);t.length<40;)t="0"+t;t=c("0x"+t)}else u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:e});return t}r.getAddress=b,r.getIcapAddress=function(e){for(var t=new i.default.BN(b(e).substring(2),16).toString(36).toUpperCase();t.length<30;)t="0"+t;return"XE"+p("XE00"+t)+t},r.getContractAddress=function(e){if(!e.from)throw new Error("missing from address");var t=e.nonce;return b("0x"+a.keccak256(s.encode([b(e.from),o.stripZeros(o.hexlify(t))])).substring(26))}},{"./bytes":146,"./errors":147,"./keccak256":148,"./rlp":150,"bn.js":53}],145:[function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(r,"__esModule",{value:!0});var s=o(e("bn.js")),u=e("./bytes"),c=e("./properties"),f=e("./types"),h=a(e("./errors")),l=new s.default.BN(-1);function d(e){var t=e.toString(16);return"-"===t[0]?t.length%2==0?"-0x0"+t.substring(1):"-0x"+t.substring(1):t.length%2==1?"0x0"+t:"0x"+t}function p(e){return m(e)._bn}function b(e){return new y(d(e))}var y=function(e){function t(r){var n=e.call(this)||this;if(h.checkNew(n,t),"string"==typeof r)u.isHexString(r)?("0x"==r&&(r="0x0"),c.defineReadOnly(n,"_hex",r)):"-"===r[0]&&u.isHexString(r.substring(1))?c.defineReadOnly(n,"_hex",r):r.match(/^-?[0-9]*$/)?(""==r&&(r="0"),c.defineReadOnly(n,"_hex",d(new s.default.BN(r)))):h.throwError("invalid BigNumber string value",h.INVALID_ARGUMENT,{arg:"value",value:r});else if("number"==typeof r){parseInt(String(r))!==r&&h.throwError("underflow",h.NUMERIC_FAULT,{operation:"setValue",fault:"underflow",value:r,outputValue:parseInt(String(r))});try{c.defineReadOnly(n,"_hex",d(new s.default.BN(r)))}catch(e){h.throwError("overflow",h.NUMERIC_FAULT,{operation:"setValue",fault:"overflow",details:e.message})}}else r instanceof t?c.defineReadOnly(n,"_hex",r._hex):r.toHexString?c.defineReadOnly(n,"_hex",d(p(r.toHexString()))):u.isArrayish(r)?c.defineReadOnly(n,"_hex",d(new s.default.BN(u.hexlify(r).substring(2),16))):h.throwError("invalid BigNumber value",h.INVALID_ARGUMENT,{arg:"value",value:r});return n}return i(t,e),Object.defineProperty(t.prototype,"_bn",{get:function(){return"-"===this._hex[0]?new s.default.BN(this._hex.substring(3),16).mul(l):new s.default.BN(this._hex.substring(2),16)},enumerable:!0,configurable:!0}),t.prototype.fromTwos=function(e){return b(this._bn.fromTwos(e))},t.prototype.toTwos=function(e){return b(this._bn.toTwos(e))},t.prototype.add=function(e){return b(this._bn.add(p(e)))},t.prototype.sub=function(e){return b(this._bn.sub(p(e)))},t.prototype.div=function(e){return m(e).isZero()&&h.throwError("division by zero",h.NUMERIC_FAULT,{operation:"divide",fault:"division by zero"}),b(this._bn.div(p(e)))},t.prototype.mul=function(e){return b(this._bn.mul(p(e)))},t.prototype.mod=function(e){return b(this._bn.mod(p(e)))},t.prototype.pow=function(e){return b(this._bn.pow(p(e)))},t.prototype.maskn=function(e){return b(this._bn.maskn(e))},t.prototype.eq=function(e){return this._bn.eq(p(e))},t.prototype.lt=function(e){return this._bn.lt(p(e))},t.prototype.lte=function(e){return this._bn.lte(p(e))},t.prototype.gt=function(e){return this._bn.gt(p(e))},t.prototype.gte=function(e){return this._bn.gte(p(e))},t.prototype.isZero=function(){return this._bn.isZero()},t.prototype.toNumber=function(){try{return this._bn.toNumber()}catch(e){h.throwError("overflow",h.NUMERIC_FAULT,{operation:"setValue",fault:"overflow",details:e.message})}return null},t.prototype.toString=function(){return this._bn.toString(10)},t.prototype.toHexString=function(){return this._hex},t}(f.BigNumber);function m(e){return e instanceof y?e:new y(e)}r.bigNumberify=m,r.ConstantNegativeOne=m(-1),r.ConstantZero=m(0),r.ConstantOne=m(1),r.ConstantTwo=m(2),r.ConstantWeiPerEther=m("1000000000000000000")},{"./bytes":146,"./errors":147,"./properties":149,"./types":151,"bn.js":53}],146:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./errors");function i(e){return!!e._bn}function o(e){return e.slice?e:(e.slice=function(){var t=Array.prototype.slice.call(arguments);return new Uint8Array(Array.prototype.slice.apply(e,t))},e)}function a(e){if(!e||parseInt(String(e.length))!=e.length||"string"==typeof e)return!1;for(var t=0;t=256||parseInt(String(r))!=r)return!1}return!0}function s(e){if(null==e&&n.throwError("cannot convert null value to array",n.INVALID_ARGUMENT,{arg:"value",value:e}),i(e)&&(e=e.toHexString()),"string"==typeof e){var t=e.match(/^(0x)?[0-9a-fA-F]*$/);t||n.throwError("invalid hexidecimal string",n.INVALID_ARGUMENT,{arg:"value",value:e}),"0x"!==t[1]&&n.throwError("hex string must have 0x prefix",n.INVALID_ARGUMENT,{arg:"value",value:e}),(e=e.substring(2)).length%2&&(e="0"+e);for(var r=[],s=0;s>4]+f[15&u])}return"0x"+o.join("")}return n.throwError("invalid hexlify value",null,{arg:"value",value:e}),"never"}function l(e,t){for(c(e)||n.throwError("invalid hex string",n.INVALID_ARGUMENT,{arg:"value",value:e});e.length<2*t+2;)e="0x0"+e.substring(2);return e}function d(e){var t,r=0,i="0x",o="0x";if((t=e)&&null!=t.r&&null!=t.s){null==e.v&&null==e.recoveryParam&&n.throwError("at least on of recoveryParam or v must be specified",n.INVALID_ARGUMENT,{argument:"signature",value:e}),i=l(e.r,32),o=l(e.s,32),"string"==typeof(r=e.v)&&(r=parseInt(r,16));var a=e.recoveryParam;null==a&&null!=e.v&&(a=1-r%2),r=27+a}else{var u=s(e);if(65!==u.length)throw new Error("invalid signature");i=h(u.slice(0,32)),o=h(u.slice(32,64)),27!==(r=u[64])&&28!==r&&(r=27+r%2)}return{r:i,s:o,recoveryParam:r-27,v:r}}r.hexlify=h,r.hexDataLength=function(e){return c(e)&&e.length%2==0?(e.length-2)/2:null},r.hexDataSlice=function(e,t,r){return c(e)||n.throwError("invalid hex data",n.INVALID_ARGUMENT,{arg:"value",value:e}),e.length%2!=0&&n.throwError("hex data length must be even",n.INVALID_ARGUMENT,{arg:"value",value:e}),t=2+2*t,null!=r?"0x"+e.substring(t,t+2*r):"0x"+e.substring(t)},r.hexStripZeros=function(e){for(c(e)||n.throwError("invalid hex string",n.INVALID_ARGUMENT,{arg:"value",value:e});e.length>3&&"0x0"===e.substring(0,3);)e="0x"+e.substring(3);return e},r.hexZeroPad=l,r.splitSignature=d,r.joinSignature=function(e){return h(u([(e=d(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},{"./errors":147}],147:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.MISSING_NEW="MISSING_NEW",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.NUMERIC_FAULT="NUMERIC_FAULT",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION";var n=!1,i=!1;function o(e,t,n){if(i)throw new Error("unknown error");t||(t=r.UNKNOWN_ERROR),n||(n={});var o=[];Object.keys(n).forEach(function(e){try{o.push(e+"="+JSON.stringify(n[e]))}catch(t){o.push(e+"="+JSON.stringify(n[e].toString()))}});var a=e;o.length&&(e+=" ("+o.join(", ")+")");var s=new Error(e);throw s.reason=a,s.code=t,Object.keys(n).forEach(function(e){s[e]=n[e]}),s}r.throwError=o,r.checkNew=function(e,t){e instanceof t||o("missing new",r.MISSING_NEW,{name:t.name})},r.checkArgumentCount=function(e,t,n){n||(n=""),et&&o("too many arguments"+n,r.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})},r.setCensorship=function(e,t){n&&o("error censorship permanent",r.UNSUPPORTED_OPERATION,{operation:"setCersorship"}),i=!!e,n=!!t}},{}],148:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("js-sha3"),i=e("./bytes");r.keccak256=function(e){return"0x"+n.keccak_256(i.arrayify(e))}},{"./bytes":146,"js-sha3":142}],149:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.defineReadOnly=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})},r.defineFrozen=function(e,t,r){var n=JSON.stringify(r);Object.defineProperty(e,t,{enumerable:!0,get:function(){return JSON.parse(n)}})},r.resolveProperties=function(e){var t={},r=[];return Object.keys(e).forEach(function(n){var i=e[n];i instanceof Promise?r.push(i.then(function(e){return t[n]=e,null})):t[n]=i}),Promise.all(r).then(function(){return t})},r.shallowCopy=function(e){var t={};for(var r in e)t[r]=e[r];return t},r.jsonCopy=function(e){return JSON.parse(JSON.stringify(e))}},{}],150:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./bytes");function i(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function o(e,t,r){for(var n=0,i=0;it+1+n)throw new Error("invalid rlp")}return{consumed:1+n,result:i}}function s(e,t){if(0===e.length)throw new Error("invalid rlp data");if(e[t]>=248){if(t+1+(r=e[t]-247)>e.length)throw new Error("too short");if(t+1+r+(i=o(e,t+1,r))>e.length)throw new Error("to short");return a(e,t,t+1+r,r+i)}if(e[t]>=192){if(t+1+(i=e[t]-192)>e.length)throw new Error("invalid rlp data");return a(e,t,t+1,i)}if(e[t]>=184){var r;if(t+1+(r=e[t]-183)>e.length)throw new Error("invalid rlp data");if(t+1+r+(i=o(e,t+1,r))>e.length)throw new Error("invalid rlp data");return{consumed:1+r+i,result:n.hexlify(e.slice(t+1+r,t+1+r+i))}}if(e[t]>=128){var i;if(t+1+(i=e[t]-128)>e.length)throw new Error("invlaid rlp data");return{consumed:1+i,result:n.hexlify(e.slice(t+1,t+1+i))}}return{consumed:1,result:n.hexlify(e[t])}}r.encode=function(e){return n.hexlify(function e(t){if(Array.isArray(t)){var r=[];return t.forEach(function(t){r=r.concat(e(t))}),r.length<=55?(r.unshift(192+r.length),r):((o=i(r.length)).unshift(247+o.length),o.concat(r))}var o,a=Array.prototype.slice.call(n.arrayify(t));return 1===a.length&&a[0]<=127?a:a.length<=55?(a.unshift(128+a.length),a):((o=i(a.length)).unshift(183+o.length),o.concat(a))}(e))},r.decode=function(e){var t=n.arrayify(e),r=s(t,0);if(r.consumed!==t.length)throw new Error("invalid rlp data");return r.result}},{"./bytes":146}],151:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){return function(){}}();r.BigNumber=n;var i=function(){return function(){}}();r.Indexed=i;var o=function(){return function(){}}();r.MinimalProvider=o;var a=function(){return function(){}}();r.Signer=a;var s=function(){return function(){}}();r.HDNode=s},{}],152:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("./bytes");!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n=r.UnicodeNormalizationForm||(r.UnicodeNormalizationForm={})),r.toUtf8Bytes=function(e,t){void 0===t&&(t=n.current),t!=n.current&&(e=e.normalize(t));for(var r=[],o=0,a=0;a>6|192,r[o++]=63&s|128):55296==(64512&s)&&a+1>18|240,r[o++]=s>>12&63|128,r[o++]=s>>6&63|128,r[o++]=63&s|128):(r[o++]=s>>12|224,r[o++]=s>>6&63|128,r[o++]=63&s|128)}return i.arrayify(r)},r.toUtf8String=function(e){e=i.arrayify(e);for(var t="",r=0;r>7!=0){if(n>>6!=2){var o=null;if(n>>5==6)o=1;else if(n>>4==14)o=2;else if(n>>3==30)o=3;else if(n>>2==62)o=4;else{if(n>>1!=126)continue;o=5}if(r+o>e.length){for(;r>6==2;r++);if(r!=e.length)continue;return t}var a,s=n&(1<<8-o-1)-1;for(a=0;a>6!=2)break;s=s<<6|63&u}a==o?s<=65535?t+=String.fromCharCode(s):(s-=65536,t+=String.fromCharCode(55296+(s>>10&1023),56320+(1023&s))):r--}}else t+=String.fromCharCode(n)}return t}},{"./bytes":146}],153:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("number-to-bn"),o=new n(0),a=new n(-1),s={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function u(e){var t=e?e.toLowerCase():"ether",r=s[t];if("string"!=typeof r)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(s,null,2));return new n(r,10)}function c(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"==typeof e&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+typeof e+".")}t.exports={unitMap:s,numberToString:c,getValueOfUnit:u,fromWei:function(e,t,r){var n=i(e),c=n.lt(o),f=u(t),h=s[t].length-1||1,l=r||{};c&&(n=n.mul(a));for(var d=n.mod(f).toString(10);d.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var l=h[0],d=h[1];if(l||(l="0"),d||(d="0"),d.length>o)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;d.length=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+h)/67108864|0,h=67108863&a}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?b+r:c[l-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,b=d>>>13,y=0|a[2],m=8191&y,v=y>>>13,g=0|a[3],w=8191&g,_=g>>>13,A=0|a[4],E=8191&A,x=A>>>13,k=0|a[5],S=8191&k,M=k>>>13,I=0|a[6],T=8191&I,U=I>>>13,j=0|a[7],B=8191&j,P=j>>>13,C=0|a[8],N=8191&C,R=C>>>13,L=0|a[9],O=8191&L,D=L>>>13,F=0|s[0],q=8191&F,H=F>>>13,z=0|s[1],K=8191&z,V=z>>>13,G=0|s[2],W=8191&G,Y=G>>>13,X=0|s[3],Z=8191&X,J=X>>>13,$=0|s[4],Q=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,be=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,H))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,H))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,H))+Math.imul(b,q)|0,o=Math.imul(b,H);var me=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,q),i=(i=Math.imul(m,H))+Math.imul(v,q)|0,o=Math.imul(v,H),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0;var ve=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,W)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,H))+Math.imul(_,q)|0,o=Math.imul(_,H),n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0;var ge=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(l,Z)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,H))+Math.imul(x,q)|0,o=Math.imul(x,H),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Y)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,H))+Math.imul(M,q)|0,o=Math.imul(M,H),n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,H))+Math.imul(U,q)|0,o=Math.imul(U,H),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Ae=(c+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ae)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,H))+Math.imul(P,q)|0,o=Math.imul(P,H),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(U,K)|0,o=o+Math.imul(U,V)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Ee=(c+(n=n+Math.imul(h,ue)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,H))+Math.imul(R,q)|0,o=Math.imul(R,H),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,V)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Y)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0;var xe=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,le)|0)+Math.imul(l,he)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,H))+Math.imul(D,q)|0,o=Math.imul(D,H),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(U,Z)|0,o=o+Math.imul(U,J)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,le)|0;var ke=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,be)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(O,K),i=(i=Math.imul(O,V))+Math.imul(D,K)|0,o=Math.imul(D,V),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(m,he)|0,i=(i=i+Math.imul(m,le)|0)+Math.imul(v,he)|0,o=o+Math.imul(v,le)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(O,W),i=(i=Math.imul(O,Y))+Math.imul(D,W)|0,o=Math.imul(D,Y),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(U,re)|0,o=o+Math.imul(U,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,le)|0;var Me=(c+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(O,Z),i=(i=Math.imul(O,J))+Math.imul(D,Z)|0,o=Math.imul(D,J),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(U,oe)|0,o=o+Math.imul(U,ae)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(E,he)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,le)|0;var Ie=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(O,Q),i=(i=Math.imul(O,ee))+Math.imul(D,Q)|0,o=Math.imul(D,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(U,ue)|0,o=o+Math.imul(U,ce)|0,n=n+Math.imul(S,he)|0,i=(i=i+Math.imul(S,le)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,le)|0;var Te=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(O,re),i=(i=Math.imul(O,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(T,he)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(U,he)|0,o=o+Math.imul(U,le)|0;var Ue=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,be)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,be)|0)+(i>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(O,oe),i=(i=Math.imul(O,ae))+Math.imul(D,oe)|0,o=Math.imul(D,ae),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(B,he)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(P,he)|0,o=o+Math.imul(P,le)|0;var je=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(U,pe)|0))<<13)|0;c=((o=o+Math.imul(U,be)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(O,ue),i=(i=Math.imul(O,ce))+Math.imul(D,ue)|0,o=Math.imul(D,ce),n=n+Math.imul(N,he)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(R,he)|0,o=o+Math.imul(R,le)|0;var Be=(c+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,be)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,be)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(O,he),i=(i=Math.imul(O,le))+Math.imul(D,he)|0,o=Math.imul(D,le);var Pe=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,be)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ce=(c+(n=Math.imul(O,pe))|0)+((8191&(i=(i=Math.imul(O,be))+Math.imul(D,pe)|0))<<13)|0;return c=((o=Math.imul(D,be))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,u[0]=ye,u[1]=me,u[2]=ve,u[3]=ge,u[4]=we,u[5]=_e,u[6]=Ae,u[7]=Ee,u[8]=xe,u[9]=ke,u[10]=Se,u[11]=Me,u[12]=Ie,u[13]=Te,u[14]=Ue,u[15]=je,u[16]=Be,u[17]=Pe,u[18]=Ce,0!==c&&(u[19]=c,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(d=l),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):r<63?l(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=t.clone();!t.isZero();){for(var l=0,d=1;0==(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function g(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(v,m),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new g;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var b=d,y=0;0!==b.cmp(s);y++)b=b.redSqr();n(y=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,A),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{}],155:[function(e,t,r){(function(r){"use strict";var n=e("is-hex-prefixed"),i=e("strip-hex-prefix");function o(e){var t=e;if("string"!=typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function a(e){return"0x"+e.toString(16)}t.exports={arrayContainsArray:function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(r)?"some":"every"](function(t){return e.indexOf(t)>=0})},intToBuffer:function(e){var t=a(e);return new r(o(t.slice(2)),"hex")},getBinarySize:function(e){if("string"!=typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return r.byteLength(e,"utf8")},isHexPrefixed:n,stripHexPrefix:i,padToEven:o,intToHex:a,fromAscii:function(e){for(var t="",r=0;r0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var r,n,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(r=this._events[e]).length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(s=a;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],158:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("md5.js");t.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var f=new i;f.update(c),f.update(e),t&&f.update(t),c=f.digest();var h=0;if(a>0){var l=s.length-a;h=Math.min(a,c.length),c.copy(s,l,0,h),a-=h}if(h0){var d=u.length-o,p=Math.min(o,c.length-h);c.copy(u,d,h,h+p),o-=p}}return c.fill(0),{key:s,iv:u}}},{"md5.js":231,"safe-buffer":290}],159:[function(e,t,r){"use strict";var n=e("is-callable"),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},i.prototype._update=function(e){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i}).call(this,e("buffer").Buffer)},{buffer:84,inherits:180,stream:311}],162:[function(e,t,r){var n=r;n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":163,"./hash/hmac":164,"./hash/ripemd":165,"./hash/sha":166,"./hash/utils":173}],163:[function(e,t,r){"use strict";var n=e("./utils"),i=e("minimalistic-assert");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}r.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3},r.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},{"../utils":173}],173:[function(e,t,r){"use strict";var n=e("minimalistic-assert"),i=e("inherits");function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,a=255&i;o?r.push(o,a):r.push(a)}else for(n=0;n>>0}return a},r.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},r.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},r.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},r.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},r.sum64_lo=function(e,t,r,n){return t+n>>>0},r.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)>>0)>>0)>>0},r.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},r.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var f=0,h=t;return f+=(h=h+n>>>0)>>0)>>0)>>0)>>0},r.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:180,"minimalistic-assert":234}],174:[function(e,t,r){"use strict";var n=e("hash.js"),i=e("minimalistic-crypto-utils"),o=e("minimalistic-assert");function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}t.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length\\$%@ءؤة\"'^|~⦅⦆・ゥャ¢£¬¦¥₩│←↑→↓■○𐐨𐐩𐐪𐐫𐐬𐐭𐐮𐐯𐐰𐐱𐐲𐐳𐐴𐐵𐐶𐐷𐐸𐐹𐐺𐐻𐐼𐐽𐐾𐐿𐑀𐑁𐑂𐑃𐑄𐑅𐑆𐑇𐑈𐑉𐑊𐑋𐑌𐑍𐑎𐑏𐓘𐓙𐓚𐓛𐓜𐓝𐓞𐓟𐓠𐓡𐓢𐓣𐓤𐓥𐓦𐓧𐓨𐓩𐓪𐓫𐓬𐓭𐓮𐓯𐓰𐓱𐓲𐓳𐓴𐓵𐓶𐓷𐓸𐓹𐓺𐓻𐳀𐳁𐳂𐳃𐳄𐳅𐳆𐳇𐳈𐳉𐳊𐳋𐳌𐳍𐳎𐳏𐳐𐳑𐳒𐳓𐳔𐳕𐳖𐳗𐳘𐳙𐳚𐳛𐳜𐳝𐳞𐳟𐳠𐳡𐳢𐳣𐳤𐳥𐳦𐳧𐳨𐳩𐳪𐳫𐳬𐳭𐳮𐳯𐳰𐳱𐳲𑣀𑣁𑣂𑣃𑣄𑣅𑣆𑣇𑣈𑣉𑣊𑣋𑣌𑣍𑣎𑣏𑣐𑣑𑣒𑣓𑣔𑣕𑣖𑣗𑣘𑣙𑣚𑣛𑣜𑣝𑣞𑣟ıȷ∇∂𞤢𞤣𞤤𞤥𞤦𞤧𞤨𞤩𞤪𞤫𞤬𞤭𞤮𞤯𞤰𞤱𞤲𞤳𞤴𞤵𞤶𞤷𞤸𞤹𞤺𞤻𞤼𞤽𞤾𞤿𞥀𞥁𞥂𞥃ٮڡٯ字双多解交映無前後再新初終販声吹演投捕遊指禁空合満申割営配得可丽丸乁𠄢你侻倂偺備像㒞𠘺兔兤具𠔜㒹內𠕋冗冤仌冬𩇟刃㓟刻剆剷㔕包匆卉博即卽卿𠨬灰及叟𠭣叫叱吆咞吸呈周咢哶唐啓啣善喫喳嗂圖圗噑噴壮城埴堍型堲報墬𡓤売壷夆夢奢𡚨𡛪姬娛娧姘婦㛮嬈嬾𡧈寃寘寳𡬘寿将㞁屠峀岍𡷤嵃𡷦嵮嵫嵼巡巢㠯巽帨帽幩㡢𢆃㡼庰庳庶𪎒𢌱舁弢㣇𣊸𦇚形彫㣣徚忍志忹悁㤺㤜𢛔惇慈慌慺憲憤憯懞戛扝抱拔捐𢬌挽拼捨掃揤𢯱搢揅掩㨮摩摾撝摷㩬敬𣀊旣書晉㬙㬈㫤冒冕最暜肭䏙朡杞杓𣏃㭉柺枅桒𣑭梎栟椔楂榣槪檨𣚣櫛㰘次𣢧歔㱎歲殟殻𣪍𡴋𣫺汎𣲼沿泍汧洖派浩浸涅𣴞洴港湮㴳滇𣻑淹潮𣽞𣾎濆瀹瀛㶖灊災灷炭𠔥煅𤉣熜爨牐𤘈犀犕𤜵𤠔獺王㺬玥㺸瑇瑜璅瓊㼛甤𤰶甾𤲒𢆟瘐𤾡𤾸𥁄㿼䀈𥃳𥃲𥄙𥄳眞真瞋䁆䂖𥐝硎䃣𥘦𥚚𥛅秫䄯穊穏𥥼𥪧䈂𥮫篆築䈧𥲀糒䊠糨糣紀𥾆絣䌁緇縂繅䌴𦈨𦉇䍙𦋙罺𦌾羕翺𦓚𦔣聠𦖨聰𣍟䏕育脃䐋脾媵𦞧𦞵𣎓𣎜舄辞䑫芑芋芝劳花芳芽苦𦬼茝荣莭茣莽菧荓菊菌菜𦰶𦵫𦳕䔫蓱蓳蔖𧏊蕤𦼬䕝䕡𦾱𧃒䕫虐虧虩蚩蚈蜎蛢蜨蝫螆蟡蠁䗹衠𧙧裗裞䘵裺㒻𧢮𧥦䚾䛇誠𧲨貫賁贛起𧼯𠠄跋趼跰𠣞軔𨗒𨗭邔郱鄑𨜮鄛鈸鋗鋘鉼鏹鐕𨯺開䦕閷𨵷䧦雃嶲霣𩅅𩈚䩮䩶韠𩐊䪲𩒖頩𩖶飢䬳餩馧駂駾䯎𩬰鱀鳽䳎䳭鵧𪃎䳸𪄅𪈎𪊑䵖黾鼅鼏鼖𪘀",mapChar:function(r){return r>=196608?r>=917760&&r<=917999?18874368:0:e[t[r>>4]][15&r]}}},"function"==typeof define&&define.amd?define([],function(){return i()}):"object"==typeof r?t.exports=i():n.uts46_map=i()},{}],177:[function(e,t,r){var n,i;n=this,i=function(e,t){function r(r,n,i){for(var o=[],a=e.ucs2.decode(r),s=0;s>23,l=f>>21&3,d=f>>5&65535,p=31&f,b=t.mapStr.substr(d,p);if(0===l||n&&1&h)throw new Error("Illegal char "+c);1===l?o.push(b):2===l?o.push(i?b:c):3===l&&o.push(c)}return o.join("").normalize("NFC")}function n(t,n,o){void 0===o&&(o=!1);var a=r(t,o,n).split(".");return(a=a.map(function(t){return t.startsWith("xn--")?i(t=e.decode(t.substring(4)),o,!1):i(t,o,n),t})).join(".")}function i(e,n,i){if("-"===e[2]&&"-"===e[3])throw new Error("Failed to validate "+e);if(e.startsWith("-")||e.endsWith("-"))throw new Error("Failed to validate "+e);if(e.includes("."))throw new Error("Failed to validate "+e);if(r(e,n,i)!==e)throw new Error("Failed to validate "+e);var o=e.codePointAt(0);if(t.mapChar(o)&2<<23)throw new Error("Label contains illegal character: "+o)}return{toUnicode:function(e,t){return void 0===t&&(t={}),n(e,!1,"useStd3ASCII"in t&&t.useStd3ASCII)},toAscii:function(t,r){void 0===r&&(r={});var i,o=!("transitional"in r)||r.transitional,a="useStd3ASCII"in r&&r.useStd3ASCII,s="verifyDnsLength"in r&&r.verifyDnsLength,u=n(t,o,a).split(".").map(e.toASCII),c=u.join(".");if(s){if(c.length<1||c.length>253)throw new Error("DNS name has wrong length: "+c);for(i=0;i63)throw new Error("DNS label has wrong length: "+f)}}return c}}},"function"==typeof define&&define.amd?define(["punycode","./idna-map"],function(e,t){return i(e,t)}):"object"==typeof r?t.exports=i(e("punycode"),e("./idna-map")):n.uts46=i(n.punycode,n.idna_map)},{"./idna-map":176,punycode:265}],178:[function(e,t,r){r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,f=-7,h=r?i-1:0,l=r?-1:1,d=e[t+h];for(h+=l,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+e[t+h],h+=l,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+h],h+=l,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=f?(s=0,a=f):a+h>=1?(s=(t*u-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*b}},{}],179:[function(e,t,r){var n=[].indexOf;t.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r-32e3)throw new Error("Invalid error code");if(!(this instanceof f))return new f(e);i.call(this,"Server error",e)};n(f,i),i.ParseError=o,i.InvalidRequest=a,i.MethodNotFound=s,i.InvalidParams=u,i.InternalError=c,i.ServerError=f,t.exports=i},{inherits:180}],191:[function(e,t,r){t.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==e.start?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}},{}],192:[function(e,t,r){r.parse=e("./lib/parse"),r.stringify=e("./lib/stringify")},{"./lib/parse":193,"./lib/stringify":194}],193:[function(e,t,r){var n,i,o,a,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},u=function(e){throw{name:"SyntaxError",message:e,at:n,text:o}},c=function(e){return e&&e!==i&&u("Expected '"+e+"' instead of '"+i+"'"),i=o.charAt(n),n+=1,i},f=function(){var e,t="";for("-"===i&&(t="-",c("-"));i>="0"&&i<="9";)t+=i,c();if("."===i)for(t+=".";c()&&i>="0"&&i<="9";)t+=i;if("e"===i||"E"===i)for(t+=i,c(),"-"!==i&&"+"!==i||(t+=i,c());i>="0"&&i<="9";)t+=i,c();if(e=+t,isFinite(e))return e;u("Bad number")},h=function(){var e,t,r,n="";if('"'===i)for(;c();){if('"'===i)return c(),n;if("\\"===i)if(c(),"u"===i){for(r=0,t=0;t<4&&(e=parseInt(c(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!=typeof s[i])break;n+=s[i]}else n+=i}u("Bad string")},l=function(){for(;i&&i<=" ";)c()};a=function(){switch(l(),i){case"{":return function(){var e,t={};if("{"===i){if(c("{"),l(),"}"===i)return c("}"),t;for(;i;){if(e=h(),l(),c(":"),Object.hasOwnProperty.call(t,e)&&u('Duplicate key "'+e+'"'),t[e]=a(),l(),"}"===i)return c("}"),t;c(","),l()}}u("Bad object")}();case"[":return function(){var e=[];if("["===i){if(c("["),l(),"]"===i)return c("]"),e;for(;i;){if(e.push(a()),l(),"]"===i)return c("]"),e;c(","),l()}}u("Bad array")}();case'"':return h();case"-":return f();default:return i>="0"&&i<="9"?f():function(){switch(i){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null}u("Unexpected '"+i+"'")}()}},t.exports=function(e,t){var r;return o=e,n=0,i=" ",r=a(),l(),i&&u("Syntax error"),"function"==typeof t?function e(r,n){var i,o,a=r[n];if(a&&"object"==typeof a)for(i in a)Object.prototype.hasOwnProperty.call(a,i)&&(void 0!==(o=e(a,i))?a[i]=o:delete a[i]);return t.call(r,n,a)}({"":r},""):r}},{}],194:[function(e,t,r){var n,i,o,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function u(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}t.exports=function(e,t,r){var a;if(n="",i="","number"==typeof r)for(a=0;a>>31),p=l^(a<<1|o>>>31),b=e[0]^d,y=e[1]^p,m=e[10]^d,v=e[11]^p,g=e[20]^d,w=e[21]^p,_=e[30]^d,A=e[31]^p,E=e[40]^d,x=e[41]^p;d=r^(s<<1|u>>>31),p=i^(u<<1|s>>>31);var k=e[2]^d,S=e[3]^p,M=e[12]^d,I=e[13]^p,T=e[22]^d,U=e[23]^p,j=e[32]^d,B=e[33]^p,P=e[42]^d,C=e[43]^p;d=o^(c<<1|f>>>31),p=a^(f<<1|c>>>31);var N=e[4]^d,R=e[5]^p,L=e[14]^d,O=e[15]^p,D=e[24]^d,F=e[25]^p,q=e[34]^d,H=e[35]^p,z=e[44]^d,K=e[45]^p;d=s^(h<<1|l>>>31),p=u^(l<<1|h>>>31);var V=e[6]^d,G=e[7]^p,W=e[16]^d,Y=e[17]^p,X=e[26]^d,Z=e[27]^p,J=e[36]^d,$=e[37]^p,Q=e[46]^d,ee=e[47]^p;d=c^(r<<1|i>>>31),p=f^(i<<1|r>>>31);var te=e[8]^d,re=e[9]^p,ne=e[18]^d,ie=e[19]^p,oe=e[28]^d,ae=e[29]^p,se=e[38]^d,ue=e[39]^p,ce=e[48]^d,fe=e[49]^p,he=b,le=y,de=v<<4|m>>>28,pe=m<<4|v>>>28,be=g<<3|w>>>29,ye=w<<3|g>>>29,me=A<<9|_>>>23,ve=_<<9|A>>>23,ge=E<<18|x>>>14,we=x<<18|E>>>14,_e=k<<1|S>>>31,Ae=S<<1|k>>>31,Ee=I<<12|M>>>20,xe=M<<12|I>>>20,ke=T<<10|U>>>22,Se=U<<10|T>>>22,Me=B<<13|j>>>19,Ie=j<<13|B>>>19,Te=P<<2|C>>>30,Ue=C<<2|P>>>30,je=R<<30|N>>>2,Be=N<<30|R>>>2,Pe=L<<6|O>>>26,Ce=O<<6|L>>>26,Ne=F<<11|D>>>21,Re=D<<11|F>>>21,Le=q<<15|H>>>17,Oe=H<<15|q>>>17,De=K<<29|z>>>3,Fe=z<<29|K>>>3,qe=V<<28|G>>>4,He=G<<28|V>>>4,ze=Y<<23|W>>>9,Ke=W<<23|Y>>>9,Ve=X<<25|Z>>>7,Ge=Z<<25|X>>>7,We=J<<21|$>>>11,Ye=$<<21|J>>>11,Xe=ee<<24|Q>>>8,Ze=Q<<24|ee>>>8,Je=te<<27|re>>>5,$e=re<<27|te>>>5,Qe=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,nt=se<<8|ue>>>24,it=ue<<8|se>>>24,ot=ce<<14|fe>>>18,at=fe<<14|ce>>>18;e[0]=he^~Ee&Ne,e[1]=le^~xe&Re,e[10]=qe^~Qe&be,e[11]=He^~et&ye,e[20]=_e^~Pe&Ve,e[21]=Ae^~Ce&Ge,e[30]=Je^~de&ke,e[31]=$e^~pe&Se,e[40]=je^~ze&tt,e[41]=Be^~Ke&rt,e[2]=Ee^~Ne&We,e[3]=xe^~Re&Ye,e[12]=Qe^~be&Me,e[13]=et^~ye&Ie,e[22]=Pe^~Ve&nt,e[23]=Ce^~Ge&it,e[32]=de^~ke&Le,e[33]=pe^~Se&Oe,e[42]=ze^~tt&me,e[43]=Ke^~rt&ve,e[4]=Ne^~We&ot,e[5]=Re^~Ye&at,e[14]=be^~Me&De,e[15]=ye^~Ie&Fe,e[24]=Ve^~nt&ge,e[25]=Ge^~it&we,e[34]=ke^~Le&Xe,e[35]=Se^~Oe&Ze,e[44]=tt^~me&Te,e[45]=rt^~ve&Ue,e[6]=We^~ot&he,e[7]=Ye^~at&le,e[16]=Me^~De&qe,e[17]=Ie^~Fe&He,e[26]=nt^~ge&_e,e[27]=it^~we&Ae,e[36]=Le^~Xe&Je,e[37]=Oe^~Ze&$e,e[46]=me^~Te&je,e[47]=ve^~Ue&Be,e[8]=ot^~he&Ee,e[9]=at^~le&xe,e[18]=De^~qe&Qe,e[19]=Fe^~He&et,e[28]=ge^~_e&Pe,e[29]=we^~Ae&Ce,e[38]=Xe^~Je&de,e[39]=Ze^~$e&pe,e[48]=Te^~je&ze,e[49]=Ue^~Be&Ke,e[0]^=n[2*t],e[1]^=n[2*t+1]}}},{}],200:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("./keccak-state-unroll");function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(e){for(var t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return t},o.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},t.exports=o},{"./keccak-state-unroll":199,"safe-buffer":290}],201:[function(e,t,r){var n=e("./_root").Symbol;t.exports=n},{"./_root":217}],202:[function(e,t,r){var n=e("./_baseTimes"),i=e("./isArguments"),o=e("./isArray"),a=e("./isBuffer"),s=e("./_isIndex"),u=e("./isTypedArray"),c=Object.prototype.hasOwnProperty;t.exports=function(e,t){var r=o(e),f=!r&&i(e),h=!r&&!f&&a(e),l=!r&&!f&&!h&&u(e),d=r||f||h||l,p=d?n(e.length,String):[],b=p.length;for(var y in e)!t&&!c.call(e,y)||d&&("length"==y||h&&("offset"==y||"parent"==y)||l&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,b))||p.push(y);return p}},{"./_baseTimes":207,"./_isIndex":211,"./isArguments":219,"./isArray":220,"./isBuffer":222,"./isTypedArray":227}],203:[function(e,t,r){var n=e("./_Symbol"),i=e("./_getRawTag"),o=e("./_objectToString"),a="[object Null]",s="[object Undefined]",u=n?n.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?s:a:u&&u in Object(e)?i(e):o(e)}},{"./_Symbol":201,"./_getRawTag":210,"./_objectToString":215}],204:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObjectLike"),o="[object Arguments]";t.exports=function(e){return i(e)&&n(e)==o}},{"./_baseGetTag":203,"./isObjectLike":226}],205:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isLength"),o=e("./isObjectLike"),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(e){return o(e)&&i(e.length)&&!!a[n(e)]}},{"./_baseGetTag":203,"./isLength":224,"./isObjectLike":226}],206:[function(e,t,r){var n=e("./_isPrototype"),i=e("./_nativeKeys"),o=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},{"./_isPrototype":212,"./_nativeKeys":213}],207:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=Array(e);++r-1&&e%1==0&&e-1&&e%1==0&&e<=n}},{}],225:[function(e,t,r){t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},{}],226:[function(e,t,r){t.exports=function(e){return null!=e&&"object"==typeof e}},{}],227:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),o=e("./_nodeUtil"),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},{"./_baseIsTypedArray":205,"./_baseUnary":208,"./_nodeUtil":214}],228:[function(e,t,r){var n=e("./_arrayLikeKeys"),i=e("./_baseKeys"),o=e("./isArrayLike");t.exports=function(e){return o(e)?n(e):i(e)}},{"./_arrayLikeKeys":202,"./_baseKeys":206,"./isArrayLike":221}],229:[function(e,t,r){t.exports=function(){}},{}],230:[function(e,t,r){t.exports=function(){return!1}},{}],231:[function(e,t,r){(function(r){"use strict";var n=e("inherits"),i=e("hash-base"),o=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(e,t){return e<>>32-t}function u(e,t,r,n,i,o,a){return s(e+(t&r|~t&n)+i+o|0,a)+t|0}function c(e,t,r,n,i,o,a){return s(e+(t&n|r&~n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return s(e+(t^r^n)+i+o|0,a)+t|0}function h(e,t,r,n,i,o,a){return s(e+(r^(t|~n))+i+o|0,a)+t|0}n(a,i),a.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,a=this._d;n=h(n=h(n=h(n=h(n=f(n=f(n=f(n=f(n=c(n=c(n=c(n=c(n=u(n=u(n=u(n=u(n,i=u(i,a=u(a,r=u(r,n,i,a,e[0],3614090360,7),n,i,e[1],3905402710,12),r,n,e[2],606105819,17),a,r,e[3],3250441966,22),i=u(i,a=u(a,r=u(r,n,i,a,e[4],4118548399,7),n,i,e[5],1200080426,12),r,n,e[6],2821735955,17),a,r,e[7],4249261313,22),i=u(i,a=u(a,r=u(r,n,i,a,e[8],1770035416,7),n,i,e[9],2336552879,12),r,n,e[10],4294925233,17),a,r,e[11],2304563134,22),i=u(i,a=u(a,r=u(r,n,i,a,e[12],1804603682,7),n,i,e[13],4254626195,12),r,n,e[14],2792965006,17),a,r,e[15],1236535329,22),i=c(i,a=c(a,r=c(r,n,i,a,e[1],4129170786,5),n,i,e[6],3225465664,9),r,n,e[11],643717713,14),a,r,e[0],3921069994,20),i=c(i,a=c(a,r=c(r,n,i,a,e[5],3593408605,5),n,i,e[10],38016083,9),r,n,e[15],3634488961,14),a,r,e[4],3889429448,20),i=c(i,a=c(a,r=c(r,n,i,a,e[9],568446438,5),n,i,e[14],3275163606,9),r,n,e[3],4107603335,14),a,r,e[8],1163531501,20),i=c(i,a=c(a,r=c(r,n,i,a,e[13],2850285829,5),n,i,e[2],4243563512,9),r,n,e[7],1735328473,14),a,r,e[12],2368359562,20),i=f(i,a=f(a,r=f(r,n,i,a,e[5],4294588738,4),n,i,e[8],2272392833,11),r,n,e[11],1839030562,16),a,r,e[14],4259657740,23),i=f(i,a=f(a,r=f(r,n,i,a,e[1],2763975236,4),n,i,e[4],1272893353,11),r,n,e[7],4139469664,16),a,r,e[10],3200236656,23),i=f(i,a=f(a,r=f(r,n,i,a,e[13],681279174,4),n,i,e[0],3936430074,11),r,n,e[3],3572445317,16),a,r,e[6],76029189,23),i=f(i,a=f(a,r=f(r,n,i,a,e[9],3654602809,4),n,i,e[12],3873151461,11),r,n,e[15],530742520,16),a,r,e[2],3299628645,23),i=h(i,a=h(a,r=h(r,n,i,a,e[0],4096336452,6),n,i,e[7],1126891415,10),r,n,e[14],2878612391,15),a,r,e[5],4237533241,21),i=h(i,a=h(a,r=h(r,n,i,a,e[12],1700485571,6),n,i,e[3],2399980690,10),r,n,e[10],4293915773,15),a,r,e[1],2240044497,21),i=h(i,a=h(a,r=h(r,n,i,a,e[8],1873313359,6),n,i,e[15],4264355552,10),r,n,e[6],2734768916,15),a,r,e[13],1309151649,21),i=h(i,a=h(a,r=h(r,n,i,a,e[4],4149444226,6),n,i,e[11],3174756917,10),r,n,e[2],718787259,15),a,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+a|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new r(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=a}).call(this,e("buffer").Buffer)},{buffer:84,"hash-base":232,inherits:180}],232:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("stream").Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},{inherits:180,"safe-buffer":290,stream:311}],233:[function(e,t,r){var n=e("bn.js"),i=e("brorand");function o(e){this.rand=e||new i.Rand}t.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var c=e.shrn(u),f=s.toRed(o);t>0;t--){var h=this._randrange(new n(2),s);r&&r(h);var l=h.toRed(o).redPow(c);if(0!==l.cmp(a)&&0!==l.cmp(f)){for(var d=1;d0;t--){var f=this._randrange(new n(2),a),h=e.gcd(f);if(0!==h.cmpn(1))return h;var l=f.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(c)){for(var d=1;d>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},{}],236:[function(e,t,r){arguments[4][154][0].apply(r,arguments)},{dup:154}],237:[function(e,t,r){var n=e("bn.js"),i=e("strip-hex-prefix");t.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new n(1),r=String(e).toLowerCase().trim(),o="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),a=i(r);if("-"===a.substr(0,1)&&(a=i(a.slice(1)),t=new n(-1,10)),!(a=""===a?"0":a).match(/^-?[0-9]+$/)&&a.match(/^[0-9A-Fa-f]+$/)||a.match(/^[a-fA-F]+$/)||!0===o&&a.match(/^[0-9A-Fa-f]+$/))return new n(a,16).mul(t);if((a.match(/^-?[0-9]+$/)||""===a)&&!1===o)return new n(a,10).mul(t)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new n(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},{"bn.js":236,"strip-hex-prefix":318}],238:[function(e,t,r){"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u0;)if(q+=r,r=e.charAt(o++),4===H?(N+=String.fromCharCode(parseInt(q,16)),H=0,c=o-1):H++,!r)break e;if('"'===r&&!L){D=F.pop()||p,N+=e.substring(c,o-1);break}if(!("\\"!==r||L||(L=!0,N+=e.substring(c,o-1),r=e.charAt(o++))))break;if(L){if(L=!1,"n"===r?N+="\n":"r"===r?N+="\r":"t"===r?N+="\t":"f"===r?N+="\f":"b"===r?N+="\b":"u"===r?(H=1,q=""):N+=r,r=e.charAt(o++),c=o-1,r)continue;break}h.lastIndex=o;var l=h.exec(e);if(!l){o=e.length+1,N+=e.substring(c,o-1);break}if(o=l.index+1,!(r=e.charAt(l.index))){N+=e.substring(c,o-1);break}}continue;case A:if(!r)continue;if("r"!==r)return W("Invalid true started with t"+r);D=E;continue;case E:if(!r)continue;if("u"!==r)return W("Invalid true started with tr"+r);D=x;continue;case x:if(!r)continue;if("e"!==r)return W("Invalid true started with tru"+r);a(!0),u(),D=F.pop()||p;continue;case k:if(!r)continue;if("a"!==r)return W("Invalid false started with f"+r);D=S;continue;case S:if(!r)continue;if("l"!==r)return W("Invalid false started with fa"+r);D=M;continue;case M:if(!r)continue;if("s"!==r)return W("Invalid false started with fal"+r);D=I;continue;case I:if(!r)continue;if("e"!==r)return W("Invalid false started with fals"+r);a(!1),u(),D=F.pop()||p;continue;case T:if(!r)continue;if("u"!==r)return W("Invalid null started with n"+r);D=U;continue;case U:if(!r)continue;if("l"!==r)return W("Invalid null started with nu"+r);D=j;continue;case j:if(!r)continue;if("l"!==r)return W("Invalid null started with nul"+r);a(null),u(),D=F.pop()||p;continue;case B:if("."!==r)return W("Leading zero not followed by .");R+=r,D=P;continue;case P:if(-1!=="0123456789".indexOf(r))R+=r;else if("."===r){if(-1!==R.indexOf("."))return W("Invalid number has two dots");R+=r}else if("e"===r||"E"===r){if(-1!==R.indexOf("e")||-1!==R.indexOf("E"))return W("Invalid number has two exponential");R+=r}else if("+"===r||"-"===r){if("e"!==n&&"E"!==n)return W("Invalid symbol in number");R+=r}else R&&(a(parseFloat(R)),u(),R=""),o--,D=F.pop()||p;continue;default:return W("Unknown state: "+D)}K>=C&&(X=0,N!==s&&N.length>f&&(W("Max buffer length exceeded: textNode"),X=Math.max(X,N.length)),R.length>f&&(W("Max buffer length exceeded: numberNode"),X=Math.max(X,R.length)),C=f-X+K);var X}),e(ce).on(function(){if(D==d)return a({}),u(),void(O=!0);D===p&&0===z||W("Unexpected end");N!==s&&(a(N),u(),N=s);O=!0})}var C,N,R,L,O,D,F,q,H,z,K,V=(C=d(function(e){return e.unshift(/^/),(t=RegExp(e.map(f("source")).join(""))).exec.bind(t);var t}),L=C(N=/(\$?)/,/([\w-_]+|\*)/,R=/(?:{([\w ]*?)})?/),O=C(N,/\["([^"]+)"\]/,R),D=C(N,/\[(\d+|\*)\]/,R),F=C(N,/()/,/{([\w ]*?)}/),q=C(/\.\./),H=C(/\./),z=C(N,/!/),K=C(/$/),function(e){return e(h(L,O,D,F),q,H,z,K)});function G(e,t){return{key:e,node:t}}var W=f("key"),Y=f("node"),X={};function Z(e){var t=e(ee).emit,r=e(te).emit,n=e(ae).emit,o=e(oe).emit;function a(e,t,r){Y(x(e))[t]=r}function s(e,r,n){e&&a(e,r,n);var i=A(G(r,n),e);return t(i),i}var u={};return u[le]=function(e,t){if(!e)return n(t),s(e,X,t);var r=function(e,t){var r=Y(x(e));return m(i,r)?s(e,v(r),t):e}(e,t),o=k(r),u=W(x(r));return a(o,u,t),A(G(u,t),o)},u[de]=function(e){return r(e),k(e)||o(Y(x(e)))},u[he]=s,u}var J=V(function(e,t,r,n,i){var a=1,s=2,f=3,l=c(W,x),d=c(Y,x);function b(e,t){return!!t[a]?p(e,x):e}function m(e){if(e==y)return y;return p(function(e){return l(e)!=X},c(e,k))}function g(){return function(e){return l(e)==X}}function w(e,t,r,n,i){var o=e(r);if(o){var a=function(e,t,r){return U(function(e,t){return t(e,r)},t,e)}(t,n,o);return i(r.substr(v(o[0])),a)}}function A(e,t){return u(w,e,t)}var E=h(A(e,M(b,function(e,t){var r=t[f];return r?p(c(u(_,S(r.split(/\W+/))),d),e):e},function(e,t){var r=t[s];return p(r&&"*"!=r?function(e){return l(e)==r}:y,e)},m)),A(t,M(function(e){if(e==y)return y;var t=g(),r=e,n=m(function(e){return i(e)}),i=h(t,r,n);return i})),A(r,M()),A(n,M(b,g)),A(i,M(function(e){return function(t){var r=e(t);return!0===r?x(t):r}})),function(e){throw o('"'+e+'" could not be tokenised')});function I(e,t){return t}function T(e,t){return E(e,t,e?T:I)}return function(e){try{return T(e,y)}catch(t){throw o('Could not compile "'+e+'" because '+t.message)}}});function $(e,t,r){var n,i;function o(e){return function(t){return t.id==e}}return{on:function(r,o){var a={listener:r,id:o||r};return t&&t.emit(e,r,a.id),n=A(a,n),i=A(r,i),this},emit:function(){!function e(t,r){t&&(x(t).apply(null,r),e(k(t),r))}(i,arguments)},un:function(t){var a;n=j(n,o(t),function(e){a=e}),a&&(i=j(i,function(e){return e==a.listener}),r&&r.emit(e,a.listener,a.id))},listeners:function(){return i},hasListener:function(e){return w(function e(t,r){return r&&(t(x(r))?x(r):e(t,k(r)))}(e?o(e):y,n))}}}var Q=1,ee=Q++,te=Q++,re=Q++,ne=Q++,ie="fail",oe=Q++,ae=Q++,se="start",ue="data",ce="end",fe=Q++,he=Q++,le=Q++,de=Q++;function pe(e,t,r){try{var n=a.parse(t)}catch(e){}return{statusCode:e,body:t,jsonBody:n,thrown:r}}function be(e,t){var r={node:e(te),path:e(ee)};function n(t,r,n){var i=e(t).emit;r.on(function(e){var t=n(e);!1!==t&&function(e,t,r){var n=B(r);e(t,I(k(T(W,n))),I(T(Y,n)))}(i,Y(t),e)},t),e("removeListener").on(function(n){n==t&&(e(n).listeners()||r.un(t))})}e("newListener").on(function(e){var i=/(node|path):(.*)/.exec(e);if(i){var o=r[i[1]];o.hasListener(e)||n(e,o,t(i[2]))}})}function ye(e,t){var r,n=/^(node|path):./,i=e(oe),o=e(ne).emit,a=e(re).emit,s=d(function(t,i){if(r[t])l(i,r[t]);else{var o=e(t),a=i[0];n.test(t)?c(o,a):o.on(a)}return r});function c(e,t,n){n=n||t;var i=f(t);return e.on(function(){var t=!1;r.forget=function(){t=!0},l(arguments,i),delete r.forget,t&&e.un(n)},n),r}function f(e){return function(){try{return e.apply(r,arguments)}catch(e){setTimeout(function(){throw e})}}}function h(t,r,n){var i;i="node"==t?function(e){return function(){var t=e.apply(this,arguments);w(t)&&(t==ge.drop?o():a(t))}}(n):n,c(function(t,r){return e(t+":"+r)}(t,r),i,n)}function p(e,t,n){return g(t)?h(e,t,n):function(e,t){for(var r in t)h(e,r,t[r])}(e,t),r}return e(ae).on(function(e){var t;r.root=(t=e,function(){return t})}),e(se).on(function(e,t){r.header=function(e){return e?t[e]:t}}),r={on:s,addListener:s,removeListener:function(t,n,o){if("done"==t)i.un(n);else if("node"==t||"path"==t)e.un(t+":"+n,o);else{var a=n;e(t).un(a)}return r},emit:e.emit,node:u(p,"node"),path:u(p,"path"),done:u(c,i),start:u(function(t,n){return e(t).on(f(n),n),r},se),fail:e(ie).on,abort:e(fe).emit,header:b,root:b,source:t}}function me(t,r,n,i,o){var a=function(){var e={},t=n("newListener"),r=n("removeListener");function n(n){return e[n]=$(n,t,r)}function i(t){return e[t]||n(t)}return["emit","on","un"].forEach(function(e){i[e]=d(function(t,r){l(r,i(t)[e])})}),i}();return r&&function(t,r,n,i,o,a,c){"use strict";var f=t(ue).emit,h=t(ie).emit,l=0,d=!0;function p(){var e=r.responseText,t=e.substr(l);t&&f(t),l=v(e)}t(fe).on(function(){r.onreadystatechange=null,r.abort()}),"onprogress"in r&&(r.onprogress=p),r.onreadystatechange=function(){function e(){try{d&&t(se).emit(r.status,(e=r.getAllResponseHeaders(),n={},e&&e.split("\r\n").forEach(function(e){var t=e.indexOf(": ");n[e.substring(0,t)]=e.substring(t+2)}),n)),d=!1}catch(e){}var e,n}switch(r.readyState){case 2:case 3:return e();case 4:e(),2==String(r.status)[0]?(p(),t(ce).emit()):h(pe(r.status,r.responseText))}};try{for(var b in r.open(n,i,!0),a)r.setRequestHeader(b,a[b]);(function(e,t){function r(t){return t.port||{"http:":80,"https:":443}[t.protocol||e.protocol]}return!!(t.protocol&&t.protocol!=e.protocol||t.host&&t.host!=e.host||t.host&&r(t)!=r(e))})(e.location,function(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e)||[];return{protocol:t[1]||"",host:t[2]||"",port:t[3]||""}}(i))||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=c,r.send(o)}catch(t){e.setTimeout(u(h,pe(s,s,t)),0)}}(a,new XMLHttpRequest,t,r,n,i,o),P(a),function(e,t){"use strict";var r,n={};function i(e){return function(t){r=e(r,t)}}for(var o in t)e(o).on(i(t[o]),n);e(re).on(function(e){var t=x(r),n=W(t),i=k(r);i&&(Y(x(i))[n]=e)}),e(ne).on(function(){var e=x(r),t=W(e),n=k(r);n&&delete Y(x(n))[t]}),e(fe).on(function(){for(var r in t)e(r).un(n)})}(a,Z(a)),be(a,J),ye(a,r)}function ve(e,t,r,n,i,o,s){return i=i?a.parse(a.stringify(i)):{},n?g(n)||(n=a.stringify(n),i["Content-Type"]=i["Content-Type"]||"application/json"):n=null,e(r||"GET",function(e,t){return!1===t&&(-1==e.indexOf("?")?e+="?":e+="&",e+="_="+(new Date).getTime()),e}(t,s),n,i,o||!1)}function ge(e){var t=M("resume","pause","pipe"),r=u(_,t);return e?r(e)||g(e)?ve(me,e):ve(me,e.url,e.method,e.body,e.headers,e.withCredentials,e.cached):me()}ge.drop=function(){return ge.drop},"function"==typeof define&&define.amd?define("oboe",[],function(){return ge}):"object"==typeof r?t.exports=ge:e.oboe=ge}(function(){try{return window}catch(e){return self}}(),Object,Array,Error,JSON)},{}],240:[function(e,t,r){r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n",r.homedir=function(){return"/"}},{}],241:[function(e,t,r){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],242:[function(e,t,r){"use strict";var n=e("asn1.js");r.certificate=e("./certificate");var i=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});r.RSAPrivateKey=i;var o=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});r.PublicKey=a;var s=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),u=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});r.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});r.EncryptedPrivateKey=c;var f=n.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});r.DSAPrivateKey=f,r.DSAparam=n.define("DSAparam",function(){this.int()});var h=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=h;var l=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":243,"asn1.js":5}],243:[function(e,t,r){"use strict";var n=e("asn1.js"),i=n.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=n.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),a=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),s=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}),u=n.define("RelativeDistinguishedName",function(){this.setof(o)}),c=n.define("RDNSequence",function(){this.seqof(u)}),f=n.define("Name",function(){this.choice({rdnSequence:this.use(c)})}),h=n.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),l=n.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=n.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(h),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())}),p=n.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())});t.exports=p},{"asn1.js":5}],244:[function(e,t,r){(function(r){var n=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m,i=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m,o=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m,a=e("evp_bytestokey"),s=e("browserify-aes");t.exports=function(e,t){var u,c=e.toString(),f=c.match(n);if(f){var h="aes"+f[1],l=new r(f[2],"hex"),d=new r(f[3].replace(/\r?\n/g,""),"base64"),p=a(t,l.slice(0,8),parseInt(f[1],10)).key,b=[],y=s.createDecipheriv(h,p,l);b.push(y.update(d)),b.push(y.final()),u=r.concat(b)}else{var m=c.match(o);u=new r(m[2].replace(/\r?\n/g,""),"base64")}return{tag:c.match(i)[1],data:u}}}).call(this,e("buffer").Buffer)},{"browserify-aes":58,buffer:84,evp_bytestokey:158}],245:[function(e,t,r){(function(r){var n=e("./asn1"),i=e("./aesid.json"),o=e("./fixProc"),a=e("browserify-aes"),s=e("pbkdf2");function u(e){var t;"object"!=typeof e||r.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=new r(e));var u,c,f=o(e,t),h=f.tag,l=f.data;switch(h){case"CERTIFICATE":c=n.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(l,"der")),u=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+h);case"ENCRYPTED PRIVATE KEY":l=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,o=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),u=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,h=parseInt(u.split("-")[1],10)/8,l=s.pbkdf2Sync(t,n,o,h),d=a.createDecipheriv(u,l,c),p=[];return p.push(d.update(f)),p.push(d.final()),r.concat(p)}(l=n.EncryptedPrivateKey.decode(l,"der"),t);case"PRIVATE KEY":switch(u=(c=n.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+h);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=n.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+h)}}t.exports=u,u.signature=n.signature}).call(this,e("buffer").Buffer)},{"./aesid.json":241,"./asn1":242,"./fixProc":244,"browserify-aes":58,buffer:84,pbkdf2:247}],246:[function(e,t,r){var n=e("trim"),i=e("for-each");t.exports=function(e){if(!e)return{};var t={};return i(n(e).split("\n"),function(e){var r,i=e.indexOf(":"),o=n(e.slice(0,i)).toLowerCase(),a=n(e.slice(i+1));void 0===t[o]?t[o]=a:(r=t[o],"[object Array]"===Object.prototype.toString.call(r)?t[o].push(a):t[o]=[t[o],a])}),t}},{"for-each":159,trim:324}],247:[function(e,t,r){r.pbkdf2=e("./lib/async"),r.pbkdf2Sync=e("./lib/sync")},{"./lib/async":248,"./lib/sync":251}],248:[function(e,t,r){(function(r,n){var i,o=e("./precondition"),a=e("./default-encoding"),s=e("./sync"),u=e("safe-buffer").Buffer,c=n.crypto&&n.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function l(e,t,r,n,i){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)}).then(function(e){return u.from(e)})}t.exports=function(e,t,d,p,b,y){if(u.isBuffer(e)||(e=u.from(e,a)),u.isBuffer(t)||(t=u.from(t,a)),o(d,p),"function"==typeof b&&(y=b,b=void 0),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");var m=f[(b=b||"sha1").toLowerCase()];if(!m||"function"!=typeof n.Promise)return r.nextTick(function(){var r;try{r=s(e,t,d,p,b)}catch(e){return y(e)}y(null,r)});!function(e,t){e.then(function(e){r.nextTick(function(){t(null,e)})},function(e){r.nextTick(function(){t(e)})})}(function(e){if(n.process&&!n.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var t=l(i=i||u.alloc(8),i,10,128,e).then(function(){return!0}).catch(function(){return!1});return h[e]=t,t}(m).then(function(r){return r?l(e,t,d,p,m):s(e,t,d,p,b)}),y)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":249,"./precondition":250,"./sync":251,_process:257,"safe-buffer":290}],249:[function(e,t,r){(function(e){var r;e.browser?r="utf-8":r=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";t.exports=r}).call(this,e("_process"))},{_process:257}],250:[function(e,t,r){var n=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>n||t!=t)throw new TypeError("Bad key length")}},{}],251:[function(e,t,r){var n=e("create-hash/md5"),i=e("ripemd160"),o=e("sha.js"),a=e("./precondition"),s=e("./default-encoding"),u=e("safe-buffer").Buffer,c=u.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,r){var a=function(e){return"rmd160"===e||"ripemd160"===e?i:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=a(t):t.length1)for(var r=1;rp||new a(t).cmp(d.modulus)>=0)throw new Error("decryption error");l=f?c(new a(t),d):s(t,d);var b=new r(p-l.length);if(b.fill(0),l=r.concat([b,l],p),4===h)return function(e,t){e.modulus;var n=e.modulus.byteLength(),a=(t.length,u("sha1").update(new r("")).digest()),s=a.length;if(0!==t[0])throw new Error("decryption error");var c=t.slice(1,s+1),f=t.slice(s+1),h=o(c,i(f,s)),l=o(f,i(h,n-s-1));if(function(e,t){e=new r(e),t=new r(t);var n=0,i=e.length;e.length!==t.length&&(n++,i=Math.min(e.length,t.length));var o=-1;for(;++o=t.length){o++;break}var a=t.slice(2,i-1);t.slice(i-1,i);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,l,f);if(3===h)return l;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":260,"./withPublic":263,"./xor":264,"bn.js":53,"browserify-rsa":76,buffer:84,"create-hash":91,"parse-asn1":245}],262:[function(e,t,r){(function(r){var n=e("parse-asn1"),i=e("randombytes"),o=e("create-hash"),a=e("./mgf"),s=e("./xor"),u=e("bn.js"),c=e("./withPublic"),f=e("browserify-rsa");t.exports=function(e,t,h){var l;l=e.padding?e.padding:h?1:4;var d,p=n(e);if(4===l)d=function(e,t){var n=e.modulus.byteLength(),c=t.length,f=o("sha1").update(new r("")).digest(),h=f.length,l=2*h;if(c>n-l-2)throw new Error("message too long");var d=new r(n-c-l-2);d.fill(0);var p=n-h-1,b=i(h),y=s(r.concat([f,d,new r([1]),t],p),a(b,p)),m=s(b,a(y,h));return new u(r.concat([new r([0]),m,y],n))}(p,t);else if(1===l)d=function(e,t,n){var o,a=t.length,s=e.modulus.byteLength();if(a>s-11)throw new Error("message too long");n?(o=new r(s-a-3)).fill(255):o=function(e,t){var n,o=new r(e),a=0,s=i(2*e),u=0;for(;a=0)throw new Error("data too long for modulus")}return h?f(d,p):c(d,p)}}).call(this,e("buffer").Buffer)},{"./mgf":260,"./withPublic":263,"./xor":264,"bn.js":53,"browserify-rsa":76,buffer:84,"create-hash":91,"parse-asn1":245,randombytes:270}],263:[function(e,t,r){(function(r){var n=e("bn.js");t.exports=function(e,t){return new r(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}}).call(this,e("buffer").Buffer)},{"bn.js":53,buffer:84}],264:[function(e,t,r){t.exports=function(e,t){for(var r=e.length,n=-1;++n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=f-h,E=Math.floor,x=String.fromCharCode;function k(e){throw new RangeError(_[e])}function S(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function M(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+S((e=e.replace(w,".")).split("."),t).join(".")}function I(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=x(e)}).join("")}function U(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function j(e,t,r){var n=0;for(e=r?E(e/p):e>>1,e+=E(e/t);e>A*l>>1;n+=f)e=E(e/A);return E(n+(A+1)*e/(e+d))}function B(e){var t,r,n,i,o,a,s,u,d,p,v,g=[],w=e.length,_=0,A=y,x=b;for((r=e.lastIndexOf(m))<0&&(r=0),n=0;n=128&&k("not-basic"),g.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=w&&k("invalid-input"),((u=(v=e.charCodeAt(i++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:f)>=f||u>E((c-_)/a))&&k("overflow"),_+=u*a,!(u<(d=s<=x?h:s>=x+l?l:s-x));s+=f)a>E(c/(p=f-d))&&k("overflow"),a*=p;x=j(_-o,t=g.length+1,0==o),E(_/t)>c-A&&k("overflow"),A+=E(_/t),_%=t,g.splice(_++,0,A)}return T(g)}function P(e){var t,r,n,i,o,a,s,u,d,p,v,g,w,_,A,S=[];for(g=(e=I(e)).length,t=y,r=0,o=b,a=0;a=t&&vE((c-r)/(w=n+1))&&k("overflow"),r+=(s-t)*w,t=s,a=0;ac&&k("overflow"),v==t){for(u=r,d=f;!(u<(p=d<=o?h:d>=o+l?l:d-o));d+=f)A=u-p,_=f-p,S.push(x(U(p+A%_,0))),u=E(A/_);S.push(x(U(u,0))),o=j(r,w,n==i),r=0,++n}++r,++t}return S.join("")}if(s={version:"1.4.1",ucs2:{decode:I,encode:T},decode:B,encode:P,toASCII:function(e){return M(e,function(e){return g.test(e)?"xn--"+P(e):e})},toUnicode:function(e){return M(e,function(e){return v.test(e)?B(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return s});else if(i&&o)if(t.exports==i)o.exports=s;else for(u in s)s.hasOwnProperty(u)&&(i[u]=s[u]);else n.punycode=s}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],266:[function(e,t,r){"use strict";var n=e("strict-uri-encode"),i=e("object-assign"),o=e("decode-uri-component");function a(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function s(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function u(e,t){var r=function(e){var t;switch(e.arrayFormat){case"index":return function(e,r,n){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return function(e,r,n){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};default:return function(e,t,r){void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t=i({arrayFormat:"none"},t)),n=Object.create(null);return"string"!=typeof e?n:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach(function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),a=t.length>0?t.join("="):void 0;a=void 0===a?null:o(a),r(o(i),a,n)}),Object.keys(n).sort().reduce(function(e,t){var r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort(function(e,t){return Number(e)-Number(t)}).map(function(e){return t[e]}):t}(r):e[t]=r,e},Object.create(null))):n}r.extract=s,r.parse=u,r.stringify=function(e,t){!1===(t=i({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var r=function(e){switch(e.arrayFormat){case"index":return function(t,r,n){return null===r?[a(t,e),"[",n,"]"].join(""):[a(t,e),"[",a(n,e),"]=",a(r,e)].join("")};case"bracket":return function(t,r){return null===r?a(t,e):[a(t,e),"[]=",a(r,e)].join("")};default:return function(t,r){return null===r?a(t,e):[a(t,e),"=",a(r,e)].join("")}}}(t);return e?Object.keys(e).sort(t.sort).map(function(n){var i=e[n];if(void 0===i)return"";if(null===i)return a(n,t);if(Array.isArray(i)){var o=[];return i.slice().forEach(function(e){void 0!==e&&o.push(r(n,e,o.length))}),o.join("&")}return a(n,t)+"="+a(i,t)}).filter(function(e){return e.length>0}).join("&"):""},r.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:u(s(e),t)}}},{"decode-uri-component":98,"object-assign":238,"strict-uri-encode":316}],267:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,o){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var f=0;f=0?(h=b.substr(0,y),l=b.substr(y+1)):(h=b,l=""),d=decodeURIComponent(h),p=decodeURIComponent(l),n(a,d)?i(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],268:[function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),function(a){var s=encodeURIComponent(n(a))+r;return i(e[a])?o(e[a],function(e){return s+encodeURIComponent(n(e))}).join(t):s+encodeURIComponent(n(e[a]))}).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n65536)throw new Error("requested too many random bytes");var a=new n.Uint8Array(e);e>0&&o.getRandomValues(a);var s=i.from(a.buffer);if("function"==typeof t)return r.nextTick(function(){t(null,s)});return s}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:257,"safe-buffer":290}],271:[function(e,t,r){(function(t,n){"use strict";function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=e("safe-buffer"),a=e("randombytes"),s=o.Buffer,u=o.kMaxLength,c=n.crypto||n.msCrypto,f=Math.pow(2,32)-1;function h(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>f||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function l(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function d(e,r,n,i){if(t.browser){var o=e.buffer,s=new Uint8Array(o,r,n);return c.getRandomValues(s),i?void t.nextTick(function(){i(null,e)}):e}if(!i)return a(n).copy(e,r),e;a(n,function(t,n){if(t)return i(t);n.copy(e,r),i(null,e)})}c&&c.getRandomValues||!t.browser?(r.randomFill=function(e,t,r,i){if(!(s.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(t,e.length),l(r,t,e.length),d(e,t,r,i)},r.randomFillSync=function(e,t,r){void 0===t&&(t=0);if(!(s.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(t,e.length),void 0===r&&(r=e.length-t);return l(r,t,e.length),d(e,t,r)}):(r.randomFill=i,r.randomFillSync=i)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:257,randombytes:270,"safe-buffer":290}],272:[function(e,t,r){t.exports=window.crypto},{}],273:[function(e,t,r){t.exports=e("crypto")},{crypto:272}],274:[function(e,t,r){t.exports=function(t,r){var n=e("./crypto.js"),i="function"==typeof r;if(t>65536){if(!i)throw new Error("Requested too many random bytes.");r(new Error("Requested too many random bytes."))}if(void 0!==n&&n.randomBytes){if(!i)return"0x"+n.randomBytes(t).toString("hex");n.randomBytes(t,function(e,t){e?r(u):r(null,"0x"+t.toString("hex"))})}else{var o;if(void 0!==n?o=n:"undefined"!=typeof msCrypto&&(o=msCrypto),o&&o.getRandomValues){var a=o.getRandomValues(new Uint8Array(t)),s="0x"+Array.from(a).map(function(e){return e.toString(16)}).join("");if(!i)return s;r(null,s)}else{var u=new Error('No "crypto" object available. This Browser doesn\'t support generating secure random bytes.');if(!i)throw u;r(u)}}}},{"./crypto.js":273}],275:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":276}],276:[function(e,t,r){"use strict";var n=e("process-nextick-args").nextTick,i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=h;var o=e("core-util-is");o.inherits=e("inherits");var a=e("./_stream_readable"),s=e("./_stream_writable");o.inherits(h,a);for(var u=i(s.prototype),c=0;c0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?_(e,a,t,!1):S(e,a)):_(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=A?e=A:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i(k,e):k(e))}function k(e){d("emit readable"),e.emit("readable"),U(e)}function S(e,t){t.readingMore||(t.readingMore=!0,i(M,e,t))}function M(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function B(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i(P,t,e))}function P(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function C(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):x(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e0?j(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?f:g;function c(t,r){d("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),e.removeListener("close",m),e.removeListener("finish",v),e.removeListener("drain",h),e.removeListener("error",y),e.removeListener("unpipe",c),n.removeListener("end",f),n.removeListener("end",g),n.removeListener("data",b),l=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function f(){d("onend"),e.end()}o.endEmitted?i(u):n.once("end",u),e.on("unpipe",c);var h=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,U(e))}}(n);e.on("drain",h);var l=!1;var p=!1;function b(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==C(o.pipes,e))&&!l&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function y(t){d("onerror",t),g(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",v),g()}function v(){d("onfinish"),e.removeListener("close",m),g()}function g(){d("unpipe"),n.unpipe(e)}return n.on("data",b),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",m),e.once("finish",v),e.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),e},g.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?setImmediate:i;m.WritableState=y;var u=e("core-util-is");u.inherits=e("inherits");var c={deprecate:e("util-deprecate")},f=e("./internal/streams/stream"),h=e("safe-buffer").Buffer,l=n.Uint8Array||function(){};var d,p=e("./internal/streams/destroy");function b(){}function y(t,r){a=a||e("./_stream_duplex"),t=t||{};var n=r instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,c=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i(o,n),i(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,o);else{var a=_(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),n?s(g,e,r,a,o):g(e,r,a,o)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function m(t){if(a=a||e("./_stream_duplex"),!(d.call(m,this)||this instanceof a))return new m(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function v(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function g(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,v(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,h=r.callback;if(v(e,t,!1,t.objectMode?1:c.length,c,f,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function A(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)})}function E(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i(A,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(m,f),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===m&&(e&&e._writableState instanceof y)}})):d=function(e){return e instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,h.isBuffer(n)||n instanceof l);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=b),o.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i(t,r)}(this,r):(s||function(e,t,r,n){var o=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i(n,a),o=!1),o}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},m.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?i(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),m.prototype.destroy=p.destroy,m.prototype._undestroy=p.undestroy,m.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":276,"./internal/streams/destroy":282,"./internal/streams/stream":283,_process:257,"core-util-is":89,inherits:180,"process-nextick-args":256,"safe-buffer":290,"util-deprecate":330}],281:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,i=s,t.copy(r,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":290,util:55}],282:[function(e,t,r){"use strict";var n=e("process-nextick-args").nextTick;function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(n(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":256}],283:[function(e,t,r){t.exports=e("events").EventEmitter},{events:157}],284:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":285}],285:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":276,"./lib/_stream_passthrough.js":277,"./lib/_stream_readable.js":278,"./lib/_stream_transform.js":279,"./lib/_stream_writable.js":280}],286:[function(e,t,r){t.exports=e("./readable").Transform},{"./readable":285}],287:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":280}],288:[function(e,t,r){(function(r){"use strict";var n=e("inherits"),i=e("hash-base");function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function a(e,t){return e<>>32-t}function s(e,t,r,n,i,o,s,u){return a(e+(t^r^n)+o+s|0,u)+i|0}function u(e,t,r,n,i,o,s,u){return a(e+(t&r|~t&n)+o+s|0,u)+i|0}function c(e,t,r,n,i,o,s,u){return a(e+((t|~r)^n)+o+s|0,u)+i|0}function f(e,t,r,n,i,o,s,u){return a(e+(t&n|r&~n)+o+s|0,u)+i|0}function h(e,t,r,n,i,o,s,u){return a(e+(t^(r|~n))+o+s|0,u)+i|0}n(o,i),o.prototype._update=function(){for(var e=new Array(16),t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d,l=this._e;l=s(l,r=s(r,n,i,o,l,e[0],0,11),n,i=a(i,10),o,e[1],0,14),n=s(n=a(n,10),i=s(i,o=s(o,l,r,n,i,e[2],0,15),l,r=a(r,10),n,e[3],0,12),o,l=a(l,10),r,e[4],0,5),o=s(o=a(o,10),l=s(l,r=s(r,n,i,o,l,e[5],0,8),n,i=a(i,10),o,e[6],0,7),r,n=a(n,10),i,e[7],0,9),r=s(r=a(r,10),n=s(n,i=s(i,o,l,r,n,e[8],0,11),o,l=a(l,10),r,e[9],0,13),i,o=a(o,10),l,e[10],0,14),i=s(i=a(i,10),o=s(o,l=s(l,r,n,i,o,e[11],0,15),r,n=a(n,10),i,e[12],0,6),l,r=a(r,10),n,e[13],0,7),l=u(l=a(l,10),r=s(r,n=s(n,i,o,l,r,e[14],0,9),i,o=a(o,10),l,e[15],0,8),n,i=a(i,10),o,e[7],1518500249,7),n=u(n=a(n,10),i=u(i,o=u(o,l,r,n,i,e[4],1518500249,6),l,r=a(r,10),n,e[13],1518500249,8),o,l=a(l,10),r,e[1],1518500249,13),o=u(o=a(o,10),l=u(l,r=u(r,n,i,o,l,e[10],1518500249,11),n,i=a(i,10),o,e[6],1518500249,9),r,n=a(n,10),i,e[15],1518500249,7),r=u(r=a(r,10),n=u(n,i=u(i,o,l,r,n,e[3],1518500249,15),o,l=a(l,10),r,e[12],1518500249,7),i,o=a(o,10),l,e[0],1518500249,12),i=u(i=a(i,10),o=u(o,l=u(l,r,n,i,o,e[9],1518500249,15),r,n=a(n,10),i,e[5],1518500249,9),l,r=a(r,10),n,e[2],1518500249,11),l=u(l=a(l,10),r=u(r,n=u(n,i,o,l,r,e[14],1518500249,7),i,o=a(o,10),l,e[11],1518500249,13),n,i=a(i,10),o,e[8],1518500249,12),n=c(n=a(n,10),i=c(i,o=c(o,l,r,n,i,e[3],1859775393,11),l,r=a(r,10),n,e[10],1859775393,13),o,l=a(l,10),r,e[14],1859775393,6),o=c(o=a(o,10),l=c(l,r=c(r,n,i,o,l,e[4],1859775393,7),n,i=a(i,10),o,e[9],1859775393,14),r,n=a(n,10),i,e[15],1859775393,9),r=c(r=a(r,10),n=c(n,i=c(i,o,l,r,n,e[8],1859775393,13),o,l=a(l,10),r,e[1],1859775393,15),i,o=a(o,10),l,e[2],1859775393,14),i=c(i=a(i,10),o=c(o,l=c(l,r,n,i,o,e[7],1859775393,8),r,n=a(n,10),i,e[0],1859775393,13),l,r=a(r,10),n,e[6],1859775393,6),l=c(l=a(l,10),r=c(r,n=c(n,i,o,l,r,e[13],1859775393,5),i,o=a(o,10),l,e[11],1859775393,12),n,i=a(i,10),o,e[5],1859775393,7),n=f(n=a(n,10),i=f(i,o=c(o,l,r,n,i,e[12],1859775393,5),l,r=a(r,10),n,e[1],2400959708,11),o,l=a(l,10),r,e[9],2400959708,12),o=f(o=a(o,10),l=f(l,r=f(r,n,i,o,l,e[11],2400959708,14),n,i=a(i,10),o,e[10],2400959708,15),r,n=a(n,10),i,e[0],2400959708,14),r=f(r=a(r,10),n=f(n,i=f(i,o,l,r,n,e[8],2400959708,15),o,l=a(l,10),r,e[12],2400959708,9),i,o=a(o,10),l,e[4],2400959708,8),i=f(i=a(i,10),o=f(o,l=f(l,r,n,i,o,e[13],2400959708,9),r,n=a(n,10),i,e[3],2400959708,14),l,r=a(r,10),n,e[7],2400959708,5),l=f(l=a(l,10),r=f(r,n=f(n,i,o,l,r,e[15],2400959708,6),i,o=a(o,10),l,e[14],2400959708,8),n,i=a(i,10),o,e[5],2400959708,6),n=h(n=a(n,10),i=f(i,o=f(o,l,r,n,i,e[6],2400959708,5),l,r=a(r,10),n,e[2],2400959708,12),o,l=a(l,10),r,e[4],2840853838,9),o=h(o=a(o,10),l=h(l,r=h(r,n,i,o,l,e[0],2840853838,15),n,i=a(i,10),o,e[5],2840853838,5),r,n=a(n,10),i,e[9],2840853838,11),r=h(r=a(r,10),n=h(n,i=h(i,o,l,r,n,e[7],2840853838,6),o,l=a(l,10),r,e[12],2840853838,8),i,o=a(o,10),l,e[2],2840853838,13),i=h(i=a(i,10),o=h(o,l=h(l,r,n,i,o,e[10],2840853838,12),r,n=a(n,10),i,e[14],2840853838,5),l,r=a(r,10),n,e[1],2840853838,12),l=h(l=a(l,10),r=h(r,n=h(n,i,o,l,r,e[3],2840853838,13),i,o=a(o,10),l,e[8],2840853838,14),n,i=a(i,10),o,e[11],2840853838,11),n=h(n=a(n,10),i=h(i,o=h(o,l,r,n,i,e[6],2840853838,8),l,r=a(r,10),n,e[15],2840853838,5),o,l=a(l,10),r,e[13],2840853838,6),o=a(o,10);var d=this._a,p=this._b,b=this._c,y=this._d,m=this._e;m=h(m,d=h(d,p,b,y,m,e[5],1352829926,8),p,b=a(b,10),y,e[14],1352829926,9),p=h(p=a(p,10),b=h(b,y=h(y,m,d,p,b,e[7],1352829926,9),m,d=a(d,10),p,e[0],1352829926,11),y,m=a(m,10),d,e[9],1352829926,13),y=h(y=a(y,10),m=h(m,d=h(d,p,b,y,m,e[2],1352829926,15),p,b=a(b,10),y,e[11],1352829926,15),d,p=a(p,10),b,e[4],1352829926,5),d=h(d=a(d,10),p=h(p,b=h(b,y,m,d,p,e[13],1352829926,7),y,m=a(m,10),d,e[6],1352829926,7),b,y=a(y,10),m,e[15],1352829926,8),b=h(b=a(b,10),y=h(y,m=h(m,d,p,b,y,e[8],1352829926,11),d,p=a(p,10),b,e[1],1352829926,14),m,d=a(d,10),p,e[10],1352829926,14),m=f(m=a(m,10),d=h(d,p=h(p,b,y,m,d,e[3],1352829926,12),b,y=a(y,10),m,e[12],1352829926,6),p,b=a(b,10),y,e[6],1548603684,9),p=f(p=a(p,10),b=f(b,y=f(y,m,d,p,b,e[11],1548603684,13),m,d=a(d,10),p,e[3],1548603684,15),y,m=a(m,10),d,e[7],1548603684,7),y=f(y=a(y,10),m=f(m,d=f(d,p,b,y,m,e[0],1548603684,12),p,b=a(b,10),y,e[13],1548603684,8),d,p=a(p,10),b,e[5],1548603684,9),d=f(d=a(d,10),p=f(p,b=f(b,y,m,d,p,e[10],1548603684,11),y,m=a(m,10),d,e[14],1548603684,7),b,y=a(y,10),m,e[15],1548603684,7),b=f(b=a(b,10),y=f(y,m=f(m,d,p,b,y,e[8],1548603684,12),d,p=a(p,10),b,e[12],1548603684,7),m,d=a(d,10),p,e[4],1548603684,6),m=f(m=a(m,10),d=f(d,p=f(p,b,y,m,d,e[9],1548603684,15),b,y=a(y,10),m,e[1],1548603684,13),p,b=a(b,10),y,e[2],1548603684,11),p=c(p=a(p,10),b=c(b,y=c(y,m,d,p,b,e[15],1836072691,9),m,d=a(d,10),p,e[5],1836072691,7),y,m=a(m,10),d,e[1],1836072691,15),y=c(y=a(y,10),m=c(m,d=c(d,p,b,y,m,e[3],1836072691,11),p,b=a(b,10),y,e[7],1836072691,8),d,p=a(p,10),b,e[14],1836072691,6),d=c(d=a(d,10),p=c(p,b=c(b,y,m,d,p,e[6],1836072691,6),y,m=a(m,10),d,e[9],1836072691,14),b,y=a(y,10),m,e[11],1836072691,12),b=c(b=a(b,10),y=c(y,m=c(m,d,p,b,y,e[8],1836072691,13),d,p=a(p,10),b,e[12],1836072691,5),m,d=a(d,10),p,e[2],1836072691,14),m=c(m=a(m,10),d=c(d,p=c(p,b,y,m,d,e[10],1836072691,13),b,y=a(y,10),m,e[0],1836072691,13),p,b=a(b,10),y,e[4],1836072691,7),p=u(p=a(p,10),b=u(b,y=c(y,m,d,p,b,e[13],1836072691,5),m,d=a(d,10),p,e[8],2053994217,15),y,m=a(m,10),d,e[6],2053994217,5),y=u(y=a(y,10),m=u(m,d=u(d,p,b,y,m,e[4],2053994217,8),p,b=a(b,10),y,e[1],2053994217,11),d,p=a(p,10),b,e[3],2053994217,14),d=u(d=a(d,10),p=u(p,b=u(b,y,m,d,p,e[11],2053994217,14),y,m=a(m,10),d,e[15],2053994217,6),b,y=a(y,10),m,e[0],2053994217,14),b=u(b=a(b,10),y=u(y,m=u(m,d,p,b,y,e[5],2053994217,6),d,p=a(p,10),b,e[12],2053994217,9),m,d=a(d,10),p,e[2],2053994217,12),m=u(m=a(m,10),d=u(d,p=u(p,b,y,m,d,e[13],2053994217,9),b,y=a(y,10),m,e[9],2053994217,12),p,b=a(b,10),y,e[7],2053994217,5),p=s(p=a(p,10),b=u(b,y=u(y,m,d,p,b,e[10],2053994217,15),m,d=a(d,10),p,e[14],2053994217,8),y,m=a(m,10),d,e[12],0,8),y=s(y=a(y,10),m=s(m,d=s(d,p,b,y,m,e[15],0,5),p,b=a(b,10),y,e[10],0,12),d,p=a(p,10),b,e[4],0,9),d=s(d=a(d,10),p=s(p,b=s(b,y,m,d,p,e[1],0,12),y,m=a(m,10),d,e[5],0,5),b,y=a(y,10),m,e[8],0,14),b=s(b=a(b,10),y=s(y,m=s(m,d,p,b,y,e[7],0,6),d,p=a(p,10),b,e[6],0,8),m,d=a(d,10),p,e[2],0,13),m=s(m=a(m,10),d=s(d,p=s(p,b,y,m,d,e[13],0,6),b,y=a(y,10),m,e[14],0,5),p,b=a(b,10),y,e[0],0,15),p=s(p=a(p,10),b=s(b,y=s(y,m,d,p,b,e[3],0,13),m,d=a(d,10),p,e[9],0,11),y,m=a(m,10),d,e[11],0,11),y=a(y,10);var v=this._b+i+y|0;this._b=this._c+o+m|0,this._c=this._d+l+d|0,this._d=this._e+r+p|0,this._e=this._a+n+b|0,this._a=v},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=o}).call(this,e("buffer").Buffer)},{buffer:84,"hash-base":161,inherits:180}],289:[function(e,t,r){const n=e("assert"),i=e("safe-buffer").Buffer;function o(e,t){if("00"===e.slice(0,2))throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function a(e,t){if(e<56)return i.from([e+t]);var r=u(e),n=u(t+55+r.length/2);return i.from(n+r,"hex")}function s(e){return"0x"===e.slice(0,2)}function u(e){var t=e.toString(16);return t.length%2&&(t="0"+t),t}function c(e){if(!i.isBuffer(e))if("string"==typeof e)e=s(e)?i.from(((r="string"!=typeof(n=e)?n:s(n)?n.slice(2):n).length%2&&(r="0"+r),r),"hex"):i.from(e);else if("number"==typeof e)e?(t=u(e),e=i.from(t,"hex")):e=i.from([]);else if(null==e)e=i.from([]);else{if(!e.toArray)throw new Error("invalid type");e=i.from(e.toArray())}var t,r,n;return e}r.encode=function(e){if(e instanceof Array){for(var t=[],n=0;nt.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(s=t.slice(n,h)).length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)u=e(s),c.push(u.data),s=u.remainder;return{data:c,remainder:t.slice(h)}}(e=c(e));return t?r:(n.equal(r.remainder.length,0,"invalid remainder"),r.data)},r.getLength=function(e){if(!e||0===e.length)return i.from([]);var t=(e=c(e))[0];if(t<=127)return e.length;if(t<=183)return t-127;if(t<=191)return t-182;if(t<=247)return t-191;var r=t-246;return r+o(e.slice(1,r).toString("hex"),16)}},{assert:19,"safe-buffer":290}],290:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:84}],291:[function(e,t,r){const n=e("util"),i=e("events/");var o="object"==typeof Reflect?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};function s(){i.call(this)}function u(e,t,r){try{a(e,t,r)}catch(e){setTimeout(()=>{throw e})}}t.exports=s,n.inherits(s,i),s.prototype.emit=function(e){for(var t=[],r=1;r0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)u(s,this,t);else{var c=s.length,f=function(e,t){for(var r=new Array(t),n=0;n0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=function(){for(var e=[],t=0;t0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var c=u.length,f=p(u,c);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return l(this,e,!0)},s.prototype.rawListeners=function(e){return l(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],293:[function(e,t,r){t.exports=e("scryptsy")},{scryptsy:294}],294:[function(e,t,r){(function(r){var n=e("pbkdf2").pbkdf2Sync,i=2147483647;function o(e,t,n,i,o){if(r.isBuffer(e)&&r.isBuffer(n))e.copy(n,i,t,t+o);else for(;o--;)n[i++]=e[t++]}t.exports=function(e,t,a,s,u,c,f){if(0===a||0!=(a&a-1))throw Error("N must be > 0 and a power of 2");if(a>i/128/s)throw Error("Parameter N is too large");if(s>i/128/u)throw Error("Parameter r is too large");var h,l=new r(256*s),d=new r(128*s*a),p=new Int32Array(16),b=new Int32Array(16),y=new r(64),m=n(e,t,1,128*u*s,"sha256");if(f){var v=u*a*2,g=0;h=function(){++g%1e3==0&&f({current:g,total:v,percent:g/v*100})}}for(var w=0;w>>32-t}function x(e){var t;for(t=0;t<16;t++)p[t]=(255&e[4*t+0])<<0,p[t]|=(255&e[4*t+1])<<8,p[t]|=(255&e[4*t+2])<<16,p[t]|=(255&e[4*t+3])<<24;for(o(p,0,b,0,16),t=8;t>0;t-=2)b[4]^=E(b[0]+b[12],7),b[8]^=E(b[4]+b[0],9),b[12]^=E(b[8]+b[4],13),b[0]^=E(b[12]+b[8],18),b[9]^=E(b[5]+b[1],7),b[13]^=E(b[9]+b[5],9),b[1]^=E(b[13]+b[9],13),b[5]^=E(b[1]+b[13],18),b[14]^=E(b[10]+b[6],7),b[2]^=E(b[14]+b[10],9),b[6]^=E(b[2]+b[14],13),b[10]^=E(b[6]+b[2],18),b[3]^=E(b[15]+b[11],7),b[7]^=E(b[3]+b[15],9),b[11]^=E(b[7]+b[3],13),b[15]^=E(b[11]+b[7],18),b[1]^=E(b[0]+b[3],7),b[2]^=E(b[1]+b[0],9),b[3]^=E(b[2]+b[1],13),b[0]^=E(b[3]+b[2],18),b[6]^=E(b[5]+b[4],7),b[7]^=E(b[6]+b[5],9),b[4]^=E(b[7]+b[6],13),b[5]^=E(b[4]+b[7],18),b[11]^=E(b[10]+b[9],7),b[8]^=E(b[11]+b[10],9),b[9]^=E(b[8]+b[11],13),b[10]^=E(b[9]+b[8],18),b[12]^=E(b[15]+b[14],7),b[13]^=E(b[12]+b[15],9),b[14]^=E(b[13]+b[12],13),b[15]^=E(b[14]+b[13],18);for(t=0;t<16;++t)p[t]=b[t]+p[t];for(t=0;t<16;t++){var r=4*t;e[r+0]=p[t]>>0&255,e[r+1]=p[t]>>8&255,e[r+2]=p[t]>>16&255,e[r+3]=p[t]>>24&255}}function k(e,t,r,n,i){for(var o=0;o=r)throw RangeError(n)}}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":181}],297:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("bip66"),o=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),a=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);r.privateKeyExport=function(e,t,r){var i=n.from(r?o:a);return e.copy(i,r?8:9),t.copy(i,r?181:214),i},r.privateKeyImport=function(e){var t=e.length,r=0;if(!(t2||t1?e[r+n-2]<<8:0);if(!(t<(r+=n)+i||t32||t1&&0===t[o]&&!(128&t[o+1]);--r,++o);for(var a=n.concat([n.from([0]),e.s]),s=33,u=0;s>1&&0===a[u]&&!(128&a[u+1]);--s,++u);return i.encode(t.slice(o),a.slice(u))},r.signatureImport=function(e){var t=n.alloc(32,0),r=n.alloc(32,0);try{var o=i.decode(e);if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long");if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(e){return}return o.r.copy(t,32-o.r.length),o.s.copy(r,32-o.s.length),{r:t,s:r}},r.signatureImportLax=function(e){var t=n.alloc(32,0),r=n.alloc(32,0),i=e.length,o=0;if(48===e[o++]){var a=e[o++];if(!(128&a&&(o+=a-128)>i)&&2===e[o++]){var s=e[o++];if(128&s){if(o+(a=s-128)>i)return;for(;a>0&&0===e[o];o+=1,a-=1);for(s=0;a>0;o+=1,a-=1)s=(s<<8)+e[o]}if(!(s>i-o)){var u=o;if(o+=s,2===e[o++]){var c=e[o++];if(128&c){if(o+(a=c-128)>i)return;for(;a>0&&0===e[o];o+=1,a-=1);for(c=0;a>0;o+=1,a-=1)c=(c<<8)+e[o]}if(!(c>i-o)){var f=o;for(o+=c;s>0&&0===e[u];s-=1,u+=1);if(!(s>32)){var h=e.slice(u,u+s);for(h.copy(t,32-h.length);c>0&&0===e[f];c-=1,f+=1);if(!(c>32)){var l=e.slice(f,f+c);return l.copy(r,32-l.length),{r:t,s:r}}}}}}}}}},{bip66:52,"safe-buffer":290}],298:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("create-hash"),o=e("bn.js"),a=e("elliptic").ec,s=e("../messages.json"),u=new a("secp256k1"),c=u.curve;function f(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(c.p)>=0)return null;var n=(r=r.toRed(c.red)).redSqr().redIMul(r).redIAdd(c.b).redSqrt();return 3===e!==n.isOdd()&&(n=n.redNeg()),u.keyPair({pub:{x:r,y:n}})}(t,e.slice(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var n=new o(t),i=new o(r);if(n.cmp(c.p)>=0||i.cmp(c.p)>=0)return null;if(n=n.toRed(c.red),i=i.toRed(c.red),(6===e||7===e)&&i.isOdd()!==(7===e))return null;var a=n.redSqr().redIMul(n);return i.redSqr().redISub(a.redIAdd(c.b)).isZero()?u.keyPair({pub:{x:n,y:i}}):null}(t,e.slice(1,33),e.slice(33,65));default:return null}}r.privateKeyVerify=function(e){var t=new o(e);return t.cmp(c.n)<0&&!t.isZero()},r.privateKeyExport=function(e,t){var r=new o(e);if(r.cmp(c.n)>=0||r.isZero())throw new Error(s.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return n.from(u.keyFromPrivate(e).getPublic(t,!0))},r.privateKeyNegate=function(e){var t=new o(e);return t.isZero()?n.alloc(32):c.n.sub(t).umod(c.n).toArrayLike(n,"be",32)},r.privateKeyModInverse=function(e){var t=new o(e);if(t.cmp(c.n)>=0||t.isZero())throw new Error(s.EC_PRIVATE_KEY_RANGE_INVALID);return t.invm(c.n).toArrayLike(n,"be",32)},r.privateKeyTweakAdd=function(e,t){var r=new o(t);if(r.cmp(c.n)>=0)throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(r.iadd(new o(e)),r.cmp(c.n)>=0&&r.isub(c.n),r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return r.toArrayLike(n,"be",32)},r.privateKeyTweakMul=function(e,t){var r=new o(t);if(r.cmp(c.n)>=0||r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);return r.imul(new o(e)),r.cmp(c.n)&&(r=r.umod(c.n)),r.toArrayLike(n,"be",32)},r.publicKeyCreate=function(e,t){var r=new o(e);if(r.cmp(c.n)>=0||r.isZero())throw new Error(s.EC_PUBLIC_KEY_CREATE_FAIL);return n.from(u.keyFromPrivate(e).getPublic(t,!0))},r.publicKeyConvert=function(e,t){var r=f(e);if(null===r)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);return n.from(r.getPublic(t,!0))},r.publicKeyVerify=function(e){return null!==f(e)},r.publicKeyTweakAdd=function(e,t,r){var i=f(e);if(null===i)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((t=new o(t)).cmp(c.n)>=0)throw new Error(s.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return n.from(c.g.mul(t).add(i.pub).encode(!0,r))},r.publicKeyTweakMul=function(e,t,r){var i=f(e);if(null===i)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((t=new o(t)).cmp(c.n)>=0||t.isZero())throw new Error(s.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return n.from(i.pub.mul(t).encode(!0,r))},r.publicKeyCombine=function(e,t){for(var r=new Array(e.length),i=0;i=0||r.cmp(c.n)>=0)throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);var i=n.from(e);return 1===r.cmp(u.nh)&&c.n.sub(r).toArrayLike(n,"be",32).copy(i,32),i},r.signatureExport=function(e){var t=e.slice(0,32),r=e.slice(32,64);if(new o(t).cmp(c.n)>=0||new o(r).cmp(c.n)>=0)throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);return{r:t,s:r}},r.signatureImport=function(e){var t=new o(e.r);t.cmp(c.n)>=0&&(t=new o(0));var r=new o(e.s);return r.cmp(c.n)>=0&&(r=new o(0)),n.concat([t.toArrayLike(n,"be",32),r.toArrayLike(n,"be",32)])},r.sign=function(e,t,r,i){if("function"==typeof r){var a=r;r=function(r){var u=a(e,t,null,i,r);if(!n.isBuffer(u)||32!==u.length)throw new Error(s.ECDSA_SIGN_FAIL);return new o(u)}}var f=new o(t);if(f.cmp(c.n)>=0||f.isZero())throw new Error(s.ECDSA_SIGN_FAIL);var h=u.sign(e,t,{canonical:!0,k:r,pers:i});return{signature:n.concat([h.r.toArrayLike(n,"be",32),h.s.toArrayLike(n,"be",32)]),recovery:h.recoveryParam}},r.verify=function(e,t,r){var n={r:t.slice(0,32),s:t.slice(32,64)},i=new o(n.r),a=new o(n.s);if(i.cmp(c.n)>=0||a.cmp(c.n)>=0)throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);if(1===a.cmp(u.nh)||i.isZero()||a.isZero())return!1;var h=f(r);if(null===h)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);return u.verify(e,n,{x:h.pub.x,y:h.pub.y})},r.recover=function(e,t,r,i){var a={r:t.slice(0,32),s:t.slice(32,64)},f=new o(a.r),h=new o(a.s);if(f.cmp(c.n)>=0||h.cmp(c.n)>=0)throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);try{if(f.isZero()||h.isZero())throw new Error;var l=u.recoverPubKey(e,a,r);return n.from(l.encode(!0,i))}catch(e){throw new Error(s.ECDSA_RECOVER_FAIL)}},r.ecdh=function(e,t){var n=r.ecdhUnsafe(e,t,!0);return i("sha256").update(n).digest()},r.ecdhUnsafe=function(e,t,r){var i=f(e);if(null===i)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);var a=new o(t);if(a.cmp(c.n)>=0||a.isZero())throw new Error(s.ECDH_FAIL);return n.from(i.pub.mul(a).encode(!0,r))}},{"../messages.json":300,"bn.js":53,"create-hash":91,elliptic:109,"safe-buffer":290}],299:[function(e,t,r){"use strict";var n=e("./assert"),i=e("./der"),o=e("./messages.json");function a(e,t){return void 0===e?t:(n.isBoolean(e,o.COMPRESSED_TYPE_INVALID),e)}t.exports=function(e){return{privateKeyVerify:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),32===t.length&&e.privateKeyVerify(t)},privateKeyExport:function(t,r){n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=a(r,!0);var s=e.privateKeyExport(t,r);return i.privateKeyExport(t,s,r)},privateKeyImport:function(t){if(n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),(t=i.privateKeyImport(t))&&32===t.length&&e.privateKeyVerify(t))return t;throw new Error(o.EC_PRIVATE_KEY_IMPORT_DER_FAIL)},privateKeyNegate:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyNegate(t)},privateKeyModInverse:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyModInverse(t)},privateKeyTweakAdd:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakAdd(t,r)},privateKeyTweakMul:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakMul(t,r)},publicKeyCreate:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=a(r,!0),e.publicKeyCreate(t,r)},publicKeyConvert:function(t,r){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),r=a(r,!0),e.publicKeyConvert(t,r)},publicKeyVerify:function(t){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),e.publicKeyVerify(t)},publicKeyTweakAdd:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=a(i,!0),e.publicKeyTweakAdd(t,r,i)},publicKeyTweakMul:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=a(i,!0),e.publicKeyTweakMul(t,r,i)},publicKeyCombine:function(t,r){n.isArray(t,o.EC_PUBLIC_KEYS_TYPE_INVALID),n.isLengthGTZero(t,o.EC_PUBLIC_KEYS_LENGTH_INVALID);for(var i=0;i=2&&("function"==typeof arguments[1]?r.task=arguments[1]:r.n=arguments[1]);var n=r.task;if(r.task=function(){n(t.leave)},t.current+r.n-e>t.capacity)return 1===e&&(t.current--,t.firstHere=!1),t.queue.push(r);t.current+=r.n-e,r.task(t.leave),1===e&&(t.firstHere=!1)},leave:function(e){if(e=e||1,t.current-=e,t.queue.length){var r=t.queue[0];r.n+t.current>t.capacity||(t.queue.shift(),t.current+=r.n,i(r.task))}else if(t.current<0)throw new Error("leave called too many times.")},available:function(e){return e=e||1,t.current+e<=t.capacity}};return t}void 0!==e&&e&&"function"==typeof e.nextTick&&(i=e.nextTick),"object"==typeof r?t.exports=o:"function"==typeof define&&define.amd?define(function(){return o}):n.semaphore=o}(this)}).call(this,e("_process"))},{_process:257}],302:[function(e,t,r){"use strict";t.exports="function"==typeof setImmediate?setImmediate:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}},{}],303:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":290}],304:[function(e,t,r){(r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":305,"./sha1":306,"./sha224":307,"./sha256":308,"./sha384":309,"./sha512":310}],305:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var l=0;l<80;++l){var d=~~(l/20),p=0|((t=n)<<5|t>>>27)+f(d,i,o,s)+u+r[l]+a[d];u=s,s=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=u},{"./hash":303,inherits:180,"safe-buffer":290}],306:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=(t=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|t>>>31;for(var d=0;d<80;++d){var p=~~(d/20),b=c(n)+h(p,i,o,s)+u+r[d]+a[p]|0;u=s,s=o,o=f(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=u},{"./hash":303,inherits:180,"safe-buffer":290}],307:[function(e,t,r){var n=e("inherits"),i=e("./sha256"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=u},{"./hash":303,"./sha256":308,inherits:180,"safe-buffer":290}],308:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,b=0|this._g,y=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+d(r[m-15])+r[m-16];for(var v=0;v<64;++v){var g=y+l(u)+c(u,p,b)+a[v]+r[v]|0,w=h(n)+f(n,i,o)|0;y=b,b=p,p=u,u=s+g|0,s=o,o=i,i=n,n=g+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=u},{"./hash":303,inherits:180,"safe-buffer":290}],309:[function(e,t,r){var n=e("inherits"),i=e("./sha512"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=u},{"./hash":303,"./sha512":310,inherits:180,"safe-buffer":290}],310:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,v=0|this._gh,g=0|this._hh,w=0|this._al,_=0|this._bl,A=0|this._cl,E=0|this._dl,x=0|this._el,k=0|this._fl,S=0|this._gl,M=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var T=t[I-30],U=t[I-30+1],j=d(T,U),B=p(U,T),P=b(T=t[I-4],U=t[I-4+1]),C=y(U,T),N=t[I-14],R=t[I-14+1],L=t[I-32],O=t[I-32+1],D=B+R|0,F=j+N+m(D,B)|0;F=(F=F+P+m(D=D+C|0,C)|0)+L+m(D=D+O|0,O)|0,t[I]=F,t[I+1]=D}for(var q=0;q<160;q+=2){F=t[q],D=t[q+1];var H=f(r,n,i),z=f(w,_,A),K=h(r,w),V=h(w,r),G=l(s,x),W=l(x,s),Y=a[q],X=a[q+1],Z=c(s,u,v),J=c(x,k,S),$=M+W|0,Q=g+G+m($,M)|0;Q=(Q=(Q=Q+Z+m($=$+J|0,J)|0)+Y+m($=$+X|0,X)|0)+F+m($=$+D|0,D)|0;var ee=V+z|0,te=K+H+m(ee,V)|0;g=v,M=S,v=u,S=k,u=s,k=x,s=o+Q+m(x=E+$|0,E)|0,o=i,E=A,i=n,A=_,n=r,_=w,r=Q+te+m(w=$+ee|0,$)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+A|0,this._dl=this._dl+E|0,this._el=this._el+x|0,this._fl=this._fl+k|0,this._gl=this._gl+S|0,this._hl=this._hl+M|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,A)|0,this._dh=this._dh+o+m(this._dl,E)|0,this._eh=this._eh+s+m(this._el,x)|0,this._fh=this._fh+u+m(this._fl,k)|0,this._gh=this._gh+v+m(this._gl,S)|0,this._hh=this._hh+g+m(this._hl,M)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=u},{"./hash":303,inherits:180,"safe-buffer":290}],311:[function(e,t,r){t.exports=i;var n=e("events").EventEmitter;function i(){n.call(this)}e("inherits")(i,n),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",c),e.on("error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},{events:157,inherits:180,"readable-stream/duplex.js":275,"readable-stream/passthrough.js":284,"readable-stream/readable.js":285,"readable-stream/transform.js":286,"readable-stream/writable.js":287}],312:[function(e,t,r){(function(t){var n=e("./lib/request"),i=e("./lib/response"),o=e("xtend"),a=e("builtin-status-codes"),s=e("url"),u=r;u.request=function(e,r){e="string"==typeof e?s.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,c=e.port,f=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+f,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var h=new n(e);return r&&h.on("response",r),h},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":314,"./lib/response":315,"builtin-status-codes":85,url:327,xtend:423}],313:[function(e,t,r){(function(e){r.fetch=s(e.fetch)&&s(e.ReadableStream),r.writableStream=s(e.WritableStream),r.abortController=s(e.AbortController),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(e){}var t;function n(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function i(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var o=void 0!==e.ArrayBuffer,a=o&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}r.arraybuffer=r.fetch||o&&i("arraybuffer"),r.msstream=!r.fetch&&a&&i("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&o&&i("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!n()&&s(n().overrideMimeType),r.vbArray=s(e.VBArray),t=null}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],314:[function(e,t,r){(function(r,n,i){var o=e("./capability"),a=e("inherits"),s=e("./response"),u=e("readable-stream"),c=e("to-arraybuffer"),f=s.IncomingMessage,h=s.readyStates;var l=t.exports=function(e){var t,r=this;u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+new i(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){r.setHeader(t,e.headers[t])});var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":o.vbArray&&e?"text:vbarray":"text"}(t,n),r.on("finish",function(){r._onFinish()})};a(l,u.Writable),l.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===d.indexOf(r)&&(this._headers[r]={name:e,value:t})},l.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},l.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},l.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,a=e._headers,s=null;"GET"!==t.method&&"HEAD"!==t.method&&(s=o.arraybuffer?c(i.concat(e._body)):o.blobConstructor?new n.Blob(e._body.map(function(e){return c(e)}),{type:(a["content-type"]||{}).value||""}):i.concat(e._body).toString());var u=[];if(Object.keys(a).forEach(function(e){var t=a[e].name,r=a[e].value;Array.isArray(r)?r.forEach(function(e){u.push([t,e])}):u.push([t,r])}),"fetch"===e._mode){var f=null;if(o.abortController){var l=new AbortController;f=l.signal,e._fetchAbortController=l,"requestTimeout"in t&&0!==t.requestTimeout&&n.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout)}n.fetch(e._opts.url,{method:e._opts.method,headers:u,body:s||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:f}).then(function(t){e._fetchResponse=t,e._connect()},function(t){e.emit("error",t)})}else{var d=e._xhr=new n.XMLHttpRequest;try{d.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}"responseType"in d&&(d.responseType=e._mode.split(":")[0]),"withCredentials"in d&&(d.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(d.timeout=t.requestTimeout,d.ontimeout=function(){e.emit("requestTimeout")}),u.forEach(function(e){d.setRequestHeader(e[0],e[1])}),e._response=null,d.onreadystatechange=function(){switch(d.readyState){case h.LOADING:case h.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(d.onprogress=function(){e._onXHRProgress()}),d.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{d.send(s)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}}}},l.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},l.prototype._connect=function(){var e=this;e._destroyed||(e._response=new f(e._xhr,e._fetchResponse,e._mode),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},l.prototype._write=function(e,t,r){this._body.push(e),r()},l.prototype.abort=l.prototype.destroy=function(){this._destroyed=!0,this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},l.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},l.prototype.flushHeaders=function(){},l.prototype.setTimeout=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":313,"./response":315,_process:257,buffer:84,inherits:180,"readable-stream":285,"to-arraybuffer":323}],315:[function(e,t,r){(function(t,n,i){var o=e("./capability"),a=e("inherits"),s=e("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=r.IncomingMessage=function(e,r,n){var a=this;if(s.Readable.call(a),a._mode=n,a.headers={},a.rawHeaders=[],a.trailers={},a.rawTrailers=[],a.on("end",function(){t.nextTick(function(){a.emit("close")})}),"fetch"===n){if(a._fetchResponse=r,a.url=r.url,a.statusCode=r.status,a.statusMessage=r.statusText,r.headers.forEach(function(e,t){a.headers[t.toLowerCase()]=e,a.rawHeaders.push(t,e)}),o.writableStream){var u=new WritableStream({write:function(e){return new Promise(function(t,r){a._destroyed||(a.push(new i(e))?t():a._resumeFetch=t)})},close:function(){a._destroyed||a.push(null)},abort:function(e){a._destroyed||a.emit("error",e)}});try{return void r.body.pipeTo(u)}catch(e){}}var c=r.body.getReader();!function e(){c.read().then(function(t){a._destroyed||(t.done?a.push(null):(a.push(new i(t.value)),e()))}).catch(function(e){a._destroyed||a.emit("error",e)})}()}else{if(a._xhr=e,a._pos=0,a.url=e.responseURL,a.statusCode=e.status,a.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===a.headers[r]&&(a.headers[r]=[]),a.headers[r].push(t[2])):void 0!==a.headers[r]?a.headers[r]+=", "+t[2]:a.headers[r]=t[2],a.rawHeaders.push(t[1],t[2])}}),a._charset="x-user-defined",!o.overrideMimeType){var f=a.rawHeaders["mime-type"];if(f){var h=f.match(/;\s*charset=([^;])(;|$)/);h&&(a._charset=h[1].toLowerCase())}a._charset||(a._charset="utf-8")}}};a(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new i(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var o=r.substr(e._pos);if("x-user-defined"===e._charset){for(var a=new i(o.length),s=0;se._pos&&(e.push(new i(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(r)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":313,_process:257,buffer:84,inherits:180,"readable-stream":285}],316:[function(e,t,r){"use strict";t.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},{}],317:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=h,t=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(r);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(r+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(r+2)}}(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":290}],318:[function(e,t,r){var n=e("is-hex-prefixed");t.exports=function(e){return"string"!=typeof e?e:n(e)?e.slice(2):e}},{"is-hex-prefixed":185}],319:[function(e,t,r){var n=function(){throw"This swarm.js function isn't available on the browser."},i={readFile:n},o={download:n,safeDownloadArchived:n,directoryTree:n},a={platform:n,arch:n},s={join:n,slice:n},u={spawn:n},c={lookup:n},f=e("xhr-request-promise"),h=e("eth-lib/lib/bytes"),l=e("./swarm-hash.js"),d=e("./pick.js"),p=e("./swarm");t.exports=p({fsp:i,files:o,os:a,path:s,child_process:u,defaultArchives:{},mimetype:c,request:f,downloadUrl:null,bytes:h,hash:l,pick:d})},{"./pick.js":320,"./swarm":322,"./swarm-hash.js":321,"eth-lib/lib/bytes":133,"xhr-request-promise":411}],320:[function(e,t,r){var n=function(e){return function(){return new Promise(function(t,r){var n=function(r){var n={},i=r.target.files.length,o=0;[].map.call(r.target.files,function(r){var a=new FileReader;a.onload=function(a){var s=new Uint8Array(a.target.result);if("directory"===e){var u=r.webkitRelativePath;n[u.slice(u.indexOf("/")+1)]={type:"text/plain",data:s},++o===i&&t(n)}else if("file"===e){var c=r.webkitRelativePath;t({type:mimetype.lookup(c),data:s})}else t(s)},a.readAsArrayBuffer(r)})},i=void 0;"directory"===e?((i=document.createElement("input")).addEventListener("change",n),i.type="file",i.webkitdirectory=!0,i.mozdirectory=!0,i.msdirectory=!0,i.odirectory=!0,i.directory=!0):((i=document.createElement("input")).addEventListener("change",n),i.type="file");var o=document.createEvent("MouseEvents");o.initEvent("click",!0,!1),i.dispatchEvent(o)})}};t.exports={data:n("data"),file:n("file"),directory:n("directory")}},{}],321:[function(e,t,r){var n=e("eth-lib/lib/hash").keccak256,i=e("eth-lib/lib/bytes"),o=function(e,t){var r=i.reverse(i.pad(6,i.fromNumber(e))),o=i.flatten([r,"0x0000",t]);return n(o).slice(2)};t.exports=function e(t){"string"==typeof t&&"0x"!==t.slice(0,2)?t=i.fromString(t):"string"!=typeof t&&void 0!==t.length&&(t=i.fromUint8Array(t));var r=i.length(t);if(r<=4096)return o(r,t);for(var n=4096;128*n0){var a=i.join(r,o);n.push(g(e)(t[o])(a))}return Promise.all(n).then(function(){return r})})}}},_=function(e){return function(t){return u(e+"/bzzr:/",{body:"string"==typeof t?L(t):t,method:"POST"})}},A=function(e){return function(t){return function(r){return function(n){return function i(o){var a="/"===r[0]?r:"/"+r,s=e+"/bzz:/"+t+a,c={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return u(s,c).then(function(e){if(-1!==e.indexOf("error"))throw e;return e}).catch(function(e){return o>0&&i(o-1)})}(3)}}}},E=function(e){return function(t){return k(e)({"":t})}},x=function(e){return function(r){return t.readFile(r).then(function(t){return E(e)({type:a.lookup(r),data:t})})}},k=function(e){return function(t){return _(e)("{}").then(function(r){return Object.keys(t).reduce(function(r,n){return r.then(function(r){return function(n){return A(e)(n)(r)(t[r])}}(n))},Promise.resolve(r))})}},S=function(e){return function(r){return t.readFile(r).then(_(e))}},M=function(e){return function(n){return function(i){return r.directoryTree(i).then(function(e){return Promise.all(e.map(function(e){return t.readFile(e)})).then(function(t){var r=e.map(function(e){return e.slice(i.length)}),n=e.map(function(e){return a.lookup(e)||"text/plain"});return d(r)(t.map(function(e,t){return{type:n[t],data:e}}))})}).then(function(e){return(t=n?{"":e[n]}:{},function(e){var r={};for(var n in t)r[n]=t[n];for(var i in e)r[i]=e[i];return r})(e);var t}).then(k(e))}}},I=function(e){return function(t){if("data"===t.pick)return l.data().then(_(e));if("file"===t.pick)return l.file().then(E(e));if("directory"===t.pick)return l.directory().then(k(e));if(t.path)switch(t.kind){case"data":return S(e)(t.path);case"file":return x(e)(t.path);case"directory":return M(e)(t.defaultFile)(t.path)}else{if(t.length||"string"==typeof t)return _(e)(t);if(t instanceof Object)return k(e)(t)}return Promise.reject(new Error("Bad arguments"))}},T=function(e){return function(t){return function(r){return C(e)(t).then(function(n){return n?r?w(e)(t)(r):v(e)(t):r?g(e)(t)(r):b(e)(t)})}}},U=function(e,t){var i=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),o=(t||s)[i],a=c+o.archive+".tar.gz",u=o.archiveMD5,f=o.binaryMD5;return r.safeDownloadArchived(a)(u)(f)(e)},j=function(e){return new Promise(function(t,r){var n=o.spawn,i=function(e){return function(t){return-1!==(""+t).indexOf(e)}},a=e.account,s=e.password,u=e.dataDir,c=e.ensApi,f=e.privateKey,h=0,l=n(e.binPath,["--bzzaccount",a||f,"--datadir",u,"--ens-api",c]),d=function(e){0===h&&i("Passphrase")(e)?setTimeout(function(){h=1,l.stdin.write(s+"\n")},500):i("Swarm http proxy started")(e)&&(h=2,clearTimeout(p),t(l))};l.stdout.on("data",d),l.stderr.on("data",d);var p=setTimeout(function(){return r(new Error("Couldn't start swarm process."))},2e4)})},B=function(e){return new Promise(function(t,r){e.stderr.removeAllListeners("data"),e.stdout.removeAllListeners("data"),e.stdin.removeAllListeners("error"),e.removeAllListeners("error"),e.removeAllListeners("exit"),e.kill("SIGINT");var n=setTimeout(function(){return e.kill("SIGKILL")},8e3);e.once("close",function(){clearTimeout(n),t()})})},P=function(e){return _(e)("test").then(function(e){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===e}).catch(function(){return!1})},C=function(e){return function(t){return b(e)(t).then(function(e){try{return!!JSON.parse(R(e)).entries}catch(e){return!1}})}},N=function(e){return function(t,r,n,i,o){var a;return void 0!==t&&(a=e(t)),void 0!==r&&(a=e(r)),void 0!==n&&(a=e(n)),void 0!==i&&(a=e(i)),void 0!==o&&(a=e(o)),a}},R=function(e){return f.toString(f.fromUint8Array(e))},L=function(e){return f.toUint8Array(f.fromString(e))},O=function(e){return{download:function(t,r){return T(e)(t)(r)},downloadData:N(b(e)),downloadDataToDisk:N(g(e)),downloadDirectory:N(v(e)),downloadDirectoryToDisk:N(w(e)),downloadEntries:N(y(e)),downloadRoutes:N(m(e)),isAvailable:function(){return P(e)},upload:function(t){return I(e)(t)},uploadData:N(_(e)),uploadFile:N(E(e)),uploadFileFromDisk:N(E(e)),uploadDataFromDisk:N(S(e)),uploadDirectory:N(k(e)),uploadDirectoryFromDisk:N(M(e)),uploadToManifest:N(A(e)),pick:l,hash:h,fromString:L,toString:R}};return{at:O,local:function(e){return function(t){return P("http://localhost:8500").then(function(r){return r?t(O("http://localhost:8500")).then(function(){}):U(e.binPath,e.archives).onData(function(t){return(e.onProgress||function(){})(t.length)}).then(function(){return j(e)}).then(function(e){return t(O("http://localhost:8500")).then(function(){return e})}).then(B)})}},download:T,downloadBinary:U,downloadData:b,downloadDataToDisk:g,downloadDirectory:v,downloadDirectoryToDisk:w,downloadEntries:y,downloadRoutes:m,isAvailable:P,startProcess:j,stopProcess:B,upload:I,uploadData:_,uploadDataFromDisk:S,uploadFile:E,uploadFileFromDisk:x,uploadDirectory:k,uploadDirectoryFromDisk:M,uploadToManifest:A,pick:l,hash:h,fromString:L,toString:R}}},{}],323:[function(e,t,r){var n=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,i=0;i=0&&t<=A};function k(e){return function(t,r,n,i){r=m(r,i,4);var o=!x(t)&&y.keys(t),a=(o||t).length,s=e>0?0:a-1;return arguments.length<3&&(n=t[o?o[s]:s],s+=e),function(t,r,n,i,o,a){for(;o>=0&&o=0},y.invoke=function(e,t){var r=u.call(arguments,2),n=y.isFunction(t);return y.map(e,function(e){var i=n?t:e[t];return null==i?i:i.apply(e,r)})},y.pluck=function(e,t){return y.map(e,y.property(t))},y.where=function(e,t){return y.filter(e,y.matcher(t))},y.findWhere=function(e,t){return y.find(e,y.matcher(t))},y.max=function(e,t,r){var n,i,o=-1/0,a=-1/0;if(null==t&&null!=e)for(var s=0,u=(e=x(e)?e:y.values(e)).length;so&&(o=n);else t=v(t,r),y.each(e,function(e,r,n){((i=t(e,r,n))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)});return o},y.min=function(e,t,r){var n,i,o=1/0,a=1/0;if(null==t&&null!=e)for(var s=0,u=(e=x(e)?e:y.values(e)).length;sn||void 0===r)return 1;if(r0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(r&&o&&s)return n[o=r(n,i)]===i?o:-1;if(i!=i)return(o=t(u.call(n,a,s),y.isNaN))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&ot?(a&&(clearTimeout(a),a=null),s=c,o=e.apply(n,i),a||(n=i=null)):a||!1===r.trailing||(a=setTimeout(u,f)),o}},y.debounce=function(e,t,r){var n,i,o,a,s,u=function(){var c=y.now()-a;c=0?n=setTimeout(u,t-c):(n=null,r||(s=e.apply(o,i),n||(o=i=null)))};return function(){o=this,i=arguments,a=y.now();var c=r&&!n;return n||(n=setTimeout(u,t)),c&&(s=e.apply(o,i),o=i=null),s}},y.wrap=function(e,t){return y.partial(t,e)},y.negate=function(e){return function(){return!e.apply(this,arguments)}},y.compose=function(){var e=arguments,t=e.length-1;return function(){for(var r=t,n=e[t].apply(this,arguments);r--;)n=e[r].call(this,n);return n}},y.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},y.before=function(e,t){var r;return function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=null),r}},y.once=y.partial(y.before,2);var j=!{toString:null}.propertyIsEnumerable("toString"),B=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function P(e,t){var r=B.length,n=e.constructor,i=y.isFunction(n)&&n.prototype||o,a="constructor";for(y.has(e,a)&&!y.contains(t,a)&&t.push(a);r--;)(a=B[r])in e&&e[a]!==i[a]&&!y.contains(t,a)&&t.push(a)}y.keys=function(e){if(!y.isObject(e))return[];if(l)return l(e);var t=[];for(var r in e)y.has(e,r)&&t.push(r);return j&&P(e,t),t},y.allKeys=function(e){if(!y.isObject(e))return[];var t=[];for(var r in e)t.push(r);return j&&P(e,t),t},y.values=function(e){for(var t=y.keys(e),r=t.length,n=Array(r),i=0;i":">",'"':""","'":"'","`":"`"},R=y.invert(N),L=function(e){var t=function(t){return e[t]},r="(?:"+y.keys(e).join("|")+")",n=RegExp(r),i=RegExp(r,"g");return function(e){return e=null==e?"":""+e,n.test(e)?e.replace(i,t):e}};y.escape=L(N),y.unescape=L(R),y.result=function(e,t,r){var n=null==e?void 0:e[t];return void 0===n&&(n=r),y.isFunction(n)?n.call(e):n};var O=0;y.uniqueId=function(e){var t=++O+"";return e?e+t:t},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var D=/(.)^/,F={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},q=/\\|'|\r|\n|\u2028|\u2029/g,H=function(e){return"\\"+F[e]};y.template=function(e,t,r){!t&&r&&(t=r),t=y.defaults({},t,y.templateSettings);var n=RegExp([(t.escape||D).source,(t.interpolate||D).source,(t.evaluate||D).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(n,function(t,r,n,a,s){return o+=e.slice(i,s).replace(q,H),i=s+t.length,r?o+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t}),o+="';\n",t.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(t.variable||"obj","_",o)}catch(e){throw e.source=o,e}var s=function(e){return a.call(this,e,y)},u=t.variable||"obj";return s.source="function("+u+"){\n"+o+"}",s},y.chain=function(e){var t=y(e);return t._chain=!0,t};var z=function(e,t){return e._chain?y(t).chain():t};y.mixin=function(e){y.each(y.functions(e),function(t){var r=y[t]=e[t];y.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),z(this,r.apply(y,e))}})},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=i[e];y.prototype[e]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==e&&"splice"!==e||0!==r.length||delete r[0],z(this,r)}}),y.each(["concat","join","slice"],function(e){var t=i[e];y.prototype[e]=function(){return z(this,t.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return y})}).call(this)},{}],326:[function(e,t,r){t.exports=function(e,t){if(t){t=(t=t.trim().replace(/^(\?|#|&)/,""))?"?"+t:t;var r=e.split(/[\?\#]/),n=r[0];t&&/\:\/\/[^\/]*$/.test(n)&&(n+="/");var i=e.match(/(\#.*)$/);e=n+t,i&&(e+=i[0])}return e}},{}],327:[function(e,t,r){"use strict";var n=e("punycode"),i=e("./util");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=g,r.resolve=function(e,t){return g(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?g(e,!1,!0).resolveObject(t):t},r.format=function(e){i.isString(e)&&(e=g(e));return e instanceof o?e.format():o.prototype.format.call(e)},r.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(c),h=["%","/","?",";","#"].concat(f),l=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=e("querystring");function g(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o127?P+="x":P+=B[C];if(!P.match(d)){var R=U.slice(0,M),L=U.slice(M+1),O=B.match(p);O&&(R.push(O[1]),L.unshift(O[2])),L.length&&(g="/"+L.join(".")+g),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+D,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==g[0]&&(g="/"+g))}if(!b[A])for(M=0,j=f.length;M0)&&r.host.split("@"))&&(r.auth=T.shift(),r.host=r.hostname=T.shift());return r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=E.slice(-1)[0],S=(r.host||e.host||E.length>1)&&("."===k||".."===k)||""===k,M=0,I=E.length;I>=0;I--)"."===(k=E[I])?E.splice(I,1):".."===k?(E.splice(I,1),M++):M&&(E.splice(I,1),M--);if(!_&&!A)for(;M--;M)E.unshift("..");!_||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),S&&"/"!==E.join("/").substr(-1)&&E.push("");var T,U=""===E[0]||E[0]&&"/"===E[0].charAt(0);x&&(r.hostname=r.host=U?"":E.length?E.shift():"",(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.host=r.hostname=T.shift()));return(_=_||r.host&&E.length)&&!U&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":328,punycode:265,querystring:269}],328:[function(e,t,r){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],329:[function(e,t,r){(function(e){!function(n){var i="object"==typeof r&&r,o="object"==typeof t&&t&&t.exports==i&&t,a="object"==typeof e&&e;a.global!==a&&a.window!==a||(n=a);var s,u,c,f=String.fromCharCode;function h(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function d(e,t){return f(e>>t&63|128)}function p(e){if(0==(4294967168&e))return f(e);var t="";return 0==(4294965248&e)?t=f(e>>6&31|192):0==(4294901760&e)?(l(e),t=f(e>>12&15|224),t+=d(e,6)):0==(4292870144&e)&&(t=f(e>>18&7|240),t+=d(e,12),t+=d(e,6)),t+=f(63&e|128)}function b(){if(c>=u)throw Error("Invalid byte index");var e=255&s[c];if(c++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function y(){var e,t;if(c>u)throw Error("Invalid byte index");if(c==u)return!1;if(e=255&s[c],c++,0==(128&e))return e;if(192==(224&e)){if((t=(31&e)<<6|b())>=128)return t;throw Error("Invalid continuation byte")}if(224==(240&e)){if((t=(15&e)<<12|b()<<6|b())>=2048)return l(t),t;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=(15&e)<<18|b()<<12|b()<<6|b())>=65536&&t<=1114111)return t;throw Error("Invalid UTF-8 detected")}var m={version:"2.0.0",encode:function(e){for(var t=h(e),r=t.length,n=-1,i="";++n65535&&(i+=f((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=f(t);return i}(r)}};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return m});else if(i&&!i.nodeType)if(o)o.exports=m;else{var v={}.hasOwnProperty;for(var g in m)v.call(m,g)&&(i[g]=m[g])}else n.utf8=m}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],330:[function(e,t,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],331:[function(e,t,r){arguments[4][180][0].apply(r,arguments)},{dup:180}],332:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],333:[function(e,t,r){(function(t,n){var i=/%[sdj%]/g;r.format=function(e){if(!m(e)){for(var t=[],r=0;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,e,n.depth)}function u(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function f(e,t,n){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return m(i)||(i=f(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(y(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(b(t))return e.stylize("null","null")}(e,t);if(o)return o;var a=Object.keys(t),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),A(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(t);if(0===a.length){if(E(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(g(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(_(t))return e.stylize(Date.prototype.toString.call(t),"date");if(A(t))return h(t)}var c,w="",x=!1,k=["{","}"];(d(t)&&(x=!0,k=["[","]"]),E(t))&&(w=" [Function"+(t.name?": "+t.name:"")+"]");return g(t)&&(w=" "+RegExp.prototype.toString.call(t)),_(t)&&(w=" "+Date.prototype.toUTCString.call(t)),A(t)&&(w=" "+h(t)),0!==a.length||x&&0!=t.length?n<0?g(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=x?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,w,k)):k[0]+w+k[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),M(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=b(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function b(e){return null===e}function y(e){return"number"==typeof e}function m(e){return"string"==typeof e}function v(e){return void 0===e}function g(e){return w(e)&&"[object RegExp]"===x(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===x(e)}function A(e){return w(e)&&("[object Error]"===x(e)||e instanceof Error)}function E(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(v(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var n=t.pid;a[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else a[e]=function(){};return a[e]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=p,r.isNull=b,r.isNullOrUndefined=function(e){return null==e},r.isNumber=y,r.isString=m,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=v,r.isRegExp=g,r.isObject=w,r.isDate=_,r.isError=A,r.isFunction=E,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){var e,t;console.log("%s - %s",(e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":"),[e.getDate(),S[e.getMonth()],t].join(" ")),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":332,_process:257,inherits:331}],334:[function(require,module,exports){var indexOf=require("indexof"),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},c.prototype.getCall=function(e){return n.isFunction(this.call)?this.call(e):this.call},c.prototype.extractCallback=function(e){if(n.isFunction(e[e.length-1]))return e.pop()},c.prototype.validateArgs=function(e){if(e.length!==this.params)throw i.InvalidNumberOfParams(e.length,this.params,this.name)},c.prototype.formatInput=function(e){var t=this;return this.inputFormatter?this.inputFormatter.map(function(r,n){return r?r.call(t,e[n]):e[n]}):e},c.prototype.formatOutput=function(e){var t=this;return n.isArray(e)?e.map(function(e){return t.outputFormatter&&e?t.outputFormatter(e):e}):this.outputFormatter&&e?this.outputFormatter(e):e},c.prototype.toPayload=function(e){var t=this.getCall(e),r=this.extractCallback(e),n=this.formatInput(e);this.validateArgs(n);var i={method:t,params:n,callback:r};return this.transformPayload&&(i=this.transformPayload(i)),i},c.prototype._confirmTransaction=function(e,t,r){var i=this,f=!1,h=!0,l=0,d=0,p=null,b="",y=n.isObject(r.params[0])&&r.params[0].gas?r.params[0].gas:null,m=n.isObject(r.params[0])&&r.params[0].data&&r.params[0].from&&!r.params[0].to,v=[new c({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:o.outputTransactionReceiptFormatter}),new c({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter]}),new u({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:o.outputBlockFormatter}}})],g={};n.each(v,function(e){e.attachToObject(g),e.requestManager=i.requestManager});var w=function(r,n,o,u,c){if(!o)return c||(c={unsubscribe:function(){clearInterval(p)}}),(r?s.resolve(r):g.getTransactionReceipt(t)).catch(function(t){c.unsubscribe(),f=!0,a._fireError({message:"Failed to check for transaction receipt:",data:t},e.eventEmitter,e.reject)}).then(function(t){if(!t||!t.blockHash)throw new Error("Receipt missing or blockHash null");return i.extraFormatters&&i.extraFormatters.receiptFormatter&&(t=i.extraFormatters.receiptFormatter(t)),e.eventEmitter.listeners("confirmation").length>0&&(void 0!==r&&0===d||e.eventEmitter.emit("confirmation",d,t),h=!1,25===++d&&(c.unsubscribe(),e.eventEmitter.removeAllListeners())),t}).then(function(t){if(m&&!f){if(!t.contractAddress)return h&&(c.unsubscribe(),f=!0),void a._fireError(new Error("The transaction receipt didn't contain a contract address."),e.eventEmitter,e.reject);g.getCode(t.contractAddress,function(r,n){n&&(n.length>2?(e.eventEmitter.emit("receipt",t),i.extraFormatters&&i.extraFormatters.contractDeployFormatter?e.resolve(i.extraFormatters.contractDeployFormatter(t)):e.resolve(t),h&&e.eventEmitter.removeAllListeners()):a._fireError(new Error("The contract code couldn't be stored, please check your gas limit."),e.eventEmitter,e.reject),h&&c.unsubscribe(),f=!0)})}return t}).then(function(t){m||f||(t.outOfGas||y&&y===t.gasUsed||!0!==t.status&&"0x1"!==t.status&&void 0!==t.status?(b=JSON.stringify(t,null,2),!1===t.status||"0x0"===t.status?a._fireError(new Error("Transaction has been reverted by the EVM:\n"+b),e.eventEmitter,e.reject):a._fireError(new Error("Transaction ran out of gas. Please provide more gas:\n"+b),e.eventEmitter,e.reject)):(e.eventEmitter.emit("receipt",t),e.resolve(t),h&&e.eventEmitter.removeAllListeners()),h&&c.unsubscribe(),f=!0)}).catch(function(){l++,n?l-1>=750&&(c.unsubscribe(),f=!0,a._fireError(new Error("Transaction was not mined within750 seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject)):l-1>=50&&(c.unsubscribe(),f=!0,a._fireError(new Error("Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject))});c.unsubscribe(),f=!0,a._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:o},e.eventEmitter,e.reject)},_=function(e){n.isFunction(this.requestManager.provider.on)?g.subscribe("newBlockHeaders",w.bind(null,e,!1)):p=setInterval(w.bind(null,e,!0),1e3)}.bind(this);g.getTransactionReceipt(t).then(function(t){t&&t.blockHash?(e.eventEmitter.listeners("confirmation").length>0&&_(t),w(t,!1)):f||_()}).catch(function(){f||_()})};var f=function(e,t){return n.isNumber(e)?t.wallet[e]:n.isObject(e)&&e.address&&e.privateKey?e:t.wallet[e.toLowerCase()]};c.prototype.buildCall=function(){var e=this,t="eth_sendTransaction"===e.call||"eth_sendRawTransaction"===e.call,r=function(){var r=s(!t),i=e.toPayload(Array.prototype.slice.call(arguments)),o=function(n,o){try{o=e.formatOutput(o)}catch(e){n=e}if(o instanceof Error&&(n=o),n)return n.error&&(n=n.error),a._fireError(n,r.eventEmitter,r.reject,i.callback);i.callback&&i.callback(null,o),t?(r.eventEmitter.emit("transactionHash",o),e._confirmTransaction(r,o,i)):n||r.resolve(o)},u=function(t){var r=n.extend({},i,{method:"eth_sendRawTransaction",params:[t.rawTransaction]});e.requestManager.send(r,o)},h=function(e,t){var i;if(t&&t.accounts&&t.accounts.wallet&&t.accounts.wallet.length)if("eth_sendTransaction"===e.method){var a=e.params[0];if((i=f(n.isObject(a)?a.from:null,t.accounts))&&i.privateKey)return t.accounts.signTransaction(n.omit(a,"from"),i.privateKey).then(u)}else if("eth_sign"===e.method){var s=e.params[1];if((i=f(e.params[0],t.accounts))&&i.privateKey){var c=t.accounts.sign(s,i.privateKey);return e.callback&&e.callback(null,c.signature),void r.resolve(c.signature)}}return t.requestManager.send(e,o)};t&&n.isObject(i.params[0])&&void 0===i.params[0].gasPrice?new c({name:"getGasPrice",call:"eth_gasPrice",params:0}).createFunction(e.requestManager)(function(t,r){r&&(i.params[0].gasPrice=r),h(i,e)}):h(i,e);return r.eventEmitter};return r.method=e,r.request=this.request.bind(this),r},c.prototype.request=function(){var e=this.toPayload(Array.prototype.slice.call(arguments));return e.format=this.formatOutput.bind(this),e},t.exports=c},{underscore:325,"web3-core-helpers":338,"web3-core-promievent":340,"web3-core-subscriptions":345,"web3-utils":403}],340:[function(e,t,r){"use strict";var n=e("eventemitter3"),i=e("any-promise"),o=function(e){var t,r,o=new i(function(){t=arguments[0],r=arguments[1]});if(e)return{resolve:t,reject:r,eventEmitter:o};var a=new n;return o._events=a._events,o.emit=a.emit,o.on=a.on,o.once=a.once,o.off=a.off,o.listeners=a.listeners,o.addListener=a.addListener,o.removeListener=a.removeListener,o.removeAllListeners=a.removeAllListeners,{resolve:t,reject:r,eventEmitter:o}};o.resolve=function(e){var t=o(!0);return t.resolve(e),t.eventEmitter},t.exports=o},{"any-promise":2,eventemitter3:156}],341:[function(e,t,r){"use strict";var n=e("./jsonrpc"),i=e("web3-core-helpers").errors,o=function(e){this.requestManager=e,this.requests=[]};o.prototype.add=function(e){this.requests.push(e)},o.prototype.execute=function(){var e=this.requests;this.requestManager.sendBatch(e,function(t,r){r=r||[],e.map(function(e,t){return r[t]||{}}).forEach(function(t,r){if(e[r].callback){if(t&&t.error)return e[r].callback(i.ErrorResponse(t));if(!n.isValidResponse(t))return e[r].callback(i.InvalidResponse(t));try{e[r].callback(null,e[r].format?e[r].format(t.result):t.result)}catch(t){e[r].callback(t)}}})})},t.exports=o},{"./jsonrpc":344,"web3-core-helpers":338}],342:[function(e,t,r){"use strict";var n=null,i=window;void 0!==i.ethereumProvider?n=i.ethereumProvider:void 0!==i.web3&&i.web3.currentProvider&&(i.web3.currentProvider.sendAsync&&(i.web3.currentProvider.send=i.web3.currentProvider.sendAsync,delete i.web3.currentProvider.sendAsync),!i.web3.currentProvider.on&&i.web3.currentProvider.connection&&"ipcProviderWrapper"===i.web3.currentProvider.connection.constructor.name&&(i.web3.currentProvider.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");switch(e){case"data":this.connection.on("data",function(e){var r="";e=e.toString();try{r=JSON.parse(e)}catch(r){return t(new Error("Couldn't parse response data"+e))}r.id||-1===r.method.indexOf("_subscription")||t(null,r)});break;default:this.connection.on(e,t)}}),n=i.web3.currentProvider),t.exports=n},{}],343:[function(e,t,r){"use strict";var n=e("underscore"),i=e("web3-core-helpers").errors,o=e("./jsonrpc.js"),a=e("./batch.js"),s=e("./givenProvider.js"),u=function e(t){this.provider=null,this.providers=e.providers,this.setProvider(t),this.subscriptions={}};u.givenProvider=s,u.providers={WebsocketProvider:e("web3-providers-ws"),HttpProvider:e("web3-providers-http"),IpcProvider:e("web3-providers-ipc")},u.prototype.setProvider=function(e,t){var r=this;if(e&&"string"==typeof e&&this.providers)if(/^http(s)?:\/\//i.test(e))e=new this.providers.HttpProvider(e);else if(/^ws(s)?:\/\//i.test(e))e=new this.providers.WebsocketProvider(e);else if(e&&"object"==typeof t&&"function"==typeof t.connect)e=new this.providers.IpcProvider(e,t);else if(e)throw new Error("Can't autodetect provider for \""+e+'"');this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=e||null,this.provider&&this.provider.on&&this.provider.on("data",function(e,t){(e=e||t).method&&r.subscriptions[e.params.subscription]&&r.subscriptions[e.params.subscription].callback&&r.subscriptions[e.params.subscription].callback(null,e.params.result)})},u.prototype.send=function(e,t){if(t=t||function(){},!this.provider)return t(i.InvalidProvider());var r=o.toPayload(e.method,e.params);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,function(e,n){return n&&n.id&&r.id!==n.id?t(new Error('Wrong response id "'+n.id+'" (expected: "'+r.id+'") in '+JSON.stringify(r))):e?t(e):n&&n.error?t(i.ErrorResponse(n)):o.isValidResponse(n)?void t(null,n.result):t(i.InvalidResponse(n))})},u.prototype.sendBatch=function(e,t){if(!this.provider)return t(i.InvalidProvider());var r=o.toBatchPayload(e);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,function(e,r){return e?t(e):n.isArray(r)?void t(null,r):t(i.InvalidResponse(r))})},u.prototype.addSubscription=function(e,t,r,n){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions[e]={callback:n,type:r,name:t}},u.prototype.removeSubscription=function(e,t){this.subscriptions[e]&&(this.send({method:this.subscriptions[e].type+"_unsubscribe",params:[e]},t),delete this.subscriptions[e])},u.prototype.clearSubscriptions=function(e){var t=this;Object.keys(this.subscriptions).forEach(function(r){e&&"syncing"===t.subscriptions[r].name||t.removeSubscription(r)}),this.provider.reset&&this.provider.reset()},t.exports={Manager:u,BatchManager:a}},{"./batch.js":341,"./givenProvider.js":342,"./jsonrpc.js":344,underscore:325,"web3-core-helpers":338,"web3-providers-http":398,"web3-providers-ipc":399,"web3-providers-ws":400}],344:[function(e,t,r){"use strict";var n={messageId:0,toPayload:function(e,t){if(!e)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(t)+'"!');return n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:e,params:t||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!(!e||e.error||"2.0"!==e.jsonrpc||"number"!=typeof e.id&&"string"!=typeof e.id||void 0===e.result)}},toBatchPayload:function(e){return e.map(function(e){return n.toPayload(e.method,e.params)})}};t.exports=n},{}],345:[function(e,t,r){"use strict";var n=e("./subscription.js"),i=function(e){this.name=e.name,this.type=e.type,this.subscriptions=e.subscriptions||{},this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.attachToObject=function(e){var t=this.buildCall(),r=this.name.split(".");r.length>1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},i.prototype.buildCall=function(){var e=this;return function(){e.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var t=new n({subscription:e.subscriptions[arguments[0]],requestManager:e.requestManager,type:e.type});return t.subscribe.apply(t,arguments)}},t.exports={subscriptions:i,subscription:n}},{"./subscription.js":346}],346:[function(e,t,r){"use strict";var n=e("underscore"),i=e("web3-core-helpers").errors,o=e("eventemitter3");function a(e){o.call(this),this.id=null,this.callback=n.identity,this.arguments=null,this._reconnectIntervalId=null,this.options={subscription:e.subscription,type:e.type,requestManager:e.requestManager}}a.prototype=Object.create(o.prototype),a.prototype.constructor=a,a.prototype._extractCallback=function(e){if(n.isFunction(e[e.length-1]))return e.pop()},a.prototype._validateArgs=function(e){var t=this.options.subscription;if(t||(t={}),t.params||(t.params=0),e.length!==t.params)throw i.InvalidNumberOfParams(e.length,t.params+1,e[0])},a.prototype._formatInput=function(e){var t=this.options.subscription;return t&&t.inputFormatter?t.inputFormatter.map(function(t,r){return t?t(e[r]):e[r]}):e},a.prototype._formatOutput=function(e){var t=this.options.subscription;return t&&t.outputFormatter&&e?t.outputFormatter(e):e},a.prototype._toPayload=function(e){var t=[];if(this.callback=this._extractCallback(e)||n.identity,this.subscriptionMethod||(this.subscriptionMethod=e.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(e),this._validateArgs(this.arguments),e=[]),t.push(this.subscriptionMethod),t=t.concat(this.arguments),e.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:t}},a.prototype.unsubscribe=function(e){this.options.requestManager.removeSubscription(this.id,e),this.id=null,this.removeAllListeners(),clearInterval(this._reconnectIntervalId)},a.prototype.subscribe=function(){var e=this,t=Array.prototype.slice.call(arguments),r=this._toPayload(t);if(!r)return this;if(!this.options.requestManager.provider){var i=new Error("No provider set.");return this.callback(i,null,this),this.emit("error",i),this}if(!this.options.requestManager.provider.on){var o=new Error("The current provider doesn't support subscriptions: "+this.options.requestManager.provider.constructor.name);return this.callback(o,null,this),this.emit("error",o),this}return this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&n.isObject(r.params[1])&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)&&this.options.requestManager.send({method:"eth_getLogs",params:[r.params[1]]},function(t,r){t?(e.callback(t,null,e),e.emit("error",t)):r.forEach(function(t){var r=e._formatOutput(t);e.callback(null,r,e),e.emit("data",r)})}),"object"==typeof r.params[1]&&delete r.params[1].fromBlock,this.options.requestManager.send(r,function(t,i){!t&&i?(e.id=i,e.options.requestManager.addSubscription(e.id,r.params[0],e.options.type,function(t,r){t?(e.options.requestManager.removeSubscription(e.id),e.options.requestManager.provider.once&&(e._reconnectIntervalId=setInterval(function(){e.options.requestManager.provider.reconnect&&e.options.requestManager.provider.reconnect()},500),e.options.requestManager.provider.once("connect",function(){clearInterval(e._reconnectIntervalId),e.subscribe(e.callback)})),e.emit("error",t),e.callback(t,null,e)):(n.isArray(r)||(r=[r]),r.forEach(function(t){var r=e._formatOutput(t);if(n.isFunction(e.options.subscription.subscriptionHandler))return e.options.subscription.subscriptionHandler.call(e,r);e.emit("data",r),e.callback(null,r,e)}))})):(e.callback(t,null,e),e.emit("error",t))}),this},t.exports=a},{eventemitter3:156,underscore:325,"web3-core-helpers":338}],347:[function(e,t,r){"use strict";var n=e("web3-core-helpers").formatters,i=e("web3-core-method"),o=e("web3-utils");t.exports=function(e){var t=function(t){var r;return t.property?(e[t.property]||(e[t.property]={}),r=e[t.property]):r=e,t.methods&&t.methods.forEach(function(t){t instanceof i||(t=new i(t)),t.attachToObject(r),t.setRequestManager(e._requestManager)}),e};return t.formatters=n,t.utils=o,t.Method=i,t}},{"web3-core-helpers":338,"web3-core-method":339,"web3-utils":403}],348:[function(e,t,r){"use strict";var n=e("web3-core-requestmanager"),i=e("./extend.js");t.exports={packageInit:function(e,t){if(t=Array.prototype.slice.call(t),!e)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(e,"currentProvider",{get:function(){return e._provider},set:function(t){return e.setProvider(t)},enumerable:!0,configurable:!0}),t[0]&&t[0]._requestManager?e._requestManager=new n.Manager(t[0].currentProvider):(e._requestManager=new n.Manager,e._requestManager.setProvider(t[0],t[1])),e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers,e._provider=e._requestManager.provider,e.setProvider||(e.setProvider=function(t,r){return e._requestManager.setProvider(t,r),e._provider=e._requestManager.provider,!0}),e.BatchRequest=n.BatchManager.bind(null,e._requestManager),e.extend=i(e)},addProviders:function(e){e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers}}},{"./extend.js":347,"web3-core-requestmanager":343}],349:[function(e,t,r){var n=e("underscore"),i=e("web3-utils"),o=new(0,e("ethers/utils/abi-coder").AbiCoder)(function(e,t){return!e.match(/^u?int/)||n.isArray(t)||n.isObject(t)&&"BN"===t.constructor.name?t:t.toString()});function a(){}var s=function(){};s.prototype.encodeFunctionSignature=function(e){return n.isObject(e)&&(e=i._jsonInterfaceMethodToString(e)),i.sha3(e).slice(0,10)},s.prototype.encodeEventSignature=function(e){return n.isObject(e)&&(e=i._jsonInterfaceMethodToString(e)),i.sha3(e)},s.prototype.encodeParameter=function(e,t){return this.encodeParameters([e],[t])},s.prototype.encodeParameters=function(e,t){return o.encode(this.mapTypes(e),t)},s.prototype.mapTypes=function(e){var t=this,r=[];return e.forEach(function(e){if(t.isSimplifiedStructFormat(e)){var n=Object.keys(e)[0];r.push(Object.assign(t.mapStructNameAndType(n),{components:t.mapStructToCoderFormat(e[n])}))}else r.push(e)}),r},s.prototype.isSimplifiedStructFormat=function(e){return"object"==typeof e&&void 0===e.components&&void 0===e.name},s.prototype.mapStructNameAndType=function(e){var t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}},s.prototype.mapStructToCoderFormat=function(e){var t=this,r=[];return Object.keys(e).forEach(function(n){"object"!=typeof e[n]?r.push({name:n,type:e[n]}):r.push(Object.assign(t.mapStructNameAndType(n),{components:t.mapStructToCoderFormat(e[n])}))}),r},s.prototype.encodeFunctionCall=function(e,t){return this.encodeFunctionSignature(e)+this.encodeParameters(e.inputs,t).replace("0x","")},s.prototype.decodeParameter=function(e,t){return this.decodeParameters([e],t)[0]},s.prototype.decodeParameters=function(e,t){if(!t||"0x"===t||"0X"===t)throw new Error("Returned values aren't valid, did it run Out of Gas?");var r=o.decode(this.mapTypes(e),"0x"+t.replace(/0x/i,"")),i=new a;return i.__length__=0,e.forEach(function(e,t){var o=r[i.__length__];o="0x"===o?null:o,i[t]=o,n.isObject(e)&&e.name&&(i[e.name]=o),i.__length__++}),i},s.prototype.decodeLog=function(e,t,r){var i=this;r=n.isArray(r)?r:[r],t=t||"";var o=[],s=[],u=0;e.forEach(function(e,t){e.indexed?(s[t]=["bool","int","uint","address","fixed","ufixed"].find(function(t){return-1!==e.type.indexOf(t)})?i.decodeParameter(e.type,r[u]):r[u],u++):o[t]=e});var c=t,f=c?this.decodeParameters(o,c):[],h=new a;return h.__length__=0,e.forEach(function(e,t){h[t]="string"===e.type?"":null,void 0!==f[t]&&(h[t]=f[t]),void 0!==s[t]&&(h[t]=s[t]),e.name&&(h[e.name]=h[t]),h.__length__++}),h};var u=new s;t.exports=u},{"ethers/utils/abi-coder":143,underscore:325,"web3-utils":403}],350:[function(e,t,r){(function(r){var n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=e("./bytes"),o=e("./nat"),a=e("elliptic"),s=(e("./rlp"),new a.ec("secp256k1")),u=e("./hash"),c=u.keccak256,f=u.keccak256s,h=function(e){for(var t=f(e.slice(2)),r="0x",n=0;n<40;n++)r+=parseInt(t[n+2],16)>7?e[n+2].toUpperCase():e[n+2];return r},l=function(e){var t=new r(e.slice(2),"hex"),n="0x"+s.keyFromPrivate(t).getPublic(!1,"hex").slice(2),i=c(n);return{address:h("0x"+i.slice(-40)),privateKey:e}},d=function(e){var t=n(e,3),r=t[0],o=i.pad(32,t[1]),a=i.pad(32,t[2]);return i.flatten([o,a,r])},p=function(e){return[i.slice(64,i.length(e),e),i.slice(0,32,e),i.slice(32,64,e)]},b=function(e){return function(t,n){var a=s.keyFromPrivate(new r(n.slice(2),"hex")).sign(new r(t.slice(2),"hex"),{canonical:!0});return d([o.fromString(i.fromNumber(e+a.recoveryParam)),i.pad(32,i.fromNat("0x"+a.r.toString(16))),i.pad(32,i.fromNat("0x"+a.s.toString(16)))])}},y=b(27);t.exports={create:function(e){var t=c(i.concat(i.random(32),e||i.random(32))),r=i.concat(i.concat(i.random(32),t),i.random(32)),n=c(r);return l(n)},toChecksum:h,fromPrivate:l,sign:y,makeSigner:b,recover:function(e,t){var n=p(t),o={v:i.toNumber(n[0]),r:n[1].slice(2),s:n[2].slice(2)},a="0x"+s.recoverPubKey(new r(e.slice(2),"hex"),o,o.v<2?o.v:1-o.v%2).encode("hex",!1).slice(2),u=c(a);return h("0x"+u.slice(-40))},encodeSignature:d,decodeSignature:p}}).call(this,e("buffer").Buffer)},{"./bytes":352,"./hash":353,"./nat":354,"./rlp":355,buffer:84,elliptic:109}],351:[function(e,t,r){arguments[4][132][0].apply(r,arguments)},{dup:132}],352:[function(e,t,r){arguments[4][133][0].apply(r,arguments)},{"./array.js":351,dup:133}],353:[function(e,t,r){arguments[4][134][0].apply(r,arguments)},{dup:134}],354:[function(e,t,r){var n=e("bn.js"),i=e("./bytes"),o=function(e){return new n(e.slice(2),16)},a=function(e){var t="0x"+("0x"===e.slice(0,2)?new n(e.slice(2),16):new n(e,10)).toString("hex");return"0x0"===t?"0x":t},s=function(e){return"string"==typeof e?/^0x/.test(e)?e:"0x"+e:"0x"+new n(e).toString("hex")},u=function(e){return o(e).toNumber()},c=function(e){return function(t,r){return"0x"+o(t)[e](o(r)).toString("hex")}},f=c("add"),h=c("mul"),l=c("div"),d=c("sub");t.exports={toString:function(e){return o(e).toString(10)},fromString:a,toNumber:u,fromNumber:s,toEther:function(e){return u(l(e,a("10000000000")))/1e8},fromEther:function(e){return h(s(Math.floor(1e8*e)),a("10000000000"))},toUint256:function(e){return i.pad(32,e)},add:f,mul:h,div:l,sub:d}},{"./bytes":352,"bn.js":53}],355:[function(e,t,r){t.exports={encode:function(e){var t=function(e){return(t=e.toString(16)).length%2==0?t:"0"+t;var t},r=function(e,r){return e<56?t(r+e):t(r+t(e).length/2+55)+t(e)};return"0x"+function e(t){if("string"==typeof t){var n=t.slice(2);return(2!=n.length||n>="80"?r(n.length/2,128):"")+n}var i=t.map(e).join("");return r(i.length/2,192)+i}(e)},decode:function(e){var t=2,r=function(){if(t>=e.length)throw"";var r=e.slice(t,t+2);return r<"80"?(t+=2,"0x"+r):r<"c0"?i():o()},n=function(){var r=parseInt(e.slice(t,t+=2),16)%64;return r<56?r:parseInt(e.slice(t,t+=2*(r-55)),16)},i=function(){var r=n();return"0x"+e.slice(t,t+=2*r)},o=function(){for(var e=2*n()+t,i=[];t>>((3&t)<<3)&255;return i}}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],357:[function(e,t,r){for(var n=e("./rng"),i=[],o={},a=0;a<256;a++)i[a]=(a+256).toString(16).substr(1),o[i[a]]=a;function s(e,t){var r=t||0,n=i;return n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]}var u=n(),c=[1|u[0],u[1],u[2],u[3],u[4],u[5]],f=16383&(u[6]<<8|u[7]),h=0,l=0;function d(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;a<16;a++)t[i+a]=o[a];return t||s(o)}var p=d;p.v1=function(e,t,r){var n=t&&r||0,i=t||[],o=void 0!==(e=e||{}).clockseq?e.clockseq:f,a=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:l+1,d=a-h+(u-l)/1e4;if(d<0&&void 0===e.clockseq&&(o=o+1&16383),(d<0||a>h)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=a,l=u,f=o;var p=(1e4*(268435455&(a+=122192928e5))+u)%4294967296;i[n++]=p>>>24&255,i[n++]=p>>>16&255,i[n++]=p>>>8&255,i[n++]=255&p;var b=a/4294967296*1e4&268435455;i[n++]=b>>>8&255,i[n++]=255&b,i[n++]=b>>>24&15|16,i[n++]=b>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o;for(var y=e.node||c,m=0;m<6;m++)i[n+m]=y[m];return t||s(i)},p.v4=d,p.parse=function(e,t,r){var n=t&&r||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){i<16&&(t[n+i++]=o[e])});i<16;)t[n+i++]=0;return t},p.unparse=s,t.exports=p},{"./rng":356}],358:[function(e,t,r){(function(r,n){"use strict";var i=e("underscore"),o=e("web3-core"),a=e("web3-core-method"),s=e("any-promise"),u=e("eth-lib/lib/account"),c=e("eth-lib/lib/hash"),f=e("eth-lib/lib/rlp"),h=e("eth-lib/lib/nat"),l=e("eth-lib/lib/bytes"),d=e(void 0===r?"crypto-browserify":"crypto"),p=e("scrypt.js"),b=e("uuid"),y=e("web3-utils"),m=e("web3-core-helpers"),v=function(e){return i.isUndefined(e)||i.isNull(e)},g=function(e){for(;e&&e.startsWith("0x0");)e="0x"+e.slice(3);return e},w=function(e){return e.length%2==1&&(e=e.replace("0x","0x0")),e},_=function(){var e=this;o.packageInit(this,arguments),delete this.BatchRequest,delete this.extend;var t=[new a({name:"getId",call:"net_version",params:0,outputFormatter:y.hexToNumber}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[function(e){if(y.isAddress(e))return e;throw new Error("Address "+e+' is not a valid address to get the "transactionCount".')},function(){return"latest"}]})];this._ethereumCall={},i.each(t,function(t){t.attachToObject(e._ethereumCall),t.setRequestManager(e._requestManager)}),this.wallet=new A(this)};function A(e){this._accounts=e,this.length=0,this.defaultKeyName="web3js_wallet"}_.prototype._addAccountFunctions=function(e){var t=this;return e.signTransaction=function(r,n){return t.signTransaction(r,e.privateKey,n)},e.sign=function(r){return t.sign(r,e.privateKey)},e.encrypt=function(r,n){return t.encrypt(e.privateKey,r,n)},e},_.prototype.create=function(e){return this._addAccountFunctions(u.create(e||y.randomHex(32)))},_.prototype.privateKeyToAccount=function(e){return this._addAccountFunctions(u.fromPrivate(e))},_.prototype.signTransaction=function(e,t,r){var n,o=!1;if(r=r||function(){},!e)return o=new Error("No transaction object given!"),r(o),s.reject(o);function a(e){if(e.gas||e.gasLimit||(o=new Error('"gas" is missing')),(e.nonce<0||e.gas<0||e.gasPrice<0||e.chainId<0)&&(o=new Error("Gas, gasPrice, nonce or chainId is lower than 0")),o)return r(o),s.reject(o);try{var i=e=m.formatters.inputCallFormatter(e);i.to=e.to||"0x",i.data=e.data||"0x",i.value=e.value||"0x",i.chainId=y.numberToHex(e.chainId);var a=f.encode([l.fromNat(i.nonce),l.fromNat(i.gasPrice),l.fromNat(i.gas),i.to.toLowerCase(),l.fromNat(i.value),i.data,l.fromNat(i.chainId||"0x1"),"0x","0x"]),d=c.keccak256(a),p=u.makeSigner(2*h.toNumber(i.chainId||"0x1")+35)(c.keccak256(a),t),b=f.decode(a).slice(0,6).concat(u.decodeSignature(p));b[6]=w(g(b[6])),b[7]=w(g(b[7])),b[8]=w(g(b[8]));var v=f.encode(b),_=f.decode(v);n={messageHash:d,v:g(_[6]),r:g(_[7]),s:g(_[8]),rawTransaction:v}}catch(e){return r(e),s.reject(e)}return r(null,n),n}return void 0!==e.nonce&&void 0!==e.chainId&&void 0!==e.gasPrice?s.resolve(a(e)):s.all([v(e.chainId)?this._ethereumCall.getId():e.chainId,v(e.gasPrice)?this._ethereumCall.getGasPrice():e.gasPrice,v(e.nonce)?this._ethereumCall.getTransactionCount(this.privateKeyToAccount(t).address):e.nonce]).then(function(t){if(v(t[0])||v(t[1])||v(t[2]))throw new Error('One of the values "chainId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(t));return a(i.extend(e,{chainId:t[0],gasPrice:t[1],nonce:t[2]}))})},_.prototype.recoverTransaction=function(e){var t=f.decode(e),r=u.encodeSignature(t.slice(6,9)),n=l.toNumber(t[6]),i=n<35?[]:[l.fromNumber(n-35>>1),"0x","0x"],o=t.slice(0,6).concat(i),a=f.encode(o);return u.recover(c.keccak256(a),r)},_.prototype.hashMessage=function(e){var t=y.isHexStrict(e)?y.hexToBytes(e):e,r=n.from(t),i="Ethereum Signed Message:\n"+t.length,o=n.from(i),a=n.concat([o,r]);return c.keccak256s(a)},_.prototype.sign=function(e,t){var r=this.hashMessage(e),n=u.sign(r,t),i=u.decodeSignature(n);return{message:e,messageHash:r,v:i[0],r:i[1],s:i[2],signature:n}},_.prototype.recover=function(e,t,r){var n=[].slice.apply(arguments);return i.isObject(e)?this.recover(e.messageHash,u.encodeSignature([e.v,e.r,e.s]),!0):(r||(e=this.hashMessage(e)),n.length>=4?(r=n.slice(-1)[0],r=!!i.isBoolean(r)&&!!r,this.recover(e,u.encodeSignature(n.slice(1,4)),r)):u.recover(e,t))},_.prototype.decrypt=function(e,t,r){if(!i.isString(t))throw new Error("No password given.");var o,a,s=i.isObject(e)?e:JSON.parse(r?e.toLowerCase():e);if(3!==s.version)throw new Error("Not a valid V3 wallet");if("scrypt"===s.crypto.kdf)a=s.crypto.kdfparams,o=p(new n(t),new n(a.salt,"hex"),a.n,a.r,a.p,a.dklen);else{if("pbkdf2"!==s.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(a=s.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");o=d.pbkdf2Sync(new n(t),new n(a.salt,"hex"),a.c,a.dklen,"sha256")}var u=new n(s.crypto.ciphertext,"hex");if(y.sha3(n.concat([o.slice(16,32),u])).replace("0x","")!==s.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var c=d.createDecipheriv(s.crypto.cipher,o.slice(0,16),new n(s.crypto.cipherparams.iv,"hex")),f="0x"+n.concat([c.update(u),c.final()]).toString("hex");return this.privateKeyToAccount(f)},_.prototype.encrypt=function(e,t,r){var i,o=this.privateKeyToAccount(e),a=(r=r||{}).salt||d.randomBytes(32),s=r.iv||d.randomBytes(16),u=r.kdf||"scrypt",c={dklen:r.dklen||32,salt:a.toString("hex")};if("pbkdf2"===u)c.c=r.c||262144,c.prf="hmac-sha256",i=d.pbkdf2Sync(new n(t),a,c.c,c.dklen,"sha256");else{if("scrypt"!==u)throw new Error("Unsupported kdf");c.n=r.n||8192,c.r=r.r||8,c.p=r.p||1,i=p(new n(t),a,c.n,c.r,c.p,c.dklen)}var f=d.createCipheriv(r.cipher||"aes-128-ctr",i.slice(0,16),s);if(!f)throw new Error("Unsupported cipher");var h=n.concat([f.update(new n(o.privateKey.replace("0x",""),"hex")),f.final()]),l=y.sha3(n.concat([i.slice(16,32),new n(h,"hex")])).replace("0x","");return{version:3,id:b.v4({random:r.uuid||d.randomBytes(16)}),address:o.address.toLowerCase().replace("0x",""),crypto:{ciphertext:h.toString("hex"),cipherparams:{iv:s.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:u,kdfparams:c,mac:l.toString("hex")}}},A.prototype._findSafeIndex=function(e){return e=e||0,i.has(this,e)?this._findSafeIndex(e+1):e},A.prototype._currentIndexes=function(){return Object.keys(this).map(function(e){return parseInt(e)}).filter(function(e){return e<9e20})},A.prototype.create=function(e,t){for(var r=0;r=2?t.slice(2):t;var r=h.decodeParameters(e,t);return 1===r.__length__?r[0]:(delete r.__length__,r)},l.prototype.deploy=function(e,t){if((e=e||{}).arguments=e.arguments||[],!(e=this._getOrSetDefaultOptions(e)).data)return a._fireError(new Error('No "data" specified in neither the given options, nor the default options.'),null,null,t);var r=n.find(this.options.jsonInterface,function(e){return"constructor"===e.type})||{};return r.signature="constructor",this._createTxObject.apply({method:r,parent:this,deployData:e.data,_ethAccounts:this.constructor._ethAccounts},e.arguments)},l.prototype._generateEventOptions=function(){var e=Array.prototype.slice.call(arguments),t=this._getCallback(e),r=n.isObject(e[e.length-1])?e.pop():{},i=n.isString(e[0])?e[0]:"allevents";if(!(i="allevents"===i.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find(function(e){return"event"===e.type&&(e.name===i||e.signature==="0x"+i.replace("0x",""))})))throw new Error('Event "'+i.name+"\" doesn't exist in this contract.");if(!a.isAddress(this.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return{params:this._encodeEventABI(i,r),event:i,callback:t}},l.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},l.prototype.once=function(e,t,r){var i=Array.prototype.slice.call(arguments);if(!(r=this._getCallback(i)))throw new Error("Once requires a callback as the second parameter.");t&&delete t.fromBlock,this._on(e,t,function(e,t,i){i.unsubscribe(),n.isFunction(r)&&r(e,t,i)})},l.prototype._on=function(){var e=this._generateEventOptions.apply(this,arguments);this._checkListener("newListener",e.event.name,e.callback),this._checkListener("removeListener",e.event.name,e.callback);var t=new s({subscription:{params:1,inputFormatter:[u.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event),subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),n.isFunction(this.callback)&&this.callback(null,e,this)}},type:"eth",requestManager:this._requestManager});return t.subscribe("logs",e.params,e.callback||function(){}),t},l.prototype.getPastEvents=function(){var e=this._generateEventOptions.apply(this,arguments),t=new o({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[u.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event)});t.setRequestManager(this._requestManager);var r=t.buildCall();return t=null,r(e.params,e.callback)},l.prototype._createTxObject=function(){var e=Array.prototype.slice.call(arguments),t={};if("function"===this.method.type&&(t.call=this.parent._executeMethod.bind(t,"call"),t.call.request=this.parent._executeMethod.bind(t,"call",!0)),t.send=this.parent._executeMethod.bind(t,"send"),t.send.request=this.parent._executeMethod.bind(t,"send",!0),t.encodeABI=this.parent._encodeMethodABI.bind(t),t.estimateGas=this.parent._executeMethod.bind(t,"estimate"),e&&this.method.inputs&&e.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,e);throw c.InvalidNumberOfParams(e.length,this.method.inputs.length,this.method.name)}return t.arguments=e||[],t._method=this.method,t._parent=this.parent,t._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(t._deployData=this.deployData),t},l.prototype._processExecuteArguments=function(e,t){var r={};if(r.type=e.shift(),r.callback=this._parent._getCallback(e),"call"===r.type&&!0!==e[e.length-1]&&(n.isString(e[e.length-1])||isFinite(e[e.length-1]))&&(r.defaultBlock=e.pop()),r.options=n.isObject(e[e.length-1])?e.pop():{},r.generateRequest=!0===e[e.length-1]&&e.pop(),r.options=this._parent._getOrSetDefaultOptions(r.options),r.options.data=this.encodeABI(),!this._deployData&&!a.isAddress(this._parent.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return this._deployData||(r.options.to=this._parent.options.address),r.options.data?r:a._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),t.eventEmitter,t.reject,r.callback)},l.prototype._executeMethod=function(){var e=this,t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),r),r=f("send"!==t.type),i=e.constructor._ethAccounts||e._ethAccounts;if(t.generateRequest){var s={params:[u.inputCallFormatter.call(this._parent,t.options)],callback:t.callback};return"call"===t.type?(s.params.push(u.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)),s.method="eth_call",s.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):s.method="eth_sendTransaction",s}switch(t.type){case"estimate":return new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[u.inputCallFormatter],outputFormatter:a.hexToNumber,requestManager:e._parent._requestManager,accounts:i,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback);case"call":return new o({name:"call",call:"eth_call",params:2,inputFormatter:[u.inputCallFormatter,u.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:i,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.defaultBlock,t.callback);case"send":if(!a.isAddress(t.options.from))return a._fireError(new Error('No "from" address specified in neither the given options, nor the default options.'),r.eventEmitter,r.reject,t.callback);if(n.isBoolean(this._method.payable)&&!this._method.payable&&t.options.value&&t.options.value>0)return a._fireError(new Error("Can not send value to non-payable contract method or constructor"),r.eventEmitter,r.reject,t.callback);var c={receiptFormatter:function(t){if(n.isArray(t.logs)){var r=n.map(t.logs,function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)});t.events={};var i=0;r.forEach(function(e){e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[i]=e,i++)}),delete t.logs}return t},contractDeployFormatter:function(t){var r=e._parent.clone();return r.options.address=t.contractAddress,r}};return new o({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[u.inputTransactionFormatter],requestManager:e._parent._requestManager,accounts:e.constructor._ethAccounts||e._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,extraFormatters:c}).createFunction()(t.options,t.callback)}},t.exports=l},{underscore:325,"web3-core":348,"web3-core-helpers":338,"web3-core-method":339,"web3-core-promievent":340,"web3-core-subscriptions":345,"web3-eth-abi":349,"web3-utils":403}],360:[function(e,t,r){"use strict";var n=e("./config"),i=e("./contracts/Registry"),o=e("./lib/ResolverMethodHandler");function a(e){this.eth=e}Object.defineProperty(a.prototype,"registry",{get:function(){return new i(this)},enumerable:!0}),Object.defineProperty(a.prototype,"resolverMethodHandler",{get:function(){return new o(this.registry)},enumerable:!0}),a.prototype.resolver=function(e){return this.registry.resolver(e)},a.prototype.getAddress=function(e,t){return this.resolverMethodHandler.method(e,"addr",[]).call(t)},a.prototype.setAddress=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setAddr",[t]).send(r,n)},a.prototype.getPubkey=function(e,t){return this.resolverMethodHandler.method(e,"pubkey",[],t).call(t)},a.prototype.setPubkey=function(e,t,r,n,i){return this.resolverMethodHandler.method(e,"setPubkey",[t,r]).send(n,i)},a.prototype.getContent=function(e,t){return this.resolverMethodHandler.method(e,"content",[]).call(t)},a.prototype.setContent=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setContent",[t]).send(r,n)},a.prototype.getMultihash=function(e,t){return this.resolverMethodHandler.method(e,"multihash",[]).call(t)},a.prototype.setMultihash=function(e,t,r,n){return this.resolverMethodHandler.method(e,"multihash",[t]).send(r,n)},a.prototype.checkNetwork=function(){var e=this;return e.eth.getBlock("latest").then(function(t){var r=new Date/1e3-t.timestamp;if(r>3600)throw new Error("Network not synced; last block was "+r+" seconds ago");return e.eth.net.getNetworkType()}).then(function(e){var t=n.addresses[e];if(void 0===t)throw new Error("ENS is not supported on network "+e);return t})},t.exports=a},{"./config":361,"./contracts/Registry":362,"./lib/ResolverMethodHandler":364}],361:[function(e,t,r){"use strict";t.exports={addresses:{main:"0x314159265dD8dbb310642f98f50C066173C1259b",ropsten:"0x112234455c3a32fd11230c42e7bccd4a84e02010",rinkeby:"0xe7410170f87102df0055eb195163a03b7f2bff4a"}}},{}],362:[function(e,t,r){"use strict";var n=e("underscore"),i=e("web3-eth-contract"),o=e("eth-ens-namehash"),a=e("web3-core-promievent"),s=e("../ressources/ABI/Registry"),u=e("../ressources/ABI/Resolver");function c(e){var t=this;this.ens=e,this.contract=e.checkNetwork().then(function(e){var r=new i(s,e);return r.setProvider(t.ens.eth.currentProvider),r})}c.prototype.owner=function(e,t){var r=new a(!0);return this.contract.then(function(i){i.methods.owner(o.hash(e)).call().then(function(e){r.resolve(e),n.isFunction(t)&&t(e)}).catch(function(e){r.reject(e),n.isFunction(t)&&t(e)})}),r.eventEmitter},c.prototype.resolver=function(e){var t=this;return this.contract.then(function(t){return t.methods.resolver(o.hash(e)).call()}).then(function(e){var r=new i(u,e);return r.setProvider(t.ens.eth.currentProvider),r})},t.exports=c},{"../ressources/ABI/Registry":365,"../ressources/ABI/Resolver":366,"eth-ens-namehash":127,underscore:325,"web3-core-promievent":340,"web3-eth-contract":359}],363:[function(e,t,r){"use strict";var n=e("./ENS");t.exports=n},{"./ENS":360}],364:[function(e,t,r){"use strict";var n=e("web3-core-promievent"),i=e("eth-ens-namehash"),o=e("underscore");function a(e){this.registry=e}a.prototype.method=function(e,t,r,n){return{call:this.call.bind({ensName:e,methodName:t,methodArguments:r,callback:n,parent:this}),send:this.send.bind({ensName:e,methodName:t,methodArguments:r,callback:n,parent:this})}},a.prototype.call=function(e){var t=this,r=new n,i=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.resolver(this.ensName).then(function(n){t.parent.handleCall(r,n.methods[t.methodName],i,e)}).catch(function(e){r.reject(e)}),r.eventEmitter},a.prototype.send=function(e,t){var r=this,i=new n,o=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.resolver(this.ensName).then(function(n){r.parent.handleSend(i,n.methods[r.methodName],o,e,t)}).catch(function(e){i.reject(e)}),i.eventEmitter},a.prototype.handleCall=function(e,t,r,n){return t.apply(this,r).call().then(function(t){e.resolve(t),o.isFunction(n)&&n(t)}).catch(function(t){e.reject(t),o.isFunction(n)&&n(t)}),e},a.prototype.handleSend=function(e,t,r,n,i){return t.apply(this,r).send(n).on("transactionHash",function(t){e.eventEmitter.emit("transactionHash",t)}).on("confirmation",function(t,r){e.eventEmitter.emit("confirmation",t,r)}).on("receipt",function(t){e.eventEmitter.emit("receipt",t),e.resolve(t),o.isFunction(i)&&i(t)}).on("error",function(t){e.eventEmitter.emit("error",t),e.reject(t),o.isFunction(i)&&i(t)}),e},a.prototype.prepareArguments=function(e,t){var r=i.hash(e);return t.length>0?(t.unshift(r),t):[r]},t.exports=a},{"eth-ens-namehash":127,underscore:325,"web3-core-promievent":340}],365:[function(e,t,r){"use strict";t.exports=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"}]},{}],366:[function(e,t,r){"use strict";t.exports=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setMultihash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"multihash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"}]},{}],367:[function(e,t,r){arguments[4][154][0].apply(r,arguments)},{dup:154}],368:[function(e,t,r){"use strict";var n=e("web3-utils"),i=e("bn.js"),o=function(e){var t="A".charCodeAt(0),r="Z".charCodeAt(0);return(e=(e=e.toUpperCase()).substr(4)+e.substr(0,4)).split("").map(function(e){var n=e.charCodeAt(0);return n>=t&&n<=r?n-t+10:e}).join("")},a=function(e){for(var t,r=e;r.length>2;)t=r.slice(0,9),r=parseInt(t,10)%97+r.slice(t.length);return parseInt(r,10)%97},s=function(e){this._iban=e};s.toAddress=function(e){if(!(e=new s(e)).isDirect())throw new Error("IBAN is indirect and can't be converted");return e.toAddress()},s.toIban=function(e){return s.fromAddress(e).toString()},s.fromAddress=function(e){if(!n.isAddress(e))throw new Error("Provided address is not a valid address: "+e);e=e.replace("0x","").replace("0X","");var t=function(e,t){for(var r=e;r.length<2*t;)r="0"+r;return r}(new i(e,16).toString(36),15);return s.fromBban(t.toUpperCase())},s.fromBban=function(e){var t=("0"+(98-a(o("XE00"+e)))).slice(-2);return new s("XE"+t+e)},s.createIndirect=function(e){return s.fromBban("ETH"+e.institution+e.identifier)},s.isValid=function(e){return new s(e).isValid()},s.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===a(o(this._iban))},s.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},s.prototype.isIndirect=function(){return 20===this._iban.length},s.prototype.checksum=function(){return this._iban.substr(2,2)},s.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},s.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},s.prototype.toAddress=function(){if(this.isDirect()){var e=this._iban.substr(4),t=new i(e,36);return n.toChecksumAddress(t.toString(16,20))}return""},s.prototype.toString=function(){return this._iban},t.exports=s},{"bn.js":367,"web3-utils":403}],369:[function(e,t,r){"use strict";var n=e("web3-core"),i=e("web3-core-method"),o=e("web3-utils"),a=e("web3-net"),s=e("web3-core-helpers").formatters,u=function(){var e=this;n.packageInit(this,arguments),this.net=new a(this.currentProvider);var t=null,r="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return t},set:function(e){return e&&(t=o.toChecksumAddress(s.inputAddressFormatter(e))),u.forEach(function(e){e.defaultAccount=t}),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return r},set:function(e){return r=e,u.forEach(function(e){e.defaultBlock=r}),e},enumerable:!0});var u=[new i({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:o.toChecksumAddress}),new i({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:o.toChecksumAddress}),new i({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[s.inputAddressFormatter,null,null]}),new i({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[s.inputAddressFormatter]}),new i({name:"importRawKey",call:"personal_importRawKey",params:2}),new i({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"signTransaction",call:"personal_signTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"sign",call:"personal_sign",params:3,inputFormatter:[s.inputSignFormatter,s.inputAddressFormatter,null]}),new i({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[s.inputSignFormatter,null]})];u.forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount})};n.addProviders(u),t.exports=u},{"web3-core":348,"web3-core-helpers":338,"web3-core-method":339,"web3-net":372,"web3-utils":403}],370:[function(e,t,r){"use strict";var n=e("underscore");t.exports=function(e){var t,r=this;return this.net.getId().then(function(e){return t=e,r.getBlock(0)}).then(function(r){var i="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===r.hash&&1===t&&(i="main"),"0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303"===r.hash&&2===t&&(i="morden"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===r.hash&&3===t&&(i="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===r.hash&&4===t&&(i="rinkeby"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===r.hash&&42===t&&(i="kovan"),n.isFunction(e)&&e(null,i),i}).catch(function(t){if(!n.isFunction(e))throw t;e(t)})}},{underscore:325}],371:[function(e,t,r){"use strict";var n=e("underscore"),i=e("web3-core"),o=e("web3-core-helpers"),a=e("web3-core-subscriptions").subscriptions,s=e("web3-core-method"),u=e("web3-utils"),c=e("web3-net"),f=e("web3-eth-ens"),h=e("web3-eth-personal"),l=e("web3-eth-contract"),d=e("web3-eth-iban"),p=e("web3-eth-accounts"),b=e("web3-eth-abi"),y=e("./getNetworkType.js"),m=o.formatters,v=function(e){return n.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},g=function(e){return n.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},w=function(e){return n.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},_=function(e){return n.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},A=function(e){return n.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},E=function(){var e=this;i.packageInit(this,arguments);var t=this.setProvider;this.setProvider=function(){t.apply(e,arguments),e.net.setProvider.apply(e,arguments),e.personal.setProvider.apply(e,arguments),e.accounts.setProvider.apply(e,arguments),e.Contract.setProvider(e.currentProvider,e.accounts)};var r=null,o="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return r},set:function(t){return t&&(r=u.toChecksumAddress(m.inputAddressFormatter(t))),e.Contract.defaultAccount=r,e.personal.defaultAccount=r,k.forEach(function(e){e.defaultAccount=r}),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return o},set:function(t){return o=t,e.Contract.defaultBlock=o,e.personal.defaultBlock=o,k.forEach(function(e){e.defaultBlock=o}),t},enumerable:!0}),this.clearSubscriptions=e._requestManager.clearSubscriptions,this.net=new c(this.currentProvider),this.net.getNetworkType=y.bind(this),this.accounts=new p(this.currentProvider),this.personal=new h(this.currentProvider),this.personal.defaultAccount=this.defaultAccount;var E=this,x=function(){l.apply(this,arguments);var e=this,t=E.setProvider;E.setProvider=function(){t.apply(E,arguments),i.packageInit(e,[E.currentProvider])}};x.setProvider=function(){l.setProvider.apply(this,arguments)},(x.prototype=Object.create(l.prototype)).constructor=x,this.Contract=x,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.setProvider(this.currentProvider,this.accounts),this.Iban=d,this.abi=b,this.ens=new f(this);var k=[new s({name:"getNodeInfo",call:"web3_clientVersion"}),new s({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new s({name:"getCoinbase",call:"eth_coinbase",params:0}),new s({name:"isMining",call:"eth_mining",params:0}),new s({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:u.hexToNumber}),new s({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:m.outputSyncingFormatter}),new s({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:m.outputBigNumberFormatter}),new s({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:u.toChecksumAddress}),new s({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:u.hexToNumber}),new s({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputBigNumberFormatter}),new s({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[m.inputAddressFormatter,u.numberToHex,m.inputDefaultBlockNumberFormatter]}),new s({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter]}),new s({name:"getBlock",call:v,params:2,inputFormatter:[m.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:m.outputBlockFormatter}),new s({name:"getUncle",call:w,params:2,inputFormatter:[m.inputBlockNumberFormatter,u.numberToHex],outputFormatter:m.outputBlockFormatter}),new s({name:"getBlockTransactionCount",call:_,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"getBlockUncleCount",call:A,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionFormatter}),new s({name:"getTransactionFromBlock",call:g,params:2,inputFormatter:[m.inputBlockNumberFormatter,u.numberToHex],outputFormatter:m.outputTransactionFormatter}),new s({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionReceiptFormatter}),new s({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),new s({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[m.inputTransactionFormatter]}),new s({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[m.inputTransactionFormatter]}),new s({name:"sign",call:"eth_sign",params:2,inputFormatter:[m.inputSignFormatter,m.inputAddressFormatter],transformPayload:function(e){return e.params.reverse(),e}}),new s({name:"call",call:"eth_call",params:2,inputFormatter:[m.inputCallFormatter,m.inputDefaultBlockNumberFormatter]}),new s({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[m.inputCallFormatter],outputFormatter:u.hexToNumber}),new s({name:"submitWork",call:"eth_submitWork",params:3}),new s({name:"getWork",call:"eth_getWork",params:0}),new s({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter}),new a({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:m.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter,subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),n.isFunction(this.callback)&&this.callback(null,e,this)}},syncing:{params:0,outputFormatter:m.outputSyncingFormatter,subscriptionHandler:function(e){var t=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",t._isSyncing),n.isFunction(this.callback)&&this.callback(null,t._isSyncing,this),setTimeout(function(){t.emit("data",e),n.isFunction(t.callback)&&t.callback(null,e,t)},0)):(this.emit("data",e),n.isFunction(t.callback)&&this.callback(null,e,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout(function(){e.currentBlock>e.highestBlock-200&&(t._isSyncing=!1,t.emit("changed",t._isSyncing),n.isFunction(t.callback)&&t.callback(null,t._isSyncing,t))},500))}}}})];k.forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager,e.accounts),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount})};i.addProviders(E),t.exports=E},{"./getNetworkType.js":370,underscore:325,"web3-core":348,"web3-core-helpers":338,"web3-core-method":339,"web3-core-subscriptions":345,"web3-eth-abi":349,"web3-eth-accounts":358,"web3-eth-contract":359,"web3-eth-ens":363,"web3-eth-iban":368,"web3-eth-personal":369,"web3-net":372,"web3-utils":403}],372:[function(e,t,r){"use strict";var n=e("web3-core"),i=e("web3-core-method"),o=e("web3-utils"),a=function(){var e=this;n.packageInit(this,arguments),[new i({name:"getId",call:"net_version",params:0,outputFormatter:o.hexToNumber}),new i({name:"isListening",call:"net_listening",params:0}),new i({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:o.hexToNumber})].forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})};n.addProviders(a),t.exports=a},{"web3-core":348,"web3-core-method":339,"web3-utils":403}],373:[function(e,t,r){const n=e("events").EventEmitter,i=e("util").inherits,o=e("ethereumjs-util"),a=e("eth-block-tracker"),s=e("async/map"),u=e("async/eachSeries"),c=e("./util/stoplight.js");e("./util/rpc-cache-utils.js"),e("./util/create-payload.js");function f(e){const t=this;n.call(t),t.setMaxListeners(30),e=e||{};const r={sendAsync:t._handleAsync.bind(t)},i=e.blockTrackerProvider||r;t._blockTracker=e.blockTracker||new a({provider:i,pollingInterval:e.pollingInterval||4e3}),t._blockTracker.on("block",e=>{const r=function(e){return{number:o.toBuffer(e.number),hash:o.toBuffer(e.hash),parentHash:o.toBuffer(e.parentHash),nonce:o.toBuffer(e.nonce),mixHash:o.toBuffer(e.mixHash),sha3Uncles:o.toBuffer(e.sha3Uncles),logsBloom:o.toBuffer(e.logsBloom),transactionsRoot:o.toBuffer(e.transactionsRoot),stateRoot:o.toBuffer(e.stateRoot),receiptsRoot:o.toBuffer(e.receiptRoot||e.receiptsRoot),miner:o.toBuffer(e.miner),difficulty:o.toBuffer(e.difficulty),totalDifficulty:o.toBuffer(e.totalDifficulty),size:o.toBuffer(e.size),extraData:o.toBuffer(e.extraData),gasLimit:o.toBuffer(e.gasLimit),gasUsed:o.toBuffer(e.gasUsed),timestamp:o.toBuffer(e.timestamp),transactions:e.transactions}}(e);t._setCurrentBlock(r)}),t._blockTracker.on("block",t.emit.bind(t,"rawBlock")),t._blockTracker.on("sync",t.emit.bind(t,"sync")),t._blockTracker.on("latest",t.emit.bind(t,"latest")),t._ready=new c,t._blockTracker.once("block",()=>{t._ready.go()}),t.currentBlock=null,t._providers=[]}t.exports=f,i(f,n),f.prototype.start=function(e=function(){}){this._blockTracker.start().then(e).catch(e)},f.prototype.stop=function(){this._blockTracker.stop()},f.prototype.addProvider=function(e){this._providers.push(e),e.setEngine(this)},f.prototype.send=function(e){throw new Error("Web3ProviderEngine does not support synchronous requests.")},f.prototype.sendAsync=function(e,t){const r=this;r._ready.await(function(){Array.isArray(e)?s(e,r._handleAsync.bind(r),t):r._handleAsync(e,t)})},f.prototype._handleAsync=function(e,t){var r=this,n=-1,i=null,o=null,a=[];function s(r,n){o=r,i=n,u(a,function(e,t){e?e(o,i,t):t()},function(){var r={id:e.id,jsonrpc:e.jsonrpc,result:i};null!=o?(r.error={message:o.stack||o.message||o,code:-32e3},t(o,r)):t(null,r)})}!function t(i){n+=1;a.unshift(i);if(n>=r._providers.length)s(new Error('Request for method "'+e.method+'" not handled by any subprovider. Please check your subprovider configuration to ensure this method is handled.'));else try{var o=r._providers[n];o.handleRequest(e,t,s)}catch(e){s(e)}}()},f.prototype._setCurrentBlock=function(e){this.currentBlock=e,this.emit("block",e)}},{"./util/create-payload.js":391,"./util/rpc-cache-utils.js":394,"./util/stoplight.js":396,"async/eachSeries":25,"async/map":41,"eth-block-tracker":126,"ethereumjs-util":141,events:157,util:333}],374:[function(e,t,r){var n="undefined"!=typeof JSON?JSON:e("jsonify");t.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r=t.space||"";"number"==typeof r&&(r=Array(r+1).join(" "));var a,s="boolean"==typeof t.cycles&&t.cycles,u=t.replacer||function(e,t){return t},c=t.cmp&&(a=t.cmp,function(e){return function(t,r){var n={key:t,value:e[t]},i={key:r,value:e[r]};return a(n,i)}}),f=[];return function e(t,a,h,l){var d=r?"\n"+new Array(l+1).join(r):"",p=r?": ":":";if(h&&h.toJSON&&"function"==typeof h.toJSON&&(h=h.toJSON()),void 0!==(h=u.call(t,a,h))){if("object"!=typeof h||null===h)return n.stringify(h);if(i(h)){for(var b=[],y=0;y dist/ProviderEngine.js","bundle-zero":"browserify -s ZeroClientProvider -e zero.js -t [ babelify --presets [ es2015 ] ] > dist/ZeroClientProvider.js",prepublish:"npm run build && npm run bundle",test:"node test/index.js"},version:"14.1.0"}},{}],376:[function(e,t,r){const n=e("util").inherits,i=e("ethereumjs-util"),o=i.BN,a=e("clone"),s=e("../util/rpc-cache-utils.js"),u=e("../util/stoplight.js"),c=e("./subprovider.js");function f(e){e=e||{},this._ready=new u,this.strategies={perma:new l({eth_getTransactionByHash:p,eth_getTransactionReceipt:p}),block:new d(this),fork:new d(this)}}function h(){var e=this;e.cache={};var t=setInterval(function(){e.cache={}},6e5);t.unref&&t.unref()}function l(e){this.strategy=new h,this.conditionals=e}function d(){this.cache={}}function p(e){if(!e)return!1;if(!e.blockHash)return!1;var t;return(t=e.blockHash,new o(i.toBuffer(t))).gt(new o(0))}t.exports=f,n(f,c),f.prototype.setEngine=function(e){const t=this;function r(e){var r=t.currentBlock;t.currentBlock=e,r&&(t.strategies.block.cacheRollOff(r),t.strategies.fork.cacheRollOff(r))}t.engine=e,e.once("block",function(n){t.currentBlock=n,t._ready.go(),e.on("block",r)})},f.prototype.handleRequest=function(e,t,r){const n=this;return e.skipCache?t():"eth_getBlockByNumber"===e.method&&"latest"===e.params[0]?t():void n._ready.await(function(){n._handleRequest(e,t,r)})},f.prototype._handleRequest=function(e,t,r){const n=this;var o=s.cacheTypeForPayload(e),a=this.strategies[o];if(!a)return t();if(!a.canCache(e))return t();var u,c=s.blockTagForPayload(e);c||(c="latest"),u="earliest"===c?"0x00":"latest"===c?i.bufferToHex(n.currentBlock.number):c,a.hitCheck(e,u,r,function(){t(function(t,r,n){if(t)return n();a.cacheResult(e,r,u,n)})})},h.prototype.hitCheck=function(e,t,r,n){var i,o,u,c,f=s.cacheIdentifierForPayload(e),h=this.cache[f];return h&&(i=t,o=h.blockNumber,u=parseInt(i,16),c=parseInt(o,16),(u===c?0:u>c?1:-1)>=0)?r(null,a(h.result)):n()},h.prototype.cacheResult=function(e,t,r,n){var i=s.cacheIdentifierForPayload(e);if(t){var o=a(t);this.cache[i]={blockNumber:r,result:o}}n()},h.prototype.canCache=function(e){return s.canCache(e)},l.prototype.hitCheck=function(e,t,r,n){return this.strategy.hitCheck(e,t,r,n)},l.prototype.cacheResult=function(e,t,r,n){var i=this.conditionals[e.method];i?i(t)?this.strategy.cacheResult(e,t,r,n):n():this.strategy.cacheResult(e,t,r,n)},l.prototype.canCache=function(e){return this.strategy.canCache(e)},d.prototype.getBlockCacheForPayload=function(e,t){const r=Number.parseInt(t,16);let n=this.cache[r];if(!n){const e={};this.cache[r]=e,n=e}return n},d.prototype.hitCheck=function(e,t,r,n){var i=this.getBlockCacheForPayload(e,t);if(!i)return n();var o=i[s.cacheIdentifierForPayload(e)];return o?r(null,o):n()},d.prototype.cacheResult=function(e,t,r,n){t&&(this.getBlockCacheForPayload(e,r)[s.cacheIdentifierForPayload(e)]=t);n()},d.prototype.canCache=function(e){return!!s.canCache(e)&&"pending"!==s.blockTagForPayload(e)},d.prototype.cacheRollOff=function(e){const t=this,r=i.bufferToHex(e.number),n=Number.parseInt(r,16);Object.keys(t.cache).map(Number).filter(e=>e<=n).forEach(e=>delete t.cache[e])}},{"../util/rpc-cache-utils.js":394,"../util/stoplight.js":396,"./subprovider.js":387,clone:87,"ethereumjs-util":141,util:333}],377:[function(e,t,r){const n=e("util").inherits,i=e("xtend"),o=e("./fixture.js"),a=e("../package.json").version;function s(e){var t=i({web3_clientVersion:"ProviderEngine/v"+a+"/javascript",net_listening:!0,eth_hashrate:"0x00",eth_mining:!1},e=e||{});o.call(this,t)}t.exports=s,n(s,o)},{"../package.json":375,"./fixture.js":380,util:333,xtend:423}],378:[function(e,t,r){const n=e("cross-fetch"),i=e("util").inherits,o=e("async/retry"),a=e("async/waterfall"),s=e("async/asyncify"),u=e("json-rpc-error"),c=e("promise-to-callback"),f=e("../util/create-payload.js"),h=e("./subprovider.js"),l=["Gateway timeout","ETIMEDOUT","SyntaxError"];function d(e){this.rpcUrl=e.rpcUrl,this.originHttpHeaderKey=e.originHttpHeaderKey}function p(e){const t=e.toString();return l.some(e=>t.includes(e))}t.exports=d,i(d,h),d.prototype.handleRequest=function(e,t,r){const n=this,i=e.origin,a=f(e);delete a.origin;const s={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)};n.originHttpHeaderKey&&i&&(s.headers[n.originHttpHeaderKey]=i),o({times:5,interval:1e3,errorFilter:p},e=>n._submitRequest(s,e),(e,t)=>{if(e&&p(e)){const t=`FetchSubprovider - cannot complete request. All retries exhausted.\nOriginal Error:\n${e.toString()}\n\n`,n=new Error(t);return r(n)}return r(e,t)})},d.prototype._submitRequest=function(e,t){const r=this.rpcUrl;c(n(r,e))((e,r)=>{if(e)return t(e);a([function(e){switch(r.status){case 405:return e(new u.MethodNotFound);case 418:return e(function(){const e=new Error("Request is being rate limited.");return new u.InternalError(e)}());case 503:case 504:return e(function(){let e="Gateway timeout. The request took too long to process. ";const t=new Error(e+="This can happen when querying logs over too wide a block range.");return new u.InternalError(t)}());default:return e()}},e=>c(r.text())(e),s(e=>JSON.parse(e)),function(e,t){if(200!==r.status)return t(new u.InternalError(e));if(e.error)return t(new u.InternalError(e.error));t(null,e.result)}],t)})}},{"../util/create-payload.js":391,"./subprovider.js":387,"async/asyncify":20,"async/retry":43,"async/waterfall":44,"cross-fetch":96,"json-rpc-error":189,"promise-to-callback":258,util:333}],379:[function(e,t,r){const n=e("async"),i=e("util").inherits,o=e("ethereumjs-util"),a=e("./subprovider.js"),s=e("../util/stoplight.js"),u=e("events").EventEmitter;function c(e){e=e||{};const t=this;t.filterIndex=0,t.filters={},t.filterDestroyHandlers={},t.asyncBlockHandlers={},t.asyncPendingBlockHandlers={},t._ready=new s,t._ready.setMaxListeners(e.maxFilters||25),t._ready.go(),t.pendingBlockTimeout=e.pendingBlockTimeout||4e3,t.checkForPendingBlocksActive=!1,setTimeout(function(){t.engine.on("block",function(e){t._ready.stop();var r=v(t.asyncBlockHandlers).map(function(t){return t.bind(null,e)});n.parallel(r,function(e){e&&console.error(e),t._ready.go()})})})}function f(e){u.apply(this),this.type="block",this.engine=e.engine,this.blockNumber=e.blockNumber,this.updates=[]}function h(e){u.apply(this),this.type="log",this.fromBlock=void 0!==e.fromBlock?e.fromBlock:"latest",this.toBlock=void 0!==e.toBlock?e.toBlock:"latest";var t=e.address&&(Array.isArray(e.address)?e.address:[e.address]);this.address=t&&t.map(d),this.topics=e.topics||[],this.updates=[],this.allResults=[]}function l(){u.apply(this),this.type="pendingTx",this.updates=[],this.allResults=[]}function d(e){return"0x"===e.slice(0,2)?e:"0x"+e}function p(e){return o.intToHex(e)}function b(e){return Number(e)}function y(e){return function(e){let t=o.stripHexPrefix(e);for(;"0"===t[0];)t=t.substr(1);return`0x${t}`}(e.toString("hex"))}function m(e){return e&&-1===["earliest","latest","pending"].indexOf(e)}function v(e){return Object.keys(e).map(function(t){return e[t]})}t.exports=c,i(c,a),c.prototype.handleRequest=function(e,t,r){const n=this;switch(e.method){case"eth_newBlockFilter":return void n.newBlockFilter(r);case"eth_newPendingTransactionFilter":return n.newPendingTransactionFilter(r),void n.checkForPendingBlocks();case"eth_newFilter":return void n.newLogFilter(e.params[0],r);case"eth_getFilterChanges":return void n._ready.await(function(){n.getFilterChanges(e.params[0],r)});case"eth_getFilterLogs":return void n._ready.await(function(){n.getFilterLogs(e.params[0],r)});case"eth_uninstallFilter":return void n._ready.await(function(){n.uninstallFilter(e.params[0],r)});default:return void t()}},c.prototype.newBlockFilter=function(e){const t=this;t._getBlockNumber(function(r,n){if(r)return e(r);var i=new f({blockNumber:n}),o=i.update.bind(i);t.engine.on("block",o);t.filterIndex++,t.filters[t.filterIndex]=i,t.filterDestroyHandlers[t.filterIndex]=function(){t.engine.removeListener("block",o)};var a=p(t.filterIndex);e(null,a)})},c.prototype.newLogFilter=function(e,t){const r=this;r._getBlockNumber(function(n,i){if(n)return t(n);var o=new h(e),a=o.update.bind(o);r.filterIndex++,r.asyncBlockHandlers[r.filterIndex]=function(e,t){r._logsForBlock(e,function(e,r){if(e)return t(e);a(r),t()})},r.filters[r.filterIndex]=o;var s=p(r.filterIndex);t(null,s)})},c.prototype.newPendingTransactionFilter=function(e){const t=this;var r=new l,n=r.update.bind(r);t.filterIndex++,t.asyncPendingBlockHandlers[t.filterIndex]=function(e,r){t._txHashesForBlock(e,function(e,t){if(e)return r(e);n(t),r()})},t.filters[t.filterIndex]=r,e(null,p(t.filterIndex))},c.prototype.getFilterChanges=function(e,t){var r=Number.parseInt(e,16),n=this.filters[r];if(n||console.warn("FilterSubprovider - no filter with that id:",e),!n)return t(null,[]);var i=n.getChanges();n.clearChanges(),t(null,i)},c.prototype.getFilterLogs=function(e,t){const r=this;var n=Number.parseInt(e,16),i=r.filters[n];if(i||console.warn("FilterSubprovider - no filter with that id:",e),!i)return t(null,[]);if("log"===i.type)r.emitPayload({method:"eth_getLogs",params:[{fromBlock:i.fromBlock,toBlock:i.toBlock,address:i.address,topics:i.topics}]},function(e,r){if(e)return t(e);t(null,r.result)});else{t(null,[])}},c.prototype.uninstallFilter=function(e,t){var r=Number.parseInt(e,16);if(this.filters[r]){this.filters[r].removeAllListeners();var n=this.filterDestroyHandlers[r];delete this.filters[r],delete this.asyncBlockHandlers[r],delete this.asyncPendingBlockHandlers[r],delete this.filterDestroyHandlers[r],n&&n(),t(null,!0)}else t(null,!1)},c.prototype.checkForPendingBlocks=function(){const e=this;e.checkForPendingBlocksActive||!!Object.keys(e.asyncPendingBlockHandlers).length&&(e.checkForPendingBlocksActive=!0,e.emitPayload({method:"eth_getBlockByNumber",params:["pending",!0]},function(t,r){if(t)return e.checkForPendingBlocksActive=!1,void console.error(t);e.onNewPendingBlock(r.result,function(t){t&&console.error(t),e.checkForPendingBlocksActive=!1,setTimeout(e.checkForPendingBlocks.bind(e),e.pendingBlockTimeout)})}))},c.prototype.onNewPendingBlock=function(e,t){var r=v(this.asyncPendingBlockHandlers).map(function(t){return t.bind(null,e)});n.parallel(r,t)},c.prototype._getBlockNumber=function(e){e(null,y(this.engine.currentBlock.number))},c.prototype._logsForBlock=function(e,t){var r=y(e.number);this.emitPayload({method:"eth_getLogs",params:[{fromBlock:r,toBlock:r}]},function(e,r){return e?t(e):r.error?t(r.error):void t(null,r.result)})},c.prototype._txHashesForBlock=function(e,t){var r=e.transactions;if(0===r.length)return t(null,[]);"string"==typeof r[0]?t(null,r):t(null,r.map(e=>e.hash))},i(f,u),f.prototype.update=function(e){var t="0x"+e.hash.toString("hex");this.updates.push(t),this.emit("data",e)},f.prototype.getChanges=function(){return this.updates},f.prototype.clearChanges=function(){this.updates=[]},i(h,u),h.prototype.validateLog=function(e){return!(m(this.fromBlock)&&b(this.fromBlock)>=b(e.blockNumber))&&(!(m(this.toBlock)&&b(this.toBlock)<=b(e.blockNumber))&&(!(this.address&&!this.address.map(e=>e.toLowerCase()).includes(e.address.toLowerCase()))&&this.topics.reduce(function(t,r,n){if(!t)return!1;if(!r)return!0;var i=e.topics[n];return!!i&&(Array.isArray(r)?r:[r]).filter(function(e){return i.toLowerCase()===e.toLowerCase()}).length>0},!0)))},h.prototype.update=function(e){const t=this;var r=[];e.forEach(function(e){t.validateLog(e)&&(r.push(e),t.updates.push(e),t.allResults.push(e))}),r.length>0&&t.emit("data",r)},h.prototype.getChanges=function(){return this.updates},h.prototype.getAllResults=function(){return this.allResults},h.prototype.clearChanges=function(){this.updates=[]},i(l,u),l.prototype.validateUnique=function(e){return-1===this.allResults.indexOf(e)},l.prototype.update=function(e){const t=this;var r=[];e.forEach(function(e){t.validateUnique(e)&&(r.push(e),t.updates.push(e),t.allResults.push(e))}),r.length>0&&t.emit("data",r)},l.prototype.getChanges=function(){return this.updates},l.prototype.getAllResults=function(){return this.allResults},l.prototype.clearChanges=function(){this.updates=[]}},{"../util/stoplight.js":396,"./subprovider.js":387,async:21,"ethereumjs-util":141,events:157,util:333}],380:[function(e,t,r){const n=e("util").inherits,i=e("./subprovider.js");function o(e){e=e||{},this.staticResponses=e}t.exports=o,n(o,i),o.prototype.handleRequest=function(e,t,r){var n=this.staticResponses[e.method];"function"==typeof n?n(e,t,r):void 0!==n?setTimeout(()=>r(null,n)):t()}},{"./subprovider.js":387,util:333}],381:[function(e,t,r){const n=e("async/waterfall"),i=e("async/parallel"),o=e("util").inherits,a=e("ethereumjs-util"),s=e("eth-sig-util"),u=e("xtend"),c=e("semaphore"),f=e("./subprovider.js"),h=e("../util/estimate-gas.js"),l=/^[0-9A-Fa-f]+$/g;function d(e){this.nonceLock=c(1),e.getAccounts&&(this.getAccounts=e.getAccounts),e.processTransaction&&(this.processTransaction=e.processTransaction),e.processMessage&&(this.processMessage=e.processMessage),e.processPersonalMessage&&(this.processPersonalMessage=e.processPersonalMessage),e.processTypedMessage&&(this.processTypedMessage=e.processTypedMessage),this.approveTransaction=e.approveTransaction||this.autoApprove,this.approveMessage=e.approveMessage||this.autoApprove,this.approvePersonalMessage=e.approvePersonalMessage||this.autoApprove,this.approveTypedMessage=e.approveTypedMessage||this.autoApprove,e.signTransaction&&(this.signTransaction=e.signTransaction||y("signTransaction")),e.signMessage&&(this.signMessage=e.signMessage||y("signMessage")),e.signPersonalMessage&&(this.signPersonalMessage=e.signPersonalMessage||y("signPersonalMessage")),e.signTypedMessage&&(this.signTypedMessage=e.signTypedMessage||y("signTypedMessage")),e.recoverPersonalSignature&&(this.recoverPersonalSignature=e.recoverPersonalSignature),e.publishTransaction&&(this.publishTransaction=e.publishTransaction)}function p(e){return e.toLowerCase()}function b(e){return"string"==typeof e&&("0x"===e.slice(0,2)&&e.slice(2).match(l))}function y(e){return function(t,r){r(new Error('ProviderEngine - HookedWalletSubprovider - Must provide "'+e+'" fn in constructor options'))}}t.exports=d,o(d,f),d.prototype.handleRequest=function(e,t,r){const i=this;let o,s,c,f,h;switch(i._parityRequests={},i._parityRequestCount=0,e.method){case"eth_coinbase":return void i.getAccounts(function(e,t){if(e)return r(e);let n=t[0]||null;r(null,n)});case"eth_accounts":return void i.getAccounts(function(e,t){if(e)return r(e);r(null,t)});case"eth_sendTransaction":return o=e.params[0],void n([e=>i.validateTransaction(o,e),e=>i.processTransaction(o,e)],r);case"eth_signTransaction":return o=e.params[0],void n([e=>i.validateTransaction(o,e),e=>i.processSignTransaction(o,e)],r);case"eth_sign":return h=e.params[0],f=e.params[1],c=e.params[2]||{},s=u(c,{from:h,data:f}),void n([e=>i.validateMessage(s,e),e=>i.processMessage(s,e)],r);case"personal_sign":const l=e.params[0];if(function(e){const t=a.addHexPrefix(e);return!a.isValidAddress(t)&&b(e)}(e.params[1])&&function(e){const t=a.addHexPrefix(e);return a.isValidAddress(t)}(l)){let t="The eth_personalSign method requires params ordered ";t+="[message, address]. This was previously handled incorrectly, ",t+="and has been corrected automatically. ",t+="Please switch this param order for smooth behavior in the future.",console.warn(t),h=e.params[0],f=e.params[1]}else f=e.params[0],h=e.params[1];return c=e.params[2]||{},s=u(c,{from:h,data:f}),void n([e=>i.validatePersonalMessage(s,e),e=>i.processPersonalMessage(s,e)],r);case"personal_ecRecover":f=e.params[0];let d=e.params[1];return c=e.params[2]||{},s=u(c,{sig:d,data:f}),void i.recoverPersonalSignature(s,r);case"eth_signTypedData":return f=e.params[0],h=e.params[1],c=e.params[2]||{},s=u(c,{from:h,data:f}),void n([e=>i.validateTypedMessage(s,e),e=>i.processTypedMessage(s,e)],r);case"parity_postTransaction":return o=e.params[0],void i.parityPostTransaction(o,r);case"parity_postSign":return h=e.params[0],f=e.params[1],void i.parityPostSign(h,f,r);case"parity_checkRequest":const p=e.params[0];return void i.parityCheckRequest(p,r);case"parity_defaultAccount":return void i.getAccounts(function(e,t){if(e)return r(e);const n=t[0]||null;r(null,n)});default:return void t()}},d.prototype.getAccounts=function(e){e(null,[])},d.prototype.processTransaction=function(e,t){const r=this;n([t=>r.approveTransaction(e,t),(e,t)=>r.checkApproval("transaction",e,t),t=>r.finalizeAndSubmitTx(e,t)],t)},d.prototype.processSignTransaction=function(e,t){const r=this;n([t=>r.approveTransaction(e,t),(e,t)=>r.checkApproval("transaction",e,t),t=>r.finalizeTx(e,t)],t)},d.prototype.processMessage=function(e,t){const r=this;n([t=>r.approveMessage(e,t),(e,t)=>r.checkApproval("message",e,t),t=>r.signMessage(e,t)],t)},d.prototype.processPersonalMessage=function(e,t){const r=this;n([t=>r.approvePersonalMessage(e,t),(e,t)=>r.checkApproval("message",e,t),t=>r.signPersonalMessage(e,t)],t)},d.prototype.processTypedMessage=function(e,t){const r=this;n([t=>r.approveTypedMessage(e,t),(e,t)=>r.checkApproval("message",e,t),t=>r.signTypedMessage(e,t)],t)},d.prototype.autoApprove=function(e,t){t(null,!0)},d.prototype.checkApproval=function(e,t,r){r(t?null:new Error("User denied "+e+" signature."))},d.prototype.parityPostTransaction=function(e,t){const r=this,n=`0x${r._parityRequestCount.toString(16)}`;r._parityRequestCount++,r.emitPayload({method:"eth_sendTransaction",params:[e]},function(e,t){if(e)return void(r._parityRequests[n]={error:e});const i=t.result;r._parityRequests[n]=i}),t(null,n)},d.prototype.parityPostSign=function(e,t,r){const n=this,i=`0x${n._parityRequestCount.toString(16)}`;n._parityRequestCount++,n.emitPayload({method:"eth_sign",params:[e,t]},function(e,t){if(e)return void(n._parityRequests[i]={error:e});const r=t.result;n._parityRequests[i]=r}),r(null,i)},d.prototype.parityCheckRequest=function(e,t){const r=this._parityRequests[e]||null;return r?r.error?t(r.error):void t(null,r):t(null,null)},d.prototype.recoverPersonalSignature=function(e,t){let r;try{r=s.recoverPersonalSignature(e)}catch(e){return t(e)}t(null,r)},d.prototype.validateTransaction=function(e,t){if(void 0===e.from)return t(new Error("Undefined address - from address required to sign transaction."));this.validateSender(e.from,function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign transaction for this address: "${e.from}"`))})},d.prototype.validateMessage=function(e,t){if(void 0===e.from)return t(new Error("Undefined address - from address required to sign message."));this.validateSender(e.from,function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign message for this address: "${e.from}"`))})},d.prototype.validatePersonalMessage=function(e,t){return void 0===e.from?t(new Error("Undefined address - from address required to sign personal message.")):void 0===e.data?t(new Error("Undefined message - message required to sign personal message.")):b(e.data)?void this.validateSender(e.from,function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign message for this address: "${e.from}"`))}):t(new Error("HookedWalletSubprovider - validateMessage - message was not encoded as hex."))},d.prototype.validateTypedMessage=function(e,t){return void 0===e.from?t(new Error("Undefined address - from address required to sign typed data.")):void 0===e.data?t(new Error("Undefined data - message required to sign typed data.")):void this.validateSender(e.from,function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign message for this address: "${e.from}"`))})},d.prototype.validateSender=function(e,t){if(!e)return t(null,!1);this.getAccounts(function(r,n){if(r)return t(r);const i=-1!==n.map(p).indexOf(e.toLowerCase());t(null,i)})},d.prototype.finalizeAndSubmitTx=function(e,t){const r=this;r.nonceLock.take(function(){n([r.fillInTxExtras.bind(r,e),r.signTransaction.bind(r),r.publishTransaction.bind(r)],function(e,n){if(r.nonceLock.leave(),e)return t(e);t(null,n)})})},d.prototype.finalizeTx=function(e,t){const r=this;r.nonceLock.take(function(){n([r.fillInTxExtras.bind(r,e),r.signTransaction.bind(r)],function(n,i){if(r.nonceLock.leave(),n)return t(n);t(null,{raw:i,tx:e})})})},d.prototype.publishTransaction=function(e,t){this.emitPayload({method:"eth_sendRawTransaction",params:[e]},function(e,r){if(e)return t(e);t(null,r.result)})},d.prototype.fillInTxExtras=function(e,t){const r=this,n=e.from,o={};void 0===e.gasPrice&&(o.gasPrice=r.emitPayload.bind(r,{method:"eth_gasPrice",params:[]})),void 0===e.nonce&&(o.nonce=r.emitPayload.bind(r,{method:"eth_getTransactionCount",params:[n,"pending"]})),void 0===e.gas&&(o.gas=h.bind(null,r.engine,function(e){return{from:e.from,to:e.to,value:e.value,data:e.data,gas:e.gas,gasPrice:e.gasPrice,nonce:e.nonce}}(e))),i(o,function(r,n){if(r)return t(r);const i={};n.gasPrice&&(i.gasPrice=n.gasPrice.result),n.nonce&&(i.nonce=n.nonce.result),n.gas&&(i.gas=n.gas),t(null,u(e,i))})}},{"../util/estimate-gas.js":392,"./subprovider.js":387,"async/parallel":42,"async/waterfall":44,"eth-sig-util":136,"ethereumjs-util":141,semaphore:301,util:333,xtend:423}],382:[function(e,t,r){const n=e("../util/rpc-cache-utils.js").cacheIdentifierForPayload,i=e("./subprovider.js");t.exports=class extends i{constructor(e){super(),this.inflightRequests={}}addEngine(e){this.engine=e}handleRequest(e,t,r){const i=n(e,{includeBlockRef:!0});if(!i)return t();let o=this.inflightRequests[i];o?o.push(r):(o=[],this.inflightRequests[i]=o,t((e,t,r)=>{delete this.inflightRequests[i],o.forEach(r=>r(e,t)),r(e,t)}))}}},{"../util/rpc-cache-utils.js":394,"./subprovider.js":387}],383:[function(e,t,r){const n=e("eth-json-rpc-infura/src/createProvider"),i=e("./provider.js");t.exports=class extends i{constructor(e={}){super(n(e))}}},{"./provider.js":385,"eth-json-rpc-infura/src/createProvider":129}],384:[function(e,t,r){(function(r){const n=e("util").inherits,i=e("ethereumjs-tx"),o=e("ethereumjs-util"),a=e("./subprovider.js"),s=e("../util/rpc-cache-utils").blockTagForPayload;function u(e){this.nonceCache={}}t.exports=u,n(u,a),u.prototype.handleRequest=function(e,t,n){const a=this;switch(e.method){case"eth_getTransactionCount":var u=s(e),c=e.params[0].toLowerCase(),f=a.nonceCache[c];return void("pending"===u?f?n(null,f):t(function(e,t,r){if(e)return r();void 0===a.nonceCache[c]&&(a.nonceCache[c]=t),r()}):t());case"eth_sendRawTransaction":return void t(function(t,n,s){if(t)return s();var u=e.params[0],c=(o.stripHexPrefix(u),new r(o.stripHexPrefix(u),"hex"),new i(new r(o.stripHexPrefix(u),"hex"))),f="0x"+c.getSenderAddress().toString("hex").toLowerCase(),h=o.bufferToInt(c.nonce),l=(++h).toString(16);l.length%2&&(l="0"+l),l="0x"+l,a.nonceCache[f]=l,s()});default:return void t()}}}).call(this,e("buffer").Buffer)},{"../util/rpc-cache-utils":394,"./subprovider.js":387,buffer:84,"ethereumjs-tx":140,"ethereumjs-util":141,util:333}],385:[function(e,t,r){const n=e("util").inherits,i=e("./subprovider.js");function o(e){if(!e)throw new Error("ProviderSubprovider - no provider specified");if(!e.sendAsync)throw new Error("ProviderSubprovider - specified provider does not have a sendAsync method");this.provider=e}t.exports=o,n(o,i),o.prototype.handleRequest=function(e,t,r){this.provider.sendAsync(e,function(e,t){return e?r(e):t.error?r(new Error(t.error.message)):void r(null,t.result)})}},{"./subprovider.js":387,util:333}],386:[function(e,t,r){const n=e("util").inherits,i=e("./subprovider.js"),o=(e("xtend"),e("ethereumjs-util"));function a(e){}t.exports=a,n(a,i),a.prototype.handleRequest=function(e,t,r){var n=e.params[0];if("object"==typeof n&&!Array.isArray(n)){var i=function(e){return s.reduce(function(t,r){return r in e&&(Array.isArray(e[r])?t[r]=e[r].map(function(e){return u(e)}):t[r]=u(e[r])),t},{})}(n);e.params[0]=i}t()};var s=["from","to","value","data","gas","gasPrice","nonce","fromBlock","toBlock","address","topics"];function u(e){switch(e){case"latest":case"pending":case"earliest":return e;default:return"string"==typeof e?o.addHexPrefix(e.toLowerCase()):e}}},{"./subprovider.js":387,"ethereumjs-util":141,util:333,xtend:423}],387:[function(e,t,r){const n=e("../util/create-payload.js");function i(){}t.exports=i,i.prototype.setEngine=function(e){const t=this;t.engine=e,e.on("block",function(e){t.currentBlock=e})},i.prototype.handleRequest=function(e,t,r){throw new Error("Subproviders should override `handleRequest`.")},i.prototype.emitPayload=function(e,t){this.engine.sendAsync(n(e),t)}},{"../util/create-payload.js":391}],388:[function(e,t,r){const n=e("events").EventEmitter,i=e("./filters.js"),o=e("../util/rpc-hex-encoding.js"),a=e("util").inherits,s=e("ethereumjs-util");function u(e){e=e||{},n.apply(this,Array.prototype.slice.call(arguments)),i.apply(this,[e]),this.subscriptions={}}a(u,i),Object.assign(u.prototype,n.prototype),u.prototype.constructor=u,u.prototype.eth_subscribe=function(e,t){const r=this;let n=()=>{},i=e.params[0];switch(i){case"logs":let o=e.params[1];n=r.newLogFilter.bind(r,o);break;case"newPendingTransactions":n=r.newPendingTransactionFilter.bind(r);break;case"newHeads":n=r.newBlockFilter.bind(r);break;case"syncing":default:return void t(new Error("unsupported subscription type"))}n(function(e,n){if(e)return t(e);const o=Number.parseInt(n,16);r.subscriptions[o]=i,r.filters[o].on("data",function(e){Array.isArray(e)||(e=[e]);var t=r._notificationHandler.bind(r,n,i);e.forEach(t),r.filters[o].clearChanges()}),"newPendingTransactions"===i&&r.checkForPendingBlocks(),t(null,n)})},u.prototype.eth_unsubscribe=function(e,t){const r=this;let n=e.params[0];const i=Number.parseInt(n,16);if(r.subscriptions[i]){r.subscriptions[i];r.uninstallFilter(n,function(e,n){delete r.subscriptions[i],t(e,n)})}else t(new Error(`Subscription ID ${n} not found.`))},u.prototype._notificationHandler=function(e,t,r){const n=this;"newHeads"===t&&(r=n._notificationResultFromBlock(r)),n.emit("data",null,{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:e,result:r}})},u.prototype._notificationResultFromBlock=function(e){return{hash:s.bufferToHex(e.hash),parentHash:s.bufferToHex(e.parentHash),sha3Uncles:s.bufferToHex(e.sha3Uncles),miner:s.bufferToHex(e.miner),stateRoot:s.bufferToHex(e.stateRoot),transactionsRoot:s.bufferToHex(e.transactionsRoot),receiptsRoot:s.bufferToHex(e.receiptsRoot),logsBloom:s.bufferToHex(e.logsBloom),difficulty:o.intToQuantityHex(s.bufferToInt(e.difficulty)),number:o.intToQuantityHex(s.bufferToInt(e.number)),gasLimit:o.intToQuantityHex(s.bufferToInt(e.gasLimit)),gasUsed:o.intToQuantityHex(s.bufferToInt(e.gasUsed)),nonce:e.nonce?s.bufferToHex(e.nonce):null,mixHash:s.bufferToHex(e.mixHash),timestamp:o.intToQuantityHex(s.bufferToInt(e.timestamp)),extraData:s.bufferToHex(e.extraData)}},u.prototype.handleRequest=function(e,t,r){switch(e.method){case"eth_subscribe":this.eth_subscribe(e,r);break;case"eth_unsubscribe":this.eth_unsubscribe(e,r);break;default:i.prototype.handleRequest.apply(this,Array.prototype.slice.call(arguments))}},t.exports=u},{"../util/rpc-hex-encoding.js":395,"./filters.js":379,"ethereumjs-util":141,events:157,util:333}],389:[function(e,t,r){(function(r){const n=e("backoff"),i=e("events"),o=(e("util").inherits,r.WebSocket||e("ws")),a=e("./subprovider"),s=e("../util/create-payload");class u extends a{constructor({rpcUrl:e,debug:t,origin:r}){super(),i.call(this),Object.defineProperties(this,{_backoff:{value:n.exponential({randomisationFactor:.2,maxDelay:5e3})},_connectTime:{value:null,writable:!0},_log:{value:t?(...e)=>console.info.apply(console,["[WSProvider]",...e]):()=>{}},_origin:{value:r},_pendingRequests:{value:new Map},_socket:{value:null,writable:!0},_unhandledRequests:{value:[]},_url:{value:e}}),this._handleSocketClose=this._handleSocketClose.bind(this),this._handleSocketMessage=this._handleSocketMessage.bind(this),this._handleSocketOpen=this._handleSocketOpen.bind(this),this._backoff.on("ready",()=>{this._openSocket()}),this._openSocket()}handleRequest(e,t,r){if(!this._socket||this._socket.readyState!==o.OPEN)return this._unhandledRequests.push(Array.from(arguments)),void this._log("Socket not open. Request queued.");this._pendingRequests.set(e.id,[e,r]);const n=s(e);delete n.origin,this._socket.send(JSON.stringify(n)),this._log(`Sent: ${n.method} #${n.id}`)}_handleSocketClose({reason:e,code:t}){this._log(`Socket closed, code ${t} (${e||"no reason"})`),this._connectTime&&Date.now()-this._connectTime>5e3&&this._backoff.reset(),this._socket.removeEventListener("close",this._handleSocketClose),this._socket.removeEventListener("message",this._handleSocketMessage),this._socket.removeEventListener("open",this._handleSocketOpen),this._socket=null,this._backoff.backoff()}_handleSocketMessage(e){let t;try{t=JSON.parse(e.data)}catch(e){return void this._log("Received a message that is not valid JSON:",t)}if(void 0===t.id)return this.emit("data",null,t);if(!this._pendingRequests.has(t.id))return;const[r,n]=this._pendingRequests.get(t.id);if(this._pendingRequests.delete(t.id),this._log(`Received: ${r.method} #${t.id}`),t.error)return n(new Error(t.error.message));n(null,t.result)}_handleSocketOpen(){this._log("Socket open."),this._connectTime=Date.now(),this._pendingRequests.forEach(([e,t])=>{this._unhandledRequests.push([e,null,t])}),this._pendingRequests.clear(),this._unhandledRequests.splice(0,this._unhandledRequests.length).forEach(e=>{this.handleRequest.apply(this,e)})}_openSocket(){this._log("Opening socket..."),this._socket=new o(this._url,null,{origin:this._origin}),this._socket.addEventListener("close",this._handleSocketClose),this._socket.addEventListener("message",this._handleSocketMessage),this._socket.addEventListener("open",this._handleSocketOpen)}}Object.assign(u.prototype,i.prototype),t.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util/create-payload":391,"./subprovider":387,backoff:45,events:157,util:333,ws:55}],390:[function(e,t,r){t.exports=function(e,t){if(!e)throw t||"Assertion failed"}},{}],391:[function(e,t,r){const n=e("./random-id.js"),i=e("xtend");t.exports=function(e){return i({id:n(),jsonrpc:"2.0",params:[]},e)}},{"./random-id.js":393,xtend:423}],392:[function(e,t,r){const n=e("./create-payload.js");t.exports=function(e,t,r){e.sendAsync(n({method:"eth_estimateGas",params:[t]}),function(e,t){if(e)return"no contract code at given address"===e.message?r(null,"0xcf08"):r(e);r(null,t.result)})}},{"./create-payload.js":391}],393:[function(e,t,r){const n=3;t.exports=function(){var e=(new Date).getTime()*Math.pow(10,n),t=Math.floor(Math.random()*Math.pow(10,n));return e+t}},{}],394:[function(e,t,r){const n=e("json-stable-stringify");function i(e){return"never"!==s(e)}function o(e){var t=a(e);return t>=e.params.length?e.params:"eth_getBlockByNumber"===e.method?e.params.slice(1):e.params.slice(0,t)}function a(e){switch(e.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":return 1;case"eth_getBlockByNumber":return 0;default:return}}function s(e){switch(e.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":return"fork";case"eth_gasPrice":case"eth_blockNumber":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"net_peerCount":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":return"never"}}t.exports={cacheIdentifierForPayload:function(e,t={}){if(!i(e))return null;const{includeBlockRef:r}=t,a=r?e.params:o(e);return e.method+":"+n(a)},canCache:i,blockTagForPayload:function(e){var t=a(e);if(t>=e.params.length)return null;return e.params[t]},paramsWithoutBlockTag:o,blockTagParamIndex:a,cacheTypeForPayload:s}},{"json-stable-stringify":374}],395:[function(e,t,r){(function(r){const n=e("ethereumjs-util"),i=e("./assert.js");t.exports={intToQuantityHex:function(e){i("number"==typeof e&&e===Math.floor(e),"intToQuantityHex arg must be an integer");var t=n.toBuffer(e).toString("hex");"0"===t[0]&&(t=t.substring(1));return n.addHexPrefix(t)},quantityHexToInt:function(e){i("string"==typeof e,"arg to quantityHexToInt must be a string");var t=n.stripHexPrefix(e);t.length%2!=0&&(t="0"+t);var o=new r(t,"hex");return n.bufferToInt(o)}}}).call(this,e("buffer").Buffer)},{"./assert.js":390,buffer:84,"ethereumjs-util":141}],396:[function(e,t,r){const n=e("events").EventEmitter,i=e("util").inherits;function o(){n.call(this),this.isLocked=!0}t.exports=o,i(o,n),o.prototype.go=function(){this.isLocked=!1,this.emit("unlock")},o.prototype.stop=function(){this.isLocked=!0,this.emit("lock")},o.prototype.await=function(e){const t=this;t.isLocked?t.once("unlock",e):setTimeout(e)}},{events:157,util:333}],397:[function(e,t,r){const n=e("./index.js"),i=e("./subproviders/default-fixture.js"),o=e("./subproviders/nonce-tracker.js"),a=e("./subproviders/cache.js"),s=e("./subproviders/filters.js"),u=e("./subproviders/subscriptions"),c=e("./subproviders/inflight-cache"),f=e("./subproviders/hooked-wallet.js"),h=e("./subproviders/sanitizer.js"),l=e("./subproviders/infura.js"),d=e("./subproviders/fetch.js"),p=e("./subproviders/websocket.js");t.exports=function(e={}){const t=function({rpcUrl:e}){if(!e)return;switch(e.split(":")[0].toLowerCase()){case"http":case"https":return"http";case"ws":case"wss":return"ws";default:throw new Error(`ProviderEngine - unrecognized protocol in "${e}"`)}}(e),r=new n(e.engineParams),b=new i(e.static);r.addProvider(b),r.addProvider(new o);const y=new h;r.addProvider(y);const m=new a;if(r.addProvider(m),"ws"===t){const e=new s;r.addProvider(e)}else{const e=new u;e.on("data",(e,t)=>{r.emit("data",e,t)}),r.addProvider(e)}const v=new c;r.addProvider(v);const g=new f({getAccounts:e.getAccounts,processTransaction:e.processTransaction,approveTransaction:e.approveTransaction,signTransaction:e.signTransaction,publishTransaction:e.publishTransaction,processMessage:e.processMessage,approveMessage:e.approveMessage,signMessage:e.signMessage,processPersonalMessage:e.processPersonalMessage,processTypedMessage:e.processTypedMessage,approvePersonalMessage:e.approvePersonalMessage,approveTypedMessage:e.approveTypedMessage,signPersonalMessage:e.signPersonalMessage,signTypedMessage:e.signTypedMessage,personalRecoverSigner:e.personalRecoverSigner});r.addProvider(g);const w=e.dataSubprovider||function(e,t){const{rpcUrl:r,debug:n}=t;if(!e)return new l;if("http"===e)return new d({rpcUrl:r,debug:n});if("ws"===e)return new p({rpcUrl:r,debug:n});throw new Error(`ProviderEngine - unrecognized connectionType "${e}"`)}(t,e);"ws"===t&&w.on("data",(e,t)=>{r.emit("data",e,t)});r.addProvider(w),e.stopped||r.start();return r}},{"./index.js":373,"./subproviders/cache.js":376,"./subproviders/default-fixture.js":377,"./subproviders/fetch.js":378,"./subproviders/filters.js":379,"./subproviders/hooked-wallet.js":381,"./subproviders/inflight-cache":382,"./subproviders/infura.js":383,"./subproviders/nonce-tracker.js":384,"./subproviders/sanitizer.js":386,"./subproviders/subscriptions":388,"./subproviders/websocket.js":389}],398:[function(e,t,r){var n=e("web3-core-helpers").errors,i=e("xhr2-cookies").XMLHttpRequest,o=e("http"),a=e("https"),s=function(e,t){t=t||{},this.host=e||"http://localhost:8545","https"===this.host.substring(0,5)?this.httpsAgent=new a.Agent({keepAlive:!0}):this.httpAgent=new o.Agent({keepAlive:!0}),this.timeout=t.timeout||0,this.headers=t.headers,this.connected=!1};s.prototype._prepareRequest=function(){var e=new i;return e.nodejsSet({httpsAgent:this.httpsAgent,httpAgent:this.httpAgent}),e.open("POST",this.host,!0),e.setRequestHeader("Content-Type","application/json"),e.timeout=this.timeout&&1!==this.timeout?this.timeout:0,e.withCredentials=!0,this.headers&&this.headers.forEach(function(t){e.setRequestHeader(t.name,t.value)}),e},s.prototype.send=function(e,t){var r=this,i=this._prepareRequest();i.onreadystatechange=function(){if(4===i.readyState&&1!==i.timeout){var e=i.responseText,o=null;try{e=JSON.parse(e)}catch(e){o=n.InvalidResponse(i.responseText)}r.connected=!0,t(o,e)}},i.ontimeout=function(){r.connected=!1,t(n.ConnectionTimeout(this.timeout))};try{i.send(JSON.stringify(e))}catch(e){this.connected=!1,t(n.InvalidConnection(this.host))}},s.prototype.disconnect=function(){},t.exports=s},{http:312,https:175,"web3-core-helpers":338,"xhr2-cookies":418}],399:[function(e,t,r){"use strict";var n=e("underscore"),i=e("web3-core-helpers").errors,o=e("oboe"),a=function(e,t){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=e,this.connected=!1,this.connection=t.connect({path:this.path}),this.addDefaultEvents();var i=function(e){var t=null;n.isArray(e)?e.forEach(function(e){r.responseCallbacks[e.id]&&(t=e.id)}):t=e.id,t||-1===e.method.indexOf("_subscription")?r.responseCallbacks[t]&&(r.responseCallbacks[t](null,e),delete r.responseCallbacks[t]):r.notificationCallbacks.forEach(function(t){n.isFunction(t)&&t(e)})};"Socket"===t.constructor.name?o(this.connection).done(i):this.connection.on("data",function(e){r._parseResponse(e.toString()).forEach(i)})};a.prototype.addDefaultEvents=function(){var e=this;this.connection.on("connect",function(){e.connected=!0}),this.connection.on("close",function(){e.connected=!1}),this.connection.on("error",function(){e._timeout()}),this.connection.on("end",function(){e._timeout()}),this.connection.on("timeout",function(){e._timeout()})},a.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(e){t.lastChunk&&(e=t.lastChunk+e);var n=null;try{n=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout(function(){throw t._timeout(),i.InvalidResponse(e)},15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,n&&r.push(n)}),r},a.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,n=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=n},a.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](i.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},a.prototype.reconnect=function(){this.connection.connect({path:this.path})},a.prototype.send=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},a.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");switch(e){case"data":this.notificationCallbacks.push(t);break;default:this.connection.on(e,t)}},a.prototype.once=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");this.connection.once(e,t)},a.prototype.removeListener=function(e,t){var r=this;switch(e){case"data":this.notificationCallbacks.forEach(function(e,n){e===t&&r.notificationCallbacks.splice(n,1)});break;default:this.connection.removeListener(e,t)}},a.prototype.removeAllListeners=function(e){switch(e){case"data":this.notificationCallbacks=[];break;default:this.connection.removeAllListeners(e)}},a.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},t.exports=a},{oboe:239,underscore:325,"web3-core-helpers":338}],400:[function(e,t,r){(function(r){"use strict";var n=e("underscore"),i=e("web3-core-helpers").errors,o=null,a=null,s=null;if("undefined"!=typeof window&&void 0!==window.WebSocket)o=function(e,t){return new window.WebSocket(e,t)},a=btoa,s=function(e){return new URL(e)};else{o=e("websocket").w3cwebsocket,a=function(e){return r(e).toString("base64")};var u=e("url");if(u.URL){var c=u.URL;s=function(e){return new c(e)}}else s=e("url").parse}var f=function(e,t){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],t=t||{},this._customTimeout=t.timeout;var i=s(e),u=t.headers||{},c=t.protocol||void 0;i.username&&i.password&&(u.authorization="Basic "+a(i.username+":"+i.password));var f=t.clientConfig||void 0;i.auth&&(u.authorization="Basic "+a(i.auth)),this.connection=new o(e,c,void 0,u,void 0,f),this.addDefaultEvents(),this.connection.onmessage=function(e){var t="string"==typeof e.data?e.data:"";r._parseResponse(t).forEach(function(e){var t=null;n.isArray(e)?e.forEach(function(e){r.responseCallbacks[e.id]&&(t=e.id)}):t=e.id,!t&&e&&e.method&&-1!==e.method.indexOf("_subscription")?r.notificationCallbacks.forEach(function(t){n.isFunction(t)&&t(e)}):r.responseCallbacks[t]&&(r.responseCallbacks[t](null,e),delete r.responseCallbacks[t])})},Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0})};f.prototype.addDefaultEvents=function(){var e=this;this.connection.onerror=function(){e._timeout()},this.connection.onclose=function(){e._timeout(),e.reset()}},f.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(e){t.lastChunk&&(e=t.lastChunk+e);var n=null;try{n=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout(function(){throw t._timeout(),i.InvalidResponse(e)},15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,n&&r.push(n)}),r},f.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,n=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=n;var o=this;this._customTimeout&&setTimeout(function(){o.responseCallbacks[r]&&(o.responseCallbacks[r](i.ConnectionTimeout(o._customTimeout)),delete o.responseCallbacks[r])},this._customTimeout)},f.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](i.InvalidConnection("on WS")),delete this.responseCallbacks[e])},f.prototype.send=function(e,t){var r=this;if(this.connection.readyState!==this.connection.CONNECTING){if(this.connection.readyState!==this.connection.OPEN)return console.error("connection not open on send()"),"function"==typeof this.connection.onerror?this.connection.onerror(new Error("connection not open")):console.error("no error callback"),void t(new Error("connection not open"));this.connection.send(JSON.stringify(e)),this._addResponseCallback(e,t)}else setTimeout(function(){r.send(e,t)},10)},f.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");switch(e){case"data":this.notificationCallbacks.push(t);break;case"connect":this.connection.onopen=t;break;case"end":this.connection.onclose=t;break;case"error":this.connection.onerror=t}},f.prototype.removeListener=function(e,t){var r=this;switch(e){case"data":this.notificationCallbacks.forEach(function(e,n){e===t&&r.notificationCallbacks.splice(n,1)})}},f.prototype.removeAllListeners=function(e){switch(e){case"data":this.notificationCallbacks=[];break;case"connect":this.connection.onopen=null;break;case"end":this.connection.onclose=null;break;case"error":this.connection.onerror=null}},f.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.addDefaultEvents()},f.prototype.disconnect=function(){this.connection&&this.connection.close()},t.exports=f}).call(this,e("buffer").Buffer)},{buffer:84,underscore:325,url:327,"web3-core-helpers":338,websocket:408}],401:[function(e,t,r){"use strict";var n=e("web3-core"),i=e("web3-core-subscriptions").subscriptions,o=e("web3-core-method"),a=e("web3-net"),s=function(){var e=this;n.packageInit(this,arguments);var t=this.setProvider;this.setProvider=function(){t.apply(e,arguments),e.net.setProvider.apply(e,arguments)},this.clearSubscriptions=e._requestManager.clearSubscriptions,this.net=new a(this.currentProvider),[new i({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new o({name:"getVersion",call:"shh_version",params:0}),new o({name:"getInfo",call:"shh_info",params:0}),new o({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new o({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new o({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new o({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new o({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new o({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new o({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new o({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new o({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new o({name:"newSymKey",call:"shh_newSymKey",params:0}),new o({name:"addSymKey",call:"shh_addSymKey",params:1}),new o({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new o({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new o({name:"getSymKey",call:"shh_getSymKey",params:1}),new o({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new o({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new o({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new o({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new o({name:"post",call:"shh_post",params:1,inputFormatter:[null]}),new o({name:"unsubscribe",call:"shh_unsubscribe",params:1})].forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})};n.addProviders(s),t.exports=s},{"web3-core":348,"web3-core-method":339,"web3-core-subscriptions":345,"web3-net":372}],402:[function(e,t,r){arguments[4][154][0].apply(r,arguments)},{dup:154}],403:[function(e,t,r){var n=e("underscore"),i=e("ethjs-unit"),o=e("./utils.js"),a=e("./soliditySha3.js"),s=e("randomhex"),u=function(e,t){var r=[];return t.forEach(function(t){if("object"==typeof t.components){if("tuple"!==t.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var i="",o=t.type.indexOf("[");o>=0&&(i=t.type.substring(o));var a=u(e,t.components);n.isArray(a)&&e?r.push("tuple("+a.join(",")+")"+i):e?r.push("("+a+")"):r.push("("+a.join(",")+")"+i)}else r.push(t.type)}),r},c=function(e){if(!o.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r7?r+=e[n].toUpperCase():r+=e[n];return r},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:c,toAscii:c,asciiToHex:f,fromAscii:f,unitMap:i.unitMap,toWei:function(e,t){if(t=h(t),!o.isBN(e)&&!n.isString(e))throw new Error("Please pass numbers as strings or BigNumber objects to avoid precision errors.");return o.isBN(e)?i.toWei(e,t):i.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=h(t),!o.isBN(e)&&!n.isString(e))throw new Error("Please pass numbers as strings or BigNumber objects to avoid precision errors.");return o.isBN(e)?i.fromWei(e,t):i.fromWei(e,t).toString(10)},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement}},{"./soliditySha3.js":404,"./utils.js":405,"ethjs-unit":153,randomhex:274,underscore:325}],404:[function(e,t,r){var n=e("underscore"),i=e("bn.js"),o=e("./utils.js"),a=function(e){var t=typeof e;if("string"===t)return o.isHexStrict(e)?new i(e.replace(/0x/i,""),16):new i(e,10);if("number"===t)return new i(e);if(o.isBigNumber(e))return new i(e.toString(10));if(o.isBN(e))return e;throw new Error(e+" is not a number")},s=function(e,t,r){var n,s,u;if("bytes"===(e=(u=e).startsWith("int[")?"int256"+u.slice(3):"int"===u?"int256":u.startsWith("uint[")?"uint256"+u.slice(4):"uint"===u?"uint256":u.startsWith("fixed[")?"fixed128x128"+u.slice(5):"fixed"===u?"fixed128x128":u.startsWith("ufixed[")?"ufixed128x128"+u.slice(6):"ufixed"===u?"ufixed128x128":u)){if(t.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+t.length);return t}if("string"===e)return o.utf8ToHex(t);if("bool"===e)return t?"01":"00";if(e.startsWith("address")){if(n=r?64:40,!o.isAddress(t))throw new Error(t+" is not a valid address, or the checksum is invalid.");return o.leftPad(t.toLowerCase(),n)}if(n=function(e){var t=/^\D+(\d+).*$/.exec(e);return t?parseInt(t[1],10):null}(e),e.startsWith("bytes")){if(!n)throw new Error("bytes[] not yet supported in solidity");if(r&&(n=32),n<1||n>32||n256)throw new Error("Invalid uint"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s.lt(new i(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return n?o.leftPad(s.toString("hex"),n/8*2):s}if(e.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.lt(new i(0))?s.toTwos(n).toString("hex"):n?o.leftPad(s.toString("hex"),n/8*2):s}throw new Error("Unsupported or invalid type: "+e)},u=function(e){if(n.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,r,a="";if(n.isObject(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,a=e.hasOwnProperty("v")?e.v:e.value):(t=o.toHex(e,!0),a=o.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof a||/^(-)?0x/i.test(a)||(a=new i(a)),n.isArray(a)){if((r=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e);return t?parseInt(t[1],10):null}(t))&&a.length!==r)throw new Error(t+" is not matching the given array "+JSON.stringify(a));r=a.length}return n.isArray(a)?a.map(function(e){return s(t,e,r).toString("hex").replace("0x","")}).join(""):s(t,a,r).toString("hex").replace("0x","")};t.exports=function(){var e=Array.prototype.slice.call(arguments),t=n.map(e,u);return o.sha3("0x"+t.join(""))}},{"./utils.js":405,"bn.js":402,underscore:325}],405:[function(e,t,r){var n=e("underscore"),i=e("bn.js"),o=e("number-to-bn"),a=e("utf8"),s=e("eth-lib/lib/hash"),u=function(e){return e instanceof i||e&&e.constructor&&"BN"===e.constructor.name},c=function(e){return e&&e.constructor&&"BigNumber"===e.constructor.name},f=function(e){try{return o.apply(null,arguments)}catch(t){throw new Error(t+' Given value: "'+e+'"')}},h=function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(e)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(e))||l(e))},l=function(e){e=e.replace(/^0x/i,"");for(var t=m(e.toLowerCase()).replace(/^0x/i,""),r=0;r<40;r++)if(parseInt(t[r],16)>7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1;return!0},d=function(e){var t="";e=(e=(e=(e=(e=a.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x"+t.join("")},isHex:function(e){return(n.isString(e)||n.isNumber(e))&&/^(-0x|0x)?[0-9a-f]*$/i.test(e)},isHexStrict:y,leftPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+new Array(i).join(r||"0")+e},rightPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(i).join(r||"0")},toTwosComplement:function(e){return"0x"+f(e).toTwos(256).toString(16,64)},sha3:m}},{"bn.js":402,"eth-lib/lib/hash":134,"number-to-bn":237,underscore:325,utf8:329}],406:[function(e,t,r){t.exports={_from:"web3@1.0.0-beta.36",_id:"web3@1.0.0-beta.36",_inBundle:!1,_integrity:"sha512-fZDunw1V0AQS27r5pUN3eOVP7u8YAvyo6vOapdgVRolAu5LgaweP7jncYyLINqIX9ZgWdS5A090bt+ymgaYHsw==",_location:"/web3",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"web3@1.0.0-beta.36",name:"web3",escapedName:"web3",rawSpec:"1.0.0-beta.36",saveSpec:null,fetchSpec:"1.0.0-beta.36"},_requiredBy:["#USER","/"],_resolved:"https://registry.npmjs.org/web3/-/web3-1.0.0-beta.36.tgz",_shasum:"2954da9e431124c88396025510d840ba731c8373",_spec:"web3@1.0.0-beta.36",_where:"/Users/alexvlasov/Blockchain/web3swift/web3swiftJSProxy",author:{name:"ethereum.org"},authors:[{name:"Fabian Vogelsteller",email:"fabian@ethereum.org",homepage:"http://frozeman.de"},{name:"Marek Kotewicz",email:"marek@parity.io",url:"https://github.com/debris"},{name:"Marian Oancea",url:"https://github.com/cubedro"},{name:"Gav Wood",email:"g@parity.io",homepage:"http://gavwood.com"},{name:"Jeffery Wilcke",email:"jeffrey.wilcke@ethereum.org",url:"https://github.com/obscuren"}],bugs:{url:"https://github.com/ethereum/web3.js/issues"},bundleDependencies:!1,dependencies:{"web3-bzz":"1.0.0-beta.36","web3-core":"1.0.0-beta.36","web3-eth":"1.0.0-beta.36","web3-eth-personal":"1.0.0-beta.36","web3-net":"1.0.0-beta.36","web3-shh":"1.0.0-beta.36","web3-utils":"1.0.0-beta.36"},deprecated:!1,description:"Ethereum JavaScript API",keywords:["Ethereum","JavaScript","API"],license:"LGPL-3.0",main:"src/index.js",name:"web3",namespace:"ethereum",repository:{type:"git",url:"https://github.com/ethereum/web3.js/tree/master/packages/web3"},version:"1.0.0-beta.36"}},{}],407:[function(e,t,r){"use strict";var n=e("../package.json").version,i=e("web3-core"),o=e("web3-eth"),a=e("web3-net"),s=e("web3-eth-personal"),u=e("web3-shh"),c=e("web3-bzz"),f=e("web3-utils"),h=function(){var e=this;i.packageInit(this,arguments),this.version=n,this.utils=f,this.eth=new o(this),this.shh=new u(this),this.bzz=new c(this);var t=this.setProvider;this.setProvider=function(r,n){return t.apply(e,arguments),this.eth.setProvider(r,n),this.shh.setProvider(r,n),this.bzz.setProvider(r),!0}};h.version=n,h.utils=f,h.modules={Eth:o,Net:a,Personal:s,Shh:u,Bzz:c},i.addProviders(h),t.exports=h},{"../package.json":406,"web3-bzz":335,"web3-core":348,"web3-eth":371,"web3-eth-personal":369,"web3-net":372,"web3-shh":401,"web3-utils":403}],408:[function(e,t,r){var n=function(){return this||{}}(),i=n.WebSocket||n.MozWebSocket,o=e("./version");function a(e,t){return t?new i(e,t):new i(e)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach(function(e){Object.defineProperty(a,e,{get:function(){return i[e]}})}),t.exports={w3cwebsocket:i?a:null,version:o}},{"./version":409}],409:[function(e,t,r){t.exports=e("../package.json").version},{"../package.json":410}],410:[function(e,t,r){t.exports={_from:"git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",_id:"websocket@1.0.26",_inBundle:!1,_integrity:"",_location:"/websocket",_phantomChildren:{},_requested:{type:"git",raw:"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",name:"websocket",escapedName:"websocket",rawSpec:"git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",saveSpec:"git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",fetchSpec:"git://github.com/frozeman/WebSocket-Node.git",gitCommittish:"browserifyCompatible"},_requiredBy:["/web3-providers-ws"],_resolved:"git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",_spec:"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",_where:"/Users/alexvlasov/Blockchain/web3swift/web3swiftJSProxy/node_modules/web3-providers-ws",author:{name:"Brian McKelvey",email:"brian@worlize.com",url:"https://www.worlize.com/"},browser:"lib/browser.js",bugs:{url:"https://github.com/theturtle32/WebSocket-Node/issues"},bundleDependencies:!1,config:{verbose:!1},contributors:[{name:"Iñaki Baz Castillo",email:"ibc@aliax.net",url:"http://dev.sipdoc.net"}],dependencies:{debug:"^2.2.0",nan:"^2.3.3","typedarray-to-buffer":"^3.1.2",yaeti:"^0.0.6"},deprecated:!1,description:"Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.",devDependencies:{"buffer-equal":"^1.0.0",faucet:"^0.0.1",gulp:"git+https://github.com/gulpjs/gulp.git#4.0","gulp-jshint":"^2.0.4",jshint:"^2.0.0","jshint-stylish":"^2.2.1",tape:"^4.0.1"},directories:{lib:"./lib"},engines:{node:">=0.10.0"},homepage:"https://github.com/theturtle32/WebSocket-Node",keywords:["websocket","websockets","socket","networking","comet","push","RFC-6455","realtime","server","client"],license:"Apache-2.0",main:"index",name:"websocket",repository:{type:"git",url:"git+https://github.com/theturtle32/WebSocket-Node.git"},scripts:{gulp:"gulp",install:"(node-gyp rebuild 2> builderror.log) || (exit 0)",test:"faucet test/unit"},version:"1.0.26"}},{}],411:[function(e,t,r){var n=e("xhr-request");t.exports=function(e,t){return new Promise(function(r,i){n(e,t,function(e,t){e?i(e):r(t)})})}},{"xhr-request":412}],412:[function(e,t,r){var n=e("query-string"),i=e("url-set-query"),o=e("object-assign"),a=e("./lib/ensure-header.js"),s=e("./lib/request.js"),u="application/json",c=function(){};t.exports=function(e,t,r){if(!e||"string"!=typeof e)throw new TypeError("must specify a URL");"function"==typeof t&&(r=t,t={});if(r&&"function"!=typeof r)throw new TypeError("expected cb to be undefined or a function");r=r||c;var f=(t=t||{}).json?"json":"text",h=(t=o({responseType:f},t)).headers||{},l=(t.method||"GET").toUpperCase(),d=t.query;d&&("string"!=typeof d&&(d=n.stringify(d)),e=i(e,d));"json"===t.responseType&&a(h,"Accept",u);t.json&&"GET"!==l&&"HEAD"!==l&&(a(h,"Content-Type",u),t.body=JSON.stringify(t.body));return t.method=l,t.url=e,t.headers=h,delete t.query,delete t.json,s(t,r)}},{"./lib/ensure-header.js":413,"./lib/request.js":415,"object-assign":238,"query-string":266,"url-set-query":326}],413:[function(e,t,r){t.exports=function(e,t,r){var n=t.toLowerCase();e[t]||e[n]||(e[t]=r)}},{}],414:[function(e,t,r){t.exports=function(e,t){return t?{statusCode:t.statusCode,headers:t.headers,method:e.method,url:e.url,rawRequest:t.rawRequest?t.rawRequest:t}:null}},{}],415:[function(e,t,r){var n=e("xhr"),i=e("./normalize-response"),o=function(){};t.exports=function(e,t){delete e.uri;var r=!1;"json"===e.responseType&&(e.responseType="text",r=!0);var a=n(e,function(n,a,s){if(r&&!n)try{var u=a.rawRequest.responseText;s=JSON.parse(u)}catch(e){n=e}a=i(e,a),t(n,n?null:s,a),t=o}),s=a.onabort;return a.onabort=function(){var e=s.apply(a,Array.prototype.slice.call(arguments));return t(new Error("XHR Aborted")),t=o,e},a}},{"./normalize-response":414,xhr:416}],416:[function(e,t,r){"use strict";var n=e("global/window"),i=e("is-function"),o=e("parse-headers"),a=e("xtend");function s(e,t,r){var n=e;return i(t)?(r=t,"string"==typeof e&&(n={uri:e})):n=a(t,{uri:e}),n.callback=r,n}function u(e,t,r){return c(t=s(e,t,r))}function c(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,r=function(r,n,i){t||(t=!0,e.callback(r,n,i))};function n(e){return clearTimeout(f),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,r(e,m)}function i(){if(!s){var t;clearTimeout(f),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var n=m,i=null;return 0!==t?(n={body:function(){var e=void 0;if(e=c.response?c.response:c.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(c),y)try{e=JSON.parse(e)}catch(e){}return e}(),statusCode:t,method:l,headers:{},url:h,rawRequest:c},c.getAllResponseHeaders&&(n.headers=o(c.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),r(i,n,n.body)}}var a,s,c=e.xhr||null;c||(c=e.cors||e.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var f,h=c.url=e.uri||e.url,l=c.method=e.method||"GET",d=e.body||e.data,p=c.headers=e.headers||{},b=!!e.sync,y=!1,m={body:void 0,headers:{},statusCode:0,method:l,url:h,rawRequest:c};if("json"in e&&!1!==e.json&&(y=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==l&&"HEAD"!==l&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),d=JSON.stringify(!0===e.json?d:e.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(i,0)},c.onload=i,c.onerror=n,c.onprogress=function(){},c.onabort=function(){s=!0},c.ontimeout=n,c.open(l,h,!b,e.username,e.password),b||(c.withCredentials=!!e.withCredentials),!b&&e.timeout>0&&(f=setTimeout(function(){if(!s){s=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",n(e)}},e.timeout)),c.setRequestHeader)for(a in p)p.hasOwnProperty(a)&&c.setRequestHeader(a,p[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(c.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(c),c.send(d||null),c}t.exports=u,t.exports.default=u,u.XMLHttpRequest=n.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var r=0;r=0)return this._url=this._parseUrl(t.headers.location),this._method="GET",this._loweredHeaders["content-type"]&&(delete this._headers[this._loweredHeaders["content-type"]],delete this._loweredHeaders["content-type"]),null!=this._headers["Content-Type"]&&delete this._headers["Content-Type"],delete this._headers["Content-Length"],this.upload._reset(),this._finalizeHeaders(),void this._sendHxxpRequest();this._response=t,this._response.on("data",function(e){return n._onHttpResponseData(t,e)}),this._response.on("end",function(){return n._onHttpResponseEnd(t)}),this._response.on("close",function(){return n._onHttpResponseClose(t)}),this.responseUrl=this._url.href.split("#")[0],this.status=t.statusCode,this.statusText=s.STATUS_CODES[this.status],this._parseResponseHeaders(t);var i=this._responseHeaders["content-length"]||"";this._totalBytes=+i,this._lengthComputable=!!i,this._setReadyState(r.HEADERS_RECEIVED)}},r.prototype._onHttpResponseData=function(e,t){this._response===e&&(this._responseParts.push(new n(t)),this._loadedBytes+=t.length,this.readyState!==r.LOADING&&this._setReadyState(r.LOADING),this._dispatchProgress("progress"))},r.prototype._onHttpResponseEnd=function(e){this._response===e&&(this._parseResponse(),this._request=null,this._response=null,this._setReadyState(r.DONE),this._dispatchProgress("load"),this._dispatchProgress("loadend"))},r.prototype._onHttpResponseClose=function(e){if(this._response===e){var t=this._request;this._setError(),t.abort(),this._setReadyState(r.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend")}},r.prototype._onHttpTimeout=function(e){this._request===e&&(this._setError(),e.abort(),this._setReadyState(r.DONE),this._dispatchProgress("timeout"),this._dispatchProgress("loadend"))},r.prototype._onHttpRequestError=function(e,t){this._request===e&&(this._setError(),e.abort(),this._setReadyState(r.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend"))},r.prototype._dispatchProgress=function(e){var t=new r.ProgressEvent(e);t.lengthComputable=this._lengthComputable,t.loaded=this._loadedBytes,t.total=this._totalBytes,this.dispatchEvent(t)},r.prototype._setError=function(){this._request=null,this._response=null,this._responseHeaders=null,this._responseParts=null},r.prototype._parseUrl=function(e,t,r){var n=null==this.nodejsBaseUrl?e:f.resolve(this.nodejsBaseUrl,e),i=f.parse(n,!1,!0);i.hash=null;var o=(i.auth||"").split(":"),a=o[0],s=o[1];return(a||s||t||r)&&(i.auth=(t||a||"")+":"+(r||s||"")),i},r.prototype._parseResponseHeaders=function(e){for(var t in this._responseHeaders={},e.headers){var r=t.toLowerCase();this._privateHeaders[r]||(this._responseHeaders[r]=e.headers[t])}null!=this._mimeOverride&&(this._responseHeaders["content-type"]=this._mimeOverride)},r.prototype._parseResponse=function(){var e=n.concat(this._responseParts);switch(this._responseParts=null,this.responseType){case"json":this.responseText=null;try{this.response=JSON.parse(e.toString("utf-8"))}catch(e){this.response=null}return;case"buffer":return this.responseText=null,void(this.response=e);case"arraybuffer":this.responseText=null;for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),i=0;i + + + + _XCCurrentVersionName + web3swiftBrowser.xcdatamodel + + diff --git a/Example/web3swiftBrowser/web3swiftBrowser/web3swiftBrowser.xcdatamodeld/web3swiftBrowser.xcdatamodel/contents b/Example/web3swiftBrowser/web3swiftBrowser/web3swiftBrowser.xcdatamodeld/web3swiftBrowser.xcdatamodel/contents new file mode 100755 index 000000000..476e5b6cf --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowser/web3swiftBrowser.xcdatamodeld/web3swiftBrowser.xcdatamodel/contents @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Example/web3swiftBrowser/web3swiftBrowserTests/Info.plist b/Example/web3swiftBrowser/web3swiftBrowserTests/Info.plist new file mode 100755 index 000000000..6c40a6cd0 --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowserTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Example/web3swiftBrowser/web3swiftBrowserTests/web3swiftBrowserTests.swift b/Example/web3swiftBrowser/web3swiftBrowserTests/web3swiftBrowserTests.swift new file mode 100755 index 000000000..d7a48a461 --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowserTests/web3swiftBrowserTests.swift @@ -0,0 +1,36 @@ +// +// web3swiftBrowserTests.swift +// web3swiftBrowserTests +// +// Created by Alexander Vlasov on 07.01.2018. +// Copyright © 2018 Alexander Vlasov. All rights reserved. +// + +import XCTest +@testable import web3swiftBrowser + +class web3swiftBrowserTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/Example/web3swiftBrowser/web3swiftBrowserUITests/Info.plist b/Example/web3swiftBrowser/web3swiftBrowserUITests/Info.plist new file mode 100755 index 000000000..6c40a6cd0 --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowserUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Example/web3swiftBrowser/web3swiftBrowserUITests/web3swiftBrowserUITests.swift b/Example/web3swiftBrowser/web3swiftBrowserUITests/web3swiftBrowserUITests.swift new file mode 100755 index 000000000..621ad8c59 --- /dev/null +++ b/Example/web3swiftBrowser/web3swiftBrowserUITests/web3swiftBrowserUITests.swift @@ -0,0 +1,36 @@ +// +// web3swiftBrowserUITests.swift +// web3swiftBrowserUITests +// +// Created by Alexander Vlasov on 07.01.2018. +// Copyright © 2018 Alexander Vlasov. All rights reserved. +// + +import XCTest + +class web3swiftBrowserUITests: XCTestCase { + + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} diff --git a/Example/web3swiftExample/Podfile.lock b/Example/web3swiftExample/Podfile.lock index 589033287..593c8c644 100644 --- a/Example/web3swiftExample/Podfile.lock +++ b/Example/web3swiftExample/Podfile.lock @@ -1,28 +1,37 @@ PODS: - BigInt (3.1.0): - SipHash (~> 1.2) - - CryptoSwift (0.12.0) - - PromiseKit (6.4.1): - - PromiseKit/CorePromise (= 6.4.1) - - PromiseKit/Foundation (= 6.4.1) - - PromiseKit/UIKit (= 6.4.1) - - PromiseKit/CorePromise (6.4.1) - - PromiseKit/Foundation (6.4.1): + - CryptoSwift (0.13.0) + - EthereumABI (1.1.1): + - BigInt (~> 3.1) + - CryptoSwift (~> 0.13) + - EthereumAddress (~> 1.0.0) + - EthereumAddress (1.0.0): + - CryptoSwift (~> 0.13) + - PromiseKit (6.5.2): + - PromiseKit/CorePromise (= 6.5.2) + - PromiseKit/Foundation (= 6.5.2) + - PromiseKit/UIKit (= 6.5.2) + - PromiseKit/CorePromise (6.5.2) + - PromiseKit/Foundation (6.5.2): - PromiseKit/CorePromise - - PromiseKit/UIKit (6.4.1): + - PromiseKit/UIKit (6.5.2): - PromiseKit/CorePromise - - Result (4.0.0) - scrypt (2.0): - CryptoSwift (~> 0.11) - - secp256k1_ios (0.1.3) + - secp256k1_swift (1.0.3) - SipHash (1.2.2) - - web3swift (1.1.9): + - SwiftRLP (1.2): - BigInt (~> 3.1) - - CryptoSwift (~> 0.11) + - web3swift (2.0.1): + - BigInt (~> 3.1) + - CryptoSwift (~> 0.13) + - EthereumABI (~> 1.1.1) + - EthereumAddress (~> 1.0.0) - PromiseKit (~> 6.3) - - Result (~> 4.0) - scrypt (~> 2.0) - - secp256k1_ios (~> 0.1) + - secp256k1_swift (~> 1.0.3) + - SwiftRLP (~> 1.1) DEPENDENCIES: - web3swift @@ -31,23 +40,27 @@ SPEC REPOS: https://github.com/cocoapods/specs.git: - BigInt - CryptoSwift + - EthereumABI + - EthereumAddress - PromiseKit - - Result - scrypt - - secp256k1_ios + - secp256k1_swift - SipHash + - SwiftRLP - web3swift SPEC CHECKSUMS: BigInt: 76b5dfdfa3e2e478d4ffdf161aeede5502e2742f - CryptoSwift: 1c07ca50843dd48bc54e6ea53d7a4dba3b645716 - PromiseKit: 4c76a6506638034e3d7bede97b2ff7743f7bd2dc - Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713 + CryptoSwift: 16e78bebf567bad1c87b2d58f6547f25b74c31aa + EthereumABI: f040f5429e5a4366d028c88b88d9441e137593af + EthereumAddress: f476e1320dca3a0024431e713ede7a09c7eb7796 + PromiseKit: 27c1601bfb73405871b805bcb8cf7e55c4dad3db scrypt: 3fe5b1a3b0976f97cd87488673a8f7c65708cc84 - secp256k1_ios: ac9ef04e761f43c58012b28548afa91493761f17 + secp256k1_swift: 4fc5c4b2d2c6d21ee8ccb868cdc92da12f38bed9 SipHash: fad90a4683e420c52ef28063063dbbce248ea6d4 - web3swift: 4895c765c9858eb4737ef222eb8643bb5fc7fdb3 + SwiftRLP: 98a02b2210128353ca02e4c2f4d83e2a9796db4f + web3swift: 33f30ca0e061e0f89117dfb46f5ee9f626eff6d6 PODFILE CHECKSUM: 6d9e2706704c1b04a380df8a28b2457bc4f325b1 -COCOAPODS: 1.6.0.beta.1 +COCOAPODS: 1.6.0.beta.2 diff --git a/Example/web3swiftExample/Pods/CryptoSwift/README.md b/Example/web3swiftExample/Pods/CryptoSwift/README.md index 45dead904..2e7f54984 100644 --- a/Example/web3swiftExample/Pods/CryptoSwift/README.md +++ b/Example/web3swiftExample/Pods/CryptoSwift/README.md @@ -63,6 +63,7 @@ Good mood [Poly1305](http://cr.yp.to/mac/poly1305-20050329.pdf) | [HMAC (MD5, SHA1, SHA256)](https://www.ietf.org/rfc/rfc2104.txt) | [CMAC](https://tools.ietf.org/html/rfc4493) +| [CBC-MAC](https://en.wikipedia.org/wiki/CBC-MAC) #### Cipher mode of operation - Electronic codebook ([ECB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_codebook_.28ECB.29)) @@ -72,6 +73,7 @@ Good mood - Output Feedback ([OFB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Output_Feedback_.28OFB.29)) - Counter Mode ([CTR](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_.28CTR.29)) - Galois/Counter Mode ([GCM](https://csrc.nist.gov/publications/detail/sp/800-38d/final)) +- Counter with Cipher Block Chaining-Message Authentication Code ([CCM](https://csrc.nist.gov/publications/detail/sp/800-38c/final)) #### Password-Based Key Derivation Function - [PBKDF1](http://tools.ietf.org/html/rfc2898#section-5.1) (Password-Based Key Derivation Function 1) @@ -449,7 +451,7 @@ decryption ```swift do { - // In combined mode, the authentication tag is directly appended to the encrypted message. This is usually what you want. + // In combined mode, the authentication tag is appended to the encrypted message. This is usually what you want. let gcm = GCM(iv: iv, mode: .combined) let aes = try AES(key: key, blockMode: gcm, padding: .noPadding) return try aes.decrypt(encrypted) @@ -458,9 +460,26 @@ do { } ``` - **Note**: GCM instance is not intended to be reused. So you can't use the `GCM` from encoding, do decoding. +##### AES-CCM + +The result of Counter with Cipher Block Chaining-Message Authentication Code encryption is ciphertext and **authentication tag**, that is later used to decryption. + +``` +do { + // The authentication tag is appended to the encrypted message. + let tagLength = 8 + let ccm = CCM(iv: iv, tagLength: tagLength, messageLength: ciphertext.count - tagLength, additionalAuthenticatedData: data) + let aes = try AES(key: key, blockMode: ccm, padding: .noPadding) + return try aes.decrypt(encrypted) +} catch { + // failed +} +``` + +Check documentation or CCM specification for valid parameters for CCM. + ##### AEAD ```swift diff --git a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift index 160ceacc9..a461cd616 100644 --- a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift +++ b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift @@ -27,6 +27,9 @@ extension AES: Cryptors { public func makeDecryptor() throws -> Cryptor & Updatable { let cipherOperation: CipherOperationOnBlock = blockMode.options.contains(.useEncryptToDecrypt) == true ? encrypt : decrypt let worker = try blockMode.worker(blockSize: AES.blockSize, cipherOperation: cipherOperation) + if worker is StreamModeWorker { + return try StreamDecryptor(blockSize: AES.blockSize, padding: padding, worker) + } return try BlockDecryptor(blockSize: AES.blockSize, padding: padding, worker) } } diff --git a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift index 1bcf44ea6..9772cb4c5 100644 --- a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift +++ b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift @@ -1,6 +1,6 @@ // CryptoSwift // -// Copyright (C) 2014-__YEAR__ Marcin Krzyżanowski +// Copyright (C) 2014-2018 Marcin Krzyżanowski // This software is provided 'as-is', without any express or implied warranty. // // In no event will the authors be held liable for any damages arising from the use of this software. @@ -47,16 +47,16 @@ public class BlockDecryptor: Cryptor, Updatable { for var chunk in accumulatedWithoutSuffix.batched(by: blockSize) { if isLast || (accumulatedWithoutSuffix.count - processedBytesCount) >= blockSize { - if isLast, var finalizingWorker = worker as? BlockModeWorkerFinalizing { - chunk = try finalizingWorker.willDecryptLast(block: chunk + accumulated.suffix(worker.additionalBufferSize)) // tag size + if isLast, var finalizingWorker = worker as? FinalizingDecryptModeWorker { + chunk = try finalizingWorker.willDecryptLast(bytes: chunk + accumulated.suffix(worker.additionalBufferSize)) // tag size } if !chunk.isEmpty { plaintext += worker.decrypt(block: chunk) } - if var finalizingWorker = worker as? BlockModeWorkerFinalizing, isLast == true { - plaintext = try finalizingWorker.didDecryptLast(block: plaintext.slice) + if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { + plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice)) } processedBytesCount += chunk.count @@ -72,7 +72,7 @@ public class BlockDecryptor: Cryptor, Updatable { } public func seek(to position: Int) throws { - guard var worker = self.worker as? StreamModeWorker else { + guard var worker = self.worker as? SeekableModeWorker else { fatalError("Not supported") } diff --git a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift index 73c37e851..ba3fe2810 100644 --- a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift +++ b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift @@ -1,6 +1,6 @@ // CryptoSwift // -// Copyright (C) 2014-__YEAR__ Marcin Krzyżanowski +// Copyright (C) 2014-2018 Marcin Krzyżanowski // This software is provided 'as-is', without any express or implied warranty. // // In no event will the authors be held liable for any damages arising from the use of this software. @@ -44,8 +44,8 @@ final class BlockEncryptor: Cryptor, Updatable { // Stream encrypts all, so it removes all elements accumulated.removeFirst(encrypted.count) - if var finalizingWorker = worker as? BlockModeWorkerFinalizing, isLast == true { - encrypted = try finalizingWorker.finalize(encrypt: encrypted.slice) + if var finalizingWorker = worker as? FinalizingEncryptModeWorker, isLast == true { + encrypted = Array(try finalizingWorker.finalize(encrypt: encrypted.slice)) } return encrypted diff --git a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift index 8c554e4a4..646184941 100644 --- a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift +++ b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift @@ -20,10 +20,6 @@ public struct BlockModeOption: OptionSet { self.rawValue = rawValue } - public init(rawValue: Int, authenticationTagSize: Int) { - self.rawValue = rawValue - } - static let none = BlockModeOption(rawValue: 1 << 0) static let initializationVectorRequired = BlockModeOption(rawValue: 1 << 1) static let paddingRequired = BlockModeOption(rawValue: 1 << 2) diff --git a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift new file mode 100644 index 000000000..fb59ebe94 --- /dev/null +++ b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift @@ -0,0 +1,359 @@ +//// CryptoSwift +// +// Copyright (C) 2014-2018 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +// CCM mode combines the well known CBC-MAC with the well known counter mode of encryption. +// https://tools.ietf.org/html/rfc3610 +// https://csrc.nist.gov/publications/detail/sp/800-38c/final + +#if canImport(Darwin) +import Darwin +#else +import Glibc +#endif + + +/// Counter with Cipher Block Chaining-Message Authentication Code +public struct CCM: StreamMode { + public enum Error: Swift.Error { + /// Invalid IV + case invalidInitializationVector + case invalidParameter + case fail + } + + public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] + private let nonce: Array + private let additionalAuthenticatedData: Array? + private let tagLength: Int + private let messageLength: Int // total message length. need to know in advance + + // `authenticationTag` nil for encryption, known tag for decryption + /// For encryption, the value is set at the end of the encryption. + /// For decryption, this is a known Tag to validate against. + public var authenticationTag: Array? + + /// Initialize CCM + /// + /// - Parameters: + /// - iv: Initialization vector. Nonce. Valid length between 7 and 13 bytes. + /// - tagLength: Authentication tag length, in bytes. Value of {4, 6, 8, 10, 12, 14, 16}. + /// - messageLength: Plaintext message length (excluding tag if attached). Length have to be provided in advance. + /// - additionalAuthenticatedData: Additional authenticated data. + public init(iv: Array, tagLength: Int, messageLength: Int, additionalAuthenticatedData: Array? = nil) { + self.nonce = iv + self.tagLength = tagLength + self.additionalAuthenticatedData = additionalAuthenticatedData + self.messageLength = messageLength // - tagLength + } + + /// Initialize CCM + /// + /// - Parameters: + /// - iv: Initialization vector. Nonce. Valid length between 7 and 13 bytes. + /// - tagLength: Authentication tag length, in bytes. Value of {4, 6, 8, 10, 12, 14, 16}. + /// - messageLength: Plaintext message length (excluding tag if attached). Length have to be provided in advance. + /// - authenticationTag: Authentication Tag value if not concatenated to ciphertext. + /// - additionalAuthenticatedData: Additional authenticated data. + public init(iv: Array, tagLength: Int, messageLength: Int, authenticationTag: Array, additionalAuthenticatedData: Array? = nil) { + self.init(iv: iv, tagLength: tagLength, messageLength: messageLength, additionalAuthenticatedData: additionalAuthenticatedData) + self.authenticationTag = authenticationTag + } + + + public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { + if nonce.isEmpty { + throw Error.invalidInitializationVector + } + + return CCMModeWorker(blockSize: blockSize, nonce: nonce.slice, messageLength: messageLength, additionalAuthenticatedData: additionalAuthenticatedData, tagLength: tagLength, cipherOperation: cipherOperation) + } +} + +class CCMModeWorker: StreamModeWorker, SeekableModeWorker, CounterModeWorker, FinalizingEncryptModeWorker, FinalizingDecryptModeWorker { + typealias Counter = Int + var counter = 0 + + let cipherOperation: CipherOperationOnBlock + let blockSize: Int + private let tagLength: Int + private let messageLength: Int // total message length. need to know in advance + private let q: UInt8 + + let additionalBufferSize: Int + private var keystreamPosIdx = 0 + private let nonce: Array + private var last_y: ArraySlice = [] + private var keystream: Array = [] + // Known Tag used to validate during decryption + private var expectedTag: Array? + + public enum Error: Swift.Error { + case invalidParameter + } + + init(blockSize: Int, nonce: ArraySlice, messageLength: Int, additionalAuthenticatedData: [UInt8]?, expectedTag: Array? = nil, tagLength: Int, cipherOperation: @escaping CipherOperationOnBlock) { + self.blockSize = 16 // CCM is defined for 128 block size + self.tagLength = tagLength + self.additionalBufferSize = tagLength + self.messageLength = messageLength + self.expectedTag = expectedTag + self.cipherOperation = cipherOperation + self.nonce = Array(nonce) + self.q = UInt8(15 - nonce.count) // n = 15-q + + let hasAssociatedData = additionalAuthenticatedData != nil && !additionalAuthenticatedData!.isEmpty + processControlInformation(nonce: self.nonce, tagLength: tagLength, hasAssociatedData: hasAssociatedData) + + if let aad = additionalAuthenticatedData, hasAssociatedData { + process(aad: aad) + } + } + + // For the very first time setup new IV (aka y0) from the block0 + private func processControlInformation(nonce: [UInt8], tagLength: Int, hasAssociatedData: Bool) { + let block0 = try! format(nonce: nonce, Q: UInt32(messageLength), q: q, t: UInt8(tagLength), hasAssociatedData: hasAssociatedData).slice + let y0 = cipherOperation(block0)!.slice + last_y = y0 + } + + private func process(aad: [UInt8]) { + let encodedAAD = format(aad: aad) + + for block_i in encodedAAD.batched(by: 16) { + let y_i = cipherOperation(xor(block_i, last_y))!.slice + last_y = y_i + } + } + + private func S(i: Int) throws -> [UInt8] { + let ctr = try format(counter: i, nonce: nonce, q: q) + return cipherOperation(ctr.slice)! + } + + func seek(to position: Int) throws { + self.counter = position + keystream = try S(i: position) + let offset = position % blockSize + keystreamPosIdx = offset + } + + func encrypt(block plaintext: ArraySlice) -> Array { + var result = Array(reserveCapacity: plaintext.count) + + var processed = 0 + while processed < plaintext.count { + // Need a full block here to update keystream and do CBC + if keystream.isEmpty || keystreamPosIdx == blockSize { + // y[i], where i is the counter. Can encrypt 1 block at a time + counter += 1 + guard let S = try? S(i: counter) else { return Array(plaintext) } + let plaintextP = addPadding(Array(plaintext), blockSize: blockSize) + guard let y = cipherOperation(xor(last_y, plaintextP)) else { return Array(plaintext) } + last_y = y.slice + + keystream = S + keystreamPosIdx = 0 + } + + let xored: Array = xor(plaintext[plaintext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) + keystreamPosIdx += xored.count + processed += xored.count + result += xored + } + return result + } + + func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice { + // concatenate T at the end + guard let S0 = try? S(i: 0) else { return ciphertext } + + let computedTag = xor(last_y.prefix(tagLength), S0) as ArraySlice + return ciphertext + computedTag + } + + // Decryption is stream + // CBC is block + private var accumulatedPlaintext: [UInt8] = [] + + func decrypt(block ciphertext: ArraySlice) -> Array { + var output = Array(reserveCapacity: ciphertext.count) + + do { + var currentCounter = counter + var processed = 0 + while processed < ciphertext.count { + // Need a full block here to update keystream and do CBC + // New keystream for a new block + if keystream.isEmpty || keystreamPosIdx == blockSize { + currentCounter += 1 + guard let S = try? S(i: currentCounter) else { return Array(ciphertext) } + keystream = S + keystreamPosIdx = 0 + } + + let xored: Array = xor(ciphertext[ciphertext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) // plaintext + keystreamPosIdx += xored.count + processed += xored.count + output += xored + counter = currentCounter + } + } + + // Accumulate plaintext for the MAC calculations at the end. + // It would be good to process it together though, here. + accumulatedPlaintext += output + + // Shouldn't return plaintext until validate tag. + // With incremental update, can't validate tag until all block are processed. + return output + } + + func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice { + // concatenate T at the end + let computedTag = Array(last_y.prefix(tagLength)) + guard let expectedTag = self.expectedTag, expectedTag == computedTag else { + throw CCM.Error.fail + } + + return plaintext + } + + @discardableResult + func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice { + // get tag of additionalBufferSize size + // `ciphertext` contains at least additionalBufferSize bytes + // overwrite expectedTag property used later for verification + guard let S0 = try? S(i: 0) else { return ciphertext } + self.expectedTag = xor(ciphertext.suffix(tagLength), S0) as [UInt8] + return ciphertext[ciphertext.startIndex..) throws -> ArraySlice { + + // Calculate Tag, from the last CBC block, for accumulated plaintext. + var processed = 0 + for block in accumulatedPlaintext.batched(by: blockSize) { + let blockP = addPadding(Array(block), blockSize: blockSize) + guard let y = cipherOperation(xor(last_y, blockP)) else { return plaintext } + last_y = y.slice + processed += block.count + } + accumulatedPlaintext.removeFirst(processed) + return plaintext + } +} + +// Q - octet length of P +// q - octet length of Q. Maximum length (in octets) of payload. An element of {2,3,4,5,6,7,8} +// t - octet length of T (MAC length). An element of {4,6,8,10,12,14,16} +private func format(nonce N: [UInt8], Q: UInt32, q: UInt8, t: UInt8, hasAssociatedData: Bool) throws -> [UInt8] { + var flags0: UInt8 = 0 + + if hasAssociatedData { + // 7 bit + flags0 |= (1 << 6) + } + + // 6,5,4 bit is t in 3 bits + flags0 |= (((t-2)/2) & 0x07) << 3 + + // 3,2,1 bit is q in 3 bits + flags0 |= ((q-1) & 0x07) << 0 + + var block0: [UInt8] = Array(repeating: 0, count: 16) + block0[0] = flags0 + + // N in 1...(15-q) octets, n = 15-q + // n is an element of {7,8,9,10,11,12,13} + let n = 15-Int(q) + guard (n + Int(q)) == 15 else { + // n+q == 15 + throw CCMModeWorker.Error.invalidParameter + } + block0[1...n] = N[0...(n-1)] + + // Q in (16-q)...15 octets + block0[(16-Int(q))...15] = Q.bytes(totalBytes: Int(q)).slice + + return block0 +} + +/// Formatting of the Counter Blocks. Ctr[i] +/// The counter generation function. +/// Q - octet length of P +/// q - octet length of Q. Maximum length (in octets) of payload. An element of {2,3,4,5,6,7,8} +private func format(counter i: Int, nonce N: [UInt8], q: UInt8) throws -> [UInt8] { + var flags0: UInt8 = 0 + + // bit 8,7 is Reserved + // bit 4,5,6 shall be set to 0 + // 3,2,1 bit is q in 3 bits + flags0 |= ((q-1) & 0x07) << 0 + + var block = Array(repeating: 0, count: 16) // block[0] + block[0] = flags0 + + // N in 1...(15-q) octets, n = 15-q + // n is an element of {7,8,9,10,11,12,13} + let n = 15-Int(q) + guard (n + Int(q)) == 15 else { + // n+q == 15 + throw CCMModeWorker.Error.invalidParameter + } + block[1...n] = N[0...(n-1)] + + // [i]8q in (16-q)...15 octets + block[(16-Int(q))...15] = i.bytes(totalBytes: Int(q)).slice + + return block +} + +/// Resulting can be partitioned into 16-octet blocks +private func format(aad: [UInt8]) -> [UInt8] { + let a = aad.count + + switch Double(a) { + case 0..<65280: // 2^16-2^8 + // [a]16 + return addPadding(a.bytes(totalBytes: 2) + aad, blockSize: 16) + case 65280..<4_294_967_296: // 2^32 + // [a]32 + return addPadding([0xFF, 0xFE] + a.bytes(totalBytes: 4) + aad, blockSize: 16) + case 4_294_967_296.., blockSize: Int) -> Array { + if bytes.isEmpty { + return Array(repeating: 0, count: blockSize) + } + + let remainder = bytes.count % blockSize + if remainder == 0 { + return bytes + } + + let paddingCount = blockSize - remainder + if paddingCount > 0 { + return bytes + Array(repeating: 0, count: paddingCount) + } + return bytes +} diff --git a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift index c48e916af..2dc6a9ecb 100644 --- a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift +++ b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift @@ -41,7 +41,7 @@ public struct CTR: StreamMode { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -struct CTRModeWorker: StreamModeWorker, CounterModeWorker { +struct CTRModeWorker: StreamModeWorker, SeekableModeWorker, CounterModeWorker { typealias Counter = CTRCounter final class CTRCounter { diff --git a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift index 284b41ded..0d3e08bd3 100644 --- a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift +++ b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift @@ -24,6 +24,7 @@ public protocol CipherModeWorker { mutating func decrypt(block ciphertext: ArraySlice) -> Array } +/// Block workers use `BlockEncryptor` public protocol BlockModeWorker: CipherModeWorker { var blockSize: Int { get } } @@ -33,17 +34,28 @@ public protocol CounterModeWorker: CipherModeWorker { var counter: Counter { get set } } -public protocol StreamModeWorker: CipherModeWorker { +public protocol SeekableModeWorker: CipherModeWorker { mutating func seek(to position: Int) throws } -// TODO: remove and merge with BlockModeWorker -public protocol BlockModeWorkerFinalizing: BlockModeWorker { +/// Stream workers use `StreamEncryptor` +public protocol StreamModeWorker: CipherModeWorker { +} + +public protocol FinalizingEncryptModeWorker: CipherModeWorker { // Any final calculations, eg. calculate tag // Called after the last block is encrypted - mutating func finalize(encrypt ciphertext: ArraySlice) throws -> Array - // Called before decryption, hence input is ciphertext - mutating func willDecryptLast(block ciphertext: ArraySlice) throws -> ArraySlice + mutating func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice +} + +public protocol FinalizingDecryptModeWorker: CipherModeWorker { + // Called before decryption, hence input is ciphertext. + // ciphertext is either a last block, or a tag (for stream workers) + @discardableResult + mutating func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice // Called after decryption, hence input is ciphertext - mutating func didDecryptLast(block plaintext: ArraySlice) throws -> Array + mutating func didDecryptLast(bytes plaintext: ArraySlice) throws -> ArraySlice + // Any final calculations, eg. calculate tag + // Called after the last block is encrypted + mutating func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice } diff --git a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift index 8313b6c9f..aee8d29e2 100644 --- a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift +++ b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift @@ -28,7 +28,7 @@ public final class GCM: BlockMode { var additionalBufferSize: Int { switch self { case .combined: - return GCMModeWorker.tagSize + return GCMModeWorker.tagLength case .detached: return 0 } @@ -81,14 +81,14 @@ public final class GCM: BlockMode { // MARK: - Worker -final class GCMModeWorker: BlockModeWorkerFinalizing { +final class GCMModeWorker: BlockModeWorker, FinalizingEncryptModeWorker, FinalizingDecryptModeWorker { let cipherOperation: CipherOperationOnBlock // Callback called when authenticationTag is ready var didCalculateTag: ((Array) -> Void)? // 128 bit tag. Other possible tags 4,8,12,13,14,15,16 - fileprivate static let tagSize = 16 + fileprivate static let tagLength = 16 // GCM nonce is 96-bits by default. It's the most effective length for the IV private static let nonceSize = 12 @@ -152,6 +152,22 @@ final class GCMModeWorker: BlockModeWorkerFinalizing { return Array(ciphertext) } + func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice { + // Calculate MAC tag. + let ghash = gf.ghashFinish() + let tag = Array((ghash ^ eky0).bytes.prefix(GCMModeWorker.tagLength)) + + // Notify handler + didCalculateTag?(tag) + + switch mode { + case .combined: + return (ciphertext + tag).slice + case .detached: + return ciphertext + } + } + func decrypt(block ciphertext: ArraySlice) -> Array { counter = incrementCounter(counter) @@ -167,52 +183,39 @@ final class GCMModeWorker: BlockModeWorkerFinalizing { return plaintext } - func finalize(encrypt ciphertext: ArraySlice) throws -> Array { - // Calculate MAC tag. - let ghash = gf.ghashFinish() - let tag = Array((ghash ^ eky0).bytes.prefix(GCMModeWorker.tagSize)) - - // Notify handler - didCalculateTag?(tag) - - switch mode { - case .combined: - return ciphertext + tag - case .detached: - return Array(ciphertext) - } - } - // The authenticated decryption operation has five inputs: K, IV , C, A, and T. It has only a single // output, either the plaintext value P or a special symbol FAIL that indicates that the inputs are not // authentic. - func willDecryptLast(block ciphertext: ArraySlice) throws -> ArraySlice { + @discardableResult + func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice { // Validate tag switch mode { case .combined: // overwrite expectedTag property used later for verification - self.expectedTag = Array(ciphertext.suffix(GCMModeWorker.tagSize)) - // gf.ciphertextLength = gf.ciphertextLength - GCMModeWorker.tagSize - // strip tag from the plaintext. - return ciphertext[ciphertext.startIndex..) throws -> Array { + func didDecryptLast(bytes plaintext: ArraySlice) throws -> ArraySlice { // Calculate MAC tag. let ghash = gf.ghashFinish() - let computedTag = Array((ghash ^ eky0).bytes.prefix(GCMModeWorker.tagSize)) + let computedTag = Array((ghash ^ eky0).bytes.prefix(GCMModeWorker.tagLength)) // Validate tag - if let expectedTag = self.expectedTag, computedTag == expectedTag { - return Array(plaintext) + guard let expectedTag = self.expectedTag, computedTag == expectedTag else { + throw GCM.Error.fail } - throw GCM.Error.fail + return plaintext } + func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice { + // do nothing + return plaintext + } } // MARK: - Local utils diff --git a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift new file mode 100644 index 000000000..e14f2bd52 --- /dev/null +++ b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift @@ -0,0 +1,104 @@ +// +// CryptoSwift +// +// Copyright (C) 2014-2017 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +public class CBCMAC: Authenticator { + public enum Error: Swift.Error { + case wrongKeyLength + } + + private let key: SecureBytes + + private static let BlockSize: Int = 16 + private static let Zero: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] + private static let Rb: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87] + + public init(key: Array) throws { + if key.count != 16 { + throw Error.wrongKeyLength + } + self.key = SecureBytes(bytes: key) + } + + // MARK: Authenticator + + public func authenticate(_ bytes: Array) throws -> Array { + let aes = try AES(key: Array(key), blockMode: CBC(iv: CBCMAC.Zero), padding: .noPadding) + + let l = try aes.encrypt(CBCMAC.Zero) + var subKey1 = leftShiftOneBit(l) + if (l[0] & 0x80) != 0 { + subKey1 = xor(CBCMAC.Rb, subKey1) + } + var subKey2 = leftShiftOneBit(subKey1) + if (subKey1[0] & 0x80) != 0 { + subKey2 = xor(CBCMAC.Rb, subKey2) + } + + let lastBlockComplete: Bool + let blockCount = (bytes.count + CBCMAC.BlockSize - 1) / CBCMAC.BlockSize + if blockCount == 0 { + lastBlockComplete = false + } else { + lastBlockComplete = bytes.count % CBCMAC.BlockSize == 0 + } + var paddedBytes = bytes + if !lastBlockComplete { + bitPadding(to: &paddedBytes, blockSize: CBCMAC.BlockSize) + } + + var blocks = Array(paddedBytes.batched(by: CBCMAC.BlockSize)) + var lastBlock = blocks.popLast()! + if lastBlockComplete { + lastBlock = xor(lastBlock, subKey1) + } else { + lastBlock = xor(lastBlock, subKey2) + } + + var x = Array(repeating: 0x00, count: CBCMAC.BlockSize) + var y = Array(repeating: 0x00, count: CBCMAC.BlockSize) + for block in blocks { + y = xor(block, x) + x = try aes.encrypt(y) + } + // the difference between CMAC and CBC-MAC is that CMAC xors the final block with a secret value + y = process(lastBlock: lastBlock, with: x) + return try aes.encrypt(y) + } + + func process(lastBlock: ArraySlice, with x: [UInt8]) -> [UInt8] { + return Array(lastBlock) + } + + // MARK: Helper methods + + /** + Performs left shift by one bit to the bit string aquired after concatenating al bytes in the byte array + - parameters: + - bytes: byte array + - returns: bit shifted bit string split again in array of bytes + */ + private func leftShiftOneBit(_ bytes: Array) -> Array { + var shifted = Array(repeating: 0x00, count: bytes.count) + let last = bytes.count - 1 + for index in 0.. = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] - private static let Rb: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87] - - public init(key: Array) throws { - if key.count != 16 { - throw Error.wrongKeyLength - } - self.key = SecureBytes(bytes: key) - } - - // MARK: Authenticator - - public func authenticate(_ bytes: Array) throws -> Array { - let aes = try AES(key: Array(key), blockMode: CBC(iv: CMAC.Zero), padding: .noPadding) - - let l = try aes.encrypt(CMAC.Zero) - var subKey1 = leftShiftOneBit(l) - if (l[0] & 0x80) != 0 { - subKey1 = xor(CMAC.Rb, subKey1) - } - var subKey2 = leftShiftOneBit(subKey1) - if (subKey1[0] & 0x80) != 0 { - subKey2 = xor(CMAC.Rb, subKey2) - } - - let lastBlockComplete: Bool - let blockCount = (bytes.count + CMAC.BlockSize - 1) / CMAC.BlockSize - if blockCount == 0 { - lastBlockComplete = false - } else { - lastBlockComplete = bytes.count % CMAC.BlockSize == 0 - } - var paddedBytes = bytes - if !lastBlockComplete { - bitPadding(to: &paddedBytes, blockSize: CMAC.BlockSize) - } - - var blocks = Array(paddedBytes.batched(by: CMAC.BlockSize)) - var lastBlock = blocks.popLast()! - if lastBlockComplete { - lastBlock = xor(lastBlock, subKey1) - } else { - lastBlock = xor(lastBlock, subKey2) - } - - var x = Array(repeating: 0x00, count: CMAC.BlockSize) - var y = Array(repeating: 0x00, count: CMAC.BlockSize) - for block in blocks { - y = xor(block, x) - x = try aes.encrypt(y) - } - y = xor(lastBlock, x) - return try aes.encrypt(y) - } - - // MARK: Helper methods - - /** - Performs left shift by one bit to the bit string aquired after concatenating al bytes in the byte array - - parameters: - - bytes: byte array - - returns: bit shifted bit string split again in array of bytes - */ - private func leftShiftOneBit(_ bytes: Array) -> Array { - var shifted = Array(repeating: 0x00, count: bytes.count) - let last = bytes.count - 1 - for index in 0.., with x: [UInt8]) -> [UInt8] { + return xor(lastBlock, x) } } diff --git a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift index 50c772972..74cf92a9c 100644 --- a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift +++ b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift @@ -1,6 +1,6 @@ //// CryptoSwift // -// Copyright (C) 2014-__YEAR__ Marcin Krzyżanowski +// Copyright (C) 2014-2018 Marcin Krzyżanowski // This software is provided 'as-is', without any express or implied warranty. // // In no event will the authors be held liable for any damages arising from the use of this software. diff --git a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift new file mode 100644 index 000000000..81ab2705e --- /dev/null +++ b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift @@ -0,0 +1,78 @@ +// CryptoSwift +// +// Copyright (C) 2014-2018 Marcin Krzyżanowski +// This software is provided 'as-is', without any express or implied warranty. +// +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. +// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// - This notice may not be removed or altered from any source or binary distribution. +// + +final class StreamDecryptor: Cryptor, Updatable { + private let blockSize: Int + private var worker: CipherModeWorker + private let padding: Padding + private var accumulated = Array() + + private var lastBlockRemainder = 0 + + init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { + self.blockSize = blockSize + self.padding = padding + self.worker = worker + } + + // MARK: Updatable + public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { + accumulated += bytes + + let toProcess = accumulated.prefix(max(accumulated.count - worker.additionalBufferSize, 0)) + + if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { + // will truncate suffix if needed + try finalizingWorker.willDecryptLast(bytes: accumulated.slice) + } + + var processedBytesCount = 0 + var plaintext = Array(reserveCapacity: bytes.count + worker.additionalBufferSize) + for chunk in toProcess.batched(by: blockSize) { + plaintext += worker.decrypt(block: chunk) + processedBytesCount += chunk.count + } + + if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { + plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice)) + } + + // omit unecessary calculation if not needed + if padding != .noPadding { + lastBlockRemainder = plaintext.count.quotientAndRemainder(dividingBy: blockSize).remainder + } + + if isLast { + // CTR doesn't need padding. Really. Add padding to the last block if really want. but... don't. + plaintext = padding.remove(from: plaintext, blockSize: blockSize - lastBlockRemainder) + } + + accumulated.removeFirst(processedBytesCount) // super-slow + + if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { + plaintext = Array(try finalizingWorker.finalize(decrypt: plaintext.slice)) + } + + return plaintext + } + + public func seek(to position: Int) throws { + guard var worker = self.worker as? SeekableModeWorker else { + fatalError("Not supported") + } + + try worker.seek(to: position) + self.worker = worker + } +} diff --git a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift index 36a086fb4..7cd54e3fb 100644 --- a/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift +++ b/Example/web3swiftExample/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift @@ -1,6 +1,6 @@ // CryptoSwift // -// Copyright (C) 2014-__YEAR__ Marcin Krzyżanowski +// Copyright (C) 2014-2018 Marcin Krzyżanowski // This software is provided 'as-is', without any express or implied warranty. // // In no event will the authors be held liable for any damages arising from the use of this software. @@ -16,8 +16,6 @@ final class StreamEncryptor: Cryptor, Updatable { private let blockSize: Int private var worker: CipherModeWorker private let padding: Padding - // Accumulated bytes. Not all processed bytes. - private var accumulated = Array(reserveCapacity: 16) private var lastBlockRemainder = 0 @@ -29,7 +27,7 @@ final class StreamEncryptor: Cryptor, Updatable { // MARK: Updatable public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { - accumulated = Array(bytes) + var accumulated = Array(bytes) if isLast { // CTR doesn't need padding. Really. Add padding to the last block if really want. but... don't. accumulated = padding.add(to: accumulated, blockSize: blockSize - lastBlockRemainder) @@ -45,6 +43,10 @@ final class StreamEncryptor: Cryptor, Updatable { lastBlockRemainder = encrypted.count.quotientAndRemainder(dividingBy: blockSize).remainder } + if var finalizingWorker = worker as? FinalizingEncryptModeWorker, isLast == true { + encrypted = Array(try finalizingWorker.finalize(encrypt: encrypted.slice)) + } + return encrypted } diff --git a/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABI.swift b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABI.swift new file mode 100755 index 000000000..1bcca4d84 --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABI.swift @@ -0,0 +1,28 @@ +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation + +public struct ABI { + +} + +protocol ABIElementPropertiesProtocol { + var isStatic: Bool {get} + var isArray: Bool {get} + var isTuple: Bool {get} + var arraySize: ABI.Element.ArraySize {get} + var subtype: ABI.Element.ParameterType? {get} + var memoryUsage: UInt64 {get} + var emptyValue: Any {get} +} + +protocol ABIEncoding { + var abiRepresentation: String {get} +} + +protocol ABIValidation { + var isValid: Bool {get} +} diff --git a/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIDecoding.swift b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIDecoding.swift new file mode 100755 index 000000000..1ef76c1d9 --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIDecoding.swift @@ -0,0 +1,281 @@ +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt +import EthereumAddress + +public struct ABIDecoder { + +} + +extension ABIDecoder { + public static func decode(types: [ABI.Element.InOut], data: Data) -> [AnyObject]? { + let params = types.compactMap { (el) -> ABI.Element.ParameterType in + return el.type + } + return decode(types: params, data: data) + } + + public static func decode(types: [ABI.Element.ParameterType], data: Data) -> [AnyObject]? { +// print("Full data: \n" + data.toHexString()) + var toReturn = [AnyObject]() + var consumed: UInt64 = 0 + for i in 0 ..< types.count { + let (v, c) = decodeSignleType(type: types[i], data: data, pointer: consumed) + guard let valueUnwrapped = v, let consumedUnwrapped = c else {return nil} + toReturn.append(valueUnwrapped) + consumed = consumed + consumedUnwrapped + } + guard toReturn.count == types.count else {return nil} + return toReturn + } + + public static func decodeSignleType(type: ABI.Element.ParameterType, data: Data, pointer: UInt64 = 0) -> (value: AnyObject?, bytesConsumed: UInt64?) { + let (elData, nextPtr) = followTheData(type: type, data: data, pointer: pointer) + guard let elementItself = elData, let nextElementPointer = nextPtr else { + return (nil, nil) + } + switch type { + case .uint(let bits): +// print("Uint256 element itself: \n" + elementItself.toHexString()) + guard elementItself.count >= 32 else {break} + let mod = BigUInt(1) << bits + let dataSlice = elementItself[0 ..< 32] + let v = BigUInt(dataSlice) % mod +// print("Uint256 element is: \n" + String(v)) + return (v as AnyObject, type.memoryUsage) + case .int(let bits): +// print("Int256 element itself: \n" + elementItself.toHexString()) + guard elementItself.count >= 32 else {break} + let mod = BigInt(1) << bits + let dataSlice = elementItself[0 ..< 32] + let v = BigInt.fromTwosComplement(data: dataSlice) % mod +// print("Int256 element is: \n" + String(v)) + return (v as AnyObject, type.memoryUsage) + case .address: +// print("Address element itself: \n" + elementItself.toHexString()) + guard elementItself.count >= 32 else {break} + let dataSlice = elementItself[12 ..< 32] + let address = EthereumAddress(dataSlice) +// print("Address element is: \n" + String(address.address)) + return (address as AnyObject, type.memoryUsage) + case .bool: +// print("Bool element itself: \n" + elementItself.toHexString()) + guard elementItself.count >= 32 else {break} + let dataSlice = elementItself[0 ..< 32] + let v = BigUInt(dataSlice) +// print("Address element is: \n" + String(v)) + if v == BigUInt(1) { + return (true as AnyObject, type.memoryUsage) + } else if (v == BigUInt(0)) { + return (false as AnyObject, type.memoryUsage) + } + case .bytes(let length): +// print("Bytes32 element itself: \n" + elementItself.toHexString()) + guard elementItself.count >= 32 else {break} + let dataSlice = elementItself[0 ..< length] +// print("Bytes32 element is: \n" + String(dataSlice.toHexString())) + return (dataSlice as AnyObject, type.memoryUsage) + case .string: +// print("String element itself: \n" + elementItself.toHexString()) + guard elementItself.count >= 32 else {break} + var dataSlice = elementItself[0 ..< 32] + let length = UInt64(BigUInt(dataSlice)) + guard elementItself.count >= 32+length else {break} + dataSlice = elementItself[32 ..< 32 + length] + guard let string = String(data: dataSlice, encoding: .utf8) else {break} +// print("String element is: \n" + String(string)) + return (string as AnyObject, type.memoryUsage) + case .dynamicBytes: +// print("Bytes element itself: \n" + elementItself.toHexString()) + guard elementItself.count >= 32 else {break} + var dataSlice = elementItself[0 ..< 32] + let length = UInt64(BigUInt(dataSlice)) + guard elementItself.count >= 32+length else {break} + dataSlice = elementItself[32 ..< 32 + length] +// print("Bytes element is: \n" + String(dataSlice.toHexString())) + return (dataSlice as AnyObject, type.memoryUsage) + case .array(type: let subType, length: let length): + switch type.arraySize { + case .dynamicSize: +// print("Dynamic array element itself: \n" + elementItself.toHexString()) + if subType.isStatic { + // uint[] like, expect length and elements + guard elementItself.count >= 32 else {break} + var dataSlice = elementItself[0 ..< 32] + let length = UInt64(BigUInt(dataSlice)) + guard elementItself.count >= 32 + subType.memoryUsage*length else {break} + dataSlice = elementItself[32 ..< 32 + subType.memoryUsage*length] + var subpointer: UInt64 = 32; + var toReturn = [AnyObject]() + for _ in 0 ..< length { + let (v, c) = decodeSignleType(type: subType, data: elementItself, pointer: subpointer) + guard let valueUnwrapped = v, let consumedUnwrapped = c else {break} + toReturn.append(valueUnwrapped) + subpointer = subpointer + consumedUnwrapped + } + return (toReturn as AnyObject, type.memoryUsage) + } else { + // in principle is true for tuple[], so will work for string[] too + guard elementItself.count >= 32 else {break} + var dataSlice = elementItself[0 ..< 32] + let length = UInt64(BigUInt(dataSlice)) + guard elementItself.count >= 32 else {break} + dataSlice = Data(elementItself[32 ..< elementItself.count]) + var subpointer: UInt64 = 0; + var toReturn = [AnyObject]() +// print("Dynamic array sub element itself: \n" + dataSlice.toHexString()) + for _ in 0 ..< length { + let (v, c) = decodeSignleType(type: subType, data: dataSlice, pointer: subpointer) + guard let valueUnwrapped = v, let consumedUnwrapped = c else {break} + toReturn.append(valueUnwrapped) + subpointer = subpointer + consumedUnwrapped + } + return (toReturn as AnyObject, nextElementPointer) + } + case .staticSize(let staticLength): +// print("Static array element itself: \n" + elementItself.toHexString()) + guard length == staticLength else {break} + var toReturn = [AnyObject]() + var consumed:UInt64 = 0 + for _ in 0 ..< length { + let (v, c) = decodeSignleType(type: subType, data: elementItself, pointer: consumed) + guard let valueUnwrapped = v, let consumedUnwrapped = c else {return (nil, nil)} + toReturn.append(valueUnwrapped) + consumed = consumed + consumedUnwrapped + } + if subType.isStatic { + return (toReturn as AnyObject, consumed) + } else { + return (toReturn as AnyObject, nextElementPointer) + } + case .notArray: + break + } + case .tuple(types: let subTypes): +// print("Tuple element itself: \n" + elementItself.toHexString()) + var toReturn = [AnyObject]() + var consumed:UInt64 = 0 + for i in 0 ..< subTypes.count { + let (v, c) = decodeSignleType(type: subTypes[i], data: elementItself, pointer: consumed) + guard let valueUnwrapped = v, let consumedUnwrapped = c else {return (nil, nil)} + toReturn.append(valueUnwrapped) + consumed = consumed + consumedUnwrapped + } +// print("Tuple element is: \n" + String(describing: toReturn)) + if type.isStatic { + return (toReturn as AnyObject, consumed) + } else { + return (toReturn as AnyObject, nextElementPointer) + } + case .function: +// print("Function element itself: \n" + elementItself.toHexString()) + guard elementItself.count >= 32 else {break} + let dataSlice = elementItself[8 ..< 32] +// print("Function element is: \n" + String(dataSlice.toHexString())) + return (dataSlice as AnyObject, type.memoryUsage) + } + return (nil, nil) + } + + fileprivate static func followTheData(type: ABI.Element.ParameterType, data: Data, pointer: UInt64 = 0) -> (elementEncoding: Data?, nextElementPointer: UInt64?) { +// print("Follow the data: \n" + data.toHexString()) +// print("At pointer: \n" + String(pointer)) + if type.isStatic { + guard data.count >= pointer + type.memoryUsage else {return (nil, nil)} + let elementItself = data[pointer ..< pointer + type.memoryUsage] + let nextElement = pointer + type.memoryUsage +// print("Got element itself: \n" + elementItself.toHexString()) +// print("Next element pointer: \n" + String(nextElement)) + return (Data(elementItself), nextElement) + } else { + guard data.count >= pointer + type.memoryUsage else {return (nil, nil)} + let dataSlice = data[pointer ..< pointer + type.memoryUsage] + let bn = BigUInt(dataSlice) + if bn > UINT64_MAX || bn >= data.count { + // there are ERC20 contracts that use bytes32 intead of string. Let's be optimistic and return some data + if case .string = type { + let nextElement = pointer + type.memoryUsage + let preambula = BigUInt(32).abiEncode(bits: 256)! + return (preambula + Data(dataSlice), nextElement) + } else if case .dynamicBytes = type { + let nextElement = pointer + type.memoryUsage + let preambula = BigUInt(32).abiEncode(bits: 256)! + return (preambula + Data(dataSlice), nextElement) + } + return (nil, nil) + } + let elementPointer = UInt64(bn) + let elementItself = data[elementPointer ..< UInt64(data.count)] + let nextElement = pointer + type.memoryUsage +// print("Got element itself: \n" + elementItself.toHexString()) +// print("Next element pointer: \n" + String(nextElement)) + return (Data(elementItself), nextElement) + } + } + + public static func decodeLog(event: ABI.Element.Event, eventLogTopics: [Data], eventLogData: Data) -> [String:Any]? { + if event.topic != eventLogTopics[0] && !event.anonymous { + return nil + } + var eventContent = [String: Any]() + eventContent["name"]=event.name + let logs = eventLogTopics + let dataForProcessing = eventLogData + let indexedInputs = event.inputs.filter { (inp) -> Bool in + return inp.indexed + } + if (logs.count == 1 && indexedInputs.count > 0) { + return nil + } + let nonIndexedInputs = event.inputs.filter { (inp) -> Bool in + return !inp.indexed + } + let nonIndexedTypes = nonIndexedInputs.compactMap { (inp) -> ABI.Element.ParameterType in + return inp.type + } + guard logs.count == indexedInputs.count + 1 else {return nil} + var indexedValues = [AnyObject]() + for i in 0 ..< indexedInputs.count { + let data = logs[i+1] + let input = indexedInputs[i] + if !input.type.isStatic || input.type.isArray || input.type.memoryUsage != 32 { + let (v, _) = ABIDecoder.decodeSignleType(type: .bytes(length: 32), data: data) + guard let valueUnwrapped = v else {return nil} + indexedValues.append(valueUnwrapped) + } else { + let (v, _) = ABIDecoder.decodeSignleType(type: input.type, data: data) + guard let valueUnwrapped = v else {return nil} + indexedValues.append(valueUnwrapped) + } + } + let v = ABIDecoder.decode(types: nonIndexedTypes, data: dataForProcessing) + guard let nonIndexedValues = v else {return nil} + var indexedInputCounter = 0 + var nonIndexedInputCounter = 0 + for i in 0 ..< event.inputs.count { + let el = event.inputs[i] + if el.indexed { + let name = "\(i)" + let value = indexedValues[indexedInputCounter] + eventContent[name] = value + if el.name != "" { + eventContent[el.name] = value + } + indexedInputCounter = indexedInputCounter + 1 + } else { + let name = "\(i)" + let value = nonIndexedValues[nonIndexedInputCounter] + eventContent[name] = value + if el.name != "" { + eventContent[el.name] = value + } + nonIndexedInputCounter = nonIndexedInputCounter + 1 + } + } + return eventContent + } +} diff --git a/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIElements.swift b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIElements.swift new file mode 100755 index 000000000..523f68741 --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIElements.swift @@ -0,0 +1,286 @@ +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt + +public extension ABI { + // JSON Decoding + public struct Input: Decodable { + public var name: String? + public var type: String + public var indexed: Bool? + public var components: [Input]? + } + + public struct Output: Decodable { + public var name: String? + public var type: String + public var components: [Output]? + } + + public struct Record: Decodable { + public var name: String? + public var type: String? + public var payable: Bool? + public var constant: Bool? + public var stateMutability: String? + public var inputs: [ABI.Input]? + public var outputs: [ABI.Output]? + public var anonymous: Bool? + } + + public enum Element { + public enum ArraySize { //bytes for convenience + case staticSize(UInt64) + case dynamicSize + case notArray + } + + case function(Function) + case constructor(Constructor) + case fallback(Fallback) + case event(Event) + + public enum StateMutability { + case payable + case mutating + case view + case pure + + var isConstant: Bool { + switch self { + case .payable: + return false + case .mutating: + return false + default: + return true + } + } + + var isPayable: Bool { + switch self { + case .payable: + return true + default: + return false + } + } + } + + public struct InOut { + public let name: String + public let type: ParameterType + + public init(name: String, type: ParameterType) { + self.name = name + self.type = type + } + } + + public struct Function { + public let name: String? + public let inputs: [InOut] + public let outputs: [InOut] + public let stateMutability: StateMutability? = nil + public let constant: Bool + public let payable: Bool + + public init(name: String?, inputs: [InOut], outputs: [InOut], constant: Bool, payable: Bool) { + self.name = name + self.inputs = inputs + self.outputs = outputs + self.constant = constant + self.payable = payable + } + } + + public struct Constructor { + public let inputs: [InOut] + public let constant: Bool + public let payable: Bool + public init(inputs: [InOut], constant: Bool, payable: Bool) { + self.inputs = inputs + self.constant = constant + self.payable = payable + } + } + + public struct Fallback { + public let constant: Bool + public let payable: Bool + + public init(constant: Bool, payable: Bool) { + self.constant = constant + self.payable = payable + } + } + + public struct Event { + public let name: String + public let inputs: [Input] + public let anonymous: Bool + + public init(name: String, inputs: [Input], anonymous: Bool) { + self.name = name + self.inputs = inputs + self.anonymous = anonymous + } + + public struct Input { + public let name: String + public let type: ParameterType + public let indexed: Bool + + public init(name: String, type: ParameterType, indexed: Bool) { + self.name = name + self.type = type + self.indexed = indexed + } + } + } + } +} + +extension ABI.Element { + public func encodeParameters(_ parameters: [AnyObject]) -> Data? { + switch self { + case .constructor(let constructor): + guard parameters.count == constructor.inputs.count else {return nil} + guard let data = ABIEncoder.encode(types: constructor.inputs, values: parameters) else {return nil} + return data + case .event(_): + return nil + case .fallback(_): + return nil + case .function(let function): + guard parameters.count == function.inputs.count else {return nil} + let signature = function.methodEncoding + guard let data = ABIEncoder.encode(types: function.inputs, values: parameters) else {return nil} + return signature + data + } + } +} + +extension ABI.Element { + public func decodeReturnData(_ data: Data) -> [String:Any]? { + switch self { + case .constructor(_): + return nil + case .event(_): + return nil + case .fallback(_): + return nil + case .function(let function): + if (data.count == 0 && function.outputs.count == 1) { + let name = "0" + let value = function.outputs[0].type.emptyValue + var returnArray = [String:Any]() + returnArray[name] = value + if function.outputs[0].name != "" { + returnArray[function.outputs[0].name] = value + } + return returnArray + } + + guard function.outputs.count*32 <= data.count else {return nil} + var returnArray = [String:Any]() + var i = 0; + guard let values = ABIDecoder.decode(types: function.outputs, data: data) else {return nil} + for output in function.outputs { + let name = "\(i)" + returnArray[name] = values[i] + if output.name != "" { + returnArray[output.name] = values[i] + } + i = i + 1 + } + return returnArray + } + } + + public func decodeInputData(_ rawData: Data) -> [String: Any]? { + var data = rawData + var sig: Data? = nil + switch rawData.count % 32 { + case 0: + break + case 4: + sig = rawData[0 ..< 4] + data = Data(rawData[4 ..< rawData.count]) + default: + return nil + } + switch self { + case .constructor(let function): + if (data.count == 0 && function.inputs.count == 1) { + let name = "0" + let value = function.inputs[0].type.emptyValue + var returnArray = [String:Any]() + returnArray[name] = value + if function.inputs[0].name != "" { + returnArray[function.inputs[0].name] = value + } + return returnArray + } + + guard function.inputs.count*32 <= data.count else {return nil} + var returnArray = [String:Any]() + var i = 0; + guard let values = ABIDecoder.decode(types: function.inputs, data: data) else {return nil} + for input in function.inputs { + let name = "\(i)" + returnArray[name] = values[i] + if input.name != "" { + returnArray[input.name] = values[i] + } + i = i + 1 + } + return returnArray + case .event(_): + return nil + case .fallback(_): + return nil + case .function(let function): + if sig != nil && sig != function.methodEncoding { + return nil + } + if (data.count == 0 && function.inputs.count == 1) { + let name = "0" + let value = function.inputs[0].type.emptyValue + var returnArray = [String:Any]() + returnArray[name] = value + if function.inputs[0].name != "" { + returnArray[function.inputs[0].name] = value + } + return returnArray + } + + guard function.inputs.count*32 <= data.count else {return nil} + var returnArray = [String:Any]() + var i = 0; + guard let values = ABIDecoder.decode(types: function.inputs, data: data) else {return nil} + for input in function.inputs { + let name = "\(i)" + returnArray[name] = values[i] + if input.name != "" { + returnArray[input.name] = values[i] + } + i = i + 1 + } + return returnArray + } + } +} + +extension ABI.Element.Event { + public func decodeReturnedLogs(eventLogTopics: [Data], eventLogData: Data) -> [String:Any]? { + guard let eventContent = ABIDecoder.decodeLog(event: self, eventLogTopics: eventLogTopics, eventLogData: eventLogData) else {return nil} + return eventContent + } +} + + diff --git a/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift new file mode 100755 index 000000000..e163dc0a2 --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift @@ -0,0 +1,389 @@ +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt +import EthereumAddress + +public struct ABIEncoder { + +} + +extension ABIEncoder { + public static func convertToBigUInt(_ value: AnyObject) -> BigUInt? { + switch value { + case let v as BigUInt: + return v + case let v as BigInt: + switch v.sign { + case .minus: + return nil + case .plus: + return v.magnitude + } + case let v as String: + let base10 = BigUInt(v, radix: 10) + if base10 != nil { + return base10! + } + let base16 = BigUInt(v.stripHexPrefix(), radix: 16) + if base16 != nil { + return base16! + } + break + case let v as UInt: + return BigUInt(v) + case let v as UInt8: + return BigUInt(v) + case let v as UInt16: + return BigUInt(v) + case let v as UInt32: + return BigUInt(v) + case let v as UInt64: + return BigUInt(v) + case let v as Int: + return BigUInt(v) + case let v as Int8: + return BigUInt(v) + case let v as Int16: + return BigUInt(v) + case let v as Int32: + return BigUInt(v) + case let v as Int64: + return BigUInt(v) + default: + return nil + } + return nil + } + + public static func convertToBigInt(_ value: AnyObject) -> BigInt? { + switch value { + case let v as BigUInt: + return BigInt(v) + case let v as BigInt: + return v + case let v as String: + let base10 = BigInt(v, radix: 10) + if base10 != nil { + return base10 + } + let base16 = BigInt(v.stripHexPrefix(), radix: 16) + if base16 != nil { + return base16 + } + break + case let v as UInt: + return BigInt(v) + case let v as UInt8: + return BigInt(v) + case let v as UInt16: + return BigInt(v) + case let v as UInt32: + return BigInt(v) + case let v as UInt64: + return BigInt(v) + case let v as Int: + return BigInt(v) + case let v as Int8: + return BigInt(v) + case let v as Int16: + return BigInt(v) + case let v as Int32: + return BigInt(v) + case let v as Int64: + return BigInt(v) + default: + return nil + } + return nil + } + + public static func convertToData(_ value: AnyObject) -> Data? { + switch value { + case let d as Data: + return d + case let d as String: + if d.hasHexPrefix() { + let hex = Data.fromHex(d) + if hex != nil { + return hex + } + } + let str = d.data(using: .utf8) + if str != nil { + return str + } + case let d as [UInt8]: + return Data(d) + case let d as EthereumAddress: + return d.addressData + case let d as [IntegerLiteralType]: + var bytesArray = [UInt8]() + for el in d { + guard el >= 0, el <= 255 else {return nil} + bytesArray.append(UInt8(el)) + } + return Data(bytesArray) + default: + return nil + } + return nil + } + + + public static func encode(types: [ABI.Element.InOut], values: [AnyObject]) -> Data? { + guard types.count == values.count else {return nil} + let params = types.compactMap { (el) -> ABI.Element.ParameterType in + return el.type + } + return encode(types: params, values: values) + } + + public static func encode(types: [ABI.Element.ParameterType], values: [AnyObject]) -> Data? { + guard types.count == values.count else {return nil} + var tails = [Data]() + var heads = [Data]() + for i in 0 ..< types.count { + let enc = encodeSingleType(type: types[i], value: values[i]) + guard let encoding = enc else {return nil} + if types[i].isStatic { + heads.append(encoding) + tails.append(Data()) + } else { + heads.append(Data(repeating: 0x0, count: 32)) + tails.append(encoding) + } + } + var headsConcatenated = Data() + for h in heads { + headsConcatenated.append(h) + } + var tailsPointer = BigUInt(headsConcatenated.count) + headsConcatenated = Data() + var tailsConcatenated = Data() + for i in 0 ..< types.count { + let head = heads[i] + let tail = tails[i] + if !types[i].isStatic { + guard let newHead = tailsPointer.abiEncode(bits: 256) else {return nil} + headsConcatenated.append(newHead) + tailsConcatenated.append(tail) + tailsPointer = tailsPointer + BigUInt(tail.count) + } else { + headsConcatenated.append(head) + tailsConcatenated.append(tail) + } + } + return headsConcatenated + tailsConcatenated + } + + public static func encodeSingleType(type: ABI.Element.ParameterType, value: AnyObject) -> Data? { + switch type { + case .uint(_): + if let biguint = convertToBigUInt(value) { + return biguint.abiEncode(bits: 256) + } + if let bigint = convertToBigInt(value) { + return bigint.abiEncode(bits: 256) + } + case .int(_): + if let biguint = convertToBigUInt(value) { + return biguint.abiEncode(bits: 256) + } + if let bigint = convertToBigInt(value) { + return bigint.abiEncode(bits: 256) + } + case .address: + if let string = value as? String { + guard let address = EthereumAddress(string) else {return nil} + let data = address.addressData + return data.setLengthLeft(32) + } else if let address = value as? EthereumAddress { + guard address.isValid else {break} + let data = address.addressData + return data.setLengthLeft(32) + } else if let data = value as? Data { + return data.setLengthLeft(32) + } + case .bool: + if let bool = value as? Bool { + if (bool) { + return BigUInt(1).abiEncode(bits: 256) + } else { + return BigUInt(0).abiEncode(bits: 256) + } + } + case .bytes(let length): + guard let data = convertToData(value) else {break} + if data.count > length {break} + return data.setLengthRight(32) + case .string: + if let string = value as? String { + var dataGuess: Data? + if string.hasHexPrefix() { + dataGuess = Data.fromHex(string.lowercased().stripHexPrefix()) + } + else { + dataGuess = string.data(using: .utf8) + } + guard let data = dataGuess else {break} + let minLength = ((data.count + 31) / 32)*32 + guard let paddedData = data.setLengthRight(UInt64(minLength)) else {break} + let length = BigUInt(data.count) + guard let head = length.abiEncode(bits: 256) else {break} + let total = head+paddedData + return total + } + case .dynamicBytes: + guard let data = convertToData(value) else {break} + let minLength = ((data.count + 31) / 32)*32 + guard let paddedData = data.setLengthRight(UInt64(minLength)) else {break} + let length = BigUInt(data.count) + guard let head = length.abiEncode(bits: 256) else {break} + let total = head+paddedData + return total + case .array(type: let subType, length: let length): + switch type.arraySize { + case .dynamicSize: + guard length == 0 else {break} + guard let val = value as? [AnyObject] else {break} + guard let lengthEncoding = BigUInt(val.count).abiEncode(bits: 256) else {break} + if subType.isStatic { + // work in a previous context + var toReturn = Data() + for i in 0 ..< val.count { + let enc = encodeSingleType(type: subType, value: val[i]) + guard let encoding = enc else {break} + toReturn.append(encoding) + } + let total = lengthEncoding + toReturn +// print("Dynamic array of static types encoding :\n" + String(total.toHexString())) + return total + } else { + // create new context + var tails = [Data]() + var heads = [Data]() + for i in 0 ..< val.count { + let enc = encodeSingleType(type: subType, value: val[i]) + guard let encoding = enc else {return nil} + heads.append(Data(repeating: 0x0, count: 32)) + tails.append(encoding) + } + var headsConcatenated = Data() + for h in heads { + headsConcatenated.append(h) + } + var tailsPointer = BigUInt(headsConcatenated.count) + headsConcatenated = Data() + var tailsConcatenated = Data() + for i in 0 ..< val.count { + let head = heads[i] + let tail = tails[i] + if tail != Data() { + guard let newHead = tailsPointer.abiEncode(bits: 256) else {return nil} + headsConcatenated.append(newHead) + tailsConcatenated.append(tail) + tailsPointer = tailsPointer + BigUInt(tail.count) + } else { + headsConcatenated.append(head) + tailsConcatenated.append(tail) + } + } + let total = lengthEncoding + headsConcatenated + tailsConcatenated +// print("Dynamic array of dynamic types encoding :\n" + String(total.toHexString())) + return total + } + case .staticSize(let staticLength): + guard staticLength != 0 else {break} + guard let val = value as? [AnyObject] else {break} + guard staticLength == val.count else {break} + if subType.isStatic { + // work in a previous context + var toReturn = Data() + for i in 0 ..< val.count { + let enc = encodeSingleType(type: subType, value: val[i]) + guard let encoding = enc else {break} + toReturn.append(encoding) + } +// print("Static array of static types encoding :\n" + String(toReturn.toHexString())) + let total = toReturn + return total + } else { + // create new context + var tails = [Data]() + var heads = [Data]() + for i in 0 ..< val.count { + let enc = encodeSingleType(type: subType, value: val[i]) + guard let encoding = enc else {return nil} + heads.append(Data(repeating: 0x0, count: 32)) + tails.append(encoding) + } + var headsConcatenated = Data() + for h in heads { + headsConcatenated.append(h) + } + var tailsPointer = BigUInt(headsConcatenated.count) + headsConcatenated = Data() + var tailsConcatenated = Data() + for i in 0 ..< val.count { + let tail = tails[i] + guard let newHead = tailsPointer.abiEncode(bits: 256) else {return nil} + headsConcatenated.append(newHead) + tailsConcatenated.append(tail) + tailsPointer = tailsPointer + BigUInt(tail.count) + } + let total = headsConcatenated + tailsConcatenated +// print("Static array of dynamic types encoding :\n" + String(total.toHexString())) + return total + } + case .notArray: + break + } + case .tuple(types: let subTypes): + var tails = [Data]() + var heads = [Data]() + guard let val = value as? [AnyObject] else {break} + for i in 0 ..< subTypes.count { + let enc = encodeSingleType(type: subTypes[i], value: val[i]) + guard let encoding = enc else {return nil} + if subTypes[i].isStatic { + heads.append(encoding) + tails.append(Data()) + } else { + heads.append(Data(repeating: 0x0, count: 32)) + tails.append(encoding) + } + } + var headsConcatenated = Data() + for h in heads { + headsConcatenated.append(h) + } + var tailsPointer = BigUInt(headsConcatenated.count) + headsConcatenated = Data() + var tailsConcatenated = Data() + for i in 0 ..< subTypes.count { + let head = heads[i] + let tail = tails[i] + if !subTypes[i].isStatic { + guard let newHead = tailsPointer.abiEncode(bits: 256) else {return nil} + headsConcatenated.append(newHead) + tailsConcatenated.append(tail) + tailsPointer = tailsPointer + BigUInt(tail.count) + } else { + headsConcatenated.append(head) + tailsConcatenated.append(tail) + } + } + let total = headsConcatenated + tailsConcatenated + return total + case .function: + if let data = value as? Data { + return data.setLengthLeft(32) + } + } + return nil + } +} diff --git a/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIExtensions.swift b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIExtensions.swift new file mode 100644 index 000000000..f006e44e9 --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIExtensions.swift @@ -0,0 +1,271 @@ +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt + +extension Data { + func setLengthLeft(_ toBytes: UInt64, isNegative:Bool = false ) -> Data? { + let existingLength = UInt64(self.count) + if (existingLength == toBytes) { + return Data(self) + } else if (existingLength > toBytes) { + return nil + } + var data:Data + if (isNegative) { + data = Data(repeating: UInt8(255), count: Int(toBytes - existingLength)) + } else { + data = Data(repeating: UInt8(0), count: Int(toBytes - existingLength)) + } + data.append(self) + return data + } + + func setLengthRight(_ toBytes: UInt64, isNegative:Bool = false ) -> Data? { + let existingLength = UInt64(self.count) + if (existingLength == toBytes) { + return Data(self) + } else if (existingLength > toBytes) { + return nil + } + var data:Data = Data() + data.append(self) + if (isNegative) { + data.append(Data(repeating: UInt8(255), count: Int(toBytes - existingLength))) + } else { + data.append(Data(repeating: UInt8(0), count:Int(toBytes - existingLength))) + } + return data + } + + static func fromHex(_ hex: String) -> Data? { + let string = hex.lowercased().stripHexPrefix() + let array = Array(hex: string) + if (array.count == 0) { + if (hex == "0x" || hex == "") { + return Data() + } else { + return nil + } + } + return Data(array) + } +} + +extension BigInt { + func toTwosComplement() -> Data { + if (self.sign == BigInt.Sign.plus) { + return self.magnitude.serialize() + } else { + let serializedLength = self.magnitude.serialize().count + let MAX = BigUInt(1) << (serializedLength*8) + let twoComplement = MAX - self.magnitude + return twoComplement.serialize() + } + } +} + +extension BigUInt { + func abiEncode(bits: UInt64) -> Data? { + let data = self.serialize() + let paddedLength = UInt64((bits + 7) / 8) + let padded = data.setLengthLeft(paddedLength) + return padded + } +} + +extension BigInt { + func abiEncode(bits: UInt64) -> Data? { + let isNegative = self < (BigInt(0)) + let data = self.toTwosComplement() + let paddedLength = UInt64((bits + 7) / 8) + let padded = data.setLengthLeft(paddedLength, isNegative: isNegative) + return padded + } +} + +extension BigInt { + static func fromTwosComplement(data: Data) -> BigInt { + let isPositive = ((data[0] & 128) >> 7) == 0 + if (isPositive) { + let magnitude = BigUInt(data) + return BigInt(magnitude) + } else { + let MAX = (BigUInt(1) << (data.count*8)) + let magnitude = MAX - BigUInt(data) + let bigint = BigInt(0) - BigInt(magnitude) + return bigint + } + } +} + +extension String { + var fullRange: Range { + return startIndex.. Index? { + guard let range = range(of: String(char)) else { + return nil + } + return range.lowerBound + } + +// func split(intoChunksOf chunkSize: Int) -> [String] { +// var output = [String]() +// let splittedString = self +// .map { $0 } +// .split(intoChunksOf: chunkSize) +// splittedString.forEach { +// output.append($0.map { String($0) }.joined(separator: "")) +// } +// return output +// } + + subscript (bounds: CountableClosedRange) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = index(self.startIndex, offsetBy: bounds.upperBound) + return String(self[start...end]) + } + + subscript (bounds: CountableRange) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = index(self.startIndex, offsetBy: bounds.upperBound) + return String(self[start..) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = self.endIndex + return String(self[start.. String { + let stringLength = self.count + if stringLength < toLength { + return String(repeatElement(character, count: toLength - stringLength)) + self + } else { + return String(self.suffix(toLength)) + } + } + +// func interpretAsBinaryData() -> Data? { +// let padded = self.padding(toLength: ((self.count + 7) / 8) * 8, withPad: "0", startingAt: 0) +// let byteArray = padded.split(intoChunksOf: 8).map { UInt8(strtoul($0, nil, 2)) } +// return Data(byteArray) +// } + + func hasHexPrefix() -> Bool { + return self.hasPrefix("0x") + } + + func stripHexPrefix() -> String { + if self.hasPrefix("0x") { + let indexStart = self.index(self.startIndex, offsetBy: 2) + return String(self[indexStart...]) + } + return self + } + + func addHexPrefix() -> String { + if !self.hasPrefix("0x") { + return "0x" + self + } + return self + } + + func matchingStrings(regex: String) -> [[String]] { + guard let regex = try? NSRegularExpression(pattern: regex, options: []) else { return [] } + let nsString = self as NSString + let results = regex.matches(in: self, options: [], range: NSMakeRange(0, nsString.length)) + return results.map { result in + (0.. Range? { + guard + let from16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location, limitedBy: utf16.endIndex), + let to16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location + nsRange.length, limitedBy: utf16.endIndex), + let from = from16.samePosition(in: self), + let to = to16.samePosition(in: self) + else { return nil } + return from ..< to + } + + var asciiValue: Int { + get { + let s = self.unicodeScalars + return Int(s[s.startIndex].value) + } + } +} + +extension Character { + var asciiValue: Int { + get { + let s = String(self).unicodeScalars + return Int(s[s.startIndex].value) + } + } +} + +extension Array where Element == UInt8 { + init(hex: String) { + self.init(reserveCapacity: hex.unicodeScalars.lazy.underestimatedCount) + var buffer: UInt8? + var skip = hex.hasPrefix("0x") ? 2 : 0 + for char in hex.unicodeScalars.lazy { + guard skip == 0 else { + skip -= 1 + continue + } + guard char.value >= 48 && char.value <= 102 else { + removeAll() + return + } + let v: UInt8 + let c: UInt8 = UInt8(char.value) + switch c { + case let c where c <= 57: + v = c - 48 + case let c where c >= 65 && c <= 70: + v = c - 55 + case let c where c >= 97: + v = c - 87 + default: + removeAll() + return + } + if let b = buffer { + append(b << 4 | v) + buffer = nil + } else { + buffer = v + } + } + if let b = buffer { + append(b) + } + } + + func toHexString() -> String { + return `lazy`.reduce("") { + var s = String($1, radix: 16) + if s.count == 1 { + s = "0" + s + } + return $0 + s + } + } +} diff --git a/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift new file mode 100755 index 000000000..469c155fd --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift @@ -0,0 +1,251 @@ +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt +import EthereumAddress + +extension ABI.Element { + + /// Specifies the type that parameters in a contract have. + public enum ParameterType: ABIElementPropertiesProtocol { + case uint(bits: UInt64) + case int(bits: UInt64) + case address + case function + case bool + case bytes(length: UInt64) + indirect case array(type: ParameterType, length: UInt64) + case dynamicBytes + case string + indirect case tuple(types: [ParameterType]) + + var isStatic: Bool { + switch self { + case .string: + return false + case .dynamicBytes: + return false + case .array(type: let type, length: let length): + if (length == 0) { + return false + } + if (!type.isStatic) { + return false + } + return true + case .tuple(types: let types): + for t in types { + if (!t.isStatic) { + return false + } + } + return true + case .bytes(length: _): + return true + default: + return true + } + } + + var isArray: Bool { + switch self { + case .array(type: _, length: _): + return true + default: + return false + } + } + + var isTuple: Bool { + switch self { + case .tuple(_): + return true + default: + return false + } + } + + var subtype: ABI.Element.ParameterType? { + switch self { + case .array(type: let type, length: _): + return type + default: + return nil + } + } + + var memoryUsage: UInt64 { + switch self { + case .array(_, length: let length): + if length == 0 { + return 32 + } + if self.isStatic { + return 32*length + } + return 32 + case .tuple(types: let types): + if !self.isStatic { + return 32 + } + var sum: UInt64 = 0; + for t in types { + sum = sum + t.memoryUsage + } + return sum + default: + return 32 + } + } + + var emptyValue: Any { + switch self { + case .uint(bits: _): + return BigUInt(0) + case .int(bits: _): + return BigUInt(0) + case .address: + return EthereumAddress("0x0000000000000000000000000000000000000000")! + case .function: + return Data(repeating: 0x00, count: 24) + case .bool: + return false + case .bytes(length: let length): + return Data(repeating: 0x00, count: Int(length)) + case .array(type: let type, length: let length): + let emptyValueOfType = type.emptyValue + return Array.init(repeating: emptyValueOfType, count: Int(length)) + case .dynamicBytes: + return Data() + case .string: + return "" + case .tuple(types: _): + return [Any]() + } + } + + var arraySize: ABI.Element.ArraySize { + switch self { + case .array(type: _, length: let length): + if (length == 0) { + return ArraySize.dynamicSize + } + return ArraySize.staticSize(length) + default: + return ArraySize.notArray + } + } + } + + +} + +extension ABI.Element.ParameterType: Equatable { + public static func ==(lhs: ABI.Element.ParameterType, rhs: ABI.Element.ParameterType) -> Bool { + switch (lhs, rhs) { + case let (.uint(length1), .uint(length2)): + return length1 == length2 + case let (.int(length1), .int(length2)): + return length1 == length2 + case (.address, .address): + return true + case (.bool, .bool): + return true + case let (.bytes(length1), .bytes(length2)): + return length1 == length2 + case (.function, .function): + return true + case let (.array(type1, length1), .array(type2, length2)): + return type1 == type2 && length1 == length2 + case (.dynamicBytes, .dynamicBytes): + return true + case (.string, .string): + return true + default: + return false + } + } +} + +extension ABI.Element.Function { + public var signature: String { + return "\(name ?? "")(\(inputs.map { $0.type.abiRepresentation }.joined(separator: ",")))" + } + + public var methodString: String { + return String(signature.sha3(.keccak256).prefix(8)) + } + + public var methodEncoding: Data { + return signature.data(using: .ascii)!.sha3(.keccak256)[0...3] + } +} + +// MARK: - Event topic +extension ABI.Element.Event { + public var signature: String { + return "\(name)(\(inputs.map { $0.type.abiRepresentation }.joined(separator: ",")))" + } + + public var topic: Data { + return signature.data(using: .ascii)!.sha3(.keccak256) + } +} + + +extension ABI.Element.ParameterType: ABIEncoding { + public var abiRepresentation: String { + switch self { + case .uint(let bits): + return "uint\(bits)" + case .int(let bits): + return "int\(bits)" + case .address: + return "address" + case .bool: + return "bool" + case .bytes(let length): + return "bytes\(length)" + case .dynamicBytes: + return "bytes" + case .function: + return "function" + case .array(type: let type, length: let length): + if (length == 0) { + return "\(type.abiRepresentation)[]" + } + return "\(type.abiRepresentation)[\(length)]" + case .tuple(types: let types): + let typesRepresentation = types.map({return $0.abiRepresentation}) + let typesJoined = typesRepresentation.joined(separator: ",") + return "tuple(\(typesJoined))" + case .string: + return "string" + } + } +} + +extension ABI.Element.ParameterType: ABIValidation { + public var isValid: Bool { + switch self { + case .uint(let bits), .int(let bits): + return bits > 0 && bits <= 256 && bits % 8 == 0 + case .bytes(let length): + return length > 0 && length <= 32 + case .array(type: let type, _): + return type.isValid + case .tuple(types: let types): + for t in types { + if (!t.isValid) { + return false + } + } + return true + default: + return true + } + } +} diff --git a/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIParsing.swift b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIParsing.swift new file mode 100755 index 000000000..f99c13295 --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABIParsing.swift @@ -0,0 +1,186 @@ +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation + +extension ABI { + + public enum ParsingError: Swift.Error { + case invalidJsonFile + case elementTypeInvalid + case elementNameInvalid + case functionInputInvalid + case functionOutputInvalid + case eventInputInvalid + case parameterTypeInvalid + case parameterTypeNotFound + case abiInvalid + } + + enum TypeParsingExpressions { + static var typeEatingRegex = "^((u?int|bytes)([1-9][0-9]*)|(address|bool|string|tuple|bytes)|(\\[([1-9][0-9]*)\\]))" + static var arrayEatingRegex = "^(\\[([1-9][0-9]*)?\\])?.*$" + } + + + fileprivate enum ElementType: String { + case function + case constructor + case fallback + case event + } + +} + +extension ABI.Record { + public func parse() throws -> ABI.Element { + let typeString = self.type != nil ? self.type! : "function" + guard let type = ABI.ElementType(rawValue: typeString) else { + throw ABI.ParsingError.elementTypeInvalid + } + return try parseToElement(from: self, type: type) + } +} + +fileprivate func parseToElement(from abiRecord: ABI.Record, type: ABI.ElementType) throws -> ABI.Element { + switch type { + case .function: + let function = try parseFunction(abiRecord: abiRecord) + return ABI.Element.function(function) + case .constructor: + let constructor = try parseConstructor(abiRecord: abiRecord) + return ABI.Element.constructor(constructor) + case .fallback: + let fallback = try parseFallback(abiRecord: abiRecord) + return ABI.Element.fallback(fallback) + case .event: + let event = try parseEvent(abiRecord: abiRecord) + return ABI.Element.event(event) + } + +} + +fileprivate func parseFunction(abiRecord:ABI.Record) throws -> ABI.Element.Function { + let inputs = try abiRecord.inputs?.map({ (input:ABI.Input) throws -> ABI.Element.InOut in + let nativeInput = try input.parse() + return nativeInput + }) + let abiInputs = inputs != nil ? inputs! : [ABI.Element.InOut]() + let outputs = try abiRecord.outputs?.map({ (output:ABI.Output) throws -> ABI.Element.InOut in + let nativeOutput = try output.parse() + return nativeOutput + }) + let abiOutputs = outputs != nil ? outputs! : [ABI.Element.InOut]() + let name = abiRecord.name != nil ? abiRecord.name! : "" + let payable = abiRecord.stateMutability != nil ? + (abiRecord.stateMutability == "payable" || abiRecord.payable!) : false + let constant = (abiRecord.constant == true || abiRecord.stateMutability == "view" || abiRecord.stateMutability == "pure") + let functionElement = ABI.Element.Function(name: name, inputs: abiInputs, outputs: abiOutputs, constant: constant, payable: payable) + return functionElement +} + +fileprivate func parseFallback(abiRecord:ABI.Record) throws -> ABI.Element.Fallback { + let payable = (abiRecord.stateMutability == "payable" || abiRecord.payable!) + var constant = abiRecord.constant == true + if (abiRecord.stateMutability == "view" || abiRecord.stateMutability == "pure") { + constant = true + } + let functionElement = ABI.Element.Fallback(constant: constant, payable: payable) + return functionElement +} + +fileprivate func parseConstructor(abiRecord:ABI.Record) throws -> ABI.Element.Constructor { + let inputs = try abiRecord.inputs?.map({ (input:ABI.Input) throws -> ABI.Element.InOut in + let nativeInput = try input.parse() + return nativeInput + }) + let abiInputs = inputs != nil ? inputs! : [ABI.Element.InOut]() + var payable = false + if (abiRecord.payable != nil) { + payable = abiRecord.payable! + } + if (abiRecord.stateMutability == "payable") { + payable = true + } + let constant = false + let functionElement = ABI.Element.Constructor(inputs: abiInputs, constant: constant, payable: payable) + return functionElement +} + +fileprivate func parseEvent(abiRecord:ABI.Record) throws -> ABI.Element.Event { + let inputs = try abiRecord.inputs?.map({ (input:ABI.Input) throws -> ABI.Element.Event.Input in + let nativeInput = try input.parseForEvent() + return nativeInput + }) + let abiInputs = inputs != nil ? inputs! : [ABI.Element.Event.Input]() + let name = abiRecord.name != nil ? abiRecord.name! : "" + let anonymous = abiRecord.anonymous != nil ? abiRecord.anonymous! : false + let functionElement = ABI.Element.Event(name: name, inputs: abiInputs, anonymous: anonymous) + return functionElement +} + +extension ABI.Input { + func parse() throws -> ABI.Element.InOut { + let name = self.name != nil ? self.name! : "" + let parameterType = try ABITypeParser.parseTypeString(self.type) + if case .tuple(types: _) = parameterType { + let components = try self.components?.compactMap({ (inp: ABI.Input) throws -> ABI.Element.ParameterType in + let input = try inp.parse() + return input.type + }) + let type = ABI.Element.ParameterType.tuple(types: components!) + let nativeInput = ABI.Element.InOut(name: name, type: type) + return nativeInput + } + else { + let nativeInput = ABI.Element.InOut(name: name, type: parameterType) + return nativeInput + } + } + + func parseForEvent() throws -> ABI.Element.Event.Input{ + let name = self.name != nil ? self.name! : "" + let parameterType = try ABITypeParser.parseTypeString(self.type) + let indexed = self.indexed == true + return ABI.Element.Event.Input(name:name, type: parameterType, indexed: indexed) + } +} + +extension ABI.Output { + func parse() throws -> ABI.Element.InOut { + let name = self.name != nil ? self.name! : "" + let parameterType = try ABITypeParser.parseTypeString(self.type) + switch parameterType { + case .tuple(types: _): + let components = try self.components?.compactMap({ (inp: ABI.Output) throws -> ABI.Element.ParameterType in + let input = try inp.parse() + return input.type + }) + let type = ABI.Element.ParameterType.tuple(types: components!) + let nativeInput = ABI.Element.InOut(name: name, type: type) + return nativeInput + case .array(type: let subtype, length: let length): + switch subtype { + case .tuple(types: _): + let components = try self.components?.compactMap({ (inp: ABI.Output) throws -> ABI.Element.ParameterType in + let input = try inp.parse() + return input.type + }) + let nestedSubtype = ABI.Element.ParameterType.tuple(types: components!) + let properType = ABI.Element.ParameterType.array(type: nestedSubtype, length: length) + let nativeInput = ABI.Element.InOut(name: name, type: properType) + return nativeInput + default: + let nativeInput = ABI.Element.InOut(name: name, type: parameterType) + return nativeInput + } + default: + let nativeInput = ABI.Element.InOut(name: name, type: parameterType) + return nativeInput + } + } +} + + diff --git a/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABITypeParser.swift b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABITypeParser.swift new file mode 100755 index 000000000..274712471 --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/Classes/ABITypeParser.swift @@ -0,0 +1,110 @@ +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation + +public struct ABITypeParser { + + private enum BaseParameterType: String { + case address + case uint + case int + case bool + case function + case bytes + case string + case tuple + } + + static func baseTypeMatch(from string: String, length: UInt64 = 0) -> ABI.Element.ParameterType? { + switch BaseParameterType(rawValue: string) { + case .address?: + return .address + case .uint?: + return .uint(bits: length == 0 ? 256: length) + case .int?: + return .int(bits: length == 0 ? 256: length) + case .bool?: + return .bool + case .function?: + return .function + case .bytes?: + if length == 0 { + return .dynamicBytes + } + return .bytes(length: length) + case .string?: + return .string + case .tuple?: + return .tuple(types: [ABI.Element.ParameterType]()) + default: + return nil + } + } + + public static func parseTypeString(_ string:String) throws -> ABI.Element.ParameterType { + let (type, tail) = recursiveParseType(string) + guard let t = type, tail == nil else {throw ABI.ParsingError.elementTypeInvalid} + return t + } + + static func recursiveParseType(_ string: String) -> (type: ABI.Element.ParameterType?, tail: String?) { + let matcher = try! NSRegularExpression(pattern: ABI.TypeParsingExpressions.typeEatingRegex, options: NSRegularExpression.Options.dotMatchesLineSeparators) + let match = matcher.matches(in: string, options: NSRegularExpression.MatchingOptions.anchored, range: string.fullNSRange) + guard match.count == 1 else { + return (nil, nil) + } + var tail: String = "" + var type: ABI.Element.ParameterType? + guard match[0].numberOfRanges >= 1 else {return (nil, nil)} + guard let baseTypeRange = Range(match[0].range(at: 1), in: string) else {return (nil, nil)} + let baseTypeString = String(string[baseTypeRange]) + if match[0].numberOfRanges >= 2, let exactTypeRange = Range(match[0].range(at: 2), in: string) { + let typeString = String(string[exactTypeRange]) + if match[0].numberOfRanges >= 3, let lengthRange = Range(match[0].range(at: 3), in: string) { + let lengthString = String(string[lengthRange]) + guard let typeLength = UInt64(lengthString) else {return (nil, nil)} + guard let baseType = baseTypeMatch(from: typeString, length: typeLength) else {return (nil, nil)} + type = baseType + } else { + guard let baseType = baseTypeMatch(from: typeString, length: 0) else {return (nil, nil)} + type = baseType + } + } else { + guard let baseType = baseTypeMatch(from: baseTypeString, length: 0) else {return (nil, nil)} + type = baseType + } + tail = string.replacingCharacters(in: string.range(of: baseTypeString)!, with: "") + if (tail == "") { + return (type, nil) + } + return recursiveParseArray(baseType: type!, string: tail) + } + + static func recursiveParseArray(baseType: ABI.Element.ParameterType, string: String) -> (type: ABI.Element.ParameterType?, tail: String?) { + let matcher = try! NSRegularExpression(pattern: ABI.TypeParsingExpressions.arrayEatingRegex, options: NSRegularExpression.Options.dotMatchesLineSeparators) + let match = matcher.matches(in: string, options: NSRegularExpression.MatchingOptions.anchored, range: string.fullNSRange) + guard match.count == 1 else {return (nil, nil)} + var tail: String = "" + var type: ABI.Element.ParameterType? + guard match[0].numberOfRanges >= 1 else {return (nil, nil)} + guard let baseArrayRange = Range(match[0].range(at: 1), in: string) else {return (nil, nil)} + let baseArrayString = String(string[baseArrayRange]) + if match[0].numberOfRanges >= 2, let exactArrayRange = Range(match[0].range(at: 2), in: string) { + let lengthString = String(string[exactArrayRange]) + guard let arrayLength = UInt64(lengthString) else {return (nil, nil)} + let baseType = ABI.Element.ParameterType.array(type: baseType, length: arrayLength) + type = baseType + } else { + let baseType = ABI.Element.ParameterType.array(type: baseType, length: 0) + type = baseType + } + tail = string.replacingCharacters(in: string.range(of: baseArrayString)!, with: "") + if (tail == "") { + return (type, nil) + } + return recursiveParseArray(baseType: type!, string: tail) + } +} diff --git a/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/EthereumABI.h b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/EthereumABI.h new file mode 100644 index 000000000..f2d5c0b75 --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumABI/EthereumABI/EthereumABI.h @@ -0,0 +1,23 @@ +// +// EthereumABI.h +// EthereumABI +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +#if TARGET_OS_IPHONE +#import +#else +#import +#endif + +//! Project version number for EthereumABI. +FOUNDATION_EXPORT double EthereumABIVersionNumber; + +//! Project version string for EthereumABI. +FOUNDATION_EXPORT const unsigned char EthereumABIVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Example/web3swiftExample/Pods/EthereumABI/LICENSE b/Example/web3swiftExample/Pods/EthereumABI/LICENSE new file mode 100644 index 000000000..d49e6aa41 --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumABI/LICENSE @@ -0,0 +1,13 @@ +Copyright 2018 Alex Vlasov + +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/Example/web3swiftExample/Pods/EthereumABI/README.md b/Example/web3swiftExample/Pods/EthereumABI/README.md new file mode 100644 index 000000000..0e96dc82f --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumABI/README.md @@ -0,0 +1,3 @@ +# Description + +Ethereum ABI parsing, decoding and encoding module for other projects diff --git a/Example/web3swiftExample/Pods/EthereumAddress/EthereumAddress/Classes/EthereumAddress.swift b/Example/web3swiftExample/Pods/EthereumAddress/EthereumAddress/Classes/EthereumAddress.swift new file mode 100644 index 000000000..da47d982c --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumAddress/EthereumAddress/Classes/EthereumAddress.swift @@ -0,0 +1,136 @@ +// +// EthereumAddress.swift +// EthereumAddress +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import CryptoSwift + +public struct EthereumAddress: Equatable { + public enum AddressType { + case normal + case contractDeployment + } + + public var isValid: Bool { + get { + switch self.type { + case .normal: + return (self.addressData.count == 20) + case .contractDeployment: + return true + } + + } + } + var _address: String + public var type: AddressType = .normal + public static func ==(lhs: EthereumAddress, rhs: EthereumAddress) -> Bool { + return lhs.addressData == rhs.addressData && lhs.type == rhs.type + // return lhs.address.lowercased() == rhs.address.lowercased() && lhs.type == rhs.type + } + + public var addressData: Data { + get { + switch self.type { + case .normal: + guard let dataArray = Data.fromHex(_address) else {return Data()} + return dataArray + // guard let d = dataArray.setLengthLeft(20) else { return Data()} + // return d + case .contractDeployment: + return Data() + } + } + } + public var address:String { + switch self.type { + case .normal: + return EthereumAddress.toChecksumAddress(_address)! + case .contractDeployment: + return "0x" + } + } + + public static func toChecksumAddress(_ addr:String) -> String? { + let address = addr.lowercased().stripHexPrefix() + guard let hash = address.data(using: .ascii)?.sha3(.keccak256).toHexString().stripHexPrefix() else {return nil} + var ret = "0x" + + for (i,char) in address.enumerated() { + let startIdx = hash.index(hash.startIndex, offsetBy: i) + let endIdx = hash.index(hash.startIndex, offsetBy: i+1) + let hashChar = String(hash[startIdx..= 8) { + ret += c.uppercased() + } else { + ret += c + } + } + return ret + } + + public init?(_ addressString:String, type: AddressType = .normal, ignoreChecksum: Bool = false) { + switch type { + case .normal: + guard let data = Data.fromHex(addressString) else {return nil} + guard data.count == 20 else {return nil} + if !addressString.hasHexPrefix() { + return nil + } + if (!ignoreChecksum) { + // check for checksum + if data.toHexString() == addressString.stripHexPrefix() { + self._address = data.toHexString().addHexPrefix() + self.type = .normal + return + } else if data.toHexString().uppercased() == addressString.stripHexPrefix() { + self._address = data.toHexString().addHexPrefix() + self.type = .normal + return + } else { + let checksummedAddress = EthereumAddress.toChecksumAddress(data.toHexString().addHexPrefix()) + guard checksummedAddress == addressString else {return nil} + self._address = data.toHexString().addHexPrefix() + self.type = .normal + return + } + } else { + self._address = data.toHexString().addHexPrefix() + self.type = .normal + return + } + case .contractDeployment: + self._address = "0x" + self.type = .contractDeployment + } + } + + public init?(_ addressData:Data, type: AddressType = .normal) { + guard addressData.count == 20 else {return nil} + self._address = addressData.toHexString().addHexPrefix() + self.type = type + } + + public static func contractDeploymentAddress() -> EthereumAddress { + return EthereumAddress("0x", type: .contractDeployment)! + } + + // public static func fromIBAN(_ iban: String) -> EthereumAddress { + // + // } + +} + +extension EthereumAddress: Hashable { + +} + + + + diff --git a/Example/web3swiftExample/Pods/EthereumAddress/EthereumAddress/Classes/Extensions.swift b/Example/web3swiftExample/Pods/EthereumAddress/EthereumAddress/Classes/Extensions.swift new file mode 100644 index 000000000..58cf99d59 --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumAddress/EthereumAddress/Classes/Extensions.swift @@ -0,0 +1,226 @@ +// +// Extensions.swift +// EthereumAddress +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation + +extension Data { + func setLengthLeft(_ toBytes: UInt64, isNegative:Bool = false ) -> Data? { + let existingLength = UInt64(self.count) + if (existingLength == toBytes) { + return Data(self) + } else if (existingLength > toBytes) { + return nil + } + var data:Data + if (isNegative) { + data = Data(repeating: UInt8(255), count: Int(toBytes - existingLength)) + } else { + data = Data(repeating: UInt8(0), count: Int(toBytes - existingLength)) + } + data.append(self) + return data + } + + func setLengthRight(_ toBytes: UInt64, isNegative:Bool = false ) -> Data? { + let existingLength = UInt64(self.count) + if (existingLength == toBytes) { + return Data(self) + } else if (existingLength > toBytes) { + return nil + } + var data:Data = Data() + data.append(self) + if (isNegative) { + data.append(Data(repeating: UInt8(255), count: Int(toBytes - existingLength))) + } else { + data.append(Data(repeating: UInt8(0), count:Int(toBytes - existingLength))) + } + return data + } + + static func fromHex(_ hex: String) -> Data? { + let string = hex.lowercased().stripHexPrefix() + let array = Array(hex: string) + if (array.count == 0) { + if (hex == "0x" || hex == "") { + return Data() + } else { + return nil + } + } + return Data(array) + } +} + +extension String { + var fullRange: Range { + return startIndex.. Index? { + guard let range = range(of: String(char)) else { + return nil + } + return range.lowerBound + } + + // func split(intoChunksOf chunkSize: Int) -> [String] { + // var output = [String]() + // let splittedString = self + // .map { $0 } + // .split(intoChunksOf: chunkSize) + // splittedString.forEach { + // output.append($0.map { String($0) }.joined(separator: "")) + // } + // return output + // } + + subscript (bounds: CountableClosedRange) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = index(self.startIndex, offsetBy: bounds.upperBound) + return String(self[start...end]) + } + + subscript (bounds: CountableRange) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = index(self.startIndex, offsetBy: bounds.upperBound) + return String(self[start..) -> String { + let start = index(self.startIndex, offsetBy: bounds.lowerBound) + let end = self.endIndex + return String(self[start.. String { + let stringLength = self.count + if stringLength < toLength { + return String(repeatElement(character, count: toLength - stringLength)) + self + } else { + return String(self.suffix(toLength)) + } + } + + // func interpretAsBinaryData() -> Data? { + // let padded = self.padding(toLength: ((self.count + 7) / 8) * 8, withPad: "0", startingAt: 0) + // let byteArray = padded.split(intoChunksOf: 8).map { UInt8(strtoul($0, nil, 2)) } + // return Data(byteArray) + // } + + func hasHexPrefix() -> Bool { + return self.hasPrefix("0x") + } + + func stripHexPrefix() -> String { + if self.hasPrefix("0x") { + let indexStart = self.index(self.startIndex, offsetBy: 2) + return String(self[indexStart...]) + } + return self + } + + func addHexPrefix() -> String { + if !self.hasPrefix("0x") { + return "0x" + self + } + return self + } + + func matchingStrings(regex: String) -> [[String]] { + guard let regex = try? NSRegularExpression(pattern: regex, options: []) else { return [] } + let nsString = self as NSString + let results = regex.matches(in: self, options: [], range: NSMakeRange(0, nsString.length)) + return results.map { result in + (0.. Range? { + guard + let from16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location, limitedBy: utf16.endIndex), + let to16 = utf16.index(utf16.startIndex, offsetBy: nsRange.location + nsRange.length, limitedBy: utf16.endIndex), + let from = from16.samePosition(in: self), + let to = to16.samePosition(in: self) + else { return nil } + return from ..< to + } + + var asciiValue: Int { + get { + let s = self.unicodeScalars + return Int(s[s.startIndex].value) + } + } +} + +extension Character { + var asciiValue: Int { + get { + let s = String(self).unicodeScalars + return Int(s[s.startIndex].value) + } + } +} + +extension Array where Element == UInt8 { + init(hex: String) { + self.init(reserveCapacity: hex.unicodeScalars.lazy.underestimatedCount) + var buffer: UInt8? + var skip = hex.hasPrefix("0x") ? 2 : 0 + for char in hex.unicodeScalars.lazy { + guard skip == 0 else { + skip -= 1 + continue + } + guard char.value >= 48 && char.value <= 102 else { + removeAll() + return + } + let v: UInt8 + let c: UInt8 = UInt8(char.value) + switch c { + case let c where c <= 57: + v = c - 48 + case let c where c >= 65 && c <= 70: + v = c - 55 + case let c where c >= 97: + v = c - 87 + default: + removeAll() + return + } + if let b = buffer { + append(b << 4 | v) + buffer = nil + } else { + buffer = v + } + } + if let b = buffer { + append(b) + } + } + + func toHexString() -> String { + return `lazy`.reduce("") { + var s = String($1, radix: 16) + if s.count == 1 { + s = "0" + s + } + return $0 + s + } + } +} diff --git a/Example/web3swiftExample/Pods/EthereumAddress/EthereumAddress/EthereumAddress.h b/Example/web3swiftExample/Pods/EthereumAddress/EthereumAddress/EthereumAddress.h new file mode 100644 index 000000000..32cf27a4d --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumAddress/EthereumAddress/EthereumAddress.h @@ -0,0 +1,23 @@ +// +// EthereumAddress.h +// EthereumAddress +// +// Created by Alex Vlasov on 25/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +#if TARGET_OS_IPHONE +#import +#else +#import +#endif + +//! Project version number for EthereumAddress. +FOUNDATION_EXPORT double EthereumAddressVersionNumber; + +//! Project version string for EthereumAddress. +FOUNDATION_EXPORT const unsigned char EthereumAddressVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Example/web3swiftExample/Pods/EthereumAddress/LICENSE b/Example/web3swiftExample/Pods/EthereumAddress/LICENSE new file mode 100644 index 000000000..d49e6aa41 --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumAddress/LICENSE @@ -0,0 +1,13 @@ +Copyright 2018 Alex Vlasov + +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/Example/web3swiftExample/Pods/EthereumAddress/README.md b/Example/web3swiftExample/Pods/EthereumAddress/README.md new file mode 100644 index 000000000..8678762a3 --- /dev/null +++ b/Example/web3swiftExample/Pods/EthereumAddress/README.md @@ -0,0 +1,3 @@ +# Ethereum address + +Lightweight implementaiton of Ethereum address native structure with parsing and validation options. diff --git a/Example/web3swiftExample/Pods/Manifest.lock b/Example/web3swiftExample/Pods/Manifest.lock index 589033287..593c8c644 100644 --- a/Example/web3swiftExample/Pods/Manifest.lock +++ b/Example/web3swiftExample/Pods/Manifest.lock @@ -1,28 +1,37 @@ PODS: - BigInt (3.1.0): - SipHash (~> 1.2) - - CryptoSwift (0.12.0) - - PromiseKit (6.4.1): - - PromiseKit/CorePromise (= 6.4.1) - - PromiseKit/Foundation (= 6.4.1) - - PromiseKit/UIKit (= 6.4.1) - - PromiseKit/CorePromise (6.4.1) - - PromiseKit/Foundation (6.4.1): + - CryptoSwift (0.13.0) + - EthereumABI (1.1.1): + - BigInt (~> 3.1) + - CryptoSwift (~> 0.13) + - EthereumAddress (~> 1.0.0) + - EthereumAddress (1.0.0): + - CryptoSwift (~> 0.13) + - PromiseKit (6.5.2): + - PromiseKit/CorePromise (= 6.5.2) + - PromiseKit/Foundation (= 6.5.2) + - PromiseKit/UIKit (= 6.5.2) + - PromiseKit/CorePromise (6.5.2) + - PromiseKit/Foundation (6.5.2): - PromiseKit/CorePromise - - PromiseKit/UIKit (6.4.1): + - PromiseKit/UIKit (6.5.2): - PromiseKit/CorePromise - - Result (4.0.0) - scrypt (2.0): - CryptoSwift (~> 0.11) - - secp256k1_ios (0.1.3) + - secp256k1_swift (1.0.3) - SipHash (1.2.2) - - web3swift (1.1.9): + - SwiftRLP (1.2): - BigInt (~> 3.1) - - CryptoSwift (~> 0.11) + - web3swift (2.0.1): + - BigInt (~> 3.1) + - CryptoSwift (~> 0.13) + - EthereumABI (~> 1.1.1) + - EthereumAddress (~> 1.0.0) - PromiseKit (~> 6.3) - - Result (~> 4.0) - scrypt (~> 2.0) - - secp256k1_ios (~> 0.1) + - secp256k1_swift (~> 1.0.3) + - SwiftRLP (~> 1.1) DEPENDENCIES: - web3swift @@ -31,23 +40,27 @@ SPEC REPOS: https://github.com/cocoapods/specs.git: - BigInt - CryptoSwift + - EthereumABI + - EthereumAddress - PromiseKit - - Result - scrypt - - secp256k1_ios + - secp256k1_swift - SipHash + - SwiftRLP - web3swift SPEC CHECKSUMS: BigInt: 76b5dfdfa3e2e478d4ffdf161aeede5502e2742f - CryptoSwift: 1c07ca50843dd48bc54e6ea53d7a4dba3b645716 - PromiseKit: 4c76a6506638034e3d7bede97b2ff7743f7bd2dc - Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713 + CryptoSwift: 16e78bebf567bad1c87b2d58f6547f25b74c31aa + EthereumABI: f040f5429e5a4366d028c88b88d9441e137593af + EthereumAddress: f476e1320dca3a0024431e713ede7a09c7eb7796 + PromiseKit: 27c1601bfb73405871b805bcb8cf7e55c4dad3db scrypt: 3fe5b1a3b0976f97cd87488673a8f7c65708cc84 - secp256k1_ios: ac9ef04e761f43c58012b28548afa91493761f17 + secp256k1_swift: 4fc5c4b2d2c6d21ee8ccb868cdc92da12f38bed9 SipHash: fad90a4683e420c52ef28063063dbbce248ea6d4 - web3swift: 4895c765c9858eb4737ef222eb8643bb5fc7fdb3 + SwiftRLP: 98a02b2210128353ca02e4c2f4d83e2a9796db4f + web3swift: 33f30ca0e061e0f89117dfb46f5ee9f626eff6d6 PODFILE CHECKSUM: 6d9e2706704c1b04a380df8a28b2457bc4f325b1 -COCOAPODS: 1.6.0.beta.1 +COCOAPODS: 1.6.0.beta.2 diff --git a/Example/web3swiftExample/Pods/Pods.xcodeproj/project.pbxproj b/Example/web3swiftExample/Pods/Pods.xcodeproj/project.pbxproj index e5e16d320..312ecf1cb 100644 --- a/Example/web3swiftExample/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/web3swiftExample/Pods/Pods.xcodeproj/project.pbxproj @@ -7,415 +7,476 @@ objects = { /* Begin PBXBuildFile section */ - 0059405B888945E190437148D57D390D /* Promise+Web3+Eth+EstimateGas.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6851DCEA08736B9FD49677B930D804B9 /* Promise+Web3+Eth+EstimateGas.swift */; }; - 02E8046C2A767EA8848448EAB9E07A65 /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28D14AA0CBC0F7D8CB4FE9994C3B4B48 /* DigestType.swift */; }; - 03FA8EDEAAF28C2F20B6134374C42DAB /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF11D2FEEDD0F5C59F1823F81B0D54DA /* SipHashable.swift */; }; - 0512B738C8204A95E8407E6893281245 /* BigUInt+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CC48F7531359D8D25C876099C73CD53 /* BigUInt+ObjC.swift */; }; - 051AD4160E32E958586C7F2F62C23172 /* PlainKeystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17FF07C284C525895497483DCD35E62F /* PlainKeystore.swift */; }; - 056D9F9029F5538C0D5AC9FFF9575693 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 33C9F06AC6D082FC66126F531BBC3E3F /* UIView+AnyPromise.m */; }; - 063172677A7320FA0176B8142D11805E /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEE2227E4C836011E279D5A187A8C1EA /* Authenticator.swift */; }; - 0717ACAE7ECC2E7D2E33FEEB38A76E2F /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C5FE3E2EF6CCCB0A8CA29C7C6F63DEE /* SHA3.swift */; }; - 0732B277DE0821A2E9F30FD82A2D505C /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11D360750D0388F4DDEA48C9C2C4CBA8 /* SHA2.swift */; }; - 074311E7BC28C29F29C28D05D1496B54 /* Promise+Web3+Eth+GetBlockNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F8C6DCFB940EB1AE8254FC269A0EBE9 /* Promise+Web3+Eth+GetBlockNumber.swift */; }; - 07A516E5DC61219A239FE2E3E902E691 /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D65B1B12252C4CDBEF210FE2DA6E52 /* ECB.swift */; }; - 088387733523D1CAFA7D4DC267EA4433 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4A8E6D5817207A8BAFC2040BACBDF0 /* Strideable.swift */; }; - 08FF36052B67EAF44898509B87954A4B /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = 98F7CA5B3DED455C4A7996A4D4163AA0 /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 09321ED82C7D46C3A861780082FE2BBE /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E9C3E6A47F759D446C9633237D3587A /* Deprecations.swift */; }; - 09648EACD312EC7080BB4E2CD9B0943F /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA6B0C20639EFF1F778E27935D0273C4 /* CBC.swift */; }; - 09F1D2094D102A74B519B96AE8B0A2C4 /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = D460F9A266BE2FC2769DCC397350234B /* group.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 09F823407F1CF54E8E612A6A5B95D275 /* Web3+Eth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 792AC5301BC3E29E4EF8E519E96F1ECC /* Web3+Eth.swift */; }; - 0C841B2C6A190FB7458744E4D635B9ED /* Web3+Personal.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE534FDA36211FEA618C63A4A7779CF5 /* Web3+Personal.swift */; }; - 0DA073582D93FDE5AD558D56BE5F3743 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BC92AB3E8B43B6FEFE7AB4748793AE7 /* Foundation.framework */; }; - 0E37D3A9552CB1712CC4D9034079B1B0 /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 10E6CC65707B2EBCD6BD73088BB3B221 /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 0FA7E1ED09D6CB457D8B1F5880A97CEB /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FC82B238B016E51FBE7F8F1C2462A73 /* Data+Extension.swift */; }; - 101CEC15F6F283289721E6DA1640B5DB /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E23DA5CE9BE03D67FA010C086FD8443 /* AES.swift */; }; - 10A76A764D28EA81D00DCAE3BDBD54AD /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = AE5EE930804B944DB46E6C6221E7B4C4 /* ecdsa.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 10CB8C1B8BD3488CF50B902BB86709F3 /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = EADF759D706E073C79D0A75908F5DB72 /* race.m */; }; - 11155D066240AA9BCB5FB19A8915C253 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = F26C7D8E758DAAE0AE9602235489A452 /* GCD.swift */; }; - 16A37275A64EDC8D057D8793601091C1 /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B2EEC1A0CED11A8CD095B884755F14 /* AnyPromise.m */; }; - 1728A542D46BD6132968D04D711A9588 /* Promise+Web3+Eth+GetTransactionDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA0B3AE7019BDA95536AE5163FFCE31F /* Promise+Web3+Eth+GetTransactionDetails.swift */; }; - 18443ED1EE9C0FFCE14462F5AE1EFF57 /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A09EE23C660A1403809F462D2A1C0B7 /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 19E2CEC0228F9E84247450A041E97E2C /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = B5AE0CE423C25CAF8DDEF32FE109DD36 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1AB7933C12CD4D54C044E42F565C943E /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = 48EB818C63ADD7AC3471D41B7FEFBEDE /* ecmult_const.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 1B4526E37C8A077336405AABCB0D7A76 /* EventFiltering.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80252C1601887FBAA6A92A7774A1AFE9 /* EventFiltering.swift */; }; - 1C53AF4113DA6608A4B207AFF139039A /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 421EFAA21C55AAB5DBB49F3C8F2D1551 /* RandomUInt64.swift */; }; - 1C6305612C71BA4A41EA3EE86EF9DE98 /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC8B5678B1206B79D7DFCE48E8DC433D /* Addition.swift */; }; - 1F4BD2A1E2D9E7C4534DA604B402FA3F /* ComparisonExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BB6725C03A0E4193BC3CE2081AED530 /* ComparisonExtensions.swift */; }; - 1F4BDDA00F127CA95F0BFC9F034BD28D /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D3D5E52087AC748C8081879D9C93E0 /* ChaCha20.swift */; }; - 1F522B047157244684FC7A469A5654D5 /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = A04EB2E762C3C146021C34F31E991075 /* BlockMode.swift */; }; - 2058A726DD078C04D63E243565CD07E1 /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73385F119353E84309DFB29961588151 /* BatchedCollection.swift */; }; - 21347ECAADC4E528464E9B3170877703 /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = E69B0EEC45372ADC020F4E2957A210D2 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 2256B334FEE938FC8542089190F86ABF /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97BDBF4C5CA18216A7B59BE4733E8907 /* CryptoSwift.framework */; }; - 22D70E35B0800D871B84700928E26266 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 229A34F67F1DD0EA4F4DCB16AB734B28 /* Box.swift */; }; - 22FE67B665841A937E8D95D9DBCC7EB7 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0353245090FFB16BCAFE272E9F48A277 /* Bitwise Ops.swift */; }; - 23E69E19A1E45A210A051F28FBDF4279 /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = F78DD3E0F25108732A8209B2470BB51A /* Checksum.swift */; }; - 2453DCCE0591C08C9EB5DBAF48DCE56E /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = 3300B7C7FE5D1D9B98E0EB72BAAEC209 /* Cimpl.c */; }; - 253A03485DB4317EB134F56B2E502053 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = 3404AAEF07BB50E914AAA75416AF8556 /* ecmult_gen.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 25ADFF1D037F9E8F54618307F1ED2DAF /* ABIv2Parsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0675963B7F5BBBCE7B3FEACD46F1059 /* ABIv2Parsing.swift */; }; - 27C2946E57A2DADA5C8D171A7DC2A2BD /* NameHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3A802B0EBBDBABC284E77D0173F524 /* NameHash.swift */; }; - 288250141FA353726E30472933B3E9DC /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF7884454DEDC6025D2DF234BCEE6953 /* Prime Test.swift */; }; - 28D7A203B25D26891BE2E0EC01BBA797 /* ABIv2Encoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BAB8972F826F08F2AF2878A15874107 /* ABIv2Encoding.swift */; }; - 29FC0322575E983B2A4C695AB7E8AED0 /* AbstractKeystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07B36EAF62DEBCA4E85EC353970A217E /* AbstractKeystore.swift */; }; - 2A7A6CFC865030C10D3DE94D65B5502A /* ENS.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4C991E8454B8E94B54C310E76276DDD /* ENS.swift */; }; - 2BCA931010327B7616D84860C4E8DE2A /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44563320842BB46660FEE233AA4A38BD /* UInt32+Extension.swift */; }; - 2C0A3059883F6316F8686B6832E042FB /* web3swift-Bridging-Header.h in Headers */ = {isa = PBXBuildFile; fileRef = DC66B1C4A5263CB1B1CA7B87AA49418F /* web3swift-Bridging-Header.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2C50168E22ACB7A7D9E7ED2A643A1681 /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CD6B2B92DB312F13E1B847E31A1B602 /* String+FoundationExtension.swift */; }; - 2D81F68C100B42A128F026D10711E0C6 /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C15C5D29D981FFD7DB03B256FD134EE /* fwd.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2E2F39DE14D971C18F8B7AE2CF084C4E /* BIP32Keystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = D881EFCF8C8321AF82D7B1E16080EED1 /* BIP32Keystore.swift */; }; - 2E830391D5F11F6AB9F33366A403C0F3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BC92AB3E8B43B6FEFE7AB4748793AE7 /* Foundation.framework */; }; - 2EBB7ADAEB63AA3974D8DB8047EAB538 /* BIP39+WordLists.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4E57C780B6DC73DDE512C89289D7C6D /* BIP39+WordLists.swift */; }; - 2ED5E810B3C7F74ACD88963DD096A8CE /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 01542E21EB2EEDA093596518918486A4 /* hash.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 2F3B479B4A026F3280BF4FA333726A86 /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9554A1412BDC823D749F20DEFFDCE38E /* AEADChaCha20Poly1305.swift */; }; - 2F42CF7089E970088164D26EC8BDD3C7 /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = B0DF79B993E5E4E742F07F91E5247FD4 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 311DD072B99C375FA72BED3BEF6FAF02 /* Web3+EventParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5950DAB6A6AF16598B547C61614F67F /* Web3+EventParser.swift */; }; - 32466A7539462463993E957EE2462F58 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA92C153CAE76CB71780322E95F9393B /* Blowfish+Foundation.swift */; }; - 324B8D907DD24DC359F04AA6C542B087 /* Web3+Contract.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE41274C9D04818CA1D824916BD156D5 /* Web3+Contract.swift */; }; - 32C2736797D270604AFB65A54134B17F /* scrypt-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0EF1C662C9485A5A72B33C4CD4E0CAD9 /* scrypt-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 34053DDDE72FFDD5416B487A059EA9AC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BC92AB3E8B43B6FEFE7AB4748793AE7 /* Foundation.framework */; }; - 34B17DF22062E35B740FA4AA29300ED0 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99F4C0E8C3EE8B472BEEC0F2E1795295 /* Division.swift */; }; - 34F013BF451F97489364B45D6CE486A6 /* KeystoreManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AED2A5ABC55B2E2852BAB3E48BE6124 /* KeystoreManager.swift */; }; - 359DF64332B137A22F623BDBFE283662 /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = E57F88566F2750F3697639B5C501F8F3 /* join.m */; }; - 35F55E0683F0C5A6EC4872A090D8ACE8 /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E849077E96B6057FFFCBFE60E29E639 /* scratch_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 362EF07E94A6E51B4E80FAF53CCE6367 /* KeystoreV3JSONStructure.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D5037585515D7D31ABCC390E523DCE /* KeystoreV3JSONStructure.swift */; }; - 3697589947BBEDE71944356FE6CE4362 /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = 2296888E4B0AF0932F150F5D557DD816 /* secp256k1.c */; }; - 373BCBD3BAFD4EEF405BA6A4B1DD206B /* SipHash-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B611AE2C6BEF0A2E26865F99A0DFC1D2 /* SipHash-dummy.m */; }; - 37E2B7216A4D87B38008F2FECE4CC335 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = F0504F5A28A5B671EFD041FFF39ECCD1 /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3C14A6EDB43BEE051ED4B406A33DC65F /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67560E83D58D59D4B717878DC0D71057 /* UInt8+Extension.swift */; }; - 3D5D0963234AB64C9D426B8758656C47 /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA42AFA594E6D56EC46F6E754CBDA708 /* Scrypt.swift */; }; - 3D6DEB06562C0F35F36447D324F7B881 /* scrypt-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 728F62119180B063304005EF9E109C72 /* scrypt-dummy.m */; }; - 3D792AED79EC2D01C8DCCDE3840FA64D /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B04630329D72AB07A6571B0E35368B /* field.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 3DBD2C1D797EFC53BB001EB1D6C96BE7 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAFAD63081AB296364EBEE0550B55C75 /* after.swift */; }; - 3E094A20F931453D1CB10651D5C83651 /* EthereumAddress+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192224DB4709FB6A4273807EFBCDCBD4 /* EthereumAddress+ObjC.swift */; }; - 3E18435DD83EFD78B0C55534DE9F0578 /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = 1BC6B91E0252F62A5E5F43F9AA236607 /* num.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 3E3188EE35DEDBA8EAF6854B9224011E /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C327B5F182BF8DF005B76982E2419A2 /* Utils+Foundation.swift */; }; - 3EDCE35B5BD08FB4348435D94A458376 /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = B64A66E3159EDD6E2476105656E5B809 /* PBKDF2.swift */; }; - 3F0FAD3B01F01B0C450A7ED622344733 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BE0A0A33E52AD56332877241A1F5465 /* Process+Promise.swift */; }; - 3F7875216E3000A0AD8DD9566A69D50E /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 177C91EDD167FD64C32183AC2992D4A3 /* firstly.swift */; }; - 405BD7964F4B4EEF44FF3054C2F6C3F6 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC27BAB5F87E71098FCC3B49E257E226 /* Configuration.swift */; }; - 4261BDB05BD2252A1D37EF501EE7AE26 /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DB40030A8982CFEEB33A6F735ECF86B /* MD5.swift */; }; - 42CE685372C5AB0C197D4CBAB3230AB1 /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = D606FC0EE4EE3BC0BB4A1413AD91A5E2 /* group_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 436E0D3E98FDA90F084FD4C3EB5D10D8 /* NSRegularExpressionExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8CDF9DE89CE405CCA08750BE0B93C09 /* NSRegularExpressionExtension.swift */; }; - 43A213F845B41C54A0C6E74E216D28E5 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85D15B3C77562CE1D76E17840810174E /* Random.swift */; }; - 443E64134A2D26C41DB7302B8D788A27 /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DDFDF55E7005DEBC91225828C76BDB4 /* ecmult.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 44FDB7930C97998341299AC19CD52336 /* Web3+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F368BDEF8D570DA31892DE78BFAFEC69 /* Web3+HttpProvider.swift */; }; - 4598AD50EA5239AEEAD9FEE55165D42D /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A95DBF14B5B5C4080A5984C12B11FB1 /* scalar_low.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 464FF1817C50D833815517539FE13BAD /* Web3+JSONRPC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0B4DEDF5D53AB822C732F43AFB83EA6 /* Web3+JSONRPC.swift */; }; - 469AAF3F2BCF89EB1AE5208BDDCD8524 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF0A571C3D738760D77BE44DC3DBF459 /* BlockEncryptor.swift */; }; - 4868FC86913C7BEEF591B59A65E1C654 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D83A97A877542A2EC6DCA88DD2028EB /* String+Extension.swift */; }; - 48D8B679DA0511AB8EAC728612007462 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DB5E41B41743430F0D989437AD4091 /* OFB.swift */; }; - 4BF84961F4CACCF4703A5AD0E128033E /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = BEA6C296294AF579C5E26DE62FC71CBC /* dispatch_promise.m */; }; - 4CC6D90B4992919977240F7380448848 /* Promise+Web3+Personal+UnlockAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CD73B7D3181B0D94CE212502F3D74EE /* Promise+Web3+Personal+UnlockAccount.swift */; }; - 4F303678FF7DDA68695B989311DD33B4 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231C2D02CFF005D80CAD0308D882A69A /* NSURLSession+Promise.swift */; }; - 4F3F51153F6029695BE6BE54FFBDC616 /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1651C3EB5087C3CF5294DBDA737440F2 /* Cryptors.swift */; }; - 5009487EA1550B855E0A8D0F5218E755 /* NativeTypesEncoding+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67DB53803B8AFF12F28E47500E5FA4D5 /* NativeTypesEncoding+Extensions.swift */; }; - 5078EB44DBFBFF5E4D0572BD45439BCE /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F20F56831A09E0B4A45D3E47576CF42 /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 5177D0C2101B7DA5EE08F6111C768FCE /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2CFB442CB244B69C89D6C0651E21E9D /* Data+Extension.swift */; }; - 5356F05030669B23BAE51298F9EE5403 /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD20AF7008A9F71D298E2252FDF9EB7B /* CMAC.swift */; }; - 535A046EF29014CED01BF31BBCC547AA /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A40978EBB425827600AB1B975DAFEE5 /* Rabbit+Foundation.swift */; }; - 5403E57738826E187DE7C32E729B3B91 /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = F8C22382C482B8DB731B8A6B3B5618A5 /* lax_der_parsing.c */; }; - 541EE41CC83131708FC4873E24EB6813 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = A18BCBAF1463ABC38E43C310C8A5DC49 /* Subtraction.swift */; }; - 5424161BE3E074F4E7FEB20105CF2DEF /* Promise+Web3+Eth+GetAccounts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 703E60310515C9DAE5C5B44D4ADEF09D /* Promise+Web3+Eth+GetAccounts.swift */; }; - 54F1A3C5DE33561080A750257B22C23B /* Dictionary+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0C7EF8D801C5AF4AB0F1802971A0768 /* Dictionary+Extension.swift */; }; - 5749E971A5E9F57DD3CE90D4BEC95455 /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 72070A5E4D81C0DC66FD2630AB64FC35 /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 582127B8950A73384E0D7C919A6B9D76 /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3ADFA503DA3512C3D7462CEBC3461E1 /* Poly1305.swift */; }; - 5884800813971F246B42526DC8FC3B85 /* Promise+Web3+Personal+Sign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99D3AA13FF0CF2C33FD2CB7EF9FE4214 /* Promise+Web3+Personal+Sign.swift */; }; - 58C54CE909D3981244E323D3DB2EADFD /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A0D7C8248B11637C656458A2F76AA99 /* AES.Cryptors.swift */; }; - 5B2CC610F0124B9A9C82A288860CDC34 /* Promise+Web3+Eth+GetTransactionCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B857314AF2E96C8DA7CAAEFAEF1F7A8 /* Promise+Web3+Eth+GetTransactionCount.swift */; }; - 5B7CABA7F60DDB6278C59F7107742033 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB25E5C7BD25CD7E53D639B210A1B4AC /* Promise.swift */; }; - 5B9C17D9478EB66CF57A57017A230058 /* CryptoSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B2EBC8972ED05B8027B86BA6C334EC53 /* CryptoSwift-dummy.m */; }; - 5C1069C6EC60175E44BCEBDC0E34805A /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8B307D4E26840540E204782630D463C /* BufferStorage.swift */; }; - 5C55F3DE15A87BC02CF66FE4EC78B387 /* Promise+Batching.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE42A2863AE2DBF2428DD725882E73F /* Promise+Batching.swift */; }; - 5CBEF893697D411E6DAFF8283DBF5C1B /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5C02D3C50FB98C143D745510D16219A /* Promise+Web3+Eth+GetBalance.swift */; }; - 5D50C194C45265600EF508EBAA45E587 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = B0C8BA06101F357C799BC88E5081257A /* UIViewController+AnyPromise.m */; }; - 5D8B08FF6F53F23FF23A5F2C4D5249A8 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E59725DE3DCFD49F652BE2F16C05B26 /* PCBC.swift */; }; - 5ED753E367A75BE0055D8AADD86B71CB /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6B836C566DD50CDDC91622F1017A907 /* Words and Bits.swift */; }; - 5F76BDF4F74809A4CE24FCE8EF0CA536 /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B345CA772E8DBD55A2E927CBA8604A /* scalar_8x32.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6031615CB271AAFFE43DAB124BE8A6BC /* Web3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E6BCC699F0A197E17875C4F23F79E33 /* Web3.swift */; }; - 605E9831CB62A4E917E6296572119554 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D0B55151A9D3FF6DF524D9E72CBFCB2 /* AnyPromise.swift */; }; - 6096AEBF1D98A5660AD58DB451ACBFB3 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97BDBF4C5CA18216A7B59BE4733E8907 /* CryptoSwift.framework */; }; - 60D03407C65DD41B77633BEBA45350BD /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFDEB675E0A92FD109E8578E45A910EB /* Square Root.swift */; }; - 60E624888EDC3FAA5DD873759CA6A5F0 /* Pods-web3swiftExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E440C4B74B44A098160068C009BA588B /* Pods-web3swiftExample-dummy.m */; }; - 60F020078907CC571799F8EEE8657FD0 /* SipHash-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B06F415D20475CC8FC28FFC552A47C0 /* SipHash-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 62885B0BEA692447B5566DB9778C06A1 /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = F09D086B85A197C3C12AF8FC32888844 /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 629A716F64B182EEED14780B579DB7D1 /* EthereumAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EF9F4D741B2D1D2C8FCD47B3152DA9A /* EthereumAddress.swift */; }; - 6451556051C597D0608E90DD9768DF00 /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = C26DBBDC4361A9A3D875862D9CDCC222 /* HKDF.swift */; }; - 6526A7EF53A724E17E970F4FECE9F999 /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = A03CE4B278E0C83715E59182E1F70067 /* field_5x52.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 65BCDF3B209C440F8CBD5648EABD5FA5 /* Result-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FA4BD088591072E3F8E937FC348CF9C /* Result-dummy.m */; }; - 65CC5B6F6034B05B71E19DDD56BEC50B /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = C88308E23ACC16B283556A5CA6AC322F /* scalar_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 65CD80DDC802FC77BDD68D3E2AA32F8F /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A6FF6A14EF4D6724CFBFB93A4F4F681 /* Rabbit.swift */; }; - 6653B8B318CB15A8781326AC664196E3 /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FDA4F7EC9B81938EE471ECE2284AECA /* Resolver.swift */; }; - 66F9A521D75B9EABAE1CAD8FDB2FD28C /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FD8645A2496918B9B87011F0B77E14E /* ResultProtocol.swift */; }; - 679171569947CA69B28369CBB64062BE /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F599A827CAE59ECD5DA613ADD1801A7 /* Blowfish.swift */; }; - 681D98F4D692FA39C87A2949DFE51F16 /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4770FB1CC45B404A730863A5BBDE8C9F /* Digest.swift */; }; - 6827F78241E84E17AA16A7D10C477746 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 064D539BBAF5825903014E2E42F019F4 /* HMAC.swift */; }; - 6890BC23C948237266F16D15073C5B26 /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7216ACED116DF927E827ACB9E2DF163 /* SHA1.swift */; }; - 68D37923D30539349D08F686E2060117 /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57C115113180DDD97A209C450A323C0E /* SecureBytes.swift */; }; - 693A77DE44042BA013938A432B8AA9B6 /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 6158BF72A61B2B3CE2240025C34B8A23 /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 69E6BE13070187CED87503CD613CAEE1 /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35741AB0833B23E77A7CB168A157FD90 /* Integer Conversion.swift */; }; - 6A18E0B8ED23E948F38FA672542C0134 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FFFCB7AB750F1408E71BE53B3D9C85E /* afterlife.swift */; }; - 6A2336254B24BF2B93D7D8E39BE294B7 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DBB8EB538986AEF569A595AD56B2CB9 /* CustomStringConvertible.swift */; }; - 6ABBCE9B9ED70A2117B857ADFB9159E4 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 2377E7F5F6E1B9EAA04A11FB9329ECF5 /* ecmult_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6B2C7A66EAF074A78FFA2FD769C56F65 /* EIP681.swift in Sources */ = {isa = PBXBuildFile; fileRef = 986FB1624E314E5F2E9F13EF4B8175CB /* EIP681.swift */; }; - 6B306FD8E0F52DD895310B95070F9C30 /* UIViewPropertyAnimator+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F3B8889D0D18DEF2CF5F05EFCE9F568 /* UIViewPropertyAnimator+Promise.swift */; }; - 6B5CE1AEB9E558B70C951801D35FD55E /* TransactionSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C94A81A904A9492C86F03251F3F9A6 /* TransactionSigner.swift */; }; - 6B861CBC3B90D10C8CDBAC5D0E01743D /* Web3+Eth+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E149422ED5FBFBBFDF869F5267A3CFED /* Web3+Eth+ObjC.swift */; }; - 6C46373BE1A126517B4FF02B59D985A7 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 891EED47DC73A8B323F748EA2676F146 /* race.swift */; }; - 6E89D365ABD5F55D075E857D261BFF33 /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = E1B553971FDAECBA58CE3B063C9A66F5 /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6FBCAC4C87884CCA78E3B169814DC7AC /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 7857CCE04CD7E06C41D8CFAD0FF6486A /* field_10x26.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6FCD25230BA4E0B39D3CDD9D8AE1299F /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDC8C3143E181D6248738187393BEA40 /* UIView+Promise.swift */; }; - 70EA0CC4200BB02F9F60433D20AD6325 /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EB4026359CE620C0114B424CBA5D40D /* basic-config.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 71B9B8543875E4E32E42B4A9A1312C01 /* BigInt-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 91FF287A2D6F4A4F78AB5F96F8D6B6C3 /* BigInt-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 722867F90BF998E4275E58E1458CF818 /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = 319DEB9643FEFA6C0B1D8706C28879A3 /* scratch.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 72DEE3AC5B9A27020EFE91619AFBAF82 /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0304AE8FA05319628AC1812E3E507A21 /* Cryptor.swift */; }; - 7338C3A1BBB90C58A2F63AD01A2FB4B6 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D207BADF2861BAEE09DB0F0100D9C8 /* Thenable.swift */; }; - 7519F2538E19EC85619495B9581EC002 /* ABIv2ParameterTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28FFFC9BD859F58312467FAB0ADBE711 /* ABIv2ParameterTypes.swift */; }; - 76A07471B25153C90BBE8C37CC9250B4 /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F689778FFDCF60FE0330895D2FF579D3 /* ChaCha20+Foundation.swift */; }; - 77B87967C1955033F9B350520B6CEEA4 /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = B2087493B84529EC925CD96B6E28CEDD /* util.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 77E8B7DDA613FB5C879784E0772FC013 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E4678722B01715F2B3716BD3AF97D05 /* BlockCipher.swift */; }; - 78B2A1FCF0C8FA91993663201251B82E /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FFDE44AE604DA940226CE09D970A58A /* when.swift */; }; - 78F2BC147CC813133D6356C9BE1ADCE1 /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C6D5088382FE71F237781CCAA15029E /* AEAD.swift */; }; - 795DED671E284726E82F7B29C8D84E1C /* Promise+Web3+Eth+GetGasPrice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47F253E5C15DCAA5F32728BF380B7FD3 /* Promise+Web3+Eth+GetGasPrice.swift */; }; - 7A6C963EFD84D52F5A5350A9612B3B0E /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = A57379017DA3A7363C4A126E85922A3E /* Result.swift */; }; - 7B940F6ECB4BB48F56D21A23DB6BC81C /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 196B6B93D2F28684E654A49D144415FF /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7EC2EF142B1C606B1D8F2DE063CF9A8C /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = B8FD1CF670C9D76982E36D9C7194D970 /* NSTask+AnyPromise.m */; }; - 7F5E2B72A48329F95982D38A450CC919 /* ABIv2TypeParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ABD85E6008589BB486729FDD20F2263 /* ABIv2TypeParser.swift */; }; - 80B0B462C09D541D9E850D874D656673 /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1446285C476D91623FFA25FFE16B2493 /* CFB.swift */; }; - 81C1FB472DAAF55ED66443EE6FF59E1C /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192204EBF8C806D42C01EE7BBCC7FAF5 /* Updatable.swift */; }; - 828C7ABD4A0AE0960760866B17AD94B1 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = A964E878B714B85BFFB78FE9A1D48601 /* Promise+Web3+Contract+GetIndexedEvents.swift */; }; - 8293BCC7B22412260873FB9EFD99FB53 /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 716FEE6D4ADC494CA5E7323805A351DC /* PBKDF1.swift */; }; - 82BBC18E36946D4421D1775F3CE9E101 /* ABIv2Decoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2A78FCC4EF319B19E3793B5E9793FB6 /* ABIv2Decoding.swift */; }; - 8454391CB46652B78B6AFC504F09067F /* secp256k1_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81DE6AEFFC0C4855DC44FB339A0BDE6C /* secp256k1_ios.framework */; }; - 847A155084AF3DCB445E53A1A33F2354 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 707432298CD4D86FB4904B22A030DBAD /* RandomBytesSequence.swift */; }; - 8956888E1CC6894013EBC449101A3EBB /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BBD7DF502B00E6CFC56DFE2C20E0D0D /* UInt128.swift */; }; - 8A4FB72AE3DADD0BB406C21178861D3C /* Web3+HttpProvider+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23101CE8BFD9EF3690B3991301140D48 /* Web3+HttpProvider+ObjC.swift */; }; - 8AAF2AFC9D027B407358379401879A0E /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = F1EE218B7D030099B8EF4244294877BA /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 8AD769BC9791E6C53FF3CD35554AA1D5 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36445A6F290DA01FBC4F26C0A5D31D70 /* PKCS7.swift */; }; - 8B3B9583B57FF22C41C8F767508487FF /* CryptoExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BD2E83F8EC164E54CDED400AD9CFFE0 /* CryptoExtensions.swift */; }; - 8CBD2840D5CF4328E1F16FABAE55137F /* RIPEMD160+StackOveflow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81DA673B05C77642F07D69EA4532425B /* RIPEMD160+StackOveflow.swift */; }; - 8D0CDEB79686FA00795F3E1D08C1192A /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = 12ADBF373A266E4D41DC6FC96C0A5C25 /* scalar_4x64.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 8DCCC8BA282404D40D84A0F4C94A3A6C /* scrypt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDE87D210458FFB601CC2F569131ACDE /* scrypt.framework */; }; - 8EB396C5D26910F7F72E37EA06924F7C /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = D0280A8B81447E72F8900FAC8DC255B5 /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 8F7E30C827079FA8A0EFEA91D62DF299 /* ContractABIv2.swift in Sources */ = {isa = PBXBuildFile; fileRef = B879FC9FF02959F80112A1028330B1C4 /* ContractABIv2.swift */; }; - 8FC26FC4527AC222B1C2F40D4E1F3D81 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7AE5E3A63DD4DE3E3574F245EBBFC95 /* Primitive Types.swift */; }; - 9097A0E21774CCF76D8251680DD36E55 /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = C9E535CC3B56DF96BD33013093E21D6B /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 910DECB543C55FB96E09E4E2557A6755 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4B6AC99AF9BB0962269E5759E81E320 /* Exponentiation.swift */; }; - 91344AA71C9263849385562A815572E1 /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = FC53C9C956E2390F9B8020E114BAEF38 /* field_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 917F4351B168C4F3759ACFA72A29562A /* ContractProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 343BA041D669379F08B4BA7E48C7BF65 /* ContractProtocol.swift */; }; - 91F2CBDDB29F4BB4CDA58D4F5B628A8F /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D58637E65FA215EA3F838A635924646 /* Catchable.swift */; }; - 929BF135E5D71303BA026FD0C5CBACAA /* EthereumKeystoreV3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0555E01E3A109C44BDC8D3F72BC8BDBD /* EthereumKeystoreV3.swift */; }; - 938409FB279CFA0089A3CEF866CFA6A0 /* EthereumFilterEncodingExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62C2D8DAB77DC8A25C4E449BC300AFDA /* EthereumFilterEncodingExtensions.swift */; }; - 94C78D2A4E635D01A9CD9986AC8CDD37 /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40B4DEF14A7DE548CFEF7B62B06AF62D /* UInt64+Extension.swift */; }; - 955F82AA3E016CE78E286ACC8559F35A /* ABIv2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A997EBF435A0C1763556BA8793373E65 /* ABIv2.swift */; }; - 95B4BAB0877245FBC1BDFF31D269B3D9 /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = A518522A431DA29C6EAB22C89220F3D3 /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 97CC2191FF1F5BF6E007E1F0452D3835 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45F2F797BEAEC4E38CE2D033EE44613C /* Operators.swift */; }; - 980449BCD84EFBE6174DB967E62EE02C /* Promise+Web3+Eth+Call.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB88C6871FFA8E2AEC4C11D2134C8505 /* Promise+Web3+Eth+Call.swift */; }; - 982543B875153D03B93FF50497D24361 /* BIP39.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1470FE533DA2633F1A66FDDDB7B7E280 /* BIP39.swift */; }; - 98C459EAEF81D101622627E37AAD0946 /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59DEE9838482282D026880491D6A09B8 /* AES+Foundation.swift */; }; - 9A683FAB2843A7181358FFC2F9AA7FAA /* BigInt-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7319C8DEF058868FAB938FAD22813553 /* BigInt-dummy.m */; }; - 9A76F4002962256CFD034CC3C39BFC60 /* Promise+Web3+Eth+GetTransactionReceipt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51901516BECC0FFD77E736D256965599 /* Promise+Web3+Eth+GetTransactionReceipt.swift */; }; - 9AE3952131E530F55D34A350ECC9B909 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45A7CC7C99E72DAA6B9C339B4B45B6F0 /* Multiplication.swift */; }; - 9BE26641F305F1572E557F19C6ACFC84 /* PromiseKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FA67C83BE43CF3EF9C1E6D2E3989D0 /* PromiseKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9DA1244904AD9E535DFE95EC136A5799 /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B31B02CBA5CE3418CD0D8EF2390E656 /* Floating Point Conversion.swift */; }; - 9E017EE35E02E183B048B58B739A72DA /* Web3+Wallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6CCBF638311206CEFF4108D56E0D6C /* Web3+Wallet.swift */; }; - 9F809ECDE716A3FBDCA8A1940D7C2785 /* BlockExplorer+GetTransactionHistory.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB45C8770EE42F74BECA341A582A9813 /* BlockExplorer+GetTransactionHistory.swift */; }; - A181B697DCE8BCE8DC2028CDFC0DF44A /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 9062B9AD79A1FFCD8E4C3D3BBAD22417 /* AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A1CFFFAE4F7C907C9B0DA0FFF1D94FC8 /* BloomFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF08EF7DB1DC3328291CCE00283F043 /* BloomFilter.swift */; }; - A2D8786DEE0BE917D2ED663FBC245FBA /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D99B05CD6515234D9A52524E78779C4 /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A35C39D02474ECA3DCFBA3774BC0ED7C /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 092FDF7F6A0B07EA5F43A3E8652A2A11 /* BigInt.framework */; }; - A425AB2AFD2A6AC8C9AD47D474E8F964 /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AD2681608D7996F0B97567E76E38B0E /* CompactMap.swift */; }; - A46E62AFBC76EAFED17097838AFC58E1 /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB97BCB1F8ADDFB1DA7B46904EFEB297 /* RLP.swift */; }; - A6149451448E82A46450F264A0C0148B /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A702E196081639CA2834C8EFC66EB60 /* PromiseKit.framework */; }; - A6774EE973107CFC27CFEC8F9DB19B67 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BC92AB3E8B43B6FEFE7AB4748793AE7 /* Foundation.framework */; }; - A6B9BF2F0D5DEA52AC43A9863779A093 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 162213C6C0819E2BC89868BBC891FCD5 /* Codable.swift */; }; - A765945680ABE1A73AAEF33A2D0ADC76 /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A147CC10074D694F4FEDAD5C37A4345E /* BlockModeOptions.swift */; }; - A835BB4E4C19FF94F08394E2CF87FBF1 /* CoreImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAB3F8944868A08EDAFE81B3CE257C46 /* CoreImage.framework */; }; - A83B2E3460B4EE8E9FEF5F63ECC58B87 /* web3swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 43E25994494B329B440C18037489E9DF /* web3swift-dummy.m */; }; - A8DD8450B62755340F32E75385672F49 /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63ECDB3BEF180F5E5465DF3D9196A913 /* Int+Extension.swift */; }; - A9663F91BCC4D24B5094B425280FA3B1 /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 6153FF45F92075AB612127F5BACFD9A6 /* eckey_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - AA191D63396A0B50692FE300FEEEE606 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF4B94ADE36B859A985CE20D9C9B4C1B /* NSObject+Promise.swift */; }; - AA7EAF7137C27D6E369D3F2E66ABCA18 /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A4893E75518CE78AD46F09C2B0BCB86 /* Bit.swift */; }; - AC15ABA398755E9185F250429C92E4B7 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 68CF1A1605BD327E75915D5F85D673FD /* NSNotificationCenter+AnyPromise.m */; }; - AC43CF18DC2953592E51096D0230931B /* KeystoreManager+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14D6ECE7EE1EC56E855EB8089B581FE7 /* KeystoreManager+ObjC.swift */; }; - AC498DEA150B4854494EE3B499B1E74B /* Web3+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10F89C677C577204A26019CC289B1E94 /* Web3+Utils.swift */; }; - AC5459A014B6BDB91F647D9506396B4D /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 27194B847928F8AF60CE9A6A913D8EAB /* Cimpl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - ACD3873A8729ACBD9A6D48054239B646 /* Base58.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82DA4B0181B2D7385FE66132570022B0 /* Base58.swift */; }; - AEDBFB777755AD9680EBA32ADC5FE57F /* secp256k1_ios-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CA9201F6EFC3831E810979D81E598C6 /* secp256k1_ios-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AF7191EC445198351E2396EED989010A /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F14BD8371C5BD953ACEA2EC348DF108F /* Collection+Extension.swift */; }; - AFF9D51A5BEEE7B2E486C5B012BCE382 /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B2D0E063799E56A90B8804B84308E65 /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - B0D1A5B91FD8B2603B6456DD06E531C4 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = B549029F7C08F93F71DBE300BDBEB3A5 /* PMKFoundation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B172A8072454AB83995AF52101B03839 /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CDD0D9B03D820E5086D9498D2D9DD67 /* Padding.swift */; }; - B252621428A77550F451918D3F97E6A9 /* Web3+ERC20.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEB3C1E2A88B6371BC0922D8F50C3B8 /* Web3+ERC20.swift */; }; - B288CCBB9F4B15DBF6A61AEDB921328C /* Web3+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 793565E05F87C940B4D333C65EBEDE8B /* Web3+ObjC.swift */; }; - B3682A183AE01299B9F5D573C85ADF7D /* LibSecp256k1Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00F18ED0F07AAD5FD3142707A5EEB7E4 /* LibSecp256k1Extension.swift */; }; - B514B4E9DB02B1EC4321D62DFA0524A1 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFF38E25FE5AA4DFD2E84286D4EE29E3 /* Hashable.swift */; }; - B58EED51FE023F7BFBA4F002A398A71F /* BIP32HDNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5A8E66DCCDCF6FE84240BC74547E057 /* BIP32HDNode.swift */; }; - B5F5721D6331C7D47FB48C673155A8EA /* Promise+Web3+Eth+SendTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 998D75A403FDA6A5E849C8AD8F7837D3 /* Promise+Web3+Eth+SendTransaction.swift */; }; - B695CE625BBFAB10171B18CFE6CE271E /* Promise+Web3+Intermediate+Send.swift in Sources */ = {isa = PBXBuildFile; fileRef = 099411A4987328A3637E16D55446C7C0 /* Promise+Web3+Intermediate+Send.swift */; }; - B6CCB228AB6B127FE1F963FDF204B2F3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BC92AB3E8B43B6FEFE7AB4748793AE7 /* Foundation.framework */; }; - B7F3D476C87C0EC57139955A579FA3DC /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42BF4C6F2E4A124889A4EF8AF5CEB7D /* Comparable.swift */; }; - B80E8DC58BACAE173A61AB492B89E97C /* Web3+Infura.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC7F30FF1F8C2624985ED76AFEF7343F /* Web3+Infura.swift */; }; - B91A2B90FAC29C5CFE6C9D7083D302B2 /* PMKUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = AAB55717467B6E1C5DC461B186D34505 /* PMKUIKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B9C26ECB4C06E7F7FE1318AC27983A29 /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = BA56A6B6D3AA5CCAABD3A9421FF1FC9E /* hash_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - BA7CF16E10824FD60A7B3706DAF36443 /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0D132AD733102F963CAD5D649C4788F /* Promise+HttpProvider.swift */; }; - BCA8203FBB463DF9AD3618518BBD5D7D /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FC0F0D599A825FC0C5FE165BCB8EB0A /* String+Extension.swift */; }; - BDEC4E13E67AB342D0FA893AC46B51FF /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = E99567F75AA85FF9096F7D24934C554A /* Utils.swift */; }; - BEBA6B8DBBE92B3FABF2089C111896DF /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB21E2AB71A28225AD43E56B69612A2E /* Salsa.swift */; }; - BFCC5A2946BC13B6443A9FE73500D6E6 /* Promise+Web3+Eth+SendRawTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = C78A90EF1AC64CE7665CF433AE31CB4F /* Promise+Web3+Eth+SendRawTransaction.swift */; }; - C14B28E1B085DB351DDFC83187893EAD /* SipHash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F73C2F6E4737EA189FC60DD089E7FF2F /* SipHash.framework */; }; - C1E6617F404FF73114711159F727E280 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E642878C5D7B7E8AAF50ACE887F81C9 /* Array+Extension.swift */; }; - C28EEF13C3B8ADE2E1AC2FAE81CE3BAF /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C0B26A0F1EDE1CDC241622A88F22672 /* hang.swift */; }; - C39334762D97FFDF0ECF60FE78FEE593 /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52989BD6A3046CDEC153D8C28451A374 /* HMAC+Foundation.swift */; }; - C3DC6482055977725FEB1E35661DC0F5 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = A0B29A79F216917DB7C1E8D51E2B29AA /* NSURLSession+AnyPromise.m */; }; - C3EC0248F1264283CA50426408BA59BB /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B0281225D044E95B9D81942D287340B /* AnyError.swift */; }; - C4330EC9FFE7F619BBE73C58778AD54D /* EIP67Code.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03C1C7040F24F41655E6559346C1E313 /* EIP67Code.swift */; }; - C4A159272AB81264556274A5548B1779 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 231D7535BE0908B8FA752378F694AB44 /* after.m */; }; - C4C959076952E3A0AA8004F2C9114CFD /* BIP32KeystoreJSONStructure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14DEE56FE9FEE65882DAFFD2A00048C6 /* BIP32KeystoreJSONStructure.swift */; }; - C5B77FE50F765FE37316981B380DB67A /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 78D5360A2EE87EB571652044CCFFCDDC /* num_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - C7C180C5260E9EC8F7D23F25FF8AA775 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE987122C612CB4F255D6C9980D5D36 /* PromiseKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C835056C3477C1D835D811DD61817967 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BC92AB3E8B43B6FEFE7AB4748793AE7 /* Foundation.framework */; }; - C91C671AF2954E63C3FE6ED9D8DFBB8A /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = E991F14402D14DBCE758C2C453DA2F7D /* Error.swift */; }; - C9A75595DF17AECC63A535838EC2C283 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB8B88BBCDA33902573936676AF560B3 /* NSNotificationCenter+Promise.swift */; }; - CA9CCA3289EE3DE74461144D856EEF8C /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = DFEE82FC5B9EEB2D9735B3D3FFF8E2C7 /* eckey.h */; settings = {ATTRIBUTES = (Private, ); }; }; - CAA2C6EC03DB5574AA1B639894CB338F /* Web3+Instance+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44D07ED0C754D51CF6C2BC1702DD564E /* Web3+Instance+ObjC.swift */; }; - CAE711EB66D527E3FB43776CF276843B /* Promise+Web3+Eth+GetBlockByNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5A23401BDDA896B8128FE62F073EB4C /* Promise+Web3+Eth+GetBlockByNumber.swift */; }; - CAF579CC2CED09FBDCE2864827B8A085 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C73D7AA3EDD90DB64FE84C36BD6CF7B /* BigUInt.swift */; }; - CC4F237FABAA1A3C56E12FDEA0EB705E /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = EF7EB2244879158182404A5CE01A6DA3 /* scrypt.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CD13C27BEF9D398C0055D537003F0206 /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3404310B6A67105860E0486EF8879528 /* Cipher.swift */; }; - CFA040A4AE2F53BF295CF6C7B6266C11 /* web3swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F5893B28387D9A3B3938E5EED54AD58 /* web3swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D04490D6A1E9627156186C5EF0025EDD /* Web3+Instance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17623569C850BA2E2564795979DFDB57 /* Web3+Instance.swift */; }; - D1442524EC7DCB17F235E12B81114603 /* CryptoSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FB2C4AB5AF97836C7414A2306478544 /* CryptoSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D1A3BE9AD8F7459267BF22524FB4E5E0 /* BlockExplorer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98D040F49C5324D284DD9F2514B31740 /* BlockExplorer.swift */; }; - D21515D19013C30F9AD7BFE1982CB967 /* secp256k1_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = DBC471D81098384ACA05477FCAF96F28 /* secp256k1_ios.h */; settings = {ATTRIBUTES = (Private, ); }; }; - D2891D4FDCB1E6909DDE3C6681C6412D /* secp256k1_ios-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 014042438B2D19CCAC6C5F00B1146C99 /* secp256k1_ios-dummy.m */; }; - D465365F819D9514B406031A0C845BAA /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1A1E5950E2319371590A7F1B55689D0 /* CipherModeWorker.swift */; }; - D67F25162A93B2ECBB8B8709ECA66879 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 3952E3A45B4964ABA58E30423D7DA553 /* when.m */; }; - D805859BE5C06581BC912A50A95864D5 /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD29F1C88C4C182E528EFD16775B5E6B /* Promise+Web3+Eth+GetBlockByHash.swift */; }; - D8294366574ADF1B044C1F45C6B917AB /* web3swift.h in Headers */ = {isa = PBXBuildFile; fileRef = 8ABD49EF51122D8FA6197117E9244422 /* web3swift.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D953DA4479CC018FA143BF59E7A5B10A /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6781601E4B221AF8A6CB8901008CD34 /* ZeroPadding.swift */; }; - D98C6A2BF232502AB16A453DAC83E49F /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AB84887CB548044F04C66D21491F30C /* num_gmp.h */; settings = {ATTRIBUTES = (Private, ); }; }; - DB3AA3B2747DE3DA344F88727E0792D7 /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCE7FE3A8096914EF9B8E43AE1000416 /* PKCS5.swift */; }; - DBD5D46970B589C74A1FEAAFFBC1744B /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8270CDEF1F71C3CBE99FC3628AC3EBA7 /* StreamEncryptor.swift */; }; - DC5FDEAAF77A7BB4CB1E87E269C37A3B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BC92AB3E8B43B6FEFE7AB4748793AE7 /* Foundation.framework */; }; - DD1B78ADC6B14B7065DF312FFE9789B3 /* Pods-web3swiftExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB41387E485225E0BC8B079979EEF3D /* Pods-web3swiftExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DDB1F3EE512CBBBDB4E5558A671BEADE /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = D0A9DDA2F0156D188BEFF81EBEE38903 /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DE1D91B2EBCECAEAC4D480323BEC3039 /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33D1449C4E8D84E0AC0DA60599B0DA23 /* NoError.swift */; }; - DF98911B0F87E37CA61A850651CE7EFE /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = F87BEFD39CCEE24503E65946D2C28F34 /* GCM.swift */; }; - E2D009FA4672CF59190FF304D3BE9DD3 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = 47EE1AE862AC1E08A3510AE8A3ACC49E /* hang.m */; }; - E2EC13D1D28147E49A3BDAFE275449A6 /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 926206F9931948DD8CBFD7D9EABD033C /* secp256k1.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E2F49DCF776B189057E13990400C3EA8 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A25076F49F8EC969977B47A3D270973 /* NoPadding.swift */; }; - E4DF114E5136E741076C207866A9C4FB /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D4795A3312AFD3CF4610B857D57F0DE7 /* PromiseKit-dummy.m */; }; - E59381DB612E6B78B65F96AE31017C45 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FBF4238285101EB5008F25E7C17DB9A /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E5FB91E5633F83EE8FB95C47EDC318C5 /* EthereumTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5628BB0370E6607CB7726B6ED62CA7E7 /* EthereumTransaction.swift */; }; - E82F15CE10FE5291F3346A78F11EAB71 /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273095CE17C51A9F55E72F26385B33D1 /* BlockDecryptor.swift */; }; - E8658C4D90A1C534C6B834800E5F0CBC /* Web3+Protocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCC2FE29E9996BD207285015889B3279 /* Web3+Protocols.swift */; }; - E8CA9824DFEFDBE5FC430276A237F97B /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = F97510E9053BA812A0D125583C319128 /* Data Conversion.swift */; }; - E9A859662335ED59C23A2FE20A4DCC17 /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0673406163739833CEECFC5634FED4CF /* Guarantee.swift */; }; - EA13ACA8F3D959E99B0316C7DCE512A6 /* Web3+BrowserFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A48691ED7AB66A35E08ABFE8367B7EC /* Web3+BrowserFunctions.swift */; }; - EAFF20B5047C8A8ED96B861E71AD86D2 /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = DF874BF9CCC77EB83F09D12A4308C68B /* scalar.h */; settings = {ATTRIBUTES = (Private, ); }; }; - EBDB217F6C107E06FC5E19EFE340F40F /* Web3+TransactionIntermediate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D88868F549DDDA1E4CA1095EF79FAC5 /* Web3+TransactionIntermediate.swift */; }; - EC76C253793BBAB13A244EFE1A98619F /* Web3+Methods.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5114E6B22DBDF708ECE7C3019E5D6106 /* Web3+Methods.swift */; }; - EE851A358B5CFC5DB55B649D4E0F6817 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC3E819145FD9E56DA10F219A9155D0B /* String Conversion.swift */; }; - F024A5E674F3608FC07B7002FE0FB19B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BC92AB3E8B43B6FEFE7AB4748793AE7 /* Foundation.framework */; }; - F09F00F07E2F895F0040C7708F92DC3E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 017C3C0F878AD51DED5CBADD10EF9AA8 /* UIKit.framework */; }; - F0AC9F138AA0272B3B7812346EDAC741 /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB5830DCF5BE1BC265D8673C39D6ACFF /* PKCS7Padding.swift */; }; - F0AD6AA66BE6563C90F264D8FD5CCA6C /* Result-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = ED2C60159DC5CDC64E9C76793B692956 /* Result-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F0B763BBACB1D83893F9AC263E2E94D5 /* Web3+Structures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E5FFF2ADF7334E4256CFC9542594671 /* Web3+Structures.swift */; }; - F1631F5F7CD77D9527E4FE5EEFBCEB3D /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C1E8D67E7B36A868205B54D0DB924D /* BigInt.swift */; }; - F233ADB45879BE0E7D45D336AC885F0B /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F85B21BC57EE24795630B658B179F0 /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - F2C1FF8D84B769BBAA2774FC9089B6F9 /* ABIv2Elements.swift in Sources */ = {isa = PBXBuildFile; fileRef = 783C789DDF22F7B1CD81D5223F61B0AD /* ABIv2Elements.swift */; }; - F346DB25333CE75BFB18C6593C562037 /* PlainKeystore+ObjC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41455399C8B4A289650ADB5856F86D5E /* PlainKeystore+ObjC.swift */; }; - F3A20CBEDEBAAD24FF1C6EF6A14CE368 /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 7AE9359608C045D06EB2204BF13F3E78 /* lax_der_privatekey_parsing.c */; }; - F41DE1A38B6ECF011127CC2F18B8F1E5 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 880358145E7B982F9FCB5D316EB4DAB4 /* Array+Foundation.swift */; }; - F62CB020347D65CE57D6CF01B00D84AA /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EAC8681CD7621782E51E812332E796A /* UInt16+Extension.swift */; }; - F79164F06C90C81A48EB83EE0AB5F761 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98A2FBCCE443F266993B3935B6D04F58 /* SipHasher.swift */; }; - F82E45B3F844F330BE4BCD8AA537A44A /* IBAN.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C1AB9A135AD942B8A7A7B281141EB93 /* IBAN.swift */; }; - F8995F2D7FCB6539E22F9945ED840B36 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B27AAE202915C26D30FF0AB6D511C2A5 /* Array+Extension.swift */; }; - F91993F3FEEF2D1D11275BDC4C02F88A /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 569540840E89CA743338311B4EAAC218 /* main_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; - FAF78D494C90276099BA6AA47428EE5C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BC92AB3E8B43B6FEFE7AB4748793AE7 /* Foundation.framework */; }; - FCC4CAEEB081254048F9F8EAD95E0B08 /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E13296A1B1E4B39699423E4D419FD51 /* Generics.swift */; }; - FD62D2BEE5596C80F812988613AE3192 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5CFD5714E4C2267C41E1D20D96A6432 /* Result.framework */; }; - FF4D62310B934389B147868EA7D5E720 /* Web3+Options.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A402FB6C488D91DF67F023381022997 /* Web3+Options.swift */; }; - FF8D6F9246B91602A6510889F5AC7A37 /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 206FB0DA1ED8B1EC1C34CCC55E7D0E38 /* CTR.swift */; }; - FFBA8696A49B49BA33D1499546FCEC58 /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF4AB01A6E765207693D4AE0D5902553 /* Shifts.swift */; }; + 00D63A39FF4BCFF87172262A842DF6C1 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = B973550AEC743886DEFC6C426DE82DAB /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0114776105F37712925C78AFD61BB3C8 /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FC700A80452B10ACF64DF1C457425C7 /* AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03FA8EDEAAF28C2F20B6134374C42DAB /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37505D43721EBDF655CBC34F90544D5E /* SipHashable.swift */; }; + 0485DDC0DDDFAD1E8E278AD9C56EC1B4 /* ABIDecoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = A91B7CF43DB5A3F74C857AAED6F948BA /* ABIDecoding.swift */; }; + 048D1674FC2E4B4E9A3FFD4670FB476D /* Web3+ReadingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE647B348F1A393A971238BA674A6485 /* Web3+ReadingTransaction.swift */; }; + 049D031BED9DADA0C433EC8B51B9128B /* num_gmp_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F1E867DE919C0E595D36510EEFE1A6 /* num_gmp_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0627DC84943C9B21BBFFD77F73ECE3AA /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = B93028ED0430293C54D4CC1E7348092E /* HMAC.swift */; }; + 077140AE43E4559554657C3D38B4D8D1 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4B692E5A925A941AA99C0BCA964506 /* NSURLSession+AnyPromise.m */; }; + 07CB80647C63863F46097ECFE0E2852C /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DC0180CECBE311366353C47A894156A /* UInt64+Extension.swift */; }; + 07E55C4B3E245C156E30DF5CAB44BB2A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */; }; + 088387733523D1CAFA7D4DC267EA4433 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21F7A460F24CED1DC6B614AF917C234 /* Strideable.swift */; }; + 08BBE3B0A2885A94DE68FEEA9FBCD256 /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 385D20AD0ACBC7A4B01C25373D9EFAD4 /* Array+Foundation.swift */; }; + 099726630FECA2EBB07D4AD11FC8AF8A /* EthereumABI.h in Headers */ = {isa = PBXBuildFile; fileRef = AA756D6EB06FD36B25464492744519A3 /* EthereumABI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0A0FBCAD7A1F908EF9B1197FE8BB63D2 /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51B1F68A1905071C4890C6F9B2280237 /* CMAC.swift */; }; + 0AA7233700BDC63D25E5E63F0442F3BA /* Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C85B8AD6FC929A0DD4ED8A7F71D777 /* Web3+TxPool.swift */; }; + 0C207CA7D0D22965127628406E3A90B7 /* Promise+Web3+Personal+CreateAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 727727B1D330C3E96EEC5855430FB9E5 /* Promise+Web3+Personal+CreateAccount.swift */; }; + 0D32A5EE13EC8FB94162257D12B47954 /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBECF12FAA0EF5E875B62B00A7B4DA50 /* PKCS7.swift */; }; + 0E7DC8600622ED2E0516F25A9F51C903 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A29F00A814D897C1BE5AE6DE5E89C998 /* Extensions.swift */; }; + 0E8865F19ED08938AD447CE3EFEB6164 /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B058F1081CD1680F4F90724970E88A /* Checksum.swift */; }; + 0EAFFDE720BC075EFD8024E130A3F583 /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6B1FFA44C64B0B540B94FEEE1CD9B0F /* firstly.swift */; }; + 0F47AECED76239456F530A9F34C202AB /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 354A0764BBE4CFAD623CB810FEC76817 /* PBKDF2.swift */; }; + 0F843C702EF22858E3BD92556B4A53C6 /* RLP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3705B10251AF105DFD9C06CAD8BF008B /* RLP.swift */; }; + 0FB2C7EB657123B46C1E183E33FECB71 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = F52D61D44F96B6B6F0BC62D02E5235F3 /* NSNotificationCenter+AnyPromise.m */; }; + 0FFB9D7FCFCF67380D2E03C1CF3D31C6 /* Promise+Web3+Eth+GetTransactionReceipt.swift in Sources */ = {isa = PBXBuildFile; fileRef = E16927F5D553D8A1B33E94ACCADB17A3 /* Promise+Web3+Eth+GetTransactionReceipt.swift */; }; + 0FFEF56AD88BA2B49BF3F4C06AE60C90 /* secp256k1_swift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E28680C25D59F4AB8FD5D60B2209576 /* secp256k1_swift.framework */; }; + 10C957749713BC793603740385D0626B /* ecmult_gen_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 98FDE7A709821277AE5CCEFE2CF7D0B4 /* ecmult_gen_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 11155D066240AA9BCB5FB19A8915C253 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACEACA1521FDFD79ABA9485C777E5887 /* GCD.swift */; }; + 11C436F48BC5B99CA9B122D6653E7986 /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD643FEB508293D31031F06D61BFEDC4 /* Promise+Web3+Eth+GetBlockByHash.swift */; }; + 129F0091AD9F73727DC021D80D9AE867 /* field_5x52.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF8AF858508A3EC73D766B1CF48098F /* field_5x52.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 12D7EAE6F2CEC81702FD70455699210D /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 385A9A999974E47DE373D35A9AC29663 /* UInt8+Extension.swift */; }; + 13E900B217EB7AABB8685EDD051A97E5 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEACF2F1C7BBF71EA318C326FC4FA52 /* CCM.swift */; }; + 14A6030032E12C1B957F620FECF742EA /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB48EE8796E94C776DE21E16EC425E02 /* Digest.swift */; }; + 16825050009C6130264514984322E53E /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A706CB0950B86EBBB4A53A66D0BB57C /* fwd.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 168831EA2809233CFD6E98640D126804 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155CFF09263570C89932D22E5B5D569D /* Operators.swift */; }; + 168E8B4DAC99CB82C85DB4B08F34DC85 /* scratch_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 05625082EB748971627BF6E1ABEE72BE /* scratch_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 169B55A24D3FDC159B797D85588C8A34 /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22F727E1920C23DF6FA25C828FF37AE0 /* CompactMap.swift */; }; + 16FCAA2982615446FE51C6848E852E22 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4039FF96173F8D1FD541617AFC84F660 /* Data+Extension.swift */; }; + 18704C29935E06F5FB353933C7B93897 /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E04CEFD47ECF7B1AA7B9BA50AF1D68E /* MD5.swift */; }; + 18B9BF798396486AD4D880820C7B8FBB /* PMKUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B27CD8CF6389981C93F9C70BB79806C /* PMKUIKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 19EEEF4225421C0F5F4AD79A1DD4A7B0 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1079CE813B6ADE402DA1A75AC3BEF4C /* CryptoSwift.framework */; }; + 1A3CA564761B01FC3D99DFD8EBD833DE /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35FEE3FDEE40F28DDC2613F215AEB8CB /* BlockModeOptions.swift */; }; + 1C53AF4113DA6608A4B207AFF139039A /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24D4D47D06AA22BB74384BAB9BAD40F2 /* RandomUInt64.swift */; }; + 1C6305612C71BA4A41EA3EE86EF9DE98 /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA29F25C6AD9C57F2F030CC8D4401411 /* Addition.swift */; }; + 1E0ED79B5B4B52516424062B25A8985E /* KeystoreManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9EC47F44C823E1171CF73606A494D29 /* KeystoreManager.swift */; }; + 1E5F371419521861C46DCF9701C977BA /* Web3+Contract.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F697DE9A9B9780448371273B4B4986B /* Web3+Contract.swift */; }; + 1EBAC8CB64B0FAC21B0C3B2BBFE3258A /* num.h in Headers */ = {isa = PBXBuildFile; fileRef = 075236A3B5DC60B4370A0CCF672B8AEF /* num.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 207A6AA7B3964F426472BCBBAF43B4C8 /* eckey_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 099F776D5862FBF1C32451630511200D /* eckey_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 20E69749F66B1F259ADE99CE77510E86 /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AEAC26BB970A98BAA6CD7B30F5094D2 /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21EA3B70F882771DE5E71A78762F852F /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32380EA4D124B8A636BC9118466E6AAD /* CustomStringConvertible.swift */; }; + 22CC7BE1DDDB6F839A68B21F60826BC3 /* Web3+Infura.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABEE70BA5A5BC35C34D6C5DA8EB13409 /* Web3+Infura.swift */; }; + 22FE67B665841A937E8D95D9DBCC7EB7 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B77A44FBD3FAC28057C1887CC92B27D /* Bitwise Ops.swift */; }; + 23916C64C98204C928896ABA4BE1DAE6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */; }; + 23BA112C655FA27BE38C9C321EBD3A4E /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97FD3BB1D4FDE3CB8C92B9757CADD731 /* Cipher.swift */; }; + 250AD1DEF6E70905E0B2C85ADC0712D7 /* TransactionSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A274CAE3C49CDADD2C8EDD0B6A2D5EC /* TransactionSigner.swift */; }; + 251860F28AD7FF23ECD15AC4C77CF1BE /* Web3+EventParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9833899028708E6BF26F6D1610FE1997 /* Web3+EventParser.swift */; }; + 25C1D1DA3E2730A7983A6414FC4656FB /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1079CE813B6ADE402DA1A75AC3BEF4C /* CryptoSwift.framework */; }; + 26F636BA86A94182E5B3D4B6371B7990 /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8022C2DF6B86FA23296F8458F4E400B /* CBCMAC.swift */; }; + 287AF814872A1828332826075A3A769D /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF2F5DCD8B1BC4533ADECDBCF836DB84 /* SHA3.swift */; }; + 288250141FA353726E30472933B3E9DC /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35B6B8F8751FD986339B26820E401B42 /* Prime Test.swift */; }; + 2897474ABD1023E8A37E6EB9792CC661 /* Web3+Eth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E507073C6A899B5150C313DA3E1E7FF /* Web3+Eth.swift */; }; + 289C18B312DFEDD4B704A7AD3EFCC360 /* Promise+Web3+Eth+GetGasPrice.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCC1EA2773146F4324EF5ED0B3A3EFE0 /* Promise+Web3+Eth+GetGasPrice.swift */; }; + 28A68791268A1C0C4CA0178CD44543B3 /* SwiftRLP.h in Headers */ = {isa = PBXBuildFile; fileRef = FD94AFA068C1AA0B75B12B723463561E /* SwiftRLP.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 28CFAA3F415F6AA26FE3A81387558344 /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0D72FEDC647B6917B3AE77954B91EF9 /* CipherModeWorker.swift */; }; + 2ADD61CDA6604966DA306959A92FA086 /* ABI.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9035FEAF1C6A112A846C1686B6AA6AC /* ABI.swift */; }; + 2B26146875465DF9C2D78472B49E3305 /* EventFiltering.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF166364A9E5E97DD45519B5D546ABE /* EventFiltering.swift */; }; + 2B3D97CEDF72234F8338DBA2A776981E /* ecdsa.h in Headers */ = {isa = PBXBuildFile; fileRef = 168BEA0C8F8B3C8FA1F18A535A7B9160 /* ecdsa.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 2D53A0E8262E8D0AC71AB6341961A9F3 /* CoreImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1523249C10D0B6DDCE2D75CC807474FE /* CoreImage.framework */; }; + 2D6F68A3EE6AD170EDC30E7485B54524 /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFF0D31D5922EBAD0370E98046E7CC48 /* PKCS7Padding.swift */; }; + 2E3A0CE83A9DC669521D768D83113007 /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F90EA173730B99F47DB58B7C701FCE6 /* NoPadding.swift */; }; + 2F19C94428DBF3FEE892C3BC9538BD0C /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66FBB836159737A49CA20283E62CA819 /* Catchable.swift */; }; + 2FB075849D825ACCE5D39FC1134DDA52 /* scalar_4x64_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3028289D562E89D58F6AB987E4AA0EDD /* scalar_4x64_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 31FCEF8F13F00A6EB5C8E43CD2040D52 /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A82F53B0EA3D0D57AFD5CD4C318D0647 /* PCBC.swift */; }; + 341666F42728D7D66C5E013E293951E5 /* scalar_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 18C24CF8C724DE2F030E4429AD7EF3B8 /* scalar_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 3460C937428BE40A5EB9AD6BE6D3B650 /* lax_der_privatekey_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = D78C0BC324759D084A8384179425BF47 /* lax_der_privatekey_parsing.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 34B17DF22062E35B740FA4AA29300ED0 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = 721C4F03AEEF9F7B6768DD8E1133971D /* Division.swift */; }; + 359390E3E8AB281E3AAE339BD7C2D89E /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87DC9E0219AEBCFD0C11561CB1F75C69 /* Resolver.swift */; }; + 3619B989C2E488056B62E7517BF4CCCB /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9574EEF332F3955B7C581226D05FE23 /* SHA2.swift */; }; + 36D1F27010F6E0052132BC35DF1E9B2D /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16D7549432B0837431D33DAA92B9633D /* UIView+Promise.swift */; }; + 36E5BB58E35F3EE126FD2E7F78B0C712 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 388C6DA468CB9B1A2BD750A77262C56F /* NSNotificationCenter+Promise.swift */; }; + 373BCBD3BAFD4EEF405BA6A4B1DD206B /* SipHash-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F31A6E839594AF147029FFDE446D65F /* SipHash-dummy.m */; }; + 3762DF18DBCA1CD6327DA092A53FD656 /* num_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C422A86A1DAE9DFC19D7BB256B774 /* num_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 37FA075C16F67C2E4B98C4D34A8C00E5 /* EthereumAddress-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = BD07049E8559AB824237ADD96BD4AC9B /* EthereumAddress-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 382BA96CCC1E7E7B0927C453432C342B /* ABIParsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645B2C2B288B7EDC7BAAE3C5A2A09E04 /* ABIParsing.swift */; }; + 38574512C2CD6A6CCC91C1E9F1624749 /* Web3+Wallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9CEEA6FBF391E65A68E60592882B642 /* Web3+Wallet.swift */; }; + 385AB966428941407528ADE1B373C119 /* EthereumFilterEncodingExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F64296999AC33A5090DFA571030C3B3 /* EthereumFilterEncodingExtensions.swift */; }; + 38B9C6022379E050848456D78C1908D1 /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4122BE1E9FD4A604314CE85B4CDFAEBF /* Scrypt.swift */; }; + 39D3E32B3C0AEB691E5FECB13A908C30 /* eckey.h in Headers */ = {isa = PBXBuildFile; fileRef = 45AA16F4A39E2367C4A4059E1314661D /* eckey.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 3A73C66F10621ABDDA6DA99B83737FD1 /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB7709D38F697152E97ECE038ACBA80E /* ChaCha20+Foundation.swift */; }; + 3C55B3F8AC9C9FD5E72C85864D127009 /* secp256k1.c in Sources */ = {isa = PBXBuildFile; fileRef = 4673A58E053194AE130B84DD19ADFC40 /* secp256k1.c */; }; + 3D9E0EC94604238F4D837E3E7E9CDFDA /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88C864BCF6B7DF8F59711FB0F71F60BF /* Guarantee.swift */; }; + 3E4F34CF3A56C3BCA61A15667B8911CC /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2DC451DC974D25FE7B1FECCA9C6EF51 /* SecureBytes.swift */; }; + 3E531578FF1145393154092B38E896E6 /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89BFDBCFBC87AB9A6017F91C16B27016 /* ChaCha20.swift */; }; + 3E7B3566E3CC285CAACA093A9832E526 /* ABITypeParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4174025F0AA7FD9B02D3F2F5E4F617BC /* ABITypeParser.swift */; }; + 3EE92296A5FCE627C62A030E30676D49 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1079CE813B6ADE402DA1A75AC3BEF4C /* CryptoSwift.framework */; }; + 3F731C8AD9AE9A8E29567EB2DEED4E53 /* secp256k1_swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B6C8DFD047D7C6E855F9CF2F1A3AD7B2 /* secp256k1_swift-dummy.m */; }; + 3FD7EC703639AE284EF9ECF6278211D7 /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F8FBC6FA4567C651C24DACB88FAA458 /* Promise+Web3+Eth+GetBalance.swift */; }; + 401FC3DD2EDDB48484C0F58DB376C436 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 277E6BF4D08FCCC20EF73C9BA37B6AB8 /* Configuration.swift */; }; + 41BAB1AD1A86E1C6887B9B4E51062334 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 1400B4F7ABDE02B5070690E0E3F0F034 /* PromiseKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4244DC847B46A7C3702021C52140C539 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF16F679ECE9C4841106CD599F60C4E2 /* hang.swift */; }; + 432A59F5503460580FBF047A2E95B403 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FBFE3F22B4E7AE72FCC6A2C5F9B20E8 /* hang.m */; }; + 43A213F845B41C54A0C6E74E216D28E5 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B0FD4ABBB0CE03A9B8551B57E7B20F5 /* Random.swift */; }; + 44CD2A9B83122B52B80E91DD739137B9 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 481105AB5C9354EBAAB3E816CFBF3D9A /* NSTask+AnyPromise.m */; }; + 45BF4E826F20BB6B80DA1656194C389B /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBDB796FB0F17282181E75EDA52E42 /* after.m */; }; + 469E4F38A99F2B1AF8F354AC44AE3683 /* SwiftRLP-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C47EE1AA0C0CE661EBC27D485F20EA3 /* SwiftRLP-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 47F09AB386ECB4F06DC94B5D84B829E3 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBFD45FE4B26112E398EA7FD68047322 /* Utils.swift */; }; + 486AE96A069EC0BAA1E35FE79194A25E /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72A31D2A6C2335199394826F5AB60411 /* BigInt.framework */; }; + 48AEAA9AEFB46AF33C359BAB88AEC324 /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25FC19565DA49D793DF9A348F223CB65 /* BatchedCollection.swift */; }; + 49D9F7F3B2F1AD0781104D1902298F85 /* secp256k1.h in Headers */ = {isa = PBXBuildFile; fileRef = 22AB1F2D4F1253D1F55214A8B4A078B5 /* secp256k1.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4BD49C6CEF3E4405132B4AF8CA0DE003 /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F8EADC5334750EDCBC7BE9F4D4D5B3F /* BlockEncryptor.swift */; }; + 4C2FA74837ADF9282EC82AAEA3344905 /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8117AC67014669B1DCFA347AA29688C0 /* Cryptors.swift */; }; + 4E4587C763B65AFD2E81737172773A92 /* EthereumAddress.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 941616C02C90CB37792EE5D074B65DA4 /* EthereumAddress.framework */; }; + 4F448640DE2AB108DE676C77DEF2E571 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB40B5423FA265392DE07B1A21090637 /* String+Extension.swift */; }; + 505CA5BFBA1D9ADF951C40E1EA125BD2 /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5CDE3B4FB757B3F0106FD88431B923 /* BlockCipher.swift */; }; + 50AFD0EF968A999FEA7BEE127440BB48 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9A23377D2BCFF84DA71D73288B88475 /* UIKit.framework */; }; + 514821AC03DEAB80E61FD438FC0CF126 /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D25C0FEDAE45115E5198FD4CD0052A48 /* DigestType.swift */; }; + 51AED1A3AE83C5F80B343D8AAFD494A3 /* Promise+Web3+Eth+EstimateGas.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B5D413D46DFC82B6CBCBB8C5DE7CAFB /* Promise+Web3+Eth+EstimateGas.swift */; }; + 51C9BF2681C879F6790B674806626C9B /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4D9F2707B320173226689A2ED924509 /* Promise+HttpProvider.swift */; }; + 5211E62A23DC79810DF988EBD96EFC32 /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57DDA8DDDF0407F9774D0CD39E20307B /* CFB.swift */; }; + 521929B74C540A89354F6B479324C9DA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */; }; + 536729423F27A0C8C10588505FBD0680 /* BloomFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BCF26ED236D1B8E24321ED226B25DF4 /* BloomFilter.swift */; }; + 541EE41CC83131708FC4873E24EB6813 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1DFB901CA995F41CFDED832B5F38D3F /* Subtraction.swift */; }; + 545072A7AC12349191FBBEFCDE711892 /* EthereumABI-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C2F73E4913951241E69AB369E29AA841 /* EthereumABI-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 54737940C4BF6C198B0B08F053497650 /* secp256k1_swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6376866618A41A278BF5C4477B074CD1 /* secp256k1_swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56573858613F4A2156E0F148A5258D36 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = F2EAAD5F932A97EA7947E900D8C2CC52 /* UIViewController+AnyPromise.m */; }; + 574B700620BF7CC0B73445134713E7AB /* secp256k1_recovery.h in Headers */ = {isa = PBXBuildFile; fileRef = D45E969A3BDBBB4ECBB6299F26380AB1 /* secp256k1_recovery.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 58D378DF3FF9C2C523F72714F028BC18 /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = E45FD0470EFD84FE77DAB6F17417FD48 /* Utils+Foundation.swift */; }; + 5AAAC38308E507E5B37AA6E6072EA794 /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 810C0B92B1AE41809192BF5012A4A523 /* main_impl.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5AD030261435FD98FAF7431CE885864D /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 152A06BD6C4ED16E8910C53F87083FE8 /* afterlife.swift */; }; + 5ADF45AA07583F480A917C3F34118118 /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 294830F3AC6CB12044834E8F72282F23 /* PromiseKit-dummy.m */; }; + 5B5A1021C78EDC5EB1216C03C6B3A3E3 /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF5183A837EE103D3ED61CC8E3B718CE /* AEADChaCha20Poly1305.swift */; }; + 5D5489F38221F4707C34636CCB7D4963 /* field.h in Headers */ = {isa = PBXBuildFile; fileRef = 69A7034547608D113E9F306249220251 /* field.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 5ED753E367A75BE0055D8AADD86B71CB /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04BC19C035A8C39D5226D8BEB0149F0E /* Words and Bits.swift */; }; + 5F1B861985BEFCD8A263ED54264B5543 /* KeystoreV3JSONStructure.swift in Sources */ = {isa = PBXBuildFile; fileRef = AADCA6CCD158303369C205F70D9E4590 /* KeystoreV3JSONStructure.swift */; }; + 5FCE918F81777C227E72A6C620FE0E9B /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94A37DAF9BE9D2E3331448A566C065CE /* StreamDecryptor.swift */; }; + 5FECFB6E129027D7F9AF207C8D0C6BBD /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A8DFF2DF324A4D832DD8653C502500D /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 60A5148C3B21CBB1388633419E789AE6 /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = E1F617E29052F2A20A4DAF46197559BF /* race.m */; }; + 60D03407C65DD41B77633BEBA45350BD /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8F50F7F0D2F6591B93604E8BB87992A /* Square Root.swift */; }; + 60D66E712C47DC1056912A4E77CE7B6F /* BIP39.swift in Sources */ = {isa = PBXBuildFile; fileRef = E37C1C69C98C58ABCDCA9F4B01061D0F /* BIP39.swift */; }; + 60E46306ED1B3A25049772CD775BDD49 /* EthereumContract.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91C4C863E4EB75ABB3E8474227D40A73 /* EthereumContract.swift */; }; + 60F020078907CC571799F8EEE8657FD0 /* SipHash-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 886FFD1EB7FAC82F55796B76AF70F059 /* SipHash-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6455E5C95FBD128A03567A452875A037 /* Promise+Web3+Eth+GetTransactionDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = 010F596FBEF9CCC63191ABD3376144DD /* Promise+Web3+Eth+GetTransactionDetails.swift */; }; + 6558636833F1C0D47A09F6C39FD48D3F /* field_5x52_int128_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 16AC0F8318A1676FBF02362F4595CDA5 /* field_5x52_int128_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 65D4A5CFCCD7ABBBCA0E9E2CEE10CA62 /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCC16B752DB521904FDC01E24FB27FEC /* CBC.swift */; }; + 66919D153FD4C36C6C0FA23311C4DF2C /* main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = F6F09A34FF7ACDD387EF421282DCA54F /* main_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 66FCC04FCEB5CC2EA4BFF087187158B8 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9430EC53743B45700079032E4A105EC /* Array+Extension.swift */; }; + 68ACC882FF1859C30606FD4785F5B60D /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16B862B079586F6EBC6B4D190AC2686A /* NSObject+Promise.swift */; }; + 68FA51BCE2078F888E11D5C9367BBEE7 /* Web3+Personal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E005CD6FAFA3B7D23F16DCFEE03883E /* Web3+Personal.swift */; }; + 69E6BE13070187CED87503CD613CAEE1 /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79E721B30BBA223BA90A171B31127B5A /* Integer Conversion.swift */; }; + 69F3796EA98173349F573767FA9D96B5 /* NSRegularExpressionExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1E7E3D26AF128FB9F5B65F2975134E4 /* NSRegularExpressionExtension.swift */; }; + 6A9CD001990B462354A83330FBA0EC45 /* BufferStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F8DBA32491646170BAF7A1ED104880B /* BufferStorage.swift */; }; + 6BAF17172CADEE179F681B5E21E293C4 /* Promise+Web3+Eth+GetTransactionCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE20423192DCFD6A61AC3EC0E1210470 /* Promise+Web3+Eth+GetTransactionCount.swift */; }; + 6D29054961223E11C2A32A32032F38A7 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 4754D5FD3244548E259E3E0F25D01E84 /* hash.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 6DF9FDAB9C7F26B557B3A0DA94578241 /* ABIElements.swift in Sources */ = {isa = PBXBuildFile; fileRef = 421A57EB83513643E294B2EABE8B0200 /* ABIElements.swift */; }; + 6F2AC95CC89CE8DBC79A6076AC891E51 /* AbstractKeystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC529C712D847E1520FC99E66853D5E2 /* AbstractKeystore.swift */; }; + 6F6C871948F22A9D109DE34B8388488D /* Pods-web3swiftExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB41387E485225E0BC8B079979EEF3D /* Pods-web3swiftExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7044BEFED772CD5C713B2A696EB5677C /* ecdsa_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 90DCB2D73690221D1C386B46FF12ACD8 /* ecdsa_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 7154FAFB7DCB6C047A6C736C3529A641 /* lax_der_parsing.h in Headers */ = {isa = PBXBuildFile; fileRef = 82D6B4BC9796460A18553C2F38C8AEE1 /* lax_der_parsing.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 7199AB4B0415FC2D3FD6E5331A35B839 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */; }; + 71B9B8543875E4E32E42B4A9A1312C01 /* BigInt-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 77CA60485E13EAE74EE80CFC886BA2AF /* BigInt-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 72541048B150E29F22A0CBD388ED2ABD /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D4E60A3BD0A901CAE33DA9F09585890 /* HMAC+Foundation.swift */; }; + 7333A61491547B0B8DB187069AC30533 /* Web3+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A35C0ED9C1391857C58C0CF40B765953 /* Web3+Utils.swift */; }; + 74D763735BB92705D8495572A7991704 /* lax_der_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = DBA7F751A89D1E1C5D62E2BADD1420C4 /* lax_der_parsing.c */; }; + 75968482BFB1B3D0EFADE99502D2052C /* IBAN.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93F9F961FF5E739D6A27BAE1B6B84255 /* IBAN.swift */; }; + 78DA7D99279407A7B5E752BD06003068 /* Web3+Eventloop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46C0D5E07A4C170FDD09AB0EB76EF331 /* Web3+Eventloop.swift */; }; + 7950CDCD0730EC4DE69E4452A2117CB4 /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26C2B3575B317F9C06CC8F79AFD07293 /* Int+Extension.swift */; }; + 79555D854C8AC2FC8E9818C8F3710324 /* Promise+Batching.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20F9F737EDFCFEF9830F0F4B621D83E4 /* Promise+Batching.swift */; }; + 7A0197B22900E1FC916C4464F5297A84 /* Web3+Methods.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F7AB407FF50CC1C82BC47E27132E3F0 /* Web3+Methods.swift */; }; + 7A1FD4C579FF7D9ED23F135FB6110673 /* RIPEMD160+StackOveflow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64E4ADB46AD6A716EBE5FEE6B3F98341 /* RIPEMD160+StackOveflow.swift */; }; + 7A65AA9F003F126626392DE935CA763B /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DBC29B166EFED583208F516850EA2A2 /* AnyPromise.swift */; }; + 7B049E9067D1408E7475C04B2522BF1F /* PlainKeystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = D94B4FB5E11583412D053DB2C819F58C /* PlainKeystore.swift */; }; + 7B50A0E57C8C0F860C0E2D3E2DF889C5 /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 075602E81E3D61E019C955BD6AE18C7A /* OFB.swift */; }; + 7C84DBA654289A1BBA492EC46B233D86 /* Promise+Web3+Personal+Sign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8075D0204E7F5BE1CEA87D03F0556108 /* Promise+Web3+Personal+Sign.swift */; }; + 7DF26B5CC31B57CD332F926B91A1C24F /* scalar_low_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B3438A6ED71C95FBB9BB471E36AFE4D /* scalar_low_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 821C63EC05763CA91EEB51F9F66F190C /* field_5x52_asm_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 74569BCFAE1C489C9D0FE3248C5CED66 /* field_5x52_asm_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 83B5BC56560C7D387AA427415CEAE05C /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DCCE88C733379B0F9674C1D490BB9A6 /* BlockDecryptor.swift */; }; + 8413BF7A30C04021BED6564D4B77738C /* ABIEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = A563044196C737C050B34DF39F82E85F /* ABIEncoding.swift */; }; + 8440A90B8FBD27B2631A55E10CF96144 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4C09212026736ACF8C3588C3DFFFBAC /* race.swift */; }; + 84AD9AA7FCDCF491E5F839BDA9E62923 /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645D691F588C30A8463CBB40081960A8 /* Rabbit.swift */; }; + 860272FAD4E2D035DF10AE20A552ECD6 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3E1DF0961FF3DA091383DEC4B479CD4 /* after.swift */; }; + 8618E2984BD34989758334ED52615C62 /* Promise+Web3+Eth+SendTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C42893B8A27DCD6134EC5FC2D07657 /* Promise+Web3+Eth+SendTransaction.swift */; }; + 86386DAD1D84EA856F9B41DDC716BB96 /* scalar_8x32.h in Headers */ = {isa = PBXBuildFile; fileRef = A15E042C8396D13ADB12383453C3B15C /* scalar_8x32.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 87AC0B08AE309F77437612D531B5104A /* scrypt-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D31BE63B1625607EFBF7B6C4BD62A81F /* scrypt-dummy.m */; }; + 892CE74F3E4A889E6F69425C79DD7E55 /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD71B2AA6261C81D5ABF5F0265397A1C /* AES.Cryptors.swift */; }; + 8AA4F289B20DB86C6D5CFC0551222C48 /* CryptoSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B575CEB1C724F85E4A1857AA0042309A /* CryptoSwift-dummy.m */; }; + 8B0EB0888995D3195D41D8FEF525C966 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C63E5B7E9EA6F822D6C2F402AAC2856 /* PromiseKit.framework */; }; + 8D50304A146D00984E177A1B0C3B77A6 /* num_gmp.h in Headers */ = {isa = PBXBuildFile; fileRef = D3D1AAC32C041B5712F196A61F5CA39D /* num_gmp.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 8D5BA4D08F578660123B2E81CE8D0C84 /* EthereumAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = F357548B3DD39378B080646816E6E6E9 /* EthereumAddress.swift */; }; + 8DCA8BBC469BA4112698AB969F25247A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */; }; + 8E0F8FBB7B21069BAB85856FACD82FAB /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5CC3933EB505F78FB90467B4EFA6203 /* Promise+Web3+Contract+GetIndexedEvents.swift */; }; + 8FC26FC4527AC222B1C2F40D4E1F3D81 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BC3E604A7828F857DEFB8E5A4792673 /* Primitive Types.swift */; }; + 9079C576ED6D091E0EF1CEC6F245E4F6 /* field_5x52_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B50F465279A418BE82FCA4EBD2177CB /* field_5x52_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 90BB63BE1A3F2906186D961714165CD7 /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63FD588C06FA711CDCC9813DE8AAA0AF /* PKCS5.swift */; }; + 910DECB543C55FB96E09E4E2557A6755 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D67481EE660CC4427780A510CDB6254 /* Exponentiation.swift */; }; + 9287C7AC61FE25FB9FF2E4F9E8B30EAA /* scrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CF0705033B0A2728CE16D3AF008DD51 /* scrypt.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 92CB3B3B6277FD43A6CCF4B510FBCFC1 /* scrypt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAF13C2624A2802FFFD9EC2F84F2A37F /* scrypt.framework */; }; + 93369B9A54200F2200B09E87E76E33D3 /* Promise+Web3+Personal+UnlockAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1838E8D409817D754EDF58FCF91BFCB /* Promise+Web3+Personal+UnlockAccount.swift */; }; + 938239477B6A9C665CB93642E1DFD0EB /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA9960DB9976FF183310557C55A532A0 /* UInt128.swift */; }; + 948C38948743D31A8E07ECF1278C0438 /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29D1BA04747B640515764C450DA1279D /* PBKDF1.swift */; }; + 94B766B2AB6086601374287BB084205F /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72A31D2A6C2335199394826F5AB60411 /* BigInt.framework */; }; + 9505A2BBE23F80EEA10A9209F39C0695 /* UIViewPropertyAnimator+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0067E4280866B4569D265E9F8C6294D4 /* UIViewPropertyAnimator+Promise.swift */; }; + 95C90ACFF4618049BC4EC1D1C5C653DB /* hash_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 404FC9F4A1E9D404A14FDFD25794F248 /* hash_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 978D71F3FB5EACAD29A0EEA5792E43EA /* NativeTypesEncoding+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D35A4906E915E02BCCA9912DBD2D26C9 /* NativeTypesEncoding+Extensions.swift */; }; + 97D85307763F8B8299524EEFD059729E /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A2FE2AA1ED08312BA552C811B50A0ED /* StreamEncryptor.swift */; }; + 98DA224F5999FBB83A4D2090F9CFBCFC /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E8AA6274AA01FA7275884BBF0D6F55D /* AES.swift */; }; + 98EE378BC5236F9103D9F612AC06E040 /* Web3+Structures.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB5D1B477007EA8B27F988C2783A2294 /* Web3+Structures.swift */; }; + 991B88B320A6E9AFE3130717758335A7 /* group.h in Headers */ = {isa = PBXBuildFile; fileRef = B2ACAB499A9507E7F5D0105E4A0D9769 /* group.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 9979250510F331D6F6C4BF5F8A07234C /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79C644C44159127870FD19B2BECB6C9C /* Rabbit+Foundation.swift */; }; + 9A683FAB2843A7181358FFC2F9AA7FAA /* BigInt-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7411A68C8F8AC8841EA5B8E91256B11E /* BigInt-dummy.m */; }; + 9AE3952131E530F55D34A350ECC9B909 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E47F8688C9AC60F086CAFF777392523 /* Multiplication.swift */; }; + 9B1D8B3F81DA09FA60C1B87DBD2D3F63 /* EthereumAddress-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B841E74E11C4190F2742A482D1624F6F /* EthereumAddress-dummy.m */; }; + 9D3DB6C9DD52CA4E093E4C8C4BB02DCC /* Cimpl.c in Sources */ = {isa = PBXBuildFile; fileRef = 2D47BF61850EFDEED83A76DA6498C213 /* Cimpl.c */; }; + 9D6103741022980D04EED50269512BB9 /* Web3+Protocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC202ECB6EBC87A3FF623F01851811DB /* Web3+Protocols.swift */; }; + 9DA1244904AD9E535DFE95EC136A5799 /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82E1460DA79F21EF0A89758352102AA3 /* Floating Point Conversion.swift */; }; + 9E500E32A76DA2F6356AA3391AD1311C /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68623D000FFCEB2CC7E1017DE7B6EAAB /* BlockMode.swift */; }; + 9E8CC528BCE6CD8751B925E2DFFC7E72 /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F94161FCBB26A0CF4D7B4792E7CC6394 /* String+FoundationExtension.swift */; }; + 9E8D7107296E94FA95F7F36DE96563C6 /* BIP32HDNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A1038DC1633B7F9F4C06BE77D4DE0CD /* BIP32HDNode.swift */; }; + 9EE756BBA1C25C5334454ADEB97A6853 /* ecmult_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C65590568B033C2CC9803F32A614CEA /* ecmult_gen.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 9F072011232D95179D1C7D0BA561714D /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27A601897D77B2B18E22FA26B5430F5B /* Box.swift */; }; + 9F08353BD8DADB8C8B14E8A20F8ED909 /* Web3+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DBCD77147B6CFE8E4D75C61EE88C171 /* Web3+HttpProvider.swift */; }; + A0745493EEC035A284FF812C97652F66 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E067ABC95AB5A08F48E2887AC6ECDF59 /* Array+Extension.swift */; }; + A1257C2EF19E838CC9954197DDCA5734 /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 482D19E42A30F218E678D351C13B155A /* Updatable.swift */; }; + A1A7CD3E806ECEEF9CA491D1D4E2994A /* EIP67Code.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331413774F7D7F0757A5F0B9B2DAA4BC /* EIP67Code.swift */; }; + A232346CDD9B638A73E31F9B0EEC63A6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */; }; + A3A9CC68C76881419F9C084AE9F3A323 /* secp256k1_ecdh.h in Headers */ = {isa = PBXBuildFile; fileRef = ACCA271C75D4B21ED35646A5A4731E5E /* secp256k1_ecdh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3B3988D1BE65A4B037754384D6E2A8F /* CryptoSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 912562705A9D693EE4E79FC65116D991 /* CryptoSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A40347FBA49DCAF786314B76D48EDD88 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1681DF3FE5A4B672E29F13A64A64023E /* Authenticator.swift */; }; + A48FEA29EC3240C483497D8DB6FB0541 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = DBE9BF31616883FEBAE74AC685A421E1 /* when.m */; }; + A5219D81AB8FAB98FEEE7B7F4ACF937F /* web3swift.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CA6616160AC6F13FA7BCA2D9C4BB992 /* web3swift.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A6B9BF2F0D5DEA52AC43A9863779A093 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F1D07742B3A7F5A46E2A329DA441284 /* Codable.swift */; }; + A7CB1BD8A467E5F5C0D1334A63FDFEA1 /* SwiftRLP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7BA3CDDCDFEFD9BED027AD46F60FAC0 /* SwiftRLP.framework */; }; + A82046A82CD3575966EAA968491B3FF1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */; }; + A848C13D7D87B0F9C11825D17437C482 /* BigUInt+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C37C7E9D0EDF73545C404CD099C00A6 /* BigUInt+Extensions.swift */; }; + A89883197ADD5C0B0E2D8C797E23A8C3 /* EthereumABI-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B58E7023F7E6C8655D6D9028C7AF2698 /* EthereumABI-dummy.m */; }; + A921B2A1FBDD346696B21EA3A626D6BF /* group_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 45C266B7095DCF8E4E4847CC708EC1BA /* group_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A92A096CDDCA083FB9B56A82D6B89291 /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = F211AC62BA23FDE559ECA2DB16007CB5 /* util.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A95AFD0C2BC0C07CB65C970E57D177E3 /* ABIParameterTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA7F8881DBA20F9015834FD7A4CF547C /* ABIParameterTypes.swift */; }; + AC0B732DDB2F612834D2A7E19DA53754 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B29CEBEB845EC347B96D7CF8EC1193E /* Promise.swift */; }; + AC6DA7A88F96EE89BE114D6C5DE3F3CF /* Web3+JSONRPC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC9030EBE40E463BE51970F190211BDB /* Web3+JSONRPC.swift */; }; + AD19735CB2485737C224B7D360F4493D /* ComparisonExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8EA98CA2EC2343E64F97FE62866F72B /* ComparisonExtensions.swift */; }; + AD251E7937B3885E2B635F6FE675F9CC /* EthereumAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 77783A545C644FB0696DAD1722E5944D /* EthereumAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ADA80E624605AE882CE1D99E722CC414 /* Base58.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1E952E16B5F2C98AD684EBCDE120FB1 /* Base58.swift */; }; + ADC99CB22E2067F475404C536C15D9AC /* scalar.h in Headers */ = {isa = PBXBuildFile; fileRef = 932B2C4CD9556E6318A094CDEA2E0E13 /* scalar.h */; settings = {ATTRIBUTES = (Private, ); }; }; + ADD1958BC7A445E2E7BA0AC6D09E5A75 /* CryptoExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F25ACD34DFF6A5394BF0D9D4CE52C5C3 /* CryptoExtensions.swift */; }; + ADF81CC0E5C27480ACC20BD37F83FD34 /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 640FA460736D514832EF0074EDBC3B08 /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AF0206170C3EFE4D74D35A99947F570F /* ecmult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B3AACA619772B384FE61866B88EA981 /* ecmult.h */; settings = {ATTRIBUTES = (Private, ); }; }; + AF37471E60AF8D58B63DC72E73AC22F7 /* EthereumKeystoreV3.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB6ECCB5CD4592A97A0350BE32E726B5 /* EthereumKeystoreV3.swift */; }; + AFD68E6B13C8C94F2AE939D73A1FBBC0 /* EthereumAddress.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 941616C02C90CB37792EE5D074B65DA4 /* EthereumAddress.framework */; }; + B514B4E9DB02B1EC4321D62DFA0524A1 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F14FC9C9FAC7304FBF240BE3CFABC651 /* Hashable.swift */; }; + B52C9675931CFC0A3E9EC8F555FB75E5 /* ecmult_const.h in Headers */ = {isa = PBXBuildFile; fileRef = F40826DF7C345288BFCB50940E3316CF /* ecmult_const.h */; settings = {ATTRIBUTES = (Private, ); }; }; + B5982630A4AB9E8A9264371037AF8A11 /* Dictionary+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B109DA379FA9ECABADD3EE3B80DE29B8 /* Dictionary+Extension.swift */; }; + B792D575CEA453A698E0D7C8E61388DA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */; }; + B7F3D476C87C0EC57139955A579FA3DC /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAD47A57A6C82649BA700C02D205C57E /* Comparable.swift */; }; + B8DC123A6746FD918E04ADCFA8094147 /* Cimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C7A9472FF71EC33BE7131124C53835E /* Cimpl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BB2EBA041C1D99F0E24A16187D135DD1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */; }; + BB623D27F74DE81E07DA70A9BF7A8CC7 /* BIP32Keystore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 681530AB9C692077CCA2B03BF1DDED10 /* BIP32Keystore.swift */; }; + BBFB0A0A67B23D871F7CA36DAB0DC776 /* scalar_8x32_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 887360628FC3B77442F4026B0B7A51CD /* scalar_8x32_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BD4B04E18C36BD2D1DF0BD10C05BF2D3 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 693AFA81068283C937D0CA94D38E4722 /* dispatch_promise.m */; }; + BDCB2C296BD731AD509810D023652C78 /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72A31D2A6C2335199394826F5AB60411 /* BigInt.framework */; }; + BF1CBE2864240ABA0FFCA1990215D2C5 /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = D97CB39BF8F2C831589612CB2ED71D90 /* Padding.swift */; }; + C011B8342C7D5C803CD654A58A8F21AB /* scrypt-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4621B79FEA77C668B08A9E4B0CF0C7B6 /* scrypt-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C03A5E7CDA94D1EEFAA95BD7C8AA8A80 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */; }; + C14B28E1B085DB351DDFC83187893EAD /* SipHash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 44C36C457BDC5A424B73FED2BF2B0CF7 /* SipHash.framework */; }; + C1B356D260ECFA714AEF597CE84D6ABC /* PromiseKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D587E4DB61D38FF4A1CBEB61903470D9 /* PromiseKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C1E5BA379AC870AEFBB027BA37F0D4AC /* secp256k1.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4F0D58F76F4D676944EC3DD0AC648D /* secp256k1.swift */; }; + C2151450953E0EC8EDC912BD70010B41 /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E1A060CECDF25684D85667577DBA798 /* join.m */; }; + C3051783E23BFA409BB94984B8505ABA /* scalar_low.h in Headers */ = {isa = PBXBuildFile; fileRef = 724C44BB8A759DE7BA8C45425E26F27A /* scalar_low.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C336A99180A6D5AD84C44CC15F48E2EE /* ABIExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E120CDD5DB9769DD2435516A1D4567 /* ABIExtensions.swift */; }; + C36E78B76E37290EDFBD35F753C8BFD5 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E7B0F55D684C65453D559D9B4BDC75A /* String+Extension.swift */; }; + C3FF72941CEA02672209A73FF19E4819 /* Web3+Instance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68FBA8773B17FF0BE969F589278D0761 /* Web3+Instance.swift */; }; + C41B8867263E3E6E42470A3C646B1D19 /* Promise+Web3+Eth+GetBlockNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 905EF6316653669512380D6206D3F8DE /* Promise+Web3+Eth+GetBlockNumber.swift */; }; + C44AD471D7A7916A140FDE4609781022 /* web3swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = ABA0BB0844791492402D5AB66E61BB24 /* web3swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C4588BD98D41DCD0F44F6FA043DC15FF /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5A89E2E2F70E548530DA60AF935479A /* UInt16+Extension.swift */; }; + C4CDFEEEDDAD44CED19260B6DBEAE02E /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE86F8153D27F10505EBD7D9EE3DC397 /* Collection+Extension.swift */; }; + C514360D7B3C5BCB4E0225D90CF187E9 /* Promise+Web3+TxPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E2604B78547CAD1266D726FEE58D2C5 /* Promise+Web3+TxPool.swift */; }; + C52F5CF7ED0B6C4EDD0C0DAC40D16B4D /* lax_der_privatekey_parsing.c in Sources */ = {isa = PBXBuildFile; fileRef = 166AE9FC576B1A9469DA3090BD651D48 /* lax_der_privatekey_parsing.c */; }; + C5443D345E878DA9400BCB516DF56B12 /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BC345225A9FFFEDFD6BCCDA6BB4F076 /* AES+Foundation.swift */; }; + C5F4D394712A325BCB341BE8623B6111 /* BIP39+WordLists.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CC86CBFE859D6D9E92CE62268D0C8BB /* BIP39+WordLists.swift */; }; + C734676627537B0DFCA232D1EB633C0B /* Promise+Web3+Eth+GetAccounts.swift in Sources */ = {isa = PBXBuildFile; fileRef = C07DC3D70012BD62BDE7B7032EE7A09E /* Promise+Web3+Eth+GetAccounts.swift */; }; + C8095F1D83EA88E00DD945FCB0469AB2 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BF4714912851ED7D22D2EF0B37D9625 /* PMKFoundation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C943B4DB127AA6A95B94A3630D9DEBFA /* field_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A02CE100739858E7B58E0BC830FC666 /* field_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C9E64C6119BEE088DEA38EDE36913847 /* field_10x26.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CAF5D39045C811128307EAFD468C89B /* field_10x26.h */; settings = {ATTRIBUTES = (Private, ); }; }; + CAF579CC2CED09FBDCE2864827B8A085 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37074DF9E43F92D14CB23B688C72FD89 /* BigUInt.swift */; }; + CD78786DD832146021F67BDA26D07BCB /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = C669F6C727F3A19F28202283CAF3CBD6 /* when.swift */; }; + CDD09F29DAD4B81BA080341DD1E62A47 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0315A68D7F2B7AACA7AD8A42A20A8F3 /* Error.swift */; }; + CF9E91FF64AEBD06486F49509872C007 /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 157ED0FBF8A2E71BFAA26655DA1359CC /* ZeroPadding.swift */; }; + CFDEB0F86B9C7084B7DB4D052CB012A3 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BFBB3A57DFC4A14798203F7DD419319 /* Thenable.swift */; }; + CFE8E9ADF0B2C6758E619C4CDB178CF4 /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD1EAA1F2E44F11F5F6032A518194EC4 /* Blowfish.swift */; }; + D07B6C6C612285018A6657649C285DB4 /* EthereumABI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E16B8BF7D2F429329E671B5BE4F1AC8A /* EthereumABI.framework */; }; + D3D0D567F96629FC64F8ECAFAEE917ED /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FF7D42AF8710309C16345FB83ABD5B /* Deprecations.swift */; }; + D3EB8E2BA9D69A1AB9BE406CCBF38946 /* ecmult_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = E161AA24151D1227B11E7BFC7091272B /* ecmult_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + D416E9A2C53EBE511502E1E404028C7B /* Pods-web3swiftExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E440C4B74B44A098160068C009BA588B /* Pods-web3swiftExample-dummy.m */; }; + D41CBBA4660B26D0AE12C867C2D27DF3 /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35A75E22FE221D90EFEAB4998EBFE2C6 /* SHA1.swift */; }; + D4FD2B2BE9EC95B59458C3784C1C77AF /* field_10x26_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F9BFEEC4833708E9B4067DFD84C5DBB /* field_10x26_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + D54E7F5BCDF745F7613DFF701A32B600 /* scratch.h in Headers */ = {isa = PBXBuildFile; fileRef = B72048F832A9C75C2A81C9CBC769CD8D /* scratch.h */; settings = {ATTRIBUTES = (Private, ); }; }; + D6DF6D0E2CAABE79ABFE4E49B5650811 /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 974A7BFE8E92E050D2FF9124AA7DBCC9 /* AnyPromise.m */; }; + D976E2E8FCA5504DCF2738F501041438 /* Web3+MutatingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380373C357903D6101BBC00E60665458 /* Web3+MutatingTransaction.swift */; }; + DA0E5E2EF44B023411F64FD606A05C46 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */; }; + DA44967E128BD7BFA50F2906B0B2C9C6 /* basic-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CADF98FCCC9B29F22C0815C40CFA3B2 /* basic-config.h */; settings = {ATTRIBUTES = (Private, ); }; }; + DBBFC560AB043DF7F0AF1ADD29B96323 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = FC8ECF2C2B981EAF227B97F9A951A7A0 /* UIView+AnyPromise.m */; }; + DBE553B80B7B7A047BC80FADEC7B5F83 /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5659C3AB77D7D5B8A5D896D5D8A6CA6 /* HKDF.swift */; }; + DC7336EC3F7331F6A630EDA5F32F30E7 /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A645643D765879996A0FEFEB17AEB2 /* AEAD.swift */; }; + DE126CF9A74B3DC25B39B8FA01484B2E /* scalar_4x64.h in Headers */ = {isa = PBXBuildFile; fileRef = C4BEA212C4B71400038EE33CE9319F63 /* scalar_4x64.h */; settings = {ATTRIBUTES = (Private, ); }; }; + E10034AED811B87BB547AED12B01AF19 /* ecmult_const_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 36F8641D4C44BD3D0E08388287B61EB7 /* ecmult_const_impl.h */; settings = {ATTRIBUTES = (Private, ); }; }; + E1705CF699458B16784782F8A86F23EB /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34300D9F450A76F1C0795BAB8BBCE946 /* CTR.swift */; }; + E25CC0BD6475813592D7722F3FCECA43 /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3F88A45DE0134E5C0FCE9C79186C9F /* ECB.swift */; }; + E4339E5E7ECB60FD90211A3CD8E64568 /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A6500122B234FA6647C2568B72C2D9F /* UInt32+Extension.swift */; }; + E60D4C87A96FCA917970FD522CA8F9FF /* libsecp256k1-config.h in Headers */ = {isa = PBXBuildFile; fileRef = 06016B2B87ACCBAB44FEDBBD9D102DE8 /* libsecp256k1-config.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E641B1AC99C2FE1FB0B1BF1DF49CCECA /* SwiftRLP-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 47098DB41878FF379AEBC8644EC53E97 /* SwiftRLP-dummy.m */; }; + E766E43AFDF18D5012C83670A1B48A27 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 343E05569A3D9E6C883D808CAC28052F /* Blowfish+Foundation.swift */; }; + E83BCEA137A6F28FFAC7EE0079FA6156 /* web3swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FCB3C4C3B8E9D105D6C89E3C89F25474 /* web3swift-dummy.m */; }; + E8CA9824DFEFDBE5FC430276A237F97B /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607E73BBF9CE339CE9237C758D8B09FC /* Data Conversion.swift */; }; + E990498BC866B73EBAB07888721A09D1 /* Promise+Web3+Eth+GetBlockByNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1860F5FD511E1CDC0321E2D6EBA3AFC5 /* Promise+Web3+Eth+GetBlockByNumber.swift */; }; + EDCBAD6FE0DC05519BE87FA79D6ECCD1 /* RandomBytesSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7471D4ED5465C42EB4CEE0034421F62D /* RandomBytesSequence.swift */; }; + EE851A358B5CFC5DB55B649D4E0F6817 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 612041911C9ABF085CC39D4CD9864737 /* String Conversion.swift */; }; + EF2D257F439AB4E0C37E407B20DF41BC /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3D67EF88FBE3D4B3938095FD5B0EF82 /* Cryptor.swift */; }; + EFB38A3AC0C79689874458BE12601515 /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2614F5FD7FA2BFCEC145FF6C4B3A1D56 /* Data+Extension.swift */; }; + F1631F5F7CD77D9527E4FE5EEFBCEB3D /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA422749FB6CE4DA61C615258DDD6B8B /* BigInt.swift */; }; + F25A68C1BB11B18A009139962E36D783 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB666C41E45C6ABAB0192295B1ECAC7E /* NSURLSession+Promise.swift */; }; + F276CE59D1316B2370725D47D4EC2FB7 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CEB1E0F5569F3E140EB5B421C414467 /* Process+Promise.swift */; }; + F27A72D9086266FFEB1DF3028EDC5737 /* Web3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03FB5FA9008321DCD209AFD9C2CE3670 /* Web3.swift */; }; + F5BCE1E730F746F620A9DB13EE2C1B60 /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 131215941945D5345AF8A047A6629C21 /* Generics.swift */; }; + F6666F3FE8D03AFE4FDEE4421D50B914 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D616168A7A23B7AB1995D8FCE9E3C53 /* GCM.swift */; }; + F68103A274867FC3D714744E8A1E1A27 /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71B0B58F78D56703F9250DC12E414AD7 /* Bit.swift */; }; + F6F9AF37C197AAA6E2F2341E1D2F3EAD /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 229F4D226F1E6B09333978F7A65F9389 /* Poly1305.swift */; }; + F79164F06C90C81A48EB83EE0AB5F761 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0A18E92B2440CE03C08D553EF12E1AA /* SipHasher.swift */; }; + F9A7E63350044E62F0E412D2E103915F /* Promise+Web3+Eth+SendRawTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E2D8D233951D90BE212C1683EDBE096 /* Promise+Web3+Eth+SendRawTransaction.swift */; }; + FA024A288AA4357EB04E48AF9BCE53D1 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1079CE813B6ADE402DA1A75AC3BEF4C /* CryptoSwift.framework */; }; + FAB7360AD1D3E53E3A466486C74B99AC /* BIP32KeystoreJSONStructure.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6954609CD039F4F09E75EBC79203A7B /* BIP32KeystoreJSONStructure.swift */; }; + FB0B2EDD326D7C1D112BBAF8F3F9D6AD /* Web3+Options.swift in Sources */ = {isa = PBXBuildFile; fileRef = 617463151A102A6AE3996BBA956F7E7B /* Web3+Options.swift */; }; + FD67D656E8426746C043D859E4B444D2 /* Salsa.swift in Sources */ = {isa = PBXBuildFile; fileRef = 712C8CFFF313A75DD19030E239230234 /* Salsa.swift */; }; + FDA87C074AA11FD15E2484CF0CD2A696 /* Promise+Web3+Eth+Call.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6FDF59FF5D7342988E8B93E48F3AADF /* Promise+Web3+Eth+Call.swift */; }; + FEF24F9BB68DD9774ADE13F2F789BF2D /* EthereumTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = C613070ACCF0136D2C14651C688498FF /* EthereumTransaction.swift */; }; + FFA8593E38644858DA006AC13FCFCE1D /* ContractProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C6FDA4C7AB83C6CB50D21313F5540F /* ContractProtocol.swift */; }; + FFBA8696A49B49BA33D1499546FCEC58 /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A30F7AD0E2CB204A73B0944A1D13857 /* Shifts.swift */; }; + FFF6A96467984411196597CEC016AB21 /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = DA539D1F3176FABFF9035EC2FDFD30B4 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 0D1A9F72CCDCF579C12409E9B6CF29A1 /* PBXContainerItemProxy */ = { + 078BF1DF3ACB457691AF40DF07987ECE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 2571F2C79C3D43B0220DF7B9302CB451; - remoteInfo = PromiseKit; + remoteGlobalIDString = 137411A4D3CCDCAE6EE1A79271E0889C; + remoteInfo = BigInt; + }; + 0871B58B957319E5803181DB6310C9D9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6F5F8CED7C3379A0404E745819F8B311; + remoteInfo = CryptoSwift; }; - 3AA144C5877BE9850125175A628B8694 /* PBXContainerItemProxy */ = { + 2BB8C2D8D708208AFE67D85DAFD72CC9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = E73E959E8118EB238220F62E6A1C4FF3; + remoteGlobalIDString = 888C7AD1D57FC2EBE4CF200F6BD2A842; + remoteInfo = EthereumABI; + }; + 39482B44F79B6EE7854EFF1F2D1F3220 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0ED0B491AE891D6CDC3963787F0E2DB4; remoteInfo = scrypt; }; - 3BF361F176FF58861488CD8AC9683C23 /* PBXContainerItemProxy */ = { + 49EEDCC34FEB88EEA65615E7A8110C7C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = F58417C26FE443298C1E00C34A50FD6B; - remoteInfo = web3swift; + remoteGlobalIDString = B7B21C794593341834C7614B423C9C8A; + remoteInfo = SwiftRLP; }; - 3E577688509A0DE9BF822DC3EE993820 /* PBXContainerItemProxy */ = { + 4D6FC31C764576609CC511FFA544996F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 4DACDE493E99BF92E5758A59F946A750; - remoteInfo = CryptoSwift; + remoteGlobalIDString = DD6DF1A42DE8BB0017BCCD871EA0F04D; + remoteInfo = PromiseKit; }; - 54CE60A631318530EC3EC73D61B6BF60 /* PBXContainerItemProxy */ = { + 4E9D74E7CDF6D61C608BA27D99B37C91 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 137411A4D3CCDCAE6EE1A79271E0889C; - remoteInfo = BigInt; + remoteGlobalIDString = 70B9B02B65110648B14877481CCA7615; + remoteInfo = EthereumAddress; + }; + 525BA8733B304B49DB740366DDBA734A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 70B9B02B65110648B14877481CCA7615; + remoteInfo = EthereumAddress; + }; + 5A28E66F1F6078F3843ED6996137737F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 70B9B02B65110648B14877481CCA7615; + remoteInfo = EthereumAddress; }; - 6B03F3FEA8D4D028959A9B2C1B9E100B /* PBXContainerItemProxy */ = { + 5ED7085516CC4C38EC3D8A95CD2F66A6 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 137411A4D3CCDCAE6EE1A79271E0889C; remoteInfo = BigInt; }; - 72E44D1D38734BDAA138696814FAE290 /* PBXContainerItemProxy */ = { + 6E2F65D510C1B1CCAB072F2EA027F15D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 888C7AD1D57FC2EBE4CF200F6BD2A842; + remoteInfo = EthereumABI; + }; + 7840D2071B0BD04D24615CAC8745B9A9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 640B979328B6328F6325026CA79A1B22; + remoteInfo = secp256k1_swift; + }; + 819472C9CA5B12290E4B3D5D1BD88D51 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6F5F8CED7C3379A0404E745819F8B311; + remoteInfo = CryptoSwift; + }; + 87FDCF4A0EA92BECA46C016EA459BEAE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = F62AF0F0F2678A4120DFF3D5D1A1F6D5; - remoteInfo = Result; + remoteGlobalIDString = 640B979328B6328F6325026CA79A1B22; + remoteInfo = secp256k1_swift; }; - 9769A826E3FD68B3650DDA4A69C7DEF8 /* PBXContainerItemProxy */ = { + 94EDB502D6BC3D651C1D4E9B20E840B5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 9E6F6DA258BB741707AF260991406A45; - remoteInfo = secp256k1_ios; + remoteGlobalIDString = 6F5F8CED7C3379A0404E745819F8B311; + remoteInfo = CryptoSwift; }; - 98EB692C3E543D16FF724F2E782AB9AA /* PBXContainerItemProxy */ = { + 95CE69833B7C10A627F1F97B568336B8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = E73E959E8118EB238220F62E6A1C4FF3; + remoteGlobalIDString = 0ED0B491AE891D6CDC3963787F0E2DB4; remoteInfo = scrypt; }; - A473519B9A29CED72398F6B36808B50E /* PBXContainerItemProxy */ = { + A1F782D51A5AA0117251A7A9DAA8C25B /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 7FF8752D2607B0617A8EA59CB6F52DA7; - remoteInfo = SipHash; + remoteGlobalIDString = 6385AA5DEB59BDFB6EC695A6F0524DA7; + remoteInfo = web3swift; + }; + BD97544266AEEE50206B558177DB9756 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 137411A4D3CCDCAE6EE1A79271E0889C; + remoteInfo = BigInt; }; - C0A75387703F1A2B591F0E2B62AA17C2 /* PBXContainerItemProxy */ = { + C5958E9968F8CD1EBAAB778373D586E1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = F62AF0F0F2678A4120DFF3D5D1A1F6D5; - remoteInfo = Result; + remoteGlobalIDString = B7B21C794593341834C7614B423C9C8A; + remoteInfo = SwiftRLP; }; C6C17D0086F8D9E70B8AF619657FF2BC /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -424,407 +485,422 @@ remoteGlobalIDString = 7FF8752D2607B0617A8EA59CB6F52DA7; remoteInfo = SipHash; }; - D73B772BC92CA079BB4AC214110DC008 /* PBXContainerItemProxy */ = { + DA96D27179959DC79F99D9EE1AA60AA8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 2571F2C79C3D43B0220DF7B9302CB451; - remoteInfo = PromiseKit; + remoteGlobalIDString = 6F5F8CED7C3379A0404E745819F8B311; + remoteInfo = CryptoSwift; }; - E8DB60D3DA241987C7C44C6EC105D49F /* PBXContainerItemProxy */ = { + DBD880B87E9DC4E7563E385D2DCC57EC /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 9E6F6DA258BB741707AF260991406A45; - remoteInfo = secp256k1_ios; + remoteGlobalIDString = DD6DF1A42DE8BB0017BCCD871EA0F04D; + remoteInfo = PromiseKit; }; - F53010F9D724BDAFA36A318B5FF7C562 /* PBXContainerItemProxy */ = { + DEE978CB09E9ED72BBBC50BF4790740F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 4DACDE493E99BF92E5758A59F946A750; + remoteGlobalIDString = 6F5F8CED7C3379A0404E745819F8B311; remoteInfo = CryptoSwift; }; - FF6286D7A04DD3602D614132F8461043 /* PBXContainerItemProxy */ = { + E4BE00A03DB6D1CE0B1840D2BC4765C4 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 4DACDE493E99BF92E5758A59F946A750; - remoteInfo = CryptoSwift; + remoteGlobalIDString = 7FF8752D2607B0617A8EA59CB6F52DA7; + remoteInfo = SipHash; + }; + E9E12D4F2CEA31E8E4AE413FDF993C2D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 137411A4D3CCDCAE6EE1A79271E0889C; + remoteInfo = BigInt; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 00F18ED0F07AAD5FD3142707A5EEB7E4 /* LibSecp256k1Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LibSecp256k1Extension.swift; path = web3swift/Convenience/Classes/LibSecp256k1Extension.swift; sourceTree = ""; }; - 014042438B2D19CCAC6C5F00B1146C99 /* secp256k1_ios-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "secp256k1_ios-dummy.m"; sourceTree = ""; }; - 01542E21EB2EEDA093596518918486A4 /* hash.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash.h; path = secp256k1_ios/src/hash.h; sourceTree = ""; }; - 017C3C0F878AD51DED5CBADD10EF9AA8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - 0195F4E88F3790D0C0BED248E5EB6ACC /* Result-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Result-Info.plist"; sourceTree = ""; }; - 0304AE8FA05319628AC1812E3E507A21 /* Cryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptor.swift; path = Sources/CryptoSwift/Cryptor.swift; sourceTree = ""; }; - 0353245090FFB16BCAFE272E9F48A277 /* Bitwise Ops.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bitwise Ops.swift"; path = "sources/Bitwise Ops.swift"; sourceTree = ""; }; - 03C1C7040F24F41655E6559346C1E313 /* EIP67Code.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EIP67Code.swift; path = web3swift/Utils/Classes/EIP67Code.swift; sourceTree = ""; }; - 0555E01E3A109C44BDC8D3F72BC8BDBD /* EthereumKeystoreV3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumKeystoreV3.swift; path = web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift; sourceTree = ""; }; - 064D539BBAF5825903014E2E42F019F4 /* HMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HMAC.swift; path = Sources/CryptoSwift/HMAC.swift; sourceTree = ""; }; - 0673406163739833CEECFC5634FED4CF /* Guarantee.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Guarantee.swift; path = Sources/Guarantee.swift; sourceTree = ""; }; - 07B36EAF62DEBCA4E85EC353970A217E /* AbstractKeystore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AbstractKeystore.swift; path = web3swift/KeystoreManager/Classes/AbstractKeystore.swift; sourceTree = ""; }; - 07E9A7E7D3A951963E13646AC6CE8391 /* SipHash-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-prefix.pch"; sourceTree = ""; }; - 092FDF7F6A0B07EA5F43A3E8652A2A11 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 099411A4987328A3637E16D55446C7C0 /* Promise+Web3+Intermediate+Send.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Intermediate+Send.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Intermediate+Send.swift"; sourceTree = ""; }; - 0AED2A5ABC55B2E2852BAB3E48BE6124 /* KeystoreManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeystoreManager.swift; path = web3swift/KeystoreManager/Classes/KeystoreManager.swift; sourceTree = ""; }; - 0AFDC4CB49065D6F6886804C0A0D945D /* Result.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Result.xcconfig; sourceTree = ""; }; - 0B06F415D20475CC8FC28FFC552A47C0 /* SipHash-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-umbrella.h"; sourceTree = ""; }; - 0C6D5088382FE71F237781CCAA15029E /* AEAD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEAD.swift; path = Sources/CryptoSwift/AEAD/AEAD.swift; sourceTree = ""; }; - 0D0B55151A9D3FF6DF524D9E72CBFCB2 /* AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; + 0067E4280866B4569D265E9F8C6294D4 /* UIViewPropertyAnimator+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewPropertyAnimator+Promise.swift"; path = "Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift"; sourceTree = ""; }; + 00E120CDD5DB9769DD2435516A1D4567 /* ABIExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIExtensions.swift; path = EthereumABI/Classes/ABIExtensions.swift; sourceTree = ""; }; + 010F596FBEF9CCC63191ABD3376144DD /* Promise+Web3+Eth+GetTransactionDetails.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetTransactionDetails.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionDetails.swift"; sourceTree = ""; }; + 03604607591154D9EFC0F58517C88BB4 /* BigInt-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-prefix.pch"; sourceTree = ""; }; + 03FB5FA9008321DCD209AFD9C2CE3670 /* Web3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Web3.swift; path = web3swift/Web3/Classes/Web3.swift; sourceTree = ""; }; + 04BC19C035A8C39D5226D8BEB0149F0E /* Words and Bits.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Words and Bits.swift"; path = "sources/Words and Bits.swift"; sourceTree = ""; }; + 04FF7D42AF8710309C16345FB83ABD5B /* Deprecations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecations.swift; path = Sources/Deprecations.swift; sourceTree = ""; }; + 05625082EB748971627BF6E1ABEE72BE /* scratch_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch_impl.h; path = Classes/secp256k1/src/scratch_impl.h; sourceTree = ""; }; + 06016B2B87ACCBAB44FEDBBD9D102DE8 /* libsecp256k1-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "libsecp256k1-config.h"; path = "Classes/libsecp256k1-config.h"; sourceTree = ""; }; + 075236A3B5DC60B4370A0CCF672B8AEF /* num.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num.h; path = Classes/secp256k1/src/num.h; sourceTree = ""; }; + 075602E81E3D61E019C955BD6AE18C7A /* OFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OFB.swift; path = Sources/CryptoSwift/BlockMode/OFB.swift; sourceTree = ""; }; + 099F776D5862FBF1C32451630511200D /* eckey_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey_impl.h; path = Classes/secp256k1/src/eckey_impl.h; sourceTree = ""; }; + 0A26DC099A8624856C0E02348C24EF20 /* BigInt.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = BigInt.modulemap; sourceTree = ""; }; + 0A4B692E5A925A941AA99C0BCA964506 /* NSURLSession+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLSession+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.m"; sourceTree = ""; }; + 0B29CEBEB845EC347B96D7CF8EC1193E /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; + 0BF4714912851ED7D22D2EF0B37D9625 /* PMKFoundation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKFoundation.h; path = Extensions/Foundation/Sources/PMKFoundation.h; sourceTree = ""; }; + 0C0E2B8299A8D557266A0BFDE4075564 /* SwiftRLP-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-prefix.pch"; sourceTree = ""; }; 0D68B54C72B7D5CE7C1E985C3B853442 /* Pods-web3swiftExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swiftExample.debug.xcconfig"; sourceTree = ""; }; - 0D99B05CD6515234D9A52524E78779C4 /* ecdsa_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa_impl.h; path = secp256k1_ios/src/ecdsa_impl.h; sourceTree = ""; }; - 0E23DA5CE9BE03D67FA010C086FD8443 /* AES.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.swift; path = Sources/CryptoSwift/AES.swift; sourceTree = ""; }; - 0E5FFF2ADF7334E4256CFC9542594671 /* Web3+Structures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Structures.swift"; path = "web3swift/Web3/Classes/Web3+Structures.swift"; sourceTree = ""; }; - 0EF1C662C9485A5A72B33C4CD4E0CAD9 /* scrypt-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-umbrella.h"; sourceTree = ""; }; - 0FD8645A2496918B9B87011F0B77E14E /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; - 0FFFCB7AB750F1408E71BE53B3D9C85E /* afterlife.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Extensions/Foundation/Sources/afterlife.swift; sourceTree = ""; }; - 10E6CC65707B2EBCD6BD73088BB3B221 /* num_gmp_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp_impl.h; path = secp256k1_ios/src/num_gmp_impl.h; sourceTree = ""; }; - 10F89C677C577204A26019CC289B1E94 /* Web3+Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Utils.swift"; path = "web3swift/Web3/Classes/Web3+Utils.swift"; sourceTree = ""; }; - 11D360750D0388F4DDEA48C9C2C4CBA8 /* SHA2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA2.swift; path = Sources/CryptoSwift/SHA2.swift; sourceTree = ""; }; - 12ADBF373A266E4D41DC6FC96C0A5C25 /* scalar_4x64.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64.h; path = secp256k1_ios/src/scalar_4x64.h; sourceTree = ""; }; - 1446285C476D91623FFA25FFE16B2493 /* CFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CFB.swift; path = Sources/CryptoSwift/BlockMode/CFB.swift; sourceTree = ""; }; - 1470FE533DA2633F1A66FDDDB7B7E280 /* BIP39.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BIP39.swift; path = web3swift/KeystoreManager/Classes/BIP39.swift; sourceTree = ""; }; - 14D6ECE7EE1EC56E855EB8089B581FE7 /* KeystoreManager+ObjC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "KeystoreManager+ObjC.swift"; path = "web3swift/ObjectiveCbridge/Classes/KeystoreManager+ObjC.swift"; sourceTree = ""; }; - 14DEE56FE9FEE65882DAFFD2A00048C6 /* BIP32KeystoreJSONStructure.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BIP32KeystoreJSONStructure.swift; path = web3swift/KeystoreManager/Classes/BIP32KeystoreJSONStructure.swift; sourceTree = ""; }; - 15FA67C83BE43CF3EF9C1E6D2E3989D0 /* PromiseKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-umbrella.h"; sourceTree = ""; }; - 162213C6C0819E2BC89868BBC891FCD5 /* Codable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Codable.swift; path = sources/Codable.swift; sourceTree = ""; }; - 1651C3EB5087C3CF5294DBDA737440F2 /* Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptors.swift; path = Sources/CryptoSwift/Cryptors.swift; sourceTree = ""; }; - 17623569C850BA2E2564795979DFDB57 /* Web3+Instance.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Instance.swift"; path = "web3swift/Web3/Classes/Web3+Instance.swift"; sourceTree = ""; }; - 177C91EDD167FD64C32183AC2992D4A3 /* firstly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = firstly.swift; path = Sources/firstly.swift; sourceTree = ""; }; - 17FF07C284C525895497483DCD35E62F /* PlainKeystore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PlainKeystore.swift; path = web3swift/KeystoreManager/Classes/PlainKeystore.swift; sourceTree = ""; }; - 192204EBF8C806D42C01EE7BBCC7FAF5 /* Updatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Updatable.swift; path = Sources/CryptoSwift/Updatable.swift; sourceTree = ""; }; - 192224DB4709FB6A4273807EFBCDCBD4 /* EthereumAddress+ObjC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "EthereumAddress+ObjC.swift"; path = "web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift"; sourceTree = ""; }; - 196B6B93D2F28684E654A49D144415FF /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h"; sourceTree = ""; }; - 1A48691ED7AB66A35E08ABFE8367B7EC /* Web3+BrowserFunctions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+BrowserFunctions.swift"; path = "web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift"; sourceTree = ""; }; - 1A702E196081639CA2834C8EFC66EB60 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1BC6B91E0252F62A5E5F43F9AA236607 /* num.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num.h; path = secp256k1_ios/src/num.h; sourceTree = ""; }; - 1C8276A453626F75A60C791772246C3D /* CryptoSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CryptoSwift.framework; path = CryptoSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1D88868F549DDDA1E4CA1095EF79FAC5 /* Web3+TransactionIntermediate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+TransactionIntermediate.swift"; path = "web3swift/Web3/Classes/Web3+TransactionIntermediate.swift"; sourceTree = ""; }; - 1DB40030A8982CFEEB33A6F735ECF86B /* MD5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MD5.swift; path = Sources/CryptoSwift/MD5.swift; sourceTree = ""; }; - 1DD7A05DBF85857EC1A624A0C5549591 /* BigInt.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = BigInt.modulemap; sourceTree = ""; }; - 1DE42A2863AE2DBF2428DD725882E73F /* Promise+Batching.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Batching.swift"; path = "web3swift/Promises/Classes/Promise+Batching.swift"; sourceTree = ""; }; - 206FB0DA1ED8B1EC1C34CCC55E7D0E38 /* CTR.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CTR.swift; path = Sources/CryptoSwift/BlockMode/CTR.swift; sourceTree = ""; }; + 0DC0180CECBE311366353C47A894156A /* UInt64+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt64+Extension.swift"; path = "Sources/CryptoSwift/UInt64+Extension.swift"; sourceTree = ""; }; + 0DFB8B8BF7DABC99D98F847DEE91FA95 /* secp256k1_swift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "secp256k1_swift-Info.plist"; sourceTree = ""; }; + 0E23F15DC6BEBFD7CAA793A040E31531 /* EthereumABI.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = EthereumABI.modulemap; sourceTree = ""; }; + 0F31A6E839594AF147029FFDE446D65F /* SipHash-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SipHash-dummy.m"; sourceTree = ""; }; + 0F64296999AC33A5090DFA571030C3B3 /* EthereumFilterEncodingExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumFilterEncodingExtensions.swift; path = web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift; sourceTree = ""; }; + 0F697DE9A9B9780448371273B4B4986B /* Web3+Contract.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Contract.swift"; path = "web3swift/Web3/Classes/Web3+Contract.swift"; sourceTree = ""; }; + 0FCE2106A870C9CA8289F01F2E005C3A /* EthereumABI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = EthereumABI.framework; path = EthereumABI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1160128225B85906623514D7D7090ECB /* CryptoSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CryptoSwift.xcconfig; sourceTree = ""; }; + 131215941945D5345AF8A047A6629C21 /* Generics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generics.swift; path = Sources/CryptoSwift/Generics.swift; sourceTree = ""; }; + 1400B4F7ABDE02B5070690E0E3F0F034 /* PromiseKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; + 1523249C10D0B6DDCE2D75CC807474FE /* CoreImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/CoreImage.framework; sourceTree = DEVELOPER_DIR; }; + 152A06BD6C4ED16E8910C53F87083FE8 /* afterlife.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Extensions/Foundation/Sources/afterlife.swift; sourceTree = ""; }; + 155CFF09263570C89932D22E5B5D569D /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/CryptoSwift/Operators.swift; sourceTree = ""; }; + 157ED0FBF8A2E71BFAA26655DA1359CC /* ZeroPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZeroPadding.swift; path = Sources/CryptoSwift/ZeroPadding.swift; sourceTree = ""; }; + 166AE9FC576B1A9469DA3090BD651D48 /* lax_der_privatekey_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_privatekey_parsing.c; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.c; sourceTree = ""; }; + 1681DF3FE5A4B672E29F13A64A64023E /* Authenticator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Authenticator.swift; path = Sources/CryptoSwift/Authenticator.swift; sourceTree = ""; }; + 168BEA0C8F8B3C8FA1F18A535A7B9160 /* ecdsa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa.h; path = Classes/secp256k1/src/ecdsa.h; sourceTree = ""; }; + 16AC0F8318A1676FBF02362F4595CDA5 /* field_5x52_int128_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_int128_impl.h; path = Classes/secp256k1/src/field_5x52_int128_impl.h; sourceTree = ""; }; + 16B862B079586F6EBC6B4D190AC2686A /* NSObject+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Extensions/Foundation/Sources/NSObject+Promise.swift"; sourceTree = ""; }; + 16D7549432B0837431D33DAA92B9633D /* UIView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Extensions/UIKit/Sources/UIView+Promise.swift"; sourceTree = ""; }; + 18496389CA5CA7BCFD42408FBE3EFA35 /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; + 1860F5FD511E1CDC0321E2D6EBA3AFC5 /* Promise+Web3+Eth+GetBlockByNumber.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetBlockByNumber.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByNumber.swift"; sourceTree = ""; }; + 18C24CF8C724DE2F030E4429AD7EF3B8 /* scalar_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_impl.h; path = Classes/secp256k1/src/scalar_impl.h; sourceTree = ""; }; + 195F208CF3D7F63BCB562753EBCD8DA2 /* secp256k1_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = secp256k1_swift.framework; path = secp256k1_swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A02CE100739858E7B58E0BC830FC666 /* field_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_impl.h; path = Classes/secp256k1/src/field_impl.h; sourceTree = ""; }; + 1A1038DC1633B7F9F4C06BE77D4DE0CD /* BIP32HDNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BIP32HDNode.swift; path = web3swift/KeystoreManager/Classes/BIP32HDNode.swift; sourceTree = ""; }; + 1BCF26ED236D1B8E24321ED226B25DF4 /* BloomFilter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BloomFilter.swift; path = web3swift/Transaction/Classes/BloomFilter.swift; sourceTree = ""; }; + 1CA6616160AC6F13FA7BCA2D9C4BB992 /* web3swift.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = web3swift.h; path = web3swift/web3swift.h; sourceTree = ""; }; + 1CEB1E0F5569F3E140EB5B421C414467 /* Process+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Process+Promise.swift"; path = "Extensions/Foundation/Sources/Process+Promise.swift"; sourceTree = ""; }; + 1CF0705033B0A2728CE16D3AF008DD51 /* scrypt.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scrypt.h; path = scrypt/scrypt.h; sourceTree = ""; }; + 1E3FA1F8BFCCBE4D42BF07BA07CD266D /* secp256k1_swift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = secp256k1_swift.modulemap; sourceTree = ""; }; + 1F8DBA32491646170BAF7A1ED104880B /* BufferStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BufferStorage.swift; path = scrypt/scrypt/BufferStorage.swift; sourceTree = ""; }; + 1F8EADC5334750EDCBC7BE9F4D4D5B3F /* BlockEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockEncryptor.swift; path = Sources/CryptoSwift/BlockEncryptor.swift; sourceTree = ""; }; + 1FC700A80452B10ACF64DF1C457425C7 /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; + 20F9F737EDFCFEF9830F0F4B621D83E4 /* Promise+Batching.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Batching.swift"; path = "web3swift/Promises/Classes/Promise+Batching.swift"; sourceTree = ""; }; 212605BDAABCB644B1BE530E4FB54E28 /* Pods-web3swiftExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-web3swiftExample.modulemap"; sourceTree = ""; }; - 2296888E4B0AF0932F150F5D557DD816 /* secp256k1.c */ = {isa = PBXFileReference; includeInIndex = 1; name = secp256k1.c; path = secp256k1_ios/src/secp256k1.c; sourceTree = ""; }; - 229A34F67F1DD0EA4F4DCB16AB734B28 /* Box.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Sources/Box.swift; sourceTree = ""; }; - 23101CE8BFD9EF3690B3991301140D48 /* Web3+HttpProvider+ObjC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+HttpProvider+ObjC.swift"; path = "web3swift/ObjectiveCbridge/Classes/Web3+HttpProvider+ObjC.swift"; sourceTree = ""; }; - 231C2D02CFF005D80CAD0308D882A69A /* NSURLSession+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Promise.swift"; path = "Extensions/Foundation/Sources/NSURLSession+Promise.swift"; sourceTree = ""; }; - 231D7535BE0908B8FA752378F694AB44 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; - 2377E7F5F6E1B9EAA04A11FB9329ECF5 /* ecmult_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_impl.h; path = secp256k1_ios/src/ecmult_impl.h; sourceTree = ""; }; - 27194B847928F8AF60CE9A6A913D8EAB /* Cimpl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Cimpl.h; path = scrypt/Cimpl.h; sourceTree = ""; }; - 273095CE17C51A9F55E72F26385B33D1 /* BlockDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockDecryptor.swift; path = Sources/CryptoSwift/BlockDecryptor.swift; sourceTree = ""; }; - 28D14AA0CBC0F7D8CB4FE9994C3B4B48 /* DigestType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DigestType.swift; path = Sources/CryptoSwift/DigestType.swift; sourceTree = ""; }; - 28FFFC9BD859F58312467FAB0ADBE711 /* ABIv2ParameterTypes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIv2ParameterTypes.swift; path = web3swift/ABIv2/Classes/ABIv2ParameterTypes.swift; sourceTree = ""; }; - 2A6FF6A14EF4D6724CFBFB93A4F4F681 /* Rabbit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rabbit.swift; path = Sources/CryptoSwift/Rabbit.swift; sourceTree = ""; }; - 2BAB8972F826F08F2AF2878A15874107 /* ABIv2Encoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIv2Encoding.swift; path = web3swift/ABIv2/Classes/ABIv2Encoding.swift; sourceTree = ""; }; - 2BBD7DF502B00E6CFC56DFE2C20E0D0D /* UInt128.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UInt128.swift; path = Sources/CryptoSwift/UInt128.swift; sourceTree = ""; }; - 2C0B26A0F1EDE1CDC241622A88F22672 /* hang.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = hang.swift; path = Sources/hang.swift; sourceTree = ""; }; - 2C73D7AA3EDD90DB64FE84C36BD6CF7B /* BigUInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigUInt.swift; path = sources/BigUInt.swift; sourceTree = ""; }; - 2CA9201F6EFC3831E810979D81E598C6 /* secp256k1_ios-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_ios-umbrella.h"; sourceTree = ""; }; - 2D50717C9986E80EF5499F2AA6C75531 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = BigInt.framework; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2DDFDF55E7005DEBC91225828C76BDB4 /* ecmult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult.h; path = secp256k1_ios/src/ecmult.h; sourceTree = ""; }; - 2E9C3E6A47F759D446C9633237D3587A /* Deprecations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecations.swift; path = Sources/Deprecations.swift; sourceTree = ""; }; - 2EAC8681CD7621782E51E812332E796A /* UInt16+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt16+Extension.swift"; path = "Sources/CryptoSwift/UInt16+Extension.swift"; sourceTree = ""; }; - 2F3B8889D0D18DEF2CF5F05EFCE9F568 /* UIViewPropertyAnimator+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewPropertyAnimator+Promise.swift"; path = "Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift"; sourceTree = ""; }; - 30B04630329D72AB07A6571B0E35368B /* field.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field.h; path = secp256k1_ios/src/field.h; sourceTree = ""; }; - 30D3D5E52087AC748C8081879D9C93E0 /* ChaCha20.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChaCha20.swift; path = Sources/CryptoSwift/ChaCha20.swift; sourceTree = ""; }; - 319DEB9643FEFA6C0B1D8706C28879A3 /* scratch.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch.h; path = secp256k1_ios/src/scratch.h; sourceTree = ""; }; - 3300B7C7FE5D1D9B98E0EB72BAAEC209 /* Cimpl.c */ = {isa = PBXFileReference; includeInIndex = 1; name = Cimpl.c; path = scrypt/Cimpl.c; sourceTree = ""; }; - 337C4D4BFF2B5999D19FC37E638F4708 /* web3swift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "web3swift-Info.plist"; sourceTree = ""; }; - 33C9F06AC6D082FC66126F531BBC3E3F /* UIView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.m"; sourceTree = ""; }; - 33D1449C4E8D84E0AC0DA60599B0DA23 /* NoError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoError.swift; path = Result/NoError.swift; sourceTree = ""; }; - 3404310B6A67105860E0486EF8879528 /* Cipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cipher.swift; path = Sources/CryptoSwift/Cipher.swift; sourceTree = ""; }; - 3404AAEF07BB50E914AAA75416AF8556 /* ecmult_gen.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen.h; path = secp256k1_ios/src/ecmult_gen.h; sourceTree = ""; }; - 343BA041D669379F08B4BA7E48C7BF65 /* ContractProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ContractProtocol.swift; path = web3swift/Contract/Classes/ContractProtocol.swift; sourceTree = ""; }; - 35741AB0833B23E77A7CB168A157FD90 /* Integer Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Integer Conversion.swift"; path = "sources/Integer Conversion.swift"; sourceTree = ""; }; - 358784469FD4600E5EB02F75BAF4163A /* CryptoSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-prefix.pch"; sourceTree = ""; }; - 35D65B1B12252C4CDBEF210FE2DA6E52 /* ECB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ECB.swift; path = Sources/CryptoSwift/BlockMode/ECB.swift; sourceTree = ""; }; - 36445A6F290DA01FBC4F26C0A5D31D70 /* PKCS7.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7.swift; path = Sources/CryptoSwift/PKCS/PKCS7.swift; sourceTree = ""; }; - 3842DFFAA24909073D4F960DC6AAF02B /* SipHash.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SipHash.xcconfig; sourceTree = ""; }; - 3952E3A45B4964ABA58E30423D7DA553 /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; - 39BB408B8F667DD11D993D29E0F0E69F /* PromiseKit-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "PromiseKit-Info.plist"; sourceTree = ""; }; - 3A402FB6C488D91DF67F023381022997 /* Web3+Options.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Options.swift"; path = "web3swift/Web3/Classes/Web3+Options.swift"; sourceTree = ""; }; - 3AB84887CB548044F04C66D21491F30C /* num_gmp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp.h; path = secp256k1_ios/src/num_gmp.h; sourceTree = ""; }; - 3BB6725C03A0E4193BC3CE2081AED530 /* ComparisonExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ComparisonExtensions.swift; path = web3swift/Contract/Classes/ComparisonExtensions.swift; sourceTree = ""; }; - 3CD6B2B92DB312F13E1B847E31A1B602 /* String+FoundationExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FoundationExtension.swift"; path = "Sources/CryptoSwift/Foundation/String+FoundationExtension.swift"; sourceTree = ""; }; - 3CD73B7D3181B0D94CE212502F3D74EE /* Promise+Web3+Personal+UnlockAccount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Personal+UnlockAccount.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift"; sourceTree = ""; }; + 22044D50374EB3808D2F5A905DD1D63C /* BigInt.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = BigInt.xcconfig; sourceTree = ""; }; + 229F4D226F1E6B09333978F7A65F9389 /* Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Poly1305.swift; path = Sources/CryptoSwift/Poly1305.swift; sourceTree = ""; }; + 22AB1F2D4F1253D1F55214A8B4A078B5 /* secp256k1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1.h; path = Classes/secp256k1/include/secp256k1.h; sourceTree = ""; }; + 22F727E1920C23DF6FA25C828FF37AE0 /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = Sources/CryptoSwift/CompactMap.swift; sourceTree = ""; }; + 24D4D47D06AA22BB74384BAB9BAD40F2 /* RandomUInt64.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomUInt64.swift; path = SipHash/RandomUInt64.swift; sourceTree = ""; }; + 25FC19565DA49D793DF9A348F223CB65 /* BatchedCollection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BatchedCollection.swift; path = Sources/CryptoSwift/BatchedCollection.swift; sourceTree = ""; }; + 2614F5FD7FA2BFCEC145FF6C4B3A1D56 /* Data+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Extension.swift"; path = "Sources/CryptoSwift/Foundation/Data+Extension.swift"; sourceTree = ""; }; + 26C2B3575B317F9C06CC8F79AFD07293 /* Int+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Int+Extension.swift"; path = "Sources/CryptoSwift/Int+Extension.swift"; sourceTree = ""; }; + 277E6BF4D08FCCC20EF73C9BA37B6AB8 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Configuration.swift; sourceTree = ""; }; + 27A601897D77B2B18E22FA26B5430F5B /* Box.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Sources/Box.swift; sourceTree = ""; }; + 294830F3AC6CB12044834E8F72282F23 /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; + 29D1BA04747B640515764C450DA1279D /* PBKDF1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF1.swift; path = Sources/CryptoSwift/PKCS/PBKDF1.swift; sourceTree = ""; }; + 2A2FE2AA1ED08312BA552C811B50A0ED /* StreamEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamEncryptor.swift; path = Sources/CryptoSwift/StreamEncryptor.swift; sourceTree = ""; }; + 2A30F7AD0E2CB204A73B0944A1D13857 /* Shifts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Shifts.swift; path = sources/Shifts.swift; sourceTree = ""; }; + 2A6500122B234FA6647C2568B72C2D9F /* UInt32+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt32+Extension.swift"; path = "Sources/CryptoSwift/UInt32+Extension.swift"; sourceTree = ""; }; + 2AE7BC021750BDB389FD1880944E68FE /* scrypt-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-prefix.pch"; sourceTree = ""; }; + 2BFBB3A57DFC4A14798203F7DD419319 /* Thenable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Thenable.swift; path = Sources/Thenable.swift; sourceTree = ""; }; + 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 2CEED24514490DF573FDE87A9F9F8971 /* PromiseKit-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "PromiseKit-Info.plist"; sourceTree = ""; }; + 2D47BF61850EFDEED83A76DA6498C213 /* Cimpl.c */ = {isa = PBXFileReference; includeInIndex = 1; name = Cimpl.c; path = scrypt/Cimpl.c; sourceTree = ""; }; + 2D4E60A3BD0A901CAE33DA9F09585890 /* HMAC+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "HMAC+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/HMAC+Foundation.swift"; sourceTree = ""; }; + 3028289D562E89D58F6AB987E4AA0EDD /* scalar_4x64_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64_impl.h; path = Classes/secp256k1/src/scalar_4x64_impl.h; sourceTree = ""; }; + 32380EA4D124B8A636BC9118466E6AAD /* CustomStringConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomStringConvertible.swift; path = Sources/CustomStringConvertible.swift; sourceTree = ""; }; + 331413774F7D7F0757A5F0B9B2DAA4BC /* EIP67Code.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EIP67Code.swift; path = web3swift/Utils/Classes/EIP67Code.swift; sourceTree = ""; }; + 34300D9F450A76F1C0795BAB8BBCE946 /* CTR.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CTR.swift; path = Sources/CryptoSwift/BlockMode/CTR.swift; sourceTree = ""; }; + 343E05569A3D9E6C883D808CAC28052F /* Blowfish+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Blowfish+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift"; sourceTree = ""; }; + 354A0764BBE4CFAD623CB810FEC76817 /* PBKDF2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF2.swift; path = Sources/CryptoSwift/PKCS/PBKDF2.swift; sourceTree = ""; }; + 35A75E22FE221D90EFEAB4998EBFE2C6 /* SHA1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA1.swift; path = Sources/CryptoSwift/SHA1.swift; sourceTree = ""; }; + 35B6B8F8751FD986339B26820E401B42 /* Prime Test.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Prime Test.swift"; path = "sources/Prime Test.swift"; sourceTree = ""; }; + 35FEE3FDEE40F28DDC2613F215AEB8CB /* BlockModeOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockModeOptions.swift; path = Sources/CryptoSwift/BlockMode/BlockModeOptions.swift; sourceTree = ""; }; + 36F8641D4C44BD3D0E08388287B61EB7 /* ecmult_const_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const_impl.h; path = Classes/secp256k1/src/ecmult_const_impl.h; sourceTree = ""; }; + 3705B10251AF105DFD9C06CAD8BF008B /* RLP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RLP.swift; path = Classes/RLP.swift; sourceTree = ""; }; + 37074DF9E43F92D14CB23B688C72FD89 /* BigUInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigUInt.swift; path = sources/BigUInt.swift; sourceTree = ""; }; + 37505D43721EBDF655CBC34F90544D5E /* SipHashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHashable.swift; path = SipHash/SipHashable.swift; sourceTree = ""; }; + 380373C357903D6101BBC00E60665458 /* Web3+MutatingTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+MutatingTransaction.swift"; path = "web3swift/Web3/Classes/Web3+MutatingTransaction.swift"; sourceTree = ""; }; + 385A9A999974E47DE373D35A9AC29663 /* UInt8+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt8+Extension.swift"; path = "Sources/CryptoSwift/UInt8+Extension.swift"; sourceTree = ""; }; + 385D20AD0ACBC7A4B01C25373D9EFAD4 /* Array+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Array+Foundation.swift"; sourceTree = ""; }; + 388C6DA468CB9B1A2BD750A77262C56F /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift"; sourceTree = ""; }; + 3966403CAFDAEF596DC3EBE24F85A758 /* EthereumAddress.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = EthereumAddress.modulemap; sourceTree = ""; }; + 3C37C7E9D0EDF73545C404CD099C00A6 /* BigUInt+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "BigUInt+Extensions.swift"; path = "web3swift/Convenience/Classes/BigUInt+Extensions.swift"; sourceTree = ""; }; + 3F1D07742B3A7F5A46E2A329DA441284 /* Codable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Codable.swift; path = sources/Codable.swift; sourceTree = ""; }; + 3F5A8DB4C575C89D51FB8509B3F37D66 /* BigInt-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "BigInt-Info.plist"; sourceTree = ""; }; 3F60C33EFDC8C38C9856833234D8A26E /* Pods-web3swiftExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-web3swiftExample-acknowledgements.markdown"; sourceTree = ""; }; - 40B4DEF14A7DE548CFEF7B62B06AF62D /* UInt64+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt64+Extension.swift"; path = "Sources/CryptoSwift/UInt64+Extension.swift"; sourceTree = ""; }; - 41455399C8B4A289650ADB5856F86D5E /* PlainKeystore+ObjC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PlainKeystore+ObjC.swift"; path = "web3swift/ObjectiveCbridge/Classes/PlainKeystore+ObjC.swift"; sourceTree = ""; }; - 421EFAA21C55AAB5DBB49F3C8F2D1551 /* RandomUInt64.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomUInt64.swift; path = SipHash/RandomUInt64.swift; sourceTree = ""; }; - 43E25994494B329B440C18037489E9DF /* web3swift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "web3swift-dummy.m"; sourceTree = ""; }; - 44563320842BB46660FEE233AA4A38BD /* UInt32+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt32+Extension.swift"; path = "Sources/CryptoSwift/UInt32+Extension.swift"; sourceTree = ""; }; - 44D07ED0C754D51CF6C2BC1702DD564E /* Web3+Instance+ObjC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Instance+ObjC.swift"; path = "web3swift/ObjectiveCbridge/Classes/Web3+Instance+ObjC.swift"; sourceTree = ""; }; - 45A7CC7C99E72DAA6B9C339B4B45B6F0 /* Multiplication.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multiplication.swift; path = sources/Multiplication.swift; sourceTree = ""; }; - 45F2F797BEAEC4E38CE2D033EE44613C /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/CryptoSwift/Operators.swift; sourceTree = ""; }; - 4770FB1CC45B404A730863A5BBDE8C9F /* Digest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Digest.swift; path = Sources/CryptoSwift/Digest.swift; sourceTree = ""; }; - 47E492FFFE405B5C351862A29154F2D4 /* Result.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Result.modulemap; sourceTree = ""; }; - 47EE1AE862AC1E08A3510AE8A3ACC49E /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; - 47F253E5C15DCAA5F32728BF380B7FD3 /* Promise+Web3+Eth+GetGasPrice.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetGasPrice.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetGasPrice.swift"; sourceTree = ""; }; - 48196F281BA919DA7663337369FF2F2E /* CryptoSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CryptoSwift.modulemap; sourceTree = ""; }; - 48EB818C63ADD7AC3471D41B7FEFBEDE /* ecmult_const.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const.h; path = secp256k1_ios/src/ecmult_const.h; sourceTree = ""; }; - 4ABD85E6008589BB486729FDD20F2263 /* ABIv2TypeParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIv2TypeParser.swift; path = web3swift/ABIv2/Classes/ABIv2TypeParser.swift; sourceTree = ""; }; - 4AD2681608D7996F0B97567E76E38B0E /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = Sources/CryptoSwift/CompactMap.swift; sourceTree = ""; }; - 4B4A8E6D5817207A8BAFC2040BACBDF0 /* Strideable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Strideable.swift; path = sources/Strideable.swift; sourceTree = ""; }; - 4B857314AF2E96C8DA7CAAEFAEF1F7A8 /* Promise+Web3+Eth+GetTransactionCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetTransactionCount.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift"; sourceTree = ""; }; - 4BE0A0A33E52AD56332877241A1F5465 /* Process+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Process+Promise.swift"; path = "Extensions/Foundation/Sources/Process+Promise.swift"; sourceTree = ""; }; - 4C5FE3E2EF6CCCB0A8CA29C7C6F63DEE /* SHA3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA3.swift; path = Sources/CryptoSwift/SHA3.swift; sourceTree = ""; }; - 4D8953CE81298B6C1067F23B6A71EEBD /* web3swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = web3swift.framework; path = web3swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 4E59725DE3DCFD49F652BE2F16C05B26 /* PCBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PCBC.swift; path = Sources/CryptoSwift/BlockMode/PCBC.swift; sourceTree = ""; }; - 4E642878C5D7B7E8AAF50ACE887F81C9 /* Array+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Extension.swift"; path = "Sources/CryptoSwift/Array+Extension.swift"; sourceTree = ""; }; - 4F92E92F01ED8E6C9F66CB063E0B54DD /* web3swift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = web3swift.xcconfig; sourceTree = ""; }; - 4FB2C4AB5AF97836C7414A2306478544 /* CryptoSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-umbrella.h"; sourceTree = ""; }; - 502FB30F03AEBAD4F849FA1E03E60319 /* SipHash.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SipHash.modulemap; sourceTree = ""; }; + 3F9BFEEC4833708E9B4067DFD84C5DBB /* field_10x26_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26_impl.h; path = Classes/secp256k1/src/field_10x26_impl.h; sourceTree = ""; }; + 3FBFE3F22B4E7AE72FCC6A2C5F9B20E8 /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; + 4039FF96173F8D1FD541617AFC84F660 /* Data+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Extension.swift"; path = "web3swift/Convenience/Classes/Data+Extension.swift"; sourceTree = ""; }; + 404FC9F4A1E9D404A14FDFD25794F248 /* hash_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash_impl.h; path = Classes/secp256k1/src/hash_impl.h; sourceTree = ""; }; + 4122BE1E9FD4A604314CE85B4CDFAEBF /* Scrypt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scrypt.swift; path = scrypt/scrypt/Scrypt.swift; sourceTree = ""; }; + 4174025F0AA7FD9B02D3F2F5E4F617BC /* ABITypeParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABITypeParser.swift; path = EthereumABI/Classes/ABITypeParser.swift; sourceTree = ""; }; + 421A57EB83513643E294B2EABE8B0200 /* ABIElements.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIElements.swift; path = EthereumABI/Classes/ABIElements.swift; sourceTree = ""; }; + 42B057F2BE3C7A1BC0A9BED2F4BA8C41 /* SipHash-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SipHash-Info.plist"; sourceTree = ""; }; + 43C85B8AD6FC929A0DD4ED8A7F71D777 /* Web3+TxPool.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+TxPool.swift"; path = "web3swift/Web3/Classes/Web3+TxPool.swift"; sourceTree = ""; }; + 44C36C457BDC5A424B73FED2BF2B0CF7 /* SipHash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SipHash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 45AA16F4A39E2367C4A4059E1314661D /* eckey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey.h; path = Classes/secp256k1/src/eckey.h; sourceTree = ""; }; + 45C266B7095DCF8E4E4847CC708EC1BA /* group_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group_impl.h; path = Classes/secp256k1/src/group_impl.h; sourceTree = ""; }; + 4621B79FEA77C668B08A9E4B0CF0C7B6 /* scrypt-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-umbrella.h"; sourceTree = ""; }; + 4673A58E053194AE130B84DD19ADFC40 /* secp256k1.c */ = {isa = PBXFileReference; includeInIndex = 1; name = secp256k1.c; path = Classes/secp256k1/src/secp256k1.c; sourceTree = ""; }; + 46C0D5E07A4C170FDD09AB0EB76EF331 /* Web3+Eventloop.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Eventloop.swift"; path = "web3swift/Web3/Classes/Web3+Eventloop.swift"; sourceTree = ""; }; + 47098DB41878FF379AEBC8644EC53E97 /* SwiftRLP-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftRLP-dummy.m"; sourceTree = ""; }; + 4754D5FD3244548E259E3E0F25D01E84 /* hash.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash.h; path = Classes/secp256k1/src/hash.h; sourceTree = ""; }; + 481105AB5C9354EBAAB3E816CFBF3D9A /* NSTask+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSTask+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.m"; sourceTree = ""; }; + 482D19E42A30F218E678D351C13B155A /* Updatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Updatable.swift; path = Sources/CryptoSwift/Updatable.swift; sourceTree = ""; }; + 494227A474FF5A70499FC2D9B78A674E /* EthereumABI-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumABI-prefix.pch"; sourceTree = ""; }; + 4A706CB0950B86EBBB4A53A66D0BB57C /* fwd.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = fwd.h; path = Sources/fwd.h; sourceTree = ""; }; + 4B0FD4ABBB0CE03A9B8551B57E7B20F5 /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = sources/Random.swift; sourceTree = ""; }; + 4BC345225A9FFFEDFD6BCCDA6BB4F076 /* AES+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AES+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/AES+Foundation.swift"; sourceTree = ""; }; + 4CF166364A9E5E97DD45519B5D546ABE /* EventFiltering.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EventFiltering.swift; path = web3swift/Contract/Classes/EventFiltering.swift; sourceTree = ""; }; + 4D7C4589F40A8060A568CB4849358370 /* EthereumAddress-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "EthereumAddress-Info.plist"; sourceTree = ""; }; + 4E04CEFD47ECF7B1AA7B9BA50AF1D68E /* MD5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MD5.swift; path = Sources/CryptoSwift/MD5.swift; sourceTree = ""; }; + 4F8FBC6FA4567C651C24DACB88FAA458 /* Promise+Web3+Eth+GetBalance.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetBalance.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift"; sourceTree = ""; }; + 4F90EA173730B99F47DB58B7C701FCE6 /* NoPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoPadding.swift; path = Sources/CryptoSwift/NoPadding.swift; sourceTree = ""; }; 50ABF7F2053D09965350B67F7E0E76E2 /* Pods-web3swiftExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-web3swiftExample.release.xcconfig"; sourceTree = ""; }; - 5114E6B22DBDF708ECE7C3019E5D6106 /* Web3+Methods.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Methods.swift"; path = "web3swift/Web3/Classes/Web3+Methods.swift"; sourceTree = ""; }; - 51901516BECC0FFD77E736D256965599 /* Promise+Web3+Eth+GetTransactionReceipt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetTransactionReceipt.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionReceipt.swift"; sourceTree = ""; }; - 524B42290B9A4F88D091689A5D402C4E /* scrypt-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "scrypt-Info.plist"; sourceTree = ""; }; - 52989BD6A3046CDEC153D8C28451A374 /* HMAC+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "HMAC+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/HMAC+Foundation.swift"; sourceTree = ""; }; - 5628BB0370E6607CB7726B6ED62CA7E7 /* EthereumTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumTransaction.swift; path = web3swift/Transaction/Classes/EthereumTransaction.swift; sourceTree = ""; }; - 569540840E89CA743338311B4EAAC218 /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = secp256k1_ios/src/modules/recovery/main_impl.h; sourceTree = ""; }; - 57C115113180DDD97A209C450A323C0E /* SecureBytes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SecureBytes.swift; path = Sources/CryptoSwift/SecureBytes.swift; sourceTree = ""; }; - 5880EBFDE3CDA613E195C8DB98E11E33 /* CryptoSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CryptoSwift-Info.plist"; sourceTree = ""; }; - 59DEE9838482282D026880491D6A09B8 /* AES+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AES+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/AES+Foundation.swift"; sourceTree = ""; }; - 5B31B02CBA5CE3418CD0D8EF2390E656 /* Floating Point Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Floating Point Conversion.swift"; path = "sources/Floating Point Conversion.swift"; sourceTree = ""; }; + 51B1F68A1905071C4890C6F9B2280237 /* CMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CMAC.swift; path = Sources/CryptoSwift/CMAC.swift; sourceTree = ""; }; + 525E38091E2E2E782C02FA0EEEDA2179 /* SipHash.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SipHash.modulemap; sourceTree = ""; }; + 546F993BFB7CD1EB1D1DF4E918774017 /* web3swift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "web3swift-prefix.pch"; sourceTree = ""; }; + 57DDA8DDDF0407F9774D0CD39E20307B /* CFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CFB.swift; path = Sources/CryptoSwift/BlockMode/CFB.swift; sourceTree = ""; }; + 5AEAC26BB970A98BAA6CD7B30F5094D2 /* UIView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.h"; sourceTree = ""; }; + 5CADF98FCCC9B29F22C0815C40CFA3B2 /* basic-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "basic-config.h"; path = "Classes/secp256k1/src/basic-config.h"; sourceTree = ""; }; 5CB41387E485225E0BC8B079979EEF3D /* Pods-web3swiftExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-web3swiftExample-umbrella.h"; sourceTree = ""; }; - 5E4678722B01715F2B3716BD3AF97D05 /* BlockCipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockCipher.swift; path = Sources/CryptoSwift/BlockCipher.swift; sourceTree = ""; }; - 5E6BCC699F0A197E17875C4F23F79E33 /* Web3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Web3.swift; path = web3swift/Web3/Classes/Web3.swift; sourceTree = ""; }; - 5F5893B28387D9A3B3938E5EED54AD58 /* web3swift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "web3swift-umbrella.h"; sourceTree = ""; }; - 5FFDE44AE604DA940226CE09D970A58A /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; - 603D0BBCC0547440419CBD2E29526BBC /* secp256k1_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = secp256k1_ios.framework; path = secp256k1_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 6153FF45F92075AB612127F5BACFD9A6 /* eckey_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey_impl.h; path = secp256k1_ios/src/eckey_impl.h; sourceTree = ""; }; - 6158BF72A61B2B3CE2240025C34B8A23 /* scalar_low_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low_impl.h; path = secp256k1_ios/src/scalar_low_impl.h; sourceTree = ""; }; - 61B2EEC1A0CED11A8CD095B884755F14 /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; - 62C2D8DAB77DC8A25C4E449BC300AFDA /* EthereumFilterEncodingExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumFilterEncodingExtensions.swift; path = web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift; sourceTree = ""; }; - 63389BFC9E764A984175469F04E6C321 /* SipHash-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SipHash-Info.plist"; sourceTree = ""; }; - 63ECDB3BEF180F5E5465DF3D9196A913 /* Int+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Int+Extension.swift"; path = "Sources/CryptoSwift/Int+Extension.swift"; sourceTree = ""; }; - 67560E83D58D59D4B717878DC0D71057 /* UInt8+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt8+Extension.swift"; path = "Sources/CryptoSwift/UInt8+Extension.swift"; sourceTree = ""; }; - 67DB53803B8AFF12F28E47500E5FA4D5 /* NativeTypesEncoding+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NativeTypesEncoding+Extensions.swift"; path = "web3swift/Convenience/Classes/NativeTypesEncoding+Extensions.swift"; sourceTree = ""; }; - 6851DCEA08736B9FD49677B930D804B9 /* Promise+Web3+Eth+EstimateGas.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+EstimateGas.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift"; sourceTree = ""; }; - 68CF1A1605BD327E75915D5F85D673FD /* NSNotificationCenter+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSNotificationCenter+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m"; sourceTree = ""; }; - 6A0D7C8248B11637C656458A2F76AA99 /* AES.Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.Cryptors.swift; path = Sources/CryptoSwift/AES.Cryptors.swift; sourceTree = ""; }; - 6B0281225D044E95B9D81942D287340B /* AnyError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyError.swift; path = Result/AnyError.swift; sourceTree = ""; }; - 6B2D0E063799E56A90B8804B84308E65 /* ecmult_const_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const_impl.h; path = secp256k1_ios/src/ecmult_const_impl.h; sourceTree = ""; }; - 6C15C5D29D981FFD7DB03B256FD134EE /* fwd.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = fwd.h; path = Sources/fwd.h; sourceTree = ""; }; - 6C21482587A67BA39CA7974A927325E6 /* web3swift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "web3swift-prefix.pch"; sourceTree = ""; }; - 6CC48F7531359D8D25C876099C73CD53 /* BigUInt+ObjC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "BigUInt+ObjC.swift"; path = "web3swift/ObjectiveCbridge/Classes/BigUInt+ObjC.swift"; sourceTree = ""; }; - 6CDD0D9B03D820E5086D9498D2D9DD67 /* Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Padding.swift; path = Sources/CryptoSwift/Padding.swift; sourceTree = ""; }; - 6DECD15F168F64C6F6C8A1C193D7C1AC /* scrypt-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "scrypt-prefix.pch"; sourceTree = ""; }; - 6E13296A1B1E4B39699423E4D419FD51 /* Generics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generics.swift; path = Sources/CryptoSwift/Generics.swift; sourceTree = ""; }; - 6EB4026359CE620C0114B424CBA5D40D /* basic-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "basic-config.h"; path = "secp256k1_ios/src/basic-config.h"; sourceTree = ""; }; - 6FDA4F7EC9B81938EE471ECE2284AECA /* Resolver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Resolver.swift; path = Sources/Resolver.swift; sourceTree = ""; }; - 703E60310515C9DAE5C5B44D4ADEF09D /* Promise+Web3+Eth+GetAccounts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetAccounts.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift"; sourceTree = ""; }; - 707432298CD4D86FB4904B22A030DBAD /* RandomBytesSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomBytesSequence.swift; path = Sources/CryptoSwift/RandomBytesSequence.swift; sourceTree = ""; }; - 716FEE6D4ADC494CA5E7323805A351DC /* PBKDF1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF1.swift; path = Sources/CryptoSwift/PKCS/PBKDF1.swift; sourceTree = ""; }; - 72070A5E4D81C0DC66FD2630AB64FC35 /* scalar_8x32_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32_impl.h; path = secp256k1_ios/src/scalar_8x32_impl.h; sourceTree = ""; }; - 728F62119180B063304005EF9E109C72 /* scrypt-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "scrypt-dummy.m"; sourceTree = ""; }; - 7319C8DEF058868FAB938FAD22813553 /* BigInt-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BigInt-dummy.m"; sourceTree = ""; }; - 73385F119353E84309DFB29961588151 /* BatchedCollection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BatchedCollection.swift; path = Sources/CryptoSwift/BatchedCollection.swift; sourceTree = ""; }; - 75B3B434BA45820CF5E1DB7A0EF864BB /* BigInt-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "BigInt-Info.plist"; sourceTree = ""; }; - 760BFA726AD56024C4B56015DD4F59D0 /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PromiseKit.modulemap; sourceTree = ""; }; - 77A70D9FDCE012F5EE544AB6DF184E74 /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; - 783C789DDF22F7B1CD81D5223F61B0AD /* ABIv2Elements.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIv2Elements.swift; path = web3swift/ABIv2/Classes/ABIv2Elements.swift; sourceTree = ""; }; - 7857CCE04CD7E06C41D8CFAD0FF6486A /* field_10x26.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26.h; path = secp256k1_ios/src/field_10x26.h; sourceTree = ""; }; - 78D5360A2EE87EB571652044CCFFCDDC /* num_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_impl.h; path = secp256k1_ios/src/num_impl.h; sourceTree = ""; }; - 792AC5301BC3E29E4EF8E519E96F1ECC /* Web3+Eth.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Eth.swift"; path = "web3swift/Web3/Classes/Web3+Eth.swift"; sourceTree = ""; }; - 793565E05F87C940B4D333C65EBEDE8B /* Web3+ObjC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+ObjC.swift"; path = "web3swift/ObjectiveCbridge/Classes/Web3+ObjC.swift"; sourceTree = ""; }; - 7953FD02CB8930FFAF01F2D9C9032454 /* CryptoSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CryptoSwift.xcconfig; sourceTree = ""; }; - 7A09EE23C660A1403809F462D2A1C0B7 /* field_5x52_int128_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_int128_impl.h; path = secp256k1_ios/src/field_5x52_int128_impl.h; sourceTree = ""; }; - 7A25076F49F8EC969977B47A3D270973 /* NoPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoPadding.swift; path = Sources/CryptoSwift/NoPadding.swift; sourceTree = ""; }; - 7AE9359608C045D06EB2204BF13F3E78 /* lax_der_privatekey_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_privatekey_parsing.c; path = secp256k1_ios/contrib/lax_der_privatekey_parsing.c; sourceTree = ""; }; - 7D58637E65FA215EA3F838A635924646 /* Catchable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catchable.swift; path = Sources/Catchable.swift; sourceTree = ""; }; - 7D83A97A877542A2EC6DCA88DD2028EB /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Extension.swift"; path = "Sources/CryptoSwift/String+Extension.swift"; sourceTree = ""; }; - 7E849077E96B6057FFFCBFE60E29E639 /* scratch_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch_impl.h; path = secp256k1_ios/src/scratch_impl.h; sourceTree = ""; }; - 7EE987122C612CB4F255D6C9980D5D36 /* PromiseKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; - 7EF9F4D741B2D1D2C8FCD47B3152DA9A /* EthereumAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumAddress.swift; path = web3swift/KeystoreManager/Classes/EthereumAddress.swift; sourceTree = ""; }; - 7F20F56831A09E0B4A45D3E47576CF42 /* lax_der_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_parsing.h; path = secp256k1_ios/contrib/lax_der_parsing.h; sourceTree = ""; }; - 80252C1601887FBAA6A92A7774A1AFE9 /* EventFiltering.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EventFiltering.swift; path = web3swift/Contract/Classes/EventFiltering.swift; sourceTree = ""; }; - 81DA673B05C77642F07D69EA4532425B /* RIPEMD160+StackOveflow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "RIPEMD160+StackOveflow.swift"; path = "web3swift/Convenience/Classes/RIPEMD160+StackOveflow.swift"; sourceTree = ""; }; - 81DE6AEFFC0C4855DC44FB339A0BDE6C /* secp256k1_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = secp256k1_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8226327992DEFCB5999614EAE8BBD2BA /* secp256k1_ios-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "secp256k1_ios-Info.plist"; sourceTree = ""; }; - 8270CDEF1F71C3CBE99FC3628AC3EBA7 /* StreamEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamEncryptor.swift; path = Sources/CryptoSwift/StreamEncryptor.swift; sourceTree = ""; }; - 82DA4B0181B2D7385FE66132570022B0 /* Base58.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Base58.swift; path = web3swift/Convenience/Classes/Base58.swift; sourceTree = ""; }; - 836DA51652F74890CF6989C60C0E8ADC /* scrypt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = scrypt.framework; path = scrypt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 84D207BADF2861BAEE09DB0F0100D9C8 /* Thenable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Thenable.swift; path = Sources/Thenable.swift; sourceTree = ""; }; - 85D15B3C77562CE1D76E17840810174E /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = sources/Random.swift; sourceTree = ""; }; - 86C1E8D67E7B36A868205B54D0DB924D /* BigInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigInt.swift; path = sources/BigInt.swift; sourceTree = ""; }; - 880358145E7B982F9FCB5D316EB4DAB4 /* Array+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Array+Foundation.swift"; sourceTree = ""; }; - 884AD9080264D98178A80967D3D5D937 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PromiseKit.framework; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 891EED47DC73A8B323F748EA2676F146 /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; - 8A4893E75518CE78AD46F09C2B0BCB86 /* Bit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bit.swift; path = Sources/CryptoSwift/Bit.swift; sourceTree = ""; }; - 8A95DBF14B5B5C4080A5984C12B11FB1 /* scalar_low.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low.h; path = secp256k1_ios/src/scalar_low.h; sourceTree = ""; }; - 8ABD49EF51122D8FA6197117E9244422 /* web3swift.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = web3swift.h; path = web3swift/web3swift.h; sourceTree = ""; }; - 8BD2E83F8EC164E54CDED400AD9CFFE0 /* CryptoExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CryptoExtensions.swift; path = web3swift/Convenience/Classes/CryptoExtensions.swift; sourceTree = ""; }; - 8C1AB9A135AD942B8A7A7B281141EB93 /* IBAN.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IBAN.swift; path = web3swift/KeystoreManager/Classes/IBAN.swift; sourceTree = ""; }; - 8C327B5F182BF8DF005B76982E2419A2 /* Utils+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Utils+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Utils+Foundation.swift"; sourceTree = ""; }; - 8DBB8EB538986AEF569A595AD56B2CB9 /* CustomStringConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomStringConvertible.swift; path = Sources/CustomStringConvertible.swift; sourceTree = ""; }; - 8F599A827CAE59ECD5DA613ADD1801A7 /* Blowfish.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Blowfish.swift; path = Sources/CryptoSwift/Blowfish.swift; sourceTree = ""; }; - 8F8C6DCFB940EB1AE8254FC269A0EBE9 /* Promise+Web3+Eth+GetBlockNumber.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetBlockNumber.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockNumber.swift"; sourceTree = ""; }; - 8FA4BD088591072E3F8E937FC348CF9C /* Result-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-dummy.m"; sourceTree = ""; }; - 8FC0F0D599A825FC0C5FE165BCB8EB0A /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Extension.swift"; path = "web3swift/Convenience/Classes/String+Extension.swift"; sourceTree = ""; }; - 8FC82B238B016E51FBE7F8F1C2462A73 /* Data+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Extension.swift"; path = "Sources/CryptoSwift/Foundation/Data+Extension.swift"; sourceTree = ""; }; - 9062B9AD79A1FFCD8E4C3D3BBAD22417 /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; - 91FF287A2D6F4A4F78AB5F96F8D6B6C3 /* BigInt-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-umbrella.h"; sourceTree = ""; }; - 926206F9931948DD8CBFD7D9EABD033C /* secp256k1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1.h; path = secp256k1_ios/include/secp256k1.h; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 93F85B21BC57EE24795630B658B179F0 /* ecmult_gen_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen_impl.h; path = secp256k1_ios/src/ecmult_gen_impl.h; sourceTree = ""; }; - 9554A1412BDC823D749F20DEFFDCE38E /* AEADChaCha20Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEADChaCha20Poly1305.swift; path = Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift; sourceTree = ""; }; - 9777D406113094F2B17BC4424F7329BB /* BigInt.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = BigInt.xcconfig; sourceTree = ""; }; - 97BDBF4C5CA18216A7B59BE4733E8907 /* CryptoSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CryptoSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 986FB1624E314E5F2E9F13EF4B8175CB /* EIP681.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EIP681.swift; path = web3swift/Utils/Classes/EIP681.swift; sourceTree = ""; }; - 98A2FBCCE443F266993B3935B6D04F58 /* SipHasher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHasher.swift; path = SipHash/SipHasher.swift; sourceTree = ""; }; - 98D040F49C5324D284DD9F2514B31740 /* BlockExplorer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockExplorer.swift; path = web3swift/BlockExplorer/Classes/BlockExplorer.swift; sourceTree = ""; }; - 98F7CA5B3DED455C4A7996A4D4163AA0 /* secp256k1_recovery.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_recovery.h; path = secp256k1_ios/include/secp256k1_recovery.h; sourceTree = ""; }; - 998D75A403FDA6A5E849C8AD8F7837D3 /* Promise+Web3+Eth+SendTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+SendTransaction.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift"; sourceTree = ""; }; - 99D3AA13FF0CF2C33FD2CB7EF9FE4214 /* Promise+Web3+Personal+Sign.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Personal+Sign.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift"; sourceTree = ""; }; - 99F4C0E8C3EE8B472BEEC0F2E1795295 /* Division.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Division.swift; path = sources/Division.swift; sourceTree = ""; }; - 9A40978EBB425827600AB1B975DAFEE5 /* Rabbit+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Rabbit+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift"; sourceTree = ""; }; - 9A6CCBF638311206CEFF4108D56E0D6C /* Web3+Wallet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Wallet.swift"; path = "web3swift/HookedFunctions/Classes/Web3+Wallet.swift"; sourceTree = ""; }; - 9A79309B24D8A8530113424A9369C8B6 /* scrypt.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = scrypt.modulemap; sourceTree = ""; }; - 9BC92AB3E8B43B6FEFE7AB4748793AE7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 9FBF4238285101EB5008F25E7C17DB9A /* NSURLSession+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLSession+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.h"; sourceTree = ""; }; - A03CE4B278E0C83715E59182E1F70067 /* field_5x52.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52.h; path = secp256k1_ios/src/field_5x52.h; sourceTree = ""; }; - A04EB2E762C3C146021C34F31E991075 /* BlockMode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockMode.swift; path = Sources/CryptoSwift/BlockMode/BlockMode.swift; sourceTree = ""; }; - A0B29A79F216917DB7C1E8D51E2B29AA /* NSURLSession+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLSession+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.m"; sourceTree = ""; }; - A0B4DEDF5D53AB822C732F43AFB83EA6 /* Web3+JSONRPC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+JSONRPC.swift"; path = "web3swift/Web3/Classes/Web3+JSONRPC.swift"; sourceTree = ""; }; - A0C7EF8D801C5AF4AB0F1802971A0768 /* Dictionary+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Dictionary+Extension.swift"; path = "web3swift/Convenience/Classes/Dictionary+Extension.swift"; sourceTree = ""; }; - A147CC10074D694F4FEDAD5C37A4345E /* BlockModeOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockModeOptions.swift; path = Sources/CryptoSwift/BlockMode/BlockModeOptions.swift; sourceTree = ""; }; - A18BCBAF1463ABC38E43C310C8A5DC49 /* Subtraction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Subtraction.swift; path = sources/Subtraction.swift; sourceTree = ""; }; - A1A1E5950E2319371590A7F1B55689D0 /* CipherModeWorker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CipherModeWorker.swift; path = Sources/CryptoSwift/BlockMode/CipherModeWorker.swift; sourceTree = ""; }; + 5DBCD77147B6CFE8E4D75C61EE88C171 /* Web3+HttpProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+HttpProvider.swift"; path = "web3swift/Web3/Classes/Web3+HttpProvider.swift"; sourceTree = ""; }; + 5E005CD6FAFA3B7D23F16DCFEE03883E /* Web3+Personal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Personal.swift"; path = "web3swift/Web3/Classes/Web3+Personal.swift"; sourceTree = ""; }; + 5F5CDE3B4FB757B3F0106FD88431B923 /* BlockCipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockCipher.swift; path = Sources/CryptoSwift/BlockCipher.swift; sourceTree = ""; }; + 607E73BBF9CE339CE9237C758D8B09FC /* Data Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data Conversion.swift"; path = "sources/Data Conversion.swift"; sourceTree = ""; }; + 612041911C9ABF085CC39D4CD9864737 /* String Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String Conversion.swift"; path = "sources/String Conversion.swift"; sourceTree = ""; }; + 617463151A102A6AE3996BBA956F7E7B /* Web3+Options.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Options.swift"; path = "web3swift/Web3/Classes/Web3+Options.swift"; sourceTree = ""; }; + 62B3D5FA72C0FCAE1E2F6158F0F73411 /* CryptoSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CryptoSwift-Info.plist"; sourceTree = ""; }; + 6376866618A41A278BF5C4477B074CD1 /* secp256k1_swift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-umbrella.h"; sourceTree = ""; }; + 63FD588C06FA711CDCC9813DE8AAA0AF /* PKCS5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS5.swift; path = Sources/CryptoSwift/PKCS/PKCS5.swift; sourceTree = ""; }; + 640FA460736D514832EF0074EDBC3B08 /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.h"; sourceTree = ""; }; + 645B2C2B288B7EDC7BAAE3C5A2A09E04 /* ABIParsing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIParsing.swift; path = EthereumABI/Classes/ABIParsing.swift; sourceTree = ""; }; + 645D691F588C30A8463CBB40081960A8 /* Rabbit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rabbit.swift; path = Sources/CryptoSwift/Rabbit.swift; sourceTree = ""; }; + 64E4ADB46AD6A716EBE5FEE6B3F98341 /* RIPEMD160+StackOveflow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "RIPEMD160+StackOveflow.swift"; path = "web3swift/Convenience/Classes/RIPEMD160+StackOveflow.swift"; sourceTree = ""; }; + 66FBB836159737A49CA20283E62CA819 /* Catchable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catchable.swift; path = Sources/Catchable.swift; sourceTree = ""; }; + 681530AB9C692077CCA2B03BF1DDED10 /* BIP32Keystore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BIP32Keystore.swift; path = web3swift/KeystoreManager/Classes/BIP32Keystore.swift; sourceTree = ""; }; + 68623D000FFCEB2CC7E1017DE7B6EAAB /* BlockMode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockMode.swift; path = Sources/CryptoSwift/BlockMode/BlockMode.swift; sourceTree = ""; }; + 68E6E31894426B0E48756676D9FEA4D8 /* scrypt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = scrypt.framework; path = scrypt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 68FBA8773B17FF0BE969F589278D0761 /* Web3+Instance.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Instance.swift"; path = "web3swift/Web3/Classes/Web3+Instance.swift"; sourceTree = ""; }; + 693AFA81068283C937D0CA94D38E4722 /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; + 69A7034547608D113E9F306249220251 /* field.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field.h; path = Classes/secp256k1/src/field.h; sourceTree = ""; }; + 6B3AACA619772B384FE61866B88EA981 /* ecmult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult.h; path = Classes/secp256k1/src/ecmult.h; sourceTree = ""; }; + 6C47EE1AA0C0CE661EBC27D485F20EA3 /* SwiftRLP-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftRLP-umbrella.h"; sourceTree = ""; }; + 6C63E5B7E9EA6F822D6C2F402AAC2856 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6C7A9472FF71EC33BE7131124C53835E /* Cimpl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Cimpl.h; path = scrypt/Cimpl.h; sourceTree = ""; }; + 6CCF7466D93DF6DD36039CF7787829EA /* scrypt-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "scrypt-Info.plist"; sourceTree = ""; }; + 6D616168A7A23B7AB1995D8FCE9E3C53 /* GCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCM.swift; path = Sources/CryptoSwift/BlockMode/GCM.swift; sourceTree = ""; }; + 6E2D8D233951D90BE212C1683EDBE096 /* Promise+Web3+Eth+SendRawTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+SendRawTransaction.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift"; sourceTree = ""; }; + 6E507073C6A899B5150C313DA3E1E7FF /* Web3+Eth.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Eth.swift"; path = "web3swift/Web3/Classes/Web3+Eth.swift"; sourceTree = ""; }; + 712C8CFFF313A75DD19030E239230234 /* Salsa.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Salsa.swift; path = scrypt/scrypt/Salsa.swift; sourceTree = ""; }; + 71B0B58F78D56703F9250DC12E414AD7 /* Bit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bit.swift; path = Sources/CryptoSwift/Bit.swift; sourceTree = ""; }; + 721C4F03AEEF9F7B6768DD8E1133971D /* Division.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Division.swift; path = sources/Division.swift; sourceTree = ""; }; + 724C44BB8A759DE7BA8C45425E26F27A /* scalar_low.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low.h; path = Classes/secp256k1/src/scalar_low.h; sourceTree = ""; }; + 727727B1D330C3E96EEC5855430FB9E5 /* Promise+Web3+Personal+CreateAccount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Personal+CreateAccount.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Personal+CreateAccount.swift"; sourceTree = ""; }; + 72A31D2A6C2335199394826F5AB60411 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7411A68C8F8AC8841EA5B8E91256B11E /* BigInt-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BigInt-dummy.m"; sourceTree = ""; }; + 74569BCFAE1C489C9D0FE3248C5CED66 /* field_5x52_asm_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_asm_impl.h; path = Classes/secp256k1/src/field_5x52_asm_impl.h; sourceTree = ""; }; + 7471D4ED5465C42EB4CEE0034421F62D /* RandomBytesSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RandomBytesSequence.swift; path = Sources/CryptoSwift/RandomBytesSequence.swift; sourceTree = ""; }; + 77783A545C644FB0696DAD1722E5944D /* EthereumAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EthereumAddress.h; path = EthereumAddress/EthereumAddress.h; sourceTree = ""; }; + 77CA60485E13EAE74EE80CFC886BA2AF /* BigInt-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-umbrella.h"; sourceTree = ""; }; + 780BEB0A3FE57594F0858A7EA833EC1A /* SwiftRLP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SwiftRLP.framework; path = SwiftRLP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7892B6C936FFDF8FFBBA425C3F07ACE5 /* Web3swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Web3swift.framework; path = web3swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 79C644C44159127870FD19B2BECB6C9C /* Rabbit+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Rabbit+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift"; sourceTree = ""; }; + 79CBDB796FB0F17282181E75EDA52E42 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; + 79E721B30BBA223BA90A171B31127B5A /* Integer Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Integer Conversion.swift"; path = "sources/Integer Conversion.swift"; sourceTree = ""; }; + 7B19C8291B81ECFBA8C6A57213ADA700 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PromiseKit.framework; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7B50F465279A418BE82FCA4EBD2177CB /* field_5x52_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_impl.h; path = Classes/secp256k1/src/field_5x52_impl.h; sourceTree = ""; }; + 7B5D413D46DFC82B6CBCBB8C5DE7CAFB /* Promise+Web3+Eth+EstimateGas.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+EstimateGas.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift"; sourceTree = ""; }; + 7C4C422A86A1DAE9DFC19D7BB256B774 /* num_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_impl.h; path = Classes/secp256k1/src/num_impl.h; sourceTree = ""; }; + 7CC86CBFE859D6D9E92CE62268D0C8BB /* BIP39+WordLists.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "BIP39+WordLists.swift"; path = "web3swift/KeystoreManager/Classes/BIP39+WordLists.swift"; sourceTree = ""; }; + 7DEACF2F1C7BBF71EA318C326FC4FA52 /* CCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CCM.swift; path = Sources/CryptoSwift/BlockMode/CCM.swift; sourceTree = ""; }; + 7E28680C25D59F4AB8FD5D60B2209576 /* secp256k1_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = secp256k1_swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8075D0204E7F5BE1CEA87D03F0556108 /* Promise+Web3+Personal+Sign.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Personal+Sign.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift"; sourceTree = ""; }; + 810C0B92B1AE41809192BF5012A4A523 /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/ecdh/main_impl.h; sourceTree = ""; }; + 8117AC67014669B1DCFA347AA29688C0 /* Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptors.swift; path = Sources/CryptoSwift/Cryptors.swift; sourceTree = ""; }; + 82D6B4BC9796460A18553C2F38C8AEE1 /* lax_der_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_parsing.h; path = Classes/secp256k1/contrib/lax_der_parsing.h; sourceTree = ""; }; + 82E1460DA79F21EF0A89758352102AA3 /* Floating Point Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Floating Point Conversion.swift"; path = "sources/Floating Point Conversion.swift"; sourceTree = ""; }; + 87C916A767731ADE1518E52E1B6D032F /* Pods_web3swiftExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_web3swiftExample.framework; path = "Pods-web3swiftExample.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 87DC9E0219AEBCFD0C11561CB1F75C69 /* Resolver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Resolver.swift; path = Sources/Resolver.swift; sourceTree = ""; }; + 886FFD1EB7FAC82F55796B76AF70F059 /* SipHash-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-umbrella.h"; sourceTree = ""; }; + 887360628FC3B77442F4026B0B7A51CD /* scalar_8x32_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32_impl.h; path = Classes/secp256k1/src/scalar_8x32_impl.h; sourceTree = ""; }; + 88C864BCF6B7DF8F59711FB0F71F60BF /* Guarantee.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Guarantee.swift; path = Sources/Guarantee.swift; sourceTree = ""; }; + 893235EAB21791B8848761F81F0B2A56 /* CryptoSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CryptoSwift.framework; path = CryptoSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 89BFDBCFBC87AB9A6017F91C16B27016 /* ChaCha20.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChaCha20.swift; path = Sources/CryptoSwift/ChaCha20.swift; sourceTree = ""; }; + 8A274CAE3C49CDADD2C8EDD0B6A2D5EC /* TransactionSigner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransactionSigner.swift; path = web3swift/Transaction/Classes/TransactionSigner.swift; sourceTree = ""; }; + 8A8DFF2DF324A4D832DD8653C502500D /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h"; sourceTree = ""; }; + 8B27CD8CF6389981C93F9C70BB79806C /* PMKUIKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKUIKit.h; path = Extensions/UIKit/Sources/PMKUIKit.h; sourceTree = ""; }; + 8B77A44FBD3FAC28057C1887CC92B27D /* Bitwise Ops.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bitwise Ops.swift"; path = "sources/Bitwise Ops.swift"; sourceTree = ""; }; + 8C65590568B033C2CC9803F32A614CEA /* ecmult_gen.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen.h; path = Classes/secp256k1/src/ecmult_gen.h; sourceTree = ""; }; + 8CAF5D39045C811128307EAFD468C89B /* field_10x26.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26.h; path = Classes/secp256k1/src/field_10x26.h; sourceTree = ""; }; + 8DCCE88C733379B0F9674C1D490BB9A6 /* BlockDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockDecryptor.swift; path = Sources/CryptoSwift/BlockDecryptor.swift; sourceTree = ""; }; + 8DD93FFA0B424475376B46830EEF26BF /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PromiseKit.modulemap; sourceTree = ""; }; + 8E2604B78547CAD1266D726FEE58D2C5 /* Promise+Web3+TxPool.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+TxPool.swift"; path = "web3swift/Promises/Classes/Promise+Web3+TxPool.swift"; sourceTree = ""; }; + 8E47F8688C9AC60F086CAFF777392523 /* Multiplication.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multiplication.swift; path = sources/Multiplication.swift; sourceTree = ""; }; + 8F7AB407FF50CC1C82BC47E27132E3F0 /* Web3+Methods.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Methods.swift"; path = "web3swift/Web3/Classes/Web3+Methods.swift"; sourceTree = ""; }; + 900BF76676BA8D9C9EE025EFBFF7DB36 /* web3swift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = web3swift.xcconfig; sourceTree = ""; }; + 905EF6316653669512380D6206D3F8DE /* Promise+Web3+Eth+GetBlockNumber.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetBlockNumber.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockNumber.swift"; sourceTree = ""; }; + 90DCB2D73690221D1C386B46FF12ACD8 /* ecdsa_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa_impl.h; path = Classes/secp256k1/src/ecdsa_impl.h; sourceTree = ""; }; + 912562705A9D693EE4E79FC65116D991 /* CryptoSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-umbrella.h"; sourceTree = ""; }; + 91C4C863E4EB75ABB3E8474227D40A73 /* EthereumContract.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumContract.swift; path = web3swift/Contract/Classes/EthereumContract.swift; sourceTree = ""; }; + 92E84CE689EC1CA76E264E5261761179 /* SipHash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SipHash.framework; path = SipHash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 932B2C4CD9556E6318A094CDEA2E0E13 /* scalar.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar.h; path = Classes/secp256k1/src/scalar.h; sourceTree = ""; }; + 93F9F961FF5E739D6A27BAE1B6B84255 /* IBAN.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IBAN.swift; path = web3swift/KeystoreManager/Classes/IBAN.swift; sourceTree = ""; }; + 941616C02C90CB37792EE5D074B65DA4 /* EthereumAddress.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = EthereumAddress.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 94A37DAF9BE9D2E3331448A566C065CE /* StreamDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamDecryptor.swift; path = Sources/CryptoSwift/StreamDecryptor.swift; sourceTree = ""; }; + 974A7BFE8E92E050D2FF9124AA7DBCC9 /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; + 97FD3BB1D4FDE3CB8C92B9757CADD731 /* Cipher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cipher.swift; path = Sources/CryptoSwift/Cipher.swift; sourceTree = ""; }; + 9833899028708E6BF26F6D1610FE1997 /* Web3+EventParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+EventParser.swift"; path = "web3swift/Web3/Classes/Web3+EventParser.swift"; sourceTree = ""; }; + 98FDE7A709821277AE5CCEFE2CF7D0B4 /* ecmult_gen_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_gen_impl.h; path = Classes/secp256k1/src/ecmult_gen_impl.h; sourceTree = ""; }; + 9AFC7ACBD0ADDDB3FA2271112BED97D2 /* web3swift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "web3swift-Info.plist"; sourceTree = ""; }; + 9B3438A6ED71C95FBB9BB471E36AFE4D /* scalar_low_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_low_impl.h; path = Classes/secp256k1/src/scalar_low_impl.h; sourceTree = ""; }; + 9BC3E604A7828F857DEFB8E5A4792673 /* Primitive Types.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Primitive Types.swift"; path = "SipHash/Primitive Types.swift"; sourceTree = ""; }; + 9D67481EE660CC4427780A510CDB6254 /* Exponentiation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Exponentiation.swift; path = sources/Exponentiation.swift; sourceTree = ""; }; + 9DBC29B166EFED583208F516850EA2A2 /* AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; + 9E1A060CECDF25684D85667577DBA798 /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; + 9E7B0F55D684C65453D559D9B4BDC75A /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Extension.swift"; path = "web3swift/Convenience/Classes/String+Extension.swift"; sourceTree = ""; }; + 9E8AA6274AA01FA7275884BBF0D6F55D /* AES.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.swift; path = Sources/CryptoSwift/AES.swift; sourceTree = ""; }; + 9F82B4DF8F6B62E706B8BDDEB0749787 /* secp256k1_swift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = secp256k1_swift.xcconfig; sourceTree = ""; }; + A15E042C8396D13ADB12383453C3B15C /* scalar_8x32.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32.h; path = Classes/secp256k1/src/scalar_8x32.h; sourceTree = ""; }; + A1838E8D409817D754EDF58FCF91BFCB /* Promise+Web3+Personal+UnlockAccount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Personal+UnlockAccount.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift"; sourceTree = ""; }; + A19C447D7BD236EECA99DBCF8894565F /* SipHash-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SipHash-prefix.pch"; sourceTree = ""; }; + A1A7DE903866EFAB229ECC3D1346434B /* CryptoSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CryptoSwift.modulemap; sourceTree = ""; }; + A21F7A460F24CED1DC6B614AF917C234 /* Strideable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Strideable.swift; path = sources/Strideable.swift; sourceTree = ""; }; A222803A5470C0EA36B7E5CB379AA730 /* Pods-web3swiftExample-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swiftExample-Info.plist"; sourceTree = ""; }; - A518522A431DA29C6EAB22C89220F3D3 /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.h"; sourceTree = ""; }; - A57379017DA3A7363C4A126E85922A3E /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; - A5950DAB6A6AF16598B547C61614F67F /* Web3+EventParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+EventParser.swift"; path = "web3swift/Web3/Classes/Web3+EventParser.swift"; sourceTree = ""; }; - A688435DEDA890F22D74DEA0B4E38218 /* web3swift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = web3swift.modulemap; sourceTree = ""; }; - A6B836C566DD50CDDC91622F1017A907 /* Words and Bits.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Words and Bits.swift"; path = "sources/Words and Bits.swift"; sourceTree = ""; }; - A7B345CA772E8DBD55A2E927CBA8604A /* scalar_8x32.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_8x32.h; path = secp256k1_ios/src/scalar_8x32.h; sourceTree = ""; }; - A7D5037585515D7D31ABCC390E523DCE /* KeystoreV3JSONStructure.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeystoreV3JSONStructure.swift; path = web3swift/KeystoreManager/Classes/KeystoreV3JSONStructure.swift; sourceTree = ""; }; - A964E878B714B85BFFB78FE9A1D48601 /* Promise+Web3+Contract+GetIndexedEvents.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Contract+GetIndexedEvents.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Contract+GetIndexedEvents.swift"; sourceTree = ""; }; - A997EBF435A0C1763556BA8793373E65 /* ABIv2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIv2.swift; path = web3swift/ABIv2/Classes/ABIv2.swift; sourceTree = ""; }; - A9C94A81A904A9492C86F03251F3F9A6 /* TransactionSigner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransactionSigner.swift; path = web3swift/Transaction/Classes/TransactionSigner.swift; sourceTree = ""; }; - AAB55717467B6E1C5DC461B186D34505 /* PMKUIKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKUIKit.h; path = Extensions/UIKit/Sources/PMKUIKit.h; sourceTree = ""; }; - AAFAD63081AB296364EBEE0550B55C75 /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; - AB21E2AB71A28225AD43E56B69612A2E /* Salsa.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Salsa.swift; path = scrypt/scrypt/Salsa.swift; sourceTree = ""; }; - AB45C8770EE42F74BECA341A582A9813 /* BlockExplorer+GetTransactionHistory.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "BlockExplorer+GetTransactionHistory.swift"; path = "web3swift/BlockExplorer/Classes/BlockExplorer+GetTransactionHistory.swift"; sourceTree = ""; }; - AC0A8F0EF2B67D8E377186D1D70E8F97 /* secp256k1_ios.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = secp256k1_ios.xcconfig; sourceTree = ""; }; - AE5EE930804B944DB46E6C6221E7B4C4 /* ecdsa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa.h; path = secp256k1_ios/src/ecdsa.h; sourceTree = ""; }; - AEE2227E4C836011E279D5A187A8C1EA /* Authenticator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Authenticator.swift; path = Sources/CryptoSwift/Authenticator.swift; sourceTree = ""; }; - AFBE806845DD167DC414CA9715309051 /* secp256k1_ios.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = secp256k1_ios.modulemap; sourceTree = ""; }; - B0C8BA06101F357C799BC88E5081257A /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.m"; sourceTree = ""; }; - B0DF79B993E5E4E742F07F91E5247FD4 /* NSTask+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSTask+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.h"; sourceTree = ""; }; - B2087493B84529EC925CD96B6E28CEDD /* util.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = util.h; path = secp256k1_ios/src/util.h; sourceTree = ""; }; - B27AAE202915C26D30FF0AB6D511C2A5 /* Array+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Extension.swift"; path = "web3swift/Convenience/Classes/Array+Extension.swift"; sourceTree = ""; }; - B29D120DA2065F9B7F8010B82F877724 /* secp256k1_ios-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_ios-prefix.pch"; sourceTree = ""; }; - B2EBC8972ED05B8027B86BA6C334EC53 /* CryptoSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CryptoSwift-dummy.m"; sourceTree = ""; }; - B3ADFA503DA3512C3D7462CEBC3461E1 /* Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Poly1305.swift; path = Sources/CryptoSwift/Poly1305.swift; sourceTree = ""; }; - B4E57C780B6DC73DDE512C89289D7C6D /* BIP39+WordLists.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "BIP39+WordLists.swift"; path = "web3swift/KeystoreManager/Classes/BIP39+WordLists.swift"; sourceTree = ""; }; - B549029F7C08F93F71DBE300BDBEB3A5 /* PMKFoundation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PMKFoundation.h; path = Extensions/Foundation/Sources/PMKFoundation.h; sourceTree = ""; }; - B5AE0CE423C25CAF8DDEF32FE109DD36 /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = secp256k1_ios/src/modules/ecdh/main_impl.h; sourceTree = ""; }; - B611AE2C6BEF0A2E26865F99A0DFC1D2 /* SipHash-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SipHash-dummy.m"; sourceTree = ""; }; - B64A66E3159EDD6E2476105656E5B809 /* PBKDF2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF2.swift; path = Sources/CryptoSwift/PKCS/PBKDF2.swift; sourceTree = ""; }; - B72E91CA236B363CA685F62C6A793DD7 /* Pods_web3swiftExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_web3swiftExample.framework; path = "Pods-web3swiftExample.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - B879FC9FF02959F80112A1028330B1C4 /* ContractABIv2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ContractABIv2.swift; path = web3swift/Contract/Classes/ContractABIv2.swift; sourceTree = ""; }; - B8B307D4E26840540E204782630D463C /* BufferStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BufferStorage.swift; path = scrypt/scrypt/BufferStorage.swift; sourceTree = ""; }; - B8FD1CF670C9D76982E36D9C7194D970 /* NSTask+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSTask+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.m"; sourceTree = ""; }; - BA0B3AE7019BDA95536AE5163FFCE31F /* Promise+Web3+Eth+GetTransactionDetails.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetTransactionDetails.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionDetails.swift"; sourceTree = ""; }; - BA56A6B6D3AA5CCAABD3A9421FF1FC9E /* hash_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hash_impl.h; path = secp256k1_ios/src/hash_impl.h; sourceTree = ""; }; - BBEB3C1E2A88B6371BC0922D8F50C3B8 /* Web3+ERC20.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+ERC20.swift"; path = "web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift"; sourceTree = ""; }; - BEA6C296294AF579C5E26DE62FC71CBC /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; - C0675963B7F5BBBCE7B3FEACD46F1059 /* ABIv2Parsing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIv2Parsing.swift; path = web3swift/ABIv2/Classes/ABIv2Parsing.swift; sourceTree = ""; }; - C26DBBDC4361A9A3D875862D9CDCC222 /* HKDF.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HKDF.swift; path = Sources/CryptoSwift/HKDF.swift; sourceTree = ""; }; - C3B25C1F01EFB3AC5FA924DB59808989 /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Result.framework; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C78A90EF1AC64CE7665CF433AE31CB4F /* Promise+Web3+Eth+SendRawTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+SendRawTransaction.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift"; sourceTree = ""; }; - C88308E23ACC16B283556A5CA6AC322F /* scalar_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_impl.h; path = secp256k1_ios/src/scalar_impl.h; sourceTree = ""; }; - C8CDF9DE89CE405CCA08750BE0B93C09 /* NSRegularExpressionExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NSRegularExpressionExtension.swift; path = web3swift/Convenience/Classes/NSRegularExpressionExtension.swift; sourceTree = ""; }; - C9E535CC3B56DF96BD33013093E21D6B /* field_5x52_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_impl.h; path = secp256k1_ios/src/field_5x52_impl.h; sourceTree = ""; }; - CA588EB41DFF39681CD5E2D44DE4B9D5 /* Result-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-prefix.pch"; sourceTree = ""; }; - CAE688D25B118D52526713B918BF4412 /* BigInt-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-prefix.pch"; sourceTree = ""; }; - CB5830DCF5BE1BC265D8673C39D6ACFF /* PKCS7Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7Padding.swift; path = Sources/CryptoSwift/PKCS/PKCS7Padding.swift; sourceTree = ""; }; - CB88C6871FFA8E2AEC4C11D2134C8505 /* Promise+Web3+Eth+Call.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+Call.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift"; sourceTree = ""; }; - CC7F30FF1F8C2624985ED76AFEF7343F /* Web3+Infura.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Infura.swift"; path = "web3swift/Web3/Classes/Web3+Infura.swift"; sourceTree = ""; }; - CD3A802B0EBBDBABC284E77D0173F524 /* NameHash.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NameHash.swift; path = web3swift/Utils/Classes/NameHash.swift; sourceTree = ""; }; - CD695AA8D5B0A6A6C74E09E40FD3F4CF /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; - CDE87D210458FFB601CC2F569131ACDE /* scrypt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = scrypt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CF4B94ADE36B859A985CE20D9C9B4C1B /* NSObject+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Extensions/Foundation/Sources/NSObject+Promise.swift"; sourceTree = ""; }; - D0280A8B81447E72F8900FAC8DC255B5 /* scalar_4x64_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64_impl.h; path = secp256k1_ios/src/scalar_4x64_impl.h; sourceTree = ""; }; - D0A9DDA2F0156D188BEFF81EBEE38903 /* UIView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.h"; sourceTree = ""; }; - D2CFB442CB244B69C89D6C0651E21E9D /* Data+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Extension.swift"; path = "web3swift/Convenience/Classes/Data+Extension.swift"; sourceTree = ""; }; - D460F9A266BE2FC2769DCC397350234B /* group.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group.h; path = secp256k1_ios/src/group.h; sourceTree = ""; }; - D4795A3312AFD3CF4610B857D57F0DE7 /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; - D4B6AC99AF9BB0962269E5759E81E320 /* Exponentiation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Exponentiation.swift; path = sources/Exponentiation.swift; sourceTree = ""; }; - D4C991E8454B8E94B54C310E76276DDD /* ENS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ENS.swift; path = web3swift/Utils/Classes/ENS.swift; sourceTree = ""; }; - D5A8E66DCCDCF6FE84240BC74547E057 /* BIP32HDNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BIP32HDNode.swift; path = web3swift/KeystoreManager/Classes/BIP32HDNode.swift; sourceTree = ""; }; - D5C02D3C50FB98C143D745510D16219A /* Promise+Web3+Eth+GetBalance.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetBalance.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift"; sourceTree = ""; }; - D606FC0EE4EE3BC0BB4A1413AD91A5E2 /* group_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group_impl.h; path = secp256k1_ios/src/group_impl.h; sourceTree = ""; }; - D6781601E4B221AF8A6CB8901008CD34 /* ZeroPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZeroPadding.swift; path = Sources/CryptoSwift/ZeroPadding.swift; sourceTree = ""; }; - D7DB5E41B41743430F0D989437AD4091 /* OFB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OFB.swift; path = Sources/CryptoSwift/BlockMode/OFB.swift; sourceTree = ""; }; - D881EFCF8C8321AF82D7B1E16080EED1 /* BIP32Keystore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BIP32Keystore.swift; path = web3swift/KeystoreManager/Classes/BIP32Keystore.swift; sourceTree = ""; }; + A29F00A814D897C1BE5AE6DE5E89C998 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = EthereumAddress/Classes/Extensions.swift; sourceTree = ""; }; + A35C0ED9C1391857C58C0CF40B765953 /* Web3+Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Utils.swift"; path = "web3swift/Web3/Classes/Web3+Utils.swift"; sourceTree = ""; }; + A3D1675AC5880CADBC5A85BEEA25FEA6 /* SwiftRLP-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SwiftRLP-Info.plist"; sourceTree = ""; }; + A3E1DF0961FF3DA091383DEC4B479CD4 /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; + A563044196C737C050B34DF39F82E85F /* ABIEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIEncoding.swift; path = EthereumABI/Classes/ABIEncoding.swift; sourceTree = ""; }; + A5A3BA2300413041BDAD20538CC2A0CC /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = BigInt.framework; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A82F53B0EA3D0D57AFD5CD4C318D0647 /* PCBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PCBC.swift; path = Sources/CryptoSwift/BlockMode/PCBC.swift; sourceTree = ""; }; + A8EA98CA2EC2343E64F97FE62866F72B /* ComparisonExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ComparisonExtensions.swift; path = web3swift/Contract/Classes/ComparisonExtensions.swift; sourceTree = ""; }; + A91B7CF43DB5A3F74C857AAED6F948BA /* ABIDecoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIDecoding.swift; path = EthereumABI/Classes/ABIDecoding.swift; sourceTree = ""; }; + A9C6FDA4C7AB83C6CB50D21313F5540F /* ContractProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ContractProtocol.swift; path = web3swift/Contract/Classes/ContractProtocol.swift; sourceTree = ""; }; + AA756D6EB06FD36B25464492744519A3 /* EthereumABI.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EthereumABI.h; path = EthereumABI/EthereumABI.h; sourceTree = ""; }; + AA7F8881DBA20F9015834FD7A4CF547C /* ABIParameterTypes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIParameterTypes.swift; path = EthereumABI/Classes/ABIParameterTypes.swift; sourceTree = ""; }; + AA9960DB9976FF183310557C55A532A0 /* UInt128.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UInt128.swift; path = Sources/CryptoSwift/UInt128.swift; sourceTree = ""; }; + AADCA6CCD158303369C205F70D9E4590 /* KeystoreV3JSONStructure.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeystoreV3JSONStructure.swift; path = web3swift/KeystoreManager/Classes/KeystoreV3JSONStructure.swift; sourceTree = ""; }; + ABA0BB0844791492402D5AB66E61BB24 /* web3swift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "web3swift-umbrella.h"; sourceTree = ""; }; + ABEE70BA5A5BC35C34D6C5DA8EB13409 /* Web3+Infura.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Infura.swift"; path = "web3swift/Web3/Classes/Web3+Infura.swift"; sourceTree = ""; }; + ACCA271C75D4B21ED35646A5A4731E5E /* secp256k1_ecdh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_ecdh.h; path = Classes/secp256k1/include/secp256k1_ecdh.h; sourceTree = ""; }; + ACEACA1521FDFD79ABA9485C777E5887 /* GCD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCD.swift; path = sources/GCD.swift; sourceTree = ""; }; + AD42971B0221AEDB96DC65F82F3CC2DD /* EthereumAddress-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumAddress-prefix.pch"; sourceTree = ""; }; + ADD0134957F750B96160913F9E4240C6 /* scrypt.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = scrypt.modulemap; sourceTree = ""; }; + AE647B348F1A393A971238BA674A6485 /* Web3+ReadingTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+ReadingTransaction.swift"; path = "web3swift/Web3/Classes/Web3+ReadingTransaction.swift"; sourceTree = ""; }; + AF16F679ECE9C4841106CD599F60C4E2 /* hang.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = hang.swift; path = Sources/hang.swift; sourceTree = ""; }; + AF2F5DCD8B1BC4533ADECDBCF836DB84 /* SHA3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA3.swift; path = Sources/CryptoSwift/SHA3.swift; sourceTree = ""; }; + B1079CE813B6ADE402DA1A75AC3BEF4C /* CryptoSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CryptoSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B109DA379FA9ECABADD3EE3B80DE29B8 /* Dictionary+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Dictionary+Extension.swift"; path = "web3swift/Convenience/Classes/Dictionary+Extension.swift"; sourceTree = ""; }; + B1E7E3D26AF128FB9F5B65F2975134E4 /* NSRegularExpressionExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NSRegularExpressionExtension.swift; path = web3swift/Convenience/Classes/NSRegularExpressionExtension.swift; sourceTree = ""; }; + B2ACAB499A9507E7F5D0105E4A0D9769 /* group.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = group.h; path = Classes/secp256k1/src/group.h; sourceTree = ""; }; + B2B058F1081CD1680F4F90724970E88A /* Checksum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Checksum.swift; path = Sources/CryptoSwift/Checksum.swift; sourceTree = ""; }; + B2DC451DC974D25FE7B1FECCA9C6EF51 /* SecureBytes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SecureBytes.swift; path = Sources/CryptoSwift/SecureBytes.swift; sourceTree = ""; }; + B35498E6C67F20805E9F3004C2F64431 /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; + B36AB396275697EEE1A5B13BA8A38FE3 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + B4C09212026736ACF8C3588C3DFFFBAC /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; + B4D9F2707B320173226689A2ED924509 /* Promise+HttpProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+HttpProvider.swift"; path = "web3swift/Promises/Classes/Promise+HttpProvider.swift"; sourceTree = ""; }; + B5659C3AB77D7D5B8A5D896D5D8A6CA6 /* HKDF.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HKDF.swift; path = Sources/CryptoSwift/HKDF.swift; sourceTree = ""; }; + B575CEB1C724F85E4A1857AA0042309A /* CryptoSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CryptoSwift-dummy.m"; sourceTree = ""; }; + B58E7023F7E6C8655D6D9028C7AF2698 /* EthereumABI-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EthereumABI-dummy.m"; sourceTree = ""; }; + B6C8DFD047D7C6E855F9CF2F1A3AD7B2 /* secp256k1_swift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "secp256k1_swift-dummy.m"; sourceTree = ""; }; + B72048F832A9C75C2A81C9CBC769CD8D /* scratch.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scratch.h; path = Classes/secp256k1/src/scratch.h; sourceTree = ""; }; + B841E74E11C4190F2742A482D1624F6F /* EthereumAddress-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EthereumAddress-dummy.m"; sourceTree = ""; }; + B93028ED0430293C54D4CC1E7348092E /* HMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HMAC.swift; path = Sources/CryptoSwift/HMAC.swift; sourceTree = ""; }; + B973550AEC743886DEFC6C426DE82DAB /* NSURLSession+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLSession+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSURLSession+AnyPromise.h"; sourceTree = ""; }; + B9E1EEF85DD107F933904E8D4BACCF31 /* EthereumABI-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "EthereumABI-Info.plist"; sourceTree = ""; }; + BAF13C2624A2802FFFD9EC2F84F2A37F /* scrypt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = scrypt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + BB48EE8796E94C776DE21E16EC425E02 /* Digest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Digest.swift; path = Sources/CryptoSwift/Digest.swift; sourceTree = ""; }; + BB666C41E45C6ABAB0192295B1ECAC7E /* NSURLSession+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Promise.swift"; path = "Extensions/Foundation/Sources/NSURLSession+Promise.swift"; sourceTree = ""; }; + BC202ECB6EBC87A3FF623F01851811DB /* Web3+Protocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Protocols.swift"; path = "web3swift/Web3/Classes/Web3+Protocols.swift"; sourceTree = ""; }; + BCF8AF858508A3EC73D766B1CF48098F /* field_5x52.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52.h; path = Classes/secp256k1/src/field_5x52.h; sourceTree = ""; }; + BD07049E8559AB824237ADD96BD4AC9B /* EthereumAddress-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumAddress-umbrella.h"; sourceTree = ""; }; + BD1EAA1F2E44F11F5F6032A518194EC4 /* Blowfish.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Blowfish.swift; path = Sources/CryptoSwift/Blowfish.swift; sourceTree = ""; }; + BE86F8153D27F10505EBD7D9EE3DC397 /* Collection+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Collection+Extension.swift"; path = "Sources/CryptoSwift/Collection+Extension.swift"; sourceTree = ""; }; + BFF0D31D5922EBAD0370E98046E7CC48 /* PKCS7Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7Padding.swift; path = Sources/CryptoSwift/PKCS/PKCS7Padding.swift; sourceTree = ""; }; + C0315A68D7F2B7AACA7AD8A42A20A8F3 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; + C07DC3D70012BD62BDE7B7032EE7A09E /* Promise+Web3+Eth+GetAccounts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetAccounts.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift"; sourceTree = ""; }; + C0A645643D765879996A0FEFEB17AEB2 /* AEAD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEAD.swift; path = Sources/CryptoSwift/AEAD/AEAD.swift; sourceTree = ""; }; + C155FBFE5C0783AAC41449CB2DC87E51 /* scrypt.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = scrypt.xcconfig; sourceTree = ""; }; + C2F73E4913951241E69AB369E29AA841 /* EthereumABI-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EthereumABI-umbrella.h"; sourceTree = ""; }; + C3E5F4E53C7409FF85C72B92885F1280 /* EthereumAddress.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = EthereumAddress.xcconfig; sourceTree = ""; }; + C4BEA212C4B71400038EE33CE9319F63 /* scalar_4x64.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar_4x64.h; path = Classes/secp256k1/src/scalar_4x64.h; sourceTree = ""; }; + C5A89E2E2F70E548530DA60AF935479A /* UInt16+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UInt16+Extension.swift"; path = "Sources/CryptoSwift/UInt16+Extension.swift"; sourceTree = ""; }; + C5CC3933EB505F78FB90467B4EFA6203 /* Promise+Web3+Contract+GetIndexedEvents.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Contract+GetIndexedEvents.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Contract+GetIndexedEvents.swift"; sourceTree = ""; }; + C613070ACCF0136D2C14651C688498FF /* EthereumTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumTransaction.swift; path = web3swift/Transaction/Classes/EthereumTransaction.swift; sourceTree = ""; }; + C669F6C727F3A19F28202283CAF3CBD6 /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; + C6954609CD039F4F09E75EBC79203A7B /* BIP32KeystoreJSONStructure.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BIP32KeystoreJSONStructure.swift; path = web3swift/KeystoreManager/Classes/BIP32KeystoreJSONStructure.swift; sourceTree = ""; }; + C71613C4CE6D47BE330CC73E165FEDC6 /* SwiftRLP.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftRLP.xcconfig; sourceTree = ""; }; + C7BA3CDDCDFEFD9BED027AD46F60FAC0 /* SwiftRLP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftRLP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C870B1A3D456FD4314DD4C0607A42610 /* SipHash.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SipHash.xcconfig; sourceTree = ""; }; + C8F50F7F0D2F6591B93604E8BB87992A /* Square Root.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Square Root.swift"; path = "sources/Square Root.swift"; sourceTree = ""; }; + C9430EC53743B45700079032E4A105EC /* Array+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Extension.swift"; path = "Sources/CryptoSwift/Array+Extension.swift"; sourceTree = ""; }; + CB6ECCB5CD4592A97A0350BE32E726B5 /* EthereumKeystoreV3.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumKeystoreV3.swift; path = web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift; sourceTree = ""; }; + CC9030EBE40E463BE51970F190211BDB /* Web3+JSONRPC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+JSONRPC.swift"; path = "web3swift/Web3/Classes/Web3+JSONRPC.swift"; sourceTree = ""; }; + CCC1EA2773146F4324EF5ED0B3A3EFE0 /* Promise+Web3+Eth+GetGasPrice.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetGasPrice.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetGasPrice.swift"; sourceTree = ""; }; + CD3F88A45DE0134E5C0FCE9C79186C9F /* ECB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ECB.swift; path = Sources/CryptoSwift/BlockMode/ECB.swift; sourceTree = ""; }; + CD643FEB508293D31031F06D61BFEDC4 /* Promise+Web3+Eth+GetBlockByHash.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetBlockByHash.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByHash.swift"; sourceTree = ""; }; + CD71B2AA6261C81D5ABF5F0265397A1C /* AES.Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.Cryptors.swift; path = Sources/CryptoSwift/AES.Cryptors.swift; sourceTree = ""; }; + D1E952E16B5F2C98AD684EBCDE120FB1 /* Base58.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Base58.swift; path = web3swift/Convenience/Classes/Base58.swift; sourceTree = ""; }; + D25C0FEDAE45115E5198FD4CD0052A48 /* DigestType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DigestType.swift; path = Sources/CryptoSwift/DigestType.swift; sourceTree = ""; }; + D31BE63B1625607EFBF7B6C4BD62A81F /* scrypt-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "scrypt-dummy.m"; sourceTree = ""; }; + D35A4906E915E02BCCA9912DBD2D26C9 /* NativeTypesEncoding+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NativeTypesEncoding+Extensions.swift"; path = "web3swift/Convenience/Classes/NativeTypesEncoding+Extensions.swift"; sourceTree = ""; }; + D3D1AAC32C041B5712F196A61F5CA39D /* num_gmp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp.h; path = Classes/secp256k1/src/num_gmp.h; sourceTree = ""; }; + D45E969A3BDBBB4ECBB6299F26380AB1 /* secp256k1_recovery.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_recovery.h; path = Classes/secp256k1/include/secp256k1_recovery.h; sourceTree = ""; }; + D587E4DB61D38FF4A1CBEB61903470D9 /* PromiseKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-umbrella.h"; sourceTree = ""; }; + D78C0BC324759D084A8384179425BF47 /* lax_der_privatekey_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_privatekey_parsing.h; path = Classes/secp256k1/contrib/lax_der_privatekey_parsing.h; sourceTree = ""; }; + D7B39A4A3DA9EBB4C60E868C0C5CF2C2 /* CryptoSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CryptoSwift-prefix.pch"; sourceTree = ""; }; + D94B4FB5E11583412D053DB2C819F58C /* PlainKeystore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PlainKeystore.swift; path = web3swift/KeystoreManager/Classes/PlainKeystore.swift; sourceTree = ""; }; + D97CB39BF8F2C831589612CB2ED71D90 /* Padding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Padding.swift; path = Sources/CryptoSwift/Padding.swift; sourceTree = ""; }; + D9CEEA6FBF391E65A68E60592882B642 /* Web3+Wallet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Wallet.swift"; path = "web3swift/HookedFunctions/Classes/Web3+Wallet.swift"; sourceTree = ""; }; + D9EC47F44C823E1171CF73606A494D29 /* KeystoreManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeystoreManager.swift; path = web3swift/KeystoreManager/Classes/KeystoreManager.swift; sourceTree = ""; }; + DA422749FB6CE4DA61C615258DDD6B8B /* BigInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigInt.swift; path = sources/BigInt.swift; sourceTree = ""; }; + DA539D1F3176FABFF9035EC2FDFD30B4 /* NSTask+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSTask+AnyPromise.h"; path = "Extensions/Foundation/Sources/NSTask+AnyPromise.h"; sourceTree = ""; }; DA68C188563902BBADBF5288A07FA056 /* Pods-web3swiftExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-web3swiftExample-frameworks.sh"; sourceTree = ""; }; - DB25E5C7BD25CD7E53D639B210A1B4AC /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; - DBC471D81098384ACA05477FCAF96F28 /* secp256k1_ios.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_ios.h; path = secp256k1_ios/secp256k1_ios.h; sourceTree = ""; }; - DC27BAB5F87E71098FCC3B49E257E226 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Configuration.swift; sourceTree = ""; }; - DC66B1C4A5263CB1B1CA7B87AA49418F /* web3swift-Bridging-Header.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "web3swift-Bridging-Header.h"; path = "web3swift/web3swift-Bridging-Header.h"; sourceTree = ""; }; - DE534FDA36211FEA618C63A4A7779CF5 /* Web3+Personal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Personal.swift"; path = "web3swift/Web3/Classes/Web3+Personal.swift"; sourceTree = ""; }; - DF11D2FEEDD0F5C59F1823F81B0D54DA /* SipHashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHashable.swift; path = SipHash/SipHashable.swift; sourceTree = ""; }; - DF874BF9CCC77EB83F09D12A4308C68B /* scalar.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scalar.h; path = secp256k1_ios/src/scalar.h; sourceTree = ""; }; - DFEE82FC5B9EEB2D9735B3D3FFF8E2C7 /* eckey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = eckey.h; path = secp256k1_ios/src/eckey.h; sourceTree = ""; }; - E0D132AD733102F963CAD5D649C4788F /* Promise+HttpProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+HttpProvider.swift"; path = "web3swift/Promises/Classes/Promise+HttpProvider.swift"; sourceTree = ""; }; - E149422ED5FBFBBFDF869F5267A3CFED /* Web3+Eth+ObjC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Eth+ObjC.swift"; path = "web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift"; sourceTree = ""; }; - E1B553971FDAECBA58CE3B063C9A66F5 /* field_10x26_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_10x26_impl.h; path = secp256k1_ios/src/field_10x26_impl.h; sourceTree = ""; }; + DB40B5423FA265392DE07B1A21090637 /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Extension.swift"; path = "Sources/CryptoSwift/String+Extension.swift"; sourceTree = ""; }; + DB7709D38F697152E97ECE038ACBA80E /* ChaCha20+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ChaCha20+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift"; sourceTree = ""; }; + DBA7F751A89D1E1C5D62E2BADD1420C4 /* lax_der_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_parsing.c; path = Classes/secp256k1/contrib/lax_der_parsing.c; sourceTree = ""; }; + DBE9BF31616883FEBAE74AC685A421E1 /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; + DC529C712D847E1520FC99E66853D5E2 /* AbstractKeystore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AbstractKeystore.swift; path = web3swift/KeystoreManager/Classes/AbstractKeystore.swift; sourceTree = ""; }; + DD4F0D58F76F4D676944EC3DD0AC648D /* secp256k1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = secp256k1.swift; path = Classes/secp256k1.swift; sourceTree = ""; }; + DE20423192DCFD6A61AC3EC0E1210470 /* Promise+Web3+Eth+GetTransactionCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetTransactionCount.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift"; sourceTree = ""; }; + DF5183A837EE103D3ED61CC8E3B718CE /* AEADChaCha20Poly1305.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AEADChaCha20Poly1305.swift; path = Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift; sourceTree = ""; }; + E067ABC95AB5A08F48E2887AC6ECDF59 /* Array+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Extension.swift"; path = "web3swift/Convenience/Classes/Array+Extension.swift"; sourceTree = ""; }; + E0A18E92B2440CE03C08D553EF12E1AA /* SipHasher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SipHasher.swift; path = SipHash/SipHasher.swift; sourceTree = ""; }; + E0D72FEDC647B6917B3AE77954B91EF9 /* CipherModeWorker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CipherModeWorker.swift; path = Sources/CryptoSwift/BlockMode/CipherModeWorker.swift; sourceTree = ""; }; + E161AA24151D1227B11E7BFC7091272B /* ecmult_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_impl.h; path = Classes/secp256k1/src/ecmult_impl.h; sourceTree = ""; }; + E16927F5D553D8A1B33E94ACCADB17A3 /* Promise+Web3+Eth+GetTransactionReceipt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetTransactionReceipt.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionReceipt.swift"; sourceTree = ""; }; + E16B8BF7D2F429329E671B5BE4F1AC8A /* EthereumABI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = EthereumABI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E1DFB901CA995F41CFDED832B5F38D3F /* Subtraction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Subtraction.swift; path = sources/Subtraction.swift; sourceTree = ""; }; + E1F617E29052F2A20A4DAF46197559BF /* race.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = race.m; path = Sources/race.m; sourceTree = ""; }; + E37C1C69C98C58ABCDCA9F4B01061D0F /* BIP39.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BIP39.swift; path = web3swift/KeystoreManager/Classes/BIP39.swift; sourceTree = ""; }; E440C4B74B44A098160068C009BA588B /* Pods-web3swiftExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-web3swiftExample-dummy.m"; sourceTree = ""; }; - E57F88566F2750F3697639B5C501F8F3 /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; - E69B0EEC45372ADC020F4E2957A210D2 /* field_5x52_asm_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_5x52_asm_impl.h; path = secp256k1_ios/src/field_5x52_asm_impl.h; sourceTree = ""; }; - E7216ACED116DF927E827ACB9E2DF163 /* SHA1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA1.swift; path = Sources/CryptoSwift/SHA1.swift; sourceTree = ""; }; - E7AE5E3A63DD4DE3E3574F245EBBFC95 /* Primitive Types.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Primitive Types.swift"; path = "SipHash/Primitive Types.swift"; sourceTree = ""; }; + E45FD0470EFD84FE77DAB6F17417FD48 /* Utils+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Utils+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Utils+Foundation.swift"; sourceTree = ""; }; + E4F1E867DE919C0E595D36510EEFE1A6 /* num_gmp_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = num_gmp_impl.h; path = Classes/secp256k1/src/num_gmp_impl.h; sourceTree = ""; }; + E6B1FFA44C64B0B540B94FEEE1CD9B0F /* firstly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = firstly.swift; path = Sources/firstly.swift; sourceTree = ""; }; + E8022C2DF6B86FA23296F8458F4E400B /* CBCMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBCMAC.swift; path = Sources/CryptoSwift/CBCMAC.swift; sourceTree = ""; }; E87FE10BF7C41955C696DDC801AD6226 /* Pods-web3swiftExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-web3swiftExample-acknowledgements.plist"; sourceTree = ""; }; - E98004D90CCD1AE45753F3C16B45091F /* scrypt.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = scrypt.xcconfig; sourceTree = ""; }; - E991F14402D14DBCE758C2C453DA2F7D /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; - E99567F75AA85FF9096F7D24934C554A /* Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Utils.swift; path = Sources/CryptoSwift/Utils.swift; sourceTree = ""; }; - EA92C153CAE76CB71780322E95F9393B /* Blowfish+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Blowfish+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift"; sourceTree = ""; }; - EADF759D706E073C79D0A75908F5DB72 /* race.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = race.m; path = Sources/race.m; sourceTree = ""; }; - EB19FD3AC66BF80876825B3A4F1F66B3 /* SipHash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SipHash.framework; path = SipHash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - EB97BCB1F8ADDFB1DA7B46904EFEB297 /* RLP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RLP.swift; path = web3swift/Utils/Classes/RLP.swift; sourceTree = ""; }; - EC3E819145FD9E56DA10F219A9155D0B /* String Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String Conversion.swift"; path = "sources/String Conversion.swift"; sourceTree = ""; }; - EC8B5678B1206B79D7DFCE48E8DC433D /* Addition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Addition.swift; path = sources/Addition.swift; sourceTree = ""; }; - ED2C60159DC5CDC64E9C76793B692956 /* Result-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-umbrella.h"; sourceTree = ""; }; - EF0A571C3D738760D77BE44DC3DBF459 /* BlockEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockEncryptor.swift; path = Sources/CryptoSwift/BlockEncryptor.swift; sourceTree = ""; }; - EF7EB2244879158182404A5CE01A6DA3 /* scrypt.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = scrypt.h; path = scrypt/scrypt.h; sourceTree = ""; }; - EFDEB675E0A92FD109E8578E45A910EB /* Square Root.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Square Root.swift"; path = "sources/Square Root.swift"; sourceTree = ""; }; - EFF38E25FE5AA4DFD2E84286D4EE29E3 /* Hashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hashable.swift; path = sources/Hashable.swift; sourceTree = ""; }; - F0504F5A28A5B671EFD041FFF39ECCD1 /* secp256k1_ecdh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = secp256k1_ecdh.h; path = secp256k1_ios/include/secp256k1_ecdh.h; sourceTree = ""; }; - F09D086B85A197C3C12AF8FC32888844 /* lax_der_privatekey_parsing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lax_der_privatekey_parsing.h; path = secp256k1_ios/contrib/lax_der_privatekey_parsing.h; sourceTree = ""; }; - F14BD8371C5BD953ACEA2EC348DF108F /* Collection+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Collection+Extension.swift"; path = "Sources/CryptoSwift/Collection+Extension.swift"; sourceTree = ""; }; - F1EE218B7D030099B8EF4244294877BA /* libsecp256k1-config.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "libsecp256k1-config.h"; path = "secp256k1_ios/libsecp256k1-config.h"; sourceTree = ""; }; - F26C7D8E758DAAE0AE9602235489A452 /* GCD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCD.swift; path = sources/GCD.swift; sourceTree = ""; }; - F2A78FCC4EF319B19E3793B5E9793FB6 /* ABIv2Decoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABIv2Decoding.swift; path = web3swift/ABIv2/Classes/ABIv2Decoding.swift; sourceTree = ""; }; - F368BDEF8D570DA31892DE78BFAFEC69 /* Web3+HttpProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+HttpProvider.swift"; path = "web3swift/Web3/Classes/Web3+HttpProvider.swift"; sourceTree = ""; }; - F42BF4C6F2E4A124889A4EF8AF5CEB7D /* Comparable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Comparable.swift; path = sources/Comparable.swift; sourceTree = ""; }; - F5A23401BDDA896B8128FE62F073EB4C /* Promise+Web3+Eth+GetBlockByNumber.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetBlockByNumber.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByNumber.swift"; sourceTree = ""; }; - F5CFD5714E4C2267C41E1D20D96A6432 /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F689778FFDCF60FE0330895D2FF579D3 /* ChaCha20+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ChaCha20+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift"; sourceTree = ""; }; - F73C2F6E4737EA189FC60DD089E7FF2F /* SipHash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SipHash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F78DD3E0F25108732A8209B2470BB51A /* Checksum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Checksum.swift; path = Sources/CryptoSwift/Checksum.swift; sourceTree = ""; }; - F87BEFD39CCEE24503E65946D2C28F34 /* GCM.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCM.swift; path = Sources/CryptoSwift/BlockMode/GCM.swift; sourceTree = ""; }; - F8C22382C482B8DB731B8A6B3B5618A5 /* lax_der_parsing.c */ = {isa = PBXFileReference; includeInIndex = 1; name = lax_der_parsing.c; path = secp256k1_ios/contrib/lax_der_parsing.c; sourceTree = ""; }; - F97510E9053BA812A0D125583C319128 /* Data Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data Conversion.swift"; path = "sources/Data Conversion.swift"; sourceTree = ""; }; - FA42AFA594E6D56EC46F6E754CBDA708 /* Scrypt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scrypt.swift; path = scrypt/scrypt/Scrypt.swift; sourceTree = ""; }; - FA6B0C20639EFF1F778E27935D0273C4 /* CBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBC.swift; path = Sources/CryptoSwift/BlockMode/CBC.swift; sourceTree = ""; }; - FAB3F8944868A08EDAFE81B3CE257C46 /* CoreImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/CoreImage.framework; sourceTree = DEVELOPER_DIR; }; - FB8B88BBCDA33902573936676AF560B3 /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift"; sourceTree = ""; }; - FC53C9C956E2390F9B8020E114BAEF38 /* field_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = field_impl.h; path = secp256k1_ios/src/field_impl.h; sourceTree = ""; }; - FCC2FE29E9996BD207285015889B3279 /* Web3+Protocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Protocols.swift"; path = "web3swift/Web3/Classes/Web3+Protocols.swift"; sourceTree = ""; }; - FCE7FE3A8096914EF9B8E43AE1000416 /* PKCS5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS5.swift; path = Sources/CryptoSwift/PKCS/PKCS5.swift; sourceTree = ""; }; - FD20AF7008A9F71D298E2252FDF9EB7B /* CMAC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CMAC.swift; path = Sources/CryptoSwift/CMAC.swift; sourceTree = ""; }; - FD29F1C88C4C182E528EFD16775B5E6B /* Promise+Web3+Eth+GetBlockByHash.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+GetBlockByHash.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByHash.swift"; sourceTree = ""; }; - FDC8C3143E181D6248738187393BEA40 /* UIView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Extensions/UIKit/Sources/UIView+Promise.swift"; sourceTree = ""; }; - FDF08EF7DB1DC3328291CCE00283F043 /* BloomFilter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BloomFilter.swift; path = web3swift/Transaction/Classes/BloomFilter.swift; sourceTree = ""; }; - FE41274C9D04818CA1D824916BD156D5 /* Web3+Contract.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Contract.swift"; path = "web3swift/Web3/Classes/Web3+Contract.swift"; sourceTree = ""; }; - FF4AB01A6E765207693D4AE0D5902553 /* Shifts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Shifts.swift; path = sources/Shifts.swift; sourceTree = ""; }; - FF7884454DEDC6025D2DF234BCEE6953 /* Prime Test.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Prime Test.swift"; path = "sources/Prime Test.swift"; sourceTree = ""; }; + E9035FEAF1C6A112A846C1686B6AA6AC /* ABI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ABI.swift; path = EthereumABI/Classes/ABI.swift; sourceTree = ""; }; + E9A23377D2BCFF84DA71D73288B88475 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + E9C42893B8A27DCD6134EC5FC2D07657 /* Promise+Web3+Eth+SendTransaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+SendTransaction.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift"; sourceTree = ""; }; + EA29F25C6AD9C57F2F030CC8D4401411 /* Addition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Addition.swift; path = sources/Addition.swift; sourceTree = ""; }; + EAD47A57A6C82649BA700C02D205C57E /* Comparable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Comparable.swift; path = sources/Comparable.swift; sourceTree = ""; }; + EEA5EE21242C99256629F5CB60D2DB9B /* secp256k1_swift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "secp256k1_swift-prefix.pch"; sourceTree = ""; }; + F14FC9C9FAC7304FBF240BE3CFABC651 /* Hashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hashable.swift; path = sources/Hashable.swift; sourceTree = ""; }; + F211AC62BA23FDE559ECA2DB16007CB5 /* util.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = util.h; path = Classes/secp256k1/src/util.h; sourceTree = ""; }; + F25ACD34DFF6A5394BF0D9D4CE52C5C3 /* CryptoExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CryptoExtensions.swift; path = web3swift/Convenience/Classes/CryptoExtensions.swift; sourceTree = ""; }; + F2EAAD5F932A97EA7947E900D8C2CC52 /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIViewController+AnyPromise.m"; sourceTree = ""; }; + F357548B3DD39378B080646816E6E6E9 /* EthereumAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumAddress.swift; path = EthereumAddress/Classes/EthereumAddress.swift; sourceTree = ""; }; + F3D67EF88FBE3D4B3938095FD5B0EF82 /* Cryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cryptor.swift; path = Sources/CryptoSwift/Cryptor.swift; sourceTree = ""; }; + F40826DF7C345288BFCB50940E3316CF /* ecmult_const.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecmult_const.h; path = Classes/secp256k1/src/ecmult_const.h; sourceTree = ""; }; + F52D61D44F96B6B6F0BC62D02E5235F3 /* NSNotificationCenter+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSNotificationCenter+AnyPromise.m"; path = "Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m"; sourceTree = ""; }; + F6BEB7BCD2FEE3A583BF68F7E5275487 /* web3swift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = web3swift.modulemap; sourceTree = ""; }; + F6F09A34FF7ACDD387EF421282DCA54F /* main_impl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = main_impl.h; path = Classes/secp256k1/src/modules/recovery/main_impl.h; sourceTree = ""; }; + F6FDF59FF5D7342988E8B93E48F3AADF /* Promise+Web3+Eth+Call.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Web3+Eth+Call.swift"; path = "web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift"; sourceTree = ""; }; + F94161FCBB26A0CF4D7B4792E7CC6394 /* String+FoundationExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FoundationExtension.swift"; path = "Sources/CryptoSwift/Foundation/String+FoundationExtension.swift"; sourceTree = ""; }; + F9574EEF332F3955B7C581226D05FE23 /* SHA2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA2.swift; path = Sources/CryptoSwift/SHA2.swift; sourceTree = ""; }; + FB5D1B477007EA8B27F988C2783A2294 /* Web3+Structures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Web3+Structures.swift"; path = "web3swift/Web3/Classes/Web3+Structures.swift"; sourceTree = ""; }; + FBECF12FAA0EF5E875B62B00A7B4DA50 /* PKCS7.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS7.swift; path = Sources/CryptoSwift/PKCS/PKCS7.swift; sourceTree = ""; }; + FBFD45FE4B26112E398EA7FD68047322 /* Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Utils.swift; path = Sources/CryptoSwift/Utils.swift; sourceTree = ""; }; + FC8ECF2C2B981EAF227B97F9A951A7A0 /* UIView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Extensions/UIKit/Sources/UIView+AnyPromise.m"; sourceTree = ""; }; + FCB3C4C3B8E9D105D6C89E3C89F25474 /* web3swift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "web3swift-dummy.m"; sourceTree = ""; }; + FCC16B752DB521904FDC01E24FB27FEC /* CBC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CBC.swift; path = Sources/CryptoSwift/BlockMode/CBC.swift; sourceTree = ""; }; + FCF992981B15E8A639208AFD0BC42E16 /* EthereumABI.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = EthereumABI.xcconfig; sourceTree = ""; }; + FD7ED36C282A0828EE45325CACB45C56 /* EthereumAddress.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = EthereumAddress.framework; path = EthereumAddress.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FD94AFA068C1AA0B75B12B723463561E /* SwiftRLP.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftRLP.h; path = SwiftRLP/SwiftRLP.h; sourceTree = ""; }; + FFE876E58D1EE05160879870CEFC7966 /* SwiftRLP.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SwiftRLP.modulemap; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -832,65 +908,78 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - FAF78D494C90276099BA6AA47428EE5C /* Foundation.framework in Frameworks */, + C03A5E7CDA94D1EEFAA95BD7C8AA8A80 /* Foundation.framework in Frameworks */, C14B28E1B085DB351DDFC83187893EAD /* SipHash.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6DE49A014A16E0AFD0494C806BA96F84 /* Frameworks */ = { + 30D68B77A2DAB060755632E5E528C760 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 23916C64C98204C928896ABA4BE1DAE6 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3EB472E2EE778BA2800B34DBF4BA6E58 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 34053DDDE72FFDD5416B487A059EA9AC /* Foundation.framework in Frameworks */, - F09F00F07E2F895F0040C7708F92DC3E /* UIKit.framework in Frameworks */, + 486AE96A069EC0BAA1E35FE79194A25E /* BigInt.framework in Frameworks */, + FA024A288AA4357EB04E48AF9BCE53D1 /* CryptoSwift.framework in Frameworks */, + AFD68E6B13C8C94F2AE939D73A1FBBC0 /* EthereumAddress.framework in Frameworks */, + BB2EBA041C1D99F0E24A16187D135DD1 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6FC7B3E7CF91B31F891E43A08C404AF9 /* Frameworks */ = { + 578DFD9660782B537DF2F07E1FD46259 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2256B334FEE938FC8542089190F86ABF /* CryptoSwift.framework in Frameworks */, - DC5FDEAAF77A7BB4CB1E87E269C37A3B /* Foundation.framework in Frameworks */, + B792D575CEA453A698E0D7C8E61388DA /* Foundation.framework in Frameworks */, + 50AFD0EF968A999FEA7BEE127440BB48 /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 78115CACE66B77DE366E00E2252C43A0 /* Frameworks */ = { + 65AC3C45CA627758B1050C16C4D97DA5 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A6774EE973107CFC27CFEC8F9DB19B67 /* Foundation.framework in Frameworks */, + BDCB2C296BD731AD509810D023652C78 /* BigInt.framework in Frameworks */, + 2D53A0E8262E8D0AC71AB6341961A9F3 /* CoreImage.framework in Frameworks */, + 25C1D1DA3E2730A7983A6414FC4656FB /* CryptoSwift.framework in Frameworks */, + D07B6C6C612285018A6657649C285DB4 /* EthereumABI.framework in Frameworks */, + 4E4587C763B65AFD2E81737172773A92 /* EthereumAddress.framework in Frameworks */, + A82046A82CD3575966EAA968491B3FF1 /* Foundation.framework in Frameworks */, + 8B0EB0888995D3195D41D8FEF525C966 /* PromiseKit.framework in Frameworks */, + 92CB3B3B6277FD43A6CCF4B510FBCFC1 /* scrypt.framework in Frameworks */, + 0FFEF56AD88BA2B49BF3F4C06AE60C90 /* secp256k1_swift.framework in Frameworks */, + A7CB1BD8A467E5F5C0D1334A63FDFEA1 /* SwiftRLP.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 8271C77EA6CE678CDE80B46374424116 /* Frameworks */ = { + 8E196E012D90266194B01740F1F181E4 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A35C39D02474ECA3DCFBA3774BC0ED7C /* BigInt.framework in Frameworks */, - A835BB4E4C19FF94F08394E2CF87FBF1 /* CoreImage.framework in Frameworks */, - 6096AEBF1D98A5660AD58DB451ACBFB3 /* CryptoSwift.framework in Frameworks */, - C835056C3477C1D835D811DD61817967 /* Foundation.framework in Frameworks */, - A6149451448E82A46450F264A0C0148B /* PromiseKit.framework in Frameworks */, - FD62D2BEE5596C80F812988613AE3192 /* Result.framework in Frameworks */, - 8DCCC8BA282404D40D84A0F4C94A3A6C /* scrypt.framework in Frameworks */, - 8454391CB46652B78B6AFC504F09067F /* secp256k1_ios.framework in Frameworks */, + A232346CDD9B638A73E31F9B0EEC63A6 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - C813DA1EDF2A4C65DFBAF18A02E0019B /* Frameworks */ = { + 97B4064DB3E6E4051F5AB0CC6A0C858C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0DA073582D93FDE5AD558D56BE5F3743 /* Foundation.framework in Frameworks */, + 7199AB4B0415FC2D3FD6E5331A35B839 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - CA9DF7FB0BA9F12FA7DB48B07D7EDDAC /* Frameworks */ = { + C51A836D82921EFA9484264358165DE4 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2E830391D5F11F6AB9F33366A403C0F3 /* Foundation.framework in Frameworks */, + 94B766B2AB6086601374287BB084205F /* BigInt.framework in Frameworks */, + DA0E5E2EF44B023411F64FD606A05C46 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -898,400 +987,354 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B6CCB228AB6B127FE1F963FDF204B2F3 /* Foundation.framework in Frameworks */, + 07E55C4B3E245C156E30DF5CAB44BB2A /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F88A903EB36D7AF6FC3A163B862AEE5B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 19EEEF4225421C0F5F4AD79A1DD4A7B0 /* CryptoSwift.framework in Frameworks */, + 521929B74C540A89354F6B479324C9DA /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - E1DF5266F8CECC485159ADD3E8DDAD61 /* Frameworks */ = { + FD219DA880ECB1264A9E2956C0B80BF2 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F024A5E674F3608FC07B7002FE0FB19B /* Foundation.framework in Frameworks */, + 3EE92296A5FCE627C62A030E30676D49 /* CryptoSwift.framework in Frameworks */, + 8DCA8BBC469BA4112698AB969F25247A /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 107E07CD6026F30E1767695C2FE214AA /* scrypt */ = { + 13B89FCD8A2E022572A3233867D6DAA1 /* secp256k1_swift */ = { isa = PBXGroup; children = ( - B8B307D4E26840540E204782630D463C /* BufferStorage.swift */, - 3300B7C7FE5D1D9B98E0EB72BAAEC209 /* Cimpl.c */, - 27194B847928F8AF60CE9A6A913D8EAB /* Cimpl.h */, - AB21E2AB71A28225AD43E56B69612A2E /* Salsa.swift */, - EF7EB2244879158182404A5CE01A6DA3 /* scrypt.h */, - FA42AFA594E6D56EC46F6E754CBDA708 /* Scrypt.swift */, - 6DD677FEC0164B14D5B9C8626429493A /* Support Files */, + 5CADF98FCCC9B29F22C0815C40CFA3B2 /* basic-config.h */, + 168BEA0C8F8B3C8FA1F18A535A7B9160 /* ecdsa.h */, + 90DCB2D73690221D1C386B46FF12ACD8 /* ecdsa_impl.h */, + 45AA16F4A39E2367C4A4059E1314661D /* eckey.h */, + 099F776D5862FBF1C32451630511200D /* eckey_impl.h */, + 6B3AACA619772B384FE61866B88EA981 /* ecmult.h */, + F40826DF7C345288BFCB50940E3316CF /* ecmult_const.h */, + 36F8641D4C44BD3D0E08388287B61EB7 /* ecmult_const_impl.h */, + 8C65590568B033C2CC9803F32A614CEA /* ecmult_gen.h */, + 98FDE7A709821277AE5CCEFE2CF7D0B4 /* ecmult_gen_impl.h */, + E161AA24151D1227B11E7BFC7091272B /* ecmult_impl.h */, + 69A7034547608D113E9F306249220251 /* field.h */, + 8CAF5D39045C811128307EAFD468C89B /* field_10x26.h */, + 3F9BFEEC4833708E9B4067DFD84C5DBB /* field_10x26_impl.h */, + BCF8AF858508A3EC73D766B1CF48098F /* field_5x52.h */, + 74569BCFAE1C489C9D0FE3248C5CED66 /* field_5x52_asm_impl.h */, + 7B50F465279A418BE82FCA4EBD2177CB /* field_5x52_impl.h */, + 16AC0F8318A1676FBF02362F4595CDA5 /* field_5x52_int128_impl.h */, + 1A02CE100739858E7B58E0BC830FC666 /* field_impl.h */, + B2ACAB499A9507E7F5D0105E4A0D9769 /* group.h */, + 45C266B7095DCF8E4E4847CC708EC1BA /* group_impl.h */, + 4754D5FD3244548E259E3E0F25D01E84 /* hash.h */, + 404FC9F4A1E9D404A14FDFD25794F248 /* hash_impl.h */, + DBA7F751A89D1E1C5D62E2BADD1420C4 /* lax_der_parsing.c */, + 82D6B4BC9796460A18553C2F38C8AEE1 /* lax_der_parsing.h */, + 166AE9FC576B1A9469DA3090BD651D48 /* lax_der_privatekey_parsing.c */, + D78C0BC324759D084A8384179425BF47 /* lax_der_privatekey_parsing.h */, + 06016B2B87ACCBAB44FEDBBD9D102DE8 /* libsecp256k1-config.h */, + F6F09A34FF7ACDD387EF421282DCA54F /* main_impl.h */, + 810C0B92B1AE41809192BF5012A4A523 /* main_impl.h */, + 075236A3B5DC60B4370A0CCF672B8AEF /* num.h */, + D3D1AAC32C041B5712F196A61F5CA39D /* num_gmp.h */, + E4F1E867DE919C0E595D36510EEFE1A6 /* num_gmp_impl.h */, + 7C4C422A86A1DAE9DFC19D7BB256B774 /* num_impl.h */, + 932B2C4CD9556E6318A094CDEA2E0E13 /* scalar.h */, + C4BEA212C4B71400038EE33CE9319F63 /* scalar_4x64.h */, + 3028289D562E89D58F6AB987E4AA0EDD /* scalar_4x64_impl.h */, + A15E042C8396D13ADB12383453C3B15C /* scalar_8x32.h */, + 887360628FC3B77442F4026B0B7A51CD /* scalar_8x32_impl.h */, + 18C24CF8C724DE2F030E4429AD7EF3B8 /* scalar_impl.h */, + 724C44BB8A759DE7BA8C45425E26F27A /* scalar_low.h */, + 9B3438A6ED71C95FBB9BB471E36AFE4D /* scalar_low_impl.h */, + B72048F832A9C75C2A81C9CBC769CD8D /* scratch.h */, + 05625082EB748971627BF6E1ABEE72BE /* scratch_impl.h */, + 4673A58E053194AE130B84DD19ADFC40 /* secp256k1.c */, + 22AB1F2D4F1253D1F55214A8B4A078B5 /* secp256k1.h */, + DD4F0D58F76F4D676944EC3DD0AC648D /* secp256k1.swift */, + ACCA271C75D4B21ED35646A5A4731E5E /* secp256k1_ecdh.h */, + D45E969A3BDBBB4ECBB6299F26380AB1 /* secp256k1_recovery.h */, + F211AC62BA23FDE559ECA2DB16007CB5 /* util.h */, + B40F0123C9DC9C6FEB3F45C2DF44D3B2 /* Support Files */, + ); + name = secp256k1_swift; + path = secp256k1_swift; + sourceTree = ""; + }; + 156028A87E2A2ECF3EF26CE7526C5550 /* scrypt */ = { + isa = PBXGroup; + children = ( + 1F8DBA32491646170BAF7A1ED104880B /* BufferStorage.swift */, + 2D47BF61850EFDEED83A76DA6498C213 /* Cimpl.c */, + 6C7A9472FF71EC33BE7131124C53835E /* Cimpl.h */, + 712C8CFFF313A75DD19030E239230234 /* Salsa.swift */, + 1CF0705033B0A2728CE16D3AF008DD51 /* scrypt.h */, + 4122BE1E9FD4A604314CE85B4CDFAEBF /* Scrypt.swift */, + 93CD8E17641E019A6658DE6E52039401 /* Support Files */, ); name = scrypt; path = scrypt; sourceTree = ""; }; - 14EB0EFF1C1B886F9D37301476AB8061 /* iOS */ = { + 1E142BF8C1328CA6AC5A555BC5456AE4 /* Support Files */ = { isa = PBXGroup; children = ( - FAB3F8944868A08EDAFE81B3CE257C46 /* CoreImage.framework */, - 9BC92AB3E8B43B6FEFE7AB4748793AE7 /* Foundation.framework */, - 017C3C0F878AD51DED5CBADD10EF9AA8 /* UIKit.framework */, + F6BEB7BCD2FEE3A583BF68F7E5275487 /* web3swift.modulemap */, + 900BF76676BA8D9C9EE025EFBFF7DB36 /* web3swift.xcconfig */, + FCB3C4C3B8E9D105D6C89E3C89F25474 /* web3swift-dummy.m */, + 9AFC7ACBD0ADDDB3FA2271112BED97D2 /* web3swift-Info.plist */, + 546F993BFB7CD1EB1D1DF4E918774017 /* web3swift-prefix.pch */, + ABA0BB0844791492402D5AB66E61BB24 /* web3swift-umbrella.h */, ); - name = iOS; + name = "Support Files"; + path = "../Target Support Files/web3swift"; sourceTree = ""; }; - 14F4CA37F0D910DFAAF7E02FD2E7CF98 /* UIKit */ = { + 2A98901778463113541B279F195C7758 /* SwiftRLP */ = { isa = PBXGroup; children = ( - AAB55717467B6E1C5DC461B186D34505 /* PMKUIKit.h */, - D0A9DDA2F0156D188BEFF81EBEE38903 /* UIView+AnyPromise.h */, - 33C9F06AC6D082FC66126F531BBC3E3F /* UIView+AnyPromise.m */, - FDC8C3143E181D6248738187393BEA40 /* UIView+Promise.swift */, - A518522A431DA29C6EAB22C89220F3D3 /* UIViewController+AnyPromise.h */, - B0C8BA06101F357C799BC88E5081257A /* UIViewController+AnyPromise.m */, - 2F3B8889D0D18DEF2CF5F05EFCE9F568 /* UIViewPropertyAnimator+Promise.swift */, + 3705B10251AF105DFD9C06CAD8BF008B /* RLP.swift */, + FD94AFA068C1AA0B75B12B723463561E /* SwiftRLP.h */, + 48C295615829CD90A1E669F428B31E4A /* Support Files */, ); - name = UIKit; + name = SwiftRLP; + path = SwiftRLP; sourceTree = ""; }; - 1A9EFC5B1063CE4DE1F57CC719825B71 /* secp256k1_ios */ = { + 2B9CE0B991C87B26E9797739336B8A6C /* Support Files */ = { isa = PBXGroup; children = ( - 6EB4026359CE620C0114B424CBA5D40D /* basic-config.h */, - AE5EE930804B944DB46E6C6221E7B4C4 /* ecdsa.h */, - 0D99B05CD6515234D9A52524E78779C4 /* ecdsa_impl.h */, - DFEE82FC5B9EEB2D9735B3D3FFF8E2C7 /* eckey.h */, - 6153FF45F92075AB612127F5BACFD9A6 /* eckey_impl.h */, - 2DDFDF55E7005DEBC91225828C76BDB4 /* ecmult.h */, - 48EB818C63ADD7AC3471D41B7FEFBEDE /* ecmult_const.h */, - 6B2D0E063799E56A90B8804B84308E65 /* ecmult_const_impl.h */, - 3404AAEF07BB50E914AAA75416AF8556 /* ecmult_gen.h */, - 93F85B21BC57EE24795630B658B179F0 /* ecmult_gen_impl.h */, - 2377E7F5F6E1B9EAA04A11FB9329ECF5 /* ecmult_impl.h */, - 30B04630329D72AB07A6571B0E35368B /* field.h */, - 7857CCE04CD7E06C41D8CFAD0FF6486A /* field_10x26.h */, - E1B553971FDAECBA58CE3B063C9A66F5 /* field_10x26_impl.h */, - A03CE4B278E0C83715E59182E1F70067 /* field_5x52.h */, - E69B0EEC45372ADC020F4E2957A210D2 /* field_5x52_asm_impl.h */, - C9E535CC3B56DF96BD33013093E21D6B /* field_5x52_impl.h */, - 7A09EE23C660A1403809F462D2A1C0B7 /* field_5x52_int128_impl.h */, - FC53C9C956E2390F9B8020E114BAEF38 /* field_impl.h */, - D460F9A266BE2FC2769DCC397350234B /* group.h */, - D606FC0EE4EE3BC0BB4A1413AD91A5E2 /* group_impl.h */, - 01542E21EB2EEDA093596518918486A4 /* hash.h */, - BA56A6B6D3AA5CCAABD3A9421FF1FC9E /* hash_impl.h */, - F8C22382C482B8DB731B8A6B3B5618A5 /* lax_der_parsing.c */, - 7F20F56831A09E0B4A45D3E47576CF42 /* lax_der_parsing.h */, - 7AE9359608C045D06EB2204BF13F3E78 /* lax_der_privatekey_parsing.c */, - F09D086B85A197C3C12AF8FC32888844 /* lax_der_privatekey_parsing.h */, - F1EE218B7D030099B8EF4244294877BA /* libsecp256k1-config.h */, - B5AE0CE423C25CAF8DDEF32FE109DD36 /* main_impl.h */, - 569540840E89CA743338311B4EAAC218 /* main_impl.h */, - 1BC6B91E0252F62A5E5F43F9AA236607 /* num.h */, - 3AB84887CB548044F04C66D21491F30C /* num_gmp.h */, - 10E6CC65707B2EBCD6BD73088BB3B221 /* num_gmp_impl.h */, - 78D5360A2EE87EB571652044CCFFCDDC /* num_impl.h */, - DF874BF9CCC77EB83F09D12A4308C68B /* scalar.h */, - 12ADBF373A266E4D41DC6FC96C0A5C25 /* scalar_4x64.h */, - D0280A8B81447E72F8900FAC8DC255B5 /* scalar_4x64_impl.h */, - A7B345CA772E8DBD55A2E927CBA8604A /* scalar_8x32.h */, - 72070A5E4D81C0DC66FD2630AB64FC35 /* scalar_8x32_impl.h */, - C88308E23ACC16B283556A5CA6AC322F /* scalar_impl.h */, - 8A95DBF14B5B5C4080A5984C12B11FB1 /* scalar_low.h */, - 6158BF72A61B2B3CE2240025C34B8A23 /* scalar_low_impl.h */, - 319DEB9643FEFA6C0B1D8706C28879A3 /* scratch.h */, - 7E849077E96B6057FFFCBFE60E29E639 /* scratch_impl.h */, - 2296888E4B0AF0932F150F5D557DD816 /* secp256k1.c */, - 926206F9931948DD8CBFD7D9EABD033C /* secp256k1.h */, - F0504F5A28A5B671EFD041FFF39ECCD1 /* secp256k1_ecdh.h */, - DBC471D81098384ACA05477FCAF96F28 /* secp256k1_ios.h */, - 98F7CA5B3DED455C4A7996A4D4163AA0 /* secp256k1_recovery.h */, - B2087493B84529EC925CD96B6E28CEDD /* util.h */, - 8C073E76EFC212F9A8B6C02E168D5CA4 /* Support Files */, - ); - name = secp256k1_ios; - path = secp256k1_ios; + A1A7DE903866EFAB229ECC3D1346434B /* CryptoSwift.modulemap */, + 1160128225B85906623514D7D7090ECB /* CryptoSwift.xcconfig */, + B575CEB1C724F85E4A1857AA0042309A /* CryptoSwift-dummy.m */, + 62B3D5FA72C0FCAE1E2F6158F0F73411 /* CryptoSwift-Info.plist */, + D7B39A4A3DA9EBB4C60E868C0C5CF2C2 /* CryptoSwift-prefix.pch */, + 912562705A9D693EE4E79FC65116D991 /* CryptoSwift-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/CryptoSwift"; sourceTree = ""; }; - 1D5A330E329F910A6C6B734E96990F3F /* web3swift */ = { + 451E5E26E84731ECA728D5EBED1DF276 /* web3swift */ = { isa = PBXGroup; children = ( - A997EBF435A0C1763556BA8793373E65 /* ABIv2.swift */, - F2A78FCC4EF319B19E3793B5E9793FB6 /* ABIv2Decoding.swift */, - 783C789DDF22F7B1CD81D5223F61B0AD /* ABIv2Elements.swift */, - 2BAB8972F826F08F2AF2878A15874107 /* ABIv2Encoding.swift */, - 28FFFC9BD859F58312467FAB0ADBE711 /* ABIv2ParameterTypes.swift */, - C0675963B7F5BBBCE7B3FEACD46F1059 /* ABIv2Parsing.swift */, - 4ABD85E6008589BB486729FDD20F2263 /* ABIv2TypeParser.swift */, - 07B36EAF62DEBCA4E85EC353970A217E /* AbstractKeystore.swift */, - B27AAE202915C26D30FF0AB6D511C2A5 /* Array+Extension.swift */, - 82DA4B0181B2D7385FE66132570022B0 /* Base58.swift */, - 6CC48F7531359D8D25C876099C73CD53 /* BigUInt+ObjC.swift */, - D5A8E66DCCDCF6FE84240BC74547E057 /* BIP32HDNode.swift */, - D881EFCF8C8321AF82D7B1E16080EED1 /* BIP32Keystore.swift */, - 14DEE56FE9FEE65882DAFFD2A00048C6 /* BIP32KeystoreJSONStructure.swift */, - 1470FE533DA2633F1A66FDDDB7B7E280 /* BIP39.swift */, - B4E57C780B6DC73DDE512C89289D7C6D /* BIP39+WordLists.swift */, - 98D040F49C5324D284DD9F2514B31740 /* BlockExplorer.swift */, - AB45C8770EE42F74BECA341A582A9813 /* BlockExplorer+GetTransactionHistory.swift */, - FDF08EF7DB1DC3328291CCE00283F043 /* BloomFilter.swift */, - 3BB6725C03A0E4193BC3CE2081AED530 /* ComparisonExtensions.swift */, - B879FC9FF02959F80112A1028330B1C4 /* ContractABIv2.swift */, - 343BA041D669379F08B4BA7E48C7BF65 /* ContractProtocol.swift */, - 8BD2E83F8EC164E54CDED400AD9CFFE0 /* CryptoExtensions.swift */, - D2CFB442CB244B69C89D6C0651E21E9D /* Data+Extension.swift */, - A0C7EF8D801C5AF4AB0F1802971A0768 /* Dictionary+Extension.swift */, - 03C1C7040F24F41655E6559346C1E313 /* EIP67Code.swift */, - 986FB1624E314E5F2E9F13EF4B8175CB /* EIP681.swift */, - D4C991E8454B8E94B54C310E76276DDD /* ENS.swift */, - 7EF9F4D741B2D1D2C8FCD47B3152DA9A /* EthereumAddress.swift */, - 192224DB4709FB6A4273807EFBCDCBD4 /* EthereumAddress+ObjC.swift */, - 62C2D8DAB77DC8A25C4E449BC300AFDA /* EthereumFilterEncodingExtensions.swift */, - 0555E01E3A109C44BDC8D3F72BC8BDBD /* EthereumKeystoreV3.swift */, - 5628BB0370E6607CB7726B6ED62CA7E7 /* EthereumTransaction.swift */, - 80252C1601887FBAA6A92A7774A1AFE9 /* EventFiltering.swift */, - 8C1AB9A135AD942B8A7A7B281141EB93 /* IBAN.swift */, - 0AED2A5ABC55B2E2852BAB3E48BE6124 /* KeystoreManager.swift */, - 14D6ECE7EE1EC56E855EB8089B581FE7 /* KeystoreManager+ObjC.swift */, - A7D5037585515D7D31ABCC390E523DCE /* KeystoreV3JSONStructure.swift */, - 00F18ED0F07AAD5FD3142707A5EEB7E4 /* LibSecp256k1Extension.swift */, - CD3A802B0EBBDBABC284E77D0173F524 /* NameHash.swift */, - 67DB53803B8AFF12F28E47500E5FA4D5 /* NativeTypesEncoding+Extensions.swift */, - C8CDF9DE89CE405CCA08750BE0B93C09 /* NSRegularExpressionExtension.swift */, - 17FF07C284C525895497483DCD35E62F /* PlainKeystore.swift */, - 41455399C8B4A289650ADB5856F86D5E /* PlainKeystore+ObjC.swift */, - 1DE42A2863AE2DBF2428DD725882E73F /* Promise+Batching.swift */, - E0D132AD733102F963CAD5D649C4788F /* Promise+HttpProvider.swift */, - A964E878B714B85BFFB78FE9A1D48601 /* Promise+Web3+Contract+GetIndexedEvents.swift */, - CB88C6871FFA8E2AEC4C11D2134C8505 /* Promise+Web3+Eth+Call.swift */, - 6851DCEA08736B9FD49677B930D804B9 /* Promise+Web3+Eth+EstimateGas.swift */, - 703E60310515C9DAE5C5B44D4ADEF09D /* Promise+Web3+Eth+GetAccounts.swift */, - D5C02D3C50FB98C143D745510D16219A /* Promise+Web3+Eth+GetBalance.swift */, - FD29F1C88C4C182E528EFD16775B5E6B /* Promise+Web3+Eth+GetBlockByHash.swift */, - F5A23401BDDA896B8128FE62F073EB4C /* Promise+Web3+Eth+GetBlockByNumber.swift */, - 8F8C6DCFB940EB1AE8254FC269A0EBE9 /* Promise+Web3+Eth+GetBlockNumber.swift */, - 47F253E5C15DCAA5F32728BF380B7FD3 /* Promise+Web3+Eth+GetGasPrice.swift */, - 4B857314AF2E96C8DA7CAAEFAEF1F7A8 /* Promise+Web3+Eth+GetTransactionCount.swift */, - BA0B3AE7019BDA95536AE5163FFCE31F /* Promise+Web3+Eth+GetTransactionDetails.swift */, - 51901516BECC0FFD77E736D256965599 /* Promise+Web3+Eth+GetTransactionReceipt.swift */, - C78A90EF1AC64CE7665CF433AE31CB4F /* Promise+Web3+Eth+SendRawTransaction.swift */, - 998D75A403FDA6A5E849C8AD8F7837D3 /* Promise+Web3+Eth+SendTransaction.swift */, - 099411A4987328A3637E16D55446C7C0 /* Promise+Web3+Intermediate+Send.swift */, - 99D3AA13FF0CF2C33FD2CB7EF9FE4214 /* Promise+Web3+Personal+Sign.swift */, - 3CD73B7D3181B0D94CE212502F3D74EE /* Promise+Web3+Personal+UnlockAccount.swift */, - 81DA673B05C77642F07D69EA4532425B /* RIPEMD160+StackOveflow.swift */, - EB97BCB1F8ADDFB1DA7B46904EFEB297 /* RLP.swift */, - 8FC0F0D599A825FC0C5FE165BCB8EB0A /* String+Extension.swift */, - A9C94A81A904A9492C86F03251F3F9A6 /* TransactionSigner.swift */, - 5E6BCC699F0A197E17875C4F23F79E33 /* Web3.swift */, - 1A48691ED7AB66A35E08ABFE8367B7EC /* Web3+BrowserFunctions.swift */, - FE41274C9D04818CA1D824916BD156D5 /* Web3+Contract.swift */, - BBEB3C1E2A88B6371BC0922D8F50C3B8 /* Web3+ERC20.swift */, - 792AC5301BC3E29E4EF8E519E96F1ECC /* Web3+Eth.swift */, - E149422ED5FBFBBFDF869F5267A3CFED /* Web3+Eth+ObjC.swift */, - A5950DAB6A6AF16598B547C61614F67F /* Web3+EventParser.swift */, - F368BDEF8D570DA31892DE78BFAFEC69 /* Web3+HttpProvider.swift */, - 23101CE8BFD9EF3690B3991301140D48 /* Web3+HttpProvider+ObjC.swift */, - CC7F30FF1F8C2624985ED76AFEF7343F /* Web3+Infura.swift */, - 17623569C850BA2E2564795979DFDB57 /* Web3+Instance.swift */, - 44D07ED0C754D51CF6C2BC1702DD564E /* Web3+Instance+ObjC.swift */, - A0B4DEDF5D53AB822C732F43AFB83EA6 /* Web3+JSONRPC.swift */, - 5114E6B22DBDF708ECE7C3019E5D6106 /* Web3+Methods.swift */, - 793565E05F87C940B4D333C65EBEDE8B /* Web3+ObjC.swift */, - 3A402FB6C488D91DF67F023381022997 /* Web3+Options.swift */, - DE534FDA36211FEA618C63A4A7779CF5 /* Web3+Personal.swift */, - FCC2FE29E9996BD207285015889B3279 /* Web3+Protocols.swift */, - 0E5FFF2ADF7334E4256CFC9542594671 /* Web3+Structures.swift */, - 1D88868F549DDDA1E4CA1095EF79FAC5 /* Web3+TransactionIntermediate.swift */, - 10F89C677C577204A26019CC289B1E94 /* Web3+Utils.swift */, - 9A6CCBF638311206CEFF4108D56E0D6C /* Web3+Wallet.swift */, - 8ABD49EF51122D8FA6197117E9244422 /* web3swift.h */, - DC66B1C4A5263CB1B1CA7B87AA49418F /* web3swift-Bridging-Header.h */, - 6F2C6A60A26A66D8239F6B553FAAF74E /* Support Files */, + DC529C712D847E1520FC99E66853D5E2 /* AbstractKeystore.swift */, + E067ABC95AB5A08F48E2887AC6ECDF59 /* Array+Extension.swift */, + D1E952E16B5F2C98AD684EBCDE120FB1 /* Base58.swift */, + 3C37C7E9D0EDF73545C404CD099C00A6 /* BigUInt+Extensions.swift */, + 1A1038DC1633B7F9F4C06BE77D4DE0CD /* BIP32HDNode.swift */, + 681530AB9C692077CCA2B03BF1DDED10 /* BIP32Keystore.swift */, + C6954609CD039F4F09E75EBC79203A7B /* BIP32KeystoreJSONStructure.swift */, + E37C1C69C98C58ABCDCA9F4B01061D0F /* BIP39.swift */, + 7CC86CBFE859D6D9E92CE62268D0C8BB /* BIP39+WordLists.swift */, + 1BCF26ED236D1B8E24321ED226B25DF4 /* BloomFilter.swift */, + A8EA98CA2EC2343E64F97FE62866F72B /* ComparisonExtensions.swift */, + A9C6FDA4C7AB83C6CB50D21313F5540F /* ContractProtocol.swift */, + F25ACD34DFF6A5394BF0D9D4CE52C5C3 /* CryptoExtensions.swift */, + 4039FF96173F8D1FD541617AFC84F660 /* Data+Extension.swift */, + B109DA379FA9ECABADD3EE3B80DE29B8 /* Dictionary+Extension.swift */, + 331413774F7D7F0757A5F0B9B2DAA4BC /* EIP67Code.swift */, + 91C4C863E4EB75ABB3E8474227D40A73 /* EthereumContract.swift */, + 0F64296999AC33A5090DFA571030C3B3 /* EthereumFilterEncodingExtensions.swift */, + CB6ECCB5CD4592A97A0350BE32E726B5 /* EthereumKeystoreV3.swift */, + C613070ACCF0136D2C14651C688498FF /* EthereumTransaction.swift */, + 4CF166364A9E5E97DD45519B5D546ABE /* EventFiltering.swift */, + 93F9F961FF5E739D6A27BAE1B6B84255 /* IBAN.swift */, + D9EC47F44C823E1171CF73606A494D29 /* KeystoreManager.swift */, + AADCA6CCD158303369C205F70D9E4590 /* KeystoreV3JSONStructure.swift */, + D35A4906E915E02BCCA9912DBD2D26C9 /* NativeTypesEncoding+Extensions.swift */, + B1E7E3D26AF128FB9F5B65F2975134E4 /* NSRegularExpressionExtension.swift */, + D94B4FB5E11583412D053DB2C819F58C /* PlainKeystore.swift */, + 20F9F737EDFCFEF9830F0F4B621D83E4 /* Promise+Batching.swift */, + B4D9F2707B320173226689A2ED924509 /* Promise+HttpProvider.swift */, + C5CC3933EB505F78FB90467B4EFA6203 /* Promise+Web3+Contract+GetIndexedEvents.swift */, + F6FDF59FF5D7342988E8B93E48F3AADF /* Promise+Web3+Eth+Call.swift */, + 7B5D413D46DFC82B6CBCBB8C5DE7CAFB /* Promise+Web3+Eth+EstimateGas.swift */, + C07DC3D70012BD62BDE7B7032EE7A09E /* Promise+Web3+Eth+GetAccounts.swift */, + 4F8FBC6FA4567C651C24DACB88FAA458 /* Promise+Web3+Eth+GetBalance.swift */, + CD643FEB508293D31031F06D61BFEDC4 /* Promise+Web3+Eth+GetBlockByHash.swift */, + 1860F5FD511E1CDC0321E2D6EBA3AFC5 /* Promise+Web3+Eth+GetBlockByNumber.swift */, + 905EF6316653669512380D6206D3F8DE /* Promise+Web3+Eth+GetBlockNumber.swift */, + CCC1EA2773146F4324EF5ED0B3A3EFE0 /* Promise+Web3+Eth+GetGasPrice.swift */, + DE20423192DCFD6A61AC3EC0E1210470 /* Promise+Web3+Eth+GetTransactionCount.swift */, + 010F596FBEF9CCC63191ABD3376144DD /* Promise+Web3+Eth+GetTransactionDetails.swift */, + E16927F5D553D8A1B33E94ACCADB17A3 /* Promise+Web3+Eth+GetTransactionReceipt.swift */, + 6E2D8D233951D90BE212C1683EDBE096 /* Promise+Web3+Eth+SendRawTransaction.swift */, + E9C42893B8A27DCD6134EC5FC2D07657 /* Promise+Web3+Eth+SendTransaction.swift */, + 727727B1D330C3E96EEC5855430FB9E5 /* Promise+Web3+Personal+CreateAccount.swift */, + 8075D0204E7F5BE1CEA87D03F0556108 /* Promise+Web3+Personal+Sign.swift */, + A1838E8D409817D754EDF58FCF91BFCB /* Promise+Web3+Personal+UnlockAccount.swift */, + 8E2604B78547CAD1266D726FEE58D2C5 /* Promise+Web3+TxPool.swift */, + 64E4ADB46AD6A716EBE5FEE6B3F98341 /* RIPEMD160+StackOveflow.swift */, + 9E7B0F55D684C65453D559D9B4BDC75A /* String+Extension.swift */, + 8A274CAE3C49CDADD2C8EDD0B6A2D5EC /* TransactionSigner.swift */, + 03FB5FA9008321DCD209AFD9C2CE3670 /* Web3.swift */, + 0F697DE9A9B9780448371273B4B4986B /* Web3+Contract.swift */, + 6E507073C6A899B5150C313DA3E1E7FF /* Web3+Eth.swift */, + 46C0D5E07A4C170FDD09AB0EB76EF331 /* Web3+Eventloop.swift */, + 9833899028708E6BF26F6D1610FE1997 /* Web3+EventParser.swift */, + 5DBCD77147B6CFE8E4D75C61EE88C171 /* Web3+HttpProvider.swift */, + ABEE70BA5A5BC35C34D6C5DA8EB13409 /* Web3+Infura.swift */, + 68FBA8773B17FF0BE969F589278D0761 /* Web3+Instance.swift */, + CC9030EBE40E463BE51970F190211BDB /* Web3+JSONRPC.swift */, + 8F7AB407FF50CC1C82BC47E27132E3F0 /* Web3+Methods.swift */, + 380373C357903D6101BBC00E60665458 /* Web3+MutatingTransaction.swift */, + 617463151A102A6AE3996BBA956F7E7B /* Web3+Options.swift */, + 5E005CD6FAFA3B7D23F16DCFEE03883E /* Web3+Personal.swift */, + BC202ECB6EBC87A3FF623F01851811DB /* Web3+Protocols.swift */, + AE647B348F1A393A971238BA674A6485 /* Web3+ReadingTransaction.swift */, + FB5D1B477007EA8B27F988C2783A2294 /* Web3+Structures.swift */, + 43C85B8AD6FC929A0DD4ED8A7F71D777 /* Web3+TxPool.swift */, + A35C0ED9C1391857C58C0CF40B765953 /* Web3+Utils.swift */, + D9CEEA6FBF391E65A68E60592882B642 /* Web3+Wallet.swift */, + 1CA6616160AC6F13FA7BCA2D9C4BB992 /* web3swift.h */, + 1E142BF8C1328CA6AC5A555BC5456AE4 /* Support Files */, ); name = web3swift; path = web3swift; sourceTree = ""; }; - 2733804763CE59AA43D291B9FE779E33 /* SipHash */ = { + 48C295615829CD90A1E669F428B31E4A /* Support Files */ = { isa = PBXGroup; children = ( - E7AE5E3A63DD4DE3E3574F245EBBFC95 /* Primitive Types.swift */, - 421EFAA21C55AAB5DBB49F3C8F2D1551 /* RandomUInt64.swift */, - DF11D2FEEDD0F5C59F1823F81B0D54DA /* SipHashable.swift */, - 98A2FBCCE443F266993B3935B6D04F58 /* SipHasher.swift */, - E748F76B23029F246A1B28D2C982B4F1 /* Support Files */, + FFE876E58D1EE05160879870CEFC7966 /* SwiftRLP.modulemap */, + C71613C4CE6D47BE330CC73E165FEDC6 /* SwiftRLP.xcconfig */, + 47098DB41878FF379AEBC8644EC53E97 /* SwiftRLP-dummy.m */, + A3D1675AC5880CADBC5A85BEEA25FEA6 /* SwiftRLP-Info.plist */, + 0C0E2B8299A8D557266A0BFDE4075564 /* SwiftRLP-prefix.pch */, + 6C47EE1AA0C0CE661EBC27D485F20EA3 /* SwiftRLP-umbrella.h */, ); - name = SipHash; - path = SipHash; + name = "Support Files"; + path = "../Target Support Files/SwiftRLP"; sourceTree = ""; }; - 41AF95D80606C73980DD4A82DFB28369 /* Frameworks */ = { + 566EE770C47CF62C66CE98772C974B91 /* Pods */ = { isa = PBXGroup; children = ( - 092FDF7F6A0B07EA5F43A3E8652A2A11 /* BigInt.framework */, - 97BDBF4C5CA18216A7B59BE4733E8907 /* CryptoSwift.framework */, - 1A702E196081639CA2834C8EFC66EB60 /* PromiseKit.framework */, - F5CFD5714E4C2267C41E1D20D96A6432 /* Result.framework */, - CDE87D210458FFB601CC2F569131ACDE /* scrypt.framework */, - 81DE6AEFFC0C4855DC44FB339A0BDE6C /* secp256k1_ios.framework */, - F73C2F6E4737EA189FC60DD089E7FF2F /* SipHash.framework */, - 14EB0EFF1C1B886F9D37301476AB8061 /* iOS */, + 8A3093C26A8EDD229F38F6B4FAFDDE58 /* BigInt */, + 9C4DB70411CDB99C0640965FF70AAD10 /* CryptoSwift */, + 885494EA0A353D8564623BB7CB4A1C8F /* EthereumABI */, + 6EE357E261347A2A326950A8CB1DCFB8 /* EthereumAddress */, + 71F7E87501D8CFC0ADEBAC36590A2181 /* PromiseKit */, + 156028A87E2A2ECF3EF26CE7526C5550 /* scrypt */, + 13B89FCD8A2E022572A3233867D6DAA1 /* secp256k1_swift */, + 711B866CACAD493AD2D04E67BF3A872F /* SipHash */, + 2A98901778463113541B279F195C7758 /* SwiftRLP */, + 451E5E26E84731ECA728D5EBED1DF276 /* web3swift */, ); - name = Frameworks; + name = Pods; sourceTree = ""; }; - 48F295883AE990614A7DE9217550905F /* CryptoSwift */ = { + 68D1B13E7ACEC4FBBFF130BADA9C0A1B /* Products */ = { isa = PBXGroup; children = ( - 0C6D5088382FE71F237781CCAA15029E /* AEAD.swift */, - 9554A1412BDC823D749F20DEFFDCE38E /* AEADChaCha20Poly1305.swift */, - 0E23DA5CE9BE03D67FA010C086FD8443 /* AES.swift */, - 59DEE9838482282D026880491D6A09B8 /* AES+Foundation.swift */, - 6A0D7C8248B11637C656458A2F76AA99 /* AES.Cryptors.swift */, - 4E642878C5D7B7E8AAF50ACE887F81C9 /* Array+Extension.swift */, - 880358145E7B982F9FCB5D316EB4DAB4 /* Array+Foundation.swift */, - AEE2227E4C836011E279D5A187A8C1EA /* Authenticator.swift */, - 73385F119353E84309DFB29961588151 /* BatchedCollection.swift */, - 8A4893E75518CE78AD46F09C2B0BCB86 /* Bit.swift */, - 5E4678722B01715F2B3716BD3AF97D05 /* BlockCipher.swift */, - 273095CE17C51A9F55E72F26385B33D1 /* BlockDecryptor.swift */, - EF0A571C3D738760D77BE44DC3DBF459 /* BlockEncryptor.swift */, - A04EB2E762C3C146021C34F31E991075 /* BlockMode.swift */, - A147CC10074D694F4FEDAD5C37A4345E /* BlockModeOptions.swift */, - 8F599A827CAE59ECD5DA613ADD1801A7 /* Blowfish.swift */, - EA92C153CAE76CB71780322E95F9393B /* Blowfish+Foundation.swift */, - FA6B0C20639EFF1F778E27935D0273C4 /* CBC.swift */, - 1446285C476D91623FFA25FFE16B2493 /* CFB.swift */, - 30D3D5E52087AC748C8081879D9C93E0 /* ChaCha20.swift */, - F689778FFDCF60FE0330895D2FF579D3 /* ChaCha20+Foundation.swift */, - F78DD3E0F25108732A8209B2470BB51A /* Checksum.swift */, - 3404310B6A67105860E0486EF8879528 /* Cipher.swift */, - A1A1E5950E2319371590A7F1B55689D0 /* CipherModeWorker.swift */, - FD20AF7008A9F71D298E2252FDF9EB7B /* CMAC.swift */, - F14BD8371C5BD953ACEA2EC348DF108F /* Collection+Extension.swift */, - 4AD2681608D7996F0B97567E76E38B0E /* CompactMap.swift */, - 0304AE8FA05319628AC1812E3E507A21 /* Cryptor.swift */, - 1651C3EB5087C3CF5294DBDA737440F2 /* Cryptors.swift */, - 206FB0DA1ED8B1EC1C34CCC55E7D0E38 /* CTR.swift */, - 8FC82B238B016E51FBE7F8F1C2462A73 /* Data+Extension.swift */, - 4770FB1CC45B404A730863A5BBDE8C9F /* Digest.swift */, - 28D14AA0CBC0F7D8CB4FE9994C3B4B48 /* DigestType.swift */, - 35D65B1B12252C4CDBEF210FE2DA6E52 /* ECB.swift */, - F87BEFD39CCEE24503E65946D2C28F34 /* GCM.swift */, - 6E13296A1B1E4B39699423E4D419FD51 /* Generics.swift */, - C26DBBDC4361A9A3D875862D9CDCC222 /* HKDF.swift */, - 064D539BBAF5825903014E2E42F019F4 /* HMAC.swift */, - 52989BD6A3046CDEC153D8C28451A374 /* HMAC+Foundation.swift */, - 63ECDB3BEF180F5E5465DF3D9196A913 /* Int+Extension.swift */, - 1DB40030A8982CFEEB33A6F735ECF86B /* MD5.swift */, - 7A25076F49F8EC969977B47A3D270973 /* NoPadding.swift */, - D7DB5E41B41743430F0D989437AD4091 /* OFB.swift */, - 45F2F797BEAEC4E38CE2D033EE44613C /* Operators.swift */, - 6CDD0D9B03D820E5086D9498D2D9DD67 /* Padding.swift */, - 716FEE6D4ADC494CA5E7323805A351DC /* PBKDF1.swift */, - B64A66E3159EDD6E2476105656E5B809 /* PBKDF2.swift */, - 4E59725DE3DCFD49F652BE2F16C05B26 /* PCBC.swift */, - FCE7FE3A8096914EF9B8E43AE1000416 /* PKCS5.swift */, - 36445A6F290DA01FBC4F26C0A5D31D70 /* PKCS7.swift */, - CB5830DCF5BE1BC265D8673C39D6ACFF /* PKCS7Padding.swift */, - B3ADFA503DA3512C3D7462CEBC3461E1 /* Poly1305.swift */, - 2A6FF6A14EF4D6724CFBFB93A4F4F681 /* Rabbit.swift */, - 9A40978EBB425827600AB1B975DAFEE5 /* Rabbit+Foundation.swift */, - 707432298CD4D86FB4904B22A030DBAD /* RandomBytesSequence.swift */, - 57C115113180DDD97A209C450A323C0E /* SecureBytes.swift */, - E7216ACED116DF927E827ACB9E2DF163 /* SHA1.swift */, - 11D360750D0388F4DDEA48C9C2C4CBA8 /* SHA2.swift */, - 4C5FE3E2EF6CCCB0A8CA29C7C6F63DEE /* SHA3.swift */, - 8270CDEF1F71C3CBE99FC3628AC3EBA7 /* StreamEncryptor.swift */, - 7D83A97A877542A2EC6DCA88DD2028EB /* String+Extension.swift */, - 3CD6B2B92DB312F13E1B847E31A1B602 /* String+FoundationExtension.swift */, - 2BBD7DF502B00E6CFC56DFE2C20E0D0D /* UInt128.swift */, - 2EAC8681CD7621782E51E812332E796A /* UInt16+Extension.swift */, - 44563320842BB46660FEE233AA4A38BD /* UInt32+Extension.swift */, - 40B4DEF14A7DE548CFEF7B62B06AF62D /* UInt64+Extension.swift */, - 67560E83D58D59D4B717878DC0D71057 /* UInt8+Extension.swift */, - 192204EBF8C806D42C01EE7BBCC7FAF5 /* Updatable.swift */, - E99567F75AA85FF9096F7D24934C554A /* Utils.swift */, - 8C327B5F182BF8DF005B76982E2419A2 /* Utils+Foundation.swift */, - D6781601E4B221AF8A6CB8901008CD34 /* ZeroPadding.swift */, - 51A69831EB6AE6FF0ABEC50EF3FA6B7B /* Support Files */, + A5A3BA2300413041BDAD20538CC2A0CC /* BigInt.framework */, + 893235EAB21791B8848761F81F0B2A56 /* CryptoSwift.framework */, + 0FCE2106A870C9CA8289F01F2E005C3A /* EthereumABI.framework */, + FD7ED36C282A0828EE45325CACB45C56 /* EthereumAddress.framework */, + 87C916A767731ADE1518E52E1B6D032F /* Pods_web3swiftExample.framework */, + 7B19C8291B81ECFBA8C6A57213ADA700 /* PromiseKit.framework */, + 68E6E31894426B0E48756676D9FEA4D8 /* scrypt.framework */, + 195F208CF3D7F63BCB562753EBCD8DA2 /* secp256k1_swift.framework */, + 92E84CE689EC1CA76E264E5261761179 /* SipHash.framework */, + 780BEB0A3FE57594F0858A7EA833EC1A /* SwiftRLP.framework */, + 7892B6C936FFDF8FFBBA425C3F07ACE5 /* Web3swift.framework */, ); - name = CryptoSwift; - path = CryptoSwift; + name = Products; sourceTree = ""; }; - 4FEAC0968FE5E1415CC44D443CCF7490 /* Foundation */ = { + 6CEEE4DDC2C0BFBD0C9410CC0E352034 /* Support Files */ = { isa = PBXGroup; children = ( - 0FFFCB7AB750F1408E71BE53B3D9C85E /* afterlife.swift */, - 196B6B93D2F28684E654A49D144415FF /* NSNotificationCenter+AnyPromise.h */, - 68CF1A1605BD327E75915D5F85D673FD /* NSNotificationCenter+AnyPromise.m */, - FB8B88BBCDA33902573936676AF560B3 /* NSNotificationCenter+Promise.swift */, - CF4B94ADE36B859A985CE20D9C9B4C1B /* NSObject+Promise.swift */, - B0DF79B993E5E4E742F07F91E5247FD4 /* NSTask+AnyPromise.h */, - B8FD1CF670C9D76982E36D9C7194D970 /* NSTask+AnyPromise.m */, - 9FBF4238285101EB5008F25E7C17DB9A /* NSURLSession+AnyPromise.h */, - A0B29A79F216917DB7C1E8D51E2B29AA /* NSURLSession+AnyPromise.m */, - 231C2D02CFF005D80CAD0308D882A69A /* NSURLSession+Promise.swift */, - B549029F7C08F93F71DBE300BDBEB3A5 /* PMKFoundation.h */, - 4BE0A0A33E52AD56332877241A1F5465 /* Process+Promise.swift */, + 525E38091E2E2E782C02FA0EEEDA2179 /* SipHash.modulemap */, + C870B1A3D456FD4314DD4C0607A42610 /* SipHash.xcconfig */, + 0F31A6E839594AF147029FFDE446D65F /* SipHash-dummy.m */, + 42B057F2BE3C7A1BC0A9BED2F4BA8C41 /* SipHash-Info.plist */, + A19C447D7BD236EECA99DBCF8894565F /* SipHash-prefix.pch */, + 886FFD1EB7FAC82F55796B76AF70F059 /* SipHash-umbrella.h */, ); - name = Foundation; + name = "Support Files"; + path = "../Target Support Files/SipHash"; sourceTree = ""; }; - 51A69831EB6AE6FF0ABEC50EF3FA6B7B /* Support Files */ = { + 6EE357E261347A2A326950A8CB1DCFB8 /* EthereumAddress */ = { isa = PBXGroup; children = ( - 48196F281BA919DA7663337369FF2F2E /* CryptoSwift.modulemap */, - 7953FD02CB8930FFAF01F2D9C9032454 /* CryptoSwift.xcconfig */, - B2EBC8972ED05B8027B86BA6C334EC53 /* CryptoSwift-dummy.m */, - 5880EBFDE3CDA613E195C8DB98E11E33 /* CryptoSwift-Info.plist */, - 358784469FD4600E5EB02F75BAF4163A /* CryptoSwift-prefix.pch */, - 4FB2C4AB5AF97836C7414A2306478544 /* CryptoSwift-umbrella.h */, + 77783A545C644FB0696DAD1722E5944D /* EthereumAddress.h */, + F357548B3DD39378B080646816E6E6E9 /* EthereumAddress.swift */, + A29F00A814D897C1BE5AE6DE5E89C998 /* Extensions.swift */, + B11B364D911E9487A929B8CA5C21BB80 /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/CryptoSwift"; + name = EthereumAddress; + path = EthereumAddress; sourceTree = ""; }; - 5DC23A0315A9ADEA0F73E88558E5D95E /* Support Files */ = { + 711B866CACAD493AD2D04E67BF3A872F /* SipHash */ = { isa = PBXGroup; children = ( - 760BFA726AD56024C4B56015DD4F59D0 /* PromiseKit.modulemap */, - 77A70D9FDCE012F5EE544AB6DF184E74 /* PromiseKit.xcconfig */, - D4795A3312AFD3CF4610B857D57F0DE7 /* PromiseKit-dummy.m */, - 39BB408B8F667DD11D993D29E0F0E69F /* PromiseKit-Info.plist */, - CD695AA8D5B0A6A6C74E09E40FD3F4CF /* PromiseKit-prefix.pch */, - 15FA67C83BE43CF3EF9C1E6D2E3989D0 /* PromiseKit-umbrella.h */, + 9BC3E604A7828F857DEFB8E5A4792673 /* Primitive Types.swift */, + 24D4D47D06AA22BB74384BAB9BAD40F2 /* RandomUInt64.swift */, + 37505D43721EBDF655CBC34F90544D5E /* SipHashable.swift */, + E0A18E92B2440CE03C08D553EF12E1AA /* SipHasher.swift */, + 6CEEE4DDC2C0BFBD0C9410CC0E352034 /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/PromiseKit"; + name = SipHash; + path = SipHash; sourceTree = ""; }; - 6DD677FEC0164B14D5B9C8626429493A /* Support Files */ = { + 71F7E87501D8CFC0ADEBAC36590A2181 /* PromiseKit */ = { isa = PBXGroup; children = ( - 9A79309B24D8A8530113424A9369C8B6 /* scrypt.modulemap */, - E98004D90CCD1AE45753F3C16B45091F /* scrypt.xcconfig */, - 728F62119180B063304005EF9E109C72 /* scrypt-dummy.m */, - 524B42290B9A4F88D091689A5D402C4E /* scrypt-Info.plist */, - 6DECD15F168F64C6F6C8A1C193D7C1AC /* scrypt-prefix.pch */, - 0EF1C662C9485A5A72B33C4CD4E0CAD9 /* scrypt-umbrella.h */, + 733C31B46A8A3F4E41A463B05E8B8FE4 /* CorePromise */, + B12B7C782A5F4D4BC0D7F4BA389DBBD9 /* Foundation */, + DD49D7A3E017049BF4628CE18A72703A /* Support Files */, + 801E9F7ACFC103048CD42CF93DF273A4 /* UIKit */, ); - name = "Support Files"; - path = "../Target Support Files/scrypt"; + name = PromiseKit; + path = PromiseKit; sourceTree = ""; }; - 6F2C6A60A26A66D8239F6B553FAAF74E /* Support Files */ = { + 733C31B46A8A3F4E41A463B05E8B8FE4 /* CorePromise */ = { isa = PBXGroup; children = ( - A688435DEDA890F22D74DEA0B4E38218 /* web3swift.modulemap */, - 4F92E92F01ED8E6C9F66CB063E0B54DD /* web3swift.xcconfig */, - 43E25994494B329B440C18037489E9DF /* web3swift-dummy.m */, - 337C4D4BFF2B5999D19FC37E638F4708 /* web3swift-Info.plist */, - 6C21482587A67BA39CA7974A927325E6 /* web3swift-prefix.pch */, - 5F5893B28387D9A3B3938E5EED54AD58 /* web3swift-umbrella.h */, + 79CBDB796FB0F17282181E75EDA52E42 /* after.m */, + A3E1DF0961FF3DA091383DEC4B479CD4 /* after.swift */, + 1FC700A80452B10ACF64DF1C457425C7 /* AnyPromise.h */, + 974A7BFE8E92E050D2FF9124AA7DBCC9 /* AnyPromise.m */, + 9DBC29B166EFED583208F516850EA2A2 /* AnyPromise.swift */, + 27A601897D77B2B18E22FA26B5430F5B /* Box.swift */, + 66FBB836159737A49CA20283E62CA819 /* Catchable.swift */, + 277E6BF4D08FCCC20EF73C9BA37B6AB8 /* Configuration.swift */, + 32380EA4D124B8A636BC9118466E6AAD /* CustomStringConvertible.swift */, + 04FF7D42AF8710309C16345FB83ABD5B /* Deprecations.swift */, + 693AFA81068283C937D0CA94D38E4722 /* dispatch_promise.m */, + C0315A68D7F2B7AACA7AD8A42A20A8F3 /* Error.swift */, + E6B1FFA44C64B0B540B94FEEE1CD9B0F /* firstly.swift */, + 4A706CB0950B86EBBB4A53A66D0BB57C /* fwd.h */, + 88C864BCF6B7DF8F59711FB0F71F60BF /* Guarantee.swift */, + 3FBFE3F22B4E7AE72FCC6A2C5F9B20E8 /* hang.m */, + AF16F679ECE9C4841106CD599F60C4E2 /* hang.swift */, + 9E1A060CECDF25684D85667577DBA798 /* join.m */, + 0B29CEBEB845EC347B96D7CF8EC1193E /* Promise.swift */, + 1400B4F7ABDE02B5070690E0E3F0F034 /* PromiseKit.h */, + E1F617E29052F2A20A4DAF46197559BF /* race.m */, + B4C09212026736ACF8C3588C3DFFFBAC /* race.swift */, + 87DC9E0219AEBCFD0C11561CB1F75C69 /* Resolver.swift */, + 2BFBB3A57DFC4A14798203F7DD419319 /* Thenable.swift */, + DBE9BF31616883FEBAE74AC685A421E1 /* when.m */, + C669F6C727F3A19F28202283CAF3CBD6 /* when.swift */, ); - name = "Support Files"; - path = "../Target Support Files/web3swift"; + name = CorePromise; sourceTree = ""; }; 7876869AA79AFDD4D8ED5A3466B54853 /* Targets Support Files */ = { @@ -1305,26 +1348,75 @@ 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 41AF95D80606C73980DD4A82DFB28369 /* Frameworks */, - EC60F452D909C0B678417A1D26249E86 /* Pods */, - C2E5FB831D3D66B1ECB265D613AE4623 /* Products */, + B36AB396275697EEE1A5B13BA8A38FE3 /* Podfile */, + C022EC755760AE685F4C8C9446A520F9 /* Frameworks */, + 566EE770C47CF62C66CE98772C974B91 /* Pods */, + 68D1B13E7ACEC4FBBFF130BADA9C0A1B /* Products */, 7876869AA79AFDD4D8ED5A3466B54853 /* Targets Support Files */, ); sourceTree = ""; }; - 8C073E76EFC212F9A8B6C02E168D5CA4 /* Support Files */ = { + 801E9F7ACFC103048CD42CF93DF273A4 /* UIKit */ = { isa = PBXGroup; children = ( - AFBE806845DD167DC414CA9715309051 /* secp256k1_ios.modulemap */, - AC0A8F0EF2B67D8E377186D1D70E8F97 /* secp256k1_ios.xcconfig */, - 014042438B2D19CCAC6C5F00B1146C99 /* secp256k1_ios-dummy.m */, - 8226327992DEFCB5999614EAE8BBD2BA /* secp256k1_ios-Info.plist */, - B29D120DA2065F9B7F8010B82F877724 /* secp256k1_ios-prefix.pch */, - 2CA9201F6EFC3831E810979D81E598C6 /* secp256k1_ios-umbrella.h */, + 8B27CD8CF6389981C93F9C70BB79806C /* PMKUIKit.h */, + 5AEAC26BB970A98BAA6CD7B30F5094D2 /* UIView+AnyPromise.h */, + FC8ECF2C2B981EAF227B97F9A951A7A0 /* UIView+AnyPromise.m */, + 16D7549432B0837431D33DAA92B9633D /* UIView+Promise.swift */, + 640FA460736D514832EF0074EDBC3B08 /* UIViewController+AnyPromise.h */, + F2EAAD5F932A97EA7947E900D8C2CC52 /* UIViewController+AnyPromise.m */, + 0067E4280866B4569D265E9F8C6294D4 /* UIViewPropertyAnimator+Promise.swift */, ); - name = "Support Files"; - path = "../Target Support Files/secp256k1_ios"; + name = UIKit; + sourceTree = ""; + }; + 885494EA0A353D8564623BB7CB4A1C8F /* EthereumABI */ = { + isa = PBXGroup; + children = ( + E9035FEAF1C6A112A846C1686B6AA6AC /* ABI.swift */, + A91B7CF43DB5A3F74C857AAED6F948BA /* ABIDecoding.swift */, + 421A57EB83513643E294B2EABE8B0200 /* ABIElements.swift */, + A563044196C737C050B34DF39F82E85F /* ABIEncoding.swift */, + 00E120CDD5DB9769DD2435516A1D4567 /* ABIExtensions.swift */, + AA7F8881DBA20F9015834FD7A4CF547C /* ABIParameterTypes.swift */, + 645B2C2B288B7EDC7BAAE3C5A2A09E04 /* ABIParsing.swift */, + 4174025F0AA7FD9B02D3F2F5E4F617BC /* ABITypeParser.swift */, + AA756D6EB06FD36B25464492744519A3 /* EthereumABI.h */, + FCE332AAEB30DAAD3224D662949A4CD5 /* Support Files */, + ); + name = EthereumABI; + path = EthereumABI; + sourceTree = ""; + }; + 8A3093C26A8EDD229F38F6B4FAFDDE58 /* BigInt */ = { + isa = PBXGroup; + children = ( + EA29F25C6AD9C57F2F030CC8D4401411 /* Addition.swift */, + DA422749FB6CE4DA61C615258DDD6B8B /* BigInt.swift */, + 37074DF9E43F92D14CB23B688C72FD89 /* BigUInt.swift */, + 8B77A44FBD3FAC28057C1887CC92B27D /* Bitwise Ops.swift */, + 3F1D07742B3A7F5A46E2A329DA441284 /* Codable.swift */, + EAD47A57A6C82649BA700C02D205C57E /* Comparable.swift */, + 607E73BBF9CE339CE9237C758D8B09FC /* Data Conversion.swift */, + 721C4F03AEEF9F7B6768DD8E1133971D /* Division.swift */, + 9D67481EE660CC4427780A510CDB6254 /* Exponentiation.swift */, + 82E1460DA79F21EF0A89758352102AA3 /* Floating Point Conversion.swift */, + ACEACA1521FDFD79ABA9485C777E5887 /* GCD.swift */, + F14FC9C9FAC7304FBF240BE3CFABC651 /* Hashable.swift */, + 79E721B30BBA223BA90A171B31127B5A /* Integer Conversion.swift */, + 8E47F8688C9AC60F086CAFF777392523 /* Multiplication.swift */, + 35B6B8F8751FD986339B26820E401B42 /* Prime Test.swift */, + 4B0FD4ABBB0CE03A9B8551B57E7B20F5 /* Random.swift */, + 2A30F7AD0E2CB204A73B0944A1D13857 /* Shifts.swift */, + C8F50F7F0D2F6591B93604E8BB87992A /* Square Root.swift */, + A21F7A460F24CED1DC6B614AF917C234 /* Strideable.swift */, + 612041911C9ABF085CC39D4CD9864737 /* String Conversion.swift */, + E1DFB901CA995F41CFDED832B5F38D3F /* Subtraction.swift */, + 04BC19C035A8C39D5226D8BEB0149F0E /* Words and Bits.swift */, + E13F39FA586DCA7D9A1C4CBDF5D4B26E /* Support Files */, + ); + name = BigInt; + path = BigInt; sourceTree = ""; }; 92FD85D74F4A9F4F7BE14DAB1B15C925 /* Pods-web3swiftExample */ = { @@ -1344,166 +1436,217 @@ path = "Target Support Files/Pods-web3swiftExample"; sourceTree = ""; }; - B64FABA7BA8D8F389AF5E13456C8EC9A /* PromiseKit */ = { + 93CD8E17641E019A6658DE6E52039401 /* Support Files */ = { isa = PBXGroup; children = ( - F93A932EC91B135390081917485A3F02 /* CorePromise */, - 4FEAC0968FE5E1415CC44D443CCF7490 /* Foundation */, - 5DC23A0315A9ADEA0F73E88558E5D95E /* Support Files */, - 14F4CA37F0D910DFAAF7E02FD2E7CF98 /* UIKit */, + ADD0134957F750B96160913F9E4240C6 /* scrypt.modulemap */, + C155FBFE5C0783AAC41449CB2DC87E51 /* scrypt.xcconfig */, + D31BE63B1625607EFBF7B6C4BD62A81F /* scrypt-dummy.m */, + 6CCF7466D93DF6DD36039CF7787829EA /* scrypt-Info.plist */, + 2AE7BC021750BDB389FD1880944E68FE /* scrypt-prefix.pch */, + 4621B79FEA77C668B08A9E4B0CF0C7B6 /* scrypt-umbrella.h */, ); - name = PromiseKit; - path = PromiseKit; + name = "Support Files"; + path = "../Target Support Files/scrypt"; sourceTree = ""; }; - C2E5FB831D3D66B1ECB265D613AE4623 /* Products */ = { + 9C4DB70411CDB99C0640965FF70AAD10 /* CryptoSwift */ = { isa = PBXGroup; children = ( - 2D50717C9986E80EF5499F2AA6C75531 /* BigInt.framework */, - 1C8276A453626F75A60C791772246C3D /* CryptoSwift.framework */, - B72E91CA236B363CA685F62C6A793DD7 /* Pods_web3swiftExample.framework */, - 884AD9080264D98178A80967D3D5D937 /* PromiseKit.framework */, - C3B25C1F01EFB3AC5FA924DB59808989 /* Result.framework */, - 836DA51652F74890CF6989C60C0E8ADC /* scrypt.framework */, - 603D0BBCC0547440419CBD2E29526BBC /* secp256k1_ios.framework */, - EB19FD3AC66BF80876825B3A4F1F66B3 /* SipHash.framework */, - 4D8953CE81298B6C1067F23B6A71EEBD /* web3swift.framework */, + C0A645643D765879996A0FEFEB17AEB2 /* AEAD.swift */, + DF5183A837EE103D3ED61CC8E3B718CE /* AEADChaCha20Poly1305.swift */, + 9E8AA6274AA01FA7275884BBF0D6F55D /* AES.swift */, + 4BC345225A9FFFEDFD6BCCDA6BB4F076 /* AES+Foundation.swift */, + CD71B2AA6261C81D5ABF5F0265397A1C /* AES.Cryptors.swift */, + C9430EC53743B45700079032E4A105EC /* Array+Extension.swift */, + 385D20AD0ACBC7A4B01C25373D9EFAD4 /* Array+Foundation.swift */, + 1681DF3FE5A4B672E29F13A64A64023E /* Authenticator.swift */, + 25FC19565DA49D793DF9A348F223CB65 /* BatchedCollection.swift */, + 71B0B58F78D56703F9250DC12E414AD7 /* Bit.swift */, + 5F5CDE3B4FB757B3F0106FD88431B923 /* BlockCipher.swift */, + 8DCCE88C733379B0F9674C1D490BB9A6 /* BlockDecryptor.swift */, + 1F8EADC5334750EDCBC7BE9F4D4D5B3F /* BlockEncryptor.swift */, + 68623D000FFCEB2CC7E1017DE7B6EAAB /* BlockMode.swift */, + 35FEE3FDEE40F28DDC2613F215AEB8CB /* BlockModeOptions.swift */, + BD1EAA1F2E44F11F5F6032A518194EC4 /* Blowfish.swift */, + 343E05569A3D9E6C883D808CAC28052F /* Blowfish+Foundation.swift */, + FCC16B752DB521904FDC01E24FB27FEC /* CBC.swift */, + E8022C2DF6B86FA23296F8458F4E400B /* CBCMAC.swift */, + 7DEACF2F1C7BBF71EA318C326FC4FA52 /* CCM.swift */, + 57DDA8DDDF0407F9774D0CD39E20307B /* CFB.swift */, + 89BFDBCFBC87AB9A6017F91C16B27016 /* ChaCha20.swift */, + DB7709D38F697152E97ECE038ACBA80E /* ChaCha20+Foundation.swift */, + B2B058F1081CD1680F4F90724970E88A /* Checksum.swift */, + 97FD3BB1D4FDE3CB8C92B9757CADD731 /* Cipher.swift */, + E0D72FEDC647B6917B3AE77954B91EF9 /* CipherModeWorker.swift */, + 51B1F68A1905071C4890C6F9B2280237 /* CMAC.swift */, + BE86F8153D27F10505EBD7D9EE3DC397 /* Collection+Extension.swift */, + 22F727E1920C23DF6FA25C828FF37AE0 /* CompactMap.swift */, + F3D67EF88FBE3D4B3938095FD5B0EF82 /* Cryptor.swift */, + 8117AC67014669B1DCFA347AA29688C0 /* Cryptors.swift */, + 34300D9F450A76F1C0795BAB8BBCE946 /* CTR.swift */, + 2614F5FD7FA2BFCEC145FF6C4B3A1D56 /* Data+Extension.swift */, + BB48EE8796E94C776DE21E16EC425E02 /* Digest.swift */, + D25C0FEDAE45115E5198FD4CD0052A48 /* DigestType.swift */, + CD3F88A45DE0134E5C0FCE9C79186C9F /* ECB.swift */, + 6D616168A7A23B7AB1995D8FCE9E3C53 /* GCM.swift */, + 131215941945D5345AF8A047A6629C21 /* Generics.swift */, + B5659C3AB77D7D5B8A5D896D5D8A6CA6 /* HKDF.swift */, + B93028ED0430293C54D4CC1E7348092E /* HMAC.swift */, + 2D4E60A3BD0A901CAE33DA9F09585890 /* HMAC+Foundation.swift */, + 26C2B3575B317F9C06CC8F79AFD07293 /* Int+Extension.swift */, + 4E04CEFD47ECF7B1AA7B9BA50AF1D68E /* MD5.swift */, + 4F90EA173730B99F47DB58B7C701FCE6 /* NoPadding.swift */, + 075602E81E3D61E019C955BD6AE18C7A /* OFB.swift */, + 155CFF09263570C89932D22E5B5D569D /* Operators.swift */, + D97CB39BF8F2C831589612CB2ED71D90 /* Padding.swift */, + 29D1BA04747B640515764C450DA1279D /* PBKDF1.swift */, + 354A0764BBE4CFAD623CB810FEC76817 /* PBKDF2.swift */, + A82F53B0EA3D0D57AFD5CD4C318D0647 /* PCBC.swift */, + 63FD588C06FA711CDCC9813DE8AAA0AF /* PKCS5.swift */, + FBECF12FAA0EF5E875B62B00A7B4DA50 /* PKCS7.swift */, + BFF0D31D5922EBAD0370E98046E7CC48 /* PKCS7Padding.swift */, + 229F4D226F1E6B09333978F7A65F9389 /* Poly1305.swift */, + 645D691F588C30A8463CBB40081960A8 /* Rabbit.swift */, + 79C644C44159127870FD19B2BECB6C9C /* Rabbit+Foundation.swift */, + 7471D4ED5465C42EB4CEE0034421F62D /* RandomBytesSequence.swift */, + B2DC451DC974D25FE7B1FECCA9C6EF51 /* SecureBytes.swift */, + 35A75E22FE221D90EFEAB4998EBFE2C6 /* SHA1.swift */, + F9574EEF332F3955B7C581226D05FE23 /* SHA2.swift */, + AF2F5DCD8B1BC4533ADECDBCF836DB84 /* SHA3.swift */, + 94A37DAF9BE9D2E3331448A566C065CE /* StreamDecryptor.swift */, + 2A2FE2AA1ED08312BA552C811B50A0ED /* StreamEncryptor.swift */, + DB40B5423FA265392DE07B1A21090637 /* String+Extension.swift */, + F94161FCBB26A0CF4D7B4792E7CC6394 /* String+FoundationExtension.swift */, + AA9960DB9976FF183310557C55A532A0 /* UInt128.swift */, + C5A89E2E2F70E548530DA60AF935479A /* UInt16+Extension.swift */, + 2A6500122B234FA6647C2568B72C2D9F /* UInt32+Extension.swift */, + 0DC0180CECBE311366353C47A894156A /* UInt64+Extension.swift */, + 385A9A999974E47DE373D35A9AC29663 /* UInt8+Extension.swift */, + 482D19E42A30F218E678D351C13B155A /* Updatable.swift */, + FBFD45FE4B26112E398EA7FD68047322 /* Utils.swift */, + E45FD0470EFD84FE77DAB6F17417FD48 /* Utils+Foundation.swift */, + 157ED0FBF8A2E71BFAA26655DA1359CC /* ZeroPadding.swift */, + 2B9CE0B991C87B26E9797739336B8A6C /* Support Files */, ); - name = Products; + name = CryptoSwift; + path = CryptoSwift; sourceTree = ""; }; - C821FAD8AD7536E17303267AAC0426F6 /* BigInt */ = { + B11B364D911E9487A929B8CA5C21BB80 /* Support Files */ = { isa = PBXGroup; children = ( - EC8B5678B1206B79D7DFCE48E8DC433D /* Addition.swift */, - 86C1E8D67E7B36A868205B54D0DB924D /* BigInt.swift */, - 2C73D7AA3EDD90DB64FE84C36BD6CF7B /* BigUInt.swift */, - 0353245090FFB16BCAFE272E9F48A277 /* Bitwise Ops.swift */, - 162213C6C0819E2BC89868BBC891FCD5 /* Codable.swift */, - F42BF4C6F2E4A124889A4EF8AF5CEB7D /* Comparable.swift */, - F97510E9053BA812A0D125583C319128 /* Data Conversion.swift */, - 99F4C0E8C3EE8B472BEEC0F2E1795295 /* Division.swift */, - D4B6AC99AF9BB0962269E5759E81E320 /* Exponentiation.swift */, - 5B31B02CBA5CE3418CD0D8EF2390E656 /* Floating Point Conversion.swift */, - F26C7D8E758DAAE0AE9602235489A452 /* GCD.swift */, - EFF38E25FE5AA4DFD2E84286D4EE29E3 /* Hashable.swift */, - 35741AB0833B23E77A7CB168A157FD90 /* Integer Conversion.swift */, - 45A7CC7C99E72DAA6B9C339B4B45B6F0 /* Multiplication.swift */, - FF7884454DEDC6025D2DF234BCEE6953 /* Prime Test.swift */, - 85D15B3C77562CE1D76E17840810174E /* Random.swift */, - FF4AB01A6E765207693D4AE0D5902553 /* Shifts.swift */, - EFDEB675E0A92FD109E8578E45A910EB /* Square Root.swift */, - 4B4A8E6D5817207A8BAFC2040BACBDF0 /* Strideable.swift */, - EC3E819145FD9E56DA10F219A9155D0B /* String Conversion.swift */, - A18BCBAF1463ABC38E43C310C8A5DC49 /* Subtraction.swift */, - A6B836C566DD50CDDC91622F1017A907 /* Words and Bits.swift */, - F02DCBE346E4AFA18B1A3F2B5FB7EA45 /* Support Files */, + 3966403CAFDAEF596DC3EBE24F85A758 /* EthereumAddress.modulemap */, + C3E5F4E53C7409FF85C72B92885F1280 /* EthereumAddress.xcconfig */, + B841E74E11C4190F2742A482D1624F6F /* EthereumAddress-dummy.m */, + 4D7C4589F40A8060A568CB4849358370 /* EthereumAddress-Info.plist */, + AD42971B0221AEDB96DC65F82F3CC2DD /* EthereumAddress-prefix.pch */, + BD07049E8559AB824237ADD96BD4AC9B /* EthereumAddress-umbrella.h */, ); - name = BigInt; - path = BigInt; + name = "Support Files"; + path = "../Target Support Files/EthereumAddress"; sourceTree = ""; }; - CB12664C35B894DE88C366101B70E80C /* Result */ = { + B12B7C782A5F4D4BC0D7F4BA389DBBD9 /* Foundation */ = { isa = PBXGroup; children = ( - 6B0281225D044E95B9D81942D287340B /* AnyError.swift */, - 33D1449C4E8D84E0AC0DA60599B0DA23 /* NoError.swift */, - A57379017DA3A7363C4A126E85922A3E /* Result.swift */, - 0FD8645A2496918B9B87011F0B77E14E /* ResultProtocol.swift */, - FAC9AB1EFD1CC1D56BCCB49A5786093E /* Support Files */, - ); - name = Result; - path = Result; + 152A06BD6C4ED16E8910C53F87083FE8 /* afterlife.swift */, + 8A8DFF2DF324A4D832DD8653C502500D /* NSNotificationCenter+AnyPromise.h */, + F52D61D44F96B6B6F0BC62D02E5235F3 /* NSNotificationCenter+AnyPromise.m */, + 388C6DA468CB9B1A2BD750A77262C56F /* NSNotificationCenter+Promise.swift */, + 16B862B079586F6EBC6B4D190AC2686A /* NSObject+Promise.swift */, + DA539D1F3176FABFF9035EC2FDFD30B4 /* NSTask+AnyPromise.h */, + 481105AB5C9354EBAAB3E816CFBF3D9A /* NSTask+AnyPromise.m */, + B973550AEC743886DEFC6C426DE82DAB /* NSURLSession+AnyPromise.h */, + 0A4B692E5A925A941AA99C0BCA964506 /* NSURLSession+AnyPromise.m */, + BB666C41E45C6ABAB0192295B1ECAC7E /* NSURLSession+Promise.swift */, + 0BF4714912851ED7D22D2EF0B37D9625 /* PMKFoundation.h */, + 1CEB1E0F5569F3E140EB5B421C414467 /* Process+Promise.swift */, + ); + name = Foundation; sourceTree = ""; }; - E748F76B23029F246A1B28D2C982B4F1 /* Support Files */ = { + B40F0123C9DC9C6FEB3F45C2DF44D3B2 /* Support Files */ = { isa = PBXGroup; children = ( - 502FB30F03AEBAD4F849FA1E03E60319 /* SipHash.modulemap */, - 3842DFFAA24909073D4F960DC6AAF02B /* SipHash.xcconfig */, - B611AE2C6BEF0A2E26865F99A0DFC1D2 /* SipHash-dummy.m */, - 63389BFC9E764A984175469F04E6C321 /* SipHash-Info.plist */, - 07E9A7E7D3A951963E13646AC6CE8391 /* SipHash-prefix.pch */, - 0B06F415D20475CC8FC28FFC552A47C0 /* SipHash-umbrella.h */, + 1E3FA1F8BFCCBE4D42BF07BA07CD266D /* secp256k1_swift.modulemap */, + 9F82B4DF8F6B62E706B8BDDEB0749787 /* secp256k1_swift.xcconfig */, + B6C8DFD047D7C6E855F9CF2F1A3AD7B2 /* secp256k1_swift-dummy.m */, + 0DFB8B8BF7DABC99D98F847DEE91FA95 /* secp256k1_swift-Info.plist */, + EEA5EE21242C99256629F5CB60D2DB9B /* secp256k1_swift-prefix.pch */, + 6376866618A41A278BF5C4477B074CD1 /* secp256k1_swift-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/SipHash"; + path = "../Target Support Files/secp256k1_swift"; sourceTree = ""; }; - EC60F452D909C0B678417A1D26249E86 /* Pods */ = { + BA8DF42D89FC47CD765C3709901F879A /* iOS */ = { isa = PBXGroup; children = ( - C821FAD8AD7536E17303267AAC0426F6 /* BigInt */, - 48F295883AE990614A7DE9217550905F /* CryptoSwift */, - B64FABA7BA8D8F389AF5E13456C8EC9A /* PromiseKit */, - CB12664C35B894DE88C366101B70E80C /* Result */, - 107E07CD6026F30E1767695C2FE214AA /* scrypt */, - 1A9EFC5B1063CE4DE1F57CC719825B71 /* secp256k1_ios */, - 2733804763CE59AA43D291B9FE779E33 /* SipHash */, - 1D5A330E329F910A6C6B734E96990F3F /* web3swift */, + 1523249C10D0B6DDCE2D75CC807474FE /* CoreImage.framework */, + 2CA9EA2C365EB827AA8A2EBE27EFB42B /* Foundation.framework */, + E9A23377D2BCFF84DA71D73288B88475 /* UIKit.framework */, ); - name = Pods; + name = iOS; + sourceTree = ""; + }; + C022EC755760AE685F4C8C9446A520F9 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 72A31D2A6C2335199394826F5AB60411 /* BigInt.framework */, + B1079CE813B6ADE402DA1A75AC3BEF4C /* CryptoSwift.framework */, + E16B8BF7D2F429329E671B5BE4F1AC8A /* EthereumABI.framework */, + 941616C02C90CB37792EE5D074B65DA4 /* EthereumAddress.framework */, + 6C63E5B7E9EA6F822D6C2F402AAC2856 /* PromiseKit.framework */, + BAF13C2624A2802FFFD9EC2F84F2A37F /* scrypt.framework */, + 7E28680C25D59F4AB8FD5D60B2209576 /* secp256k1_swift.framework */, + 44C36C457BDC5A424B73FED2BF2B0CF7 /* SipHash.framework */, + C7BA3CDDCDFEFD9BED027AD46F60FAC0 /* SwiftRLP.framework */, + BA8DF42D89FC47CD765C3709901F879A /* iOS */, + ); + name = Frameworks; sourceTree = ""; }; - F02DCBE346E4AFA18B1A3F2B5FB7EA45 /* Support Files */ = { + DD49D7A3E017049BF4628CE18A72703A /* Support Files */ = { isa = PBXGroup; children = ( - 1DD7A05DBF85857EC1A624A0C5549591 /* BigInt.modulemap */, - 9777D406113094F2B17BC4424F7329BB /* BigInt.xcconfig */, - 7319C8DEF058868FAB938FAD22813553 /* BigInt-dummy.m */, - 75B3B434BA45820CF5E1DB7A0EF864BB /* BigInt-Info.plist */, - CAE688D25B118D52526713B918BF4412 /* BigInt-prefix.pch */, - 91FF287A2D6F4A4F78AB5F96F8D6B6C3 /* BigInt-umbrella.h */, + 8DD93FFA0B424475376B46830EEF26BF /* PromiseKit.modulemap */, + 18496389CA5CA7BCFD42408FBE3EFA35 /* PromiseKit.xcconfig */, + 294830F3AC6CB12044834E8F72282F23 /* PromiseKit-dummy.m */, + 2CEED24514490DF573FDE87A9F9F8971 /* PromiseKit-Info.plist */, + B35498E6C67F20805E9F3004C2F64431 /* PromiseKit-prefix.pch */, + D587E4DB61D38FF4A1CBEB61903470D9 /* PromiseKit-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/BigInt"; + path = "../Target Support Files/PromiseKit"; sourceTree = ""; }; - F93A932EC91B135390081917485A3F02 /* CorePromise */ = { + E13F39FA586DCA7D9A1C4CBDF5D4B26E /* Support Files */ = { isa = PBXGroup; children = ( - 231D7535BE0908B8FA752378F694AB44 /* after.m */, - AAFAD63081AB296364EBEE0550B55C75 /* after.swift */, - 9062B9AD79A1FFCD8E4C3D3BBAD22417 /* AnyPromise.h */, - 61B2EEC1A0CED11A8CD095B884755F14 /* AnyPromise.m */, - 0D0B55151A9D3FF6DF524D9E72CBFCB2 /* AnyPromise.swift */, - 229A34F67F1DD0EA4F4DCB16AB734B28 /* Box.swift */, - 7D58637E65FA215EA3F838A635924646 /* Catchable.swift */, - DC27BAB5F87E71098FCC3B49E257E226 /* Configuration.swift */, - 8DBB8EB538986AEF569A595AD56B2CB9 /* CustomStringConvertible.swift */, - 2E9C3E6A47F759D446C9633237D3587A /* Deprecations.swift */, - BEA6C296294AF579C5E26DE62FC71CBC /* dispatch_promise.m */, - E991F14402D14DBCE758C2C453DA2F7D /* Error.swift */, - 177C91EDD167FD64C32183AC2992D4A3 /* firstly.swift */, - 6C15C5D29D981FFD7DB03B256FD134EE /* fwd.h */, - 0673406163739833CEECFC5634FED4CF /* Guarantee.swift */, - 47EE1AE862AC1E08A3510AE8A3ACC49E /* hang.m */, - 2C0B26A0F1EDE1CDC241622A88F22672 /* hang.swift */, - E57F88566F2750F3697639B5C501F8F3 /* join.m */, - DB25E5C7BD25CD7E53D639B210A1B4AC /* Promise.swift */, - 7EE987122C612CB4F255D6C9980D5D36 /* PromiseKit.h */, - EADF759D706E073C79D0A75908F5DB72 /* race.m */, - 891EED47DC73A8B323F748EA2676F146 /* race.swift */, - 6FDA4F7EC9B81938EE471ECE2284AECA /* Resolver.swift */, - 84D207BADF2861BAEE09DB0F0100D9C8 /* Thenable.swift */, - 3952E3A45B4964ABA58E30423D7DA553 /* when.m */, - 5FFDE44AE604DA940226CE09D970A58A /* when.swift */, + 0A26DC099A8624856C0E02348C24EF20 /* BigInt.modulemap */, + 22044D50374EB3808D2F5A905DD1D63C /* BigInt.xcconfig */, + 7411A68C8F8AC8841EA5B8E91256B11E /* BigInt-dummy.m */, + 3F5A8DB4C575C89D51FB8509B3F37D66 /* BigInt-Info.plist */, + 03604607591154D9EFC0F58517C88BB4 /* BigInt-prefix.pch */, + 77CA60485E13EAE74EE80CFC886BA2AF /* BigInt-umbrella.h */, ); - name = CorePromise; + name = "Support Files"; + path = "../Target Support Files/BigInt"; sourceTree = ""; }; - FAC9AB1EFD1CC1D56BCCB49A5786093E /* Support Files */ = { + FCE332AAEB30DAAD3224D662949A4CD5 /* Support Files */ = { isa = PBXGroup; children = ( - 47E492FFFE405B5C351862A29154F2D4 /* Result.modulemap */, - 0AFDC4CB49065D6F6886804C0A0D945D /* Result.xcconfig */, - 8FA4BD088591072E3F8E937FC348CF9C /* Result-dummy.m */, - 0195F4E88F3790D0C0BED248E5EB6ACC /* Result-Info.plist */, - CA588EB41DFF39681CD5E2D44DE4B9D5 /* Result-prefix.pch */, - ED2C60159DC5CDC64E9C76793B692956 /* Result-umbrella.h */, + 0E23F15DC6BEBFD7CAA793A040E31531 /* EthereumABI.modulemap */, + FCF992981B15E8A639208AFD0BC42E16 /* EthereumABI.xcconfig */, + B58E7023F7E6C8655D6D9028C7AF2698 /* EthereumABI-dummy.m */, + B9E1EEF85DD107F933904E8D4BACCF31 /* EthereumABI-Info.plist */, + 494227A474FF5A70499FC2D9B78A674E /* EthereumABI-prefix.pch */, + C2F73E4913951241E69AB369E29AA841 /* EthereumABI-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/Result"; + path = "../Target Support Files/EthereumABI"; sourceTree = ""; }; /* End PBXGroup section */ @@ -1517,134 +1660,170 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 1D2E2951F6649C5063226E2D27D46394 /* Headers */ = { + 0C168A5EF4886177112CA4C18D1F0276 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - D1442524EC7DCB17F235E12B81114603 /* CryptoSwift-umbrella.h in Headers */, + 6F6C871948F22A9D109DE34B8388488D /* Pods-web3swiftExample-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 215B2F3DDF01366E8169D7F8FB7F98CB /* Headers */ = { + 3FD102C69B8A80AA835E2638D0C66C4F /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - AC5459A014B6BDB91F647D9506396B4D /* Cimpl.h in Headers */, - 32C2736797D270604AFB65A54134B17F /* scrypt-umbrella.h in Headers */, - CC4F237FABAA1A3C56E12FDEA0EB705E /* scrypt.h in Headers */, + 37FA075C16F67C2E4B98C4D34A8C00E5 /* EthereumAddress-umbrella.h in Headers */, + AD251E7937B3885E2B635F6FE675F9CC /* EthereumAddress.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 3343827B7D7EA6C0D2A50D1045B0F5C9 /* Headers */ = { + 5376B8CD2A97FFFC91ACD7712C08EEB6 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A181B697DCE8BCE8DC2028CDFC0DF44A /* AnyPromise.h in Headers */, - 2D81F68C100B42A128F026D10711E0C6 /* fwd.h in Headers */, - 7B940F6ECB4BB48F56D21A23DB6BC81C /* NSNotificationCenter+AnyPromise.h in Headers */, - 2F42CF7089E970088164D26EC8BDD3C7 /* NSTask+AnyPromise.h in Headers */, - E59381DB612E6B78B65F96AE31017C45 /* NSURLSession+AnyPromise.h in Headers */, - B0D1A5B91FD8B2603B6456DD06E531C4 /* PMKFoundation.h in Headers */, - B91A2B90FAC29C5CFE6C9D7083D302B2 /* PMKUIKit.h in Headers */, - 9BE26641F305F1572E557F19C6ACFC84 /* PromiseKit-umbrella.h in Headers */, - C7C180C5260E9EC8F7D23F25FF8AA775 /* PromiseKit.h in Headers */, - DDB1F3EE512CBBBDB4E5558A671BEADE /* UIView+AnyPromise.h in Headers */, - 95B4BAB0877245FBC1BDFF31D269B3D9 /* UIViewController+AnyPromise.h in Headers */, + C44AD471D7A7916A140FDE4609781022 /* web3swift-umbrella.h in Headers */, + A5219D81AB8FAB98FEEE7B7F4ACF937F /* web3swift.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 5012D1FCC085993E461589E57FD9E2D4 /* Headers */ = { + 5BB7A0FCC95EC7CD413E98D637584D9A /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 2C0A3059883F6316F8686B6832E042FB /* web3swift-Bridging-Header.h in Headers */, - CFA040A4AE2F53BF295CF6C7B6266C11 /* web3swift-umbrella.h in Headers */, - D8294366574ADF1B044C1F45C6B917AB /* web3swift.h in Headers */, + 545072A7AC12349191FBBEFCDE711892 /* EthereumABI-umbrella.h in Headers */, + 099726630FECA2EBB07D4AD11FC8AF8A /* EthereumABI.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 61424491A90FA1CEFD4127641BC72054 /* Headers */ = { + 774228ED792886C81715D8A22C69639B /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 70EA0CC4200BB02F9F60433D20AD6325 /* basic-config.h in Headers */, - 10A76A764D28EA81D00DCAE3BDBD54AD /* ecdsa.h in Headers */, - A2D8786DEE0BE917D2ED663FBC245FBA /* ecdsa_impl.h in Headers */, - CA9CCA3289EE3DE74461144D856EEF8C /* eckey.h in Headers */, - A9663F91BCC4D24B5094B425280FA3B1 /* eckey_impl.h in Headers */, - 443E64134A2D26C41DB7302B8D788A27 /* ecmult.h in Headers */, - 1AB7933C12CD4D54C044E42F565C943E /* ecmult_const.h in Headers */, - AFF9D51A5BEEE7B2E486C5B012BCE382 /* ecmult_const_impl.h in Headers */, - 253A03485DB4317EB134F56B2E502053 /* ecmult_gen.h in Headers */, - F233ADB45879BE0E7D45D336AC885F0B /* ecmult_gen_impl.h in Headers */, - 6ABBCE9B9ED70A2117B857ADFB9159E4 /* ecmult_impl.h in Headers */, - 3D792AED79EC2D01C8DCCDE3840FA64D /* field.h in Headers */, - 6FBCAC4C87884CCA78E3B169814DC7AC /* field_10x26.h in Headers */, - 6E89D365ABD5F55D075E857D261BFF33 /* field_10x26_impl.h in Headers */, - 6526A7EF53A724E17E970F4FECE9F999 /* field_5x52.h in Headers */, - 21347ECAADC4E528464E9B3170877703 /* field_5x52_asm_impl.h in Headers */, - 9097A0E21774CCF76D8251680DD36E55 /* field_5x52_impl.h in Headers */, - 18443ED1EE9C0FFCE14462F5AE1EFF57 /* field_5x52_int128_impl.h in Headers */, - 91344AA71C9263849385562A815572E1 /* field_impl.h in Headers */, - 09F1D2094D102A74B519B96AE8B0A2C4 /* group.h in Headers */, - 42CE685372C5AB0C197D4CBAB3230AB1 /* group_impl.h in Headers */, - 2ED5E810B3C7F74ACD88963DD096A8CE /* hash.h in Headers */, - B9C26ECB4C06E7F7FE1318AC27983A29 /* hash_impl.h in Headers */, - 5078EB44DBFBFF5E4D0572BD45439BCE /* lax_der_parsing.h in Headers */, - 62885B0BEA692447B5566DB9778C06A1 /* lax_der_privatekey_parsing.h in Headers */, - 8AAF2AFC9D027B407358379401879A0E /* libsecp256k1-config.h in Headers */, - 19E2CEC0228F9E84247450A041E97E2C /* main_impl.h in Headers */, - F91993F3FEEF2D1D11275BDC4C02F88A /* main_impl.h in Headers */, - 3E18435DD83EFD78B0C55534DE9F0578 /* num.h in Headers */, - D98C6A2BF232502AB16A453DAC83E49F /* num_gmp.h in Headers */, - 0E37D3A9552CB1712CC4D9034079B1B0 /* num_gmp_impl.h in Headers */, - C5B77FE50F765FE37316981B380DB67A /* num_impl.h in Headers */, - EAFF20B5047C8A8ED96B861E71AD86D2 /* scalar.h in Headers */, - 8D0CDEB79686FA00795F3E1D08C1192A /* scalar_4x64.h in Headers */, - 8EB396C5D26910F7F72E37EA06924F7C /* scalar_4x64_impl.h in Headers */, - 5F76BDF4F74809A4CE24FCE8EF0CA536 /* scalar_8x32.h in Headers */, - 5749E971A5E9F57DD3CE90D4BEC95455 /* scalar_8x32_impl.h in Headers */, - 65CC5B6F6034B05B71E19DDD56BEC50B /* scalar_impl.h in Headers */, - 4598AD50EA5239AEEAD9FEE55165D42D /* scalar_low.h in Headers */, - 693A77DE44042BA013938A432B8AA9B6 /* scalar_low_impl.h in Headers */, - 722867F90BF998E4275E58E1458CF818 /* scratch.h in Headers */, - 35F55E0683F0C5A6EC4872A090D8ACE8 /* scratch_impl.h in Headers */, - E2EC13D1D28147E49A3BDAFE275449A6 /* secp256k1.h in Headers */, - 37E2B7216A4D87B38008F2FECE4CC335 /* secp256k1_ecdh.h in Headers */, - AEDBFB777755AD9680EBA32ADC5FE57F /* secp256k1_ios-umbrella.h in Headers */, - D21515D19013C30F9AD7BFE1982CB967 /* secp256k1_ios.h in Headers */, - 08FF36052B67EAF44898509B87954A4B /* secp256k1_recovery.h in Headers */, - 77B87967C1955033F9B350520B6CEEA4 /* util.h in Headers */, + 71B9B8543875E4E32E42B4A9A1312C01 /* BigInt-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 774228ED792886C81715D8A22C69639B /* Headers */ = { + 885669ECE3BA275A55A9CA84B82533A3 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 71B9B8543875E4E32E42B4A9A1312C01 /* BigInt-umbrella.h in Headers */, + B8DC123A6746FD918E04ADCFA8094147 /* Cimpl.h in Headers */, + C011B8342C7D5C803CD654A58A8F21AB /* scrypt-umbrella.h in Headers */, + 9287C7AC61FE25FB9FF2E4F9E8B30EAA /* scrypt.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C9B8F223C5191C06610567F142437FA1 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A3B3988D1BE65A4B037754384D6E2A8F /* CryptoSwift-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D8B7AAB5D3C05844B4F46DAE81F4AB3B /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 0114776105F37712925C78AFD61BB3C8 /* AnyPromise.h in Headers */, + 16825050009C6130264514984322E53E /* fwd.h in Headers */, + 5FECFB6E129027D7F9AF207C8D0C6BBD /* NSNotificationCenter+AnyPromise.h in Headers */, + FFF6A96467984411196597CEC016AB21 /* NSTask+AnyPromise.h in Headers */, + 00D63A39FF4BCFF87172262A842DF6C1 /* NSURLSession+AnyPromise.h in Headers */, + C8095F1D83EA88E00DD945FCB0469AB2 /* PMKFoundation.h in Headers */, + 18B9BF798396486AD4D880820C7B8FBB /* PMKUIKit.h in Headers */, + C1B356D260ECFA714AEF597CE84D6ABC /* PromiseKit-umbrella.h in Headers */, + 41BAB1AD1A86E1C6887B9B4E51062334 /* PromiseKit.h in Headers */, + 20E69749F66B1F259ADE99CE77510E86 /* UIView+AnyPromise.h in Headers */, + ADF81CC0E5C27480ACC20BD37F83FD34 /* UIViewController+AnyPromise.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - DBADEE36F5137C8104A1BC6AD5D5B645 /* Headers */ = { + FB5BC8AE607FB814C8E7F9F6A7F90F2E /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - F0AD6AA66BE6563C90F264D8FD5CCA6C /* Result-umbrella.h in Headers */, + DA44967E128BD7BFA50F2906B0B2C9C6 /* basic-config.h in Headers */, + 2B3D97CEDF72234F8338DBA2A776981E /* ecdsa.h in Headers */, + 7044BEFED772CD5C713B2A696EB5677C /* ecdsa_impl.h in Headers */, + 39D3E32B3C0AEB691E5FECB13A908C30 /* eckey.h in Headers */, + 207A6AA7B3964F426472BCBBAF43B4C8 /* eckey_impl.h in Headers */, + AF0206170C3EFE4D74D35A99947F570F /* ecmult.h in Headers */, + B52C9675931CFC0A3E9EC8F555FB75E5 /* ecmult_const.h in Headers */, + E10034AED811B87BB547AED12B01AF19 /* ecmult_const_impl.h in Headers */, + 9EE756BBA1C25C5334454ADEB97A6853 /* ecmult_gen.h in Headers */, + 10C957749713BC793603740385D0626B /* ecmult_gen_impl.h in Headers */, + D3EB8E2BA9D69A1AB9BE406CCBF38946 /* ecmult_impl.h in Headers */, + 5D5489F38221F4707C34636CCB7D4963 /* field.h in Headers */, + C9E64C6119BEE088DEA38EDE36913847 /* field_10x26.h in Headers */, + D4FD2B2BE9EC95B59458C3784C1C77AF /* field_10x26_impl.h in Headers */, + 129F0091AD9F73727DC021D80D9AE867 /* field_5x52.h in Headers */, + 821C63EC05763CA91EEB51F9F66F190C /* field_5x52_asm_impl.h in Headers */, + 9079C576ED6D091E0EF1CEC6F245E4F6 /* field_5x52_impl.h in Headers */, + 6558636833F1C0D47A09F6C39FD48D3F /* field_5x52_int128_impl.h in Headers */, + C943B4DB127AA6A95B94A3630D9DEBFA /* field_impl.h in Headers */, + 991B88B320A6E9AFE3130717758335A7 /* group.h in Headers */, + A921B2A1FBDD346696B21EA3A626D6BF /* group_impl.h in Headers */, + 6D29054961223E11C2A32A32032F38A7 /* hash.h in Headers */, + 95C90ACFF4618049BC4EC1D1C5C653DB /* hash_impl.h in Headers */, + 7154FAFB7DCB6C047A6C736C3529A641 /* lax_der_parsing.h in Headers */, + 3460C937428BE40A5EB9AD6BE6D3B650 /* lax_der_privatekey_parsing.h in Headers */, + E60D4C87A96FCA917970FD522CA8F9FF /* libsecp256k1-config.h in Headers */, + 66919D153FD4C36C6C0FA23311C4DF2C /* main_impl.h in Headers */, + 5AAAC38308E507E5B37AA6E6072EA794 /* main_impl.h in Headers */, + 1EBAC8CB64B0FAC21B0C3B2BBFE3258A /* num.h in Headers */, + 8D50304A146D00984E177A1B0C3B77A6 /* num_gmp.h in Headers */, + 049D031BED9DADA0C433EC8B51B9128B /* num_gmp_impl.h in Headers */, + 3762DF18DBCA1CD6327DA092A53FD656 /* num_impl.h in Headers */, + ADC99CB22E2067F475404C536C15D9AC /* scalar.h in Headers */, + DE126CF9A74B3DC25B39B8FA01484B2E /* scalar_4x64.h in Headers */, + 2FB075849D825ACCE5D39FC1134DDA52 /* scalar_4x64_impl.h in Headers */, + 86386DAD1D84EA856F9B41DDC716BB96 /* scalar_8x32.h in Headers */, + BBFB0A0A67B23D871F7CA36DAB0DC776 /* scalar_8x32_impl.h in Headers */, + 341666F42728D7D66C5E013E293951E5 /* scalar_impl.h in Headers */, + C3051783E23BFA409BB94984B8505ABA /* scalar_low.h in Headers */, + 7DF26B5CC31B57CD332F926B91A1C24F /* scalar_low_impl.h in Headers */, + D54E7F5BCDF745F7613DFF701A32B600 /* scratch.h in Headers */, + 168E8B4DAC99CB82C85DB4B08F34DC85 /* scratch_impl.h in Headers */, + 49D9F7F3B2F1AD0781104D1902298F85 /* secp256k1.h in Headers */, + A3A9CC68C76881419F9C084AE9F3A323 /* secp256k1_ecdh.h in Headers */, + 574B700620BF7CC0B73445134713E7AB /* secp256k1_recovery.h in Headers */, + 54737940C4BF6C198B0B08F053497650 /* secp256k1_swift-umbrella.h in Headers */, + A92A096CDDCA083FB9B56A82D6B89291 /* util.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - E062E56B1A153CA7AFA882E877161EDD /* Headers */ = { + FCBBD0298627F98D8A79A55DCB756ED3 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - DD1B78ADC6B14B7065DF312FFE9789B3 /* Pods-web3swiftExample-umbrella.h in Headers */, + 469E4F38A99F2B1AF8F354AC44AE3683 /* SwiftRLP-umbrella.h in Headers */, + 28A68791268A1C0C4CA0178CD44543B3 /* SwiftRLP.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 0ED0B491AE891D6CDC3963787F0E2DB4 /* scrypt */ = { + isa = PBXNativeTarget; + buildConfigurationList = A6E58A79C2F9A35AEE755C5EE9939C14 /* Build configuration list for PBXNativeTarget "scrypt" */; + buildPhases = ( + 885669ECE3BA275A55A9CA84B82533A3 /* Headers */, + 26B1A5BC43F128F14E41E79BD5341224 /* Sources */, + FD219DA880ECB1264A9E2956C0B80BF2 /* Frameworks */, + 108DAA910E2C213632945B1B7282D96E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 6136549AD271A8B68F4A487F363AEE56 /* PBXTargetDependency */, + ); + name = scrypt; + productName = scrypt; + productReference = 68E6E31894426B0E48756676D9FEA4D8 /* scrypt.framework */; + productType = "com.apple.product-type.framework"; + }; 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */ = { isa = PBXNativeTarget; buildConfigurationList = 64983011E689E8B1A79C910DC9586585 /* Build configuration list for PBXNativeTarget "BigInt" */; @@ -1661,166 +1840,192 @@ ); name = BigInt; productName = BigInt; - productReference = 2D50717C9986E80EF5499F2AA6C75531 /* BigInt.framework */; + productReference = A5A3BA2300413041BDAD20538CC2A0CC /* BigInt.framework */; productType = "com.apple.product-type.framework"; }; - 2571F2C79C3D43B0220DF7B9302CB451 /* PromiseKit */ = { + 4FF76C9CFB6B4346A2DDCAAE6E407CEE /* Pods-web3swiftExample */ = { isa = PBXNativeTarget; - buildConfigurationList = D73236CD3ACDF90803371F7E6C65A9DA /* Build configuration list for PBXNativeTarget "PromiseKit" */; + buildConfigurationList = C991C998C17793DAA7BA2414E0DF3A40 /* Build configuration list for PBXNativeTarget "Pods-web3swiftExample" */; buildPhases = ( - 3343827B7D7EA6C0D2A50D1045B0F5C9 /* Headers */, - 546DA02918E00087C8868D2428514721 /* Sources */, - 6DE49A014A16E0AFD0494C806BA96F84 /* Frameworks */, - FD8B0ACCF4E0307C943432C30484C693 /* Resources */, + 0C168A5EF4886177112CA4C18D1F0276 /* Headers */, + 1751A2325AEF0209922ADB9422A536AB /* Sources */, + 97B4064DB3E6E4051F5AB0CC6A0C858C /* Frameworks */, + B6C0DD1EAC91C25A1482A37F7D30A81D /* Resources */, ); buildRules = ( ); dependencies = ( + E9979F57AA0621BF78F8CA61114E653E /* PBXTargetDependency */, + F296F7677DABEE8C3716D1CAD280BAFD /* PBXTargetDependency */, + A2074A1660AEBBC7DA8071193F4C114A /* PBXTargetDependency */, + 48CF01CC6B744BD2A53AE5DD32E778F1 /* PBXTargetDependency */, + 7830CB23C813714C3C7806743F44C52F /* PBXTargetDependency */, + C881757934457307B3DA9AF12C1E1575 /* PBXTargetDependency */, + 3E40A4D7B4F79239296333A3133306B5 /* PBXTargetDependency */, + 0689FDC518D6088B176D9F011A67FEE6 /* PBXTargetDependency */, + BAF3F8AE650394F5AA5070D3BAD6EDFF /* PBXTargetDependency */, + 922E624353072D09D48A9881165793C5 /* PBXTargetDependency */, ); - name = PromiseKit; - productName = PromiseKit; - productReference = 884AD9080264D98178A80967D3D5D937 /* PromiseKit.framework */; + name = "Pods-web3swiftExample"; + productName = "Pods-web3swiftExample"; + productReference = 87C916A767731ADE1518E52E1B6D032F /* Pods_web3swiftExample.framework */; productType = "com.apple.product-type.framework"; }; - 4DACDE493E99BF92E5758A59F946A750 /* CryptoSwift */ = { + 6385AA5DEB59BDFB6EC695A6F0524DA7 /* web3swift */ = { isa = PBXNativeTarget; - buildConfigurationList = 522F15B552D0CFCBB8487B55119183C6 /* Build configuration list for PBXNativeTarget "CryptoSwift" */; + buildConfigurationList = 9018BA916CE44A089CB188ACBC3183A1 /* Build configuration list for PBXNativeTarget "web3swift" */; buildPhases = ( - 1D2E2951F6649C5063226E2D27D46394 /* Headers */, - 2BD29726F4F37EEF096F8ED056E45044 /* Sources */, - 78115CACE66B77DE366E00E2252C43A0 /* Frameworks */, - 5D149CE8823228F4B10FB96A3177322E /* Resources */, + 5376B8CD2A97FFFC91ACD7712C08EEB6 /* Headers */, + 730320B22CD5A2678CC52D89E71C37F0 /* Sources */, + 65AC3C45CA627758B1050C16C4D97DA5 /* Frameworks */, + 1BBD4114420EDB29259D1764C87E97C8 /* Resources */, ); buildRules = ( ); dependencies = ( + F4F78566B8D7F8618A7473EFFB5954DE /* PBXTargetDependency */, + BF71B09E1287BC86521296CBAB812B51 /* PBXTargetDependency */, + 198220CFB13D643C4BD4C6DF87CB5A21 /* PBXTargetDependency */, + 04FE31CB63EB17E44AE868F7B8C30FDA /* PBXTargetDependency */, + FF8F1A79C4A5A7B36C60ECDADF87FD76 /* PBXTargetDependency */, + 86AB873F1433E4E93954368AA21DBA47 /* PBXTargetDependency */, + DF954395EEFCFDA4A241AAB8CB6DF94E /* PBXTargetDependency */, + FFB2B3D2DFFAF3A27F5025F5F2421CF1 /* PBXTargetDependency */, ); - name = CryptoSwift; - productName = CryptoSwift; - productReference = 1C8276A453626F75A60C791772246C3D /* CryptoSwift.framework */; + name = web3swift; + productName = web3swift; + productReference = 7892B6C936FFDF8FFBBA425C3F07ACE5 /* Web3swift.framework */; productType = "com.apple.product-type.framework"; }; - 7FF8752D2607B0617A8EA59CB6F52DA7 /* SipHash */ = { + 640B979328B6328F6325026CA79A1B22 /* secp256k1_swift */ = { isa = PBXNativeTarget; - buildConfigurationList = 18A84A1682CD37CFA0F42453F6BF95C9 /* Build configuration list for PBXNativeTarget "SipHash" */; + buildConfigurationList = DF74D3830F0F5F54523C9A5F5585D755 /* Build configuration list for PBXNativeTarget "secp256k1_swift" */; buildPhases = ( - 09EADEA037FE0B8626C8AEE86F19B108 /* Headers */, - 92881122437CB3C21DE6947CADDF0A60 /* Sources */, - D1D2E3112C8952F649A1AA6C2A244398 /* Frameworks */, - E2C10720FE37B7B597C0A2FD39826949 /* Resources */, + FB5BC8AE607FB814C8E7F9F6A7F90F2E /* Headers */, + D2EBE9A685632B40A0887329BD945EB5 /* Sources */, + 8E196E012D90266194B01740F1F181E4 /* Frameworks */, + 647821CAA544A3E33DD75420AB1FFDC7 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = SipHash; - productName = SipHash; - productReference = EB19FD3AC66BF80876825B3A4F1F66B3 /* SipHash.framework */; + name = secp256k1_swift; + productName = secp256k1_swift; + productReference = 195F208CF3D7F63BCB562753EBCD8DA2 /* secp256k1_swift.framework */; productType = "com.apple.product-type.framework"; }; - 9E6F6DA258BB741707AF260991406A45 /* secp256k1_ios */ = { + 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */ = { isa = PBXNativeTarget; - buildConfigurationList = 5DD4B9BDB2D8AEE1E1AEF935797DDFC4 /* Build configuration list for PBXNativeTarget "secp256k1_ios" */; + buildConfigurationList = 8292BE0D9164B6CA74EDE2D0B4A9C609 /* Build configuration list for PBXNativeTarget "CryptoSwift" */; buildPhases = ( - 61424491A90FA1CEFD4127641BC72054 /* Headers */, - 6E0F950F1064712885A5DD5D77ACA06D /* Sources */, - C813DA1EDF2A4C65DFBAF18A02E0019B /* Frameworks */, - A3F793D19799B8B448A27F468014FD2F /* Resources */, + C9B8F223C5191C06610567F142437FA1 /* Headers */, + CCBB251F64ECEFA16156983A60AFC5CA /* Sources */, + 30D68B77A2DAB060755632E5E528C760 /* Frameworks */, + C25E3F3E20AE8C3A5BA89FBE4505DC7A /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = secp256k1_ios; - productName = secp256k1_ios; - productReference = 603D0BBCC0547440419CBD2E29526BBC /* secp256k1_ios.framework */; + name = CryptoSwift; + productName = CryptoSwift; + productReference = 893235EAB21791B8848761F81F0B2A56 /* CryptoSwift.framework */; productType = "com.apple.product-type.framework"; }; - 9FAF3F7C2AF7DDE71D9A97A691734EB3 /* Pods-web3swiftExample */ = { + 70B9B02B65110648B14877481CCA7615 /* EthereumAddress */ = { isa = PBXNativeTarget; - buildConfigurationList = C5C5AC318E00D7989B0E7723942D7F8D /* Build configuration list for PBXNativeTarget "Pods-web3swiftExample" */; + buildConfigurationList = 33565CE9A008BC2D28F678145BCCC377 /* Build configuration list for PBXNativeTarget "EthereumAddress" */; buildPhases = ( - E062E56B1A153CA7AFA882E877161EDD /* Headers */, - 009E1517FD1F576E6F0E64DC038A0735 /* Sources */, - CA9DF7FB0BA9F12FA7DB48B07D7EDDAC /* Frameworks */, - 2514E224EE34D18A9473356B8FFD2F92 /* Resources */, + 3FD102C69B8A80AA835E2638D0C66C4F /* Headers */, + 6F5D95792A7DD5623B7EC84E0E8359C3 /* Sources */, + F88A903EB36D7AF6FC3A163B862AEE5B /* Frameworks */, + F06C85F4A9893E89799A082D9511B26D /* Resources */, ); buildRules = ( ); dependencies = ( - C026F72CB82C71353BE419590756240B /* PBXTargetDependency */, - D13DF1F08437330EF8FD792AAE2BB899 /* PBXTargetDependency */, - 55A842667E3A7EE1434E605AA61B6475 /* PBXTargetDependency */, - 101675B216693CA112E7BF6A4916EDCE /* PBXTargetDependency */, - 94400ED4462B55D92AB3F3434EA7D441 /* PBXTargetDependency */, - 558007D1C33C8F94485716042C8AE681 /* PBXTargetDependency */, - DA628256DCE97DA23F30B6AFBAD16D9A /* PBXTargetDependency */, - 85E12AE1342F6CE11A6D0A51BF19A624 /* PBXTargetDependency */, + 82927588D81F01270CF30C1779752B8B /* PBXTargetDependency */, ); - name = "Pods-web3swiftExample"; - productName = "Pods-web3swiftExample"; - productReference = B72E91CA236B363CA685F62C6A793DD7 /* Pods_web3swiftExample.framework */; + name = EthereumAddress; + productName = EthereumAddress; + productReference = FD7ED36C282A0828EE45325CACB45C56 /* EthereumAddress.framework */; productType = "com.apple.product-type.framework"; }; - E73E959E8118EB238220F62E6A1C4FF3 /* scrypt */ = { + 7FF8752D2607B0617A8EA59CB6F52DA7 /* SipHash */ = { isa = PBXNativeTarget; - buildConfigurationList = CF44C399FCFA5E9B656CA1C56407BE66 /* Build configuration list for PBXNativeTarget "scrypt" */; + buildConfigurationList = 18A84A1682CD37CFA0F42453F6BF95C9 /* Build configuration list for PBXNativeTarget "SipHash" */; buildPhases = ( - 215B2F3DDF01366E8169D7F8FB7F98CB /* Headers */, - 64E1BF62E9582C789401F5E8C00B99DA /* Sources */, - 6FC7B3E7CF91B31F891E43A08C404AF9 /* Frameworks */, - B2B5457EE94ECE1EA6B833489D8AB645 /* Resources */, + 09EADEA037FE0B8626C8AEE86F19B108 /* Headers */, + 92881122437CB3C21DE6947CADDF0A60 /* Sources */, + D1D2E3112C8952F649A1AA6C2A244398 /* Frameworks */, + E2C10720FE37B7B597C0A2FD39826949 /* Resources */, ); buildRules = ( ); dependencies = ( - 21FC2C46A48807D118373974DA8B3D2B /* PBXTargetDependency */, ); - name = scrypt; - productName = scrypt; - productReference = 836DA51652F74890CF6989C60C0E8ADC /* scrypt.framework */; + name = SipHash; + productName = SipHash; + productReference = 92E84CE689EC1CA76E264E5261761179 /* SipHash.framework */; productType = "com.apple.product-type.framework"; }; - F58417C26FE443298C1E00C34A50FD6B /* web3swift */ = { + 888C7AD1D57FC2EBE4CF200F6BD2A842 /* EthereumABI */ = { isa = PBXNativeTarget; - buildConfigurationList = F433FF5D09BB9F7450B0FEEBCDA6FA68 /* Build configuration list for PBXNativeTarget "web3swift" */; + buildConfigurationList = 0639662C632CDF2297369DF6E66E9D8C /* Build configuration list for PBXNativeTarget "EthereumABI" */; buildPhases = ( - 5012D1FCC085993E461589E57FD9E2D4 /* Headers */, - 3BC71CACB10B623449101F053D5212E0 /* Sources */, - 8271C77EA6CE678CDE80B46374424116 /* Frameworks */, - 10FBA403DF79EEE2B5426D7722593E57 /* Resources */, + 5BB7A0FCC95EC7CD413E98D637584D9A /* Headers */, + 06CD91273F3B56F7F839CD6CFA8913FC /* Sources */, + 3EB472E2EE778BA2800B34DBF4BA6E58 /* Frameworks */, + 41CAFDA813475848A6160E155F303F7C /* Resources */, ); buildRules = ( ); dependencies = ( - B32AA7F0867CD31D1B04E18741BEDE96 /* PBXTargetDependency */, - 41EDE4ED56DB3F623BD4559C442A50E9 /* PBXTargetDependency */, - 86B1F393CB9ED43D8A25011223DE74D5 /* PBXTargetDependency */, - 8702A31DAF7187F4D6BB1D2BAD874782 /* PBXTargetDependency */, - C527D0F9FEA1E852F1597014B62CE77D /* PBXTargetDependency */, - 527C093D030BE594366CB32AA85675E1 /* PBXTargetDependency */, + 2965740EC5E2A6513D2A920460471AD7 /* PBXTargetDependency */, + 6C89BCE50AEDF956DF810088461B0749 /* PBXTargetDependency */, + A21A883EB1BF16D519AA5DFA79834214 /* PBXTargetDependency */, ); - name = web3swift; - productName = web3swift; - productReference = 4D8953CE81298B6C1067F23B6A71EEBD /* web3swift.framework */; + name = EthereumABI; + productName = EthereumABI; + productReference = 0FCE2106A870C9CA8289F01F2E005C3A /* EthereumABI.framework */; + productType = "com.apple.product-type.framework"; + }; + B7B21C794593341834C7614B423C9C8A /* SwiftRLP */ = { + isa = PBXNativeTarget; + buildConfigurationList = 847C860E5C8C46156BEC16FAF215BA10 /* Build configuration list for PBXNativeTarget "SwiftRLP" */; + buildPhases = ( + FCBBD0298627F98D8A79A55DCB756ED3 /* Headers */, + D53F5616BA38639474F9A1A3ECEB519F /* Sources */, + C51A836D82921EFA9484264358165DE4 /* Frameworks */, + 06979946F3F16D31E5D914AB1C84B756 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 8315E99E211AE31E4A346F2FF7D10A53 /* PBXTargetDependency */, + ); + name = SwiftRLP; + productName = SwiftRLP; + productReference = 780BEB0A3FE57594F0858A7EA833EC1A /* SwiftRLP.framework */; productType = "com.apple.product-type.framework"; }; - F62AF0F0F2678A4120DFF3D5D1A1F6D5 /* Result */ = { + DD6DF1A42DE8BB0017BCCD871EA0F04D /* PromiseKit */ = { isa = PBXNativeTarget; - buildConfigurationList = 106FD454C475C642689D0E228E11702F /* Build configuration list for PBXNativeTarget "Result" */; + buildConfigurationList = A9C5C85EB3A3102926F51BA14F3D5C13 /* Build configuration list for PBXNativeTarget "PromiseKit" */; buildPhases = ( - DBADEE36F5137C8104A1BC6AD5D5B645 /* Headers */, - 1A6ECFA1D5E1321FE32355EE625759ED /* Sources */, - E1DF5266F8CECC485159ADD3E8DDAD61 /* Frameworks */, - 855676B9D78668B93F36A8DEED7BAA60 /* Resources */, + D8B7AAB5D3C05844B4F46DAE81F4AB3B /* Headers */, + 0342384526A309EEB4901AF27F92DCA5 /* Sources */, + 578DFD9660782B537DF2F07E1FD46259 /* Frameworks */, + 4172BB1634793204FFFCF79F08C311BB /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = Result; - productName = Result; - productReference = C3B25C1F01EFB3AC5FA924DB59808989 /* Result.framework */; + name = PromiseKit; + productName = PromiseKit; + productReference = 7B19C8291B81ECFBA8C6A57213ADA700 /* PromiseKit.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -1840,25 +2045,34 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = C2E5FB831D3D66B1ECB265D613AE4623 /* Products */; + productRefGroup = 68D1B13E7ACEC4FBBFF130BADA9C0A1B /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */, - 4DACDE493E99BF92E5758A59F946A750 /* CryptoSwift */, - 9FAF3F7C2AF7DDE71D9A97A691734EB3 /* Pods-web3swiftExample */, - 2571F2C79C3D43B0220DF7B9302CB451 /* PromiseKit */, - F62AF0F0F2678A4120DFF3D5D1A1F6D5 /* Result */, - E73E959E8118EB238220F62E6A1C4FF3 /* scrypt */, - 9E6F6DA258BB741707AF260991406A45 /* secp256k1_ios */, + 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */, + 888C7AD1D57FC2EBE4CF200F6BD2A842 /* EthereumABI */, + 70B9B02B65110648B14877481CCA7615 /* EthereumAddress */, + 4FF76C9CFB6B4346A2DDCAAE6E407CEE /* Pods-web3swiftExample */, + DD6DF1A42DE8BB0017BCCD871EA0F04D /* PromiseKit */, + 0ED0B491AE891D6CDC3963787F0E2DB4 /* scrypt */, + 640B979328B6328F6325026CA79A1B22 /* secp256k1_swift */, 7FF8752D2607B0617A8EA59CB6F52DA7 /* SipHash */, - F58417C26FE443298C1E00C34A50FD6B /* web3swift */, + B7B21C794593341834C7614B423C9C8A /* SwiftRLP */, + 6385AA5DEB59BDFB6EC695A6F0524DA7 /* web3swift */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 10FBA403DF79EEE2B5426D7722593E57 /* Resources */ = { + 06979946F3F16D31E5D914AB1C84B756 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 108DAA910E2C213632945B1B7282D96E /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -1872,317 +2086,228 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 2514E224EE34D18A9473356B8FFD2F92 /* Resources */ = { + 1BBD4114420EDB29259D1764C87E97C8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 5D149CE8823228F4B10FB96A3177322E /* Resources */ = { + 4172BB1634793204FFFCF79F08C311BB /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 855676B9D78668B93F36A8DEED7BAA60 /* Resources */ = { + 41CAFDA813475848A6160E155F303F7C /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - A3F793D19799B8B448A27F468014FD2F /* Resources */ = { + 647821CAA544A3E33DD75420AB1FFDC7 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - B2B5457EE94ECE1EA6B833489D8AB645 /* Resources */ = { + B6C0DD1EAC91C25A1482A37F7D30A81D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - E2C10720FE37B7B597C0A2FD39826949 /* Resources */ = { + C25E3F3E20AE8C3A5BA89FBE4505DC7A /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - FD8B0ACCF4E0307C943432C30484C693 /* Resources */ = { + E2C10720FE37B7B597C0A2FD39826949 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 009E1517FD1F576E6F0E64DC038A0735 /* Sources */ = { - isa = PBXSourcesBuildPhase; + F06C85F4A9893E89799A082D9511B26D /* Resources */ = { + isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 60E624888EDC3FAA5DD873759CA6A5F0 /* Pods-web3swiftExample-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 1A6ECFA1D5E1321FE32355EE625759ED /* Sources */ = { +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 0342384526A309EEB4901AF27F92DCA5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C3EC0248F1264283CA50426408BA59BB /* AnyError.swift in Sources */, - DE1D91B2EBCECAEAC4D480323BEC3039 /* NoError.swift in Sources */, - 65BCDF3B209C440F8CBD5648EABD5FA5 /* Result-dummy.m in Sources */, - 7A6C963EFD84D52F5A5350A9612B3B0E /* Result.swift in Sources */, - 66F9A521D75B9EABAE1CAD8FDB2FD28C /* ResultProtocol.swift in Sources */, + 45BF4E826F20BB6B80DA1656194C389B /* after.m in Sources */, + 860272FAD4E2D035DF10AE20A552ECD6 /* after.swift in Sources */, + 5AD030261435FD98FAF7431CE885864D /* afterlife.swift in Sources */, + D6DF6D0E2CAABE79ABFE4E49B5650811 /* AnyPromise.m in Sources */, + 7A65AA9F003F126626392DE935CA763B /* AnyPromise.swift in Sources */, + 9F072011232D95179D1C7D0BA561714D /* Box.swift in Sources */, + 2F19C94428DBF3FEE892C3BC9538BD0C /* Catchable.swift in Sources */, + 401FC3DD2EDDB48484C0F58DB376C436 /* Configuration.swift in Sources */, + 21EA3B70F882771DE5E71A78762F852F /* CustomStringConvertible.swift in Sources */, + D3D0D567F96629FC64F8ECAFAEE917ED /* Deprecations.swift in Sources */, + BD4B04E18C36BD2D1DF0BD10C05BF2D3 /* dispatch_promise.m in Sources */, + CDD09F29DAD4B81BA080341DD1E62A47 /* Error.swift in Sources */, + 0EAFFDE720BC075EFD8024E130A3F583 /* firstly.swift in Sources */, + 3D9E0EC94604238F4D837E3E7E9CDFDA /* Guarantee.swift in Sources */, + 432A59F5503460580FBF047A2E95B403 /* hang.m in Sources */, + 4244DC847B46A7C3702021C52140C539 /* hang.swift in Sources */, + C2151450953E0EC8EDC912BD70010B41 /* join.m in Sources */, + 0FB2C7EB657123B46C1E183E33FECB71 /* NSNotificationCenter+AnyPromise.m in Sources */, + 36E5BB58E35F3EE126FD2E7F78B0C712 /* NSNotificationCenter+Promise.swift in Sources */, + 68ACC882FF1859C30606FD4785F5B60D /* NSObject+Promise.swift in Sources */, + 44CD2A9B83122B52B80E91DD739137B9 /* NSTask+AnyPromise.m in Sources */, + 077140AE43E4559554657C3D38B4D8D1 /* NSURLSession+AnyPromise.m in Sources */, + F25A68C1BB11B18A009139962E36D783 /* NSURLSession+Promise.swift in Sources */, + F276CE59D1316B2370725D47D4EC2FB7 /* Process+Promise.swift in Sources */, + AC0B732DDB2F612834D2A7E19DA53754 /* Promise.swift in Sources */, + 5ADF45AA07583F480A917C3F34118118 /* PromiseKit-dummy.m in Sources */, + 60A5148C3B21CBB1388633419E789AE6 /* race.m in Sources */, + 8440A90B8FBD27B2631A55E10CF96144 /* race.swift in Sources */, + 359390E3E8AB281E3AAE339BD7C2D89E /* Resolver.swift in Sources */, + CFDEB0F86B9C7084B7DB4D052CB012A3 /* Thenable.swift in Sources */, + DBBFC560AB043DF7F0AF1ADD29B96323 /* UIView+AnyPromise.m in Sources */, + 36D1F27010F6E0052132BC35DF1E9B2D /* UIView+Promise.swift in Sources */, + 56573858613F4A2156E0F148A5258D36 /* UIViewController+AnyPromise.m in Sources */, + 9505A2BBE23F80EEA10A9209F39C0695 /* UIViewPropertyAnimator+Promise.swift in Sources */, + A48FEA29EC3240C483497D8DB6FB0541 /* when.m in Sources */, + CD78786DD832146021F67BDA26D07BCB /* when.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 2BD29726F4F37EEF096F8ED056E45044 /* Sources */ = { + 06CD91273F3B56F7F839CD6CFA8913FC /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 78F2BC147CC813133D6356C9BE1ADCE1 /* AEAD.swift in Sources */, - 2F3B479B4A026F3280BF4FA333726A86 /* AEADChaCha20Poly1305.swift in Sources */, - 98C459EAEF81D101622627E37AAD0946 /* AES+Foundation.swift in Sources */, - 58C54CE909D3981244E323D3DB2EADFD /* AES.Cryptors.swift in Sources */, - 101CEC15F6F283289721E6DA1640B5DB /* AES.swift in Sources */, - C1E6617F404FF73114711159F727E280 /* Array+Extension.swift in Sources */, - F41DE1A38B6ECF011127CC2F18B8F1E5 /* Array+Foundation.swift in Sources */, - 063172677A7320FA0176B8142D11805E /* Authenticator.swift in Sources */, - 2058A726DD078C04D63E243565CD07E1 /* BatchedCollection.swift in Sources */, - AA7EAF7137C27D6E369D3F2E66ABCA18 /* Bit.swift in Sources */, - 77E8B7DDA613FB5C879784E0772FC013 /* BlockCipher.swift in Sources */, - E82F15CE10FE5291F3346A78F11EAB71 /* BlockDecryptor.swift in Sources */, - 469AAF3F2BCF89EB1AE5208BDDCD8524 /* BlockEncryptor.swift in Sources */, - 1F522B047157244684FC7A469A5654D5 /* BlockMode.swift in Sources */, - A765945680ABE1A73AAEF33A2D0ADC76 /* BlockModeOptions.swift in Sources */, - 32466A7539462463993E957EE2462F58 /* Blowfish+Foundation.swift in Sources */, - 679171569947CA69B28369CBB64062BE /* Blowfish.swift in Sources */, - 09648EACD312EC7080BB4E2CD9B0943F /* CBC.swift in Sources */, - 80B0B462C09D541D9E850D874D656673 /* CFB.swift in Sources */, - 76A07471B25153C90BBE8C37CC9250B4 /* ChaCha20+Foundation.swift in Sources */, - 1F4BDDA00F127CA95F0BFC9F034BD28D /* ChaCha20.swift in Sources */, - 23E69E19A1E45A210A051F28FBDF4279 /* Checksum.swift in Sources */, - CD13C27BEF9D398C0055D537003F0206 /* Cipher.swift in Sources */, - D465365F819D9514B406031A0C845BAA /* CipherModeWorker.swift in Sources */, - 5356F05030669B23BAE51298F9EE5403 /* CMAC.swift in Sources */, - AF7191EC445198351E2396EED989010A /* Collection+Extension.swift in Sources */, - A425AB2AFD2A6AC8C9AD47D474E8F964 /* CompactMap.swift in Sources */, - 72DEE3AC5B9A27020EFE91619AFBAF82 /* Cryptor.swift in Sources */, - 4F3F51153F6029695BE6BE54FFBDC616 /* Cryptors.swift in Sources */, - 5B9C17D9478EB66CF57A57017A230058 /* CryptoSwift-dummy.m in Sources */, - FF8D6F9246B91602A6510889F5AC7A37 /* CTR.swift in Sources */, - 0FA7E1ED09D6CB457D8B1F5880A97CEB /* Data+Extension.swift in Sources */, - 681D98F4D692FA39C87A2949DFE51F16 /* Digest.swift in Sources */, - 02E8046C2A767EA8848448EAB9E07A65 /* DigestType.swift in Sources */, - 07A516E5DC61219A239FE2E3E902E691 /* ECB.swift in Sources */, - DF98911B0F87E37CA61A850651CE7EFE /* GCM.swift in Sources */, - FCC4CAEEB081254048F9F8EAD95E0B08 /* Generics.swift in Sources */, - 6451556051C597D0608E90DD9768DF00 /* HKDF.swift in Sources */, - C39334762D97FFDF0ECF60FE78FEE593 /* HMAC+Foundation.swift in Sources */, - 6827F78241E84E17AA16A7D10C477746 /* HMAC.swift in Sources */, - A8DD8450B62755340F32E75385672F49 /* Int+Extension.swift in Sources */, - 4261BDB05BD2252A1D37EF501EE7AE26 /* MD5.swift in Sources */, - E2F49DCF776B189057E13990400C3EA8 /* NoPadding.swift in Sources */, - 48D8B679DA0511AB8EAC728612007462 /* OFB.swift in Sources */, - 97CC2191FF1F5BF6E007E1F0452D3835 /* Operators.swift in Sources */, - B172A8072454AB83995AF52101B03839 /* Padding.swift in Sources */, - 8293BCC7B22412260873FB9EFD99FB53 /* PBKDF1.swift in Sources */, - 3EDCE35B5BD08FB4348435D94A458376 /* PBKDF2.swift in Sources */, - 5D8B08FF6F53F23FF23A5F2C4D5249A8 /* PCBC.swift in Sources */, - DB3AA3B2747DE3DA344F88727E0792D7 /* PKCS5.swift in Sources */, - 8AD769BC9791E6C53FF3CD35554AA1D5 /* PKCS7.swift in Sources */, - F0AC9F138AA0272B3B7812346EDAC741 /* PKCS7Padding.swift in Sources */, - 582127B8950A73384E0D7C919A6B9D76 /* Poly1305.swift in Sources */, - 535A046EF29014CED01BF31BBCC547AA /* Rabbit+Foundation.swift in Sources */, - 65CD80DDC802FC77BDD68D3E2AA32F8F /* Rabbit.swift in Sources */, - 847A155084AF3DCB445E53A1A33F2354 /* RandomBytesSequence.swift in Sources */, - 68D37923D30539349D08F686E2060117 /* SecureBytes.swift in Sources */, - 6890BC23C948237266F16D15073C5B26 /* SHA1.swift in Sources */, - 0732B277DE0821A2E9F30FD82A2D505C /* SHA2.swift in Sources */, - 0717ACAE7ECC2E7D2E33FEEB38A76E2F /* SHA3.swift in Sources */, - DBD5D46970B589C74A1FEAAFFBC1744B /* StreamEncryptor.swift in Sources */, - 4868FC86913C7BEEF591B59A65E1C654 /* String+Extension.swift in Sources */, - 2C50168E22ACB7A7D9E7ED2A643A1681 /* String+FoundationExtension.swift in Sources */, - 8956888E1CC6894013EBC449101A3EBB /* UInt128.swift in Sources */, - F62CB020347D65CE57D6CF01B00D84AA /* UInt16+Extension.swift in Sources */, - 2BCA931010327B7616D84860C4E8DE2A /* UInt32+Extension.swift in Sources */, - 94C78D2A4E635D01A9CD9986AC8CDD37 /* UInt64+Extension.swift in Sources */, - 3C14A6EDB43BEE051ED4B406A33DC65F /* UInt8+Extension.swift in Sources */, - 81C1FB472DAAF55ED66443EE6FF59E1C /* Updatable.swift in Sources */, - 3E3188EE35DEDBA8EAF6854B9224011E /* Utils+Foundation.swift in Sources */, - BDEC4E13E67AB342D0FA893AC46B51FF /* Utils.swift in Sources */, - D953DA4479CC018FA143BF59E7A5B10A /* ZeroPadding.swift in Sources */, + 2ADD61CDA6604966DA306959A92FA086 /* ABI.swift in Sources */, + 0485DDC0DDDFAD1E8E278AD9C56EC1B4 /* ABIDecoding.swift in Sources */, + 6DF9FDAB9C7F26B557B3A0DA94578241 /* ABIElements.swift in Sources */, + 8413BF7A30C04021BED6564D4B77738C /* ABIEncoding.swift in Sources */, + C336A99180A6D5AD84C44CC15F48E2EE /* ABIExtensions.swift in Sources */, + A95AFD0C2BC0C07CB65C970E57D177E3 /* ABIParameterTypes.swift in Sources */, + 382BA96CCC1E7E7B0927C453432C342B /* ABIParsing.swift in Sources */, + 3E7B3566E3CC285CAACA093A9832E526 /* ABITypeParser.swift in Sources */, + A89883197ADD5C0B0E2D8C797E23A8C3 /* EthereumABI-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 3BC71CACB10B623449101F053D5212E0 /* Sources */ = { + 1751A2325AEF0209922ADB9422A536AB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 955F82AA3E016CE78E286ACC8559F35A /* ABIv2.swift in Sources */, - 82BBC18E36946D4421D1775F3CE9E101 /* ABIv2Decoding.swift in Sources */, - F2C1FF8D84B769BBAA2774FC9089B6F9 /* ABIv2Elements.swift in Sources */, - 28D7A203B25D26891BE2E0EC01BBA797 /* ABIv2Encoding.swift in Sources */, - 7519F2538E19EC85619495B9581EC002 /* ABIv2ParameterTypes.swift in Sources */, - 25ADFF1D037F9E8F54618307F1ED2DAF /* ABIv2Parsing.swift in Sources */, - 7F5E2B72A48329F95982D38A450CC919 /* ABIv2TypeParser.swift in Sources */, - 29FC0322575E983B2A4C695AB7E8AED0 /* AbstractKeystore.swift in Sources */, - F8995F2D7FCB6539E22F9945ED840B36 /* Array+Extension.swift in Sources */, - ACD3873A8729ACBD9A6D48054239B646 /* Base58.swift in Sources */, - 0512B738C8204A95E8407E6893281245 /* BigUInt+ObjC.swift in Sources */, - B58EED51FE023F7BFBA4F002A398A71F /* BIP32HDNode.swift in Sources */, - 2E2F39DE14D971C18F8B7AE2CF084C4E /* BIP32Keystore.swift in Sources */, - C4C959076952E3A0AA8004F2C9114CFD /* BIP32KeystoreJSONStructure.swift in Sources */, - 2EBB7ADAEB63AA3974D8DB8047EAB538 /* BIP39+WordLists.swift in Sources */, - 982543B875153D03B93FF50497D24361 /* BIP39.swift in Sources */, - 9F809ECDE716A3FBDCA8A1940D7C2785 /* BlockExplorer+GetTransactionHistory.swift in Sources */, - D1A3BE9AD8F7459267BF22524FB4E5E0 /* BlockExplorer.swift in Sources */, - A1CFFFAE4F7C907C9B0DA0FFF1D94FC8 /* BloomFilter.swift in Sources */, - 1F4BD2A1E2D9E7C4534DA604B402FA3F /* ComparisonExtensions.swift in Sources */, - 8F7E30C827079FA8A0EFEA91D62DF299 /* ContractABIv2.swift in Sources */, - 917F4351B168C4F3759ACFA72A29562A /* ContractProtocol.swift in Sources */, - 8B3B9583B57FF22C41C8F767508487FF /* CryptoExtensions.swift in Sources */, - 5177D0C2101B7DA5EE08F6111C768FCE /* Data+Extension.swift in Sources */, - 54F1A3C5DE33561080A750257B22C23B /* Dictionary+Extension.swift in Sources */, - C4330EC9FFE7F619BBE73C58778AD54D /* EIP67Code.swift in Sources */, - 6B2C7A66EAF074A78FFA2FD769C56F65 /* EIP681.swift in Sources */, - 2A7A6CFC865030C10D3DE94D65B5502A /* ENS.swift in Sources */, - 3E094A20F931453D1CB10651D5C83651 /* EthereumAddress+ObjC.swift in Sources */, - 629A716F64B182EEED14780B579DB7D1 /* EthereumAddress.swift in Sources */, - 938409FB279CFA0089A3CEF866CFA6A0 /* EthereumFilterEncodingExtensions.swift in Sources */, - 929BF135E5D71303BA026FD0C5CBACAA /* EthereumKeystoreV3.swift in Sources */, - E5FB91E5633F83EE8FB95C47EDC318C5 /* EthereumTransaction.swift in Sources */, - 1B4526E37C8A077336405AABCB0D7A76 /* EventFiltering.swift in Sources */, - F82E45B3F844F330BE4BCD8AA537A44A /* IBAN.swift in Sources */, - AC43CF18DC2953592E51096D0230931B /* KeystoreManager+ObjC.swift in Sources */, - 34F013BF451F97489364B45D6CE486A6 /* KeystoreManager.swift in Sources */, - 362EF07E94A6E51B4E80FAF53CCE6367 /* KeystoreV3JSONStructure.swift in Sources */, - B3682A183AE01299B9F5D573C85ADF7D /* LibSecp256k1Extension.swift in Sources */, - 27C2946E57A2DADA5C8D171A7DC2A2BD /* NameHash.swift in Sources */, - 5009487EA1550B855E0A8D0F5218E755 /* NativeTypesEncoding+Extensions.swift in Sources */, - 436E0D3E98FDA90F084FD4C3EB5D10D8 /* NSRegularExpressionExtension.swift in Sources */, - F346DB25333CE75BFB18C6593C562037 /* PlainKeystore+ObjC.swift in Sources */, - 051AD4160E32E958586C7F2F62C23172 /* PlainKeystore.swift in Sources */, - 5C55F3DE15A87BC02CF66FE4EC78B387 /* Promise+Batching.swift in Sources */, - BA7CF16E10824FD60A7B3706DAF36443 /* Promise+HttpProvider.swift in Sources */, - 828C7ABD4A0AE0960760866B17AD94B1 /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */, - 980449BCD84EFBE6174DB967E62EE02C /* Promise+Web3+Eth+Call.swift in Sources */, - 0059405B888945E190437148D57D390D /* Promise+Web3+Eth+EstimateGas.swift in Sources */, - 5424161BE3E074F4E7FEB20105CF2DEF /* Promise+Web3+Eth+GetAccounts.swift in Sources */, - 5CBEF893697D411E6DAFF8283DBF5C1B /* Promise+Web3+Eth+GetBalance.swift in Sources */, - D805859BE5C06581BC912A50A95864D5 /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */, - CAE711EB66D527E3FB43776CF276843B /* Promise+Web3+Eth+GetBlockByNumber.swift in Sources */, - 074311E7BC28C29F29C28D05D1496B54 /* Promise+Web3+Eth+GetBlockNumber.swift in Sources */, - 795DED671E284726E82F7B29C8D84E1C /* Promise+Web3+Eth+GetGasPrice.swift in Sources */, - 5B2CC610F0124B9A9C82A288860CDC34 /* Promise+Web3+Eth+GetTransactionCount.swift in Sources */, - 1728A542D46BD6132968D04D711A9588 /* Promise+Web3+Eth+GetTransactionDetails.swift in Sources */, - 9A76F4002962256CFD034CC3C39BFC60 /* Promise+Web3+Eth+GetTransactionReceipt.swift in Sources */, - BFCC5A2946BC13B6443A9FE73500D6E6 /* Promise+Web3+Eth+SendRawTransaction.swift in Sources */, - B5F5721D6331C7D47FB48C673155A8EA /* Promise+Web3+Eth+SendTransaction.swift in Sources */, - B695CE625BBFAB10171B18CFE6CE271E /* Promise+Web3+Intermediate+Send.swift in Sources */, - 5884800813971F246B42526DC8FC3B85 /* Promise+Web3+Personal+Sign.swift in Sources */, - 4CC6D90B4992919977240F7380448848 /* Promise+Web3+Personal+UnlockAccount.swift in Sources */, - 8CBD2840D5CF4328E1F16FABAE55137F /* RIPEMD160+StackOveflow.swift in Sources */, - A46E62AFBC76EAFED17097838AFC58E1 /* RLP.swift in Sources */, - BCA8203FBB463DF9AD3618518BBD5D7D /* String+Extension.swift in Sources */, - 6B5CE1AEB9E558B70C951801D35FD55E /* TransactionSigner.swift in Sources */, - EA13ACA8F3D959E99B0316C7DCE512A6 /* Web3+BrowserFunctions.swift in Sources */, - 324B8D907DD24DC359F04AA6C542B087 /* Web3+Contract.swift in Sources */, - B252621428A77550F451918D3F97E6A9 /* Web3+ERC20.swift in Sources */, - 6B861CBC3B90D10C8CDBAC5D0E01743D /* Web3+Eth+ObjC.swift in Sources */, - 09F823407F1CF54E8E612A6A5B95D275 /* Web3+Eth.swift in Sources */, - 311DD072B99C375FA72BED3BEF6FAF02 /* Web3+EventParser.swift in Sources */, - 8A4FB72AE3DADD0BB406C21178861D3C /* Web3+HttpProvider+ObjC.swift in Sources */, - 44FDB7930C97998341299AC19CD52336 /* Web3+HttpProvider.swift in Sources */, - B80E8DC58BACAE173A61AB492B89E97C /* Web3+Infura.swift in Sources */, - CAA2C6EC03DB5574AA1B639894CB338F /* Web3+Instance+ObjC.swift in Sources */, - D04490D6A1E9627156186C5EF0025EDD /* Web3+Instance.swift in Sources */, - 464FF1817C50D833815517539FE13BAD /* Web3+JSONRPC.swift in Sources */, - EC76C253793BBAB13A244EFE1A98619F /* Web3+Methods.swift in Sources */, - B288CCBB9F4B15DBF6A61AEDB921328C /* Web3+ObjC.swift in Sources */, - FF4D62310B934389B147868EA7D5E720 /* Web3+Options.swift in Sources */, - 0C841B2C6A190FB7458744E4D635B9ED /* Web3+Personal.swift in Sources */, - E8658C4D90A1C534C6B834800E5F0CBC /* Web3+Protocols.swift in Sources */, - F0B763BBACB1D83893F9AC263E2E94D5 /* Web3+Structures.swift in Sources */, - EBDB217F6C107E06FC5E19EFE340F40F /* Web3+TransactionIntermediate.swift in Sources */, - AC498DEA150B4854494EE3B499B1E74B /* Web3+Utils.swift in Sources */, - 9E017EE35E02E183B048B58B739A72DA /* Web3+Wallet.swift in Sources */, - 6031615CB271AAFFE43DAB124BE8A6BC /* Web3.swift in Sources */, - A83B2E3460B4EE8E9FEF5F63ECC58B87 /* web3swift-dummy.m in Sources */, + D416E9A2C53EBE511502E1E404028C7B /* Pods-web3swiftExample-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 546DA02918E00087C8868D2428514721 /* Sources */ = { + 26B1A5BC43F128F14E41E79BD5341224 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C4A159272AB81264556274A5548B1779 /* after.m in Sources */, - 3DBD2C1D797EFC53BB001EB1D6C96BE7 /* after.swift in Sources */, - 6A18E0B8ED23E948F38FA672542C0134 /* afterlife.swift in Sources */, - 16A37275A64EDC8D057D8793601091C1 /* AnyPromise.m in Sources */, - 605E9831CB62A4E917E6296572119554 /* AnyPromise.swift in Sources */, - 22D70E35B0800D871B84700928E26266 /* Box.swift in Sources */, - 91F2CBDDB29F4BB4CDA58D4F5B628A8F /* Catchable.swift in Sources */, - 405BD7964F4B4EEF44FF3054C2F6C3F6 /* Configuration.swift in Sources */, - 6A2336254B24BF2B93D7D8E39BE294B7 /* CustomStringConvertible.swift in Sources */, - 09321ED82C7D46C3A861780082FE2BBE /* Deprecations.swift in Sources */, - 4BF84961F4CACCF4703A5AD0E128033E /* dispatch_promise.m in Sources */, - C91C671AF2954E63C3FE6ED9D8DFBB8A /* Error.swift in Sources */, - 3F7875216E3000A0AD8DD9566A69D50E /* firstly.swift in Sources */, - E9A859662335ED59C23A2FE20A4DCC17 /* Guarantee.swift in Sources */, - E2D009FA4672CF59190FF304D3BE9DD3 /* hang.m in Sources */, - C28EEF13C3B8ADE2E1AC2FAE81CE3BAF /* hang.swift in Sources */, - 359DF64332B137A22F623BDBFE283662 /* join.m in Sources */, - AC15ABA398755E9185F250429C92E4B7 /* NSNotificationCenter+AnyPromise.m in Sources */, - C9A75595DF17AECC63A535838EC2C283 /* NSNotificationCenter+Promise.swift in Sources */, - AA191D63396A0B50692FE300FEEEE606 /* NSObject+Promise.swift in Sources */, - 7EC2EF142B1C606B1D8F2DE063CF9A8C /* NSTask+AnyPromise.m in Sources */, - C3DC6482055977725FEB1E35661DC0F5 /* NSURLSession+AnyPromise.m in Sources */, - 4F303678FF7DDA68695B989311DD33B4 /* NSURLSession+Promise.swift in Sources */, - 3F0FAD3B01F01B0C450A7ED622344733 /* Process+Promise.swift in Sources */, - 5B7CABA7F60DDB6278C59F7107742033 /* Promise.swift in Sources */, - E4DF114E5136E741076C207866A9C4FB /* PromiseKit-dummy.m in Sources */, - 10CB8C1B8BD3488CF50B902BB86709F3 /* race.m in Sources */, - 6C46373BE1A126517B4FF02B59D985A7 /* race.swift in Sources */, - 6653B8B318CB15A8781326AC664196E3 /* Resolver.swift in Sources */, - 7338C3A1BBB90C58A2F63AD01A2FB4B6 /* Thenable.swift in Sources */, - 056D9F9029F5538C0D5AC9FFF9575693 /* UIView+AnyPromise.m in Sources */, - 6FCD25230BA4E0B39D3CDD9D8AE1299F /* UIView+Promise.swift in Sources */, - 5D50C194C45265600EF508EBAA45E587 /* UIViewController+AnyPromise.m in Sources */, - 6B306FD8E0F52DD895310B95070F9C30 /* UIViewPropertyAnimator+Promise.swift in Sources */, - D67F25162A93B2ECBB8B8709ECA66879 /* when.m in Sources */, - 78B2A1FCF0C8FA91993663201251B82E /* when.swift in Sources */, + 6A9CD001990B462354A83330FBA0EC45 /* BufferStorage.swift in Sources */, + 9D3DB6C9DD52CA4E093E4C8C4BB02DCC /* Cimpl.c in Sources */, + FD67D656E8426746C043D859E4B444D2 /* Salsa.swift in Sources */, + 87AC0B08AE309F77437612D531B5104A /* scrypt-dummy.m in Sources */, + 38B9C6022379E050848456D78C1908D1 /* Scrypt.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 64E1BF62E9582C789401F5E8C00B99DA /* Sources */ = { + 6F5D95792A7DD5623B7EC84E0E8359C3 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5C1069C6EC60175E44BCEBDC0E34805A /* BufferStorage.swift in Sources */, - 2453DCCE0591C08C9EB5DBAF48DCE56E /* Cimpl.c in Sources */, - BEBA6B8DBBE92B3FABF2089C111896DF /* Salsa.swift in Sources */, - 3D6DEB06562C0F35F36447D324F7B881 /* scrypt-dummy.m in Sources */, - 3D5D0963234AB64C9D426B8758656C47 /* Scrypt.swift in Sources */, + 9B1D8B3F81DA09FA60C1B87DBD2D3F63 /* EthereumAddress-dummy.m in Sources */, + 8D5BA4D08F578660123B2E81CE8D0C84 /* EthereumAddress.swift in Sources */, + 0E7DC8600622ED2E0516F25A9F51C903 /* Extensions.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6E0F950F1064712885A5DD5D77ACA06D /* Sources */ = { + 730320B22CD5A2678CC52D89E71C37F0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5403E57738826E187DE7C32E729B3B91 /* lax_der_parsing.c in Sources */, - F3A20CBEDEBAAD24FF1C6EF6A14CE368 /* lax_der_privatekey_parsing.c in Sources */, - 3697589947BBEDE71944356FE6CE4362 /* secp256k1.c in Sources */, - D2891D4FDCB1E6909DDE3C6681C6412D /* secp256k1_ios-dummy.m in Sources */, + 6F2AC95CC89CE8DBC79A6076AC891E51 /* AbstractKeystore.swift in Sources */, + A0745493EEC035A284FF812C97652F66 /* Array+Extension.swift in Sources */, + ADA80E624605AE882CE1D99E722CC414 /* Base58.swift in Sources */, + A848C13D7D87B0F9C11825D17437C482 /* BigUInt+Extensions.swift in Sources */, + 9E8D7107296E94FA95F7F36DE96563C6 /* BIP32HDNode.swift in Sources */, + BB623D27F74DE81E07DA70A9BF7A8CC7 /* BIP32Keystore.swift in Sources */, + FAB7360AD1D3E53E3A466486C74B99AC /* BIP32KeystoreJSONStructure.swift in Sources */, + C5F4D394712A325BCB341BE8623B6111 /* BIP39+WordLists.swift in Sources */, + 60D66E712C47DC1056912A4E77CE7B6F /* BIP39.swift in Sources */, + 536729423F27A0C8C10588505FBD0680 /* BloomFilter.swift in Sources */, + AD19735CB2485737C224B7D360F4493D /* ComparisonExtensions.swift in Sources */, + FFA8593E38644858DA006AC13FCFCE1D /* ContractProtocol.swift in Sources */, + ADD1958BC7A445E2E7BA0AC6D09E5A75 /* CryptoExtensions.swift in Sources */, + 16FCAA2982615446FE51C6848E852E22 /* Data+Extension.swift in Sources */, + B5982630A4AB9E8A9264371037AF8A11 /* Dictionary+Extension.swift in Sources */, + A1A7CD3E806ECEEF9CA491D1D4E2994A /* EIP67Code.swift in Sources */, + 60E46306ED1B3A25049772CD775BDD49 /* EthereumContract.swift in Sources */, + 385AB966428941407528ADE1B373C119 /* EthereumFilterEncodingExtensions.swift in Sources */, + AF37471E60AF8D58B63DC72E73AC22F7 /* EthereumKeystoreV3.swift in Sources */, + FEF24F9BB68DD9774ADE13F2F789BF2D /* EthereumTransaction.swift in Sources */, + 2B26146875465DF9C2D78472B49E3305 /* EventFiltering.swift in Sources */, + 75968482BFB1B3D0EFADE99502D2052C /* IBAN.swift in Sources */, + 1E0ED79B5B4B52516424062B25A8985E /* KeystoreManager.swift in Sources */, + 5F1B861985BEFCD8A263ED54264B5543 /* KeystoreV3JSONStructure.swift in Sources */, + 978D71F3FB5EACAD29A0EEA5792E43EA /* NativeTypesEncoding+Extensions.swift in Sources */, + 69F3796EA98173349F573767FA9D96B5 /* NSRegularExpressionExtension.swift in Sources */, + 7B049E9067D1408E7475C04B2522BF1F /* PlainKeystore.swift in Sources */, + 79555D854C8AC2FC8E9818C8F3710324 /* Promise+Batching.swift in Sources */, + 51C9BF2681C879F6790B674806626C9B /* Promise+HttpProvider.swift in Sources */, + 8E0F8FBB7B21069BAB85856FACD82FAB /* Promise+Web3+Contract+GetIndexedEvents.swift in Sources */, + FDA87C074AA11FD15E2484CF0CD2A696 /* Promise+Web3+Eth+Call.swift in Sources */, + 51AED1A3AE83C5F80B343D8AAFD494A3 /* Promise+Web3+Eth+EstimateGas.swift in Sources */, + C734676627537B0DFCA232D1EB633C0B /* Promise+Web3+Eth+GetAccounts.swift in Sources */, + 3FD7EC703639AE284EF9ECF6278211D7 /* Promise+Web3+Eth+GetBalance.swift in Sources */, + 11C436F48BC5B99CA9B122D6653E7986 /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */, + E990498BC866B73EBAB07888721A09D1 /* Promise+Web3+Eth+GetBlockByNumber.swift in Sources */, + C41B8867263E3E6E42470A3C646B1D19 /* Promise+Web3+Eth+GetBlockNumber.swift in Sources */, + 289C18B312DFEDD4B704A7AD3EFCC360 /* Promise+Web3+Eth+GetGasPrice.swift in Sources */, + 6BAF17172CADEE179F681B5E21E293C4 /* Promise+Web3+Eth+GetTransactionCount.swift in Sources */, + 6455E5C95FBD128A03567A452875A037 /* Promise+Web3+Eth+GetTransactionDetails.swift in Sources */, + 0FFB9D7FCFCF67380D2E03C1CF3D31C6 /* Promise+Web3+Eth+GetTransactionReceipt.swift in Sources */, + F9A7E63350044E62F0E412D2E103915F /* Promise+Web3+Eth+SendRawTransaction.swift in Sources */, + 8618E2984BD34989758334ED52615C62 /* Promise+Web3+Eth+SendTransaction.swift in Sources */, + 0C207CA7D0D22965127628406E3A90B7 /* Promise+Web3+Personal+CreateAccount.swift in Sources */, + 7C84DBA654289A1BBA492EC46B233D86 /* Promise+Web3+Personal+Sign.swift in Sources */, + 93369B9A54200F2200B09E87E76E33D3 /* Promise+Web3+Personal+UnlockAccount.swift in Sources */, + C514360D7B3C5BCB4E0225D90CF187E9 /* Promise+Web3+TxPool.swift in Sources */, + 7A1FD4C579FF7D9ED23F135FB6110673 /* RIPEMD160+StackOveflow.swift in Sources */, + C36E78B76E37290EDFBD35F753C8BFD5 /* String+Extension.swift in Sources */, + 250AD1DEF6E70905E0B2C85ADC0712D7 /* TransactionSigner.swift in Sources */, + 1E5F371419521861C46DCF9701C977BA /* Web3+Contract.swift in Sources */, + 2897474ABD1023E8A37E6EB9792CC661 /* Web3+Eth.swift in Sources */, + 78DA7D99279407A7B5E752BD06003068 /* Web3+Eventloop.swift in Sources */, + 251860F28AD7FF23ECD15AC4C77CF1BE /* Web3+EventParser.swift in Sources */, + 9F08353BD8DADB8C8B14E8A20F8ED909 /* Web3+HttpProvider.swift in Sources */, + 22CC7BE1DDDB6F839A68B21F60826BC3 /* Web3+Infura.swift in Sources */, + C3FF72941CEA02672209A73FF19E4819 /* Web3+Instance.swift in Sources */, + AC6DA7A88F96EE89BE114D6C5DE3F3CF /* Web3+JSONRPC.swift in Sources */, + 7A0197B22900E1FC916C4464F5297A84 /* Web3+Methods.swift in Sources */, + D976E2E8FCA5504DCF2738F501041438 /* Web3+MutatingTransaction.swift in Sources */, + FB0B2EDD326D7C1D112BBAF8F3F9D6AD /* Web3+Options.swift in Sources */, + 68FA51BCE2078F888E11D5C9367BBEE7 /* Web3+Personal.swift in Sources */, + 9D6103741022980D04EED50269512BB9 /* Web3+Protocols.swift in Sources */, + 048D1674FC2E4B4E9A3FFD4670FB476D /* Web3+ReadingTransaction.swift in Sources */, + 98EE378BC5236F9103D9F612AC06E040 /* Web3+Structures.swift in Sources */, + 0AA7233700BDC63D25E5E63F0442F3BA /* Web3+TxPool.swift in Sources */, + 7333A61491547B0B8DB187069AC30533 /* Web3+Utils.swift in Sources */, + 38574512C2CD6A6CCC91C1E9F1624749 /* Web3+Wallet.swift in Sources */, + F27A72D9086266FFEB1DF3028EDC5737 /* Web3.swift in Sources */, + E83BCEA137A6F28FFAC7EE0079FA6156 /* web3swift-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2228,44 +2353,147 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + CCBB251F64ECEFA16156983A60AFC5CA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DC7336EC3F7331F6A630EDA5F32F30E7 /* AEAD.swift in Sources */, + 5B5A1021C78EDC5EB1216C03C6B3A3E3 /* AEADChaCha20Poly1305.swift in Sources */, + C5443D345E878DA9400BCB516DF56B12 /* AES+Foundation.swift in Sources */, + 892CE74F3E4A889E6F69425C79DD7E55 /* AES.Cryptors.swift in Sources */, + 98DA224F5999FBB83A4D2090F9CFBCFC /* AES.swift in Sources */, + 66FCC04FCEB5CC2EA4BFF087187158B8 /* Array+Extension.swift in Sources */, + 08BBE3B0A2885A94DE68FEEA9FBCD256 /* Array+Foundation.swift in Sources */, + A40347FBA49DCAF786314B76D48EDD88 /* Authenticator.swift in Sources */, + 48AEAA9AEFB46AF33C359BAB88AEC324 /* BatchedCollection.swift in Sources */, + F68103A274867FC3D714744E8A1E1A27 /* Bit.swift in Sources */, + 505CA5BFBA1D9ADF951C40E1EA125BD2 /* BlockCipher.swift in Sources */, + 83B5BC56560C7D387AA427415CEAE05C /* BlockDecryptor.swift in Sources */, + 4BD49C6CEF3E4405132B4AF8CA0DE003 /* BlockEncryptor.swift in Sources */, + 9E500E32A76DA2F6356AA3391AD1311C /* BlockMode.swift in Sources */, + 1A3CA564761B01FC3D99DFD8EBD833DE /* BlockModeOptions.swift in Sources */, + E766E43AFDF18D5012C83670A1B48A27 /* Blowfish+Foundation.swift in Sources */, + CFE8E9ADF0B2C6758E619C4CDB178CF4 /* Blowfish.swift in Sources */, + 65D4A5CFCCD7ABBBCA0E9E2CEE10CA62 /* CBC.swift in Sources */, + 26F636BA86A94182E5B3D4B6371B7990 /* CBCMAC.swift in Sources */, + 13E900B217EB7AABB8685EDD051A97E5 /* CCM.swift in Sources */, + 5211E62A23DC79810DF988EBD96EFC32 /* CFB.swift in Sources */, + 3A73C66F10621ABDDA6DA99B83737FD1 /* ChaCha20+Foundation.swift in Sources */, + 3E531578FF1145393154092B38E896E6 /* ChaCha20.swift in Sources */, + 0E8865F19ED08938AD447CE3EFEB6164 /* Checksum.swift in Sources */, + 23BA112C655FA27BE38C9C321EBD3A4E /* Cipher.swift in Sources */, + 28CFAA3F415F6AA26FE3A81387558344 /* CipherModeWorker.swift in Sources */, + 0A0FBCAD7A1F908EF9B1197FE8BB63D2 /* CMAC.swift in Sources */, + C4CDFEEEDDAD44CED19260B6DBEAE02E /* Collection+Extension.swift in Sources */, + 169B55A24D3FDC159B797D85588C8A34 /* CompactMap.swift in Sources */, + EF2D257F439AB4E0C37E407B20DF41BC /* Cryptor.swift in Sources */, + 4C2FA74837ADF9282EC82AAEA3344905 /* Cryptors.swift in Sources */, + 8AA4F289B20DB86C6D5CFC0551222C48 /* CryptoSwift-dummy.m in Sources */, + E1705CF699458B16784782F8A86F23EB /* CTR.swift in Sources */, + EFB38A3AC0C79689874458BE12601515 /* Data+Extension.swift in Sources */, + 14A6030032E12C1B957F620FECF742EA /* Digest.swift in Sources */, + 514821AC03DEAB80E61FD438FC0CF126 /* DigestType.swift in Sources */, + E25CC0BD6475813592D7722F3FCECA43 /* ECB.swift in Sources */, + F6666F3FE8D03AFE4FDEE4421D50B914 /* GCM.swift in Sources */, + F5BCE1E730F746F620A9DB13EE2C1B60 /* Generics.swift in Sources */, + DBE553B80B7B7A047BC80FADEC7B5F83 /* HKDF.swift in Sources */, + 72541048B150E29F22A0CBD388ED2ABD /* HMAC+Foundation.swift in Sources */, + 0627DC84943C9B21BBFFD77F73ECE3AA /* HMAC.swift in Sources */, + 7950CDCD0730EC4DE69E4452A2117CB4 /* Int+Extension.swift in Sources */, + 18704C29935E06F5FB353933C7B93897 /* MD5.swift in Sources */, + 2E3A0CE83A9DC669521D768D83113007 /* NoPadding.swift in Sources */, + 7B50A0E57C8C0F860C0E2D3E2DF889C5 /* OFB.swift in Sources */, + 168831EA2809233CFD6E98640D126804 /* Operators.swift in Sources */, + BF1CBE2864240ABA0FFCA1990215D2C5 /* Padding.swift in Sources */, + 948C38948743D31A8E07ECF1278C0438 /* PBKDF1.swift in Sources */, + 0F47AECED76239456F530A9F34C202AB /* PBKDF2.swift in Sources */, + 31FCEF8F13F00A6EB5C8E43CD2040D52 /* PCBC.swift in Sources */, + 90BB63BE1A3F2906186D961714165CD7 /* PKCS5.swift in Sources */, + 0D32A5EE13EC8FB94162257D12B47954 /* PKCS7.swift in Sources */, + 2D6F68A3EE6AD170EDC30E7485B54524 /* PKCS7Padding.swift in Sources */, + F6F9AF37C197AAA6E2F2341E1D2F3EAD /* Poly1305.swift in Sources */, + 9979250510F331D6F6C4BF5F8A07234C /* Rabbit+Foundation.swift in Sources */, + 84AD9AA7FCDCF491E5F839BDA9E62923 /* Rabbit.swift in Sources */, + EDCBAD6FE0DC05519BE87FA79D6ECCD1 /* RandomBytesSequence.swift in Sources */, + 3E4F34CF3A56C3BCA61A15667B8911CC /* SecureBytes.swift in Sources */, + D41CBBA4660B26D0AE12C867C2D27DF3 /* SHA1.swift in Sources */, + 3619B989C2E488056B62E7517BF4CCCB /* SHA2.swift in Sources */, + 287AF814872A1828332826075A3A769D /* SHA3.swift in Sources */, + 5FCE918F81777C227E72A6C620FE0E9B /* StreamDecryptor.swift in Sources */, + 97D85307763F8B8299524EEFD059729E /* StreamEncryptor.swift in Sources */, + 4F448640DE2AB108DE676C77DEF2E571 /* String+Extension.swift in Sources */, + 9E8CC528BCE6CD8751B925E2DFFC7E72 /* String+FoundationExtension.swift in Sources */, + 938239477B6A9C665CB93642E1DFD0EB /* UInt128.swift in Sources */, + C4588BD98D41DCD0F44F6FA043DC15FF /* UInt16+Extension.swift in Sources */, + E4339E5E7ECB60FD90211A3CD8E64568 /* UInt32+Extension.swift in Sources */, + 07CB80647C63863F46097ECFE0E2852C /* UInt64+Extension.swift in Sources */, + 12D7EAE6F2CEC81702FD70455699210D /* UInt8+Extension.swift in Sources */, + A1257C2EF19E838CC9954197DDCA5734 /* Updatable.swift in Sources */, + 58D378DF3FF9C2C523F72714F028BC18 /* Utils+Foundation.swift in Sources */, + 47F09AB386ECB4F06DC94B5D84B829E3 /* Utils.swift in Sources */, + CF9E91FF64AEBD06486F49509872C007 /* ZeroPadding.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2EBE9A685632B40A0887329BD945EB5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74D763735BB92705D8495572A7991704 /* lax_der_parsing.c in Sources */, + C52F5CF7ED0B6C4EDD0C0DAC40D16B4D /* lax_der_privatekey_parsing.c in Sources */, + 3C55B3F8AC9C9FD5E72C85864D127009 /* secp256k1.c in Sources */, + C1E5BA379AC870AEFBB027BA37F0D4AC /* secp256k1.swift in Sources */, + 3F731C8AD9AE9A8E29567EB2DEED4E53 /* secp256k1_swift-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D53F5616BA38639474F9A1A3ECEB519F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0F843C702EF22858E3BD92556B4A53C6 /* RLP.swift in Sources */, + E641B1AC99C2FE1FB0B1BF1DF49CCECA /* SwiftRLP-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 101675B216693CA112E7BF6A4916EDCE /* PBXTargetDependency */ = { + 04FE31CB63EB17E44AE868F7B8C30FDA /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Result; - target = F62AF0F0F2678A4120DFF3D5D1A1F6D5 /* Result */; - targetProxy = C0A75387703F1A2B591F0E2B62AA17C2 /* PBXContainerItemProxy */; + name = EthereumAddress; + target = 70B9B02B65110648B14877481CCA7615 /* EthereumAddress */; + targetProxy = 5A28E66F1F6078F3843ED6996137737F /* PBXContainerItemProxy */; }; - 21FC2C46A48807D118373974DA8B3D2B /* PBXTargetDependency */ = { + 0689FDC518D6088B176D9F011A67FEE6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = CryptoSwift; - target = 4DACDE493E99BF92E5758A59F946A750 /* CryptoSwift */; - targetProxy = FF6286D7A04DD3602D614132F8461043 /* PBXContainerItemProxy */; + name = scrypt; + target = 0ED0B491AE891D6CDC3963787F0E2DB4 /* scrypt */; + targetProxy = 39482B44F79B6EE7854EFF1F2D1F3220 /* PBXContainerItemProxy */; }; - 41EDE4ED56DB3F623BD4559C442A50E9 /* PBXTargetDependency */ = { + 198220CFB13D643C4BD4C6DF87CB5A21 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = CryptoSwift; - target = 4DACDE493E99BF92E5758A59F946A750 /* CryptoSwift */; - targetProxy = F53010F9D724BDAFA36A318B5FF7C562 /* PBXContainerItemProxy */; + name = EthereumABI; + target = 888C7AD1D57FC2EBE4CF200F6BD2A842 /* EthereumABI */; + targetProxy = 6E2F65D510C1B1CCAB072F2EA027F15D /* PBXContainerItemProxy */; }; - 527C093D030BE594366CB32AA85675E1 /* PBXTargetDependency */ = { + 2965740EC5E2A6513D2A920460471AD7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = secp256k1_ios; - target = 9E6F6DA258BB741707AF260991406A45 /* secp256k1_ios */; - targetProxy = E8DB60D3DA241987C7C44C6EC105D49F /* PBXContainerItemProxy */; + name = BigInt; + target = 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */; + targetProxy = 5ED7085516CC4C38EC3D8A95CD2F66A6 /* PBXContainerItemProxy */; }; - 558007D1C33C8F94485716042C8AE681 /* PBXTargetDependency */ = { + 3E40A4D7B4F79239296333A3133306B5 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = scrypt; - target = E73E959E8118EB238220F62E6A1C4FF3 /* scrypt */; - targetProxy = 3AA144C5877BE9850125175A628B8694 /* PBXContainerItemProxy */; + name = SwiftRLP; + target = B7B21C794593341834C7614B423C9C8A /* SwiftRLP */; + targetProxy = C5958E9968F8CD1EBAAB778373D586E1 /* PBXContainerItemProxy */; }; - 55A842667E3A7EE1434E605AA61B6475 /* PBXTargetDependency */ = { + 48CF01CC6B744BD2A53AE5DD32E778F1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = PromiseKit; - target = 2571F2C79C3D43B0220DF7B9302CB451 /* PromiseKit */; - targetProxy = 0D1A9F72CCDCF579C12409E9B6CF29A1 /* PBXContainerItemProxy */; + name = EthereumAddress; + target = 70B9B02B65110648B14877481CCA7615 /* EthereumAddress */; + targetProxy = 525BA8733B304B49DB740366DDBA734A /* PBXContainerItemProxy */; }; 61069262FD5BCD41F1C291E25CAF599B /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -2273,66 +2501,184 @@ target = 7FF8752D2607B0617A8EA59CB6F52DA7 /* SipHash */; targetProxy = C6C17D0086F8D9E70B8AF619657FF2BC /* PBXContainerItemProxy */; }; - 85E12AE1342F6CE11A6D0A51BF19A624 /* PBXTargetDependency */ = { + 6136549AD271A8B68F4A487F363AEE56 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = web3swift; - target = F58417C26FE443298C1E00C34A50FD6B /* web3swift */; - targetProxy = 3BF361F176FF58861488CD8AC9683C23 /* PBXContainerItemProxy */; + name = CryptoSwift; + target = 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */; + targetProxy = 0871B58B957319E5803181DB6310C9D9 /* PBXContainerItemProxy */; + }; + 6C89BCE50AEDF956DF810088461B0749 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CryptoSwift; + target = 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */; + targetProxy = DEE978CB09E9ED72BBBC50BF4790740F /* PBXContainerItemProxy */; }; - 86B1F393CB9ED43D8A25011223DE74D5 /* PBXTargetDependency */ = { + 7830CB23C813714C3C7806743F44C52F /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = PromiseKit; - target = 2571F2C79C3D43B0220DF7B9302CB451 /* PromiseKit */; - targetProxy = D73B772BC92CA079BB4AC214110DC008 /* PBXContainerItemProxy */; + target = DD6DF1A42DE8BB0017BCCD871EA0F04D /* PromiseKit */; + targetProxy = 4D6FC31C764576609CC511FFA544996F /* PBXContainerItemProxy */; + }; + 82927588D81F01270CF30C1779752B8B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CryptoSwift; + target = 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */; + targetProxy = 819472C9CA5B12290E4B3D5D1BD88D51 /* PBXContainerItemProxy */; + }; + 8315E99E211AE31E4A346F2FF7D10A53 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BigInt; + target = 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */; + targetProxy = BD97544266AEEE50206B558177DB9756 /* PBXContainerItemProxy */; + }; + 86AB873F1433E4E93954368AA21DBA47 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SwiftRLP; + target = B7B21C794593341834C7614B423C9C8A /* SwiftRLP */; + targetProxy = 49EEDCC34FEB88EEA65615E7A8110C7C /* PBXContainerItemProxy */; + }; + 922E624353072D09D48A9881165793C5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = web3swift; + target = 6385AA5DEB59BDFB6EC695A6F0524DA7 /* web3swift */; + targetProxy = A1F782D51A5AA0117251A7A9DAA8C25B /* PBXContainerItemProxy */; + }; + A2074A1660AEBBC7DA8071193F4C114A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = EthereumABI; + target = 888C7AD1D57FC2EBE4CF200F6BD2A842 /* EthereumABI */; + targetProxy = 2BB8C2D8D708208AFE67D85DAFD72CC9 /* PBXContainerItemProxy */; }; - 8702A31DAF7187F4D6BB1D2BAD874782 /* PBXTargetDependency */ = { + A21A883EB1BF16D519AA5DFA79834214 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Result; - target = F62AF0F0F2678A4120DFF3D5D1A1F6D5 /* Result */; - targetProxy = 72E44D1D38734BDAA138696814FAE290 /* PBXContainerItemProxy */; + name = EthereumAddress; + target = 70B9B02B65110648B14877481CCA7615 /* EthereumAddress */; + targetProxy = 4E9D74E7CDF6D61C608BA27D99B37C91 /* PBXContainerItemProxy */; }; - 94400ED4462B55D92AB3F3434EA7D441 /* PBXTargetDependency */ = { + BAF3F8AE650394F5AA5070D3BAD6EDFF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = secp256k1_swift; + target = 640B979328B6328F6325026CA79A1B22 /* secp256k1_swift */; + targetProxy = 7840D2071B0BD04D24615CAC8745B9A9 /* PBXContainerItemProxy */; + }; + BF71B09E1287BC86521296CBAB812B51 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CryptoSwift; + target = 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */; + targetProxy = DA96D27179959DC79F99D9EE1AA60AA8 /* PBXContainerItemProxy */; + }; + C881757934457307B3DA9AF12C1E1575 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SipHash; target = 7FF8752D2607B0617A8EA59CB6F52DA7 /* SipHash */; - targetProxy = A473519B9A29CED72398F6B36808B50E /* PBXContainerItemProxy */; + targetProxy = E4BE00A03DB6D1CE0B1840D2BC4765C4 /* PBXContainerItemProxy */; }; - B32AA7F0867CD31D1B04E18741BEDE96 /* PBXTargetDependency */ = { + DF954395EEFCFDA4A241AAB8CB6DF94E /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = BigInt; - target = 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */; - targetProxy = 6B03F3FEA8D4D028959A9B2C1B9E100B /* PBXContainerItemProxy */; + name = scrypt; + target = 0ED0B491AE891D6CDC3963787F0E2DB4 /* scrypt */; + targetProxy = 95CE69833B7C10A627F1F97B568336B8 /* PBXContainerItemProxy */; }; - C026F72CB82C71353BE419590756240B /* PBXTargetDependency */ = { + E9979F57AA0621BF78F8CA61114E653E /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = BigInt; target = 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */; - targetProxy = 54CE60A631318530EC3EC73D61B6BF60 /* PBXContainerItemProxy */; + targetProxy = 078BF1DF3ACB457691AF40DF07987ECE /* PBXContainerItemProxy */; }; - C527D0F9FEA1E852F1597014B62CE77D /* PBXTargetDependency */ = { + F296F7677DABEE8C3716D1CAD280BAFD /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = scrypt; - target = E73E959E8118EB238220F62E6A1C4FF3 /* scrypt */; - targetProxy = 98EB692C3E543D16FF724F2E782AB9AA /* PBXContainerItemProxy */; + name = CryptoSwift; + target = 6F5F8CED7C3379A0404E745819F8B311 /* CryptoSwift */; + targetProxy = 94EDB502D6BC3D651C1D4E9B20E840B5 /* PBXContainerItemProxy */; }; - D13DF1F08437330EF8FD792AAE2BB899 /* PBXTargetDependency */ = { + F4F78566B8D7F8618A7473EFFB5954DE /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = CryptoSwift; - target = 4DACDE493E99BF92E5758A59F946A750 /* CryptoSwift */; - targetProxy = 3E577688509A0DE9BF822DC3EE993820 /* PBXContainerItemProxy */; + name = BigInt; + target = 137411A4D3CCDCAE6EE1A79271E0889C /* BigInt */; + targetProxy = E9E12D4F2CEA31E8E4AE413FDF993C2D /* PBXContainerItemProxy */; }; - DA628256DCE97DA23F30B6AFBAD16D9A /* PBXTargetDependency */ = { + FF8F1A79C4A5A7B36C60ECDADF87FD76 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = secp256k1_ios; - target = 9E6F6DA258BB741707AF260991406A45 /* secp256k1_ios */; - targetProxy = 9769A826E3FD68B3650DDA4A69C7DEF8 /* PBXContainerItemProxy */; + name = PromiseKit; + target = DD6DF1A42DE8BB0017BCCD871EA0F04D /* PromiseKit */; + targetProxy = DBD880B87E9DC4E7563E385D2DCC57EC /* PBXContainerItemProxy */; + }; + FFB2B3D2DFFAF3A27F5025F5F2421CF1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = secp256k1_swift; + target = 640B979328B6328F6325026CA79A1B22 /* secp256k1_swift */; + targetProxy = 87FDCF4A0EA92BECA46C016EA459BEAE /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 22BFD353FD2E75D1195D2CE8BA4C60C0 /* Debug */ = { + 08B0394D5F17A9F046DC0719C25BA452 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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_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 = 9.0; + 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 = 4.2; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + 0CDA6A3860506514D2FCA89528D0FB0B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7953FD02CB8930FFAF01F2D9C9032454 /* CryptoSwift.xcconfig */; + baseConfigurationReference = FCF992981B15E8A639208AFD0BC42E16 /* EthereumABI.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2343,28 +2689,27 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift/CryptoSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/CryptoSwift/CryptoSwift-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/EthereumABI/EthereumABI-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/EthereumABI/EthereumABI-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/CryptoSwift/CryptoSwift.modulemap"; - PRODUCT_MODULE_NAME = CryptoSwift; - PRODUCT_NAME = CryptoSwift; + MODULEMAP_FILE = "Target Support Files/EthereumABI/EthereumABI.modulemap"; + PRODUCT_MODULE_NAME = EthereumABI; + PRODUCT_NAME = EthereumABI; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 346E702BF8BE9A6F8A72F3AF3D31FCAA /* Debug */ = { + 0F3AB8214DDECE3D5C0595937D391234 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E98004D90CCD1AE45753F3C16B45091F /* scrypt.xcconfig */; + baseConfigurationReference = FCF992981B15E8A639208AFD0BC42E16 /* EthereumABI.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2375,30 +2720,29 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/scrypt/scrypt-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/scrypt/scrypt-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/EthereumABI/EthereumABI-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/EthereumABI/EthereumABI-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/scrypt/scrypt.modulemap"; - PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = scrypt; + MODULEMAP_FILE = "Target Support Files/EthereumABI/EthereumABI.modulemap"; + PRODUCT_MODULE_NAME = EthereumABI; + PRODUCT_NAME = EthereumABI; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 4ED436FE91391203C89FAA8D01404101 /* Release */ = { + 15FE65A30BE8C48DE22C7B79FF048B4E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 50ABF7F2053D09965350B67F7E0E76E2 /* Pods-web3swiftExample.release.xcconfig */; + baseConfigurationReference = 900BF76676BA8D9C9EE025EFBFF7DB36 /* web3swift.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2408,21 +2752,18 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/web3swift/web3swift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/web3swift/web3swift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + MODULEMAP_FILE = "Target Support Files/web3swift/web3swift.modulemap"; + PRODUCT_MODULE_NAME = Web3swift; + PRODUCT_NAME = Web3swift; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -2430,9 +2771,9 @@ }; name = Release; }; - 562A447947920D74133BA290E544F380 /* Release */ = { + 2F7D61A442C37889C3A779F5DF14BBCC /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AC0A8F0EF2B67D8E377186D1D70E8F97 /* secp256k1_ios.xcconfig */; + baseConfigurationReference = 22044D50374EB3808D2F5A905DD1D63C /* BigInt.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2443,14 +2784,14 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/secp256k1_ios/secp256k1_ios-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/secp256k1_ios/secp256k1_ios-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/BigInt/BigInt-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/BigInt/BigInt-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/secp256k1_ios/secp256k1_ios.modulemap"; - PRODUCT_MODULE_NAME = secp256k1_ios; - PRODUCT_NAME = secp256k1_ios; + MODULEMAP_FILE = "Target Support Files/BigInt/BigInt.modulemap"; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = BigInt; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; @@ -2462,9 +2803,9 @@ }; name = Release; }; - 5D79E193E09CFB30A0B55169310F7DB3 /* Release */ = { + 4A42A7D9809B818B92AA22ED8453D3A5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4F92E92F01ED8E6C9F66CB063E0B54DD /* web3swift.xcconfig */; + baseConfigurationReference = 1160128225B85906623514D7D7090ECB /* CryptoSwift.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2475,20 +2816,18 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/web3swift/web3swift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/web3swift/web3swift-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift/CryptoSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CryptoSwift/CryptoSwift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/web3swift/web3swift.modulemap"; - PRODUCT_MODULE_NAME = web3swift; - PRODUCT_NAME = web3swift; + MODULEMAP_FILE = "Target Support Files/CryptoSwift/CryptoSwift.modulemap"; + PRODUCT_MODULE_NAME = CryptoSwift; + PRODUCT_NAME = CryptoSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.1; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -2496,9 +2835,9 @@ }; name = Release; }; - 5DAA8CBD345EE6BEE88C778C5CF7FA29 /* Release */ = { + 54205352F5416DEC755C82630AEF5741 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 77A70D9FDCE012F5EE544AB6DF184E74 /* PromiseKit.xcconfig */; + baseConfigurationReference = C870B1A3D456FD4314DD4C0607A42610 /* SipHash.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2509,94 +2848,92 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PromiseKit/PromiseKit-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/SipHash/SipHash-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SipHash/SipHash-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PromiseKit/PromiseKit.modulemap"; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = PromiseKit; + MODULEMAP_FILE = "Target Support Files/SipHash/SipHash.modulemap"; + PRODUCT_MODULE_NAME = SipHash; + PRODUCT_NAME = SipHash; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 560AFC0BB3FFAEAE9E60EC865CF22397 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 50ABF7F2053D09965350B67F7E0E76E2 /* Pods-web3swiftExample.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "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-web3swiftExample/Pods-web3swiftExample-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample.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; }; - 60DAF49CA7A9F362148D49C3C3123B2A /* Debug */ = { + 8267393F9477944D32556B9E595D5BA5 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = C155FBFE5C0783AAC41449CB2DC87E51 /* scrypt.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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_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; - CODE_SIGNING_ALLOWED = NO; - CODE_SIGNING_REQUIRED = NO; - 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; + CODE_SIGN_IDENTITY = ""; + "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/scrypt/scrypt-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/scrypt/scrypt-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - 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; - SYMROOT = "${SRCROOT}/../build"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/scrypt/scrypt.modulemap"; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = scrypt; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 6FB81CF2DD2330D2DE32686A87AB4265 /* Debug */ = { + 91CA798C82736B53D80617B2E8CD6D64 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AC0A8F0EF2B67D8E377186D1D70E8F97 /* secp256k1_ios.xcconfig */; + baseConfigurationReference = 9F82B4DF8F6B62E706B8BDDEB0749787 /* secp256k1_swift.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2607,25 +2944,26 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/secp256k1_ios/secp256k1_ios-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/secp256k1_ios/secp256k1_ios-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift/secp256k1_swift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/secp256k1_swift/secp256k1_swift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/secp256k1_ios/secp256k1_ios.modulemap"; - PRODUCT_MODULE_NAME = secp256k1_ios; - PRODUCT_NAME = secp256k1_ios; + MODULEMAP_FILE = "Target Support Files/secp256k1_swift/secp256k1_swift.modulemap"; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = secp256k1_swift; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 72104AC0EEC91461B4E91615AC45F74D /* Debug */ = { + 95FE2A6DE1E23E131C792BA9EABEF082 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 0D68B54C72B7D5CE7C1E985C3B853442 /* Pods-web3swiftExample.debug.xcconfig */; buildSettings = { @@ -2652,17 +2990,47 @@ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Debug; + }; + 96D0DEBF2E2CD68EC102556D45CAFE25 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C155FBFE5C0783AAC41449CB2DC87E51 /* scrypt.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "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/scrypt/scrypt-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/scrypt/scrypt-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/scrypt/scrypt.modulemap"; + PRODUCT_MODULE_NAME = scrypt; + PRODUCT_NAME = scrypt; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; }; - B2A143E70C84D9EF7E583D4309271D6E /* Debug */ = { + 999DC560BE1FAFC3AB7F8A2E04E1BFBD /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4F92E92F01ED8E6C9F66CB063E0B54DD /* web3swift.xcconfig */; + baseConfigurationReference = C3E5F4E53C7409FF85C72B92885F1280 /* EthereumAddress.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2673,18 +3041,17 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/web3swift/web3swift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/web3swift/web3swift-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/EthereumAddress/EthereumAddress-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/EthereumAddress/EthereumAddress-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/web3swift/web3swift.modulemap"; - PRODUCT_MODULE_NAME = web3swift; - PRODUCT_NAME = web3swift; + MODULEMAP_FILE = "Target Support Files/EthereumAddress/EthereumAddress.modulemap"; + PRODUCT_MODULE_NAME = EthereumAddress; + PRODUCT_NAME = EthereumAddress; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -2692,9 +3059,9 @@ }; name = Debug; }; - BF71DBEE44C46591CDADBD2FA5066747 /* Debug */ = { + A5FC6D0EBE5F98DB81159530F9893873 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0AFDC4CB49065D6F6886804C0A0D945D /* Result.xcconfig */; + baseConfigurationReference = 18496389CA5CA7BCFD42408FBE3EFA35 /* PromiseKit.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2705,18 +3072,17 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Result/Result-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PromiseKit/PromiseKit-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; - PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = Result; + MODULEMAP_FILE = "Target Support Files/PromiseKit/PromiseKit.modulemap"; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = PromiseKit; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -2724,68 +3090,9 @@ }; name = Debug; }; - C4EAA84F44D044E108500A81C635F21E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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_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; - CODE_SIGNING_ALLOWED = NO; - CODE_SIGNING_REQUIRED = NO; - 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 = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - C6DEF0B21460D49D96BE1AF8E63761E3 /* Release */ = { + C4A978225C5D00963017B4F329C22E9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0AFDC4CB49065D6F6886804C0A0D945D /* Result.xcconfig */; + baseConfigurationReference = C71613C4CE6D47BE330CC73E165FEDC6 /* SwiftRLP.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2796,20 +3103,18 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Result/Result-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP/SwiftRLP-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftRLP/SwiftRLP-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; - PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = Result; + MODULEMAP_FILE = "Target Support Files/SwiftRLP/SwiftRLP.modulemap"; + PRODUCT_MODULE_NAME = SwiftRLP; + PRODUCT_NAME = SwiftRLP; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -2817,9 +3122,9 @@ }; name = Release; }; - D31B85A8B6B04586722894DEA839BC4C /* Debug */ = { + C937AE553FF57C1152FDDEBFA17FAD95 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3842DFFAA24909073D4F960DC6AAF02B /* SipHash.xcconfig */; + baseConfigurationReference = C870B1A3D456FD4314DD4C0607A42610 /* SipHash.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2841,17 +3146,17 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - DE18D48AABF15E4D829A595909585E47 /* Debug */ = { + C945FC560F4FD7CEEDE0D3570AFAE8A2 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 77A70D9FDCE012F5EE544AB6DF184E74 /* PromiseKit.xcconfig */; + baseConfigurationReference = 1160128225B85906623514D7D7090ECB /* CryptoSwift.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2862,28 +3167,27 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PromiseKit/PromiseKit-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift/CryptoSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CryptoSwift/CryptoSwift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PromiseKit/PromiseKit.modulemap"; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = PromiseKit; + MODULEMAP_FILE = "Target Support Files/CryptoSwift/CryptoSwift.modulemap"; + PRODUCT_MODULE_NAME = CryptoSwift; + PRODUCT_NAME = CryptoSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - DE2ECB16DFC700CDD5707D573C1D6146 /* Release */ = { + C97472BDDF6E42853CFE85023853ED02 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3842DFFAA24909073D4F960DC6AAF02B /* SipHash.xcconfig */; + baseConfigurationReference = 9F82B4DF8F6B62E706B8BDDEB0749787 /* secp256k1_swift.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2894,30 +3198,27 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/SipHash/SipHash-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SipHash/SipHash-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/secp256k1_swift/secp256k1_swift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/secp256k1_swift/secp256k1_swift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/SipHash/SipHash.modulemap"; - PRODUCT_MODULE_NAME = SipHash; - PRODUCT_NAME = SipHash; + MODULEMAP_FILE = "Target Support Files/secp256k1_swift/secp256k1_swift.modulemap"; + PRODUCT_MODULE_NAME = secp256k1_swift; + PRODUCT_NAME = secp256k1_swift; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - E1AD579831BD3594CA169600FC965C29 /* Release */ = { + D87F2FCA56E76D57E7F6C88379A51A14 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9777D406113094F2B17BC4424F7329BB /* BigInt.xcconfig */; + baseConfigurationReference = C71613C4CE6D47BE330CC73E165FEDC6 /* SwiftRLP.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2928,30 +3229,27 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/BigInt/BigInt-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/BigInt/BigInt-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/SwiftRLP/SwiftRLP-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftRLP/SwiftRLP-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/BigInt/BigInt.modulemap"; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = BigInt; + MODULEMAP_FILE = "Target Support Files/SwiftRLP/SwiftRLP.modulemap"; + PRODUCT_MODULE_NAME = SwiftRLP; + PRODUCT_NAME = SwiftRLP; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - E5F0347BC0E158FE2D8732C36A1ABD94 /* Release */ = { + E4F13D11780806EB70D82D1A5277FDB4 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E98004D90CCD1AE45753F3C16B45091F /* scrypt.xcconfig */; + baseConfigurationReference = 900BF76676BA8D9C9EE025EFBFF7DB36 /* web3swift.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2962,30 +3260,87 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/scrypt/scrypt-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/scrypt/scrypt-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/web3swift/web3swift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/web3swift/web3swift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/scrypt/scrypt.modulemap"; - PRODUCT_MODULE_NAME = scrypt; - PRODUCT_NAME = scrypt; + MODULEMAP_FILE = "Target Support Files/web3swift/web3swift.modulemap"; + PRODUCT_MODULE_NAME = Web3swift; + PRODUCT_NAME = Web3swift; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; + name = Debug; + }; + E82C56363775B4EF468FF2AD9A2F5414 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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_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 = 9.0; + 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 = 4.2; + SYMROOT = "${SRCROOT}/../build"; + }; name = Release; }; - F3C67B847ABB560AB5A652532B057429 /* Debug */ = { + F4A473D136B0012EB85E8EB6881AAC5C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9777D406113094F2B17BC4424F7329BB /* BigInt.xcconfig */; + baseConfigurationReference = 18496389CA5CA7BCFD42408FBE3EFA35 /* PromiseKit.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2996,28 +3351,28 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/BigInt/BigInt-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/BigInt/BigInt-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PromiseKit/PromiseKit-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/BigInt/BigInt.modulemap"; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = BigInt; + MODULEMAP_FILE = "Target Support Files/PromiseKit/PromiseKit.modulemap"; + PRODUCT_MODULE_NAME = PromiseKit; + PRODUCT_NAME = PromiseKit; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - FDA8F32BB0286929FAFB34336D462173 /* Release */ = { + FA8F9940C3F6728CB81B9E90432067F2 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7953FD02CB8930FFAF01F2D9C9032454 /* CryptoSwift.xcconfig */; + baseConfigurationReference = C3E5F4E53C7409FF85C72B92885F1280 /* EthereumAddress.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -3028,20 +3383,18 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/CryptoSwift/CryptoSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/CryptoSwift/CryptoSwift-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/EthereumAddress/EthereumAddress-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/EthereumAddress/EthereumAddress-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/CryptoSwift/CryptoSwift.modulemap"; - PRODUCT_MODULE_NAME = CryptoSwift; - PRODUCT_NAME = CryptoSwift; + MODULEMAP_FILE = "Target Support Files/EthereumAddress/EthereumAddress.modulemap"; + PRODUCT_MODULE_NAME = EthereumAddress; + PRODUCT_NAME = EthereumAddress; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 4.1; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -3049,14 +3402,45 @@ }; name = Release; }; + FF0281C0EFC841F7CDBF85EA9D481F21 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 22044D50374EB3808D2F5A905DD1D63C /* BigInt.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "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/BigInt-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/BigInt/BigInt-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/BigInt/BigInt.modulemap"; + PRODUCT_MODULE_NAME = BigInt; + PRODUCT_NAME = BigInt; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 106FD454C475C642689D0E228E11702F /* Build configuration list for PBXNativeTarget "Result" */ = { + 0639662C632CDF2297369DF6E66E9D8C /* Build configuration list for PBXNativeTarget "EthereumABI" */ = { isa = XCConfigurationList; buildConfigurations = ( - BF71DBEE44C46591CDADBD2FA5066747 /* Debug */, - C6DEF0B21460D49D96BE1AF8E63761E3 /* Release */, + 0CDA6A3860506514D2FCA89528D0FB0B /* Debug */, + 0F3AB8214DDECE3D5C0595937D391234 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -3064,8 +3448,8 @@ 18A84A1682CD37CFA0F42453F6BF95C9 /* Build configuration list for PBXNativeTarget "SipHash" */ = { isa = XCConfigurationList; buildConfigurations = ( - D31B85A8B6B04586722894DEA839BC4C /* Debug */, - DE2ECB16DFC700CDD5707D573C1D6146 /* Release */, + 54205352F5416DEC755C82630AEF5741 /* Debug */, + C937AE553FF57C1152FDDEBFA17FAD95 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -3073,71 +3457,89 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 60DAF49CA7A9F362148D49C3C3123B2A /* Debug */, - C4EAA84F44D044E108500A81C635F21E /* Release */, + 08B0394D5F17A9F046DC0719C25BA452 /* Debug */, + E82C56363775B4EF468FF2AD9A2F5414 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 522F15B552D0CFCBB8487B55119183C6 /* Build configuration list for PBXNativeTarget "CryptoSwift" */ = { + 33565CE9A008BC2D28F678145BCCC377 /* Build configuration list for PBXNativeTarget "EthereumAddress" */ = { isa = XCConfigurationList; buildConfigurations = ( - 22BFD353FD2E75D1195D2CE8BA4C60C0 /* Debug */, - FDA8F32BB0286929FAFB34336D462173 /* Release */, + 999DC560BE1FAFC3AB7F8A2E04E1BFBD /* Debug */, + FA8F9940C3F6728CB81B9E90432067F2 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 5DD4B9BDB2D8AEE1E1AEF935797DDFC4 /* Build configuration list for PBXNativeTarget "secp256k1_ios" */ = { + 64983011E689E8B1A79C910DC9586585 /* Build configuration list for PBXNativeTarget "BigInt" */ = { isa = XCConfigurationList; buildConfigurations = ( - 6FB81CF2DD2330D2DE32686A87AB4265 /* Debug */, - 562A447947920D74133BA290E544F380 /* Release */, + FF0281C0EFC841F7CDBF85EA9D481F21 /* Debug */, + 2F7D61A442C37889C3A779F5DF14BBCC /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 64983011E689E8B1A79C910DC9586585 /* Build configuration list for PBXNativeTarget "BigInt" */ = { + 8292BE0D9164B6CA74EDE2D0B4A9C609 /* Build configuration list for PBXNativeTarget "CryptoSwift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C945FC560F4FD7CEEDE0D3570AFAE8A2 /* Debug */, + 4A42A7D9809B818B92AA22ED8453D3A5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 847C860E5C8C46156BEC16FAF215BA10 /* Build configuration list for PBXNativeTarget "SwiftRLP" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D87F2FCA56E76D57E7F6C88379A51A14 /* Debug */, + C4A978225C5D00963017B4F329C22E9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9018BA916CE44A089CB188ACBC3183A1 /* Build configuration list for PBXNativeTarget "web3swift" */ = { isa = XCConfigurationList; buildConfigurations = ( - F3C67B847ABB560AB5A652532B057429 /* Debug */, - E1AD579831BD3594CA169600FC965C29 /* Release */, + E4F13D11780806EB70D82D1A5277FDB4 /* Debug */, + 15FE65A30BE8C48DE22C7B79FF048B4E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - C5C5AC318E00D7989B0E7723942D7F8D /* Build configuration list for PBXNativeTarget "Pods-web3swiftExample" */ = { + A6E58A79C2F9A35AEE755C5EE9939C14 /* Build configuration list for PBXNativeTarget "scrypt" */ = { isa = XCConfigurationList; buildConfigurations = ( - 72104AC0EEC91461B4E91615AC45F74D /* Debug */, - 4ED436FE91391203C89FAA8D01404101 /* Release */, + 8267393F9477944D32556B9E595D5BA5 /* Debug */, + 96D0DEBF2E2CD68EC102556D45CAFE25 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - CF44C399FCFA5E9B656CA1C56407BE66 /* Build configuration list for PBXNativeTarget "scrypt" */ = { + A9C5C85EB3A3102926F51BA14F3D5C13 /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { isa = XCConfigurationList; buildConfigurations = ( - 346E702BF8BE9A6F8A72F3AF3D31FCAA /* Debug */, - E5F0347BC0E158FE2D8732C36A1ABD94 /* Release */, + A5FC6D0EBE5F98DB81159530F9893873 /* Debug */, + F4A473D136B0012EB85E8EB6881AAC5C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - D73236CD3ACDF90803371F7E6C65A9DA /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { + C991C998C17793DAA7BA2414E0DF3A40 /* Build configuration list for PBXNativeTarget "Pods-web3swiftExample" */ = { isa = XCConfigurationList; buildConfigurations = ( - DE18D48AABF15E4D829A595909585E47 /* Debug */, - 5DAA8CBD345EE6BEE88C778C5CF7FA29 /* Release */, + 95FE2A6DE1E23E131C792BA9EABEF082 /* Debug */, + 560AFC0BB3FFAEAE9E60EC865CF22397 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - F433FF5D09BB9F7450B0FEEBCDA6FA68 /* Build configuration list for PBXNativeTarget "web3swift" */ = { + DF74D3830F0F5F54523C9A5F5585D755 /* Build configuration list for PBXNativeTarget "secp256k1_swift" */ = { isa = XCConfigurationList; buildConfigurations = ( - B2A143E70C84D9EF7E583D4309271D6E /* Debug */, - 5D79E193E09CFB30A0B55169310F7DB3 /* Release */, + C97472BDDF6E42853CFE85023853ED02 /* Debug */, + 91CA798C82736B53D80617B2E8CD6D64 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/web3swiftExample/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.m b/Example/web3swiftExample/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.m index bfabd6157..beae27758 100644 --- a/Example/web3swiftExample/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.m +++ b/Example/web3swiftExample/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.m @@ -37,7 +37,20 @@ - (AnyPromise *)promise { resolve([NSError errorWithDomain:PMKErrorDomain code:PMKTaskError userInfo:info]); } }; - [self launch]; + + #if __clang_major__ >= 9 + if (@available(macOS 10.13, *)) { + NSError *error = nil; + + if (![self launchAndReturnError:&error]) { + resolve(error); + } + } else { + [self launch]; + } + #else + [self launch]; // might @throw + #endif }]; } diff --git a/Example/web3swiftExample/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+Promise.swift b/Example/web3swiftExample/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+Promise.swift index 926eadf07..13259a0c0 100644 --- a/Example/web3swiftExample/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+Promise.swift +++ b/Example/web3swiftExample/Pods/PromiseKit/Extensions/Foundation/Sources/NSURLSession+Promise.swift @@ -183,12 +183,14 @@ public enum PMKHTTPError: Error, LocalizedError, CustomStringConvertible { } } +#if swift(>=4.0) public func decodeResponse(_ t: T.Type, decoder: JSONDecoder = JSONDecoder()) -> T? { switch self { case .badStatusCode(_, let data, _): return try? decoder.decode(t, from: data) } } +#endif //TODO rename responseJSON public var jsonDictionary: Any? { diff --git a/Example/web3swiftExample/Pods/PromiseKit/Extensions/Foundation/Sources/Process+Promise.swift b/Example/web3swiftExample/Pods/PromiseKit/Extensions/Foundation/Sources/Process+Promise.swift index 044847514..03cab3cfe 100644 --- a/Example/web3swiftExample/Pods/PromiseKit/Extensions/Foundation/Sources/Process+Promise.swift +++ b/Example/web3swiftExample/Pods/PromiseKit/Extensions/Foundation/Sources/Process+Promise.swift @@ -72,20 +72,64 @@ extension Process { self.waitUntilExit() guard self.terminationReason == .exit, self.terminationStatus == 0 else { - return seal.reject(PMKError.execution(self)) + let stdoutData = try? self.readDataFromPipe(stdout) + let stderrData = try? self.readDataFromPipe(stderr) + + let stdoutString = stdoutData.flatMap { (data: Data) -> String? in String(data: data, encoding: .utf8) } + let stderrString = stderrData.flatMap { (data: Data) -> String? in String(data: data, encoding: .utf8) } + + return seal.reject(PMKError.execution(process: self, standardOutput: stdoutString, standardError: stderrString)) } seal.fulfill((stdout, stderr)) } } } + private func readDataFromPipe(_ pipe: Pipe) throws -> Data { + let handle = pipe.fileHandleForReading + defer { handle.closeFile() } + + // Someday, NSFileHandle will probably be updated with throwing equivalents to its read and write methods, + // as NSTask has, to avoid raising exceptions and crashing the app. + // Unfortunately that day has not yet come, so use the underlying BSD calls for now. + + let fd = handle.fileDescriptor + + let bufsize = 1024 * 8 + let buf = UnsafeMutablePointer.allocate(capacity: bufsize) + + #if swift(>=4.1) + defer { buf.deallocate() } + #else + defer { buf.deallocate(capacity: bufsize) } + #endif + + var data = Data() + + while true { + let bytesRead = read(fd, buf, bufsize) + + if bytesRead == 0 { + break + } + + if bytesRead < 0 { + throw POSIXError.Code(rawValue: errno).map { POSIXError($0) } ?? CocoaError(.fileReadUnknown) + } + + data.append(buf, count: bytesRead) + } + + return data + } + /** The error generated by PromiseKit’s `Process` extension */ public enum PMKError { /// NOT AVAILABLE ON 10.13 and above because Apple provide this error handling themselves case notExecutable(String?) - case execution(Process) + case execution(process: Process, standardOutput: String?, standardError: String?) } } @@ -97,7 +141,7 @@ extension Process.PMKError: LocalizedError { return "File not executable: \(path)" case .notExecutable(nil): return "No launch path specified" - case .execution(let task): + case .execution(process: let task, standardOutput: _, standardError: _): return "Failed executing: `\(task)` (\(task.terminationStatus))." } } diff --git a/Example/web3swiftExample/Pods/PromiseKit/README.md b/Example/web3swiftExample/Pods/PromiseKit/README.md index 5e6128fc7..78f555fc6 100644 --- a/Example/web3swiftExample/Pods/PromiseKit/README.md +++ b/Example/web3swiftExample/Pods/PromiseKit/README.md @@ -49,12 +49,14 @@ target "Change Me!" do end ``` +> The above gives an Xcode warning? See our [Installation Guide]. + PromiseKit 6, 5 and 4 support Xcode 8.3, 9.x and 10.0; Swift 3.1, 3.2, 3.3, 3.4, 4.0, 4.1 and 4.2; iOS, macOS, tvOS, watchOS, Linux and Android; CocoaPods, Carthage and SwiftPM; ([CI Matrix](https://travis-ci.org/mxcl/PromiseKit)). For Carthage, SwiftPM, etc., or for instructions when using older Swifts or -Xcodes, see our [Installation Guide](Documentation/Installation.md). We +Xcodes, see our [Installation Guide]. We recommend [Carthage](https://github.com/Carthage/Carthage). # Documentation @@ -169,3 +171,4 @@ if after that you still have a question, ask at our [Gitter chat channel] or on [our bug tracker]: https://github.com/mxcl/PromiseKit/issues/new [Podfile]: https://guides.cocoapods.org/syntax/podfile.html [PMK6]: http://promisekit.org/news/2018/02/PromiseKit-6.0-Released/ +[Installation Guide]: Documentation/Installation.md diff --git a/Example/web3swiftExample/Pods/PromiseKit/Sources/Error.swift b/Example/web3swiftExample/Pods/PromiseKit/Sources/Error.swift index 3249e3f44..7229e6f49 100644 --- a/Example/web3swiftExample/Pods/PromiseKit/Sources/Error.swift +++ b/Example/web3swiftExample/Pods/PromiseKit/Sources/Error.swift @@ -83,7 +83,12 @@ extension Error { } catch CocoaError.userCancelled { return true } catch { + #if os(macOS) || os(iOS) || os(tvOS) + let pair = { ($0.domain, $0.code) }(error as NSError) + return ("SKErrorDomain", 2) == pair + #else return false + #endif } } } diff --git a/Example/web3swiftExample/Pods/PromiseKit/Sources/when.swift b/Example/web3swiftExample/Pods/PromiseKit/Sources/when.swift index 59884cd2d..0913c64f3 100644 --- a/Example/web3swiftExample/Pods/PromiseKit/Sources/when.swift +++ b/Example/web3swiftExample/Pods/PromiseKit/Sources/when.swift @@ -208,7 +208,7 @@ public func when(fulfilled promiseIterator: It, concurrent /** Waits on all provided promises. - `when(fulfilled:)` rejects as soon as one of the provided promises rejects. `when(resolved:)` waits on all provided promises and **never** rejects. + `when(fulfilled:)` rejects as soon as one of the provided promises rejects. `when(resolved:)` waits on all provided promises whatever their result, and then provides an array of `Result` so you can individually inspect the results. As a consequence this function returns a `Guarantee`, ie. errors are lifted from the individual promises into the results array of the returned `Guarantee`. when(resolved: promise1, promise2, promise3).then { results in for result in results where case .fulfilled(let value) { @@ -219,15 +219,14 @@ public func when(fulfilled promiseIterator: It, concurrent } - Returns: A new promise that resolves once all the provided promises resolve. The array is ordered the same as the input, ie. the result order is *not* resolution order. - - Warning: The returned promise can *not* be rejected. - - Note: Any promises that error are implicitly consumed, your UnhandledErrorHandler will not be called. - - Remark: Doesn't take Thenable due to protocol associatedtype paradox + - Note: we do not provide tuple variants for `when(resolved:)` but will accept a pull-request + - Remark: Doesn't take Thenable due to protocol `associatedtype` paradox */ public func when(resolved promises: Promise...) -> Guarantee<[Result]> { return when(resolved: promises) } -/// Waits on all provided promises. +/// - See: `when(resolved: Promise...)` public func when(resolved promises: [Promise]) -> Guarantee<[Result]> { guard !promises.isEmpty else { return .value([]) diff --git a/Example/web3swiftExample/Pods/Result/README.md b/Example/web3swiftExample/Pods/Result/README.md deleted file mode 100644 index bf85e78df..000000000 --- a/Example/web3swiftExample/Pods/Result/README.md +++ /dev/null @@ -1,113 +0,0 @@ -# Result - -[![Build Status](https://travis-ci.org/antitypical/Result.svg?branch=master)](https://travis-ci.org/antitypical/Result) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![CocoaPods](https://img.shields.io/cocoapods/v/Result.svg)](https://cocoapods.org/) -[![Reference Status](https://www.versioneye.com/objective-c/result/reference_badge.svg?style=flat)](https://www.versioneye.com/objective-c/result/references) - -This is a Swift µframework providing `Result`. - -`Result` values are either successful (wrapping `Value`) or failed (wrapping `Error`). This is similar to Swift’s native `Optional` type: `success` is like `some`, and `failure` is like `none` except with an associated `Error` value. The addition of an associated `Error` allows errors to be passed along for logging or displaying to the user. - -Using this µframework instead of rolling your own `Result` type allows you to easily interface with other frameworks that also use `Result`. - -## Use - -Use `Result` whenever an operation has the possibility of failure. Consider the following example of a function that tries to extract a `String` for a given key from a JSON `Dictionary`. - -```swift -typealias JSONObject = [String: Any] - -enum JSONError: Error { - case noSuchKey(String) - case typeMismatch -} - -func stringForKey(json: JSONObject, key: String) -> Result { - guard let value = json[key] else { - return .failure(.noSuchKey(key)) - } - - if let value = value as? String { - return .success(value) - } - else { - return .failure(.typeMismatch) - } -} -``` - -This function provides a more robust wrapper around the default subscripting provided by `Dictionary`. Rather than return `Any?`, it returns a `Result` that either contains the `String` value for the given key, or an `ErrorType` detailing what went wrong. - -One simple way to handle a `Result` is to deconstruct it using a `switch` statement. - -```swift -switch stringForKey(json, key: "email") { - -case let .success(email): - print("The email is \(email)") - -case let .failure(.noSuchKey(key)): - print("\(key) is not a valid key") - -case .failure(.typeMismatch): - print("Didn't have the right type") -} -``` - -Using a `switch` statement allows powerful pattern matching, and ensures all possible results are covered. Swift 2.0 offers new ways to deconstruct enums like the `if-case` statement, but be wary as such methods do not ensure errors are handled. - -Other methods available for processing `Result` are detailed in the [API documentation](http://cocoadocs.org/docsets/Result/). - -## Result vs. Throws - -Swift 2.0 introduces error handling via throwing and catching `Error`. `Result` accomplishes the same goal by encapsulating the result instead of hijacking control flow. The `Result` abstraction enables powerful functionality such as `map` and `flatMap`, making `Result` more composable than `throw`. - -Since dealing with APIs that throw is common, you can convert such functions into a `Result` by using the `materialize` method. Conversely, a `Result` can be used to throw an error by calling `dematerialize`. - -## Higher Order Functions - -`map` and `flatMap` operate the same as `Optional.map` and `Optional.flatMap` except they apply to `Result`. - -`map` transforms a `Result` into a `Result` of a new type. It does this by taking a function that transforms the `Value` type into a new value. This transformation is only applied in the case of a `success`. In the case of a `failure`, the associated error is re-wrapped in the new `Result`. - -```swift -// transforms a Result to a Result -let idResult = intForKey(json, key:"id").map { id in String(id) } -``` - -Here, the final result is either the id as a `String`, or carries over the `failure` from the previous result. - -`flatMap` is similar to `map` in that it transforms the `Result` into another `Result`. However, the function passed into `flatMap` must return a `Result`. - -An in depth discussion of `map` and `flatMap` is beyond the scope of this documentation. If you would like a deeper understanding, read about functors and monads. This article is a good place to [start](http://www.javiersoto.me/post/106875422394). - -## Integration - -### Carthage - -1. Add this repository as a submodule and/or [add it to your Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile) if you’re using [carthage](https://github.com/Carthage/Carthage/) to manage your dependencies. -2. Drag `Result.xcodeproj` into your project or workspace. -3. Link your target against `Result.framework`. -4. Application targets should ensure that the framework gets copied into their application bundle. (Framework targets should instead require the application linking them to include Result.) - -### Cocoapods - -```ruby -pod 'Result', '~> 3.0.0' -``` - -### Swift Package Manager - -```swift -import PackageDescription - -let package = Package( - name: "MyProject", - targets: [], - dependencies: [ - .Package(url: "https://github.com/antitypical/Result.git", - majorVersion: 3) - ] -) -``` diff --git a/Example/web3swiftExample/Pods/Result/Result/AnyError.swift b/Example/web3swiftExample/Pods/Result/Result/AnyError.swift deleted file mode 100644 index ee018d277..000000000 --- a/Example/web3swiftExample/Pods/Result/Result/AnyError.swift +++ /dev/null @@ -1,46 +0,0 @@ -import Foundation - -/// A type-erased error which wraps an arbitrary error instance. This should be -/// useful for generic contexts. -public struct AnyError: Swift.Error { - /// The underlying error. - public let error: Swift.Error - - public init(_ error: Swift.Error) { - if let anyError = error as? AnyError { - self = anyError - } else { - self.error = error - } - } -} - -extension AnyError: ErrorConvertible { - public static func error(from error: Error) -> AnyError { - return AnyError(error) - } -} - -extension AnyError: CustomStringConvertible { - public var description: String { - return String(describing: error) - } -} - -extension AnyError: LocalizedError { - public var errorDescription: String? { - return error.localizedDescription - } - - public var failureReason: String? { - return (error as? LocalizedError)?.failureReason - } - - public var helpAnchor: String? { - return (error as? LocalizedError)?.helpAnchor - } - - public var recoverySuggestion: String? { - return (error as? LocalizedError)?.recoverySuggestion - } -} diff --git a/Example/web3swiftExample/Pods/Result/Result/NoError.swift b/Example/web3swiftExample/Pods/Result/Result/NoError.swift deleted file mode 100644 index a919f510b..000000000 --- a/Example/web3swiftExample/Pods/Result/Result/NoError.swift +++ /dev/null @@ -1,10 +0,0 @@ -/// An “error” that is impossible to construct. -/// -/// This can be used to describe `Result`s where failures will never -/// be generated. For example, `Result` describes a result that -/// contains an `Int`eger and is guaranteed never to be a `failure`. -public enum NoError: Swift.Error, Equatable { - public static func ==(lhs: NoError, rhs: NoError) -> Bool { - return true - } -} diff --git a/Example/web3swiftExample/Pods/Result/Result/Result.swift b/Example/web3swiftExample/Pods/Result/Result/Result.swift deleted file mode 100644 index de0330a4a..000000000 --- a/Example/web3swiftExample/Pods/Result/Result/Result.swift +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) 2015 Rob Rix. All rights reserved. - -/// An enum representing either a failure with an explanatory error, or a success with a result value. -public enum Result: ResultProtocol, CustomStringConvertible, CustomDebugStringConvertible { - case success(Value) - case failure(Error) - - // MARK: Constructors - - /// Constructs a success wrapping a `value`. - public init(value: Value) { - self = .success(value) - } - - /// Constructs a failure wrapping an `error`. - public init(error: Error) { - self = .failure(error) - } - - /// Constructs a result from an `Optional`, failing with `Error` if `nil`. - public init(_ value: Value?, failWith: @autoclosure () -> Error) { - self = value.map(Result.success) ?? .failure(failWith()) - } - - /// Constructs a result from a function that uses `throw`, failing with `Error` if throws. - public init(_ f: @autoclosure () throws -> Value) { - self.init(attempt: f) - } - - /// Constructs a result from a function that uses `throw`, failing with `Error` if throws. - public init(attempt f: () throws -> Value) { - do { - self = .success(try f()) - } catch var error { - if Error.self == AnyError.self { - error = AnyError(error) - } - self = .failure(error as! Error) - } - } - - // MARK: Deconstruction - - /// Returns the value from `success` Results or `throw`s the error. - public func dematerialize() throws -> Value { - switch self { - case let .success(value): - return value - case let .failure(error): - throw error - } - } - - /// Case analysis for Result. - /// - /// Returns the value produced by applying `ifFailure` to `failure` Results, or `ifSuccess` to `success` Results. - public func analysis(ifSuccess: (Value) -> Result, ifFailure: (Error) -> Result) -> Result { - switch self { - case let .success(value): - return ifSuccess(value) - case let .failure(value): - return ifFailure(value) - } - } - - // MARK: Errors - - /// The domain for errors constructed by Result. - public static var errorDomain: String { return "com.antitypical.Result" } - - /// The userInfo key for source functions in errors constructed by Result. - public static var functionKey: String { return "\(errorDomain).function" } - - /// The userInfo key for source file paths in errors constructed by Result. - public static var fileKey: String { return "\(errorDomain).file" } - - /// The userInfo key for source file line numbers in errors constructed by Result. - public static var lineKey: String { return "\(errorDomain).line" } - - /// Constructs an error. - public static func error(_ message: String? = nil, function: String = #function, file: String = #file, line: Int = #line) -> NSError { - var userInfo: [String: Any] = [ - functionKey: function, - fileKey: file, - lineKey: line, - ] - - if let message = message { - userInfo[NSLocalizedDescriptionKey] = message - } - - return NSError(domain: errorDomain, code: 0, userInfo: userInfo) - } - - - // MARK: CustomStringConvertible - - public var description: String { - switch self { - case let .success(value): return ".success(\(value))" - case let .failure(error): return ".failure(\(error))" - } - } - - - // MARK: CustomDebugStringConvertible - - public var debugDescription: String { - return description - } - - // MARK: ResultProtocol - public var result: Result { - return self - } -} - -extension Result where Error == AnyError { - /// Constructs a result from an expression that uses `throw`, failing with `AnyError` if throws. - public init(_ f: @autoclosure () throws -> Value) { - self.init(attempt: f) - } - - /// Constructs a result from a closure that uses `throw`, failing with `AnyError` if throws. - public init(attempt f: () throws -> Value) { - do { - self = .success(try f()) - } catch { - self = .failure(AnyError(error)) - } - } -} - -// MARK: - Derive result from failable closure - -@available(*, deprecated, renamed: "Result.init(attempt:)") -public func materialize(_ f: () throws -> T) -> Result { - return Result(attempt: f) -} - -@available(*, deprecated, renamed: "Result.init(_:)") -public func materialize(_ f: @autoclosure () throws -> T) -> Result { - return Result(f) -} - -// MARK: - ErrorConvertible conformance - -extension NSError: ErrorConvertible { - public static func error(from error: Swift.Error) -> Self { - func cast(_ error: Swift.Error) -> T { - return error as! T - } - - return cast(error) - } -} - -// MARK: - migration support - -@available(*, unavailable, message: "Use the overload which returns `Result` instead") -public func materialize(_ f: () throws -> T) -> Result { - fatalError() -} - -@available(*, unavailable, message: "Use the overload which returns `Result` instead") -public func materialize(_ f: @autoclosure () throws -> T) -> Result { - fatalError() -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - -/// Constructs a `Result` with the result of calling `try` with an error pointer. -/// -/// This is convenient for wrapping Cocoa API which returns an object or `nil` + an error, by reference. e.g.: -/// -/// Result.try { NSData(contentsOfURL: URL, options: .dataReadingMapped, error: $0) } -@available(*, unavailable, message: "This has been removed. Use `Result.init(attempt:)` instead. See https://github.com/antitypical/Result/issues/85 for the details.") -public func `try`(_ function: String = #function, file: String = #file, line: Int = #line, `try`: (NSErrorPointer) -> T?) -> Result { - fatalError() -} - -/// Constructs a `Result` with the result of calling `try` with an error pointer. -/// -/// This is convenient for wrapping Cocoa API which returns a `Bool` + an error, by reference. e.g.: -/// -/// Result.try { NSFileManager.defaultManager().removeItemAtURL(URL, error: $0) } -@available(*, unavailable, message: "This has been removed. Use `Result.init(attempt:)` instead. See https://github.com/antitypical/Result/issues/85 for the details.") -public func `try`(_ function: String = #function, file: String = #file, line: Int = #line, `try`: (NSErrorPointer) -> Bool) -> Result<(), NSError> { - fatalError() -} - -#endif - -// MARK: - - -import Foundation diff --git a/Example/web3swiftExample/Pods/Result/Result/ResultProtocol.swift b/Example/web3swiftExample/Pods/Result/Result/ResultProtocol.swift deleted file mode 100644 index 703ad89b9..000000000 --- a/Example/web3swiftExample/Pods/Result/Result/ResultProtocol.swift +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) 2015 Rob Rix. All rights reserved. - -/// A protocol that can be used to constrain associated types as `Result`. -public protocol ResultProtocol { - associatedtype Value - associatedtype Error: Swift.Error - - init(value: Value) - init(error: Error) - - var result: Result { get } -} - -public extension Result { - /// Returns the value if self represents a success, `nil` otherwise. - public var value: Value? { - switch self { - case let .success(value): return value - case .failure: return nil - } - } - - /// Returns the error if self represents a failure, `nil` otherwise. - public var error: Error? { - switch self { - case .success: return nil - case let .failure(error): return error - } - } - - /// Returns a new Result by mapping `Success`es’ values using `transform`, or re-wrapping `Failure`s’ errors. - public func map(_ transform: (Value) -> U) -> Result { - return flatMap { .success(transform($0)) } - } - - /// Returns the result of applying `transform` to `Success`es’ values, or re-wrapping `Failure`’s errors. - public func flatMap(_ transform: (Value) -> Result) -> Result { - switch self { - case let .success(value): return transform(value) - case let .failure(error): return .failure(error) - } - } - - /// Returns a Result with a tuple of the receiver and `other` values if both - /// are `Success`es, or re-wrapping the error of the earlier `Failure`. - public func fanout(_ other: @autoclosure () -> Result) -> Result<(Value, U), Error> { - return self.flatMap { left in other().map { right in (left, right) } } - } - - /// Returns a new Result by mapping `Failure`'s values using `transform`, or re-wrapping `Success`es’ values. - public func mapError(_ transform: (Error) -> Error2) -> Result { - return flatMapError { .failure(transform($0)) } - } - - /// Returns the result of applying `transform` to `Failure`’s errors, or re-wrapping `Success`es’ values. - public func flatMapError(_ transform: (Error) -> Result) -> Result { - switch self { - case let .success(value): return .success(value) - case let .failure(error): return transform(error) - } - } - - /// Returns a new Result by mapping `Success`es’ values using `success`, and by mapping `Failure`'s values using `failure`. - public func bimap(success: (Value) -> U, failure: (Error) -> Error2) -> Result { - switch self { - case let .success(value): return .success(success(value)) - case let .failure(error): return .failure(failure(error)) - } - } -} - -public extension Result { - - // MARK: Higher-order functions - - /// Returns `self.value` if this result is a .Success, or the given value otherwise. Equivalent with `??` - public func recover(_ value: @autoclosure () -> Value) -> Value { - return self.value ?? value() - } - - /// Returns this result if it is a .Success, or the given result otherwise. Equivalent with `??` - public func recover(with result: @autoclosure () -> Result) -> Result { - switch self { - case .success: return self - case .failure: return result() - } - } -} - -/// Protocol used to constrain `tryMap` to `Result`s with compatible `Error`s. -public protocol ErrorConvertible: Swift.Error { - static func error(from error: Swift.Error) -> Self -} - -public extension Result where Error: ErrorConvertible { - - /// Returns the result of applying `transform` to `Success`es’ values, or wrapping thrown errors. - public func tryMap(_ transform: (Value) throws -> U) -> Result { - return flatMap { value in - do { - return .success(try transform(value)) - } - catch { - let convertedError = Error.error(from: error) - // Revisit this in a future version of Swift. https://twitter.com/jckarter/status/672931114944696321 - return .failure(convertedError) - } - } - } -} - -// MARK: - Operators - -extension Result where Value: Equatable, Error: Equatable { - /// Returns `true` if `left` and `right` are both `Success`es and their values are equal, or if `left` and `right` are both `Failure`s and their errors are equal. - public static func ==(left: Result, right: Result) -> Bool { - if let left = left.value, let right = right.value { - return left == right - } else if let left = left.error, let right = right.error { - return left == right - } - return false - } -} - -#if swift(>=4.1) - extension Result: Equatable where Value: Equatable, Error: Equatable { } -#else - extension Result where Value: Equatable, Error: Equatable { - /// Returns `true` if `left` and `right` represent different cases, or if they represent the same case but different values. - public static func !=(left: Result, right: Result) -> Bool { - return !(left == right) - } - } -#endif - -extension Result { - /// Returns the value of `left` if it is a `Success`, or `right` otherwise. Short-circuits. - public static func ??(left: Result, right: @autoclosure () -> Value) -> Value { - return left.recover(right()) - } - - /// Returns `left` if it is a `Success`es, or `right` otherwise. Short-circuits. - public static func ??(left: Result, right: @autoclosure () -> Result) -> Result { - return left.recover(with: right()) - } -} - -// MARK: - migration support - -@available(*, unavailable, renamed: "ErrorConvertible") -public protocol ErrorProtocolConvertible: ErrorConvertible {} diff --git a/Example/web3swiftExample/Pods/SwiftRLP/Classes/RLP.swift b/Example/web3swiftExample/Pods/SwiftRLP/Classes/RLP.swift new file mode 100644 index 000000000..86c126dfc --- /dev/null +++ b/Example/web3swiftExample/Pods/SwiftRLP/Classes/RLP.swift @@ -0,0 +1,385 @@ +// +// RLP.swift +// SwiftRLP +// +// Created by Alex Vlasov on 04/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt + +//protocol ArrayType {} +//extension Array : ArrayType {} + +public struct RLP { + enum Error: Swift.Error { + case encodingError + case decodingError + } + + static var length56 = BigUInt(UInt(56)) + static var lengthMax = (BigUInt(UInt(1)) << 256) + + internal static func encode(_ element: AnyObject) -> Data? { + if let string = element as? String { + return encode(string) + + } else if let data = element as? Data { + return encode(data) + } + else if let biguint = element as? BigUInt { + return encode(biguint) + } + return nil; + } + + internal static func encode(_ string: String) -> Data? { + if let hexData = Data.fromHex(string) { + return encode(hexData) + } + guard let data = string.data(using: .utf8) else {return nil} + return encode(data) + } + + internal static func encode(_ number: Int) -> Data? { + guard number >= 0 else {return nil} + let uint = UInt(number) + return encode(uint) + } + + internal static func encode(_ number: UInt) -> Data? { + let biguint = BigUInt(number) + return encode(biguint) + } + + internal static func encode(_ number: BigUInt) -> Data? { + let encoded = number.serialize() + return encode(encoded) + } + + internal static func encode(_ data: Data) -> Data? { + if (data.count == 1 && data.bytes[0] < UInt8(0x80)) { + return data + } else { + guard let length = encodeLength(data.count, offset: UInt8(0x80)) else {return nil} + var encoded = Data() + encoded.append(length) + encoded.append(data) + return encoded + } + } + + internal static func encodeLength(_ length: Int, offset: UInt8) -> Data? { + if (length < 0) { + return nil; + } + let bigintLength = BigUInt(UInt(length)) + return encodeLength(bigintLength, offset: offset) + } + + internal static func encodeLength(_ length: BigUInt, offset: UInt8) -> Data? { + if (length < length56) { + let encodedLength = length + BigUInt(UInt(offset)) + guard (encodedLength.bitWidth <= 8) else {return nil} + return encodedLength.serialize() + } else if (length < lengthMax) { + let encodedLength = length.serialize() + let len = BigUInt(UInt(encodedLength.count)) + guard let prefix = lengthToBinary(len) else {return nil} + let lengthPrefix = prefix + offset + UInt8(55) + var encoded = Data([lengthPrefix]) + encoded.append(encodedLength) + return encoded + } + return nil + } + + internal static func lengthToBinary(_ length: BigUInt) -> UInt8? { + if (length == 0) { + return UInt8(0) + } + let divisor = BigUInt(256) + var encoded = Data() + guard let prefix = lengthToBinary(length/divisor) else {return nil} + let suffix = length % divisor + + var prefixData = Data([prefix]) + if (prefix == UInt8(0)) { + prefixData = Data() + } + let suffixData = suffix.serialize() + + encoded.append(prefixData) + encoded.append(suffixData) + guard encoded.count == 1 else {return nil} + return encoded.bytes[0] + } + + public static func encode(_ elements: Array) -> Data? { + var encodedData = Data() + for e in elements { + if let encoded = encode(e) { + encodedData.append(encoded) + } else { + guard let asArray = e as? Array else {return nil} + guard let encoded = encode(asArray) else {return nil} + encodedData.append(encoded) + } + } + guard var encodedLength = encodeLength(encodedData.count, offset: UInt8(0xc0)) else {return nil} + if (encodedLength != Data()) { + encodedLength.append(encodedData) + } + return encodedLength + } + + public static func decode(_ raw: String) -> RLPItem? { + guard let rawData = Data.fromHex(raw) else {return nil} + return decode(rawData) + } + + public static func decode(_ raw: Data) -> RLPItem? { + if raw.count == 0 { + return RLPItem.noItem + } + var outputArray = [RLPItem]() + var bytesToParse = Data(raw) + while bytesToParse.count != 0 { + let (of, dl, t) = decodeLength(bytesToParse) + guard let offset = of, let dataLength = dl, let type = t else {return nil} + switch type { + case .empty: + break + case .data: + guard let slice = try? slice(data: bytesToParse, offset: offset, length: dataLength) else {return nil} + let data = Data(slice) + let rlpItem = RLPItem.init(content: .data(data)) + outputArray.append(rlpItem) + case .list: + guard let slice = try? slice(data: bytesToParse, offset: offset, length: dataLength) else {return nil} + guard let inside = decode(Data(slice)) else {return nil} + switch inside.content { + case .data(_): + return nil + default: + outputArray.append(inside) + } + } + guard let tail = try? slice(data: bytesToParse, start: offset + dataLength) else {return nil} + bytesToParse = tail + } + return RLPItem.init(content: .list(outputArray, 0, Data(raw))) + } + + public struct RLPItem { + + enum UnderlyingType { + case empty + case data + case list + } + + public enum RLPContent { + case noItem + case data(Data) + indirect case list([RLPItem], Int, Data) + } + + public var content: RLPContent + + public var isData: Bool { + switch self.content { + case .noItem: + return false + case .data(_): + return true + case .list(_): + return false + } + } + + public var isList: Bool { + switch self.content { + case .noItem: + return false + case .data(_): + return false + case .list(_): + return true + } + } + public var count: Int? { + switch self.content { + case .noItem: + return nil + case .data(_): + return nil + case .list(let list, _, _): + return list.count + } + } + // public var hasNext: Bool { + // switch self.content { + // case .noItem: + // return false + // case .data(_): + // return false + // case .list(let list, let counter, _): + // return list.count > counter + // } + // } + + public subscript(index: Int) -> RLPItem? { + get { + // guard self.hasNext else {return nil} + guard case .list(let list, _, _) = self.content else {return nil} + let item = list[index] + return item + } + } + + public var data: Data? { + return self.getData() + } + + public func getData() -> Data? { + if self.isList { + guard case .list(_, _, let rawContent) = self.content else {return nil} + return rawContent + } + guard case .data(let data) = self.content else {return nil} + return data + } + + public static var noItem: RLPItem { + return RLPItem.init(content: .noItem) + } + } + + internal static func decodeLength(_ input: Data) -> (offset: BigUInt?, length: BigUInt?, type: RLPItem.UnderlyingType?) { + do { + let length = BigUInt(input.count) + if (length == BigUInt(0)) { + return (0, 0, .empty) + } + let prefixByte = input[0] + if prefixByte <= 0x7f { + return (BigUInt(0), BigUInt(1), .data) + }else if prefixByte <= 0xb7 && length > BigUInt(prefixByte - 0x80) { + let dataLength = BigUInt(prefixByte - 0x80) + return (BigUInt(1), dataLength, .data) + } else if try prefixByte <= 0xbf && length > BigUInt(prefixByte - 0xb7) && length > BigUInt(prefixByte - 0xb7) + toBigUInt(slice(data: input, offset: BigUInt(1), length: BigUInt(prefixByte - 0xb7))) { + let lengthOfLength = BigUInt(prefixByte - 0xb7) + let dataLength = try toBigUInt(slice(data: input, offset: BigUInt(1), length: BigUInt(prefixByte - 0xb7))) + return (1 + lengthOfLength, dataLength, .data) + } else if prefixByte <= 0xf7 && length > BigUInt(prefixByte - 0xc0) { + let listLen = BigUInt(prefixByte - 0xc0) + return (1, listLen, .list) + } else if try prefixByte <= 0xff && length > BigUInt(prefixByte - 0xf7) && length > BigUInt(prefixByte - 0xf7) + toBigUInt(slice(data: input, offset: BigUInt(1), length: BigUInt(prefixByte - 0xf7))) { + let lengthOfListLength = BigUInt(prefixByte - 0xf7) + let listLength = try toBigUInt(slice(data: input, offset: BigUInt(1), length: BigUInt(prefixByte - 0xf7))) + return (1 + lengthOfListLength, listLength, .list) + } else { + return (nil, nil, nil) + } + } catch { + return (nil, nil, nil) + } + } + + internal static func slice(data: Data, offset: BigUInt, length: BigUInt) throws -> Data { + if BigUInt(data.count) < offset + length {throw Error.encodingError} + let slice = data[UInt64(offset) ..< UInt64(offset + length)] + return Data(slice) + } + + internal static func slice(data: Data, start: BigUInt) throws -> Data { + if BigUInt(data.count) < start {throw Error.encodingError} + let slice = data[UInt64(start) ..< UInt64(data.count)] + return Data(slice) + } + + internal static func toBigUInt(_ raw: Data) throws -> BigUInt { + if raw.count == 0 { + throw Error.encodingError + } else if raw.count == 1 { + return BigUInt.init(raw) + } else { + let slice = raw[0 ..< raw.count - 1] + return try BigUInt(raw[raw.count-1]) + toBigUInt(slice)*256 + } + } +} + +fileprivate extension String { + func stripHexPrefix() -> String { + if self.hasPrefix("0x") { + let indexStart = self.index(self.startIndex, offsetBy: 2) + return String(self[indexStart...]) + } + return self + } +} + +fileprivate extension Array where Element == UInt8 { + init(hex: String) { + self = Array() + self.reserveCapacity(hex.unicodeScalars.underestimatedCount) + var buffer: UInt8? + var skip = hex.hasPrefix("0x") ? 2 : 0 + for char in hex.unicodeScalars.lazy { + guard skip == 0 else { + skip -= 1 + continue + } + guard char.value >= 48 && char.value <= 102 else { + removeAll() + return + } + let v: UInt8 + let c: UInt8 = UInt8(char.value) + switch c { + case let c where c <= 57: + v = c - 48 + case let c where c >= 65 && c <= 70: + v = c - 55 + case let c where c >= 97: + v = c - 87 + default: + removeAll() + return + } + if let b = buffer { + append(b << 4 | v) + buffer = nil + } else { + buffer = v + } + } + if let b = buffer { + append(b) + } + } +} + +fileprivate extension Data { + + static func fromHex(_ hex: String) -> Data? { + let string = hex.lowercased().stripHexPrefix() + let array = Array(hex: string) + if (array.count == 0) { + if (hex == "0x" || hex == "") { + return Data() + } else { + return nil + } + } + return Data(array) + } + + var bytes: Array { + return Array(self) + } + +} diff --git a/Example/web3swiftExample/Pods/SwiftRLP/LICENSE b/Example/web3swiftExample/Pods/SwiftRLP/LICENSE new file mode 100644 index 000000000..d49e6aa41 --- /dev/null +++ b/Example/web3swiftExample/Pods/SwiftRLP/LICENSE @@ -0,0 +1,13 @@ +Copyright 2018 Alex Vlasov + +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/Example/web3swiftExample/Pods/SwiftRLP/SwiftRLP/SwiftRLP.h b/Example/web3swiftExample/Pods/SwiftRLP/SwiftRLP/SwiftRLP.h new file mode 100644 index 000000000..47bb05fc6 --- /dev/null +++ b/Example/web3swiftExample/Pods/SwiftRLP/SwiftRLP/SwiftRLP.h @@ -0,0 +1,21 @@ +// +// SwiftRLP.h +// SwiftRLP +// +// Created by Alex Vlasov on 04/10/2018. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// +#if TARGET_OS_IPHONE +#import +#else +#import +#endif +//! Project version number for SwiftRLP. +FOUNDATION_EXPORT double SwiftRLPVersionNumber; + +//! Project version string for SwiftRLP. +FOUNDATION_EXPORT const unsigned char SwiftRLPVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Example/web3swiftExample/Pods/Target Support Files/CryptoSwift/CryptoSwift-Info.plist b/Example/web3swiftExample/Pods/Target Support Files/CryptoSwift/CryptoSwift-Info.plist index db2049463..3e3c2e3d8 100644 --- a/Example/web3swiftExample/Pods/Target Support Files/CryptoSwift/CryptoSwift-Info.plist +++ b/Example/web3swiftExample/Pods/Target Support Files/CryptoSwift/CryptoSwift-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.12.0 + 0.13.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-Info.plist b/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-Info.plist new file mode 100644 index 000000000..d60f138d9 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-dummy.m b/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-dummy.m new file mode 100644 index 000000000..0e1336d81 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_EthereumABI : NSObject +@end +@implementation PodsDummy_EthereumABI +@end diff --git a/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-prefix.pch b/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-prefix.pch new file mode 100644 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-umbrella.h b/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-umbrella.h new file mode 100644 index 000000000..d0c9e02c9 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "EthereumABI.h" + +FOUNDATION_EXPORT double EthereumABIVersionNumber; +FOUNDATION_EXPORT const unsigned char EthereumABIVersionString[]; + diff --git a/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI.modulemap b/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI.modulemap new file mode 100644 index 000000000..4a8aaefc7 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI.modulemap @@ -0,0 +1,6 @@ +framework module EthereumABI { + umbrella header "EthereumABI-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI.xcconfig b/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI.xcconfig new file mode 100644 index 000000000..540f987ea --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/EthereumABI/EthereumABI.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI +DEFINES_MODULE = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "CryptoSwift" -framework "EthereumAddress" -framework "SipHash" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/EthereumABI +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-Info.plist b/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-Info.plist new file mode 100644 index 000000000..2243fe6e2 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + 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/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-dummy.m b/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-dummy.m new file mode 100644 index 000000000..3c6848b53 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_EthereumAddress : NSObject +@end +@implementation PodsDummy_EthereumAddress +@end diff --git a/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-prefix.pch b/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-prefix.pch new file mode 100644 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-umbrella.h b/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-umbrella.h new file mode 100644 index 000000000..d19195a1e --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "EthereumAddress.h" + +FOUNDATION_EXPORT double EthereumAddressVersionNumber; +FOUNDATION_EXPORT const unsigned char EthereumAddressVersionString[]; + diff --git a/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress.modulemap b/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress.modulemap new file mode 100644 index 000000000..8266d6b80 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress.modulemap @@ -0,0 +1,6 @@ +framework module EthereumAddress { + umbrella header "EthereumAddress-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress.xcconfig b/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress.xcconfig new file mode 100644 index 000000000..bcb308c16 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/EthereumAddress/EthereumAddress.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress +DEFINES_MODULE = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "CryptoSwift" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/EthereumAddress +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample-acknowledgements.markdown b/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample-acknowledgements.markdown index 538fa1abe..855987d47 100644 --- a/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample-acknowledgements.markdown +++ b/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample-acknowledgements.markdown @@ -39,6 +39,40 @@ Permission is granted to anyone to use this software for any purpose,including c - This notice may not be removed or altered from any source or binary distribution. - Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' +## EthereumABI + +Copyright 2018 Alex Vlasov + +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. + + +## EthereumAddress + +Copyright 2018 Alex Vlasov + +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. + + ## PromiseKit Copyright 2016-present, Max Howell; mxcl@me.com @@ -63,11 +97,11 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -## Result +## SipHash The MIT License (MIT) -Copyright (c) 2014 Rob Rix +Copyright (c) 2016 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 @@ -87,29 +121,22 @@ 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. -## SipHash -The MIT License (MIT) +## SwiftRLP -Copyright (c) 2016 Károly Lőrentey +Copyright 2018 Alex Vlasov -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: +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 -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + http://www.apache.org/licenses/LICENSE-2.0 -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. +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. ## scrypt @@ -129,31 +156,26 @@ See the License for the specific language governing permissions and limitations under the License. -## secp256k1_ios +## secp256k1_swift -Copyright (c) 2017 shamatar +Copyright 2018 Alex Vlasov (bankexfoundation.org) -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: +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 -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + 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. -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. ## web3swift -Copyright (c) 2018 Aleksandr Vlasov, Stichting Bankex Foundation +Copyright (c) 2018 Aleksandr Vlasov, Apache License Version 2.0, January 2004 @@ -343,7 +365,7 @@ Copyright (c) 2018 Aleksandr Vlasov, Stichting Bankex Foundation Type PSGroupSpecifier + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + EthereumABI + Type + PSGroupSpecifier + + + FooterText + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> + +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 + Apache License 2.0 + Title + EthereumAddress + Type + PSGroupSpecifier + FooterText Copyright 2016-present, Max Howell; mxcl@me.com @@ -96,7 +142,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. FooterText The MIT License (MIT) -Copyright (c) 2014 Rob Rix +Copyright (c) 2016 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 @@ -114,42 +160,35 @@ 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. +SOFTWARE. + License MIT Title - Result + SipHash Type PSGroupSpecifier FooterText - The MIT License (MIT) - -Copyright (c) 2016 Károly Lőrentey + Copyright 2018 Alex Vlasov <alex.m.vlasov@gmail.com> -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: +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 -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + http://www.apache.org/licenses/LICENSE-2.0 -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. +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 + Apache License 2.0 Title - SipHash + SwiftRLP Type PSGroupSpecifier @@ -178,35 +217,30 @@ limitations under the License. FooterText - Copyright (c) 2017 shamatar <alex.m.vlasov@gmail.com> + Copyright 2018 Alex Vlasov <av@bankexfoundation.org> (bankexfoundation.org) -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: +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 -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + http://www.apache.org/licenses/LICENSE-2.0 -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. +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 + Apache License 2.0 Title - secp256k1_ios + secp256k1_swift Type PSGroupSpecifier FooterText - Copyright (c) 2018 Aleksandr Vlasov, Stichting Bankex Foundation <av@bankexfoundation.org> + Copyright (c) 2018 Aleksandr Vlasov, <alex.m.vlasov@gmail.com> Apache License Version 2.0, January 2004 @@ -396,7 +430,7 @@ THE SOFTWARE. same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018 Stichting Bankex Foundation + Copyright 2018 Aleksandr Vlasov Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -408,7 +442,8 @@ THE 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. + limitations under the License. + License Apache License 2.0 Title diff --git a/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample-frameworks.sh b/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample-frameworks.sh index 1441ac6f1..bcfc71015 100755 --- a/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample-frameworks.sh +++ b/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample-frameworks.sh @@ -3,10 +3,15 @@ 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 + # 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}" @@ -36,8 +41,8 @@ install_framework() local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" + echo "Symlinked..." + source="$(readlink "${source}")" fi # Use filter instead of exclude so missing patterns don't throw errors. @@ -67,7 +72,7 @@ install_framework() # 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 && exit ${PIPESTATUS[0]}) + 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}" @@ -136,7 +141,7 @@ strip_invalid_archs() { for arch in $binary_archs; do if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + lipo -remove "$arch" -output "$binary" "$binary" stripped="$stripped $arch" fi done @@ -150,22 +155,26 @@ strip_invalid_archs() { if [[ "$CONFIGURATION" == "Debug" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/BigInt/BigInt.framework" install_framework "${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/EthereumABI/EthereumABI.framework" + install_framework "${BUILT_PRODUCTS_DIR}/EthereumAddress/EthereumAddress.framework" install_framework "${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Result/Result.framework" install_framework "${BUILT_PRODUCTS_DIR}/SipHash/SipHash.framework" + install_framework "${BUILT_PRODUCTS_DIR}/SwiftRLP/SwiftRLP.framework" install_framework "${BUILT_PRODUCTS_DIR}/scrypt/scrypt.framework" - install_framework "${BUILT_PRODUCTS_DIR}/secp256k1_ios/secp256k1_ios.framework" - install_framework "${BUILT_PRODUCTS_DIR}/web3swift/web3swift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/secp256k1_swift/secp256k1_swift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/web3swift/Web3swift.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/BigInt/BigInt.framework" install_framework "${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/EthereumABI/EthereumABI.framework" + install_framework "${BUILT_PRODUCTS_DIR}/EthereumAddress/EthereumAddress.framework" install_framework "${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Result/Result.framework" install_framework "${BUILT_PRODUCTS_DIR}/SipHash/SipHash.framework" + install_framework "${BUILT_PRODUCTS_DIR}/SwiftRLP/SwiftRLP.framework" install_framework "${BUILT_PRODUCTS_DIR}/scrypt/scrypt.framework" - install_framework "${BUILT_PRODUCTS_DIR}/secp256k1_ios/secp256k1_ios.framework" - install_framework "${BUILT_PRODUCTS_DIR}/web3swift/web3swift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/secp256k1_swift/secp256k1_swift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/web3swift/Web3swift.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait diff --git a/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample.debug.xcconfig b/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample.debug.xcconfig index 05a78990d..73da986e3 100644 --- a/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample.debug.xcconfig +++ b/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample.debug.xcconfig @@ -1,9 +1,9 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_ios" "${PODS_CONFIGURATION_BUILD_DIR}/web3swift" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift" "${PODS_CONFIGURATION_BUILD_DIR}/web3swift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt/BigInt.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI/EthereumABI.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress/EthereumAddress.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash/SipHash.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP/SwiftRLP.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt/scrypt.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift/secp256k1_swift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/web3swift/Web3swift.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/BigInt/BigInt.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Result/Result.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SipHash/SipHash.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/scrypt/scrypt.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_ios/secp256k1_ios.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/web3swift/web3swift.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "CoreImage" -framework "CryptoSwift" -framework "Foundation" -framework "PromiseKit" -framework "Result" -framework "SipHash" -framework "UIKit" -framework "scrypt" -framework "secp256k1_ios" -framework "web3swift" +OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "CoreImage" -framework "CryptoSwift" -framework "EthereumABI" -framework "EthereumAddress" -framework "Foundation" -framework "PromiseKit" -framework "SipHash" -framework "SwiftRLP" -framework "UIKit" -framework "Web3swift" -framework "scrypt" -framework "secp256k1_swift" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) diff --git a/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample.release.xcconfig b/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample.release.xcconfig index 05a78990d..73da986e3 100644 --- a/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample.release.xcconfig +++ b/Example/web3swiftExample/Pods/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample.release.xcconfig @@ -1,9 +1,9 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_ios" "${PODS_CONFIGURATION_BUILD_DIR}/web3swift" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift" "${PODS_CONFIGURATION_BUILD_DIR}/web3swift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt/BigInt.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI/EthereumABI.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress/EthereumAddress.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash/SipHash.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP/SwiftRLP.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt/scrypt.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift/secp256k1_swift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/web3swift/Web3swift.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/BigInt/BigInt.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Result/Result.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SipHash/SipHash.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/scrypt/scrypt.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_ios/secp256k1_ios.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/web3swift/web3swift.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "CoreImage" -framework "CryptoSwift" -framework "Foundation" -framework "PromiseKit" -framework "Result" -framework "SipHash" -framework "UIKit" -framework "scrypt" -framework "secp256k1_ios" -framework "web3swift" +OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "CoreImage" -framework "CryptoSwift" -framework "EthereumABI" -framework "EthereumAddress" -framework "Foundation" -framework "PromiseKit" -framework "SipHash" -framework "SwiftRLP" -framework "UIKit" -framework "Web3swift" -framework "scrypt" -framework "secp256k1_swift" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) diff --git a/Example/web3swiftExample/Pods/Target Support Files/PromiseKit/PromiseKit-Info.plist b/Example/web3swiftExample/Pods/Target Support Files/PromiseKit/PromiseKit-Info.plist index b51e629fb..0a3a4e6de 100644 --- a/Example/web3swiftExample/Pods/Target Support Files/PromiseKit/PromiseKit-Info.plist +++ b/Example/web3swiftExample/Pods/Target Support Files/PromiseKit/PromiseKit-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 6.4.1 + 6.5.2 CFBundleSignature ???? CFBundleVersion diff --git a/Example/web3swiftExample/Pods/Target Support Files/Result/Result-dummy.m b/Example/web3swiftExample/Pods/Target Support Files/Result/Result-dummy.m deleted file mode 100644 index ba47f618f..000000000 --- a/Example/web3swiftExample/Pods/Target Support Files/Result/Result-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Result : NSObject -@end -@implementation PodsDummy_Result -@end diff --git a/Example/web3swiftExample/Pods/Target Support Files/Result/Result.modulemap b/Example/web3swiftExample/Pods/Target Support Files/Result/Result.modulemap deleted file mode 100644 index c5e6a4a29..000000000 --- a/Example/web3swiftExample/Pods/Target Support Files/Result/Result.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Result { - umbrella header "Result-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-Info.plist b/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-Info.plist new file mode 100644 index 000000000..2a9158a0b --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.2.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-dummy.m b/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-dummy.m new file mode 100644 index 000000000..a8649c909 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_SwiftRLP : NSObject +@end +@implementation PodsDummy_SwiftRLP +@end diff --git a/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-prefix.pch b/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-prefix.pch new file mode 100644 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-umbrella.h b/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-umbrella.h new file mode 100644 index 000000000..c819e55b6 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "SwiftRLP.h" + +FOUNDATION_EXPORT double SwiftRLPVersionNumber; +FOUNDATION_EXPORT const unsigned char SwiftRLPVersionString[]; + diff --git a/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP.modulemap b/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP.modulemap new file mode 100644 index 000000000..81b05ab54 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP.modulemap @@ -0,0 +1,6 @@ +framework module SwiftRLP { + umbrella header "SwiftRLP-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP.xcconfig b/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP.xcconfig new file mode 100644 index 000000000..18c98691b --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/SwiftRLP/SwiftRLP.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP +DEFINES_MODULE = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "SipHash" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftRLP +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-dummy.m b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-dummy.m deleted file mode 100644 index 61ba816fb..000000000 --- a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_secp256k1_ios : NSObject -@end -@implementation PodsDummy_secp256k1_ios -@end diff --git a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios.modulemap b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios.modulemap deleted file mode 100644 index 3e155fb99..000000000 --- a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_ios/secp256k1_ios.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module secp256k1_ios { - umbrella header "secp256k1_ios-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-Info.plist b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-Info.plist new file mode 100644 index 000000000..10ad18b32 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.3 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-dummy.m b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-dummy.m new file mode 100644 index 000000000..9b4e22d1b --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_secp256k1_swift : NSObject +@end +@implementation PodsDummy_secp256k1_swift +@end diff --git a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-prefix.pch b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-prefix.pch new file mode 100644 index 000000000..beb2a2441 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-prefix.pch @@ -0,0 +1,12 @@ +#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/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-umbrella.h b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-umbrella.h new file mode 100644 index 000000000..0390c804f --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift-umbrella.h @@ -0,0 +1,19 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "secp256k1.h" +#import "secp256k1_ecdh.h" +#import "secp256k1_recovery.h" + +FOUNDATION_EXPORT double secp256k1_swiftVersionNumber; +FOUNDATION_EXPORT const unsigned char secp256k1_swiftVersionString[]; + diff --git a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.modulemap b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.modulemap new file mode 100644 index 000000000..cab9baa1f --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.modulemap @@ -0,0 +1,6 @@ +framework module secp256k1_swift { + umbrella header "secp256k1_swift-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.xcconfig b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.xcconfig new file mode 100644 index 000000000..f92f9e729 --- /dev/null +++ b/Example/web3swiftExample/Pods/Target Support Files/secp256k1_swift/secp256k1_swift.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/secp256k1" +OTHER_CFLAGS = -DHAVE_CONFIG_H=1 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-shorten-64-to-32 -Wno-conditional-uninitialized -Wno-unused-function -Wno-long-long -Wno-overlength-strings -O3 +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/secp256k1_swift +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_INCLUDE_PATHS = ${PODS_ROOT} diff --git a/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift-Info.plist b/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift-Info.plist index 05bf6cb44..bdac57c6a 100644 --- a/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift-Info.plist +++ b/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.1.9 + 2.0.1 CFBundleSignature ???? CFBundleVersion diff --git a/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift-umbrella.h b/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift-umbrella.h index dcf840e46..beae35792 100644 --- a/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift-umbrella.h +++ b/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift-umbrella.h @@ -10,9 +10,8 @@ #endif #endif -#import "web3swift-Bridging-Header.h" #import "web3swift.h" -FOUNDATION_EXPORT double web3swiftVersionNumber; -FOUNDATION_EXPORT const unsigned char web3swiftVersionString[]; +FOUNDATION_EXPORT double Web3swiftVersionNumber; +FOUNDATION_EXPORT const unsigned char Web3swiftVersionString[]; diff --git a/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift.modulemap b/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift.modulemap index 241e217a4..7578aea84 100644 --- a/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift.modulemap +++ b/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift.modulemap @@ -1,4 +1,4 @@ -framework module web3swift { +framework module Web3swift { umbrella header "web3swift-umbrella.h" export * diff --git a/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift.xcconfig b/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift.xcconfig index 827460702..17c8bafe1 100644 --- a/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift.xcconfig +++ b/Example/web3swiftExample/Pods/Target Support Files/web3swift/web3swift.xcconfig @@ -1,8 +1,8 @@ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/web3swift DEFINES_MODULE = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/Result" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_ios" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt" "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumABI" "${PODS_CONFIGURATION_BUILD_DIR}/EthereumAddress" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/SipHash" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftRLP" "${PODS_CONFIGURATION_BUILD_DIR}/scrypt" "${PODS_CONFIGURATION_BUILD_DIR}/secp256k1_swift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "CoreImage" -framework "CryptoSwift" -framework "Foundation" -framework "PromiseKit" -framework "Result" -framework "SipHash" -framework "UIKit" -framework "scrypt" -framework "secp256k1_ios" +OTHER_LDFLAGS = $(inherited) -framework "BigInt" -framework "CoreImage" -framework "CryptoSwift" -framework "EthereumABI" -framework "EthereumAddress" -framework "Foundation" -framework "PromiseKit" -framework "SipHash" -framework "SwiftRLP" -framework "UIKit" -framework "scrypt" -framework "secp256k1_swift" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) diff --git a/Example/web3swiftExample/Pods/secp256k1_ios/README.md b/Example/web3swiftExample/Pods/secp256k1_ios/README.md deleted file mode 100644 index 4ba4300b0..000000000 --- a/Example/web3swiftExample/Pods/secp256k1_ios/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# secp256k1_ios - -[![Version](https://img.shields.io/cocoapods/v/secp256k1_ios.svg?style=flat)](http://cocoapods.org/pods/secp256k1_ios) -[![License](https://img.shields.io/cocoapods/l/secp256k1_ios.svg?style=flat)](http://cocoapods.org/pods/secp256k1_ios) -[![Platform](https://img.shields.io/cocoapods/p/secp256k1_ios.svg?style=flat)](http://cocoapods.org/pods/secp256k1_ios) -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fshamatar%2Fsecp256k1_ios.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fshamatar%2Fsecp256k1_ios?ref=badge_shield) - -## Example - -To run the example project, clone the repo, and run `pod install` from the Example directory first. - -## Requirements - -## Installation - -secp256k1_ios is available through [CocoaPods](http://cocoapods.org). To install -it, simply add the following line to your Podfile: - -```ruby -pod 'secp256k1_ios' -``` - -## Author - -@shamatar, alex.m.vlasov@gmail.com - -## License - -secp256k1_ios is available under the MIT license. See the LICENSE file for more info. - - -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fshamatar%2Fsecp256k1_ios.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fshamatar%2Fsecp256k1_ios?ref=badge_large) \ No newline at end of file diff --git a/Example/web3swiftExample/Pods/secp256k1_ios/secp256k1_ios/secp256k1_ios.h b/Example/web3swiftExample/Pods/secp256k1_ios/secp256k1_ios/secp256k1_ios.h deleted file mode 100644 index 6cce852f3..000000000 --- a/Example/web3swiftExample/Pods/secp256k1_ios/secp256k1_ios/secp256k1_ios.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// secp256k1_ios.h -// secp256k1_ios -// -// Created by Alexander Vlasov on 07.12.2017. -// Copyright © 2017 Alexander Vlasov. All rights reserved. -// - -//! Project version number for secp256k1_ios. -FOUNDATION_EXPORT double secp256k1_iosVersionNumber; - -//! Project version string for secp256k1_ios. -FOUNDATION_EXPORT const unsigned char secp256k1_iosVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/libsecp256k1-config.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/libsecp256k1-config.h new file mode 100755 index 000000000..2b55bd620 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/libsecp256k1-config.h @@ -0,0 +1,46 @@ +// +// libsecp256k1-config.h +// secp256k1_ios +// +// Created by Alexander Vlasov on 27.02.2018. +// Copyright © 2018 Alexander Vlasov. All rights reserved. +// + +#ifndef libsecp256k1_config_h +#define libsecp256k1_config_h + +#undef USE_NUM_GMP +#define USE_NUM_NONE 1 +#define USE_FIELD_INV_BUILTIN 1 +#define USE_SCALAR_INV_BUILTIN 1 + +#define HAVE_BUILTIN_EXPECT 1 +//#define USE_ECMULT_STATIC_PRECOMPUTATION 1 +#define ENABLE_MODULE_RECOVERY 1 + +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_DLFCN_H 1 + +#if defined(__LP64__) +#if defined(__SIZEOF_INT128__) +#define HAVE___INT128 1 +#endif +#define USE_FIELD_5X52 1 +#define USE_SCALAR_4X64 1 + +#else +#define USE_FIELD_10X26 1 +#define USE_SCALAR_8X32 1 +#endif + + +#endif /* libsecp256k1_config_h */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1.swift b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1.swift new file mode 100755 index 000000000..80b97b4d8 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1.swift @@ -0,0 +1,321 @@ +// +// secp256k1.swift +// secp256k1_swift +// +// Created by Alexander Vlasov on 30.05.2018. +// Copyright © 2018 Alexander Vlasov. All rights reserved. +// + +import Foundation +#if CARTHAGE +import libsecp256k1 +#endif +public struct SECP256K1 { + public struct UnmarshaledSignature{ + public var v: UInt8 = 0 + public var r = Data(repeating: 0, count: 32) + public var s = Data(repeating: 0, count: 32) + + public init(v: UInt8, r: Data, s: Data) { + self.v = v + self.r = r + self.s = s + } + } +} + +extension SECP256K1 { + static let context = secp256k1_context_create(UInt32(SECP256K1_CONTEXT_SIGN|SECP256K1_CONTEXT_VERIFY)) + + public static func signForRecovery(hash: Data, privateKey: Data, useExtraEntropy: Bool = false) -> (serializedSignature:Data?, rawSignature: Data?) { + if (hash.count != 32 || privateKey.count != 32) {return (nil, nil)} + if !SECP256K1.verifyPrivateKey(privateKey: privateKey) { + return (nil, nil) + } + for _ in 0...1024 { + guard var recoverableSignature = SECP256K1.recoverableSign(hash: hash, privateKey: privateKey, useExtraEntropy: useExtraEntropy) else { + continue + } + guard let truePublicKey = SECP256K1.privateKeyToPublicKey(privateKey: privateKey) else {continue} + guard let recoveredPublicKey = SECP256K1.recoverPublicKey(hash: hash, recoverableSignature: &recoverableSignature) else {continue} + if !SECP256K1.constantTimeComparison(Data(toByteArray(truePublicKey.data)), Data(toByteArray(recoveredPublicKey.data))) { + continue + } + guard let serializedSignature = SECP256K1.serializeSignature(recoverableSignature: &recoverableSignature) else {continue} + let rawSignature = Data(toByteArray(recoverableSignature)) + return (serializedSignature, rawSignature) + } + return (nil, nil) + } + + public static func privateToPublic(privateKey: Data, compressed: Bool = false) -> Data? { + if (privateKey.count != 32) {return nil} + guard var publicKey = SECP256K1.privateKeyToPublicKey(privateKey: privateKey) else {return nil} + guard let serializedKey = serializePublicKey(publicKey: &publicKey, compressed: compressed) else {return nil} + return serializedKey + } + + public static func combineSerializedPublicKeys(keys: [Data], outputCompressed: Bool = false) -> Data? { + let numToCombine = keys.count + guard numToCombine >= 1 else { return nil} + var storage = ContiguousArray() + let arrayOfPointers = UnsafeMutablePointer< UnsafePointer? >.allocate(capacity: numToCombine) + defer { + arrayOfPointers.deinitialize(count: numToCombine) + arrayOfPointers.deallocate() + } + for i in 0 ..< numToCombine { + let key = keys[i] + guard let pubkey = SECP256K1.parsePublicKey(serializedKey: key) else {return nil} + storage.append(pubkey) + } + for i in 0 ..< numToCombine { + withUnsafePointer(to: &storage[i]) { (ptr) -> Void in + arrayOfPointers.advanced(by: i).pointee = ptr + } + } + let immutablePointer = UnsafePointer(arrayOfPointers) + var publicKey: secp256k1_pubkey = secp256k1_pubkey() + let result = withUnsafeMutablePointer(to: &publicKey) { (pubKeyPtr: UnsafeMutablePointer) -> Int32 in + let res = secp256k1_ec_pubkey_combine(context!, pubKeyPtr, immutablePointer, numToCombine) + return res + } + if result == 0 { + return nil + } + let serializedKey = SECP256K1.serializePublicKey(publicKey: &publicKey, compressed: outputCompressed) + return serializedKey + } + + + internal static func recoverPublicKey(hash: Data, recoverableSignature: inout secp256k1_ecdsa_recoverable_signature) -> secp256k1_pubkey? { + guard hash.count == 32 else {return nil} + var publicKey: secp256k1_pubkey = secp256k1_pubkey() + let result = hash.withUnsafeBytes { (hashPointer:UnsafePointer) -> Int32 in + withUnsafePointer(to: &recoverableSignature, { (signaturePointer:UnsafePointer) -> Int32 in + withUnsafeMutablePointer(to: &publicKey, { (pubKeyPtr: UnsafeMutablePointer) -> Int32 in + let res = secp256k1_ecdsa_recover(context!, pubKeyPtr, + signaturePointer, hashPointer) + return res + }) + }) + } + if result == 0 { + return nil + } + return publicKey + } + + internal static func privateKeyToPublicKey(privateKey: Data) -> secp256k1_pubkey? { + if (privateKey.count != 32) {return nil} + var publicKey = secp256k1_pubkey() + let result = privateKey.withUnsafeBytes { (privateKeyPointer:UnsafePointer) -> Int32 in + let res = secp256k1_ec_pubkey_create(context!, UnsafeMutablePointer(&publicKey), privateKeyPointer) + return res + } + if result == 0 { + return nil + } + return publicKey + } + + public static func serializePublicKey(publicKey: inout secp256k1_pubkey, compressed: Bool = false) -> Data? { + var keyLength = compressed ? 33 : 65 + var serializedPubkey = Data(repeating: 0x00, count: keyLength) + let result = serializedPubkey.withUnsafeMutableBytes { (serializedPubkeyPointer:UnsafeMutablePointer) -> Int32 in + withUnsafeMutablePointer(to: &keyLength, { (keyPtr:UnsafeMutablePointer) -> Int32 in + withUnsafeMutablePointer(to: &publicKey, { (pubKeyPtr:UnsafeMutablePointer) -> Int32 in + let res = secp256k1_ec_pubkey_serialize(context!, + serializedPubkeyPointer, + keyPtr, + pubKeyPtr, + UInt32(compressed ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED)) + return res + }) + }) + } + + if result == 0 { + return nil + } + return Data(serializedPubkey) + } + + internal static func parsePublicKey(serializedKey: Data) -> secp256k1_pubkey? { + guard serializedKey.count == 33 || serializedKey.count == 65 else { + return nil + } + let keyLen: Int = Int(serializedKey.count) + var publicKey = secp256k1_pubkey() + let result = serializedKey.withUnsafeBytes { (serializedKeyPointer:UnsafePointer) -> Int32 in + let res = secp256k1_ec_pubkey_parse(context!, UnsafeMutablePointer(&publicKey), serializedKeyPointer, keyLen) + return res + } + if result == 0 { + return nil + } + return publicKey + } + + public static func parseSignature(signature: Data) -> secp256k1_ecdsa_recoverable_signature? { + guard signature.count == 65 else {return nil} + var recoverableSignature: secp256k1_ecdsa_recoverable_signature = secp256k1_ecdsa_recoverable_signature() + let serializedSignature = Data(signature[0..<64]) + let v = Int32(signature[64]) + let result = serializedSignature.withUnsafeBytes{ (serPtr: UnsafePointer) -> Int32 in + withUnsafeMutablePointer(to: &recoverableSignature, { (signaturePointer:UnsafeMutablePointer) -> Int32 in + let res = secp256k1_ecdsa_recoverable_signature_parse_compact(context!, signaturePointer, serPtr, v) + return res + }) + } + if result == 0 { + return nil + } + return recoverableSignature + } + + internal static func serializeSignature(recoverableSignature: inout secp256k1_ecdsa_recoverable_signature) -> Data? { + var serializedSignature = Data(repeating: 0x00, count: 64) + var v: Int32 = 0 + let result = serializedSignature.withUnsafeMutableBytes { (serSignaturePointer:UnsafeMutablePointer) -> Int32 in + withUnsafePointer(to: &recoverableSignature) { (signaturePointer:UnsafePointer) -> Int32 in + withUnsafeMutablePointer(to: &v, { (vPtr: UnsafeMutablePointer) -> Int32 in + let res = secp256k1_ecdsa_recoverable_signature_serialize_compact(context!, serSignaturePointer, vPtr, signaturePointer) + return res + }) + } + } + if result == 0 { + return nil + } + if (v == 0) { + serializedSignature.append(0x00) + } else if (v == 1) { + serializedSignature.append(0x01) + } else { + return nil + } + return Data(serializedSignature) + } + + internal static func recoverableSign(hash: Data, privateKey: Data, useExtraEntropy: Bool = false) -> secp256k1_ecdsa_recoverable_signature? { + if (hash.count != 32 || privateKey.count != 32) { + return nil + } + if !SECP256K1.verifyPrivateKey(privateKey: privateKey) { + return nil + } + var recoverableSignature: secp256k1_ecdsa_recoverable_signature = secp256k1_ecdsa_recoverable_signature(); + guard let extraEntropy = SECP256K1.randomBytes(length: 32) else {return nil} + let result = hash.withUnsafeBytes { (hashPointer:UnsafePointer) -> Int32 in + privateKey.withUnsafeBytes { (privateKeyPointer:UnsafePointer) -> Int32 in + extraEntropy.withUnsafeBytes { (extraEntropyPointer:UnsafePointer) -> Int32 in + withUnsafeMutablePointer(to: &recoverableSignature, { (recSignaturePtr: UnsafeMutablePointer) -> Int32 in + let res = secp256k1_ecdsa_sign_recoverable(context!, recSignaturePtr, hashPointer, privateKeyPointer, nil, useExtraEntropy ? extraEntropyPointer : nil) + return res + }) + } + } + } + if result == 0 { + print("Failed to sign!") + return nil + } + return recoverableSignature + } + + public static func recoverPublicKey(hash: Data, signature: Data, compressed: Bool = false) -> Data? { + guard hash.count == 32, signature.count == 65 else {return nil} + guard var recoverableSignature = parseSignature(signature: signature) else {return nil} + guard var publicKey = SECP256K1.recoverPublicKey(hash: hash, recoverableSignature: &recoverableSignature) else {return nil} + guard let serializedKey = SECP256K1.serializePublicKey(publicKey: &publicKey, compressed: compressed) else {return nil} + return serializedKey + } + + + public static func verifyPrivateKey(privateKey: Data) -> Bool { + if (privateKey.count != 32) {return false} + let result = privateKey.withUnsafeBytes { (privateKeyPointer:UnsafePointer) -> Int32 in + let res = secp256k1_ec_seckey_verify(context!, privateKeyPointer) + return res + } + return result == 1 + } + + public static func generatePrivateKey() -> Data? { + for _ in 0...1024 { + guard let keyData = SECP256K1.randomBytes(length: 32) else { + continue + } + guard SECP256K1.verifyPrivateKey(privateKey: keyData) else { + continue + } + return keyData + } + return nil + } + + public static func unmarshalSignature(signatureData:Data) -> UnmarshaledSignature? { + if (signatureData.count != 65) {return nil} + let v = signatureData[64] + let r = Data(signatureData[0..<32]) + let s = Data(signatureData[32..<64]) + return UnmarshaledSignature(v: v, r: r, s: s) + } + + public static func marshalSignature(v: UInt8, r: [UInt8], s: [UInt8]) -> Data? { + guard r.count == 32, s.count == 32 else {return nil} + var completeSignature = Data(bytes: r) + completeSignature.append(Data(bytes: s)) + completeSignature.append(Data(bytes: [v])) + return completeSignature + } + + public static func marshalSignature(v: Data, r: Data, s: Data) -> Data? { + guard r.count == 32, s.count == 32 else {return nil} + var completeSignature = Data(r) + completeSignature.append(s) + completeSignature.append(v) + return completeSignature + } + + internal static func randomBytes(length: Int) -> Data? { + for _ in 0...1024 { + var data = Data(repeating: 0, count: length) + let result = data.withUnsafeMutableBytes { + (mutableBytes: UnsafeMutablePointer) -> Int32 in + SecRandomCopyBytes(kSecRandomDefault, 32, mutableBytes) + } + if result == errSecSuccess { + return data + } + } + return nil + } + + internal static func toByteArray(_ value: T) -> [UInt8] { + var value = value + return withUnsafeBytes(of: &value) { Array($0) } + } + + internal static func fromByteArray(_ value: [UInt8], _: T.Type) -> T { + return value.withUnsafeBytes { + $0.baseAddress!.load(as: T.self) + } + } + + internal static func constantTimeComparison(_ lhs: Data, _ rhs:Data) -> Bool { + guard lhs.count == rhs.count else {return false} + var difference = UInt8(0x00) + for i in 0.. +#include + +#include "lax_der_parsing.h" + +int ecdsa_signature_parse_der_lax(const secp256k1_context* ctx, secp256k1_ecdsa_signature* sig, const unsigned char *input, size_t inputlen) { + size_t rpos, rlen, spos, slen; + size_t pos = 0; + size_t lenbyte; + unsigned char tmpsig[64] = {0}; + int overflow = 0; + + /* Hack to initialize sig with a correctly-parsed but invalid signature. */ + secp256k1_ecdsa_signature_parse_compact(ctx, sig, tmpsig); + + /* Sequence tag byte */ + if (pos == inputlen || input[pos] != 0x30) { + return 0; + } + pos++; + + /* Sequence length bytes */ + if (pos == inputlen) { + return 0; + } + lenbyte = input[pos++]; + if (lenbyte & 0x80) { + lenbyte -= 0x80; + if (pos + lenbyte > inputlen) { + return 0; + } + pos += lenbyte; + } + + /* Integer tag byte for R */ + if (pos == inputlen || input[pos] != 0x02) { + return 0; + } + pos++; + + /* Integer length for R */ + if (pos == inputlen) { + return 0; + } + lenbyte = input[pos++]; + if (lenbyte & 0x80) { + lenbyte -= 0x80; + if (pos + lenbyte > inputlen) { + return 0; + } + while (lenbyte > 0 && input[pos] == 0) { + pos++; + lenbyte--; + } + if (lenbyte >= sizeof(size_t)) { + return 0; + } + rlen = 0; + while (lenbyte > 0) { + rlen = (rlen << 8) + input[pos]; + pos++; + lenbyte--; + } + } else { + rlen = lenbyte; + } + if (rlen > inputlen - pos) { + return 0; + } + rpos = pos; + pos += rlen; + + /* Integer tag byte for S */ + if (pos == inputlen || input[pos] != 0x02) { + return 0; + } + pos++; + + /* Integer length for S */ + if (pos == inputlen) { + return 0; + } + lenbyte = input[pos++]; + if (lenbyte & 0x80) { + lenbyte -= 0x80; + if (pos + lenbyte > inputlen) { + return 0; + } + while (lenbyte > 0 && input[pos] == 0) { + pos++; + lenbyte--; + } + if (lenbyte >= sizeof(size_t)) { + return 0; + } + slen = 0; + while (lenbyte > 0) { + slen = (slen << 8) + input[pos]; + pos++; + lenbyte--; + } + } else { + slen = lenbyte; + } + if (slen > inputlen - pos) { + return 0; + } + spos = pos; + pos += slen; + + /* Ignore leading zeroes in R */ + while (rlen > 0 && input[rpos] == 0) { + rlen--; + rpos++; + } + /* Copy R value */ + if (rlen > 32) { + overflow = 1; + } else { + memcpy(tmpsig + 32 - rlen, input + rpos, rlen); + } + + /* Ignore leading zeroes in S */ + while (slen > 0 && input[spos] == 0) { + slen--; + spos++; + } + /* Copy S value */ + if (slen > 32) { + overflow = 1; + } else { + memcpy(tmpsig + 64 - slen, input + spos, slen); + } + + if (!overflow) { + overflow = !secp256k1_ecdsa_signature_parse_compact(ctx, sig, tmpsig); + } + if (overflow) { + memset(tmpsig, 0, 64); + secp256k1_ecdsa_signature_parse_compact(ctx, sig, tmpsig); + } + return 1; +} + diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_parsing.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_parsing.h new file mode 100644 index 000000000..7eaf63bf6 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_parsing.h @@ -0,0 +1,91 @@ +/********************************************************************** + * Copyright (c) 2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +/**** + * Please do not link this file directly. It is not part of the libsecp256k1 + * project and does not promise any stability in its API, functionality or + * presence. Projects which use this code should instead copy this header + * and its accompanying .c file directly into their codebase. + ****/ + +/* This file defines a function that parses DER with various errors and + * violations. This is not a part of the library itself, because the allowed + * violations are chosen arbitrarily and do not follow or establish any + * standard. + * + * In many places it matters that different implementations do not only accept + * the same set of valid signatures, but also reject the same set of signatures. + * The only means to accomplish that is by strictly obeying a standard, and not + * accepting anything else. + * + * Nonetheless, sometimes there is a need for compatibility with systems that + * use signatures which do not strictly obey DER. The snippet below shows how + * certain violations are easily supported. You may need to adapt it. + * + * Do not use this for new systems. Use well-defined DER or compact signatures + * instead if you have the choice (see secp256k1_ecdsa_signature_parse_der and + * secp256k1_ecdsa_signature_parse_compact). + * + * The supported violations are: + * - All numbers are parsed as nonnegative integers, even though X.609-0207 + * section 8.3.3 specifies that integers are always encoded as two's + * complement. + * - Integers can have length 0, even though section 8.3.1 says they can't. + * - Integers with overly long padding are accepted, violation section + * 8.3.2. + * - 127-byte long length descriptors are accepted, even though section + * 8.1.3.5.c says that they are not. + * - Trailing garbage data inside or after the signature is ignored. + * - The length descriptor of the sequence is ignored. + * + * Compared to for example OpenSSL, many violations are NOT supported: + * - Using overly long tag descriptors for the sequence or integers inside, + * violating section 8.1.2.2. + * - Encoding primitive integers as constructed values, violating section + * 8.3.1. + */ + +#ifndef SECP256K1_CONTRIB_LAX_DER_PARSING_H +#define SECP256K1_CONTRIB_LAX_DER_PARSING_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** Parse a signature in "lax DER" format + * + * Returns: 1 when the signature could be parsed, 0 otherwise. + * Args: ctx: a secp256k1 context object + * Out: sig: a pointer to a signature object + * In: input: a pointer to the signature to be parsed + * inputlen: the length of the array pointed to be input + * + * This function will accept any valid DER encoded signature, even if the + * encoded numbers are out of range. In addition, it will accept signatures + * which violate the DER spec in various ways. Its purpose is to allow + * validation of the Bitcoin blockchain, which includes non-DER signatures + * from before the network rules were updated to enforce DER. Note that + * the set of supported violations is a strict subset of what OpenSSL will + * accept. + * + * After the call, sig will always be initialized. If parsing failed or the + * encoded numbers are out of range, signature validation with it is + * guaranteed to fail for every message and public key. + */ +int ecdsa_signature_parse_der_lax( + const secp256k1_context* ctx, + secp256k1_ecdsa_signature* sig, + const unsigned char *input, + size_t inputlen +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +#ifdef __cplusplus +} +#endif + +#endif /* SECP256K1_CONTRIB_LAX_DER_PARSING_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_privatekey_parsing.c b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_privatekey_parsing.c new file mode 100644 index 000000000..c2e63b4b8 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_privatekey_parsing.c @@ -0,0 +1,113 @@ +/********************************************************************** + * Copyright (c) 2014, 2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#include +#include + +#include "lax_der_privatekey_parsing.h" + +int ec_privkey_import_der(const secp256k1_context* ctx, unsigned char *out32, const unsigned char *privkey, size_t privkeylen) { + const unsigned char *end = privkey + privkeylen; + int lenb = 0; + int len = 0; + memset(out32, 0, 32); + /* sequence header */ + if (end < privkey+1 || *privkey != 0x30) { + return 0; + } + privkey++; + /* sequence length constructor */ + if (end < privkey+1 || !(*privkey & 0x80)) { + return 0; + } + lenb = *privkey & ~0x80; privkey++; + if (lenb < 1 || lenb > 2) { + return 0; + } + if (end < privkey+lenb) { + return 0; + } + /* sequence length */ + len = privkey[lenb-1] | (lenb > 1 ? privkey[lenb-2] << 8 : 0); + privkey += lenb; + if (end < privkey+len) { + return 0; + } + /* sequence element 0: version number (=1) */ + if (end < privkey+3 || privkey[0] != 0x02 || privkey[1] != 0x01 || privkey[2] != 0x01) { + return 0; + } + privkey += 3; + /* sequence element 1: octet string, up to 32 bytes */ + if (end < privkey+2 || privkey[0] != 0x04 || privkey[1] > 0x20 || end < privkey+2+privkey[1]) { + return 0; + } + memcpy(out32 + 32 - privkey[1], privkey + 2, privkey[1]); + if (!secp256k1_ec_seckey_verify(ctx, out32)) { + memset(out32, 0, 32); + return 0; + } + return 1; +} + +int ec_privkey_export_der(const secp256k1_context *ctx, unsigned char *privkey, size_t *privkeylen, const unsigned char *key32, int compressed) { + secp256k1_pubkey pubkey; + size_t pubkeylen = 0; + if (!secp256k1_ec_pubkey_create(ctx, &pubkey, key32)) { + *privkeylen = 0; + return 0; + } + if (compressed) { + static const unsigned char begin[] = { + 0x30,0x81,0xD3,0x02,0x01,0x01,0x04,0x20 + }; + static const unsigned char middle[] = { + 0xA0,0x81,0x85,0x30,0x81,0x82,0x02,0x01,0x01,0x30,0x2C,0x06,0x07,0x2A,0x86,0x48, + 0xCE,0x3D,0x01,0x01,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F,0x30,0x06,0x04,0x01,0x00,0x04,0x01,0x07,0x04, + 0x21,0x02,0x79,0xBE,0x66,0x7E,0xF9,0xDC,0xBB,0xAC,0x55,0xA0,0x62,0x95,0xCE,0x87, + 0x0B,0x07,0x02,0x9B,0xFC,0xDB,0x2D,0xCE,0x28,0xD9,0x59,0xF2,0x81,0x5B,0x16,0xF8, + 0x17,0x98,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFE,0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,0xBF,0xD2,0x5E, + 0x8C,0xD0,0x36,0x41,0x41,0x02,0x01,0x01,0xA1,0x24,0x03,0x22,0x00 + }; + unsigned char *ptr = privkey; + memcpy(ptr, begin, sizeof(begin)); ptr += sizeof(begin); + memcpy(ptr, key32, 32); ptr += 32; + memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle); + pubkeylen = 33; + secp256k1_ec_pubkey_serialize(ctx, ptr, &pubkeylen, &pubkey, SECP256K1_EC_COMPRESSED); + ptr += pubkeylen; + *privkeylen = ptr - privkey; + } else { + static const unsigned char begin[] = { + 0x30,0x82,0x01,0x13,0x02,0x01,0x01,0x04,0x20 + }; + static const unsigned char middle[] = { + 0xA0,0x81,0xA5,0x30,0x81,0xA2,0x02,0x01,0x01,0x30,0x2C,0x06,0x07,0x2A,0x86,0x48, + 0xCE,0x3D,0x01,0x01,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F,0x30,0x06,0x04,0x01,0x00,0x04,0x01,0x07,0x04, + 0x41,0x04,0x79,0xBE,0x66,0x7E,0xF9,0xDC,0xBB,0xAC,0x55,0xA0,0x62,0x95,0xCE,0x87, + 0x0B,0x07,0x02,0x9B,0xFC,0xDB,0x2D,0xCE,0x28,0xD9,0x59,0xF2,0x81,0x5B,0x16,0xF8, + 0x17,0x98,0x48,0x3A,0xDA,0x77,0x26,0xA3,0xC4,0x65,0x5D,0xA4,0xFB,0xFC,0x0E,0x11, + 0x08,0xA8,0xFD,0x17,0xB4,0x48,0xA6,0x85,0x54,0x19,0x9C,0x47,0xD0,0x8F,0xFB,0x10, + 0xD4,0xB8,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFE,0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,0xBF,0xD2,0x5E, + 0x8C,0xD0,0x36,0x41,0x41,0x02,0x01,0x01,0xA1,0x44,0x03,0x42,0x00 + }; + unsigned char *ptr = privkey; + memcpy(ptr, begin, sizeof(begin)); ptr += sizeof(begin); + memcpy(ptr, key32, 32); ptr += 32; + memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle); + pubkeylen = 65; + secp256k1_ec_pubkey_serialize(ctx, ptr, &pubkeylen, &pubkey, SECP256K1_EC_UNCOMPRESSED); + ptr += pubkeylen; + *privkeylen = ptr - privkey; + } + return 1; +} diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_privatekey_parsing.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_privatekey_parsing.h new file mode 100644 index 000000000..fece261fb --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/contrib/lax_der_privatekey_parsing.h @@ -0,0 +1,90 @@ +/********************************************************************** + * Copyright (c) 2014, 2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +/**** + * Please do not link this file directly. It is not part of the libsecp256k1 + * project and does not promise any stability in its API, functionality or + * presence. Projects which use this code should instead copy this header + * and its accompanying .c file directly into their codebase. + ****/ + +/* This file contains code snippets that parse DER private keys with + * various errors and violations. This is not a part of the library + * itself, because the allowed violations are chosen arbitrarily and + * do not follow or establish any standard. + * + * It also contains code to serialize private keys in a compatible + * manner. + * + * These functions are meant for compatibility with applications + * that require BER encoded keys. When working with secp256k1-specific + * code, the simple 32-byte private keys normally used by the + * library are sufficient. + */ + +#ifndef SECP256K1_CONTRIB_BER_PRIVATEKEY_H +#define SECP256K1_CONTRIB_BER_PRIVATEKEY_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** Export a private key in DER format. + * + * Returns: 1 if the private key was valid. + * Args: ctx: pointer to a context object, initialized for signing (cannot + * be NULL) + * Out: privkey: pointer to an array for storing the private key in BER. + * Should have space for 279 bytes, and cannot be NULL. + * privkeylen: Pointer to an int where the length of the private key in + * privkey will be stored. + * In: seckey: pointer to a 32-byte secret key to export. + * compressed: 1 if the key should be exported in + * compressed format, 0 otherwise + * + * This function is purely meant for compatibility with applications that + * require BER encoded keys. When working with secp256k1-specific code, the + * simple 32-byte private keys are sufficient. + * + * Note that this function does not guarantee correct DER output. It is + * guaranteed to be parsable by secp256k1_ec_privkey_import_der + */ +SECP256K1_WARN_UNUSED_RESULT int ec_privkey_export_der( + const secp256k1_context* ctx, + unsigned char *privkey, + size_t *privkeylen, + const unsigned char *seckey, + int compressed +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Import a private key in DER format. + * Returns: 1 if a private key was extracted. + * Args: ctx: pointer to a context object (cannot be NULL). + * Out: seckey: pointer to a 32-byte array for storing the private key. + * (cannot be NULL). + * In: privkey: pointer to a private key in DER format (cannot be NULL). + * privkeylen: length of the DER private key pointed to be privkey. + * + * This function will accept more than just strict DER, and even allow some BER + * violations. The public key stored inside the DER-encoded private key is not + * verified for correctness, nor are the curve parameters. Use this function + * only if you know in advance it is supposed to contain a secp256k1 private + * key. + */ +SECP256K1_WARN_UNUSED_RESULT int ec_privkey_import_der( + const secp256k1_context* ctx, + unsigned char *seckey, + const unsigned char *privkey, + size_t privkeylen +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +#ifdef __cplusplus +} +#endif + +#endif /* SECP256K1_CONTRIB_BER_PRIVATEKEY_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/include/secp256k1.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/include/secp256k1.h new file mode 100644 index 000000000..3c4a311a0 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/include/secp256k1.h @@ -0,0 +1,654 @@ +#ifndef SECP256K1_H +#define SECP256K1_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* These rules specify the order of arguments in API calls: + * + * 1. Context pointers go first, followed by output arguments, combined + * output/input arguments, and finally input-only arguments. + * 2. Array lengths always immediately the follow the argument whose length + * they describe, even if this violates rule 1. + * 3. Within the OUT/OUTIN/IN groups, pointers to data that is typically generated + * later go first. This means: signatures, public nonces, private nonces, + * messages, public keys, secret keys, tweaks. + * 4. Arguments that are not data pointers go last, from more complex to less + * complex: function pointers, algorithm names, messages, void pointers, + * counts, flags, booleans. + * 5. Opaque data pointers follow the function pointer they are to be passed to. + */ + +/** Opaque data structure that holds context information (precomputed tables etc.). + * + * The purpose of context structures is to cache large precomputed data tables + * that are expensive to construct, and also to maintain the randomization data + * for blinding. + * + * Do not create a new context object for each operation, as construction is + * far slower than all other API calls (~100 times slower than an ECDSA + * verification). + * + * A constructed context can safely be used from multiple threads + * simultaneously, but API call that take a non-const pointer to a context + * need exclusive access to it. In particular this is the case for + * secp256k1_context_destroy and secp256k1_context_randomize. + * + * Regarding randomization, either do it once at creation time (in which case + * you do not need any locking for the other calls), or use a read-write lock. + */ +typedef struct secp256k1_context_struct secp256k1_context; + +/** Opaque data structure that holds rewriteable "scratch space" + * + * The purpose of this structure is to replace dynamic memory allocations, + * because we target architectures where this may not be available. It is + * essentially a resizable (within specified parameters) block of bytes, + * which is initially created either by memory allocation or TODO as a pointer + * into some fixed rewritable space. + * + * Unlike the context object, this cannot safely be shared between threads + * without additional synchronization logic. + */ +typedef struct secp256k1_scratch_space_struct secp256k1_scratch_space; + +/** Opaque data structure that holds a parsed and valid public key. + * + * The exact representation of data inside is implementation defined and not + * guaranteed to be portable between different platforms or versions. It is + * however guaranteed to be 64 bytes in size, and can be safely copied/moved. + * If you need to convert to a format suitable for storage, transmission, or + * comparison, use secp256k1_ec_pubkey_serialize and secp256k1_ec_pubkey_parse. + */ +typedef struct { + unsigned char data[64]; +} secp256k1_pubkey; + +/** Opaque data structured that holds a parsed ECDSA signature. + * + * The exact representation of data inside is implementation defined and not + * guaranteed to be portable between different platforms or versions. It is + * however guaranteed to be 64 bytes in size, and can be safely copied/moved. + * If you need to convert to a format suitable for storage, transmission, or + * comparison, use the secp256k1_ecdsa_signature_serialize_* and + * secp256k1_ecdsa_signature_parse_* functions. + */ +typedef struct { + unsigned char data[64]; +} secp256k1_ecdsa_signature; + +/** A pointer to a function to deterministically generate a nonce. + * + * Returns: 1 if a nonce was successfully generated. 0 will cause signing to fail. + * Out: nonce32: pointer to a 32-byte array to be filled by the function. + * In: msg32: the 32-byte message hash being verified (will not be NULL) + * key32: pointer to a 32-byte secret key (will not be NULL) + * algo16: pointer to a 16-byte array describing the signature + * algorithm (will be NULL for ECDSA for compatibility). + * data: Arbitrary data pointer that is passed through. + * attempt: how many iterations we have tried to find a nonce. + * This will almost always be 0, but different attempt values + * are required to result in a different nonce. + * + * Except for test cases, this function should compute some cryptographic hash of + * the message, the algorithm, the key and the attempt. + */ +typedef int (*secp256k1_nonce_function)( + unsigned char *nonce32, + const unsigned char *msg32, + const unsigned char *key32, + const unsigned char *algo16, + void *data, + unsigned int attempt +); + +# if !defined(SECP256K1_GNUC_PREREQ) +# if defined(__GNUC__)&&defined(__GNUC_MINOR__) +# define SECP256K1_GNUC_PREREQ(_maj,_min) \ + ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min)) +# else +# define SECP256K1_GNUC_PREREQ(_maj,_min) 0 +# endif +# endif + +# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) +# if SECP256K1_GNUC_PREREQ(2,7) +# define SECP256K1_INLINE __inline__ +# elif (defined(_MSC_VER)) +# define SECP256K1_INLINE __inline +# else +# define SECP256K1_INLINE +# endif +# else +# define SECP256K1_INLINE inline +# endif + +#ifndef SECP256K1_API +# if defined(_WIN32) +# ifdef SECP256K1_BUILD +# define SECP256K1_API __declspec(dllexport) +# else +# define SECP256K1_API +# endif +# elif defined(__GNUC__) && defined(SECP256K1_BUILD) +# define SECP256K1_API __attribute__ ((visibility ("default"))) +# else +# define SECP256K1_API +# endif +#endif + +/**Warning attributes + * NONNULL is not used if SECP256K1_BUILD is set to avoid the compiler optimizing out + * some paranoid null checks. */ +# if defined(__GNUC__) && SECP256K1_GNUC_PREREQ(3, 4) +# define SECP256K1_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) +# else +# define SECP256K1_WARN_UNUSED_RESULT +# endif +# if !defined(SECP256K1_BUILD) && defined(__GNUC__) && SECP256K1_GNUC_PREREQ(3, 4) +# define SECP256K1_ARG_NONNULL(_x) __attribute__ ((__nonnull__(_x))) +# else +# define SECP256K1_ARG_NONNULL(_x) +# endif + +/** All flags' lower 8 bits indicate what they're for. Do not use directly. */ +#define SECP256K1_FLAGS_TYPE_MASK ((1 << 8) - 1) +#define SECP256K1_FLAGS_TYPE_CONTEXT (1 << 0) +#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1) +/** The higher bits contain the actual data. Do not use directly. */ +#define SECP256K1_FLAGS_BIT_CONTEXT_VERIFY (1 << 8) +#define SECP256K1_FLAGS_BIT_CONTEXT_SIGN (1 << 9) +#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8) + +/** Flags to pass to secp256k1_context_create. */ +#define SECP256K1_CONTEXT_VERIFY (SECP256K1_FLAGS_TYPE_CONTEXT | SECP256K1_FLAGS_BIT_CONTEXT_VERIFY) +#define SECP256K1_CONTEXT_SIGN (SECP256K1_FLAGS_TYPE_CONTEXT | SECP256K1_FLAGS_BIT_CONTEXT_SIGN) +#define SECP256K1_CONTEXT_NONE (SECP256K1_FLAGS_TYPE_CONTEXT) + +/** Flag to pass to secp256k1_ec_pubkey_serialize and secp256k1_ec_privkey_export. */ +#define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION) +#define SECP256K1_EC_UNCOMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION) + +/** Prefix byte used to tag various encoded curvepoints for specific purposes */ +#define SECP256K1_TAG_PUBKEY_EVEN 0x02 +#define SECP256K1_TAG_PUBKEY_ODD 0x03 +#define SECP256K1_TAG_PUBKEY_UNCOMPRESSED 0x04 +#define SECP256K1_TAG_PUBKEY_HYBRID_EVEN 0x06 +#define SECP256K1_TAG_PUBKEY_HYBRID_ODD 0x07 + +/** Create a secp256k1 context object. + * + * Returns: a newly created context object. + * In: flags: which parts of the context to initialize. + * + * See also secp256k1_context_randomize. + */ +SECP256K1_API secp256k1_context* secp256k1_context_create( + unsigned int flags +) SECP256K1_WARN_UNUSED_RESULT; + +/** Copies a secp256k1 context object. + * + * Returns: a newly created context object. + * Args: ctx: an existing context to copy (cannot be NULL) + */ +SECP256K1_API secp256k1_context* secp256k1_context_clone( + const secp256k1_context* ctx +) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT; + +/** Destroy a secp256k1 context object. + * + * The context pointer may not be used afterwards. + * Args: ctx: an existing context to destroy (cannot be NULL) + */ +SECP256K1_API void secp256k1_context_destroy( + secp256k1_context* ctx +); + +/** Set a callback function to be called when an illegal argument is passed to + * an API call. It will only trigger for violations that are mentioned + * explicitly in the header. + * + * The philosophy is that these shouldn't be dealt with through a + * specific return value, as calling code should not have branches to deal with + * the case that this code itself is broken. + * + * On the other hand, during debug stage, one would want to be informed about + * such mistakes, and the default (crashing) may be inadvisable. + * When this callback is triggered, the API function called is guaranteed not + * to cause a crash, though its return value and output arguments are + * undefined. + * + * Args: ctx: an existing context object (cannot be NULL) + * In: fun: a pointer to a function to call when an illegal argument is + * passed to the API, taking a message and an opaque pointer + * (NULL restores a default handler that calls abort). + * data: the opaque pointer to pass to fun above. + */ +SECP256K1_API void secp256k1_context_set_illegal_callback( + secp256k1_context* ctx, + void (*fun)(const char* message, void* data), + const void* data +) SECP256K1_ARG_NONNULL(1); + +/** Set a callback function to be called when an internal consistency check + * fails. The default is crashing. + * + * This can only trigger in case of a hardware failure, miscompilation, + * memory corruption, serious bug in the library, or other error would can + * otherwise result in undefined behaviour. It will not trigger due to mere + * incorrect usage of the API (see secp256k1_context_set_illegal_callback + * for that). After this callback returns, anything may happen, including + * crashing. + * + * Args: ctx: an existing context object (cannot be NULL) + * In: fun: a pointer to a function to call when an internal error occurs, + * taking a message and an opaque pointer (NULL restores a default + * handler that calls abort). + * data: the opaque pointer to pass to fun above. + */ +SECP256K1_API void secp256k1_context_set_error_callback( + secp256k1_context* ctx, + void (*fun)(const char* message, void* data), + const void* data +) SECP256K1_ARG_NONNULL(1); + +/** Create a secp256k1 scratch space object. + * + * Returns: a newly created scratch space. + * Args: ctx: an existing context object (cannot be NULL) + * In: max_size: maximum amount of memory to allocate + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space* secp256k1_scratch_space_create( + const secp256k1_context* ctx, + size_t max_size +) SECP256K1_ARG_NONNULL(1); + +/** Destroy a secp256k1 scratch space. + * + * The pointer may not be used afterwards. + * Args: scratch: space to destroy + */ +SECP256K1_API void secp256k1_scratch_space_destroy( + secp256k1_scratch_space* scratch +); + +/** Parse a variable-length public key into the pubkey object. + * + * Returns: 1 if the public key was fully valid. + * 0 if the public key could not be parsed or is invalid. + * Args: ctx: a secp256k1 context object. + * Out: pubkey: pointer to a pubkey object. If 1 is returned, it is set to a + * parsed version of input. If not, its value is undefined. + * In: input: pointer to a serialized public key + * inputlen: length of the array pointed to by input + * + * This function supports parsing compressed (33 bytes, header byte 0x02 or + * 0x03), uncompressed (65 bytes, header byte 0x04), or hybrid (65 bytes, header + * byte 0x06 or 0x07) format public keys. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_parse( + const secp256k1_context* ctx, + secp256k1_pubkey* pubkey, + const unsigned char *input, + size_t inputlen +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Serialize a pubkey object into a serialized byte sequence. + * + * Returns: 1 always. + * Args: ctx: a secp256k1 context object. + * Out: output: a pointer to a 65-byte (if compressed==0) or 33-byte (if + * compressed==1) byte array to place the serialized key + * in. + * In/Out: outputlen: a pointer to an integer which is initially set to the + * size of output, and is overwritten with the written + * size. + * In: pubkey: a pointer to a secp256k1_pubkey containing an + * initialized public key. + * flags: SECP256K1_EC_COMPRESSED if serialization should be in + * compressed format, otherwise SECP256K1_EC_UNCOMPRESSED. + */ +SECP256K1_API int secp256k1_ec_pubkey_serialize( + const secp256k1_context* ctx, + unsigned char *output, + size_t *outputlen, + const secp256k1_pubkey* pubkey, + unsigned int flags +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Parse an ECDSA signature in compact (64 bytes) format. + * + * Returns: 1 when the signature could be parsed, 0 otherwise. + * Args: ctx: a secp256k1 context object + * Out: sig: a pointer to a signature object + * In: input64: a pointer to the 64-byte array to parse + * + * The signature must consist of a 32-byte big endian R value, followed by a + * 32-byte big endian S value. If R or S fall outside of [0..order-1], the + * encoding is invalid. R and S with value 0 are allowed in the encoding. + * + * After the call, sig will always be initialized. If parsing failed or R or + * S are zero, the resulting sig value is guaranteed to fail validation for any + * message and public key. + */ +SECP256K1_API int secp256k1_ecdsa_signature_parse_compact( + const secp256k1_context* ctx, + secp256k1_ecdsa_signature* sig, + const unsigned char *input64 +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Parse a DER ECDSA signature. + * + * Returns: 1 when the signature could be parsed, 0 otherwise. + * Args: ctx: a secp256k1 context object + * Out: sig: a pointer to a signature object + * In: input: a pointer to the signature to be parsed + * inputlen: the length of the array pointed to be input + * + * This function will accept any valid DER encoded signature, even if the + * encoded numbers are out of range. + * + * After the call, sig will always be initialized. If parsing failed or the + * encoded numbers are out of range, signature validation with it is + * guaranteed to fail for every message and public key. + */ +SECP256K1_API int secp256k1_ecdsa_signature_parse_der( + const secp256k1_context* ctx, + secp256k1_ecdsa_signature* sig, + const unsigned char *input, + size_t inputlen +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Serialize an ECDSA signature in DER format. + * + * Returns: 1 if enough space was available to serialize, 0 otherwise + * Args: ctx: a secp256k1 context object + * Out: output: a pointer to an array to store the DER serialization + * In/Out: outputlen: a pointer to a length integer. Initially, this integer + * should be set to the length of output. After the call + * it will be set to the length of the serialization (even + * if 0 was returned). + * In: sig: a pointer to an initialized signature object + */ +SECP256K1_API int secp256k1_ecdsa_signature_serialize_der( + const secp256k1_context* ctx, + unsigned char *output, + size_t *outputlen, + const secp256k1_ecdsa_signature* sig +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Serialize an ECDSA signature in compact (64 byte) format. + * + * Returns: 1 + * Args: ctx: a secp256k1 context object + * Out: output64: a pointer to a 64-byte array to store the compact serialization + * In: sig: a pointer to an initialized signature object + * + * See secp256k1_ecdsa_signature_parse_compact for details about the encoding. + */ +SECP256K1_API int secp256k1_ecdsa_signature_serialize_compact( + const secp256k1_context* ctx, + unsigned char *output64, + const secp256k1_ecdsa_signature* sig +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Verify an ECDSA signature. + * + * Returns: 1: correct signature + * 0: incorrect or unparseable signature + * Args: ctx: a secp256k1 context object, initialized for verification. + * In: sig: the signature being verified (cannot be NULL) + * msg32: the 32-byte message hash being verified (cannot be NULL) + * pubkey: pointer to an initialized public key to verify with (cannot be NULL) + * + * To avoid accepting malleable signatures, only ECDSA signatures in lower-S + * form are accepted. + * + * If you need to accept ECDSA signatures from sources that do not obey this + * rule, apply secp256k1_ecdsa_signature_normalize to the signature prior to + * validation, but be aware that doing so results in malleable signatures. + * + * For details, see the comments for that function. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_verify( + const secp256k1_context* ctx, + const secp256k1_ecdsa_signature *sig, + const unsigned char *msg32, + const secp256k1_pubkey *pubkey +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Convert a signature to a normalized lower-S form. + * + * Returns: 1 if sigin was not normalized, 0 if it already was. + * Args: ctx: a secp256k1 context object + * Out: sigout: a pointer to a signature to fill with the normalized form, + * or copy if the input was already normalized. (can be NULL if + * you're only interested in whether the input was already + * normalized). + * In: sigin: a pointer to a signature to check/normalize (cannot be NULL, + * can be identical to sigout) + * + * With ECDSA a third-party can forge a second distinct signature of the same + * message, given a single initial signature, but without knowing the key. This + * is done by negating the S value modulo the order of the curve, 'flipping' + * the sign of the random point R which is not included in the signature. + * + * Forgery of the same message isn't universally problematic, but in systems + * where message malleability or uniqueness of signatures is important this can + * cause issues. This forgery can be blocked by all verifiers forcing signers + * to use a normalized form. + * + * The lower-S form reduces the size of signatures slightly on average when + * variable length encodings (such as DER) are used and is cheap to verify, + * making it a good choice. Security of always using lower-S is assured because + * anyone can trivially modify a signature after the fact to enforce this + * property anyway. + * + * The lower S value is always between 0x1 and + * 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, + * inclusive. + * + * No other forms of ECDSA malleability are known and none seem likely, but + * there is no formal proof that ECDSA, even with this additional restriction, + * is free of other malleability. Commonly used serialization schemes will also + * accept various non-unique encodings, so care should be taken when this + * property is required for an application. + * + * The secp256k1_ecdsa_sign function will by default create signatures in the + * lower-S form, and secp256k1_ecdsa_verify will not accept others. In case + * signatures come from a system that cannot enforce this property, + * secp256k1_ecdsa_signature_normalize must be called before verification. + */ +SECP256K1_API int secp256k1_ecdsa_signature_normalize( + const secp256k1_context* ctx, + secp256k1_ecdsa_signature *sigout, + const secp256k1_ecdsa_signature *sigin +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3); + +/** An implementation of RFC6979 (using HMAC-SHA256) as nonce generation function. + * If a data pointer is passed, it is assumed to be a pointer to 32 bytes of + * extra entropy. + */ +SECP256K1_API extern const secp256k1_nonce_function secp256k1_nonce_function_rfc6979; + +/** A default safe nonce generation function (currently equal to secp256k1_nonce_function_rfc6979). */ +SECP256K1_API extern const secp256k1_nonce_function secp256k1_nonce_function_default; + +/** Create an ECDSA signature. + * + * Returns: 1: signature created + * 0: the nonce generation function failed, or the private key was invalid. + * Args: ctx: pointer to a context object, initialized for signing (cannot be NULL) + * Out: sig: pointer to an array where the signature will be placed (cannot be NULL) + * In: msg32: the 32-byte message hash being signed (cannot be NULL) + * seckey: pointer to a 32-byte secret key (cannot be NULL) + * noncefp:pointer to a nonce generation function. If NULL, secp256k1_nonce_function_default is used + * ndata: pointer to arbitrary data used by the nonce generation function (can be NULL) + * + * The created signature is always in lower-S form. See + * secp256k1_ecdsa_signature_normalize for more details. + */ +SECP256K1_API int secp256k1_ecdsa_sign( + const secp256k1_context* ctx, + secp256k1_ecdsa_signature *sig, + const unsigned char *msg32, + const unsigned char *seckey, + secp256k1_nonce_function noncefp, + const void *ndata +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Verify an ECDSA secret key. + * + * Returns: 1: secret key is valid + * 0: secret key is invalid + * Args: ctx: pointer to a context object (cannot be NULL) + * In: seckey: pointer to a 32-byte secret key (cannot be NULL) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_verify( + const secp256k1_context* ctx, + const unsigned char *seckey +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2); + +/** Compute the public key for a secret key. + * + * Returns: 1: secret was valid, public key stores + * 0: secret was invalid, try again + * Args: ctx: pointer to a context object, initialized for signing (cannot be NULL) + * Out: pubkey: pointer to the created public key (cannot be NULL) + * In: seckey: pointer to a 32-byte private key (cannot be NULL) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create( + const secp256k1_context* ctx, + secp256k1_pubkey *pubkey, + const unsigned char *seckey +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Negates a private key in place. + * + * Returns: 1 always + * Args: ctx: pointer to a context object + * In/Out: seckey: pointer to the 32-byte private key to be negated (cannot be NULL) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_negate( + const secp256k1_context* ctx, + unsigned char *seckey +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2); + +/** Negates a public key in place. + * + * Returns: 1 always + * Args: ctx: pointer to a context object + * In/Out: pubkey: pointer to the public key to be negated (cannot be NULL) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_negate( + const secp256k1_context* ctx, + secp256k1_pubkey *pubkey +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2); + +/** Tweak a private key by adding tweak to it. + * Returns: 0 if the tweak was out of range (chance of around 1 in 2^128 for + * uniformly random 32-byte arrays, or if the resulting private key + * would be invalid (only when the tweak is the complement of the + * private key). 1 otherwise. + * Args: ctx: pointer to a context object (cannot be NULL). + * In/Out: seckey: pointer to a 32-byte private key. + * In: tweak: pointer to a 32-byte tweak. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_add( + const secp256k1_context* ctx, + unsigned char *seckey, + const unsigned char *tweak +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Tweak a public key by adding tweak times the generator to it. + * Returns: 0 if the tweak was out of range (chance of around 1 in 2^128 for + * uniformly random 32-byte arrays, or if the resulting public key + * would be invalid (only when the tweak is the complement of the + * corresponding private key). 1 otherwise. + * Args: ctx: pointer to a context object initialized for validation + * (cannot be NULL). + * In/Out: pubkey: pointer to a public key object. + * In: tweak: pointer to a 32-byte tweak. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_add( + const secp256k1_context* ctx, + secp256k1_pubkey *pubkey, + const unsigned char *tweak +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Tweak a private key by multiplying it by a tweak. + * Returns: 0 if the tweak was out of range (chance of around 1 in 2^128 for + * uniformly random 32-byte arrays, or equal to zero. 1 otherwise. + * Args: ctx: pointer to a context object (cannot be NULL). + * In/Out: seckey: pointer to a 32-byte private key. + * In: tweak: pointer to a 32-byte tweak. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_mul( + const secp256k1_context* ctx, + unsigned char *seckey, + const unsigned char *tweak +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Tweak a public key by multiplying it by a tweak value. + * Returns: 0 if the tweak was out of range (chance of around 1 in 2^128 for + * uniformly random 32-byte arrays, or equal to zero. 1 otherwise. + * Args: ctx: pointer to a context object initialized for validation + * (cannot be NULL). + * In/Out: pubkey: pointer to a public key obkect. + * In: tweak: pointer to a 32-byte tweak. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_mul( + const secp256k1_context* ctx, + secp256k1_pubkey *pubkey, + const unsigned char *tweak +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Updates the context randomization to protect against side-channel leakage. + * Returns: 1: randomization successfully updated + * 0: error + * Args: ctx: pointer to a context object (cannot be NULL) + * In: seed32: pointer to a 32-byte random seed (NULL resets to initial state) + * + * While secp256k1 code is written to be constant-time no matter what secret + * values are, it's possible that a future compiler may output code which isn't, + * and also that the CPU may not emit the same radio frequencies or draw the same + * amount power for all values. + * + * This function provides a seed which is combined into the blinding value: that + * blinding value is added before each multiplication (and removed afterwards) so + * that it does not affect function results, but shields against attacks which + * rely on any input-dependent behaviour. + * + * You should call this after secp256k1_context_create or + * secp256k1_context_clone, and may call this repeatedly afterwards. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_context_randomize( + secp256k1_context* ctx, + const unsigned char *seed32 +) SECP256K1_ARG_NONNULL(1); + +/** Add a number of public keys together. + * Returns: 1: the sum of the public keys is valid. + * 0: the sum of the public keys is not valid. + * Args: ctx: pointer to a context object + * Out: out: pointer to a public key object for placing the resulting public key + * (cannot be NULL) + * In: ins: pointer to array of pointers to public keys (cannot be NULL) + * n: the number of public keys to add together (must be at least 1) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_combine( + const secp256k1_context* ctx, + secp256k1_pubkey *out, + const secp256k1_pubkey * const * ins, + size_t n +) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +#ifdef __cplusplus +} +#endif + +#endif /* SECP256K1_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/include/secp256k1_ecdh.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/include/secp256k1_ecdh.h new file mode 100644 index 000000000..88492dc1a --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/include/secp256k1_ecdh.h @@ -0,0 +1,31 @@ +#ifndef SECP256K1_ECDH_H +#define SECP256K1_ECDH_H + +#include "secp256k1.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** Compute an EC Diffie-Hellman secret in constant time + * Returns: 1: exponentiation was successful + * 0: scalar was invalid (zero or overflow) + * Args: ctx: pointer to a context object (cannot be NULL) + * Out: result: a 32-byte array which will be populated by an ECDH + * secret computed from the point and scalar + * In: pubkey: a pointer to a secp256k1_pubkey containing an + * initialized public key + * privkey: a 32-byte scalar with which to multiply the point + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdh( + const secp256k1_context* ctx, + unsigned char *result, + const secp256k1_pubkey *pubkey, + const unsigned char *privkey +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +#ifdef __cplusplus +} +#endif + +#endif /* SECP256K1_ECDH_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/include/secp256k1_recovery.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/include/secp256k1_recovery.h new file mode 100644 index 000000000..cf6c5ed7f --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/include/secp256k1_recovery.h @@ -0,0 +1,110 @@ +#ifndef SECP256K1_RECOVERY_H +#define SECP256K1_RECOVERY_H + +#include "secp256k1.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** Opaque data structured that holds a parsed ECDSA signature, + * supporting pubkey recovery. + * + * The exact representation of data inside is implementation defined and not + * guaranteed to be portable between different platforms or versions. It is + * however guaranteed to be 65 bytes in size, and can be safely copied/moved. + * If you need to convert to a format suitable for storage or transmission, use + * the secp256k1_ecdsa_signature_serialize_* and + * secp256k1_ecdsa_signature_parse_* functions. + * + * Furthermore, it is guaranteed that identical signatures (including their + * recoverability) will have identical representation, so they can be + * memcmp'ed. + */ +typedef struct { + unsigned char data[65]; +} secp256k1_ecdsa_recoverable_signature; + +/** Parse a compact ECDSA signature (64 bytes + recovery id). + * + * Returns: 1 when the signature could be parsed, 0 otherwise + * Args: ctx: a secp256k1 context object + * Out: sig: a pointer to a signature object + * In: input64: a pointer to a 64-byte compact signature + * recid: the recovery id (0, 1, 2 or 3) + */ +SECP256K1_API int secp256k1_ecdsa_recoverable_signature_parse_compact( + const secp256k1_context* ctx, + secp256k1_ecdsa_recoverable_signature* sig, + const unsigned char *input64, + int recid +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Convert a recoverable signature into a normal signature. + * + * Returns: 1 + * Out: sig: a pointer to a normal signature (cannot be NULL). + * In: sigin: a pointer to a recoverable signature (cannot be NULL). + */ +SECP256K1_API int secp256k1_ecdsa_recoverable_signature_convert( + const secp256k1_context* ctx, + secp256k1_ecdsa_signature* sig, + const secp256k1_ecdsa_recoverable_signature* sigin +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Serialize an ECDSA signature in compact format (64 bytes + recovery id). + * + * Returns: 1 + * Args: ctx: a secp256k1 context object + * Out: output64: a pointer to a 64-byte array of the compact signature (cannot be NULL) + * recid: a pointer to an integer to hold the recovery id (can be NULL). + * In: sig: a pointer to an initialized signature object (cannot be NULL) + */ +SECP256K1_API int secp256k1_ecdsa_recoverable_signature_serialize_compact( + const secp256k1_context* ctx, + unsigned char *output64, + int *recid, + const secp256k1_ecdsa_recoverable_signature* sig +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Create a recoverable ECDSA signature. + * + * Returns: 1: signature created + * 0: the nonce generation function failed, or the private key was invalid. + * Args: ctx: pointer to a context object, initialized for signing (cannot be NULL) + * Out: sig: pointer to an array where the signature will be placed (cannot be NULL) + * In: msg32: the 32-byte message hash being signed (cannot be NULL) + * seckey: pointer to a 32-byte secret key (cannot be NULL) + * noncefp:pointer to a nonce generation function. If NULL, secp256k1_nonce_function_default is used + * ndata: pointer to arbitrary data used by the nonce generation function (can be NULL) + */ +SECP256K1_API int secp256k1_ecdsa_sign_recoverable( + const secp256k1_context* ctx, + secp256k1_ecdsa_recoverable_signature *sig, + const unsigned char *msg32, + const unsigned char *seckey, + secp256k1_nonce_function noncefp, + const void *ndata +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Recover an ECDSA public key from a signature. + * + * Returns: 1: public key successfully recovered (which guarantees a correct signature). + * 0: otherwise. + * Args: ctx: pointer to a context object, initialized for verification (cannot be NULL) + * Out: pubkey: pointer to the recovered public key (cannot be NULL) + * In: sig: pointer to initialized signature that supports pubkey recovery (cannot be NULL) + * msg32: the 32-byte message hash assumed to be signed (cannot be NULL) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_recover( + const secp256k1_context* ctx, + secp256k1_pubkey *pubkey, + const secp256k1_ecdsa_recoverable_signature *sig, + const unsigned char *msg32 +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +#ifdef __cplusplus +} +#endif + +#endif /* SECP256K1_RECOVERY_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/basic-config.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/basic-config.h new file mode 100644 index 000000000..fc588061c --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/basic-config.h @@ -0,0 +1,33 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_BASIC_CONFIG_H +#define SECP256K1_BASIC_CONFIG_H + +#ifdef USE_BASIC_CONFIG + +#undef USE_ASM_X86_64 +#undef USE_ENDOMORPHISM +#undef USE_FIELD_10X26 +#undef USE_FIELD_5X52 +#undef USE_FIELD_INV_BUILTIN +#undef USE_FIELD_INV_NUM +#undef USE_NUM_GMP +#undef USE_NUM_NONE +#undef USE_SCALAR_4X64 +#undef USE_SCALAR_8X32 +#undef USE_SCALAR_INV_BUILTIN +#undef USE_SCALAR_INV_NUM + +#define USE_NUM_NONE 1 +#define USE_FIELD_INV_BUILTIN 1 +#define USE_SCALAR_INV_BUILTIN 1 +#define USE_FIELD_10X26 1 +#define USE_SCALAR_8X32 1 + +#endif /* USE_BASIC_CONFIG */ + +#endif /* SECP256K1_BASIC_CONFIG_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecdsa.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecdsa.h new file mode 100644 index 000000000..80590c7cc --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecdsa.h @@ -0,0 +1,21 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_ECDSA_H +#define SECP256K1_ECDSA_H + +#include + +#include "scalar.h" +#include "group.h" +#include "ecmult.h" + +static int secp256k1_ecdsa_sig_parse(secp256k1_scalar *r, secp256k1_scalar *s, const unsigned char *sig, size_t size); +static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, size_t *size, const secp256k1_scalar *r, const secp256k1_scalar *s); +static int secp256k1_ecdsa_sig_verify(const secp256k1_ecmult_context *ctx, const secp256k1_scalar* r, const secp256k1_scalar* s, const secp256k1_ge *pubkey, const secp256k1_scalar *message); +static int secp256k1_ecdsa_sig_sign(const secp256k1_ecmult_gen_context *ctx, secp256k1_scalar* r, secp256k1_scalar* s, const secp256k1_scalar *seckey, const secp256k1_scalar *message, const secp256k1_scalar *nonce, int *recid); + +#endif /* SECP256K1_ECDSA_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecdsa_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecdsa_impl.h new file mode 100644 index 000000000..c3400042d --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecdsa_impl.h @@ -0,0 +1,313 @@ +/********************************************************************** + * Copyright (c) 2013-2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + + +#ifndef SECP256K1_ECDSA_IMPL_H +#define SECP256K1_ECDSA_IMPL_H + +#include "scalar.h" +#include "field.h" +#include "group.h" +#include "ecmult.h" +#include "ecmult_gen.h" +#include "ecdsa.h" + +/** Group order for secp256k1 defined as 'n' in "Standards for Efficient Cryptography" (SEC2) 2.7.1 + * sage: for t in xrange(1023, -1, -1): + * .. p = 2**256 - 2**32 - t + * .. if p.is_prime(): + * .. print '%x'%p + * .. break + * 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f' + * sage: a = 0 + * sage: b = 7 + * sage: F = FiniteField (p) + * sage: '%x' % (EllipticCurve ([F (a), F (b)]).order()) + * 'fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141' + */ +static const secp256k1_fe secp256k1_ecdsa_const_order_as_fe = SECP256K1_FE_CONST( + 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFEUL, + 0xBAAEDCE6UL, 0xAF48A03BUL, 0xBFD25E8CUL, 0xD0364141UL +); + +/** Difference between field and order, values 'p' and 'n' values defined in + * "Standards for Efficient Cryptography" (SEC2) 2.7.1. + * sage: p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F + * sage: a = 0 + * sage: b = 7 + * sage: F = FiniteField (p) + * sage: '%x' % (p - EllipticCurve ([F (a), F (b)]).order()) + * '14551231950b75fc4402da1722fc9baee' + */ +static const secp256k1_fe secp256k1_ecdsa_const_p_minus_order = SECP256K1_FE_CONST( + 0, 0, 0, 1, 0x45512319UL, 0x50B75FC4UL, 0x402DA172UL, 0x2FC9BAEEUL +); + +static int secp256k1_der_read_len(const unsigned char **sigp, const unsigned char *sigend) { + int lenleft, b1; + size_t ret = 0; + if (*sigp >= sigend) { + return -1; + } + b1 = *((*sigp)++); + if (b1 == 0xFF) { + /* X.690-0207 8.1.3.5.c the value 0xFF shall not be used. */ + return -1; + } + if ((b1 & 0x80) == 0) { + /* X.690-0207 8.1.3.4 short form length octets */ + return b1; + } + if (b1 == 0x80) { + /* Indefinite length is not allowed in DER. */ + return -1; + } + /* X.690-207 8.1.3.5 long form length octets */ + lenleft = b1 & 0x7F; + if (lenleft > sigend - *sigp) { + return -1; + } + if (**sigp == 0) { + /* Not the shortest possible length encoding. */ + return -1; + } + if ((size_t)lenleft > sizeof(size_t)) { + /* The resulting length would exceed the range of a size_t, so + * certainly longer than the passed array size. + */ + return -1; + } + while (lenleft > 0) { + ret = (ret << 8) | **sigp; + if (ret + lenleft > (size_t)(sigend - *sigp)) { + /* Result exceeds the length of the passed array. */ + return -1; + } + (*sigp)++; + lenleft--; + } + if (ret < 128) { + /* Not the shortest possible length encoding. */ + return -1; + } + return ret; +} + +static int secp256k1_der_parse_integer(secp256k1_scalar *r, const unsigned char **sig, const unsigned char *sigend) { + int overflow = 0; + unsigned char ra[32] = {0}; + int rlen; + + if (*sig == sigend || **sig != 0x02) { + /* Not a primitive integer (X.690-0207 8.3.1). */ + return 0; + } + (*sig)++; + rlen = secp256k1_der_read_len(sig, sigend); + if (rlen <= 0 || (*sig) + rlen > sigend) { + /* Exceeds bounds or not at least length 1 (X.690-0207 8.3.1). */ + return 0; + } + if (**sig == 0x00 && rlen > 1 && (((*sig)[1]) & 0x80) == 0x00) { + /* Excessive 0x00 padding. */ + return 0; + } + if (**sig == 0xFF && rlen > 1 && (((*sig)[1]) & 0x80) == 0x80) { + /* Excessive 0xFF padding. */ + return 0; + } + if ((**sig & 0x80) == 0x80) { + /* Negative. */ + overflow = 1; + } + while (rlen > 0 && **sig == 0) { + /* Skip leading zero bytes */ + rlen--; + (*sig)++; + } + if (rlen > 32) { + overflow = 1; + } + if (!overflow) { + memcpy(ra + 32 - rlen, *sig, rlen); + secp256k1_scalar_set_b32(r, ra, &overflow); + } + if (overflow) { + secp256k1_scalar_set_int(r, 0); + } + (*sig) += rlen; + return 1; +} + +static int secp256k1_ecdsa_sig_parse(secp256k1_scalar *rr, secp256k1_scalar *rs, const unsigned char *sig, size_t size) { + const unsigned char *sigend = sig + size; + int rlen; + if (sig == sigend || *(sig++) != 0x30) { + /* The encoding doesn't start with a constructed sequence (X.690-0207 8.9.1). */ + return 0; + } + rlen = secp256k1_der_read_len(&sig, sigend); + if (rlen < 0 || sig + rlen > sigend) { + /* Tuple exceeds bounds */ + return 0; + } + if (sig + rlen != sigend) { + /* Garbage after tuple. */ + return 0; + } + + if (!secp256k1_der_parse_integer(rr, &sig, sigend)) { + return 0; + } + if (!secp256k1_der_parse_integer(rs, &sig, sigend)) { + return 0; + } + + if (sig != sigend) { + /* Trailing garbage inside tuple. */ + return 0; + } + + return 1; +} + +static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, size_t *size, const secp256k1_scalar* ar, const secp256k1_scalar* as) { + unsigned char r[33] = {0}, s[33] = {0}; + unsigned char *rp = r, *sp = s; + size_t lenR = 33, lenS = 33; + secp256k1_scalar_get_b32(&r[1], ar); + secp256k1_scalar_get_b32(&s[1], as); + while (lenR > 1 && rp[0] == 0 && rp[1] < 0x80) { lenR--; rp++; } + while (lenS > 1 && sp[0] == 0 && sp[1] < 0x80) { lenS--; sp++; } + if (*size < 6+lenS+lenR) { + *size = 6 + lenS + lenR; + return 0; + } + *size = 6 + lenS + lenR; + sig[0] = 0x30; + sig[1] = 4 + lenS + lenR; + sig[2] = 0x02; + sig[3] = lenR; + memcpy(sig+4, rp, lenR); + sig[4+lenR] = 0x02; + sig[5+lenR] = lenS; + memcpy(sig+lenR+6, sp, lenS); + return 1; +} + +static int secp256k1_ecdsa_sig_verify(const secp256k1_ecmult_context *ctx, const secp256k1_scalar *sigr, const secp256k1_scalar *sigs, const secp256k1_ge *pubkey, const secp256k1_scalar *message) { + unsigned char c[32]; + secp256k1_scalar sn, u1, u2; +#if !defined(EXHAUSTIVE_TEST_ORDER) + secp256k1_fe xr; +#endif + secp256k1_gej pubkeyj; + secp256k1_gej pr; + + if (secp256k1_scalar_is_zero(sigr) || secp256k1_scalar_is_zero(sigs)) { + return 0; + } + + secp256k1_scalar_inverse_var(&sn, sigs); + secp256k1_scalar_mul(&u1, &sn, message); + secp256k1_scalar_mul(&u2, &sn, sigr); + secp256k1_gej_set_ge(&pubkeyj, pubkey); + secp256k1_ecmult(ctx, &pr, &pubkeyj, &u2, &u1); + if (secp256k1_gej_is_infinity(&pr)) { + return 0; + } + +#if defined(EXHAUSTIVE_TEST_ORDER) +{ + secp256k1_scalar computed_r; + secp256k1_ge pr_ge; + secp256k1_ge_set_gej(&pr_ge, &pr); + secp256k1_fe_normalize(&pr_ge.x); + + secp256k1_fe_get_b32(c, &pr_ge.x); + secp256k1_scalar_set_b32(&computed_r, c, NULL); + return secp256k1_scalar_eq(sigr, &computed_r); +} +#else + secp256k1_scalar_get_b32(c, sigr); + secp256k1_fe_set_b32(&xr, c); + + /** We now have the recomputed R point in pr, and its claimed x coordinate (modulo n) + * in xr. Naively, we would extract the x coordinate from pr (requiring a inversion modulo p), + * compute the remainder modulo n, and compare it to xr. However: + * + * xr == X(pr) mod n + * <=> exists h. (xr + h * n < p && xr + h * n == X(pr)) + * [Since 2 * n > p, h can only be 0 or 1] + * <=> (xr == X(pr)) || (xr + n < p && xr + n == X(pr)) + * [In Jacobian coordinates, X(pr) is pr.x / pr.z^2 mod p] + * <=> (xr == pr.x / pr.z^2 mod p) || (xr + n < p && xr + n == pr.x / pr.z^2 mod p) + * [Multiplying both sides of the equations by pr.z^2 mod p] + * <=> (xr * pr.z^2 mod p == pr.x) || (xr + n < p && (xr + n) * pr.z^2 mod p == pr.x) + * + * Thus, we can avoid the inversion, but we have to check both cases separately. + * secp256k1_gej_eq_x implements the (xr * pr.z^2 mod p == pr.x) test. + */ + if (secp256k1_gej_eq_x_var(&xr, &pr)) { + /* xr * pr.z^2 mod p == pr.x, so the signature is valid. */ + return 1; + } + if (secp256k1_fe_cmp_var(&xr, &secp256k1_ecdsa_const_p_minus_order) >= 0) { + /* xr + n >= p, so we can skip testing the second case. */ + return 0; + } + secp256k1_fe_add(&xr, &secp256k1_ecdsa_const_order_as_fe); + if (secp256k1_gej_eq_x_var(&xr, &pr)) { + /* (xr + n) * pr.z^2 mod p == pr.x, so the signature is valid. */ + return 1; + } + return 0; +#endif +} + +static int secp256k1_ecdsa_sig_sign(const secp256k1_ecmult_gen_context *ctx, secp256k1_scalar *sigr, secp256k1_scalar *sigs, const secp256k1_scalar *seckey, const secp256k1_scalar *message, const secp256k1_scalar *nonce, int *recid) { + unsigned char b[32]; + secp256k1_gej rp; + secp256k1_ge r; + secp256k1_scalar n; + int overflow = 0; + + secp256k1_ecmult_gen(ctx, &rp, nonce); + secp256k1_ge_set_gej(&r, &rp); + secp256k1_fe_normalize(&r.x); + secp256k1_fe_normalize(&r.y); + secp256k1_fe_get_b32(b, &r.x); + secp256k1_scalar_set_b32(sigr, b, &overflow); + /* These two conditions should be checked before calling */ + VERIFY_CHECK(!secp256k1_scalar_is_zero(sigr)); + VERIFY_CHECK(overflow == 0); + + if (recid) { + /* The overflow condition is cryptographically unreachable as hitting it requires finding the discrete log + * of some P where P.x >= order, and only 1 in about 2^127 points meet this criteria. + */ + *recid = (overflow ? 2 : 0) | (secp256k1_fe_is_odd(&r.y) ? 1 : 0); + } + secp256k1_scalar_mul(&n, sigr, seckey); + secp256k1_scalar_add(&n, &n, message); + secp256k1_scalar_inverse(sigs, nonce); + secp256k1_scalar_mul(sigs, sigs, &n); + secp256k1_scalar_clear(&n); + secp256k1_gej_clear(&rp); + secp256k1_ge_clear(&r); + if (secp256k1_scalar_is_zero(sigs)) { + return 0; + } + if (secp256k1_scalar_is_high(sigs)) { + secp256k1_scalar_negate(sigs, sigs); + if (recid) { + *recid ^= 1; + } + } + return 1; +} + +#endif /* SECP256K1_ECDSA_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/eckey.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/eckey.h new file mode 100644 index 000000000..b621f1e6c --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/eckey.h @@ -0,0 +1,25 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_ECKEY_H +#define SECP256K1_ECKEY_H + +#include + +#include "group.h" +#include "scalar.h" +#include "ecmult.h" +#include "ecmult_gen.h" + +static int secp256k1_eckey_pubkey_parse(secp256k1_ge *elem, const unsigned char *pub, size_t size); +static int secp256k1_eckey_pubkey_serialize(secp256k1_ge *elem, unsigned char *pub, size_t *size, int compressed); + +static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar *key, const secp256k1_scalar *tweak); +static int secp256k1_eckey_pubkey_tweak_add(const secp256k1_ecmult_context *ctx, secp256k1_ge *key, const secp256k1_scalar *tweak); +static int secp256k1_eckey_privkey_tweak_mul(secp256k1_scalar *key, const secp256k1_scalar *tweak); +static int secp256k1_eckey_pubkey_tweak_mul(const secp256k1_ecmult_context *ctx, secp256k1_ge *key, const secp256k1_scalar *tweak); + +#endif /* SECP256K1_ECKEY_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/eckey_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/eckey_impl.h new file mode 100644 index 000000000..1ab9a68ec --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/eckey_impl.h @@ -0,0 +1,100 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_ECKEY_IMPL_H +#define SECP256K1_ECKEY_IMPL_H + +#include "eckey.h" + +#include "scalar.h" +#include "field.h" +#include "group.h" +#include "ecmult_gen.h" + +static int secp256k1_eckey_pubkey_parse(secp256k1_ge *elem, const unsigned char *pub, size_t size) { + if (size == 33 && (pub[0] == SECP256K1_TAG_PUBKEY_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_ODD)) { + secp256k1_fe x; + return secp256k1_fe_set_b32(&x, pub+1) && secp256k1_ge_set_xo_var(elem, &x, pub[0] == SECP256K1_TAG_PUBKEY_ODD); + } else if (size == 65 && (pub[0] == 0x04 || pub[0] == 0x06 || pub[0] == 0x07)) { + secp256k1_fe x, y; + if (!secp256k1_fe_set_b32(&x, pub+1) || !secp256k1_fe_set_b32(&y, pub+33)) { + return 0; + } + secp256k1_ge_set_xy(elem, &x, &y); + if ((pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_EVEN || pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD) && + secp256k1_fe_is_odd(&y) != (pub[0] == SECP256K1_TAG_PUBKEY_HYBRID_ODD)) { + return 0; + } + return secp256k1_ge_is_valid_var(elem); + } else { + return 0; + } +} + +static int secp256k1_eckey_pubkey_serialize(secp256k1_ge *elem, unsigned char *pub, size_t *size, int compressed) { + if (secp256k1_ge_is_infinity(elem)) { + return 0; + } + secp256k1_fe_normalize_var(&elem->x); + secp256k1_fe_normalize_var(&elem->y); + secp256k1_fe_get_b32(&pub[1], &elem->x); + if (compressed) { + *size = 33; + pub[0] = secp256k1_fe_is_odd(&elem->y) ? SECP256K1_TAG_PUBKEY_ODD : SECP256K1_TAG_PUBKEY_EVEN; + } else { + *size = 65; + pub[0] = SECP256K1_TAG_PUBKEY_UNCOMPRESSED; + secp256k1_fe_get_b32(&pub[33], &elem->y); + } + return 1; +} + +static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar *key, const secp256k1_scalar *tweak) { + secp256k1_scalar_add(key, key, tweak); + if (secp256k1_scalar_is_zero(key)) { + return 0; + } + return 1; +} + +static int secp256k1_eckey_pubkey_tweak_add(const secp256k1_ecmult_context *ctx, secp256k1_ge *key, const secp256k1_scalar *tweak) { + secp256k1_gej pt; + secp256k1_scalar one; + secp256k1_gej_set_ge(&pt, key); + secp256k1_scalar_set_int(&one, 1); + secp256k1_ecmult(ctx, &pt, &pt, &one, tweak); + + if (secp256k1_gej_is_infinity(&pt)) { + return 0; + } + secp256k1_ge_set_gej(key, &pt); + return 1; +} + +static int secp256k1_eckey_privkey_tweak_mul(secp256k1_scalar *key, const secp256k1_scalar *tweak) { + if (secp256k1_scalar_is_zero(tweak)) { + return 0; + } + + secp256k1_scalar_mul(key, key, tweak); + return 1; +} + +static int secp256k1_eckey_pubkey_tweak_mul(const secp256k1_ecmult_context *ctx, secp256k1_ge *key, const secp256k1_scalar *tweak) { + secp256k1_scalar zero; + secp256k1_gej pt; + if (secp256k1_scalar_is_zero(tweak)) { + return 0; + } + + secp256k1_scalar_set_int(&zero, 0); + secp256k1_gej_set_ge(&pt, key); + secp256k1_ecmult(ctx, &pt, &pt, tweak, &zero); + secp256k1_ge_set_gej(key, &pt); + return 1; +} + +#endif /* SECP256K1_ECKEY_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult.h new file mode 100644 index 000000000..ea1cd8a21 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult.h @@ -0,0 +1,47 @@ +/********************************************************************** + * Copyright (c) 2013, 2014, 2017 Pieter Wuille, Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_ECMULT_H +#define SECP256K1_ECMULT_H + +#include "num.h" +#include "group.h" +#include "scalar.h" +#include "scratch.h" + +typedef struct { + /* For accelerating the computation of a*P + b*G: */ + secp256k1_ge_storage (*pre_g)[]; /* odd multiples of the generator */ +#ifdef USE_ENDOMORPHISM + secp256k1_ge_storage (*pre_g_128)[]; /* odd multiples of 2^128*generator */ +#endif +} secp256k1_ecmult_context; + +static void secp256k1_ecmult_context_init(secp256k1_ecmult_context *ctx); +static void secp256k1_ecmult_context_build(secp256k1_ecmult_context *ctx, const secp256k1_callback *cb); +static void secp256k1_ecmult_context_clone(secp256k1_ecmult_context *dst, + const secp256k1_ecmult_context *src, const secp256k1_callback *cb); +static void secp256k1_ecmult_context_clear(secp256k1_ecmult_context *ctx); +static int secp256k1_ecmult_context_is_built(const secp256k1_ecmult_context *ctx); + +/** Double multiply: R = na*A + ng*G */ +static void secp256k1_ecmult(const secp256k1_ecmult_context *ctx, secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng); + +typedef int (secp256k1_ecmult_multi_callback)(secp256k1_scalar *sc, secp256k1_ge *pt, size_t idx, void *data); + +/** + * Multi-multiply: R = inp_g_sc * G + sum_i ni * Ai. + * Chooses the right algorithm for a given number of points and scratch space + * size. Resets and overwrites the given scratch space. If the points do not + * fit in the scratch space the algorithm is repeatedly run with batches of + * points. + * Returns: 1 on success (including when inp_g_sc is NULL and n is 0) + * 0 if there is not enough scratch space for a single point or + * callback returns 0 + */ +static int secp256k1_ecmult_multi_var(const secp256k1_ecmult_context *ctx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n); + +#endif /* SECP256K1_ECMULT_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_const.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_const.h new file mode 100644 index 000000000..d4804b8b6 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_const.h @@ -0,0 +1,17 @@ +/********************************************************************** + * Copyright (c) 2015 Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_ECMULT_CONST_H +#define SECP256K1_ECMULT_CONST_H + +#include "scalar.h" +#include "group.h" + +/* Here `bits` should be set to the maximum bitlength of the _absolute value_ of `q`, plus + * one because we internally sometimes add 2 to the number during the WNAF conversion. */ +static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, const secp256k1_scalar *q, int bits); + +#endif /* SECP256K1_ECMULT_CONST_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_const_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_const_impl.h new file mode 100644 index 000000000..8411752eb --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_const_impl.h @@ -0,0 +1,257 @@ +/********************************************************************** + * Copyright (c) 2015 Pieter Wuille, Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_ECMULT_CONST_IMPL_H +#define SECP256K1_ECMULT_CONST_IMPL_H + +#include "scalar.h" +#include "group.h" +#include "ecmult_const.h" +#include "ecmult_impl.h" + +/* This is like `ECMULT_TABLE_GET_GE` but is constant time */ +#define ECMULT_CONST_TABLE_GET_GE(r,pre,n,w) do { \ + int m; \ + int abs_n = (n) * (((n) > 0) * 2 - 1); \ + int idx_n = abs_n / 2; \ + secp256k1_fe neg_y; \ + VERIFY_CHECK(((n) & 1) == 1); \ + VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \ + VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1)); \ + VERIFY_SETUP(secp256k1_fe_clear(&(r)->x)); \ + VERIFY_SETUP(secp256k1_fe_clear(&(r)->y)); \ + for (m = 0; m < ECMULT_TABLE_SIZE(w); m++) { \ + /* This loop is used to avoid secret data in array indices. See + * the comment in ecmult_gen_impl.h for rationale. */ \ + secp256k1_fe_cmov(&(r)->x, &(pre)[m].x, m == idx_n); \ + secp256k1_fe_cmov(&(r)->y, &(pre)[m].y, m == idx_n); \ + } \ + (r)->infinity = 0; \ + secp256k1_fe_negate(&neg_y, &(r)->y, 1); \ + secp256k1_fe_cmov(&(r)->y, &neg_y, (n) != abs_n); \ +} while(0) + + +/** Convert a number to WNAF notation. + * The number becomes represented by sum(2^{wi} * wnaf[i], i=0..WNAF_SIZE(w)+1) - return_val. + * It has the following guarantees: + * - each wnaf[i] an odd integer between -(1 << w) and (1 << w) + * - each wnaf[i] is nonzero + * - the number of words set is always WNAF_SIZE(w) + 1 + * + * Adapted from `The Width-w NAF Method Provides Small Memory and Fast Elliptic Scalar + * Multiplications Secure against Side Channel Attacks`, Okeya and Tagaki. M. Joye (Ed.) + * CT-RSA 2003, LNCS 2612, pp. 328-443, 2003. Springer-Verlagy Berlin Heidelberg 2003 + * + * Numbers reference steps of `Algorithm SPA-resistant Width-w NAF with Odd Scalar` on pp. 335 + */ +static int secp256k1_wnaf_const(int *wnaf, secp256k1_scalar s, int w, int size) { + int global_sign; + int skew = 0; + int word = 0; + + /* 1 2 3 */ + int u_last; + int u; + + int flip; + int bit; + secp256k1_scalar neg_s; + int not_neg_one; + /* Note that we cannot handle even numbers by negating them to be odd, as is + * done in other implementations, since if our scalars were specified to have + * width < 256 for performance reasons, their negations would have width 256 + * and we'd lose any performance benefit. Instead, we use a technique from + * Section 4.2 of the Okeya/Tagaki paper, which is to add either 1 (for even) + * or 2 (for odd) to the number we are encoding, returning a skew value indicating + * this, and having the caller compensate after doing the multiplication. + * + * In fact, we _do_ want to negate numbers to minimize their bit-lengths (and in + * particular, to ensure that the outputs from the endomorphism-split fit into + * 128 bits). If we negate, the parity of our number flips, inverting which of + * {1, 2} we want to add to the scalar when ensuring that it's odd. Further + * complicating things, -1 interacts badly with `secp256k1_scalar_cadd_bit` and + * we need to special-case it in this logic. */ + flip = secp256k1_scalar_is_high(&s); + /* We add 1 to even numbers, 2 to odd ones, noting that negation flips parity */ + bit = flip ^ !secp256k1_scalar_is_even(&s); + /* We check for negative one, since adding 2 to it will cause an overflow */ + secp256k1_scalar_negate(&neg_s, &s); + not_neg_one = !secp256k1_scalar_is_one(&neg_s); + secp256k1_scalar_cadd_bit(&s, bit, not_neg_one); + /* If we had negative one, flip == 1, s.d[0] == 0, bit == 1, so caller expects + * that we added two to it and flipped it. In fact for -1 these operations are + * identical. We only flipped, but since skewing is required (in the sense that + * the skew must be 1 or 2, never zero) and flipping is not, we need to change + * our flags to claim that we only skewed. */ + global_sign = secp256k1_scalar_cond_negate(&s, flip); + global_sign *= not_neg_one * 2 - 1; + skew = 1 << bit; + + /* 4 */ + u_last = secp256k1_scalar_shr_int(&s, w); + while (word * w < size) { + int sign; + int even; + + /* 4.1 4.4 */ + u = secp256k1_scalar_shr_int(&s, w); + /* 4.2 */ + even = ((u & 1) == 0); + sign = 2 * (u_last > 0) - 1; + u += sign * even; + u_last -= sign * even * (1 << w); + + /* 4.3, adapted for global sign change */ + wnaf[word++] = u_last * global_sign; + + u_last = u; + } + wnaf[word] = u * global_sign; + + VERIFY_CHECK(secp256k1_scalar_is_zero(&s)); + VERIFY_CHECK(word == WNAF_SIZE_BITS(size, w)); + return skew; +} + +static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, const secp256k1_scalar *scalar, int size) { + secp256k1_ge pre_a[ECMULT_TABLE_SIZE(WINDOW_A)]; + secp256k1_ge tmpa; + secp256k1_fe Z; + + int skew_1; +#ifdef USE_ENDOMORPHISM + secp256k1_ge pre_a_lam[ECMULT_TABLE_SIZE(WINDOW_A)]; + int wnaf_lam[1 + WNAF_SIZE(WINDOW_A - 1)]; + int skew_lam; + secp256k1_scalar q_1, q_lam; +#endif + int wnaf_1[1 + WNAF_SIZE(WINDOW_A - 1)]; + + int i; + secp256k1_scalar sc = *scalar; + + /* build wnaf representation for q. */ + int rsize = size; +#ifdef USE_ENDOMORPHISM + if (size > 128) { + rsize = 128; + /* split q into q_1 and q_lam (where q = q_1 + q_lam*lambda, and q_1 and q_lam are ~128 bit) */ + secp256k1_scalar_split_lambda(&q_1, &q_lam, &sc); + skew_1 = secp256k1_wnaf_const(wnaf_1, q_1, WINDOW_A - 1, 128); + skew_lam = secp256k1_wnaf_const(wnaf_lam, q_lam, WINDOW_A - 1, 128); + } else +#endif + { + skew_1 = secp256k1_wnaf_const(wnaf_1, sc, WINDOW_A - 1, size); +#ifdef USE_ENDOMORPHISM + skew_lam = 0; +#endif + } + + /* Calculate odd multiples of a. + * All multiples are brought to the same Z 'denominator', which is stored + * in Z. Due to secp256k1' isomorphism we can do all operations pretending + * that the Z coordinate was 1, use affine addition formulae, and correct + * the Z coordinate of the result once at the end. + */ + secp256k1_gej_set_ge(r, a); + secp256k1_ecmult_odd_multiples_table_globalz_windowa(pre_a, &Z, r); + for (i = 0; i < ECMULT_TABLE_SIZE(WINDOW_A); i++) { + secp256k1_fe_normalize_weak(&pre_a[i].y); + } +#ifdef USE_ENDOMORPHISM + if (size > 128) { + for (i = 0; i < ECMULT_TABLE_SIZE(WINDOW_A); i++) { + secp256k1_ge_mul_lambda(&pre_a_lam[i], &pre_a[i]); + } + } +#endif + + /* first loop iteration (separated out so we can directly set r, rather + * than having it start at infinity, get doubled several times, then have + * its new value added to it) */ + i = wnaf_1[WNAF_SIZE_BITS(rsize, WINDOW_A - 1)]; + VERIFY_CHECK(i != 0); + ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a, i, WINDOW_A); + secp256k1_gej_set_ge(r, &tmpa); +#ifdef USE_ENDOMORPHISM + if (size > 128) { + i = wnaf_lam[WNAF_SIZE_BITS(rsize, WINDOW_A - 1)]; + VERIFY_CHECK(i != 0); + ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a_lam, i, WINDOW_A); + secp256k1_gej_add_ge(r, r, &tmpa); + } +#endif + /* remaining loop iterations */ + for (i = WNAF_SIZE_BITS(rsize, WINDOW_A - 1) - 1; i >= 0; i--) { + int n; + int j; + for (j = 0; j < WINDOW_A - 1; ++j) { + secp256k1_gej_double_nonzero(r, r, NULL); + } + + n = wnaf_1[i]; + ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a, n, WINDOW_A); + VERIFY_CHECK(n != 0); + secp256k1_gej_add_ge(r, r, &tmpa); +#ifdef USE_ENDOMORPHISM + if (size > 128) { + n = wnaf_lam[i]; + ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a_lam, n, WINDOW_A); + VERIFY_CHECK(n != 0); + secp256k1_gej_add_ge(r, r, &tmpa); + } +#endif + } + + secp256k1_fe_mul(&r->z, &r->z, &Z); + + { + /* Correct for wNAF skew */ + secp256k1_ge correction = *a; + secp256k1_ge_storage correction_1_stor; +#ifdef USE_ENDOMORPHISM + secp256k1_ge_storage correction_lam_stor; +#endif + secp256k1_ge_storage a2_stor; + secp256k1_gej tmpj; + secp256k1_gej_set_ge(&tmpj, &correction); + secp256k1_gej_double_var(&tmpj, &tmpj, NULL); + secp256k1_ge_set_gej(&correction, &tmpj); + secp256k1_ge_to_storage(&correction_1_stor, a); +#ifdef USE_ENDOMORPHISM + if (size > 128) { + secp256k1_ge_to_storage(&correction_lam_stor, a); + } +#endif + secp256k1_ge_to_storage(&a2_stor, &correction); + + /* For odd numbers this is 2a (so replace it), for even ones a (so no-op) */ + secp256k1_ge_storage_cmov(&correction_1_stor, &a2_stor, skew_1 == 2); +#ifdef USE_ENDOMORPHISM + if (size > 128) { + secp256k1_ge_storage_cmov(&correction_lam_stor, &a2_stor, skew_lam == 2); + } +#endif + + /* Apply the correction */ + secp256k1_ge_from_storage(&correction, &correction_1_stor); + secp256k1_ge_neg(&correction, &correction); + secp256k1_gej_add_ge(r, r, &correction); + +#ifdef USE_ENDOMORPHISM + if (size > 128) { + secp256k1_ge_from_storage(&correction, &correction_lam_stor); + secp256k1_ge_neg(&correction, &correction); + secp256k1_ge_mul_lambda(&correction, &correction); + secp256k1_gej_add_ge(r, r, &correction); + } +#endif + } +} + +#endif /* SECP256K1_ECMULT_CONST_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_gen.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_gen.h new file mode 100644 index 000000000..7564b7015 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_gen.h @@ -0,0 +1,43 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_ECMULT_GEN_H +#define SECP256K1_ECMULT_GEN_H + +#include "scalar.h" +#include "group.h" + +typedef struct { + /* For accelerating the computation of a*G: + * To harden against timing attacks, use the following mechanism: + * * Break up the multiplicand into groups of 4 bits, called n_0, n_1, n_2, ..., n_63. + * * Compute sum(n_i * 16^i * G + U_i, i=0..63), where: + * * U_i = U * 2^i (for i=0..62) + * * U_i = U * (1-2^63) (for i=63) + * where U is a point with no known corresponding scalar. Note that sum(U_i, i=0..63) = 0. + * For each i, and each of the 16 possible values of n_i, (n_i * 16^i * G + U_i) is + * precomputed (call it prec(i, n_i)). The formula now becomes sum(prec(i, n_i), i=0..63). + * None of the resulting prec group elements have a known scalar, and neither do any of + * the intermediate sums while computing a*G. + */ + secp256k1_ge_storage (*prec)[64][16]; /* prec[j][i] = 16^j * i * G + U_i */ + secp256k1_scalar blind; + secp256k1_gej initial; +} secp256k1_ecmult_gen_context; + +static void secp256k1_ecmult_gen_context_init(secp256k1_ecmult_gen_context* ctx); +static void secp256k1_ecmult_gen_context_build(secp256k1_ecmult_gen_context* ctx, const secp256k1_callback* cb); +static void secp256k1_ecmult_gen_context_clone(secp256k1_ecmult_gen_context *dst, + const secp256k1_ecmult_gen_context* src, const secp256k1_callback* cb); +static void secp256k1_ecmult_gen_context_clear(secp256k1_ecmult_gen_context* ctx); +static int secp256k1_ecmult_gen_context_is_built(const secp256k1_ecmult_gen_context* ctx); + +/** Multiply with the generator: R = a*G */ +static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context* ctx, secp256k1_gej *r, const secp256k1_scalar *a); + +static void secp256k1_ecmult_gen_blind(secp256k1_ecmult_gen_context *ctx, const unsigned char *seed32); + +#endif /* SECP256K1_ECMULT_GEN_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_gen_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_gen_impl.h new file mode 100644 index 000000000..714f02e94 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_gen_impl.h @@ -0,0 +1,210 @@ +/********************************************************************** + * Copyright (c) 2013, 2014, 2015 Pieter Wuille, Gregory Maxwell * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_ECMULT_GEN_IMPL_H +#define SECP256K1_ECMULT_GEN_IMPL_H + +#include "scalar.h" +#include "group.h" +#include "ecmult_gen.h" +#include "hash_impl.h" +#ifdef USE_ECMULT_STATIC_PRECOMPUTATION +#include "ecmult_static_context.h" +#endif +static void secp256k1_ecmult_gen_context_init(secp256k1_ecmult_gen_context *ctx) { + ctx->prec = NULL; +} + +static void secp256k1_ecmult_gen_context_build(secp256k1_ecmult_gen_context *ctx, const secp256k1_callback* cb) { +#ifndef USE_ECMULT_STATIC_PRECOMPUTATION + secp256k1_ge prec[1024]; + secp256k1_gej gj; + secp256k1_gej nums_gej; + int i, j; +#endif + + if (ctx->prec != NULL) { + return; + } +#ifndef USE_ECMULT_STATIC_PRECOMPUTATION + ctx->prec = (secp256k1_ge_storage (*)[64][16])checked_malloc(cb, sizeof(*ctx->prec)); + + /* get the generator */ + secp256k1_gej_set_ge(&gj, &secp256k1_ge_const_g); + + /* Construct a group element with no known corresponding scalar (nothing up my sleeve). */ + { + static const unsigned char nums_b32[33] = "The scalar for this x is unknown"; + secp256k1_fe nums_x; + secp256k1_ge nums_ge; + int r; + r = secp256k1_fe_set_b32(&nums_x, nums_b32); + (void)r; + VERIFY_CHECK(r); + r = secp256k1_ge_set_xo_var(&nums_ge, &nums_x, 0); + (void)r; + VERIFY_CHECK(r); + secp256k1_gej_set_ge(&nums_gej, &nums_ge); + /* Add G to make the bits in x uniformly distributed. */ + secp256k1_gej_add_ge_var(&nums_gej, &nums_gej, &secp256k1_ge_const_g, NULL); + } + + /* compute prec. */ + { + secp256k1_gej precj[1024]; /* Jacobian versions of prec. */ + secp256k1_gej gbase; + secp256k1_gej numsbase; + gbase = gj; /* 16^j * G */ + numsbase = nums_gej; /* 2^j * nums. */ + for (j = 0; j < 64; j++) { + /* Set precj[j*16 .. j*16+15] to (numsbase, numsbase + gbase, ..., numsbase + 15*gbase). */ + precj[j*16] = numsbase; + for (i = 1; i < 16; i++) { + secp256k1_gej_add_var(&precj[j*16 + i], &precj[j*16 + i - 1], &gbase, NULL); + } + /* Multiply gbase by 16. */ + for (i = 0; i < 4; i++) { + secp256k1_gej_double_var(&gbase, &gbase, NULL); + } + /* Multiply numbase by 2. */ + secp256k1_gej_double_var(&numsbase, &numsbase, NULL); + if (j == 62) { + /* In the last iteration, numsbase is (1 - 2^j) * nums instead. */ + secp256k1_gej_neg(&numsbase, &numsbase); + secp256k1_gej_add_var(&numsbase, &numsbase, &nums_gej, NULL); + } + } + secp256k1_ge_set_all_gej_var(prec, precj, 1024, cb); + } + for (j = 0; j < 64; j++) { + for (i = 0; i < 16; i++) { + secp256k1_ge_to_storage(&(*ctx->prec)[j][i], &prec[j*16 + i]); + } + } +#else + (void)cb; + ctx->prec = (secp256k1_ge_storage (*)[64][16])secp256k1_ecmult_static_context; +#endif + secp256k1_ecmult_gen_blind(ctx, NULL); +} + +static int secp256k1_ecmult_gen_context_is_built(const secp256k1_ecmult_gen_context* ctx) { + return ctx->prec != NULL; +} + +static void secp256k1_ecmult_gen_context_clone(secp256k1_ecmult_gen_context *dst, + const secp256k1_ecmult_gen_context *src, const secp256k1_callback* cb) { + if (src->prec == NULL) { + dst->prec = NULL; + } else { +#ifndef USE_ECMULT_STATIC_PRECOMPUTATION + dst->prec = (secp256k1_ge_storage (*)[64][16])checked_malloc(cb, sizeof(*dst->prec)); + memcpy(dst->prec, src->prec, sizeof(*dst->prec)); +#else + (void)cb; + dst->prec = src->prec; +#endif + dst->initial = src->initial; + dst->blind = src->blind; + } +} + +static void secp256k1_ecmult_gen_context_clear(secp256k1_ecmult_gen_context *ctx) { +#ifndef USE_ECMULT_STATIC_PRECOMPUTATION + free(ctx->prec); +#endif + secp256k1_scalar_clear(&ctx->blind); + secp256k1_gej_clear(&ctx->initial); + ctx->prec = NULL; +} + +static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context *ctx, secp256k1_gej *r, const secp256k1_scalar *gn) { + secp256k1_ge add; + secp256k1_ge_storage adds; + secp256k1_scalar gnb; + int bits; + int i, j; + memset(&adds, 0, sizeof(adds)); + *r = ctx->initial; + /* Blind scalar/point multiplication by computing (n-b)G + bG instead of nG. */ + secp256k1_scalar_add(&gnb, gn, &ctx->blind); + add.infinity = 0; + for (j = 0; j < 64; j++) { + bits = secp256k1_scalar_get_bits(&gnb, j * 4, 4); + for (i = 0; i < 16; i++) { + /** This uses a conditional move to avoid any secret data in array indexes. + * _Any_ use of secret indexes has been demonstrated to result in timing + * sidechannels, even when the cache-line access patterns are uniform. + * See also: + * "A word of warning", CHES 2013 Rump Session, by Daniel J. Bernstein and Peter Schwabe + * (https://cryptojedi.org/peter/data/chesrump-20130822.pdf) and + * "Cache Attacks and Countermeasures: the Case of AES", RSA 2006, + * by Dag Arne Osvik, Adi Shamir, and Eran Tromer + * (http://www.tau.ac.il/~tromer/papers/cache.pdf) + */ + secp256k1_ge_storage_cmov(&adds, &(*ctx->prec)[j][i], i == bits); + } + secp256k1_ge_from_storage(&add, &adds); + secp256k1_gej_add_ge(r, r, &add); + } + bits = 0; + secp256k1_ge_clear(&add); + secp256k1_scalar_clear(&gnb); +} + +/* Setup blinding values for secp256k1_ecmult_gen. */ +static void secp256k1_ecmult_gen_blind(secp256k1_ecmult_gen_context *ctx, const unsigned char *seed32) { + secp256k1_scalar b; + secp256k1_gej gb; + secp256k1_fe s; + unsigned char nonce32[32]; + secp256k1_rfc6979_hmac_sha256 rng; + int retry; + unsigned char keydata[64] = {0}; + if (seed32 == NULL) { + /* When seed is NULL, reset the initial point and blinding value. */ + secp256k1_gej_set_ge(&ctx->initial, &secp256k1_ge_const_g); + secp256k1_gej_neg(&ctx->initial, &ctx->initial); + secp256k1_scalar_set_int(&ctx->blind, 1); + } + /* The prior blinding value (if not reset) is chained forward by including it in the hash. */ + secp256k1_scalar_get_b32(nonce32, &ctx->blind); + /** Using a CSPRNG allows a failure free interface, avoids needing large amounts of random data, + * and guards against weak or adversarial seeds. This is a simpler and safer interface than + * asking the caller for blinding values directly and expecting them to retry on failure. + */ + memcpy(keydata, nonce32, 32); + if (seed32 != NULL) { + memcpy(keydata + 32, seed32, 32); + } + secp256k1_rfc6979_hmac_sha256_initialize(&rng, keydata, seed32 ? 64 : 32); + memset(keydata, 0, sizeof(keydata)); + /* Retry for out of range results to achieve uniformity. */ + do { + secp256k1_rfc6979_hmac_sha256_generate(&rng, nonce32, 32); + retry = !secp256k1_fe_set_b32(&s, nonce32); + retry |= secp256k1_fe_is_zero(&s); + } while (retry); /* This branch true is cryptographically unreachable. Requires sha256_hmac output > Fp. */ + /* Randomize the projection to defend against multiplier sidechannels. */ + secp256k1_gej_rescale(&ctx->initial, &s); + secp256k1_fe_clear(&s); + do { + secp256k1_rfc6979_hmac_sha256_generate(&rng, nonce32, 32); + secp256k1_scalar_set_b32(&b, nonce32, &retry); + /* A blinding value of 0 works, but would undermine the projection hardening. */ + retry |= secp256k1_scalar_is_zero(&b); + } while (retry); /* This branch true is cryptographically unreachable. Requires sha256_hmac output > order. */ + secp256k1_rfc6979_hmac_sha256_finalize(&rng); + memset(nonce32, 0, 32); + secp256k1_ecmult_gen(ctx, &gb, &b); + secp256k1_scalar_negate(&b, &b); + ctx->blind = b; + ctx->initial = gb; + secp256k1_scalar_clear(&b); + secp256k1_gej_clear(&gb); +} + +#endif /* SECP256K1_ECMULT_GEN_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_impl.h new file mode 100644 index 000000000..d5fb6c5b6 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/ecmult_impl.h @@ -0,0 +1,1027 @@ +/***************************************************************************** + * Copyright (c) 2013, 2014, 2017 Pieter Wuille, Andrew Poelstra, Jonas Nick * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php. * + *****************************************************************************/ + +#ifndef SECP256K1_ECMULT_IMPL_H +#define SECP256K1_ECMULT_IMPL_H + +#include +#include + +#include "group.h" +#include "scalar.h" +#include "ecmult.h" + +#if defined(EXHAUSTIVE_TEST_ORDER) +/* We need to lower these values for exhaustive tests because + * the tables cannot have infinities in them (this breaks the + * affine-isomorphism stuff which tracks z-ratios) */ +# if EXHAUSTIVE_TEST_ORDER > 128 +# define WINDOW_A 5 +# define WINDOW_G 8 +# elif EXHAUSTIVE_TEST_ORDER > 8 +# define WINDOW_A 4 +# define WINDOW_G 4 +# else +# define WINDOW_A 2 +# define WINDOW_G 2 +# endif +#else +/* optimal for 128-bit and 256-bit exponents. */ +#define WINDOW_A 5 +/** larger numbers may result in slightly better performance, at the cost of + exponentially larger precomputed tables. */ +#ifdef USE_ENDOMORPHISM +/** Two tables for window size 15: 1.375 MiB. */ +#define WINDOW_G 15 +#else +/** One table for window size 16: 1.375 MiB. */ +#define WINDOW_G 16 +#endif +#endif + +#ifdef USE_ENDOMORPHISM + #define WNAF_BITS 128 +#else + #define WNAF_BITS 256 +#endif +#define WNAF_SIZE_BITS(bits, w) (((bits) + (w) - 1) / (w)) +#define WNAF_SIZE(w) WNAF_SIZE_BITS(WNAF_BITS, w) + +/** The number of entries a table with precomputed multiples needs to have. */ +#define ECMULT_TABLE_SIZE(w) (1 << ((w)-2)) + +/* The number of objects allocated on the scratch space for ecmult_multi algorithms */ +#define PIPPENGER_SCRATCH_OBJECTS 6 +#define STRAUSS_SCRATCH_OBJECTS 6 + +#define PIPPENGER_MAX_BUCKET_WINDOW 12 + +/* Minimum number of points for which pippenger_wnaf is faster than strauss wnaf */ +#ifdef USE_ENDOMORPHISM + #define ECMULT_PIPPENGER_THRESHOLD 88 +#else + #define ECMULT_PIPPENGER_THRESHOLD 160 +#endif + +#ifdef USE_ENDOMORPHISM + #define ECMULT_MAX_POINTS_PER_BATCH 5000000 +#else + #define ECMULT_MAX_POINTS_PER_BATCH 10000000 +#endif + +/** Fill a table 'prej' with precomputed odd multiples of a. Prej will contain + * the values [1*a,3*a,...,(2*n-1)*a], so it space for n values. zr[0] will + * contain prej[0].z / a.z. The other zr[i] values = prej[i].z / prej[i-1].z. + * Prej's Z values are undefined, except for the last value. + */ +static void secp256k1_ecmult_odd_multiples_table(int n, secp256k1_gej *prej, secp256k1_fe *zr, const secp256k1_gej *a) { + secp256k1_gej d; + secp256k1_ge a_ge, d_ge; + int i; + + VERIFY_CHECK(!a->infinity); + + secp256k1_gej_double_var(&d, a, NULL); + + /* + * Perform the additions on an isomorphism where 'd' is affine: drop the z coordinate + * of 'd', and scale the 1P starting value's x/y coordinates without changing its z. + */ + d_ge.x = d.x; + d_ge.y = d.y; + d_ge.infinity = 0; + + secp256k1_ge_set_gej_zinv(&a_ge, a, &d.z); + prej[0].x = a_ge.x; + prej[0].y = a_ge.y; + prej[0].z = a->z; + prej[0].infinity = 0; + + zr[0] = d.z; + for (i = 1; i < n; i++) { + secp256k1_gej_add_ge_var(&prej[i], &prej[i-1], &d_ge, &zr[i]); + } + + /* + * Each point in 'prej' has a z coordinate too small by a factor of 'd.z'. Only + * the final point's z coordinate is actually used though, so just update that. + */ + secp256k1_fe_mul(&prej[n-1].z, &prej[n-1].z, &d.z); +} + +/** Fill a table 'pre' with precomputed odd multiples of a. + * + * There are two versions of this function: + * - secp256k1_ecmult_odd_multiples_table_globalz_windowa which brings its + * resulting point set to a single constant Z denominator, stores the X and Y + * coordinates as ge_storage points in pre, and stores the global Z in rz. + * It only operates on tables sized for WINDOW_A wnaf multiples. + * - secp256k1_ecmult_odd_multiples_table_storage_var, which converts its + * resulting point set to actually affine points, and stores those in pre. + * It operates on tables of any size, but uses heap-allocated temporaries. + * + * To compute a*P + b*G, we compute a table for P using the first function, + * and for G using the second (which requires an inverse, but it only needs to + * happen once). + */ +static void secp256k1_ecmult_odd_multiples_table_globalz_windowa(secp256k1_ge *pre, secp256k1_fe *globalz, const secp256k1_gej *a) { + secp256k1_gej prej[ECMULT_TABLE_SIZE(WINDOW_A)]; + secp256k1_fe zr[ECMULT_TABLE_SIZE(WINDOW_A)]; + + /* Compute the odd multiples in Jacobian form. */ + secp256k1_ecmult_odd_multiples_table(ECMULT_TABLE_SIZE(WINDOW_A), prej, zr, a); + /* Bring them to the same Z denominator. */ + secp256k1_ge_globalz_set_table_gej(ECMULT_TABLE_SIZE(WINDOW_A), pre, globalz, prej, zr); +} + +static void secp256k1_ecmult_odd_multiples_table_storage_var(int n, secp256k1_ge_storage *pre, const secp256k1_gej *a, const secp256k1_callback *cb) { + secp256k1_gej *prej = (secp256k1_gej*)checked_malloc(cb, sizeof(secp256k1_gej) * n); + secp256k1_ge *prea = (secp256k1_ge*)checked_malloc(cb, sizeof(secp256k1_ge) * n); + secp256k1_fe *zr = (secp256k1_fe*)checked_malloc(cb, sizeof(secp256k1_fe) * n); + int i; + + /* Compute the odd multiples in Jacobian form. */ + secp256k1_ecmult_odd_multiples_table(n, prej, zr, a); + /* Convert them in batch to affine coordinates. */ + secp256k1_ge_set_table_gej_var(prea, prej, zr, n); + /* Convert them to compact storage form. */ + for (i = 0; i < n; i++) { + secp256k1_ge_to_storage(&pre[i], &prea[i]); + } + + free(prea); + free(prej); + free(zr); +} + +/** The following two macro retrieves a particular odd multiple from a table + * of precomputed multiples. */ +#define ECMULT_TABLE_GET_GE(r,pre,n,w) do { \ + VERIFY_CHECK(((n) & 1) == 1); \ + VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \ + VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1)); \ + if ((n) > 0) { \ + *(r) = (pre)[((n)-1)/2]; \ + } else { \ + secp256k1_ge_neg((r), &(pre)[(-(n)-1)/2]); \ + } \ +} while(0) + +#define ECMULT_TABLE_GET_GE_STORAGE(r,pre,n,w) do { \ + VERIFY_CHECK(((n) & 1) == 1); \ + VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \ + VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1)); \ + if ((n) > 0) { \ + secp256k1_ge_from_storage((r), &(pre)[((n)-1)/2]); \ + } else { \ + secp256k1_ge_from_storage((r), &(pre)[(-(n)-1)/2]); \ + secp256k1_ge_neg((r), (r)); \ + } \ +} while(0) + +static void secp256k1_ecmult_context_init(secp256k1_ecmult_context *ctx) { + ctx->pre_g = NULL; +#ifdef USE_ENDOMORPHISM + ctx->pre_g_128 = NULL; +#endif +} + +static void secp256k1_ecmult_context_build(secp256k1_ecmult_context *ctx, const secp256k1_callback *cb) { + secp256k1_gej gj; + + if (ctx->pre_g != NULL) { + return; + } + + /* get the generator */ + secp256k1_gej_set_ge(&gj, &secp256k1_ge_const_g); + + ctx->pre_g = (secp256k1_ge_storage (*)[])checked_malloc(cb, sizeof((*ctx->pre_g)[0]) * ECMULT_TABLE_SIZE(WINDOW_G)); + + /* precompute the tables with odd multiples */ + secp256k1_ecmult_odd_multiples_table_storage_var(ECMULT_TABLE_SIZE(WINDOW_G), *ctx->pre_g, &gj, cb); + +#ifdef USE_ENDOMORPHISM + { + secp256k1_gej g_128j; + int i; + + ctx->pre_g_128 = (secp256k1_ge_storage (*)[])checked_malloc(cb, sizeof((*ctx->pre_g_128)[0]) * ECMULT_TABLE_SIZE(WINDOW_G)); + + /* calculate 2^128*generator */ + g_128j = gj; + for (i = 0; i < 128; i++) { + secp256k1_gej_double_var(&g_128j, &g_128j, NULL); + } + secp256k1_ecmult_odd_multiples_table_storage_var(ECMULT_TABLE_SIZE(WINDOW_G), *ctx->pre_g_128, &g_128j, cb); + } +#endif +} + +static void secp256k1_ecmult_context_clone(secp256k1_ecmult_context *dst, + const secp256k1_ecmult_context *src, const secp256k1_callback *cb) { + if (src->pre_g == NULL) { + dst->pre_g = NULL; + } else { + size_t size = sizeof((*dst->pre_g)[0]) * ECMULT_TABLE_SIZE(WINDOW_G); + dst->pre_g = (secp256k1_ge_storage (*)[])checked_malloc(cb, size); + memcpy(dst->pre_g, src->pre_g, size); + } +#ifdef USE_ENDOMORPHISM + if (src->pre_g_128 == NULL) { + dst->pre_g_128 = NULL; + } else { + size_t size = sizeof((*dst->pre_g_128)[0]) * ECMULT_TABLE_SIZE(WINDOW_G); + dst->pre_g_128 = (secp256k1_ge_storage (*)[])checked_malloc(cb, size); + memcpy(dst->pre_g_128, src->pre_g_128, size); + } +#endif +} + +static int secp256k1_ecmult_context_is_built(const secp256k1_ecmult_context *ctx) { + return ctx->pre_g != NULL; +} + +static void secp256k1_ecmult_context_clear(secp256k1_ecmult_context *ctx) { + free(ctx->pre_g); +#ifdef USE_ENDOMORPHISM + free(ctx->pre_g_128); +#endif + secp256k1_ecmult_context_init(ctx); +} + +/** Convert a number to WNAF notation. The number becomes represented by sum(2^i * wnaf[i], i=0..bits), + * with the following guarantees: + * - each wnaf[i] is either 0, or an odd integer between -(1<<(w-1) - 1) and (1<<(w-1) - 1) + * - two non-zero entries in wnaf are separated by at least w-1 zeroes. + * - the number of set values in wnaf is returned. This number is at most 256, and at most one more + * than the number of bits in the (absolute value) of the input. + */ +static int secp256k1_ecmult_wnaf(int *wnaf, int len, const secp256k1_scalar *a, int w) { + secp256k1_scalar s = *a; + int last_set_bit = -1; + int bit = 0; + int sign = 1; + int carry = 0; + + VERIFY_CHECK(wnaf != NULL); + VERIFY_CHECK(0 <= len && len <= 256); + VERIFY_CHECK(a != NULL); + VERIFY_CHECK(2 <= w && w <= 31); + + memset(wnaf, 0, len * sizeof(wnaf[0])); + + if (secp256k1_scalar_get_bits(&s, 255, 1)) { + secp256k1_scalar_negate(&s, &s); + sign = -1; + } + + while (bit < len) { + int now; + int word; + if (secp256k1_scalar_get_bits(&s, bit, 1) == (unsigned int)carry) { + bit++; + continue; + } + + now = w; + if (now > len - bit) { + now = len - bit; + } + + word = secp256k1_scalar_get_bits_var(&s, bit, now) + carry; + + carry = (word >> (w-1)) & 1; + word -= carry << w; + + wnaf[bit] = sign * word; + last_set_bit = bit; + + bit += now; + } +#ifdef VERIFY + CHECK(carry == 0); + while (bit < 256) { + CHECK(secp256k1_scalar_get_bits(&s, bit++, 1) == 0); + } +#endif + return last_set_bit + 1; +} + +struct secp256k1_strauss_point_state { +#ifdef USE_ENDOMORPHISM + secp256k1_scalar na_1, na_lam; + int wnaf_na_1[130]; + int wnaf_na_lam[130]; + int bits_na_1; + int bits_na_lam; +#else + int wnaf_na[256]; + int bits_na; +#endif + size_t input_pos; +}; + +struct secp256k1_strauss_state { + secp256k1_gej* prej; + secp256k1_fe* zr; + secp256k1_ge* pre_a; +#ifdef USE_ENDOMORPHISM + secp256k1_ge* pre_a_lam; +#endif + struct secp256k1_strauss_point_state* ps; +}; + +static void secp256k1_ecmult_strauss_wnaf(const secp256k1_ecmult_context *ctx, const struct secp256k1_strauss_state *state, secp256k1_gej *r, int num, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng) { + secp256k1_ge tmpa; + secp256k1_fe Z; +#ifdef USE_ENDOMORPHISM + /* Splitted G factors. */ + secp256k1_scalar ng_1, ng_128; + int wnaf_ng_1[129]; + int bits_ng_1 = 0; + int wnaf_ng_128[129]; + int bits_ng_128 = 0; +#else + int wnaf_ng[256]; + int bits_ng = 0; +#endif + int i; + int bits = 0; + int np; + int no = 0; + + for (np = 0; np < num; ++np) { + if (secp256k1_scalar_is_zero(&na[np]) || secp256k1_gej_is_infinity(&a[np])) { + continue; + } + state->ps[no].input_pos = np; +#ifdef USE_ENDOMORPHISM + /* split na into na_1 and na_lam (where na = na_1 + na_lam*lambda, and na_1 and na_lam are ~128 bit) */ + secp256k1_scalar_split_lambda(&state->ps[no].na_1, &state->ps[no].na_lam, &na[np]); + + /* build wnaf representation for na_1 and na_lam. */ + state->ps[no].bits_na_1 = secp256k1_ecmult_wnaf(state->ps[no].wnaf_na_1, 130, &state->ps[no].na_1, WINDOW_A); + state->ps[no].bits_na_lam = secp256k1_ecmult_wnaf(state->ps[no].wnaf_na_lam, 130, &state->ps[no].na_lam, WINDOW_A); + VERIFY_CHECK(state->ps[no].bits_na_1 <= 130); + VERIFY_CHECK(state->ps[no].bits_na_lam <= 130); + if (state->ps[no].bits_na_1 > bits) { + bits = state->ps[no].bits_na_1; + } + if (state->ps[no].bits_na_lam > bits) { + bits = state->ps[no].bits_na_lam; + } +#else + /* build wnaf representation for na. */ + state->ps[no].bits_na = secp256k1_ecmult_wnaf(state->ps[no].wnaf_na, 256, &na[np], WINDOW_A); + if (state->ps[no].bits_na > bits) { + bits = state->ps[no].bits_na; + } +#endif + ++no; + } + + /* Calculate odd multiples of a. + * All multiples are brought to the same Z 'denominator', which is stored + * in Z. Due to secp256k1' isomorphism we can do all operations pretending + * that the Z coordinate was 1, use affine addition formulae, and correct + * the Z coordinate of the result once at the end. + * The exception is the precomputed G table points, which are actually + * affine. Compared to the base used for other points, they have a Z ratio + * of 1/Z, so we can use secp256k1_gej_add_zinv_var, which uses the same + * isomorphism to efficiently add with a known Z inverse. + */ + if (no > 0) { + /* Compute the odd multiples in Jacobian form. */ + secp256k1_ecmult_odd_multiples_table(ECMULT_TABLE_SIZE(WINDOW_A), state->prej, state->zr, &a[state->ps[0].input_pos]); + for (np = 1; np < no; ++np) { + secp256k1_gej tmp = a[state->ps[np].input_pos]; +#ifdef VERIFY + secp256k1_fe_normalize_var(&(state->prej[(np - 1) * ECMULT_TABLE_SIZE(WINDOW_A) + ECMULT_TABLE_SIZE(WINDOW_A) - 1].z)); +#endif + secp256k1_gej_rescale(&tmp, &(state->prej[(np - 1) * ECMULT_TABLE_SIZE(WINDOW_A) + ECMULT_TABLE_SIZE(WINDOW_A) - 1].z)); + secp256k1_ecmult_odd_multiples_table(ECMULT_TABLE_SIZE(WINDOW_A), state->prej + np * ECMULT_TABLE_SIZE(WINDOW_A), state->zr + np * ECMULT_TABLE_SIZE(WINDOW_A), &tmp); + secp256k1_fe_mul(state->zr + np * ECMULT_TABLE_SIZE(WINDOW_A), state->zr + np * ECMULT_TABLE_SIZE(WINDOW_A), &(a[state->ps[np].input_pos].z)); + } + /* Bring them to the same Z denominator. */ + secp256k1_ge_globalz_set_table_gej(ECMULT_TABLE_SIZE(WINDOW_A) * no, state->pre_a, &Z, state->prej, state->zr); + } else { + secp256k1_fe_set_int(&Z, 1); + } + +#ifdef USE_ENDOMORPHISM + for (np = 0; np < no; ++np) { + for (i = 0; i < ECMULT_TABLE_SIZE(WINDOW_A); i++) { + secp256k1_ge_mul_lambda(&state->pre_a_lam[np * ECMULT_TABLE_SIZE(WINDOW_A) + i], &state->pre_a[np * ECMULT_TABLE_SIZE(WINDOW_A) + i]); + } + } + + if (ng) { + /* split ng into ng_1 and ng_128 (where gn = gn_1 + gn_128*2^128, and gn_1 and gn_128 are ~128 bit) */ + secp256k1_scalar_split_128(&ng_1, &ng_128, ng); + + /* Build wnaf representation for ng_1 and ng_128 */ + bits_ng_1 = secp256k1_ecmult_wnaf(wnaf_ng_1, 129, &ng_1, WINDOW_G); + bits_ng_128 = secp256k1_ecmult_wnaf(wnaf_ng_128, 129, &ng_128, WINDOW_G); + if (bits_ng_1 > bits) { + bits = bits_ng_1; + } + if (bits_ng_128 > bits) { + bits = bits_ng_128; + } + } +#else + if (ng) { + bits_ng = secp256k1_ecmult_wnaf(wnaf_ng, 256, ng, WINDOW_G); + if (bits_ng > bits) { + bits = bits_ng; + } + } +#endif + + secp256k1_gej_set_infinity(r); + + for (i = bits - 1; i >= 0; i--) { + int n; + secp256k1_gej_double_var(r, r, NULL); +#ifdef USE_ENDOMORPHISM + for (np = 0; np < no; ++np) { + if (i < state->ps[np].bits_na_1 && (n = state->ps[np].wnaf_na_1[i])) { + ECMULT_TABLE_GET_GE(&tmpa, state->pre_a + np * ECMULT_TABLE_SIZE(WINDOW_A), n, WINDOW_A); + secp256k1_gej_add_ge_var(r, r, &tmpa, NULL); + } + if (i < state->ps[np].bits_na_lam && (n = state->ps[np].wnaf_na_lam[i])) { + ECMULT_TABLE_GET_GE(&tmpa, state->pre_a_lam + np * ECMULT_TABLE_SIZE(WINDOW_A), n, WINDOW_A); + secp256k1_gej_add_ge_var(r, r, &tmpa, NULL); + } + } + if (i < bits_ng_1 && (n = wnaf_ng_1[i])) { + ECMULT_TABLE_GET_GE_STORAGE(&tmpa, *ctx->pre_g, n, WINDOW_G); + secp256k1_gej_add_zinv_var(r, r, &tmpa, &Z); + } + if (i < bits_ng_128 && (n = wnaf_ng_128[i])) { + ECMULT_TABLE_GET_GE_STORAGE(&tmpa, *ctx->pre_g_128, n, WINDOW_G); + secp256k1_gej_add_zinv_var(r, r, &tmpa, &Z); + } +#else + for (np = 0; np < no; ++np) { + if (i < state->ps[np].bits_na && (n = state->ps[np].wnaf_na[i])) { + ECMULT_TABLE_GET_GE(&tmpa, state->pre_a + np * ECMULT_TABLE_SIZE(WINDOW_A), n, WINDOW_A); + secp256k1_gej_add_ge_var(r, r, &tmpa, NULL); + } + } + if (i < bits_ng && (n = wnaf_ng[i])) { + ECMULT_TABLE_GET_GE_STORAGE(&tmpa, *ctx->pre_g, n, WINDOW_G); + secp256k1_gej_add_zinv_var(r, r, &tmpa, &Z); + } +#endif + } + + if (!r->infinity) { + secp256k1_fe_mul(&r->z, &r->z, &Z); + } +} + +static void secp256k1_ecmult(const secp256k1_ecmult_context *ctx, secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng) { + secp256k1_gej prej[ECMULT_TABLE_SIZE(WINDOW_A)]; + secp256k1_fe zr[ECMULT_TABLE_SIZE(WINDOW_A)]; + secp256k1_ge pre_a[ECMULT_TABLE_SIZE(WINDOW_A)]; + struct secp256k1_strauss_point_state ps[1]; +#ifdef USE_ENDOMORPHISM + secp256k1_ge pre_a_lam[ECMULT_TABLE_SIZE(WINDOW_A)]; +#endif + struct secp256k1_strauss_state state; + + state.prej = prej; + state.zr = zr; + state.pre_a = pre_a; +#ifdef USE_ENDOMORPHISM + state.pre_a_lam = pre_a_lam; +#endif + state.ps = ps; + secp256k1_ecmult_strauss_wnaf(ctx, &state, r, 1, a, na, ng); +} + +static size_t secp256k1_strauss_scratch_size(size_t n_points) { +#ifdef USE_ENDOMORPHISM + static const size_t point_size = (2 * sizeof(secp256k1_ge) + sizeof(secp256k1_gej) + sizeof(secp256k1_fe)) * ECMULT_TABLE_SIZE(WINDOW_A) + sizeof(struct secp256k1_strauss_point_state) + sizeof(secp256k1_gej) + sizeof(secp256k1_scalar); +#else + static const size_t point_size = (sizeof(secp256k1_ge) + sizeof(secp256k1_gej) + sizeof(secp256k1_fe)) * ECMULT_TABLE_SIZE(WINDOW_A) + sizeof(struct secp256k1_strauss_point_state) + sizeof(secp256k1_gej) + sizeof(secp256k1_scalar); +#endif + return n_points*point_size; +} + +static int secp256k1_ecmult_strauss_batch(const secp256k1_ecmult_context *ctx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n_points, size_t cb_offset) { + secp256k1_gej* points; + secp256k1_scalar* scalars; + struct secp256k1_strauss_state state; + size_t i; + + secp256k1_gej_set_infinity(r); + if (inp_g_sc == NULL && n_points == 0) { + return 1; + } + + if (!secp256k1_scratch_allocate_frame(scratch, secp256k1_strauss_scratch_size(n_points), STRAUSS_SCRATCH_OBJECTS)) { + return 0; + } + points = (secp256k1_gej*)secp256k1_scratch_alloc(scratch, n_points * sizeof(secp256k1_gej)); + scalars = (secp256k1_scalar*)secp256k1_scratch_alloc(scratch, n_points * sizeof(secp256k1_scalar)); + state.prej = (secp256k1_gej*)secp256k1_scratch_alloc(scratch, n_points * ECMULT_TABLE_SIZE(WINDOW_A) * sizeof(secp256k1_gej)); + state.zr = (secp256k1_fe*)secp256k1_scratch_alloc(scratch, n_points * ECMULT_TABLE_SIZE(WINDOW_A) * sizeof(secp256k1_fe)); +#ifdef USE_ENDOMORPHISM + state.pre_a = (secp256k1_ge*)secp256k1_scratch_alloc(scratch, n_points * 2 * ECMULT_TABLE_SIZE(WINDOW_A) * sizeof(secp256k1_ge)); + state.pre_a_lam = state.pre_a + n_points * ECMULT_TABLE_SIZE(WINDOW_A); +#else + state.pre_a = (secp256k1_ge*)secp256k1_scratch_alloc(scratch, n_points * ECMULT_TABLE_SIZE(WINDOW_A) * sizeof(secp256k1_ge)); +#endif + state.ps = (struct secp256k1_strauss_point_state*)secp256k1_scratch_alloc(scratch, n_points * sizeof(struct secp256k1_strauss_point_state)); + + for (i = 0; i < n_points; i++) { + secp256k1_ge point; + if (!cb(&scalars[i], &point, i+cb_offset, cbdata)) { + secp256k1_scratch_deallocate_frame(scratch); + return 0; + } + secp256k1_gej_set_ge(&points[i], &point); + } + secp256k1_ecmult_strauss_wnaf(ctx, &state, r, n_points, points, scalars, inp_g_sc); + secp256k1_scratch_deallocate_frame(scratch); + return 1; +} + +/* Wrapper for secp256k1_ecmult_multi_func interface */ +static int secp256k1_ecmult_strauss_batch_single(const secp256k1_ecmult_context *actx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) { + return secp256k1_ecmult_strauss_batch(actx, scratch, r, inp_g_sc, cb, cbdata, n, 0); +} + +static size_t secp256k1_strauss_max_points(secp256k1_scratch *scratch) { + return secp256k1_scratch_max_allocation(scratch, STRAUSS_SCRATCH_OBJECTS) / secp256k1_strauss_scratch_size(1); +} + +/** Convert a number to WNAF notation. + * The number becomes represented by sum(2^{wi} * wnaf[i], i=0..WNAF_SIZE(w)+1) - return_val. + * It has the following guarantees: + * - each wnaf[i] is either 0 or an odd integer between -(1 << w) and (1 << w) + * - the number of words set is always WNAF_SIZE(w) + * - the returned skew is 0 or 1 + */ +static int secp256k1_wnaf_fixed(int *wnaf, const secp256k1_scalar *s, int w) { + int skew = 0; + int pos; + int max_pos; + int last_w; + const secp256k1_scalar *work = s; + + if (secp256k1_scalar_is_zero(s)) { + for (pos = 0; pos < WNAF_SIZE(w); pos++) { + wnaf[pos] = 0; + } + return 0; + } + + if (secp256k1_scalar_is_even(s)) { + skew = 1; + } + + wnaf[0] = secp256k1_scalar_get_bits_var(work, 0, w) + skew; + /* Compute last window size. Relevant when window size doesn't divide the + * number of bits in the scalar */ + last_w = WNAF_BITS - (WNAF_SIZE(w) - 1) * w; + + /* Store the position of the first nonzero word in max_pos to allow + * skipping leading zeros when calculating the wnaf. */ + for (pos = WNAF_SIZE(w) - 1; pos > 0; pos--) { + int val = secp256k1_scalar_get_bits_var(work, pos * w, pos == WNAF_SIZE(w)-1 ? last_w : w); + if(val != 0) { + break; + } + wnaf[pos] = 0; + } + max_pos = pos; + pos = 1; + + while (pos <= max_pos) { + int val = secp256k1_scalar_get_bits_var(work, pos * w, pos == WNAF_SIZE(w)-1 ? last_w : w); + if ((val & 1) == 0) { + wnaf[pos - 1] -= (1 << w); + wnaf[pos] = (val + 1); + } else { + wnaf[pos] = val; + } + /* Set a coefficient to zero if it is 1 or -1 and the proceeding digit + * is strictly negative or strictly positive respectively. Only change + * coefficients at previous positions because above code assumes that + * wnaf[pos - 1] is odd. + */ + if (pos >= 2 && ((wnaf[pos - 1] == 1 && wnaf[pos - 2] < 0) || (wnaf[pos - 1] == -1 && wnaf[pos - 2] > 0))) { + if (wnaf[pos - 1] == 1) { + wnaf[pos - 2] += 1 << w; + } else { + wnaf[pos - 2] -= 1 << w; + } + wnaf[pos - 1] = 0; + } + ++pos; + } + + return skew; +} + +struct secp256k1_pippenger_point_state { + int skew_na; + size_t input_pos; +}; + +struct secp256k1_pippenger_state { + int *wnaf_na; + struct secp256k1_pippenger_point_state* ps; +}; + +/* + * pippenger_wnaf computes the result of a multi-point multiplication as + * follows: The scalars are brought into wnaf with n_wnaf elements each. Then + * for every i < n_wnaf, first each point is added to a "bucket" corresponding + * to the point's wnaf[i]. Second, the buckets are added together such that + * r += 1*bucket[0] + 3*bucket[1] + 5*bucket[2] + ... + */ +static int secp256k1_ecmult_pippenger_wnaf(secp256k1_gej *buckets, int bucket_window, struct secp256k1_pippenger_state *state, secp256k1_gej *r, const secp256k1_scalar *sc, const secp256k1_ge *pt, size_t num) { + size_t n_wnaf = WNAF_SIZE(bucket_window+1); + size_t np; + size_t no = 0; + int i; + int j; + + for (np = 0; np < num; ++np) { + if (secp256k1_scalar_is_zero(&sc[np]) || secp256k1_ge_is_infinity(&pt[np])) { + continue; + } + state->ps[no].input_pos = np; + state->ps[no].skew_na = secp256k1_wnaf_fixed(&state->wnaf_na[no*n_wnaf], &sc[np], bucket_window+1); + no++; + } + secp256k1_gej_set_infinity(r); + + if (no == 0) { + return 1; + } + + for (i = n_wnaf - 1; i >= 0; i--) { + secp256k1_gej running_sum; + + for(j = 0; j < ECMULT_TABLE_SIZE(bucket_window+2); j++) { + secp256k1_gej_set_infinity(&buckets[j]); + } + + for (np = 0; np < no; ++np) { + int n = state->wnaf_na[np*n_wnaf + i]; + struct secp256k1_pippenger_point_state point_state = state->ps[np]; + secp256k1_ge tmp; + int idx; + + if (i == 0) { + /* correct for wnaf skew */ + int skew = point_state.skew_na; + if (skew) { + secp256k1_ge_neg(&tmp, &pt[point_state.input_pos]); + secp256k1_gej_add_ge_var(&buckets[0], &buckets[0], &tmp, NULL); + } + } + if (n > 0) { + idx = (n - 1)/2; + secp256k1_gej_add_ge_var(&buckets[idx], &buckets[idx], &pt[point_state.input_pos], NULL); + } else if (n < 0) { + idx = -(n + 1)/2; + secp256k1_ge_neg(&tmp, &pt[point_state.input_pos]); + secp256k1_gej_add_ge_var(&buckets[idx], &buckets[idx], &tmp, NULL); + } + } + + for(j = 0; j < bucket_window; j++) { + secp256k1_gej_double_var(r, r, NULL); + } + + secp256k1_gej_set_infinity(&running_sum); + /* Accumulate the sum: bucket[0] + 3*bucket[1] + 5*bucket[2] + 7*bucket[3] + ... + * = bucket[0] + bucket[1] + bucket[2] + bucket[3] + ... + * + 2 * (bucket[1] + 2*bucket[2] + 3*bucket[3] + ...) + * using an intermediate running sum: + * running_sum = bucket[0] + bucket[1] + bucket[2] + ... + * + * The doubling is done implicitly by deferring the final window doubling (of 'r'). + */ + for(j = ECMULT_TABLE_SIZE(bucket_window+2) - 1; j > 0; j--) { + secp256k1_gej_add_var(&running_sum, &running_sum, &buckets[j], NULL); + secp256k1_gej_add_var(r, r, &running_sum, NULL); + } + + secp256k1_gej_add_var(&running_sum, &running_sum, &buckets[0], NULL); + secp256k1_gej_double_var(r, r, NULL); + secp256k1_gej_add_var(r, r, &running_sum, NULL); + } + return 1; +} + +/** + * Returns optimal bucket_window (number of bits of a scalar represented by a + * set of buckets) for a given number of points. + */ +static int secp256k1_pippenger_bucket_window(size_t n) { +#ifdef USE_ENDOMORPHISM + if (n <= 1) { + return 1; + } else if (n <= 4) { + return 2; + } else if (n <= 20) { + return 3; + } else if (n <= 57) { + return 4; + } else if (n <= 136) { + return 5; + } else if (n <= 235) { + return 6; + } else if (n <= 1260) { + return 7; + } else if (n <= 4420) { + return 9; + } else if (n <= 7880) { + return 10; + } else if (n <= 16050) { + return 11; + } else { + return PIPPENGER_MAX_BUCKET_WINDOW; + } +#else + if (n <= 1) { + return 1; + } else if (n <= 11) { + return 2; + } else if (n <= 45) { + return 3; + } else if (n <= 100) { + return 4; + } else if (n <= 275) { + return 5; + } else if (n <= 625) { + return 6; + } else if (n <= 1850) { + return 7; + } else if (n <= 3400) { + return 8; + } else if (n <= 9630) { + return 9; + } else if (n <= 17900) { + return 10; + } else if (n <= 32800) { + return 11; + } else { + return PIPPENGER_MAX_BUCKET_WINDOW; + } +#endif +} + +/** + * Returns the maximum optimal number of points for a bucket_window. + */ +static size_t secp256k1_pippenger_bucket_window_inv(int bucket_window) { + switch(bucket_window) { +#ifdef USE_ENDOMORPHISM + case 1: return 1; + case 2: return 4; + case 3: return 20; + case 4: return 57; + case 5: return 136; + case 6: return 235; + case 7: return 1260; + case 8: return 1260; + case 9: return 4420; + case 10: return 7880; + case 11: return 16050; + case PIPPENGER_MAX_BUCKET_WINDOW: return SIZE_MAX; +#else + case 1: return 1; + case 2: return 11; + case 3: return 45; + case 4: return 100; + case 5: return 275; + case 6: return 625; + case 7: return 1850; + case 8: return 3400; + case 9: return 9630; + case 10: return 17900; + case 11: return 32800; + case PIPPENGER_MAX_BUCKET_WINDOW: return SIZE_MAX; +#endif + } + return 0; +} + + +#ifdef USE_ENDOMORPHISM +SECP256K1_INLINE static void secp256k1_ecmult_endo_split(secp256k1_scalar *s1, secp256k1_scalar *s2, secp256k1_ge *p1, secp256k1_ge *p2) { + secp256k1_scalar tmp = *s1; + secp256k1_scalar_split_lambda(s1, s2, &tmp); + secp256k1_ge_mul_lambda(p2, p1); + + if (secp256k1_scalar_is_high(s1)) { + secp256k1_scalar_negate(s1, s1); + secp256k1_ge_neg(p1, p1); + } + if (secp256k1_scalar_is_high(s2)) { + secp256k1_scalar_negate(s2, s2); + secp256k1_ge_neg(p2, p2); + } +} +#endif + +/** + * Returns the scratch size required for a given number of points (excluding + * base point G) without considering alignment. + */ +static size_t secp256k1_pippenger_scratch_size(size_t n_points, int bucket_window) { +#ifdef USE_ENDOMORPHISM + size_t entries = 2*n_points + 2; +#else + size_t entries = n_points + 1; +#endif + size_t entry_size = sizeof(secp256k1_ge) + sizeof(secp256k1_scalar) + sizeof(struct secp256k1_pippenger_point_state) + (WNAF_SIZE(bucket_window+1)+1)*sizeof(int); + return ((1<ps = (struct secp256k1_pippenger_point_state *) secp256k1_scratch_alloc(scratch, entries * sizeof(*state_space->ps)); + state_space->wnaf_na = (int *) secp256k1_scratch_alloc(scratch, entries*(WNAF_SIZE(bucket_window+1)) * sizeof(int)); + buckets = (secp256k1_gej *) secp256k1_scratch_alloc(scratch, (1<ps[i].skew_na = 0; + for(j = 0; j < WNAF_SIZE(bucket_window+1); j++) { + state_space->wnaf_na[i * WNAF_SIZE(bucket_window+1) + j] = 0; + } + } + for(i = 0; i < 1< max_alloc) { + break; + } + space_for_points = max_alloc - space_overhead; + + n_points = space_for_points/entry_size; + n_points = n_points > max_points ? max_points : n_points; + if (n_points > res) { + res = n_points; + } + if (n_points < max_points) { + /* A larger bucket_window may support even more points. But if we + * would choose that then the caller couldn't safely use any number + * smaller than what this function returns */ + break; + } + } + return res; +} + +typedef int (*secp256k1_ecmult_multi_func)(const secp256k1_ecmult_context*, secp256k1_scratch*, secp256k1_gej*, const secp256k1_scalar*, secp256k1_ecmult_multi_callback cb, void*, size_t); +static int secp256k1_ecmult_multi_var(const secp256k1_ecmult_context *ctx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) { + size_t i; + + int (*f)(const secp256k1_ecmult_context*, secp256k1_scratch*, secp256k1_gej*, const secp256k1_scalar*, secp256k1_ecmult_multi_callback cb, void*, size_t, size_t); + size_t max_points; + size_t n_batches; + size_t n_batch_points; + + secp256k1_gej_set_infinity(r); + if (inp_g_sc == NULL && n == 0) { + return 1; + } else if (n == 0) { + secp256k1_scalar szero; + secp256k1_scalar_set_int(&szero, 0); + secp256k1_ecmult(ctx, r, r, &szero, inp_g_sc); + return 1; + } + + max_points = secp256k1_pippenger_max_points(scratch); + if (max_points == 0) { + return 0; + } else if (max_points > ECMULT_MAX_POINTS_PER_BATCH) { + max_points = ECMULT_MAX_POINTS_PER_BATCH; + } + n_batches = (n+max_points-1)/max_points; + n_batch_points = (n+n_batches-1)/n_batches; + + if (n_batch_points >= ECMULT_PIPPENGER_THRESHOLD) { + f = secp256k1_ecmult_pippenger_batch; + } else { + max_points = secp256k1_strauss_max_points(scratch); + if (max_points == 0) { + return 0; + } + n_batches = (n+max_points-1)/max_points; + n_batch_points = (n+n_batches-1)/n_batches; + f = secp256k1_ecmult_strauss_batch; + } + for(i = 0; i < n_batches; i++) { + size_t nbp = n < n_batch_points ? n : n_batch_points; + size_t offset = n_batch_points*i; + secp256k1_gej tmp; + if (!f(ctx, scratch, &tmp, i == 0 ? inp_g_sc : NULL, cb, cbdata, nbp, offset)) { + return 0; + } + secp256k1_gej_add_var(r, r, &tmp, NULL); + n -= nbp; + } + return 1; +} + +#endif /* SECP256K1_ECMULT_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field.h new file mode 100644 index 000000000..bb6692ad5 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field.h @@ -0,0 +1,132 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_FIELD_H +#define SECP256K1_FIELD_H + +/** Field element module. + * + * Field elements can be represented in several ways, but code accessing + * it (and implementations) need to take certain properties into account: + * - Each field element can be normalized or not. + * - Each field element has a magnitude, which represents how far away + * its representation is away from normalization. Normalized elements + * always have a magnitude of 1, but a magnitude of 1 doesn't imply + * normality. + */ + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#if defined(USE_FIELD_10X26) +#include "field_10x26.h" +#elif defined(USE_FIELD_5X52) +#include "field_5x52.h" +#else +#error "Please select field implementation" +#endif + +#include "util.h" + +/** Normalize a field element. */ +static void secp256k1_fe_normalize(secp256k1_fe *r); + +/** Weakly normalize a field element: reduce it magnitude to 1, but don't fully normalize. */ +static void secp256k1_fe_normalize_weak(secp256k1_fe *r); + +/** Normalize a field element, without constant-time guarantee. */ +static void secp256k1_fe_normalize_var(secp256k1_fe *r); + +/** Verify whether a field element represents zero i.e. would normalize to a zero value. The field + * implementation may optionally normalize the input, but this should not be relied upon. */ +static int secp256k1_fe_normalizes_to_zero(secp256k1_fe *r); + +/** Verify whether a field element represents zero i.e. would normalize to a zero value. The field + * implementation may optionally normalize the input, but this should not be relied upon. */ +static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r); + +/** Set a field element equal to a small integer. Resulting field element is normalized. */ +static void secp256k1_fe_set_int(secp256k1_fe *r, int a); + +/** Sets a field element equal to zero, initializing all fields. */ +static void secp256k1_fe_clear(secp256k1_fe *a); + +/** Verify whether a field element is zero. Requires the input to be normalized. */ +static int secp256k1_fe_is_zero(const secp256k1_fe *a); + +/** Check the "oddness" of a field element. Requires the input to be normalized. */ +static int secp256k1_fe_is_odd(const secp256k1_fe *a); + +/** Compare two field elements. Requires magnitude-1 inputs. */ +static int secp256k1_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b); + +/** Same as secp256k1_fe_equal, but may be variable time. */ +static int secp256k1_fe_equal_var(const secp256k1_fe *a, const secp256k1_fe *b); + +/** Compare two field elements. Requires both inputs to be normalized */ +static int secp256k1_fe_cmp_var(const secp256k1_fe *a, const secp256k1_fe *b); + +/** Set a field element equal to 32-byte big endian value. If successful, the resulting field element is normalized. */ +static int secp256k1_fe_set_b32(secp256k1_fe *r, const unsigned char *a); + +/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */ +static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe *a); + +/** Set a field element equal to the additive inverse of another. Takes a maximum magnitude of the input + * as an argument. The magnitude of the output is one higher. */ +static void secp256k1_fe_negate(secp256k1_fe *r, const secp256k1_fe *a, int m); + +/** Multiplies the passed field element with a small integer constant. Multiplies the magnitude by that + * small integer. */ +static void secp256k1_fe_mul_int(secp256k1_fe *r, int a); + +/** Adds a field element to another. The result has the sum of the inputs' magnitudes as magnitude. */ +static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a); + +/** Sets a field element to be the product of two others. Requires the inputs' magnitudes to be at most 8. + * The output magnitude is 1 (but not guaranteed to be normalized). */ +static void secp256k1_fe_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b); + +/** Sets a field element to be the square of another. Requires the input's magnitude to be at most 8. + * The output magnitude is 1 (but not guaranteed to be normalized). */ +static void secp256k1_fe_sqr(secp256k1_fe *r, const secp256k1_fe *a); + +/** If a has a square root, it is computed in r and 1 is returned. If a does not + * have a square root, the root of its negation is computed and 0 is returned. + * The input's magnitude can be at most 8. The output magnitude is 1 (but not + * guaranteed to be normalized). The result in r will always be a square + * itself. */ +static int secp256k1_fe_sqrt(secp256k1_fe *r, const secp256k1_fe *a); + +/** Checks whether a field element is a quadratic residue. */ +static int secp256k1_fe_is_quad_var(const secp256k1_fe *a); + +/** Sets a field element to be the (modular) inverse of another. Requires the input's magnitude to be + * at most 8. The output magnitude is 1 (but not guaranteed to be normalized). */ +static void secp256k1_fe_inv(secp256k1_fe *r, const secp256k1_fe *a); + +/** Potentially faster version of secp256k1_fe_inv, without constant-time guarantee. */ +static void secp256k1_fe_inv_var(secp256k1_fe *r, const secp256k1_fe *a); + +/** Calculate the (modular) inverses of a batch of field elements. Requires the inputs' magnitudes to be + * at most 8. The output magnitudes are 1 (but not guaranteed to be normalized). The inputs and + * outputs must not overlap in memory. */ +static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len); + +/** Convert a field element to the storage type. */ +static void secp256k1_fe_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a); + +/** Convert a field element back from the storage type. */ +static void secp256k1_fe_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a); + +/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */ +static void secp256k1_fe_storage_cmov(secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag); + +/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */ +static void secp256k1_fe_cmov(secp256k1_fe *r, const secp256k1_fe *a, int flag); + +#endif /* SECP256K1_FIELD_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_10x26.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_10x26.h new file mode 100644 index 000000000..727c5267f --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_10x26.h @@ -0,0 +1,48 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_FIELD_REPR_H +#define SECP256K1_FIELD_REPR_H + +#include + +typedef struct { + /* X = sum(i=0..9, elem[i]*2^26) mod n */ + uint32_t n[10]; +#ifdef VERIFY + int magnitude; + int normalized; +#endif +} secp256k1_fe; + +/* Unpacks a constant into a overlapping multi-limbed FE element. */ +#define SECP256K1_FE_CONST_INNER(d7, d6, d5, d4, d3, d2, d1, d0) { \ + (d0) & 0x3FFFFFFUL, \ + (((uint32_t)d0) >> 26) | (((uint32_t)(d1) & 0xFFFFFUL) << 6), \ + (((uint32_t)d1) >> 20) | (((uint32_t)(d2) & 0x3FFFUL) << 12), \ + (((uint32_t)d2) >> 14) | (((uint32_t)(d3) & 0xFFUL) << 18), \ + (((uint32_t)d3) >> 8) | (((uint32_t)(d4) & 0x3UL) << 24), \ + (((uint32_t)d4) >> 2) & 0x3FFFFFFUL, \ + (((uint32_t)d4) >> 28) | (((uint32_t)(d5) & 0x3FFFFFUL) << 4), \ + (((uint32_t)d5) >> 22) | (((uint32_t)(d6) & 0xFFFFUL) << 10), \ + (((uint32_t)d6) >> 16) | (((uint32_t)(d7) & 0x3FFUL) << 16), \ + (((uint32_t)d7) >> 10) \ +} + +#ifdef VERIFY +#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0)), 1, 1} +#else +#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0))} +#endif + +typedef struct { + uint32_t n[8]; +} secp256k1_fe_storage; + +#define SECP256K1_FE_STORAGE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{ (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }} +#define SECP256K1_FE_STORAGE_CONST_GET(d) d.n[7], d.n[6], d.n[5], d.n[4],d.n[3], d.n[2], d.n[1], d.n[0] + +#endif /* SECP256K1_FIELD_REPR_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_10x26_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_10x26_impl.h new file mode 100644 index 000000000..94f8132fc --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_10x26_impl.h @@ -0,0 +1,1161 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_FIELD_REPR_IMPL_H +#define SECP256K1_FIELD_REPR_IMPL_H + +#include "util.h" +#include "num.h" +#include "field.h" + +#ifdef VERIFY +static void secp256k1_fe_verify(const secp256k1_fe *a) { + const uint32_t *d = a->n; + int m = a->normalized ? 1 : 2 * a->magnitude, r = 1; + r &= (d[0] <= 0x3FFFFFFUL * m); + r &= (d[1] <= 0x3FFFFFFUL * m); + r &= (d[2] <= 0x3FFFFFFUL * m); + r &= (d[3] <= 0x3FFFFFFUL * m); + r &= (d[4] <= 0x3FFFFFFUL * m); + r &= (d[5] <= 0x3FFFFFFUL * m); + r &= (d[6] <= 0x3FFFFFFUL * m); + r &= (d[7] <= 0x3FFFFFFUL * m); + r &= (d[8] <= 0x3FFFFFFUL * m); + r &= (d[9] <= 0x03FFFFFUL * m); + r &= (a->magnitude >= 0); + r &= (a->magnitude <= 32); + if (a->normalized) { + r &= (a->magnitude <= 1); + if (r && (d[9] == 0x03FFFFFUL)) { + uint32_t mid = d[8] & d[7] & d[6] & d[5] & d[4] & d[3] & d[2]; + if (mid == 0x3FFFFFFUL) { + r &= ((d[1] + 0x40UL + ((d[0] + 0x3D1UL) >> 26)) <= 0x3FFFFFFUL); + } + } + } + VERIFY_CHECK(r == 1); +} +#endif + +static void secp256k1_fe_normalize(secp256k1_fe *r) { + uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4], + t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9]; + + /* Reduce t9 at the start so there will be at most a single carry from the first pass */ + uint32_t m; + uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x3D1UL; t1 += (x << 6); + t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; m = t2; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; m &= t3; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; m &= t4; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; m &= t5; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; m &= t6; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; m &= t7; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; m &= t8; + + /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t9 >> 23 == 0); + + /* At most a single final reduction is needed; check if the value is >= the field characteristic */ + x = (t9 >> 22) | ((t9 == 0x03FFFFFUL) & (m == 0x3FFFFFFUL) + & ((t1 + 0x40UL + ((t0 + 0x3D1UL) >> 26)) > 0x3FFFFFFUL)); + + /* Apply the final reduction (for constant-time behaviour, we do it always) */ + t0 += x * 0x3D1UL; t1 += (x << 6); + t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; + + /* If t9 didn't carry to bit 22 already, then it should have after any final reduction */ + VERIFY_CHECK(t9 >> 22 == x); + + /* Mask off the possible multiple of 2^256 from the final reduction */ + t9 &= 0x03FFFFFUL; + + r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; + r->n[5] = t5; r->n[6] = t6; r->n[7] = t7; r->n[8] = t8; r->n[9] = t9; + +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_normalize_weak(secp256k1_fe *r) { + uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4], + t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9]; + + /* Reduce t9 at the start so there will be at most a single carry from the first pass */ + uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x3D1UL; t1 += (x << 6); + t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; + + /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t9 >> 23 == 0); + + r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; + r->n[5] = t5; r->n[6] = t6; r->n[7] = t7; r->n[8] = t8; r->n[9] = t9; + +#ifdef VERIFY + r->magnitude = 1; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_normalize_var(secp256k1_fe *r) { + uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4], + t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9]; + + /* Reduce t9 at the start so there will be at most a single carry from the first pass */ + uint32_t m; + uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x3D1UL; t1 += (x << 6); + t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; m = t2; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; m &= t3; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; m &= t4; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; m &= t5; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; m &= t6; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; m &= t7; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; m &= t8; + + /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t9 >> 23 == 0); + + /* At most a single final reduction is needed; check if the value is >= the field characteristic */ + x = (t9 >> 22) | ((t9 == 0x03FFFFFUL) & (m == 0x3FFFFFFUL) + & ((t1 + 0x40UL + ((t0 + 0x3D1UL) >> 26)) > 0x3FFFFFFUL)); + + if (x) { + t0 += 0x3D1UL; t1 += (x << 6); + t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; + + /* If t9 didn't carry to bit 22 already, then it should have after any final reduction */ + VERIFY_CHECK(t9 >> 22 == x); + + /* Mask off the possible multiple of 2^256 from the final reduction */ + t9 &= 0x03FFFFFUL; + } + + r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; + r->n[5] = t5; r->n[6] = t6; r->n[7] = t7; r->n[8] = t8; r->n[9] = t9; + +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif +} + +static int secp256k1_fe_normalizes_to_zero(secp256k1_fe *r) { + uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4], + t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9]; + + /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */ + uint32_t z0, z1; + + /* Reduce t9 at the start so there will be at most a single carry from the first pass */ + uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x3D1UL; t1 += (x << 6); + t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; z0 = t0; z1 = t0 ^ 0x3D0UL; + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; z0 |= t1; z1 &= t1 ^ 0x40UL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; z0 |= t2; z1 &= t2; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; z0 |= t3; z1 &= t3; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; z0 |= t4; z1 &= t4; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; z0 |= t5; z1 &= t5; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; z0 |= t6; z1 &= t6; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; z0 |= t7; z1 &= t7; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; z0 |= t8; z1 &= t8; + z0 |= t9; z1 &= t9 ^ 0x3C00000UL; + + /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t9 >> 23 == 0); + + return (z0 == 0) | (z1 == 0x3FFFFFFUL); +} + +static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r) { + uint32_t t0, t1, t2, t3, t4, t5, t6, t7, t8, t9; + uint32_t z0, z1; + uint32_t x; + + t0 = r->n[0]; + t9 = r->n[9]; + + /* Reduce t9 at the start so there will be at most a single carry from the first pass */ + x = t9 >> 22; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x3D1UL; + + /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */ + z0 = t0 & 0x3FFFFFFUL; + z1 = z0 ^ 0x3D0UL; + + /* Fast return path should catch the majority of cases */ + if ((z0 != 0UL) & (z1 != 0x3FFFFFFUL)) { + return 0; + } + + t1 = r->n[1]; + t2 = r->n[2]; + t3 = r->n[3]; + t4 = r->n[4]; + t5 = r->n[5]; + t6 = r->n[6]; + t7 = r->n[7]; + t8 = r->n[8]; + + t9 &= 0x03FFFFFUL; + t1 += (x << 6); + + t1 += (t0 >> 26); + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; z0 |= t1; z1 &= t1 ^ 0x40UL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; z0 |= t2; z1 &= t2; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; z0 |= t3; z1 &= t3; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; z0 |= t4; z1 &= t4; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; z0 |= t5; z1 &= t5; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; z0 |= t6; z1 &= t6; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; z0 |= t7; z1 &= t7; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; z0 |= t8; z1 &= t8; + z0 |= t9; z1 &= t9 ^ 0x3C00000UL; + + /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t9 >> 23 == 0); + + return (z0 == 0) | (z1 == 0x3FFFFFFUL); +} + +SECP256K1_INLINE static void secp256k1_fe_set_int(secp256k1_fe *r, int a) { + r->n[0] = a; + r->n[1] = r->n[2] = r->n[3] = r->n[4] = r->n[5] = r->n[6] = r->n[7] = r->n[8] = r->n[9] = 0; +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif +} + +SECP256K1_INLINE static int secp256k1_fe_is_zero(const secp256k1_fe *a) { + const uint32_t *t = a->n; +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + secp256k1_fe_verify(a); +#endif + return (t[0] | t[1] | t[2] | t[3] | t[4] | t[5] | t[6] | t[7] | t[8] | t[9]) == 0; +} + +SECP256K1_INLINE static int secp256k1_fe_is_odd(const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + secp256k1_fe_verify(a); +#endif + return a->n[0] & 1; +} + +SECP256K1_INLINE static void secp256k1_fe_clear(secp256k1_fe *a) { + int i; +#ifdef VERIFY + a->magnitude = 0; + a->normalized = 1; +#endif + for (i=0; i<10; i++) { + a->n[i] = 0; + } +} + +static int secp256k1_fe_cmp_var(const secp256k1_fe *a, const secp256k1_fe *b) { + int i; +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + VERIFY_CHECK(b->normalized); + secp256k1_fe_verify(a); + secp256k1_fe_verify(b); +#endif + for (i = 9; i >= 0; i--) { + if (a->n[i] > b->n[i]) { + return 1; + } + if (a->n[i] < b->n[i]) { + return -1; + } + } + return 0; +} + +static int secp256k1_fe_set_b32(secp256k1_fe *r, const unsigned char *a) { + r->n[0] = (uint32_t)a[31] | ((uint32_t)a[30] << 8) | ((uint32_t)a[29] << 16) | ((uint32_t)(a[28] & 0x3) << 24); + r->n[1] = (uint32_t)((a[28] >> 2) & 0x3f) | ((uint32_t)a[27] << 6) | ((uint32_t)a[26] << 14) | ((uint32_t)(a[25] & 0xf) << 22); + r->n[2] = (uint32_t)((a[25] >> 4) & 0xf) | ((uint32_t)a[24] << 4) | ((uint32_t)a[23] << 12) | ((uint32_t)(a[22] & 0x3f) << 20); + r->n[3] = (uint32_t)((a[22] >> 6) & 0x3) | ((uint32_t)a[21] << 2) | ((uint32_t)a[20] << 10) | ((uint32_t)a[19] << 18); + r->n[4] = (uint32_t)a[18] | ((uint32_t)a[17] << 8) | ((uint32_t)a[16] << 16) | ((uint32_t)(a[15] & 0x3) << 24); + r->n[5] = (uint32_t)((a[15] >> 2) & 0x3f) | ((uint32_t)a[14] << 6) | ((uint32_t)a[13] << 14) | ((uint32_t)(a[12] & 0xf) << 22); + r->n[6] = (uint32_t)((a[12] >> 4) & 0xf) | ((uint32_t)a[11] << 4) | ((uint32_t)a[10] << 12) | ((uint32_t)(a[9] & 0x3f) << 20); + r->n[7] = (uint32_t)((a[9] >> 6) & 0x3) | ((uint32_t)a[8] << 2) | ((uint32_t)a[7] << 10) | ((uint32_t)a[6] << 18); + r->n[8] = (uint32_t)a[5] | ((uint32_t)a[4] << 8) | ((uint32_t)a[3] << 16) | ((uint32_t)(a[2] & 0x3) << 24); + r->n[9] = (uint32_t)((a[2] >> 2) & 0x3f) | ((uint32_t)a[1] << 6) | ((uint32_t)a[0] << 14); + + if (r->n[9] == 0x3FFFFFUL && (r->n[8] & r->n[7] & r->n[6] & r->n[5] & r->n[4] & r->n[3] & r->n[2]) == 0x3FFFFFFUL && (r->n[1] + 0x40UL + ((r->n[0] + 0x3D1UL) >> 26)) > 0x3FFFFFFUL) { + return 0; + } +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif + return 1; +} + +/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */ +static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + secp256k1_fe_verify(a); +#endif + r[0] = (a->n[9] >> 14) & 0xff; + r[1] = (a->n[9] >> 6) & 0xff; + r[2] = ((a->n[9] & 0x3F) << 2) | ((a->n[8] >> 24) & 0x3); + r[3] = (a->n[8] >> 16) & 0xff; + r[4] = (a->n[8] >> 8) & 0xff; + r[5] = a->n[8] & 0xff; + r[6] = (a->n[7] >> 18) & 0xff; + r[7] = (a->n[7] >> 10) & 0xff; + r[8] = (a->n[7] >> 2) & 0xff; + r[9] = ((a->n[7] & 0x3) << 6) | ((a->n[6] >> 20) & 0x3f); + r[10] = (a->n[6] >> 12) & 0xff; + r[11] = (a->n[6] >> 4) & 0xff; + r[12] = ((a->n[6] & 0xf) << 4) | ((a->n[5] >> 22) & 0xf); + r[13] = (a->n[5] >> 14) & 0xff; + r[14] = (a->n[5] >> 6) & 0xff; + r[15] = ((a->n[5] & 0x3f) << 2) | ((a->n[4] >> 24) & 0x3); + r[16] = (a->n[4] >> 16) & 0xff; + r[17] = (a->n[4] >> 8) & 0xff; + r[18] = a->n[4] & 0xff; + r[19] = (a->n[3] >> 18) & 0xff; + r[20] = (a->n[3] >> 10) & 0xff; + r[21] = (a->n[3] >> 2) & 0xff; + r[22] = ((a->n[3] & 0x3) << 6) | ((a->n[2] >> 20) & 0x3f); + r[23] = (a->n[2] >> 12) & 0xff; + r[24] = (a->n[2] >> 4) & 0xff; + r[25] = ((a->n[2] & 0xf) << 4) | ((a->n[1] >> 22) & 0xf); + r[26] = (a->n[1] >> 14) & 0xff; + r[27] = (a->n[1] >> 6) & 0xff; + r[28] = ((a->n[1] & 0x3f) << 2) | ((a->n[0] >> 24) & 0x3); + r[29] = (a->n[0] >> 16) & 0xff; + r[30] = (a->n[0] >> 8) & 0xff; + r[31] = a->n[0] & 0xff; +} + +SECP256K1_INLINE static void secp256k1_fe_negate(secp256k1_fe *r, const secp256k1_fe *a, int m) { +#ifdef VERIFY + VERIFY_CHECK(a->magnitude <= m); + secp256k1_fe_verify(a); +#endif + r->n[0] = 0x3FFFC2FUL * 2 * (m + 1) - a->n[0]; + r->n[1] = 0x3FFFFBFUL * 2 * (m + 1) - a->n[1]; + r->n[2] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[2]; + r->n[3] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[3]; + r->n[4] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[4]; + r->n[5] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[5]; + r->n[6] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[6]; + r->n[7] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[7]; + r->n[8] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[8]; + r->n[9] = 0x03FFFFFUL * 2 * (m + 1) - a->n[9]; +#ifdef VERIFY + r->magnitude = m + 1; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +SECP256K1_INLINE static void secp256k1_fe_mul_int(secp256k1_fe *r, int a) { + r->n[0] *= a; + r->n[1] *= a; + r->n[2] *= a; + r->n[3] *= a; + r->n[4] *= a; + r->n[5] *= a; + r->n[6] *= a; + r->n[7] *= a; + r->n[8] *= a; + r->n[9] *= a; +#ifdef VERIFY + r->magnitude *= a; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a) { +#ifdef VERIFY + secp256k1_fe_verify(a); +#endif + r->n[0] += a->n[0]; + r->n[1] += a->n[1]; + r->n[2] += a->n[2]; + r->n[3] += a->n[3]; + r->n[4] += a->n[4]; + r->n[5] += a->n[5]; + r->n[6] += a->n[6]; + r->n[7] += a->n[7]; + r->n[8] += a->n[8]; + r->n[9] += a->n[9]; +#ifdef VERIFY + r->magnitude += a->magnitude; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +#if defined(USE_EXTERNAL_ASM) + +/* External assembler implementation */ +void secp256k1_fe_mul_inner(uint32_t *r, const uint32_t *a, const uint32_t * SECP256K1_RESTRICT b); +void secp256k1_fe_sqr_inner(uint32_t *r, const uint32_t *a); + +#else + +#ifdef VERIFY +#define VERIFY_BITS(x, n) VERIFY_CHECK(((x) >> (n)) == 0) +#else +#define VERIFY_BITS(x, n) do { } while(0) +#endif + +SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint32_t *r, const uint32_t *a, const uint32_t * SECP256K1_RESTRICT b) { + uint64_t c, d; + uint64_t u0, u1, u2, u3, u4, u5, u6, u7, u8; + uint32_t t9, t1, t0, t2, t3, t4, t5, t6, t7; + const uint32_t M = 0x3FFFFFFUL, R0 = 0x3D10UL, R1 = 0x400UL; + + VERIFY_BITS(a[0], 30); + VERIFY_BITS(a[1], 30); + VERIFY_BITS(a[2], 30); + VERIFY_BITS(a[3], 30); + VERIFY_BITS(a[4], 30); + VERIFY_BITS(a[5], 30); + VERIFY_BITS(a[6], 30); + VERIFY_BITS(a[7], 30); + VERIFY_BITS(a[8], 30); + VERIFY_BITS(a[9], 26); + VERIFY_BITS(b[0], 30); + VERIFY_BITS(b[1], 30); + VERIFY_BITS(b[2], 30); + VERIFY_BITS(b[3], 30); + VERIFY_BITS(b[4], 30); + VERIFY_BITS(b[5], 30); + VERIFY_BITS(b[6], 30); + VERIFY_BITS(b[7], 30); + VERIFY_BITS(b[8], 30); + VERIFY_BITS(b[9], 26); + + /** [... a b c] is a shorthand for ... + a<<52 + b<<26 + c<<0 mod n. + * px is a shorthand for sum(a[i]*b[x-i], i=0..x). + * Note that [x 0 0 0 0 0 0 0 0 0 0] = [x*R1 x*R0]. + */ + + d = (uint64_t)a[0] * b[9] + + (uint64_t)a[1] * b[8] + + (uint64_t)a[2] * b[7] + + (uint64_t)a[3] * b[6] + + (uint64_t)a[4] * b[5] + + (uint64_t)a[5] * b[4] + + (uint64_t)a[6] * b[3] + + (uint64_t)a[7] * b[2] + + (uint64_t)a[8] * b[1] + + (uint64_t)a[9] * b[0]; + /* VERIFY_BITS(d, 64); */ + /* [d 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */ + t9 = d & M; d >>= 26; + VERIFY_BITS(t9, 26); + VERIFY_BITS(d, 38); + /* [d t9 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */ + + c = (uint64_t)a[0] * b[0]; + VERIFY_BITS(c, 60); + /* [d t9 0 0 0 0 0 0 0 0 c] = [p9 0 0 0 0 0 0 0 0 p0] */ + d += (uint64_t)a[1] * b[9] + + (uint64_t)a[2] * b[8] + + (uint64_t)a[3] * b[7] + + (uint64_t)a[4] * b[6] + + (uint64_t)a[5] * b[5] + + (uint64_t)a[6] * b[4] + + (uint64_t)a[7] * b[3] + + (uint64_t)a[8] * b[2] + + (uint64_t)a[9] * b[1]; + VERIFY_BITS(d, 63); + /* [d t9 0 0 0 0 0 0 0 0 c] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + u0 = d & M; d >>= 26; c += u0 * R0; + VERIFY_BITS(u0, 26); + VERIFY_BITS(d, 37); + VERIFY_BITS(c, 61); + /* [d u0 t9 0 0 0 0 0 0 0 0 c-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + t0 = c & M; c >>= 26; c += u0 * R1; + VERIFY_BITS(t0, 26); + VERIFY_BITS(c, 37); + /* [d u0 t9 0 0 0 0 0 0 0 c-u0*R1 t0-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + + c += (uint64_t)a[0] * b[1] + + (uint64_t)a[1] * b[0]; + VERIFY_BITS(c, 62); + /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 p1 p0] */ + d += (uint64_t)a[2] * b[9] + + (uint64_t)a[3] * b[8] + + (uint64_t)a[4] * b[7] + + (uint64_t)a[5] * b[6] + + (uint64_t)a[6] * b[5] + + (uint64_t)a[7] * b[4] + + (uint64_t)a[8] * b[3] + + (uint64_t)a[9] * b[2]; + VERIFY_BITS(d, 63); + /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + u1 = d & M; d >>= 26; c += u1 * R0; + VERIFY_BITS(u1, 26); + VERIFY_BITS(d, 37); + VERIFY_BITS(c, 63); + /* [d u1 0 t9 0 0 0 0 0 0 0 c-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + t1 = c & M; c >>= 26; c += u1 * R1; + VERIFY_BITS(t1, 26); + VERIFY_BITS(c, 38); + /* [d u1 0 t9 0 0 0 0 0 0 c-u1*R1 t1-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + + c += (uint64_t)a[0] * b[2] + + (uint64_t)a[1] * b[1] + + (uint64_t)a[2] * b[0]; + VERIFY_BITS(c, 62); + /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + d += (uint64_t)a[3] * b[9] + + (uint64_t)a[4] * b[8] + + (uint64_t)a[5] * b[7] + + (uint64_t)a[6] * b[6] + + (uint64_t)a[7] * b[5] + + (uint64_t)a[8] * b[4] + + (uint64_t)a[9] * b[3]; + VERIFY_BITS(d, 63); + /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + u2 = d & M; d >>= 26; c += u2 * R0; + VERIFY_BITS(u2, 26); + VERIFY_BITS(d, 37); + VERIFY_BITS(c, 63); + /* [d u2 0 0 t9 0 0 0 0 0 0 c-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + t2 = c & M; c >>= 26; c += u2 * R1; + VERIFY_BITS(t2, 26); + VERIFY_BITS(c, 38); + /* [d u2 0 0 t9 0 0 0 0 0 c-u2*R1 t2-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + + c += (uint64_t)a[0] * b[3] + + (uint64_t)a[1] * b[2] + + (uint64_t)a[2] * b[1] + + (uint64_t)a[3] * b[0]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + d += (uint64_t)a[4] * b[9] + + (uint64_t)a[5] * b[8] + + (uint64_t)a[6] * b[7] + + (uint64_t)a[7] * b[6] + + (uint64_t)a[8] * b[5] + + (uint64_t)a[9] * b[4]; + VERIFY_BITS(d, 63); + /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + u3 = d & M; d >>= 26; c += u3 * R0; + VERIFY_BITS(u3, 26); + VERIFY_BITS(d, 37); + /* VERIFY_BITS(c, 64); */ + /* [d u3 0 0 0 t9 0 0 0 0 0 c-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + t3 = c & M; c >>= 26; c += u3 * R1; + VERIFY_BITS(t3, 26); + VERIFY_BITS(c, 39); + /* [d u3 0 0 0 t9 0 0 0 0 c-u3*R1 t3-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + + c += (uint64_t)a[0] * b[4] + + (uint64_t)a[1] * b[3] + + (uint64_t)a[2] * b[2] + + (uint64_t)a[3] * b[1] + + (uint64_t)a[4] * b[0]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + d += (uint64_t)a[5] * b[9] + + (uint64_t)a[6] * b[8] + + (uint64_t)a[7] * b[7] + + (uint64_t)a[8] * b[6] + + (uint64_t)a[9] * b[5]; + VERIFY_BITS(d, 62); + /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + u4 = d & M; d >>= 26; c += u4 * R0; + VERIFY_BITS(u4, 26); + VERIFY_BITS(d, 36); + /* VERIFY_BITS(c, 64); */ + /* [d u4 0 0 0 0 t9 0 0 0 0 c-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + t4 = c & M; c >>= 26; c += u4 * R1; + VERIFY_BITS(t4, 26); + VERIFY_BITS(c, 39); + /* [d u4 0 0 0 0 t9 0 0 0 c-u4*R1 t4-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + + c += (uint64_t)a[0] * b[5] + + (uint64_t)a[1] * b[4] + + (uint64_t)a[2] * b[3] + + (uint64_t)a[3] * b[2] + + (uint64_t)a[4] * b[1] + + (uint64_t)a[5] * b[0]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)a[6] * b[9] + + (uint64_t)a[7] * b[8] + + (uint64_t)a[8] * b[7] + + (uint64_t)a[9] * b[6]; + VERIFY_BITS(d, 62); + /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + u5 = d & M; d >>= 26; c += u5 * R0; + VERIFY_BITS(u5, 26); + VERIFY_BITS(d, 36); + /* VERIFY_BITS(c, 64); */ + /* [d u5 0 0 0 0 0 t9 0 0 0 c-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + t5 = c & M; c >>= 26; c += u5 * R1; + VERIFY_BITS(t5, 26); + VERIFY_BITS(c, 39); + /* [d u5 0 0 0 0 0 t9 0 0 c-u5*R1 t5-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + + c += (uint64_t)a[0] * b[6] + + (uint64_t)a[1] * b[5] + + (uint64_t)a[2] * b[4] + + (uint64_t)a[3] * b[3] + + (uint64_t)a[4] * b[2] + + (uint64_t)a[5] * b[1] + + (uint64_t)a[6] * b[0]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)a[7] * b[9] + + (uint64_t)a[8] * b[8] + + (uint64_t)a[9] * b[7]; + VERIFY_BITS(d, 61); + /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + u6 = d & M; d >>= 26; c += u6 * R0; + VERIFY_BITS(u6, 26); + VERIFY_BITS(d, 35); + /* VERIFY_BITS(c, 64); */ + /* [d u6 0 0 0 0 0 0 t9 0 0 c-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + t6 = c & M; c >>= 26; c += u6 * R1; + VERIFY_BITS(t6, 26); + VERIFY_BITS(c, 39); + /* [d u6 0 0 0 0 0 0 t9 0 c-u6*R1 t6-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + + c += (uint64_t)a[0] * b[7] + + (uint64_t)a[1] * b[6] + + (uint64_t)a[2] * b[5] + + (uint64_t)a[3] * b[4] + + (uint64_t)a[4] * b[3] + + (uint64_t)a[5] * b[2] + + (uint64_t)a[6] * b[1] + + (uint64_t)a[7] * b[0]; + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x8000007C00000007ULL); + /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)a[8] * b[9] + + (uint64_t)a[9] * b[8]; + VERIFY_BITS(d, 58); + /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + u7 = d & M; d >>= 26; c += u7 * R0; + VERIFY_BITS(u7, 26); + VERIFY_BITS(d, 32); + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x800001703FFFC2F7ULL); + /* [d u7 0 0 0 0 0 0 0 t9 0 c-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + t7 = c & M; c >>= 26; c += u7 * R1; + VERIFY_BITS(t7, 26); + VERIFY_BITS(c, 38); + /* [d u7 0 0 0 0 0 0 0 t9 c-u7*R1 t7-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + + c += (uint64_t)a[0] * b[8] + + (uint64_t)a[1] * b[7] + + (uint64_t)a[2] * b[6] + + (uint64_t)a[3] * b[5] + + (uint64_t)a[4] * b[4] + + (uint64_t)a[5] * b[3] + + (uint64_t)a[6] * b[2] + + (uint64_t)a[7] * b[1] + + (uint64_t)a[8] * b[0]; + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x9000007B80000008ULL); + /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)a[9] * b[9]; + VERIFY_BITS(d, 57); + /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + u8 = d & M; d >>= 26; c += u8 * R0; + VERIFY_BITS(u8, 26); + VERIFY_BITS(d, 31); + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x9000016FBFFFC2F8ULL); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + r[3] = t3; + VERIFY_BITS(r[3], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[4] = t4; + VERIFY_BITS(r[4], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[5] = t5; + VERIFY_BITS(r[5], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[6] = t6; + VERIFY_BITS(r[6], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[7] = t7; + VERIFY_BITS(r[7], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + r[8] = c & M; c >>= 26; c += u8 * R1; + VERIFY_BITS(r[8], 26); + VERIFY_BITS(c, 39); + /* [d u8 0 0 0 0 0 0 0 0 t9+c-u8*R1 r8-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 0 0 t9+c r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += d * R0 + t9; + VERIFY_BITS(c, 45); + /* [d 0 0 0 0 0 0 0 0 0 c-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[9] = c & (M >> 4); c >>= 22; c += d * (R1 << 4); + VERIFY_BITS(r[9], 22); + VERIFY_BITS(c, 46); + /* [d 0 0 0 0 0 0 0 0 r9+((c-d*R1<<4)<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 -d*R1 r9+(c<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + d = c * (R0 >> 4) + t0; + VERIFY_BITS(d, 56); + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 d-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[0] = d & M; d >>= 26; + VERIFY_BITS(r[0], 26); + VERIFY_BITS(d, 30); + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1+d r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += c * (R1 >> 4) + t1; + VERIFY_BITS(d, 53); + VERIFY_CHECK(d <= 0x10000003FFFFBFULL); + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 d-c*R1>>4 r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [r9 r8 r7 r6 r5 r4 r3 t2 d r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[1] = d & M; d >>= 26; + VERIFY_BITS(r[1], 26); + VERIFY_BITS(d, 27); + VERIFY_CHECK(d <= 0x4000000ULL); + /* [r9 r8 r7 r6 r5 r4 r3 t2+d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += t2; + VERIFY_BITS(d, 27); + /* [r9 r8 r7 r6 r5 r4 r3 d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[2] = d; + VERIFY_BITS(r[2], 27); + /* [r9 r8 r7 r6 r5 r4 r3 r2 r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ +} + +SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint32_t *r, const uint32_t *a) { + uint64_t c, d; + uint64_t u0, u1, u2, u3, u4, u5, u6, u7, u8; + uint32_t t9, t0, t1, t2, t3, t4, t5, t6, t7; + const uint32_t M = 0x3FFFFFFUL, R0 = 0x3D10UL, R1 = 0x400UL; + + VERIFY_BITS(a[0], 30); + VERIFY_BITS(a[1], 30); + VERIFY_BITS(a[2], 30); + VERIFY_BITS(a[3], 30); + VERIFY_BITS(a[4], 30); + VERIFY_BITS(a[5], 30); + VERIFY_BITS(a[6], 30); + VERIFY_BITS(a[7], 30); + VERIFY_BITS(a[8], 30); + VERIFY_BITS(a[9], 26); + + /** [... a b c] is a shorthand for ... + a<<52 + b<<26 + c<<0 mod n. + * px is a shorthand for sum(a[i]*a[x-i], i=0..x). + * Note that [x 0 0 0 0 0 0 0 0 0 0] = [x*R1 x*R0]. + */ + + d = (uint64_t)(a[0]*2) * a[9] + + (uint64_t)(a[1]*2) * a[8] + + (uint64_t)(a[2]*2) * a[7] + + (uint64_t)(a[3]*2) * a[6] + + (uint64_t)(a[4]*2) * a[5]; + /* VERIFY_BITS(d, 64); */ + /* [d 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */ + t9 = d & M; d >>= 26; + VERIFY_BITS(t9, 26); + VERIFY_BITS(d, 38); + /* [d t9 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */ + + c = (uint64_t)a[0] * a[0]; + VERIFY_BITS(c, 60); + /* [d t9 0 0 0 0 0 0 0 0 c] = [p9 0 0 0 0 0 0 0 0 p0] */ + d += (uint64_t)(a[1]*2) * a[9] + + (uint64_t)(a[2]*2) * a[8] + + (uint64_t)(a[3]*2) * a[7] + + (uint64_t)(a[4]*2) * a[6] + + (uint64_t)a[5] * a[5]; + VERIFY_BITS(d, 63); + /* [d t9 0 0 0 0 0 0 0 0 c] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + u0 = d & M; d >>= 26; c += u0 * R0; + VERIFY_BITS(u0, 26); + VERIFY_BITS(d, 37); + VERIFY_BITS(c, 61); + /* [d u0 t9 0 0 0 0 0 0 0 0 c-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + t0 = c & M; c >>= 26; c += u0 * R1; + VERIFY_BITS(t0, 26); + VERIFY_BITS(c, 37); + /* [d u0 t9 0 0 0 0 0 0 0 c-u0*R1 t0-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + + c += (uint64_t)(a[0]*2) * a[1]; + VERIFY_BITS(c, 62); + /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 p1 p0] */ + d += (uint64_t)(a[2]*2) * a[9] + + (uint64_t)(a[3]*2) * a[8] + + (uint64_t)(a[4]*2) * a[7] + + (uint64_t)(a[5]*2) * a[6]; + VERIFY_BITS(d, 63); + /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + u1 = d & M; d >>= 26; c += u1 * R0; + VERIFY_BITS(u1, 26); + VERIFY_BITS(d, 37); + VERIFY_BITS(c, 63); + /* [d u1 0 t9 0 0 0 0 0 0 0 c-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + t1 = c & M; c >>= 26; c += u1 * R1; + VERIFY_BITS(t1, 26); + VERIFY_BITS(c, 38); + /* [d u1 0 t9 0 0 0 0 0 0 c-u1*R1 t1-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[2] + + (uint64_t)a[1] * a[1]; + VERIFY_BITS(c, 62); + /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + d += (uint64_t)(a[3]*2) * a[9] + + (uint64_t)(a[4]*2) * a[8] + + (uint64_t)(a[5]*2) * a[7] + + (uint64_t)a[6] * a[6]; + VERIFY_BITS(d, 63); + /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + u2 = d & M; d >>= 26; c += u2 * R0; + VERIFY_BITS(u2, 26); + VERIFY_BITS(d, 37); + VERIFY_BITS(c, 63); + /* [d u2 0 0 t9 0 0 0 0 0 0 c-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + t2 = c & M; c >>= 26; c += u2 * R1; + VERIFY_BITS(t2, 26); + VERIFY_BITS(c, 38); + /* [d u2 0 0 t9 0 0 0 0 0 c-u2*R1 t2-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[3] + + (uint64_t)(a[1]*2) * a[2]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + d += (uint64_t)(a[4]*2) * a[9] + + (uint64_t)(a[5]*2) * a[8] + + (uint64_t)(a[6]*2) * a[7]; + VERIFY_BITS(d, 63); + /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + u3 = d & M; d >>= 26; c += u3 * R0; + VERIFY_BITS(u3, 26); + VERIFY_BITS(d, 37); + /* VERIFY_BITS(c, 64); */ + /* [d u3 0 0 0 t9 0 0 0 0 0 c-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + t3 = c & M; c >>= 26; c += u3 * R1; + VERIFY_BITS(t3, 26); + VERIFY_BITS(c, 39); + /* [d u3 0 0 0 t9 0 0 0 0 c-u3*R1 t3-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[4] + + (uint64_t)(a[1]*2) * a[3] + + (uint64_t)a[2] * a[2]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + d += (uint64_t)(a[5]*2) * a[9] + + (uint64_t)(a[6]*2) * a[8] + + (uint64_t)a[7] * a[7]; + VERIFY_BITS(d, 62); + /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + u4 = d & M; d >>= 26; c += u4 * R0; + VERIFY_BITS(u4, 26); + VERIFY_BITS(d, 36); + /* VERIFY_BITS(c, 64); */ + /* [d u4 0 0 0 0 t9 0 0 0 0 c-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + t4 = c & M; c >>= 26; c += u4 * R1; + VERIFY_BITS(t4, 26); + VERIFY_BITS(c, 39); + /* [d u4 0 0 0 0 t9 0 0 0 c-u4*R1 t4-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[5] + + (uint64_t)(a[1]*2) * a[4] + + (uint64_t)(a[2]*2) * a[3]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)(a[6]*2) * a[9] + + (uint64_t)(a[7]*2) * a[8]; + VERIFY_BITS(d, 62); + /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + u5 = d & M; d >>= 26; c += u5 * R0; + VERIFY_BITS(u5, 26); + VERIFY_BITS(d, 36); + /* VERIFY_BITS(c, 64); */ + /* [d u5 0 0 0 0 0 t9 0 0 0 c-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + t5 = c & M; c >>= 26; c += u5 * R1; + VERIFY_BITS(t5, 26); + VERIFY_BITS(c, 39); + /* [d u5 0 0 0 0 0 t9 0 0 c-u5*R1 t5-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[6] + + (uint64_t)(a[1]*2) * a[5] + + (uint64_t)(a[2]*2) * a[4] + + (uint64_t)a[3] * a[3]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)(a[7]*2) * a[9] + + (uint64_t)a[8] * a[8]; + VERIFY_BITS(d, 61); + /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + u6 = d & M; d >>= 26; c += u6 * R0; + VERIFY_BITS(u6, 26); + VERIFY_BITS(d, 35); + /* VERIFY_BITS(c, 64); */ + /* [d u6 0 0 0 0 0 0 t9 0 0 c-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + t6 = c & M; c >>= 26; c += u6 * R1; + VERIFY_BITS(t6, 26); + VERIFY_BITS(c, 39); + /* [d u6 0 0 0 0 0 0 t9 0 c-u6*R1 t6-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[7] + + (uint64_t)(a[1]*2) * a[6] + + (uint64_t)(a[2]*2) * a[5] + + (uint64_t)(a[3]*2) * a[4]; + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x8000007C00000007ULL); + /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)(a[8]*2) * a[9]; + VERIFY_BITS(d, 58); + /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + u7 = d & M; d >>= 26; c += u7 * R0; + VERIFY_BITS(u7, 26); + VERIFY_BITS(d, 32); + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x800001703FFFC2F7ULL); + /* [d u7 0 0 0 0 0 0 0 t9 0 c-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + t7 = c & M; c >>= 26; c += u7 * R1; + VERIFY_BITS(t7, 26); + VERIFY_BITS(c, 38); + /* [d u7 0 0 0 0 0 0 0 t9 c-u7*R1 t7-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[8] + + (uint64_t)(a[1]*2) * a[7] + + (uint64_t)(a[2]*2) * a[6] + + (uint64_t)(a[3]*2) * a[5] + + (uint64_t)a[4] * a[4]; + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x9000007B80000008ULL); + /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)a[9] * a[9]; + VERIFY_BITS(d, 57); + /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + u8 = d & M; d >>= 26; c += u8 * R0; + VERIFY_BITS(u8, 26); + VERIFY_BITS(d, 31); + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x9000016FBFFFC2F8ULL); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + r[3] = t3; + VERIFY_BITS(r[3], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[4] = t4; + VERIFY_BITS(r[4], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[5] = t5; + VERIFY_BITS(r[5], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[6] = t6; + VERIFY_BITS(r[6], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[7] = t7; + VERIFY_BITS(r[7], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + r[8] = c & M; c >>= 26; c += u8 * R1; + VERIFY_BITS(r[8], 26); + VERIFY_BITS(c, 39); + /* [d u8 0 0 0 0 0 0 0 0 t9+c-u8*R1 r8-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 0 0 t9+c r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += d * R0 + t9; + VERIFY_BITS(c, 45); + /* [d 0 0 0 0 0 0 0 0 0 c-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[9] = c & (M >> 4); c >>= 22; c += d * (R1 << 4); + VERIFY_BITS(r[9], 22); + VERIFY_BITS(c, 46); + /* [d 0 0 0 0 0 0 0 0 r9+((c-d*R1<<4)<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 -d*R1 r9+(c<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + d = c * (R0 >> 4) + t0; + VERIFY_BITS(d, 56); + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 d-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[0] = d & M; d >>= 26; + VERIFY_BITS(r[0], 26); + VERIFY_BITS(d, 30); + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1+d r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += c * (R1 >> 4) + t1; + VERIFY_BITS(d, 53); + VERIFY_CHECK(d <= 0x10000003FFFFBFULL); + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 d-c*R1>>4 r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [r9 r8 r7 r6 r5 r4 r3 t2 d r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[1] = d & M; d >>= 26; + VERIFY_BITS(r[1], 26); + VERIFY_BITS(d, 27); + VERIFY_CHECK(d <= 0x4000000ULL); + /* [r9 r8 r7 r6 r5 r4 r3 t2+d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += t2; + VERIFY_BITS(d, 27); + /* [r9 r8 r7 r6 r5 r4 r3 d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[2] = d; + VERIFY_BITS(r[2], 27); + /* [r9 r8 r7 r6 r5 r4 r3 r2 r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ +} +#endif + +static void secp256k1_fe_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b) { +#ifdef VERIFY + VERIFY_CHECK(a->magnitude <= 8); + VERIFY_CHECK(b->magnitude <= 8); + secp256k1_fe_verify(a); + secp256k1_fe_verify(b); + VERIFY_CHECK(r != b); +#endif + secp256k1_fe_mul_inner(r->n, a->n, b->n); +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_sqr(secp256k1_fe *r, const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->magnitude <= 8); + secp256k1_fe_verify(a); +#endif + secp256k1_fe_sqr_inner(r->n, a->n); +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +static SECP256K1_INLINE void secp256k1_fe_cmov(secp256k1_fe *r, const secp256k1_fe *a, int flag) { + uint32_t mask0, mask1; + mask0 = flag + ~((uint32_t)0); + mask1 = ~mask0; + r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1); + r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1); + r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1); + r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1); + r->n[4] = (r->n[4] & mask0) | (a->n[4] & mask1); + r->n[5] = (r->n[5] & mask0) | (a->n[5] & mask1); + r->n[6] = (r->n[6] & mask0) | (a->n[6] & mask1); + r->n[7] = (r->n[7] & mask0) | (a->n[7] & mask1); + r->n[8] = (r->n[8] & mask0) | (a->n[8] & mask1); + r->n[9] = (r->n[9] & mask0) | (a->n[9] & mask1); +#ifdef VERIFY + if (a->magnitude > r->magnitude) { + r->magnitude = a->magnitude; + } + r->normalized &= a->normalized; +#endif +} + +static SECP256K1_INLINE void secp256k1_fe_storage_cmov(secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag) { + uint32_t mask0, mask1; + mask0 = flag + ~((uint32_t)0); + mask1 = ~mask0; + r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1); + r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1); + r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1); + r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1); + r->n[4] = (r->n[4] & mask0) | (a->n[4] & mask1); + r->n[5] = (r->n[5] & mask0) | (a->n[5] & mask1); + r->n[6] = (r->n[6] & mask0) | (a->n[6] & mask1); + r->n[7] = (r->n[7] & mask0) | (a->n[7] & mask1); +} + +static void secp256k1_fe_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->normalized); +#endif + r->n[0] = a->n[0] | a->n[1] << 26; + r->n[1] = a->n[1] >> 6 | a->n[2] << 20; + r->n[2] = a->n[2] >> 12 | a->n[3] << 14; + r->n[3] = a->n[3] >> 18 | a->n[4] << 8; + r->n[4] = a->n[4] >> 24 | a->n[5] << 2 | a->n[6] << 28; + r->n[5] = a->n[6] >> 4 | a->n[7] << 22; + r->n[6] = a->n[7] >> 10 | a->n[8] << 16; + r->n[7] = a->n[8] >> 16 | a->n[9] << 10; +} + +static SECP256K1_INLINE void secp256k1_fe_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a) { + r->n[0] = a->n[0] & 0x3FFFFFFUL; + r->n[1] = a->n[0] >> 26 | ((a->n[1] << 6) & 0x3FFFFFFUL); + r->n[2] = a->n[1] >> 20 | ((a->n[2] << 12) & 0x3FFFFFFUL); + r->n[3] = a->n[2] >> 14 | ((a->n[3] << 18) & 0x3FFFFFFUL); + r->n[4] = a->n[3] >> 8 | ((a->n[4] << 24) & 0x3FFFFFFUL); + r->n[5] = (a->n[4] >> 2) & 0x3FFFFFFUL; + r->n[6] = a->n[4] >> 28 | ((a->n[5] << 4) & 0x3FFFFFFUL); + r->n[7] = a->n[5] >> 22 | ((a->n[6] << 10) & 0x3FFFFFFUL); + r->n[8] = a->n[6] >> 16 | ((a->n[7] << 16) & 0x3FFFFFFUL); + r->n[9] = a->n[7] >> 10; +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; +#endif +} + +#endif /* SECP256K1_FIELD_REPR_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52.h new file mode 100644 index 000000000..bccd8feb4 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52.h @@ -0,0 +1,47 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_FIELD_REPR_H +#define SECP256K1_FIELD_REPR_H + +#include + +typedef struct { + /* X = sum(i=0..4, elem[i]*2^52) mod n */ + uint64_t n[5]; +#ifdef VERIFY + int magnitude; + int normalized; +#endif +} secp256k1_fe; + +/* Unpacks a constant into a overlapping multi-limbed FE element. */ +#define SECP256K1_FE_CONST_INNER(d7, d6, d5, d4, d3, d2, d1, d0) { \ + (d0) | (((uint64_t)(d1) & 0xFFFFFUL) << 32), \ + ((uint64_t)(d1) >> 20) | (((uint64_t)(d2)) << 12) | (((uint64_t)(d3) & 0xFFUL) << 44), \ + ((uint64_t)(d3) >> 8) | (((uint64_t)(d4) & 0xFFFFFFFUL) << 24), \ + ((uint64_t)(d4) >> 28) | (((uint64_t)(d5)) << 4) | (((uint64_t)(d6) & 0xFFFFUL) << 36), \ + ((uint64_t)(d6) >> 16) | (((uint64_t)(d7)) << 16) \ +} + +#ifdef VERIFY +#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0)), 1, 1} +#else +#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0))} +#endif + +typedef struct { + uint64_t n[4]; +} secp256k1_fe_storage; + +#define SECP256K1_FE_STORAGE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{ \ + (d0) | (((uint64_t)(d1)) << 32), \ + (d2) | (((uint64_t)(d3)) << 32), \ + (d4) | (((uint64_t)(d5)) << 32), \ + (d6) | (((uint64_t)(d7)) << 32) \ +}} + +#endif /* SECP256K1_FIELD_REPR_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52_asm_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52_asm_impl.h new file mode 100644 index 000000000..1fc3171f6 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52_asm_impl.h @@ -0,0 +1,502 @@ +/********************************************************************** + * Copyright (c) 2013-2014 Diederik Huys, Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +/** + * Changelog: + * - March 2013, Diederik Huys: original version + * - November 2014, Pieter Wuille: updated to use Peter Dettman's parallel multiplication algorithm + * - December 2014, Pieter Wuille: converted from YASM to GCC inline assembly + */ + +#ifndef SECP256K1_FIELD_INNER5X52_IMPL_H +#define SECP256K1_FIELD_INNER5X52_IMPL_H + +SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t *a, const uint64_t * SECP256K1_RESTRICT b) { +/** + * Registers: rdx:rax = multiplication accumulator + * r9:r8 = c + * r15:rcx = d + * r10-r14 = a0-a4 + * rbx = b + * rdi = r + * rsi = a / t? + */ + uint64_t tmp1, tmp2, tmp3; +__asm__ __volatile__( + "movq 0(%%rsi),%%r10\n" + "movq 8(%%rsi),%%r11\n" + "movq 16(%%rsi),%%r12\n" + "movq 24(%%rsi),%%r13\n" + "movq 32(%%rsi),%%r14\n" + + /* d += a3 * b0 */ + "movq 0(%%rbx),%%rax\n" + "mulq %%r13\n" + "movq %%rax,%%rcx\n" + "movq %%rdx,%%r15\n" + /* d += a2 * b1 */ + "movq 8(%%rbx),%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a1 * b2 */ + "movq 16(%%rbx),%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d = a0 * b3 */ + "movq 24(%%rbx),%%rax\n" + "mulq %%r10\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* c = a4 * b4 */ + "movq 32(%%rbx),%%rax\n" + "mulq %%r14\n" + "movq %%rax,%%r8\n" + "movq %%rdx,%%r9\n" + /* d += (c & M) * R */ + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* c >>= 52 (%%r8 only) */ + "shrdq $52,%%r9,%%r8\n" + /* t3 (tmp1) = d & M */ + "movq %%rcx,%%rsi\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rsi\n" + "movq %%rsi,%q1\n" + /* d >>= 52 */ + "shrdq $52,%%r15,%%rcx\n" + "xorq %%r15,%%r15\n" + /* d += a4 * b0 */ + "movq 0(%%rbx),%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a3 * b1 */ + "movq 8(%%rbx),%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a2 * b2 */ + "movq 16(%%rbx),%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a1 * b3 */ + "movq 24(%%rbx),%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a0 * b4 */ + "movq 32(%%rbx),%%rax\n" + "mulq %%r10\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += c * R */ + "movq %%r8,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* t4 = d & M (%%rsi) */ + "movq %%rcx,%%rsi\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rsi\n" + /* d >>= 52 */ + "shrdq $52,%%r15,%%rcx\n" + "xorq %%r15,%%r15\n" + /* tx = t4 >> 48 (tmp3) */ + "movq %%rsi,%%rax\n" + "shrq $48,%%rax\n" + "movq %%rax,%q3\n" + /* t4 &= (M >> 4) (tmp2) */ + "movq $0xffffffffffff,%%rax\n" + "andq %%rax,%%rsi\n" + "movq %%rsi,%q2\n" + /* c = a0 * b0 */ + "movq 0(%%rbx),%%rax\n" + "mulq %%r10\n" + "movq %%rax,%%r8\n" + "movq %%rdx,%%r9\n" + /* d += a4 * b1 */ + "movq 8(%%rbx),%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a3 * b2 */ + "movq 16(%%rbx),%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a2 * b3 */ + "movq 24(%%rbx),%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a1 * b4 */ + "movq 32(%%rbx),%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* u0 = d & M (%%rsi) */ + "movq %%rcx,%%rsi\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rsi\n" + /* d >>= 52 */ + "shrdq $52,%%r15,%%rcx\n" + "xorq %%r15,%%r15\n" + /* u0 = (u0 << 4) | tx (%%rsi) */ + "shlq $4,%%rsi\n" + "movq %q3,%%rax\n" + "orq %%rax,%%rsi\n" + /* c += u0 * (R >> 4) */ + "movq $0x1000003d1,%%rax\n" + "mulq %%rsi\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* r[0] = c & M */ + "movq %%r8,%%rax\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq %%rax,0(%%rdi)\n" + /* c >>= 52 */ + "shrdq $52,%%r9,%%r8\n" + "xorq %%r9,%%r9\n" + /* c += a1 * b0 */ + "movq 0(%%rbx),%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* c += a0 * b1 */ + "movq 8(%%rbx),%%rax\n" + "mulq %%r10\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d += a4 * b2 */ + "movq 16(%%rbx),%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a3 * b3 */ + "movq 24(%%rbx),%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a2 * b4 */ + "movq 32(%%rbx),%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* c += (d & M) * R */ + "movq %%rcx,%%rax\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d >>= 52 */ + "shrdq $52,%%r15,%%rcx\n" + "xorq %%r15,%%r15\n" + /* r[1] = c & M */ + "movq %%r8,%%rax\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq %%rax,8(%%rdi)\n" + /* c >>= 52 */ + "shrdq $52,%%r9,%%r8\n" + "xorq %%r9,%%r9\n" + /* c += a2 * b0 */ + "movq 0(%%rbx),%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* c += a1 * b1 */ + "movq 8(%%rbx),%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* c += a0 * b2 (last use of %%r10 = a0) */ + "movq 16(%%rbx),%%rax\n" + "mulq %%r10\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* fetch t3 (%%r10, overwrites a0), t4 (%%rsi) */ + "movq %q2,%%rsi\n" + "movq %q1,%%r10\n" + /* d += a4 * b3 */ + "movq 24(%%rbx),%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a3 * b4 */ + "movq 32(%%rbx),%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* c += (d & M) * R */ + "movq %%rcx,%%rax\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d >>= 52 (%%rcx only) */ + "shrdq $52,%%r15,%%rcx\n" + /* r[2] = c & M */ + "movq %%r8,%%rax\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq %%rax,16(%%rdi)\n" + /* c >>= 52 */ + "shrdq $52,%%r9,%%r8\n" + "xorq %%r9,%%r9\n" + /* c += t3 */ + "addq %%r10,%%r8\n" + /* c += d * R */ + "movq %%rcx,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* r[3] = c & M */ + "movq %%r8,%%rax\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq %%rax,24(%%rdi)\n" + /* c >>= 52 (%%r8 only) */ + "shrdq $52,%%r9,%%r8\n" + /* c += t4 (%%r8 only) */ + "addq %%rsi,%%r8\n" + /* r[4] = c */ + "movq %%r8,32(%%rdi)\n" +: "+S"(a), "=m"(tmp1), "=m"(tmp2), "=m"(tmp3) +: "b"(b), "D"(r) +: "%rax", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "cc", "memory" +); +} + +SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint64_t *r, const uint64_t *a) { +/** + * Registers: rdx:rax = multiplication accumulator + * r9:r8 = c + * rcx:rbx = d + * r10-r14 = a0-a4 + * r15 = M (0xfffffffffffff) + * rdi = r + * rsi = a / t? + */ + uint64_t tmp1, tmp2, tmp3; +__asm__ __volatile__( + "movq 0(%%rsi),%%r10\n" + "movq 8(%%rsi),%%r11\n" + "movq 16(%%rsi),%%r12\n" + "movq 24(%%rsi),%%r13\n" + "movq 32(%%rsi),%%r14\n" + "movq $0xfffffffffffff,%%r15\n" + + /* d = (a0*2) * a3 */ + "leaq (%%r10,%%r10,1),%%rax\n" + "mulq %%r13\n" + "movq %%rax,%%rbx\n" + "movq %%rdx,%%rcx\n" + /* d += (a1*2) * a2 */ + "leaq (%%r11,%%r11,1),%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* c = a4 * a4 */ + "movq %%r14,%%rax\n" + "mulq %%r14\n" + "movq %%rax,%%r8\n" + "movq %%rdx,%%r9\n" + /* d += (c & M) * R */ + "andq %%r15,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* c >>= 52 (%%r8 only) */ + "shrdq $52,%%r9,%%r8\n" + /* t3 (tmp1) = d & M */ + "movq %%rbx,%%rsi\n" + "andq %%r15,%%rsi\n" + "movq %%rsi,%q1\n" + /* d >>= 52 */ + "shrdq $52,%%rcx,%%rbx\n" + "xorq %%rcx,%%rcx\n" + /* a4 *= 2 */ + "addq %%r14,%%r14\n" + /* d += a0 * a4 */ + "movq %%r10,%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* d+= (a1*2) * a3 */ + "leaq (%%r11,%%r11,1),%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* d += a2 * a2 */ + "movq %%r12,%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* d += c * R */ + "movq %%r8,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* t4 = d & M (%%rsi) */ + "movq %%rbx,%%rsi\n" + "andq %%r15,%%rsi\n" + /* d >>= 52 */ + "shrdq $52,%%rcx,%%rbx\n" + "xorq %%rcx,%%rcx\n" + /* tx = t4 >> 48 (tmp3) */ + "movq %%rsi,%%rax\n" + "shrq $48,%%rax\n" + "movq %%rax,%q3\n" + /* t4 &= (M >> 4) (tmp2) */ + "movq $0xffffffffffff,%%rax\n" + "andq %%rax,%%rsi\n" + "movq %%rsi,%q2\n" + /* c = a0 * a0 */ + "movq %%r10,%%rax\n" + "mulq %%r10\n" + "movq %%rax,%%r8\n" + "movq %%rdx,%%r9\n" + /* d += a1 * a4 */ + "movq %%r11,%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* d += (a2*2) * a3 */ + "leaq (%%r12,%%r12,1),%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* u0 = d & M (%%rsi) */ + "movq %%rbx,%%rsi\n" + "andq %%r15,%%rsi\n" + /* d >>= 52 */ + "shrdq $52,%%rcx,%%rbx\n" + "xorq %%rcx,%%rcx\n" + /* u0 = (u0 << 4) | tx (%%rsi) */ + "shlq $4,%%rsi\n" + "movq %q3,%%rax\n" + "orq %%rax,%%rsi\n" + /* c += u0 * (R >> 4) */ + "movq $0x1000003d1,%%rax\n" + "mulq %%rsi\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* r[0] = c & M */ + "movq %%r8,%%rax\n" + "andq %%r15,%%rax\n" + "movq %%rax,0(%%rdi)\n" + /* c >>= 52 */ + "shrdq $52,%%r9,%%r8\n" + "xorq %%r9,%%r9\n" + /* a0 *= 2 */ + "addq %%r10,%%r10\n" + /* c += a0 * a1 */ + "movq %%r10,%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d += a2 * a4 */ + "movq %%r12,%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* d += a3 * a3 */ + "movq %%r13,%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* c += (d & M) * R */ + "movq %%rbx,%%rax\n" + "andq %%r15,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d >>= 52 */ + "shrdq $52,%%rcx,%%rbx\n" + "xorq %%rcx,%%rcx\n" + /* r[1] = c & M */ + "movq %%r8,%%rax\n" + "andq %%r15,%%rax\n" + "movq %%rax,8(%%rdi)\n" + /* c >>= 52 */ + "shrdq $52,%%r9,%%r8\n" + "xorq %%r9,%%r9\n" + /* c += a0 * a2 (last use of %%r10) */ + "movq %%r10,%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* fetch t3 (%%r10, overwrites a0),t4 (%%rsi) */ + "movq %q2,%%rsi\n" + "movq %q1,%%r10\n" + /* c += a1 * a1 */ + "movq %%r11,%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d += a3 * a4 */ + "movq %%r13,%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* c += (d & M) * R */ + "movq %%rbx,%%rax\n" + "andq %%r15,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d >>= 52 (%%rbx only) */ + "shrdq $52,%%rcx,%%rbx\n" + /* r[2] = c & M */ + "movq %%r8,%%rax\n" + "andq %%r15,%%rax\n" + "movq %%rax,16(%%rdi)\n" + /* c >>= 52 */ + "shrdq $52,%%r9,%%r8\n" + "xorq %%r9,%%r9\n" + /* c += t3 */ + "addq %%r10,%%r8\n" + /* c += d * R */ + "movq %%rbx,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* r[3] = c & M */ + "movq %%r8,%%rax\n" + "andq %%r15,%%rax\n" + "movq %%rax,24(%%rdi)\n" + /* c >>= 52 (%%r8 only) */ + "shrdq $52,%%r9,%%r8\n" + /* c += t4 (%%r8 only) */ + "addq %%rsi,%%r8\n" + /* r[4] = c */ + "movq %%r8,32(%%rdi)\n" +: "+S"(a), "=m"(tmp1), "=m"(tmp2), "=m"(tmp3) +: "D"(r) +: "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "cc", "memory" +); +} + +#endif /* SECP256K1_FIELD_INNER5X52_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52_impl.h new file mode 100644 index 000000000..957c61b01 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52_impl.h @@ -0,0 +1,496 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_FIELD_REPR_IMPL_H +#define SECP256K1_FIELD_REPR_IMPL_H + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#include "util.h" +#include "num.h" +#include "field.h" + +#if defined(USE_ASM_X86_64) +#include "field_5x52_asm_impl.h" +#else +#include "field_5x52_int128_impl.h" +#endif + +/** Implements arithmetic modulo FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F, + * represented as 5 uint64_t's in base 2^52. The values are allowed to contain >52 each. In particular, + * each FieldElem has a 'magnitude' associated with it. Internally, a magnitude M means each element + * is at most M*(2^53-1), except the most significant one, which is limited to M*(2^49-1). All operations + * accept any input with magnitude at most M, and have different rules for propagating magnitude to their + * output. + */ + +#ifdef VERIFY +static void secp256k1_fe_verify(const secp256k1_fe *a) { + const uint64_t *d = a->n; + int m = a->normalized ? 1 : 2 * a->magnitude, r = 1; + /* secp256k1 'p' value defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1. */ + r &= (d[0] <= 0xFFFFFFFFFFFFFULL * m); + r &= (d[1] <= 0xFFFFFFFFFFFFFULL * m); + r &= (d[2] <= 0xFFFFFFFFFFFFFULL * m); + r &= (d[3] <= 0xFFFFFFFFFFFFFULL * m); + r &= (d[4] <= 0x0FFFFFFFFFFFFULL * m); + r &= (a->magnitude >= 0); + r &= (a->magnitude <= 2048); + if (a->normalized) { + r &= (a->magnitude <= 1); + if (r && (d[4] == 0x0FFFFFFFFFFFFULL) && ((d[3] & d[2] & d[1]) == 0xFFFFFFFFFFFFFULL)) { + r &= (d[0] < 0xFFFFEFFFFFC2FULL); + } + } + VERIFY_CHECK(r == 1); +} +#endif + +static void secp256k1_fe_normalize(secp256k1_fe *r) { + uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4]; + + /* Reduce t4 at the start so there will be at most a single carry from the first pass */ + uint64_t m; + uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x1000003D1ULL; + t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; m &= t3; + + /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t4 >> 49 == 0); + + /* At most a single final reduction is needed; check if the value is >= the field characteristic */ + x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL) + & (t0 >= 0xFFFFEFFFFFC2FULL)); + + /* Apply the final reduction (for constant-time behaviour, we do it always) */ + t0 += x * 0x1000003D1ULL; + t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; + + /* If t4 didn't carry to bit 48 already, then it should have after any final reduction */ + VERIFY_CHECK(t4 >> 48 == x); + + /* Mask off the possible multiple of 2^256 from the final reduction */ + t4 &= 0x0FFFFFFFFFFFFULL; + + r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; + +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_normalize_weak(secp256k1_fe *r) { + uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4]; + + /* Reduce t4 at the start so there will be at most a single carry from the first pass */ + uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x1000003D1ULL; + t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; + + /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t4 >> 49 == 0); + + r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; + +#ifdef VERIFY + r->magnitude = 1; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_normalize_var(secp256k1_fe *r) { + uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4]; + + /* Reduce t4 at the start so there will be at most a single carry from the first pass */ + uint64_t m; + uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x1000003D1ULL; + t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; m &= t3; + + /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t4 >> 49 == 0); + + /* At most a single final reduction is needed; check if the value is >= the field characteristic */ + x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL) + & (t0 >= 0xFFFFEFFFFFC2FULL)); + + if (x) { + t0 += 0x1000003D1ULL; + t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; + + /* If t4 didn't carry to bit 48 already, then it should have after any final reduction */ + VERIFY_CHECK(t4 >> 48 == x); + + /* Mask off the possible multiple of 2^256 from the final reduction */ + t4 &= 0x0FFFFFFFFFFFFULL; + } + + r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; + +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif +} + +static int secp256k1_fe_normalizes_to_zero(secp256k1_fe *r) { + uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4]; + + /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */ + uint64_t z0, z1; + + /* Reduce t4 at the start so there will be at most a single carry from the first pass */ + uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x1000003D1ULL; + t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; z0 = t0; z1 = t0 ^ 0x1000003D0ULL; + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3; + z0 |= t4; z1 &= t4 ^ 0xF000000000000ULL; + + /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t4 >> 49 == 0); + + return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL); +} + +static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r) { + uint64_t t0, t1, t2, t3, t4; + uint64_t z0, z1; + uint64_t x; + + t0 = r->n[0]; + t4 = r->n[4]; + + /* Reduce t4 at the start so there will be at most a single carry from the first pass */ + x = t4 >> 48; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x1000003D1ULL; + + /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */ + z0 = t0 & 0xFFFFFFFFFFFFFULL; + z1 = z0 ^ 0x1000003D0ULL; + + /* Fast return path should catch the majority of cases */ + if ((z0 != 0ULL) & (z1 != 0xFFFFFFFFFFFFFULL)) { + return 0; + } + + t1 = r->n[1]; + t2 = r->n[2]; + t3 = r->n[3]; + + t4 &= 0x0FFFFFFFFFFFFULL; + + t1 += (t0 >> 52); + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3; + z0 |= t4; z1 &= t4 ^ 0xF000000000000ULL; + + /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t4 >> 49 == 0); + + return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL); +} + +SECP256K1_INLINE static void secp256k1_fe_set_int(secp256k1_fe *r, int a) { + r->n[0] = a; + r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0; +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif +} + +SECP256K1_INLINE static int secp256k1_fe_is_zero(const secp256k1_fe *a) { + const uint64_t *t = a->n; +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + secp256k1_fe_verify(a); +#endif + return (t[0] | t[1] | t[2] | t[3] | t[4]) == 0; +} + +SECP256K1_INLINE static int secp256k1_fe_is_odd(const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + secp256k1_fe_verify(a); +#endif + return a->n[0] & 1; +} + +SECP256K1_INLINE static void secp256k1_fe_clear(secp256k1_fe *a) { + int i; +#ifdef VERIFY + a->magnitude = 0; + a->normalized = 1; +#endif + for (i=0; i<5; i++) { + a->n[i] = 0; + } +} + +static int secp256k1_fe_cmp_var(const secp256k1_fe *a, const secp256k1_fe *b) { + int i; +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + VERIFY_CHECK(b->normalized); + secp256k1_fe_verify(a); + secp256k1_fe_verify(b); +#endif + for (i = 4; i >= 0; i--) { + if (a->n[i] > b->n[i]) { + return 1; + } + if (a->n[i] < b->n[i]) { + return -1; + } + } + return 0; +} + +static int secp256k1_fe_set_b32(secp256k1_fe *r, const unsigned char *a) { + r->n[0] = (uint64_t)a[31] + | ((uint64_t)a[30] << 8) + | ((uint64_t)a[29] << 16) + | ((uint64_t)a[28] << 24) + | ((uint64_t)a[27] << 32) + | ((uint64_t)a[26] << 40) + | ((uint64_t)(a[25] & 0xF) << 48); + r->n[1] = (uint64_t)((a[25] >> 4) & 0xF) + | ((uint64_t)a[24] << 4) + | ((uint64_t)a[23] << 12) + | ((uint64_t)a[22] << 20) + | ((uint64_t)a[21] << 28) + | ((uint64_t)a[20] << 36) + | ((uint64_t)a[19] << 44); + r->n[2] = (uint64_t)a[18] + | ((uint64_t)a[17] << 8) + | ((uint64_t)a[16] << 16) + | ((uint64_t)a[15] << 24) + | ((uint64_t)a[14] << 32) + | ((uint64_t)a[13] << 40) + | ((uint64_t)(a[12] & 0xF) << 48); + r->n[3] = (uint64_t)((a[12] >> 4) & 0xF) + | ((uint64_t)a[11] << 4) + | ((uint64_t)a[10] << 12) + | ((uint64_t)a[9] << 20) + | ((uint64_t)a[8] << 28) + | ((uint64_t)a[7] << 36) + | ((uint64_t)a[6] << 44); + r->n[4] = (uint64_t)a[5] + | ((uint64_t)a[4] << 8) + | ((uint64_t)a[3] << 16) + | ((uint64_t)a[2] << 24) + | ((uint64_t)a[1] << 32) + | ((uint64_t)a[0] << 40); + if (r->n[4] == 0x0FFFFFFFFFFFFULL && (r->n[3] & r->n[2] & r->n[1]) == 0xFFFFFFFFFFFFFULL && r->n[0] >= 0xFFFFEFFFFFC2FULL) { + return 0; + } +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif + return 1; +} + +/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */ +static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + secp256k1_fe_verify(a); +#endif + r[0] = (a->n[4] >> 40) & 0xFF; + r[1] = (a->n[4] >> 32) & 0xFF; + r[2] = (a->n[4] >> 24) & 0xFF; + r[3] = (a->n[4] >> 16) & 0xFF; + r[4] = (a->n[4] >> 8) & 0xFF; + r[5] = a->n[4] & 0xFF; + r[6] = (a->n[3] >> 44) & 0xFF; + r[7] = (a->n[3] >> 36) & 0xFF; + r[8] = (a->n[3] >> 28) & 0xFF; + r[9] = (a->n[3] >> 20) & 0xFF; + r[10] = (a->n[3] >> 12) & 0xFF; + r[11] = (a->n[3] >> 4) & 0xFF; + r[12] = ((a->n[2] >> 48) & 0xF) | ((a->n[3] & 0xF) << 4); + r[13] = (a->n[2] >> 40) & 0xFF; + r[14] = (a->n[2] >> 32) & 0xFF; + r[15] = (a->n[2] >> 24) & 0xFF; + r[16] = (a->n[2] >> 16) & 0xFF; + r[17] = (a->n[2] >> 8) & 0xFF; + r[18] = a->n[2] & 0xFF; + r[19] = (a->n[1] >> 44) & 0xFF; + r[20] = (a->n[1] >> 36) & 0xFF; + r[21] = (a->n[1] >> 28) & 0xFF; + r[22] = (a->n[1] >> 20) & 0xFF; + r[23] = (a->n[1] >> 12) & 0xFF; + r[24] = (a->n[1] >> 4) & 0xFF; + r[25] = ((a->n[0] >> 48) & 0xF) | ((a->n[1] & 0xF) << 4); + r[26] = (a->n[0] >> 40) & 0xFF; + r[27] = (a->n[0] >> 32) & 0xFF; + r[28] = (a->n[0] >> 24) & 0xFF; + r[29] = (a->n[0] >> 16) & 0xFF; + r[30] = (a->n[0] >> 8) & 0xFF; + r[31] = a->n[0] & 0xFF; +} + +SECP256K1_INLINE static void secp256k1_fe_negate(secp256k1_fe *r, const secp256k1_fe *a, int m) { +#ifdef VERIFY + VERIFY_CHECK(a->magnitude <= m); + secp256k1_fe_verify(a); +#endif + r->n[0] = 0xFFFFEFFFFFC2FULL * 2 * (m + 1) - a->n[0]; + r->n[1] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[1]; + r->n[2] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[2]; + r->n[3] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[3]; + r->n[4] = 0x0FFFFFFFFFFFFULL * 2 * (m + 1) - a->n[4]; +#ifdef VERIFY + r->magnitude = m + 1; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +SECP256K1_INLINE static void secp256k1_fe_mul_int(secp256k1_fe *r, int a) { + r->n[0] *= a; + r->n[1] *= a; + r->n[2] *= a; + r->n[3] *= a; + r->n[4] *= a; +#ifdef VERIFY + r->magnitude *= a; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a) { +#ifdef VERIFY + secp256k1_fe_verify(a); +#endif + r->n[0] += a->n[0]; + r->n[1] += a->n[1]; + r->n[2] += a->n[2]; + r->n[3] += a->n[3]; + r->n[4] += a->n[4]; +#ifdef VERIFY + r->magnitude += a->magnitude; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b) { +#ifdef VERIFY + VERIFY_CHECK(a->magnitude <= 8); + VERIFY_CHECK(b->magnitude <= 8); + secp256k1_fe_verify(a); + secp256k1_fe_verify(b); + VERIFY_CHECK(r != b); +#endif + secp256k1_fe_mul_inner(r->n, a->n, b->n); +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_sqr(secp256k1_fe *r, const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->magnitude <= 8); + secp256k1_fe_verify(a); +#endif + secp256k1_fe_sqr_inner(r->n, a->n); +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +static SECP256K1_INLINE void secp256k1_fe_cmov(secp256k1_fe *r, const secp256k1_fe *a, int flag) { + uint64_t mask0, mask1; + mask0 = flag + ~((uint64_t)0); + mask1 = ~mask0; + r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1); + r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1); + r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1); + r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1); + r->n[4] = (r->n[4] & mask0) | (a->n[4] & mask1); +#ifdef VERIFY + if (a->magnitude > r->magnitude) { + r->magnitude = a->magnitude; + } + r->normalized &= a->normalized; +#endif +} + +static SECP256K1_INLINE void secp256k1_fe_storage_cmov(secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag) { + uint64_t mask0, mask1; + mask0 = flag + ~((uint64_t)0); + mask1 = ~mask0; + r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1); + r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1); + r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1); + r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1); +} + +static void secp256k1_fe_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->normalized); +#endif + r->n[0] = a->n[0] | a->n[1] << 52; + r->n[1] = a->n[1] >> 12 | a->n[2] << 40; + r->n[2] = a->n[2] >> 24 | a->n[3] << 28; + r->n[3] = a->n[3] >> 36 | a->n[4] << 16; +} + +static SECP256K1_INLINE void secp256k1_fe_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a) { + r->n[0] = a->n[0] & 0xFFFFFFFFFFFFFULL; + r->n[1] = a->n[0] >> 52 | ((a->n[1] << 12) & 0xFFFFFFFFFFFFFULL); + r->n[2] = a->n[1] >> 40 | ((a->n[2] << 24) & 0xFFFFFFFFFFFFFULL); + r->n[3] = a->n[2] >> 28 | ((a->n[3] << 36) & 0xFFFFFFFFFFFFFULL); + r->n[4] = a->n[3] >> 16; +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; +#endif +} + +#endif /* SECP256K1_FIELD_REPR_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52_int128_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52_int128_impl.h new file mode 100644 index 000000000..95a0d1791 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_5x52_int128_impl.h @@ -0,0 +1,277 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_FIELD_INNER5X52_IMPL_H +#define SECP256K1_FIELD_INNER5X52_IMPL_H + +#include + +#ifdef VERIFY +#define VERIFY_BITS(x, n) VERIFY_CHECK(((x) >> (n)) == 0) +#else +#define VERIFY_BITS(x, n) do { } while(0) +#endif + +SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t *a, const uint64_t * SECP256K1_RESTRICT b) { + uint128_t c, d; + uint64_t t3, t4, tx, u0; + uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4]; + const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL; + + VERIFY_BITS(a[0], 56); + VERIFY_BITS(a[1], 56); + VERIFY_BITS(a[2], 56); + VERIFY_BITS(a[3], 56); + VERIFY_BITS(a[4], 52); + VERIFY_BITS(b[0], 56); + VERIFY_BITS(b[1], 56); + VERIFY_BITS(b[2], 56); + VERIFY_BITS(b[3], 56); + VERIFY_BITS(b[4], 52); + VERIFY_CHECK(r != b); + + /* [... a b c] is a shorthand for ... + a<<104 + b<<52 + c<<0 mod n. + * px is a shorthand for sum(a[i]*b[x-i], i=0..x). + * Note that [x 0 0 0 0 0] = [x*R]. + */ + + d = (uint128_t)a0 * b[3] + + (uint128_t)a1 * b[2] + + (uint128_t)a2 * b[1] + + (uint128_t)a3 * b[0]; + VERIFY_BITS(d, 114); + /* [d 0 0 0] = [p3 0 0 0] */ + c = (uint128_t)a4 * b[4]; + VERIFY_BITS(c, 112); + /* [c 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ + d += (c & M) * R; c >>= 52; + VERIFY_BITS(d, 115); + VERIFY_BITS(c, 60); + /* [c 0 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ + t3 = d & M; d >>= 52; + VERIFY_BITS(t3, 52); + VERIFY_BITS(d, 63); + /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ + + d += (uint128_t)a0 * b[4] + + (uint128_t)a1 * b[3] + + (uint128_t)a2 * b[2] + + (uint128_t)a3 * b[1] + + (uint128_t)a4 * b[0]; + VERIFY_BITS(d, 115); + /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + d += c * R; + VERIFY_BITS(d, 116); + /* [d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + t4 = d & M; d >>= 52; + VERIFY_BITS(t4, 52); + VERIFY_BITS(d, 64); + /* [d t4 t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + tx = (t4 >> 48); t4 &= (M >> 4); + VERIFY_BITS(tx, 4); + VERIFY_BITS(t4, 48); + /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + + c = (uint128_t)a0 * b[0]; + VERIFY_BITS(c, 112); + /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */ + d += (uint128_t)a1 * b[4] + + (uint128_t)a2 * b[3] + + (uint128_t)a3 * b[2] + + (uint128_t)a4 * b[1]; + VERIFY_BITS(d, 115); + /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + u0 = d & M; d >>= 52; + VERIFY_BITS(u0, 52); + VERIFY_BITS(d, 63); + /* [d u0 t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + /* [d 0 t4+(tx<<48)+(u0<<52) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + u0 = (u0 << 4) | tx; + VERIFY_BITS(u0, 56); + /* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + c += (uint128_t)u0 * (R >> 4); + VERIFY_BITS(c, 115); + /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + r[0] = c & M; c >>= 52; + VERIFY_BITS(r[0], 52); + VERIFY_BITS(c, 61); + /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 0 p0] */ + + c += (uint128_t)a0 * b[1] + + (uint128_t)a1 * b[0]; + VERIFY_BITS(c, 114); + /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 p1 p0] */ + d += (uint128_t)a2 * b[4] + + (uint128_t)a3 * b[3] + + (uint128_t)a4 * b[2]; + VERIFY_BITS(d, 114); + /* [d 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ + c += (d & M) * R; d >>= 52; + VERIFY_BITS(c, 115); + VERIFY_BITS(d, 62); + /* [d 0 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ + r[1] = c & M; c >>= 52; + VERIFY_BITS(r[1], 52); + VERIFY_BITS(c, 63); + /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ + + c += (uint128_t)a0 * b[2] + + (uint128_t)a1 * b[1] + + (uint128_t)a2 * b[0]; + VERIFY_BITS(c, 114); + /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint128_t)a3 * b[4] + + (uint128_t)a4 * b[3]; + VERIFY_BITS(d, 114); + /* [d 0 0 t4 t3 c t1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += (d & M) * R; d >>= 52; + VERIFY_BITS(c, 115); + VERIFY_BITS(d, 62); + /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[2] = c & M; c >>= 52; + VERIFY_BITS(r[2], 52); + VERIFY_BITS(c, 63); + /* [d 0 0 0 t4 t3+c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += d * R + t3; + VERIFY_BITS(c, 100); + /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[3] = c & M; c >>= 52; + VERIFY_BITS(r[3], 52); + VERIFY_BITS(c, 48); + /* [t4+c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += t4; + VERIFY_BITS(c, 49); + /* [c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[4] = c; + VERIFY_BITS(r[4], 49); + /* [r4 r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ +} + +SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint64_t *r, const uint64_t *a) { + uint128_t c, d; + uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4]; + int64_t t3, t4, tx, u0; + const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL; + + VERIFY_BITS(a[0], 56); + VERIFY_BITS(a[1], 56); + VERIFY_BITS(a[2], 56); + VERIFY_BITS(a[3], 56); + VERIFY_BITS(a[4], 52); + + /** [... a b c] is a shorthand for ... + a<<104 + b<<52 + c<<0 mod n. + * px is a shorthand for sum(a[i]*a[x-i], i=0..x). + * Note that [x 0 0 0 0 0] = [x*R]. + */ + + d = (uint128_t)(a0*2) * a3 + + (uint128_t)(a1*2) * a2; + VERIFY_BITS(d, 114); + /* [d 0 0 0] = [p3 0 0 0] */ + c = (uint128_t)a4 * a4; + VERIFY_BITS(c, 112); + /* [c 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ + d += (c & M) * R; c >>= 52; + VERIFY_BITS(d, 115); + VERIFY_BITS(c, 60); + /* [c 0 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ + t3 = d & M; d >>= 52; + VERIFY_BITS(t3, 52); + VERIFY_BITS(d, 63); + /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ + + a4 *= 2; + d += (uint128_t)a0 * a4 + + (uint128_t)(a1*2) * a3 + + (uint128_t)a2 * a2; + VERIFY_BITS(d, 115); + /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + d += c * R; + VERIFY_BITS(d, 116); + /* [d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + t4 = d & M; d >>= 52; + VERIFY_BITS(t4, 52); + VERIFY_BITS(d, 64); + /* [d t4 t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + tx = (t4 >> 48); t4 &= (M >> 4); + VERIFY_BITS(tx, 4); + VERIFY_BITS(t4, 48); + /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + + c = (uint128_t)a0 * a0; + VERIFY_BITS(c, 112); + /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */ + d += (uint128_t)a1 * a4 + + (uint128_t)(a2*2) * a3; + VERIFY_BITS(d, 114); + /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + u0 = d & M; d >>= 52; + VERIFY_BITS(u0, 52); + VERIFY_BITS(d, 62); + /* [d u0 t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + /* [d 0 t4+(tx<<48)+(u0<<52) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + u0 = (u0 << 4) | tx; + VERIFY_BITS(u0, 56); + /* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + c += (uint128_t)u0 * (R >> 4); + VERIFY_BITS(c, 113); + /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + r[0] = c & M; c >>= 52; + VERIFY_BITS(r[0], 52); + VERIFY_BITS(c, 61); + /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 0 p0] */ + + a0 *= 2; + c += (uint128_t)a0 * a1; + VERIFY_BITS(c, 114); + /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 p1 p0] */ + d += (uint128_t)a2 * a4 + + (uint128_t)a3 * a3; + VERIFY_BITS(d, 114); + /* [d 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ + c += (d & M) * R; d >>= 52; + VERIFY_BITS(c, 115); + VERIFY_BITS(d, 62); + /* [d 0 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ + r[1] = c & M; c >>= 52; + VERIFY_BITS(r[1], 52); + VERIFY_BITS(c, 63); + /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ + + c += (uint128_t)a0 * a2 + + (uint128_t)a1 * a1; + VERIFY_BITS(c, 114); + /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint128_t)a3 * a4; + VERIFY_BITS(d, 114); + /* [d 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += (d & M) * R; d >>= 52; + VERIFY_BITS(c, 115); + VERIFY_BITS(d, 62); + /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[2] = c & M; c >>= 52; + VERIFY_BITS(r[2], 52); + VERIFY_BITS(c, 63); + /* [d 0 0 0 t4 t3+c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + c += d * R + t3; + VERIFY_BITS(c, 100); + /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[3] = c & M; c >>= 52; + VERIFY_BITS(r[3], 52); + VERIFY_BITS(c, 48); + /* [t4+c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += t4; + VERIFY_BITS(c, 49); + /* [c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[4] = c; + VERIFY_BITS(r[4], 49); + /* [r4 r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ +} + +#endif /* SECP256K1_FIELD_INNER5X52_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_impl.h new file mode 100644 index 000000000..20428648a --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/field_impl.h @@ -0,0 +1,315 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_FIELD_IMPL_H +#define SECP256K1_FIELD_IMPL_H + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#include "util.h" + +#if defined(USE_FIELD_10X26) +#include "field_10x26_impl.h" +#elif defined(USE_FIELD_5X52) +#include "field_5x52_impl.h" +#else +#error "Please select field implementation" +#endif + +SECP256K1_INLINE static int secp256k1_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b) { + secp256k1_fe na; + secp256k1_fe_negate(&na, a, 1); + secp256k1_fe_add(&na, b); + return secp256k1_fe_normalizes_to_zero(&na); +} + +SECP256K1_INLINE static int secp256k1_fe_equal_var(const secp256k1_fe *a, const secp256k1_fe *b) { + secp256k1_fe na; + secp256k1_fe_negate(&na, a, 1); + secp256k1_fe_add(&na, b); + return secp256k1_fe_normalizes_to_zero_var(&na); +} + +static int secp256k1_fe_sqrt(secp256k1_fe *r, const secp256k1_fe *a) { + /** Given that p is congruent to 3 mod 4, we can compute the square root of + * a mod p as the (p+1)/4'th power of a. + * + * As (p+1)/4 is an even number, it will have the same result for a and for + * (-a). Only one of these two numbers actually has a square root however, + * so we test at the end by squaring and comparing to the input. + * Also because (p+1)/4 is an even number, the computed square root is + * itself always a square (a ** ((p+1)/4) is the square of a ** ((p+1)/8)). + */ + secp256k1_fe x2, x3, x6, x9, x11, x22, x44, x88, x176, x220, x223, t1; + int j; + + /** The binary representation of (p + 1)/4 has 3 blocks of 1s, with lengths in + * { 2, 22, 223 }. Use an addition chain to calculate 2^n - 1 for each block: + * 1, [2], 3, 6, 9, 11, [22], 44, 88, 176, 220, [223] + */ + + secp256k1_fe_sqr(&x2, a); + secp256k1_fe_mul(&x2, &x2, a); + + secp256k1_fe_sqr(&x3, &x2); + secp256k1_fe_mul(&x3, &x3, a); + + x6 = x3; + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&x6, &x6); + } + secp256k1_fe_mul(&x6, &x6, &x3); + + x9 = x6; + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&x9, &x9); + } + secp256k1_fe_mul(&x9, &x9, &x3); + + x11 = x9; + for (j=0; j<2; j++) { + secp256k1_fe_sqr(&x11, &x11); + } + secp256k1_fe_mul(&x11, &x11, &x2); + + x22 = x11; + for (j=0; j<11; j++) { + secp256k1_fe_sqr(&x22, &x22); + } + secp256k1_fe_mul(&x22, &x22, &x11); + + x44 = x22; + for (j=0; j<22; j++) { + secp256k1_fe_sqr(&x44, &x44); + } + secp256k1_fe_mul(&x44, &x44, &x22); + + x88 = x44; + for (j=0; j<44; j++) { + secp256k1_fe_sqr(&x88, &x88); + } + secp256k1_fe_mul(&x88, &x88, &x44); + + x176 = x88; + for (j=0; j<88; j++) { + secp256k1_fe_sqr(&x176, &x176); + } + secp256k1_fe_mul(&x176, &x176, &x88); + + x220 = x176; + for (j=0; j<44; j++) { + secp256k1_fe_sqr(&x220, &x220); + } + secp256k1_fe_mul(&x220, &x220, &x44); + + x223 = x220; + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&x223, &x223); + } + secp256k1_fe_mul(&x223, &x223, &x3); + + /* The final result is then assembled using a sliding window over the blocks. */ + + t1 = x223; + for (j=0; j<23; j++) { + secp256k1_fe_sqr(&t1, &t1); + } + secp256k1_fe_mul(&t1, &t1, &x22); + for (j=0; j<6; j++) { + secp256k1_fe_sqr(&t1, &t1); + } + secp256k1_fe_mul(&t1, &t1, &x2); + secp256k1_fe_sqr(&t1, &t1); + secp256k1_fe_sqr(r, &t1); + + /* Check that a square root was actually calculated */ + + secp256k1_fe_sqr(&t1, r); + return secp256k1_fe_equal(&t1, a); +} + +static void secp256k1_fe_inv(secp256k1_fe *r, const secp256k1_fe *a) { + secp256k1_fe x2, x3, x6, x9, x11, x22, x44, x88, x176, x220, x223, t1; + int j; + + /** The binary representation of (p - 2) has 5 blocks of 1s, with lengths in + * { 1, 2, 22, 223 }. Use an addition chain to calculate 2^n - 1 for each block: + * [1], [2], 3, 6, 9, 11, [22], 44, 88, 176, 220, [223] + */ + + secp256k1_fe_sqr(&x2, a); + secp256k1_fe_mul(&x2, &x2, a); + + secp256k1_fe_sqr(&x3, &x2); + secp256k1_fe_mul(&x3, &x3, a); + + x6 = x3; + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&x6, &x6); + } + secp256k1_fe_mul(&x6, &x6, &x3); + + x9 = x6; + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&x9, &x9); + } + secp256k1_fe_mul(&x9, &x9, &x3); + + x11 = x9; + for (j=0; j<2; j++) { + secp256k1_fe_sqr(&x11, &x11); + } + secp256k1_fe_mul(&x11, &x11, &x2); + + x22 = x11; + for (j=0; j<11; j++) { + secp256k1_fe_sqr(&x22, &x22); + } + secp256k1_fe_mul(&x22, &x22, &x11); + + x44 = x22; + for (j=0; j<22; j++) { + secp256k1_fe_sqr(&x44, &x44); + } + secp256k1_fe_mul(&x44, &x44, &x22); + + x88 = x44; + for (j=0; j<44; j++) { + secp256k1_fe_sqr(&x88, &x88); + } + secp256k1_fe_mul(&x88, &x88, &x44); + + x176 = x88; + for (j=0; j<88; j++) { + secp256k1_fe_sqr(&x176, &x176); + } + secp256k1_fe_mul(&x176, &x176, &x88); + + x220 = x176; + for (j=0; j<44; j++) { + secp256k1_fe_sqr(&x220, &x220); + } + secp256k1_fe_mul(&x220, &x220, &x44); + + x223 = x220; + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&x223, &x223); + } + secp256k1_fe_mul(&x223, &x223, &x3); + + /* The final result is then assembled using a sliding window over the blocks. */ + + t1 = x223; + for (j=0; j<23; j++) { + secp256k1_fe_sqr(&t1, &t1); + } + secp256k1_fe_mul(&t1, &t1, &x22); + for (j=0; j<5; j++) { + secp256k1_fe_sqr(&t1, &t1); + } + secp256k1_fe_mul(&t1, &t1, a); + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&t1, &t1); + } + secp256k1_fe_mul(&t1, &t1, &x2); + for (j=0; j<2; j++) { + secp256k1_fe_sqr(&t1, &t1); + } + secp256k1_fe_mul(r, a, &t1); +} + +static void secp256k1_fe_inv_var(secp256k1_fe *r, const secp256k1_fe *a) { +#if defined(USE_FIELD_INV_BUILTIN) + secp256k1_fe_inv(r, a); +#elif defined(USE_FIELD_INV_NUM) + secp256k1_num n, m; + static const secp256k1_fe negone = SECP256K1_FE_CONST( + 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, + 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFEUL, 0xFFFFFC2EUL + ); + /* secp256k1 field prime, value p defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1. */ + static const unsigned char prime[32] = { + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F + }; + unsigned char b[32]; + int res; + secp256k1_fe c = *a; + secp256k1_fe_normalize_var(&c); + secp256k1_fe_get_b32(b, &c); + secp256k1_num_set_bin(&n, b, 32); + secp256k1_num_set_bin(&m, prime, 32); + secp256k1_num_mod_inverse(&n, &n, &m); + secp256k1_num_get_bin(b, 32, &n); + res = secp256k1_fe_set_b32(r, b); + (void)res; + VERIFY_CHECK(res); + /* Verify the result is the (unique) valid inverse using non-GMP code. */ + secp256k1_fe_mul(&c, &c, r); + secp256k1_fe_add(&c, &negone); + CHECK(secp256k1_fe_normalizes_to_zero_var(&c)); +#else +#error "Please select field inverse implementation" +#endif +} + +static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len) { + secp256k1_fe u; + size_t i; + if (len < 1) { + return; + } + + VERIFY_CHECK((r + len <= a) || (a + len <= r)); + + r[0] = a[0]; + + i = 0; + while (++i < len) { + secp256k1_fe_mul(&r[i], &r[i - 1], &a[i]); + } + + secp256k1_fe_inv_var(&u, &r[--i]); + + while (i > 0) { + size_t j = i--; + secp256k1_fe_mul(&r[j], &r[i], &u); + secp256k1_fe_mul(&u, &u, &a[j]); + } + + r[0] = u; +} + +static int secp256k1_fe_is_quad_var(const secp256k1_fe *a) { +#ifndef USE_NUM_NONE + unsigned char b[32]; + secp256k1_num n; + secp256k1_num m; + /* secp256k1 field prime, value p defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1. */ + static const unsigned char prime[32] = { + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F + }; + + secp256k1_fe c = *a; + secp256k1_fe_normalize_var(&c); + secp256k1_fe_get_b32(b, &c); + secp256k1_num_set_bin(&n, b, 32); + secp256k1_num_set_bin(&m, prime, 32); + return secp256k1_num_jacobi(&n, &m) >= 0; +#else + secp256k1_fe r; + return secp256k1_fe_sqrt(&r, a); +#endif +} + +#endif /* SECP256K1_FIELD_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/group.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/group.h new file mode 100644 index 000000000..3947ea2dd --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/group.h @@ -0,0 +1,147 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_GROUP_H +#define SECP256K1_GROUP_H + +#include "num.h" +#include "field.h" + +/** A group element of the secp256k1 curve, in affine coordinates. */ +typedef struct { + secp256k1_fe x; + secp256k1_fe y; + int infinity; /* whether this represents the point at infinity */ +} secp256k1_ge; + +#define SECP256K1_GE_CONST(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {SECP256K1_FE_CONST((a),(b),(c),(d),(e),(f),(g),(h)), SECP256K1_FE_CONST((i),(j),(k),(l),(m),(n),(o),(p)), 0} +#define SECP256K1_GE_CONST_INFINITY {SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), 1} + +/** A group element of the secp256k1 curve, in jacobian coordinates. */ +typedef struct { + secp256k1_fe x; /* actual X: x/z^2 */ + secp256k1_fe y; /* actual Y: y/z^3 */ + secp256k1_fe z; + int infinity; /* whether this represents the point at infinity */ +} secp256k1_gej; + +#define SECP256K1_GEJ_CONST(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {SECP256K1_FE_CONST((a),(b),(c),(d),(e),(f),(g),(h)), SECP256K1_FE_CONST((i),(j),(k),(l),(m),(n),(o),(p)), SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 1), 0} +#define SECP256K1_GEJ_CONST_INFINITY {SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), 1} + +typedef struct { + secp256k1_fe_storage x; + secp256k1_fe_storage y; +} secp256k1_ge_storage; + +#define SECP256K1_GE_STORAGE_CONST(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {SECP256K1_FE_STORAGE_CONST((a),(b),(c),(d),(e),(f),(g),(h)), SECP256K1_FE_STORAGE_CONST((i),(j),(k),(l),(m),(n),(o),(p))} + +#define SECP256K1_GE_STORAGE_CONST_GET(t) SECP256K1_FE_STORAGE_CONST_GET(t.x), SECP256K1_FE_STORAGE_CONST_GET(t.y) + +/** Set a group element equal to the point with given X and Y coordinates */ +static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const secp256k1_fe *y); + +/** Set a group element (affine) equal to the point with the given X coordinate + * and a Y coordinate that is a quadratic residue modulo p. The return value + * is true iff a coordinate with the given X coordinate exists. + */ +static int secp256k1_ge_set_xquad(secp256k1_ge *r, const secp256k1_fe *x); + +/** Set a group element (affine) equal to the point with the given X coordinate, and given oddness + * for Y. Return value indicates whether the result is valid. */ +static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int odd); + +/** Check whether a group element is the point at infinity. */ +static int secp256k1_ge_is_infinity(const secp256k1_ge *a); + +/** Check whether a group element is valid (i.e., on the curve). */ +static int secp256k1_ge_is_valid_var(const secp256k1_ge *a); + +static void secp256k1_ge_neg(secp256k1_ge *r, const secp256k1_ge *a); + +/** Set a group element equal to another which is given in jacobian coordinates */ +static void secp256k1_ge_set_gej(secp256k1_ge *r, secp256k1_gej *a); + +/** Set a batch of group elements equal to the inputs given in jacobian coordinates */ +static void secp256k1_ge_set_all_gej_var(secp256k1_ge *r, const secp256k1_gej *a, size_t len, const secp256k1_callback *cb); + +/** Set a batch of group elements equal to the inputs given in jacobian + * coordinates (with known z-ratios). zr must contain the known z-ratios such + * that mul(a[i].z, zr[i+1]) == a[i+1].z. zr[0] is ignored. */ +static void secp256k1_ge_set_table_gej_var(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zr, size_t len); + +/** Bring a batch inputs given in jacobian coordinates (with known z-ratios) to + * the same global z "denominator". zr must contain the known z-ratios such + * that mul(a[i].z, zr[i+1]) == a[i+1].z. zr[0] is ignored. The x and y + * coordinates of the result are stored in r, the common z coordinate is + * stored in globalz. */ +static void secp256k1_ge_globalz_set_table_gej(size_t len, secp256k1_ge *r, secp256k1_fe *globalz, const secp256k1_gej *a, const secp256k1_fe *zr); + +/** Set a group element (affine) equal to the point at infinity. */ +static void secp256k1_ge_set_infinity(secp256k1_ge *r); + +/** Set a group element (jacobian) equal to the point at infinity. */ +static void secp256k1_gej_set_infinity(secp256k1_gej *r); + +/** Set a group element (jacobian) equal to another which is given in affine coordinates. */ +static void secp256k1_gej_set_ge(secp256k1_gej *r, const secp256k1_ge *a); + +/** Compare the X coordinate of a group element (jacobian). */ +static int secp256k1_gej_eq_x_var(const secp256k1_fe *x, const secp256k1_gej *a); + +/** Set r equal to the inverse of a (i.e., mirrored around the X axis) */ +static void secp256k1_gej_neg(secp256k1_gej *r, const secp256k1_gej *a); + +/** Check whether a group element is the point at infinity. */ +static int secp256k1_gej_is_infinity(const secp256k1_gej *a); + +/** Check whether a group element's y coordinate is a quadratic residue. */ +static int secp256k1_gej_has_quad_y_var(const secp256k1_gej *a); + +/** Set r equal to the double of a. If rzr is not-NULL, r->z = a->z * *rzr (where infinity means an implicit z = 0). + * a may not be zero. Constant time. */ +static void secp256k1_gej_double_nonzero(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr); + +/** Set r equal to the double of a. If rzr is not-NULL, r->z = a->z * *rzr (where infinity means an implicit z = 0). */ +static void secp256k1_gej_double_var(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr); + +/** Set r equal to the sum of a and b. If rzr is non-NULL, r->z = a->z * *rzr (a cannot be infinity in that case). */ +static void secp256k1_gej_add_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_gej *b, secp256k1_fe *rzr); + +/** Set r equal to the sum of a and b (with b given in affine coordinates, and not infinity). */ +static void secp256k1_gej_add_ge(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b); + +/** Set r equal to the sum of a and b (with b given in affine coordinates). This is more efficient + than secp256k1_gej_add_var. It is identical to secp256k1_gej_add_ge but without constant-time + guarantee, and b is allowed to be infinity. If rzr is non-NULL, r->z = a->z * *rzr (a cannot be infinity in that case). */ +static void secp256k1_gej_add_ge_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, secp256k1_fe *rzr); + +/** Set r equal to the sum of a and b (with the inverse of b's Z coordinate passed as bzinv). */ +static void secp256k1_gej_add_zinv_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, const secp256k1_fe *bzinv); + +#ifdef USE_ENDOMORPHISM +/** Set r to be equal to lambda times a, where lambda is chosen in a way such that this is very fast. */ +static void secp256k1_ge_mul_lambda(secp256k1_ge *r, const secp256k1_ge *a); +#endif + +/** Clear a secp256k1_gej to prevent leaking sensitive information. */ +static void secp256k1_gej_clear(secp256k1_gej *r); + +/** Clear a secp256k1_ge to prevent leaking sensitive information. */ +static void secp256k1_ge_clear(secp256k1_ge *r); + +/** Convert a group element to the storage type. */ +static void secp256k1_ge_to_storage(secp256k1_ge_storage *r, const secp256k1_ge *a); + +/** Convert a group element back from the storage type. */ +static void secp256k1_ge_from_storage(secp256k1_ge *r, const secp256k1_ge_storage *a); + +/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */ +static void secp256k1_ge_storage_cmov(secp256k1_ge_storage *r, const secp256k1_ge_storage *a, int flag); + +/** Rescale a jacobian point by b which must be non-zero. Constant-time. */ +static void secp256k1_gej_rescale(secp256k1_gej *r, const secp256k1_fe *b); + +#endif /* SECP256K1_GROUP_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/group_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/group_impl.h new file mode 100644 index 000000000..b1ace87b6 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/group_impl.h @@ -0,0 +1,706 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_GROUP_IMPL_H +#define SECP256K1_GROUP_IMPL_H + +#include "num.h" +#include "field.h" +#include "group.h" + +/* These points can be generated in sage as follows: + * + * 0. Setup a worksheet with the following parameters. + * b = 4 # whatever CURVE_B will be set to + * F = FiniteField (0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F) + * C = EllipticCurve ([F (0), F (b)]) + * + * 1. Determine all the small orders available to you. (If there are + * no satisfactory ones, go back and change b.) + * print C.order().factor(limit=1000) + * + * 2. Choose an order as one of the prime factors listed in the above step. + * (You can also multiply some to get a composite order, though the + * tests will crash trying to invert scalars during signing.) We take a + * random point and scale it to drop its order to the desired value. + * There is some probability this won't work; just try again. + * order = 199 + * P = C.random_point() + * P = (int(P.order()) / int(order)) * P + * assert(P.order() == order) + * + * 3. Print the values. You'll need to use a vim macro or something to + * split the hex output into 4-byte chunks. + * print "%x %x" % P.xy() + */ +#if defined(EXHAUSTIVE_TEST_ORDER) +# if EXHAUSTIVE_TEST_ORDER == 199 +const secp256k1_ge secp256k1_ge_const_g = SECP256K1_GE_CONST( + 0xFA7CC9A7, 0x0737F2DB, 0xA749DD39, 0x2B4FB069, + 0x3B017A7D, 0xA808C2F1, 0xFB12940C, 0x9EA66C18, + 0x78AC123A, 0x5ED8AEF3, 0x8732BC91, 0x1F3A2868, + 0x48DF246C, 0x808DAE72, 0xCFE52572, 0x7F0501ED +); + +const int CURVE_B = 4; +# elif EXHAUSTIVE_TEST_ORDER == 13 +const secp256k1_ge secp256k1_ge_const_g = SECP256K1_GE_CONST( + 0xedc60018, 0xa51a786b, 0x2ea91f4d, 0x4c9416c0, + 0x9de54c3b, 0xa1316554, 0x6cf4345c, 0x7277ef15, + 0x54cb1b6b, 0xdc8c1273, 0x087844ea, 0x43f4603e, + 0x0eaf9a43, 0xf6effe55, 0x939f806d, 0x37adf8ac +); +const int CURVE_B = 2; +# else +# error No known generator for the specified exhaustive test group order. +# endif +#else +/** Generator for secp256k1, value 'g' defined in + * "Standards for Efficient Cryptography" (SEC2) 2.7.1. + */ +static const secp256k1_ge secp256k1_ge_const_g = SECP256K1_GE_CONST( + 0x79BE667EUL, 0xF9DCBBACUL, 0x55A06295UL, 0xCE870B07UL, + 0x029BFCDBUL, 0x2DCE28D9UL, 0x59F2815BUL, 0x16F81798UL, + 0x483ADA77UL, 0x26A3C465UL, 0x5DA4FBFCUL, 0x0E1108A8UL, + 0xFD17B448UL, 0xA6855419UL, 0x9C47D08FUL, 0xFB10D4B8UL +); + +const int CURVE_B = 7; +#endif + +static void secp256k1_ge_set_gej_zinv(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zi) { + secp256k1_fe zi2; + secp256k1_fe zi3; + secp256k1_fe_sqr(&zi2, zi); + secp256k1_fe_mul(&zi3, &zi2, zi); + secp256k1_fe_mul(&r->x, &a->x, &zi2); + secp256k1_fe_mul(&r->y, &a->y, &zi3); + r->infinity = a->infinity; +} + +static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const secp256k1_fe *y) { + r->infinity = 0; + r->x = *x; + r->y = *y; +} + +static int secp256k1_ge_is_infinity(const secp256k1_ge *a) { + return a->infinity; +} + +static void secp256k1_ge_neg(secp256k1_ge *r, const secp256k1_ge *a) { + *r = *a; + secp256k1_fe_normalize_weak(&r->y); + secp256k1_fe_negate(&r->y, &r->y, 1); +} + +static void secp256k1_ge_set_gej(secp256k1_ge *r, secp256k1_gej *a) { + secp256k1_fe z2, z3; + r->infinity = a->infinity; + secp256k1_fe_inv(&a->z, &a->z); + secp256k1_fe_sqr(&z2, &a->z); + secp256k1_fe_mul(&z3, &a->z, &z2); + secp256k1_fe_mul(&a->x, &a->x, &z2); + secp256k1_fe_mul(&a->y, &a->y, &z3); + secp256k1_fe_set_int(&a->z, 1); + r->x = a->x; + r->y = a->y; +} + +static void secp256k1_ge_set_gej_var(secp256k1_ge *r, secp256k1_gej *a) { + secp256k1_fe z2, z3; + r->infinity = a->infinity; + if (a->infinity) { + return; + } + secp256k1_fe_inv_var(&a->z, &a->z); + secp256k1_fe_sqr(&z2, &a->z); + secp256k1_fe_mul(&z3, &a->z, &z2); + secp256k1_fe_mul(&a->x, &a->x, &z2); + secp256k1_fe_mul(&a->y, &a->y, &z3); + secp256k1_fe_set_int(&a->z, 1); + r->x = a->x; + r->y = a->y; +} + +static void secp256k1_ge_set_all_gej_var(secp256k1_ge *r, const secp256k1_gej *a, size_t len, const secp256k1_callback *cb) { + secp256k1_fe *az; + secp256k1_fe *azi; + size_t i; + size_t count = 0; + az = (secp256k1_fe *)checked_malloc(cb, sizeof(secp256k1_fe) * len); + for (i = 0; i < len; i++) { + if (!a[i].infinity) { + az[count++] = a[i].z; + } + } + + azi = (secp256k1_fe *)checked_malloc(cb, sizeof(secp256k1_fe) * count); + secp256k1_fe_inv_all_var(azi, az, count); + free(az); + + count = 0; + for (i = 0; i < len; i++) { + r[i].infinity = a[i].infinity; + if (!a[i].infinity) { + secp256k1_ge_set_gej_zinv(&r[i], &a[i], &azi[count++]); + } + } + free(azi); +} + +static void secp256k1_ge_set_table_gej_var(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zr, size_t len) { + size_t i = len - 1; + secp256k1_fe zi; + + if (len > 0) { + /* Compute the inverse of the last z coordinate, and use it to compute the last affine output. */ + secp256k1_fe_inv(&zi, &a[i].z); + secp256k1_ge_set_gej_zinv(&r[i], &a[i], &zi); + + /* Work out way backwards, using the z-ratios to scale the x/y values. */ + while (i > 0) { + secp256k1_fe_mul(&zi, &zi, &zr[i]); + i--; + secp256k1_ge_set_gej_zinv(&r[i], &a[i], &zi); + } + } +} + +static void secp256k1_ge_globalz_set_table_gej(size_t len, secp256k1_ge *r, secp256k1_fe *globalz, const secp256k1_gej *a, const secp256k1_fe *zr) { + size_t i = len - 1; + secp256k1_fe zs; + + if (len > 0) { + /* The z of the final point gives us the "global Z" for the table. */ + r[i].x = a[i].x; + r[i].y = a[i].y; + *globalz = a[i].z; + r[i].infinity = 0; + zs = zr[i]; + + /* Work our way backwards, using the z-ratios to scale the x/y values. */ + while (i > 0) { + if (i != len - 1) { + secp256k1_fe_mul(&zs, &zs, &zr[i]); + } + i--; + secp256k1_ge_set_gej_zinv(&r[i], &a[i], &zs); + } + } +} + +static void secp256k1_gej_set_infinity(secp256k1_gej *r) { + r->infinity = 1; + secp256k1_fe_clear(&r->x); + secp256k1_fe_clear(&r->y); + secp256k1_fe_clear(&r->z); +} + +static void secp256k1_ge_set_infinity(secp256k1_ge *r) { + r->infinity = 1; + secp256k1_fe_clear(&r->x); + secp256k1_fe_clear(&r->y); +} + +static void secp256k1_gej_clear(secp256k1_gej *r) { + r->infinity = 0; + secp256k1_fe_clear(&r->x); + secp256k1_fe_clear(&r->y); + secp256k1_fe_clear(&r->z); +} + +static void secp256k1_ge_clear(secp256k1_ge *r) { + r->infinity = 0; + secp256k1_fe_clear(&r->x); + secp256k1_fe_clear(&r->y); +} + +static int secp256k1_ge_set_xquad(secp256k1_ge *r, const secp256k1_fe *x) { + secp256k1_fe x2, x3, c; + r->x = *x; + secp256k1_fe_sqr(&x2, x); + secp256k1_fe_mul(&x3, x, &x2); + r->infinity = 0; + secp256k1_fe_set_int(&c, CURVE_B); + secp256k1_fe_add(&c, &x3); + return secp256k1_fe_sqrt(&r->y, &c); +} + +static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int odd) { + if (!secp256k1_ge_set_xquad(r, x)) { + return 0; + } + secp256k1_fe_normalize_var(&r->y); + if (secp256k1_fe_is_odd(&r->y) != odd) { + secp256k1_fe_negate(&r->y, &r->y, 1); + } + return 1; + +} + +static void secp256k1_gej_set_ge(secp256k1_gej *r, const secp256k1_ge *a) { + r->infinity = a->infinity; + r->x = a->x; + r->y = a->y; + secp256k1_fe_set_int(&r->z, 1); +} + +static int secp256k1_gej_eq_x_var(const secp256k1_fe *x, const secp256k1_gej *a) { + secp256k1_fe r, r2; + VERIFY_CHECK(!a->infinity); + secp256k1_fe_sqr(&r, &a->z); secp256k1_fe_mul(&r, &r, x); + r2 = a->x; secp256k1_fe_normalize_weak(&r2); + return secp256k1_fe_equal_var(&r, &r2); +} + +static void secp256k1_gej_neg(secp256k1_gej *r, const secp256k1_gej *a) { + r->infinity = a->infinity; + r->x = a->x; + r->y = a->y; + r->z = a->z; + secp256k1_fe_normalize_weak(&r->y); + secp256k1_fe_negate(&r->y, &r->y, 1); +} + +static int secp256k1_gej_is_infinity(const secp256k1_gej *a) { + return a->infinity; +} + +static int secp256k1_gej_is_valid_var(const secp256k1_gej *a) { + secp256k1_fe y2, x3, z2, z6; + if (a->infinity) { + return 0; + } + /** y^2 = x^3 + 7 + * (Y/Z^3)^2 = (X/Z^2)^3 + 7 + * Y^2 / Z^6 = X^3 / Z^6 + 7 + * Y^2 = X^3 + 7*Z^6 + */ + secp256k1_fe_sqr(&y2, &a->y); + secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x); + secp256k1_fe_sqr(&z2, &a->z); + secp256k1_fe_sqr(&z6, &z2); secp256k1_fe_mul(&z6, &z6, &z2); + secp256k1_fe_mul_int(&z6, CURVE_B); + secp256k1_fe_add(&x3, &z6); + secp256k1_fe_normalize_weak(&x3); + return secp256k1_fe_equal_var(&y2, &x3); +} + +static int secp256k1_ge_is_valid_var(const secp256k1_ge *a) { + secp256k1_fe y2, x3, c; + if (a->infinity) { + return 0; + } + /* y^2 = x^3 + 7 */ + secp256k1_fe_sqr(&y2, &a->y); + secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x); + secp256k1_fe_set_int(&c, CURVE_B); + secp256k1_fe_add(&x3, &c); + secp256k1_fe_normalize_weak(&x3); + return secp256k1_fe_equal_var(&y2, &x3); +} + +static void secp256k1_gej_double_var(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr) { + /* Operations: 3 mul, 4 sqr, 0 normalize, 12 mul_int/add/negate. + * + * Note that there is an implementation described at + * https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#doubling-dbl-2009-l + * which trades a multiply for a square, but in practice this is actually slower, + * mainly because it requires more normalizations. + */ + secp256k1_fe t1,t2,t3,t4; + /** For secp256k1, 2Q is infinity if and only if Q is infinity. This is because if 2Q = infinity, + * Q must equal -Q, or that Q.y == -(Q.y), or Q.y is 0. For a point on y^2 = x^3 + 7 to have + * y=0, x^3 must be -7 mod p. However, -7 has no cube root mod p. + * + * Having said this, if this function receives a point on a sextic twist, e.g. by + * a fault attack, it is possible for y to be 0. This happens for y^2 = x^3 + 6, + * since -6 does have a cube root mod p. For this point, this function will not set + * the infinity flag even though the point doubles to infinity, and the result + * point will be gibberish (z = 0 but infinity = 0). + */ + r->infinity = a->infinity; + if (r->infinity) { + if (rzr != NULL) { + secp256k1_fe_set_int(rzr, 1); + } + return; + } + + if (rzr != NULL) { + *rzr = a->y; + secp256k1_fe_normalize_weak(rzr); + secp256k1_fe_mul_int(rzr, 2); + } + + secp256k1_fe_mul(&r->z, &a->z, &a->y); + secp256k1_fe_mul_int(&r->z, 2); /* Z' = 2*Y*Z (2) */ + secp256k1_fe_sqr(&t1, &a->x); + secp256k1_fe_mul_int(&t1, 3); /* T1 = 3*X^2 (3) */ + secp256k1_fe_sqr(&t2, &t1); /* T2 = 9*X^4 (1) */ + secp256k1_fe_sqr(&t3, &a->y); + secp256k1_fe_mul_int(&t3, 2); /* T3 = 2*Y^2 (2) */ + secp256k1_fe_sqr(&t4, &t3); + secp256k1_fe_mul_int(&t4, 2); /* T4 = 8*Y^4 (2) */ + secp256k1_fe_mul(&t3, &t3, &a->x); /* T3 = 2*X*Y^2 (1) */ + r->x = t3; + secp256k1_fe_mul_int(&r->x, 4); /* X' = 8*X*Y^2 (4) */ + secp256k1_fe_negate(&r->x, &r->x, 4); /* X' = -8*X*Y^2 (5) */ + secp256k1_fe_add(&r->x, &t2); /* X' = 9*X^4 - 8*X*Y^2 (6) */ + secp256k1_fe_negate(&t2, &t2, 1); /* T2 = -9*X^4 (2) */ + secp256k1_fe_mul_int(&t3, 6); /* T3 = 12*X*Y^2 (6) */ + secp256k1_fe_add(&t3, &t2); /* T3 = 12*X*Y^2 - 9*X^4 (8) */ + secp256k1_fe_mul(&r->y, &t1, &t3); /* Y' = 36*X^3*Y^2 - 27*X^6 (1) */ + secp256k1_fe_negate(&t2, &t4, 2); /* T2 = -8*Y^4 (3) */ + secp256k1_fe_add(&r->y, &t2); /* Y' = 36*X^3*Y^2 - 27*X^6 - 8*Y^4 (4) */ +} + +static SECP256K1_INLINE void secp256k1_gej_double_nonzero(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr) { + VERIFY_CHECK(!secp256k1_gej_is_infinity(a)); + secp256k1_gej_double_var(r, a, rzr); +} + +static void secp256k1_gej_add_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_gej *b, secp256k1_fe *rzr) { + /* Operations: 12 mul, 4 sqr, 2 normalize, 12 mul_int/add/negate */ + secp256k1_fe z22, z12, u1, u2, s1, s2, h, i, i2, h2, h3, t; + + if (a->infinity) { + VERIFY_CHECK(rzr == NULL); + *r = *b; + return; + } + + if (b->infinity) { + if (rzr != NULL) { + secp256k1_fe_set_int(rzr, 1); + } + *r = *a; + return; + } + + r->infinity = 0; + secp256k1_fe_sqr(&z22, &b->z); + secp256k1_fe_sqr(&z12, &a->z); + secp256k1_fe_mul(&u1, &a->x, &z22); + secp256k1_fe_mul(&u2, &b->x, &z12); + secp256k1_fe_mul(&s1, &a->y, &z22); secp256k1_fe_mul(&s1, &s1, &b->z); + secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z); + secp256k1_fe_negate(&h, &u1, 1); secp256k1_fe_add(&h, &u2); + secp256k1_fe_negate(&i, &s1, 1); secp256k1_fe_add(&i, &s2); + if (secp256k1_fe_normalizes_to_zero_var(&h)) { + if (secp256k1_fe_normalizes_to_zero_var(&i)) { + secp256k1_gej_double_var(r, a, rzr); + } else { + if (rzr != NULL) { + secp256k1_fe_set_int(rzr, 0); + } + r->infinity = 1; + } + return; + } + secp256k1_fe_sqr(&i2, &i); + secp256k1_fe_sqr(&h2, &h); + secp256k1_fe_mul(&h3, &h, &h2); + secp256k1_fe_mul(&h, &h, &b->z); + if (rzr != NULL) { + *rzr = h; + } + secp256k1_fe_mul(&r->z, &a->z, &h); + secp256k1_fe_mul(&t, &u1, &h2); + r->x = t; secp256k1_fe_mul_int(&r->x, 2); secp256k1_fe_add(&r->x, &h3); secp256k1_fe_negate(&r->x, &r->x, 3); secp256k1_fe_add(&r->x, &i2); + secp256k1_fe_negate(&r->y, &r->x, 5); secp256k1_fe_add(&r->y, &t); secp256k1_fe_mul(&r->y, &r->y, &i); + secp256k1_fe_mul(&h3, &h3, &s1); secp256k1_fe_negate(&h3, &h3, 1); + secp256k1_fe_add(&r->y, &h3); +} + +static void secp256k1_gej_add_ge_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, secp256k1_fe *rzr) { + /* 8 mul, 3 sqr, 4 normalize, 12 mul_int/add/negate */ + secp256k1_fe z12, u1, u2, s1, s2, h, i, i2, h2, h3, t; + if (a->infinity) { + VERIFY_CHECK(rzr == NULL); + secp256k1_gej_set_ge(r, b); + return; + } + if (b->infinity) { + if (rzr != NULL) { + secp256k1_fe_set_int(rzr, 1); + } + *r = *a; + return; + } + r->infinity = 0; + + secp256k1_fe_sqr(&z12, &a->z); + u1 = a->x; secp256k1_fe_normalize_weak(&u1); + secp256k1_fe_mul(&u2, &b->x, &z12); + s1 = a->y; secp256k1_fe_normalize_weak(&s1); + secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z); + secp256k1_fe_negate(&h, &u1, 1); secp256k1_fe_add(&h, &u2); + secp256k1_fe_negate(&i, &s1, 1); secp256k1_fe_add(&i, &s2); + if (secp256k1_fe_normalizes_to_zero_var(&h)) { + if (secp256k1_fe_normalizes_to_zero_var(&i)) { + secp256k1_gej_double_var(r, a, rzr); + } else { + if (rzr != NULL) { + secp256k1_fe_set_int(rzr, 0); + } + r->infinity = 1; + } + return; + } + secp256k1_fe_sqr(&i2, &i); + secp256k1_fe_sqr(&h2, &h); + secp256k1_fe_mul(&h3, &h, &h2); + if (rzr != NULL) { + *rzr = h; + } + secp256k1_fe_mul(&r->z, &a->z, &h); + secp256k1_fe_mul(&t, &u1, &h2); + r->x = t; secp256k1_fe_mul_int(&r->x, 2); secp256k1_fe_add(&r->x, &h3); secp256k1_fe_negate(&r->x, &r->x, 3); secp256k1_fe_add(&r->x, &i2); + secp256k1_fe_negate(&r->y, &r->x, 5); secp256k1_fe_add(&r->y, &t); secp256k1_fe_mul(&r->y, &r->y, &i); + secp256k1_fe_mul(&h3, &h3, &s1); secp256k1_fe_negate(&h3, &h3, 1); + secp256k1_fe_add(&r->y, &h3); +} + +static void secp256k1_gej_add_zinv_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, const secp256k1_fe *bzinv) { + /* 9 mul, 3 sqr, 4 normalize, 12 mul_int/add/negate */ + secp256k1_fe az, z12, u1, u2, s1, s2, h, i, i2, h2, h3, t; + + if (b->infinity) { + *r = *a; + return; + } + if (a->infinity) { + secp256k1_fe bzinv2, bzinv3; + r->infinity = b->infinity; + secp256k1_fe_sqr(&bzinv2, bzinv); + secp256k1_fe_mul(&bzinv3, &bzinv2, bzinv); + secp256k1_fe_mul(&r->x, &b->x, &bzinv2); + secp256k1_fe_mul(&r->y, &b->y, &bzinv3); + secp256k1_fe_set_int(&r->z, 1); + return; + } + r->infinity = 0; + + /** We need to calculate (rx,ry,rz) = (ax,ay,az) + (bx,by,1/bzinv). Due to + * secp256k1's isomorphism we can multiply the Z coordinates on both sides + * by bzinv, and get: (rx,ry,rz*bzinv) = (ax,ay,az*bzinv) + (bx,by,1). + * This means that (rx,ry,rz) can be calculated as + * (ax,ay,az*bzinv) + (bx,by,1), when not applying the bzinv factor to rz. + * The variable az below holds the modified Z coordinate for a, which is used + * for the computation of rx and ry, but not for rz. + */ + secp256k1_fe_mul(&az, &a->z, bzinv); + + secp256k1_fe_sqr(&z12, &az); + u1 = a->x; secp256k1_fe_normalize_weak(&u1); + secp256k1_fe_mul(&u2, &b->x, &z12); + s1 = a->y; secp256k1_fe_normalize_weak(&s1); + secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &az); + secp256k1_fe_negate(&h, &u1, 1); secp256k1_fe_add(&h, &u2); + secp256k1_fe_negate(&i, &s1, 1); secp256k1_fe_add(&i, &s2); + if (secp256k1_fe_normalizes_to_zero_var(&h)) { + if (secp256k1_fe_normalizes_to_zero_var(&i)) { + secp256k1_gej_double_var(r, a, NULL); + } else { + r->infinity = 1; + } + return; + } + secp256k1_fe_sqr(&i2, &i); + secp256k1_fe_sqr(&h2, &h); + secp256k1_fe_mul(&h3, &h, &h2); + r->z = a->z; secp256k1_fe_mul(&r->z, &r->z, &h); + secp256k1_fe_mul(&t, &u1, &h2); + r->x = t; secp256k1_fe_mul_int(&r->x, 2); secp256k1_fe_add(&r->x, &h3); secp256k1_fe_negate(&r->x, &r->x, 3); secp256k1_fe_add(&r->x, &i2); + secp256k1_fe_negate(&r->y, &r->x, 5); secp256k1_fe_add(&r->y, &t); secp256k1_fe_mul(&r->y, &r->y, &i); + secp256k1_fe_mul(&h3, &h3, &s1); secp256k1_fe_negate(&h3, &h3, 1); + secp256k1_fe_add(&r->y, &h3); +} + + +static void secp256k1_gej_add_ge(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b) { + /* Operations: 7 mul, 5 sqr, 4 normalize, 21 mul_int/add/negate/cmov */ + static const secp256k1_fe fe_1 = SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 1); + secp256k1_fe zz, u1, u2, s1, s2, t, tt, m, n, q, rr; + secp256k1_fe m_alt, rr_alt; + int infinity, degenerate; + VERIFY_CHECK(!b->infinity); + VERIFY_CHECK(a->infinity == 0 || a->infinity == 1); + + /** In: + * Eric Brier and Marc Joye, Weierstrass Elliptic Curves and Side-Channel Attacks. + * In D. Naccache and P. Paillier, Eds., Public Key Cryptography, vol. 2274 of Lecture Notes in Computer Science, pages 335-345. Springer-Verlag, 2002. + * we find as solution for a unified addition/doubling formula: + * lambda = ((x1 + x2)^2 - x1 * x2 + a) / (y1 + y2), with a = 0 for secp256k1's curve equation. + * x3 = lambda^2 - (x1 + x2) + * 2*y3 = lambda * (x1 + x2 - 2 * x3) - (y1 + y2). + * + * Substituting x_i = Xi / Zi^2 and yi = Yi / Zi^3, for i=1,2,3, gives: + * U1 = X1*Z2^2, U2 = X2*Z1^2 + * S1 = Y1*Z2^3, S2 = Y2*Z1^3 + * Z = Z1*Z2 + * T = U1+U2 + * M = S1+S2 + * Q = T*M^2 + * R = T^2-U1*U2 + * X3 = 4*(R^2-Q) + * Y3 = 4*(R*(3*Q-2*R^2)-M^4) + * Z3 = 2*M*Z + * (Note that the paper uses xi = Xi / Zi and yi = Yi / Zi instead.) + * + * This formula has the benefit of being the same for both addition + * of distinct points and doubling. However, it breaks down in the + * case that either point is infinity, or that y1 = -y2. We handle + * these cases in the following ways: + * + * - If b is infinity we simply bail by means of a VERIFY_CHECK. + * + * - If a is infinity, we detect this, and at the end of the + * computation replace the result (which will be meaningless, + * but we compute to be constant-time) with b.x : b.y : 1. + * + * - If a = -b, we have y1 = -y2, which is a degenerate case. + * But here the answer is infinity, so we simply set the + * infinity flag of the result, overriding the computed values + * without even needing to cmov. + * + * - If y1 = -y2 but x1 != x2, which does occur thanks to certain + * properties of our curve (specifically, 1 has nontrivial cube + * roots in our field, and the curve equation has no x coefficient) + * then the answer is not infinity but also not given by the above + * equation. In this case, we cmov in place an alternate expression + * for lambda. Specifically (y1 - y2)/(x1 - x2). Where both these + * expressions for lambda are defined, they are equal, and can be + * obtained from each other by multiplication by (y1 + y2)/(y1 + y2) + * then substitution of x^3 + 7 for y^2 (using the curve equation). + * For all pairs of nonzero points (a, b) at least one is defined, + * so this covers everything. + */ + + secp256k1_fe_sqr(&zz, &a->z); /* z = Z1^2 */ + u1 = a->x; secp256k1_fe_normalize_weak(&u1); /* u1 = U1 = X1*Z2^2 (1) */ + secp256k1_fe_mul(&u2, &b->x, &zz); /* u2 = U2 = X2*Z1^2 (1) */ + s1 = a->y; secp256k1_fe_normalize_weak(&s1); /* s1 = S1 = Y1*Z2^3 (1) */ + secp256k1_fe_mul(&s2, &b->y, &zz); /* s2 = Y2*Z1^2 (1) */ + secp256k1_fe_mul(&s2, &s2, &a->z); /* s2 = S2 = Y2*Z1^3 (1) */ + t = u1; secp256k1_fe_add(&t, &u2); /* t = T = U1+U2 (2) */ + m = s1; secp256k1_fe_add(&m, &s2); /* m = M = S1+S2 (2) */ + secp256k1_fe_sqr(&rr, &t); /* rr = T^2 (1) */ + secp256k1_fe_negate(&m_alt, &u2, 1); /* Malt = -X2*Z1^2 */ + secp256k1_fe_mul(&tt, &u1, &m_alt); /* tt = -U1*U2 (2) */ + secp256k1_fe_add(&rr, &tt); /* rr = R = T^2-U1*U2 (3) */ + /** If lambda = R/M = 0/0 we have a problem (except in the "trivial" + * case that Z = z1z2 = 0, and this is special-cased later on). */ + degenerate = secp256k1_fe_normalizes_to_zero(&m) & + secp256k1_fe_normalizes_to_zero(&rr); + /* This only occurs when y1 == -y2 and x1^3 == x2^3, but x1 != x2. + * This means either x1 == beta*x2 or beta*x1 == x2, where beta is + * a nontrivial cube root of one. In either case, an alternate + * non-indeterminate expression for lambda is (y1 - y2)/(x1 - x2), + * so we set R/M equal to this. */ + rr_alt = s1; + secp256k1_fe_mul_int(&rr_alt, 2); /* rr = Y1*Z2^3 - Y2*Z1^3 (2) */ + secp256k1_fe_add(&m_alt, &u1); /* Malt = X1*Z2^2 - X2*Z1^2 */ + + secp256k1_fe_cmov(&rr_alt, &rr, !degenerate); + secp256k1_fe_cmov(&m_alt, &m, !degenerate); + /* Now Ralt / Malt = lambda and is guaranteed not to be 0/0. + * From here on out Ralt and Malt represent the numerator + * and denominator of lambda; R and M represent the explicit + * expressions x1^2 + x2^2 + x1x2 and y1 + y2. */ + secp256k1_fe_sqr(&n, &m_alt); /* n = Malt^2 (1) */ + secp256k1_fe_mul(&q, &n, &t); /* q = Q = T*Malt^2 (1) */ + /* These two lines use the observation that either M == Malt or M == 0, + * so M^3 * Malt is either Malt^4 (which is computed by squaring), or + * zero (which is "computed" by cmov). So the cost is one squaring + * versus two multiplications. */ + secp256k1_fe_sqr(&n, &n); + secp256k1_fe_cmov(&n, &m, degenerate); /* n = M^3 * Malt (2) */ + secp256k1_fe_sqr(&t, &rr_alt); /* t = Ralt^2 (1) */ + secp256k1_fe_mul(&r->z, &a->z, &m_alt); /* r->z = Malt*Z (1) */ + infinity = secp256k1_fe_normalizes_to_zero(&r->z) * (1 - a->infinity); + secp256k1_fe_mul_int(&r->z, 2); /* r->z = Z3 = 2*Malt*Z (2) */ + secp256k1_fe_negate(&q, &q, 1); /* q = -Q (2) */ + secp256k1_fe_add(&t, &q); /* t = Ralt^2-Q (3) */ + secp256k1_fe_normalize_weak(&t); + r->x = t; /* r->x = Ralt^2-Q (1) */ + secp256k1_fe_mul_int(&t, 2); /* t = 2*x3 (2) */ + secp256k1_fe_add(&t, &q); /* t = 2*x3 - Q: (4) */ + secp256k1_fe_mul(&t, &t, &rr_alt); /* t = Ralt*(2*x3 - Q) (1) */ + secp256k1_fe_add(&t, &n); /* t = Ralt*(2*x3 - Q) + M^3*Malt (3) */ + secp256k1_fe_negate(&r->y, &t, 3); /* r->y = Ralt*(Q - 2x3) - M^3*Malt (4) */ + secp256k1_fe_normalize_weak(&r->y); + secp256k1_fe_mul_int(&r->x, 4); /* r->x = X3 = 4*(Ralt^2-Q) */ + secp256k1_fe_mul_int(&r->y, 4); /* r->y = Y3 = 4*Ralt*(Q - 2x3) - 4*M^3*Malt (4) */ + + /** In case a->infinity == 1, replace r with (b->x, b->y, 1). */ + secp256k1_fe_cmov(&r->x, &b->x, a->infinity); + secp256k1_fe_cmov(&r->y, &b->y, a->infinity); + secp256k1_fe_cmov(&r->z, &fe_1, a->infinity); + r->infinity = infinity; +} + +static void secp256k1_gej_rescale(secp256k1_gej *r, const secp256k1_fe *s) { + /* Operations: 4 mul, 1 sqr */ + secp256k1_fe zz; + VERIFY_CHECK(!secp256k1_fe_is_zero(s)); + secp256k1_fe_sqr(&zz, s); + secp256k1_fe_mul(&r->x, &r->x, &zz); /* r->x *= s^2 */ + secp256k1_fe_mul(&r->y, &r->y, &zz); + secp256k1_fe_mul(&r->y, &r->y, s); /* r->y *= s^3 */ + secp256k1_fe_mul(&r->z, &r->z, s); /* r->z *= s */ +} + +static void secp256k1_ge_to_storage(secp256k1_ge_storage *r, const secp256k1_ge *a) { + secp256k1_fe x, y; + VERIFY_CHECK(!a->infinity); + x = a->x; + secp256k1_fe_normalize(&x); + y = a->y; + secp256k1_fe_normalize(&y); + secp256k1_fe_to_storage(&r->x, &x); + secp256k1_fe_to_storage(&r->y, &y); +} + +static void secp256k1_ge_from_storage(secp256k1_ge *r, const secp256k1_ge_storage *a) { + secp256k1_fe_from_storage(&r->x, &a->x); + secp256k1_fe_from_storage(&r->y, &a->y); + r->infinity = 0; +} + +static SECP256K1_INLINE void secp256k1_ge_storage_cmov(secp256k1_ge_storage *r, const secp256k1_ge_storage *a, int flag) { + secp256k1_fe_storage_cmov(&r->x, &a->x, flag); + secp256k1_fe_storage_cmov(&r->y, &a->y, flag); +} + +#ifdef USE_ENDOMORPHISM +static void secp256k1_ge_mul_lambda(secp256k1_ge *r, const secp256k1_ge *a) { + static const secp256k1_fe beta = SECP256K1_FE_CONST( + 0x7ae96a2bul, 0x657c0710ul, 0x6e64479eul, 0xac3434e9ul, + 0x9cf04975ul, 0x12f58995ul, 0xc1396c28ul, 0x719501eeul + ); + *r = *a; + secp256k1_fe_mul(&r->x, &r->x, &beta); +} +#endif + +static int secp256k1_gej_has_quad_y_var(const secp256k1_gej *a) { + secp256k1_fe yz; + + if (a->infinity) { + return 0; + } + + /* We rely on the fact that the Jacobi symbol of 1 / a->z^3 is the same as + * that of a->z. Thus a->y / a->z^3 is a quadratic residue iff a->y * a->z + is */ + secp256k1_fe_mul(&yz, &a->y, &a->z); + return secp256k1_fe_is_quad_var(&yz); +} + +#endif /* SECP256K1_GROUP_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/hash.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/hash.h new file mode 100644 index 000000000..de26e4b89 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/hash.h @@ -0,0 +1,41 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_HASH_H +#define SECP256K1_HASH_H + +#include +#include + +typedef struct { + uint32_t s[8]; + uint32_t buf[16]; /* In big endian */ + size_t bytes; +} secp256k1_sha256; + +static void secp256k1_sha256_initialize(secp256k1_sha256 *hash); +static void secp256k1_sha256_write(secp256k1_sha256 *hash, const unsigned char *data, size_t size); +static void secp256k1_sha256_finalize(secp256k1_sha256 *hash, unsigned char *out32); + +typedef struct { + secp256k1_sha256 inner, outer; +} secp256k1_hmac_sha256; + +static void secp256k1_hmac_sha256_initialize(secp256k1_hmac_sha256 *hash, const unsigned char *key, size_t size); +static void secp256k1_hmac_sha256_write(secp256k1_hmac_sha256 *hash, const unsigned char *data, size_t size); +static void secp256k1_hmac_sha256_finalize(secp256k1_hmac_sha256 *hash, unsigned char *out32); + +typedef struct { + unsigned char v[32]; + unsigned char k[32]; + int retry; +} secp256k1_rfc6979_hmac_sha256; + +static void secp256k1_rfc6979_hmac_sha256_initialize(secp256k1_rfc6979_hmac_sha256 *rng, const unsigned char *key, size_t keylen); +static void secp256k1_rfc6979_hmac_sha256_generate(secp256k1_rfc6979_hmac_sha256 *rng, unsigned char *out, size_t outlen); +static void secp256k1_rfc6979_hmac_sha256_finalize(secp256k1_rfc6979_hmac_sha256 *rng); + +#endif /* SECP256K1_HASH_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/hash_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/hash_impl.h new file mode 100644 index 000000000..009f26beb --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/hash_impl.h @@ -0,0 +1,282 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_HASH_IMPL_H +#define SECP256K1_HASH_IMPL_H + +#include "hash.h" + +#include +#include +#include + +#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z)))) +#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y)))) +#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10)) +#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7)) +#define sigma0(x) (((x) >> 7 | (x) << 25) ^ ((x) >> 18 | (x) << 14) ^ ((x) >> 3)) +#define sigma1(x) (((x) >> 17 | (x) << 15) ^ ((x) >> 19 | (x) << 13) ^ ((x) >> 10)) + +#define Round(a,b,c,d,e,f,g,h,k,w) do { \ + uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \ + uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \ + (d) += t1; \ + (h) = t1 + t2; \ +} while(0) + +#ifdef WORDS_BIGENDIAN +#define BE32(x) (x) +#else +#define BE32(p) ((((p) & 0xFF) << 24) | (((p) & 0xFF00) << 8) | (((p) & 0xFF0000) >> 8) | (((p) & 0xFF000000) >> 24)) +#endif + +static void secp256k1_sha256_initialize(secp256k1_sha256 *hash) { + hash->s[0] = 0x6a09e667ul; + hash->s[1] = 0xbb67ae85ul; + hash->s[2] = 0x3c6ef372ul; + hash->s[3] = 0xa54ff53aul; + hash->s[4] = 0x510e527ful; + hash->s[5] = 0x9b05688cul; + hash->s[6] = 0x1f83d9abul; + hash->s[7] = 0x5be0cd19ul; + hash->bytes = 0; +} + +/** Perform one SHA-256 transformation, processing 16 big endian 32-bit words. */ +static void secp256k1_sha256_transform(uint32_t* s, const uint32_t* chunk) { + uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7]; + uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15; + + Round(a, b, c, d, e, f, g, h, 0x428a2f98, w0 = BE32(chunk[0])); + Round(h, a, b, c, d, e, f, g, 0x71374491, w1 = BE32(chunk[1])); + Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf, w2 = BE32(chunk[2])); + Round(f, g, h, a, b, c, d, e, 0xe9b5dba5, w3 = BE32(chunk[3])); + Round(e, f, g, h, a, b, c, d, 0x3956c25b, w4 = BE32(chunk[4])); + Round(d, e, f, g, h, a, b, c, 0x59f111f1, w5 = BE32(chunk[5])); + Round(c, d, e, f, g, h, a, b, 0x923f82a4, w6 = BE32(chunk[6])); + Round(b, c, d, e, f, g, h, a, 0xab1c5ed5, w7 = BE32(chunk[7])); + Round(a, b, c, d, e, f, g, h, 0xd807aa98, w8 = BE32(chunk[8])); + Round(h, a, b, c, d, e, f, g, 0x12835b01, w9 = BE32(chunk[9])); + Round(g, h, a, b, c, d, e, f, 0x243185be, w10 = BE32(chunk[10])); + Round(f, g, h, a, b, c, d, e, 0x550c7dc3, w11 = BE32(chunk[11])); + Round(e, f, g, h, a, b, c, d, 0x72be5d74, w12 = BE32(chunk[12])); + Round(d, e, f, g, h, a, b, c, 0x80deb1fe, w13 = BE32(chunk[13])); + Round(c, d, e, f, g, h, a, b, 0x9bdc06a7, w14 = BE32(chunk[14])); + Round(b, c, d, e, f, g, h, a, 0xc19bf174, w15 = BE32(chunk[15])); + + Round(a, b, c, d, e, f, g, h, 0xe49b69c1, w0 += sigma1(w14) + w9 + sigma0(w1)); + Round(h, a, b, c, d, e, f, g, 0xefbe4786, w1 += sigma1(w15) + w10 + sigma0(w2)); + Round(g, h, a, b, c, d, e, f, 0x0fc19dc6, w2 += sigma1(w0) + w11 + sigma0(w3)); + Round(f, g, h, a, b, c, d, e, 0x240ca1cc, w3 += sigma1(w1) + w12 + sigma0(w4)); + Round(e, f, g, h, a, b, c, d, 0x2de92c6f, w4 += sigma1(w2) + w13 + sigma0(w5)); + Round(d, e, f, g, h, a, b, c, 0x4a7484aa, w5 += sigma1(w3) + w14 + sigma0(w6)); + Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc, w6 += sigma1(w4) + w15 + sigma0(w7)); + Round(b, c, d, e, f, g, h, a, 0x76f988da, w7 += sigma1(w5) + w0 + sigma0(w8)); + Round(a, b, c, d, e, f, g, h, 0x983e5152, w8 += sigma1(w6) + w1 + sigma0(w9)); + Round(h, a, b, c, d, e, f, g, 0xa831c66d, w9 += sigma1(w7) + w2 + sigma0(w10)); + Round(g, h, a, b, c, d, e, f, 0xb00327c8, w10 += sigma1(w8) + w3 + sigma0(w11)); + Round(f, g, h, a, b, c, d, e, 0xbf597fc7, w11 += sigma1(w9) + w4 + sigma0(w12)); + Round(e, f, g, h, a, b, c, d, 0xc6e00bf3, w12 += sigma1(w10) + w5 + sigma0(w13)); + Round(d, e, f, g, h, a, b, c, 0xd5a79147, w13 += sigma1(w11) + w6 + sigma0(w14)); + Round(c, d, e, f, g, h, a, b, 0x06ca6351, w14 += sigma1(w12) + w7 + sigma0(w15)); + Round(b, c, d, e, f, g, h, a, 0x14292967, w15 += sigma1(w13) + w8 + sigma0(w0)); + + Round(a, b, c, d, e, f, g, h, 0x27b70a85, w0 += sigma1(w14) + w9 + sigma0(w1)); + Round(h, a, b, c, d, e, f, g, 0x2e1b2138, w1 += sigma1(w15) + w10 + sigma0(w2)); + Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc, w2 += sigma1(w0) + w11 + sigma0(w3)); + Round(f, g, h, a, b, c, d, e, 0x53380d13, w3 += sigma1(w1) + w12 + sigma0(w4)); + Round(e, f, g, h, a, b, c, d, 0x650a7354, w4 += sigma1(w2) + w13 + sigma0(w5)); + Round(d, e, f, g, h, a, b, c, 0x766a0abb, w5 += sigma1(w3) + w14 + sigma0(w6)); + Round(c, d, e, f, g, h, a, b, 0x81c2c92e, w6 += sigma1(w4) + w15 + sigma0(w7)); + Round(b, c, d, e, f, g, h, a, 0x92722c85, w7 += sigma1(w5) + w0 + sigma0(w8)); + Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1, w8 += sigma1(w6) + w1 + sigma0(w9)); + Round(h, a, b, c, d, e, f, g, 0xa81a664b, w9 += sigma1(w7) + w2 + sigma0(w10)); + Round(g, h, a, b, c, d, e, f, 0xc24b8b70, w10 += sigma1(w8) + w3 + sigma0(w11)); + Round(f, g, h, a, b, c, d, e, 0xc76c51a3, w11 += sigma1(w9) + w4 + sigma0(w12)); + Round(e, f, g, h, a, b, c, d, 0xd192e819, w12 += sigma1(w10) + w5 + sigma0(w13)); + Round(d, e, f, g, h, a, b, c, 0xd6990624, w13 += sigma1(w11) + w6 + sigma0(w14)); + Round(c, d, e, f, g, h, a, b, 0xf40e3585, w14 += sigma1(w12) + w7 + sigma0(w15)); + Round(b, c, d, e, f, g, h, a, 0x106aa070, w15 += sigma1(w13) + w8 + sigma0(w0)); + + Round(a, b, c, d, e, f, g, h, 0x19a4c116, w0 += sigma1(w14) + w9 + sigma0(w1)); + Round(h, a, b, c, d, e, f, g, 0x1e376c08, w1 += sigma1(w15) + w10 + sigma0(w2)); + Round(g, h, a, b, c, d, e, f, 0x2748774c, w2 += sigma1(w0) + w11 + sigma0(w3)); + Round(f, g, h, a, b, c, d, e, 0x34b0bcb5, w3 += sigma1(w1) + w12 + sigma0(w4)); + Round(e, f, g, h, a, b, c, d, 0x391c0cb3, w4 += sigma1(w2) + w13 + sigma0(w5)); + Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a, w5 += sigma1(w3) + w14 + sigma0(w6)); + Round(c, d, e, f, g, h, a, b, 0x5b9cca4f, w6 += sigma1(w4) + w15 + sigma0(w7)); + Round(b, c, d, e, f, g, h, a, 0x682e6ff3, w7 += sigma1(w5) + w0 + sigma0(w8)); + Round(a, b, c, d, e, f, g, h, 0x748f82ee, w8 += sigma1(w6) + w1 + sigma0(w9)); + Round(h, a, b, c, d, e, f, g, 0x78a5636f, w9 += sigma1(w7) + w2 + sigma0(w10)); + Round(g, h, a, b, c, d, e, f, 0x84c87814, w10 += sigma1(w8) + w3 + sigma0(w11)); + Round(f, g, h, a, b, c, d, e, 0x8cc70208, w11 += sigma1(w9) + w4 + sigma0(w12)); + Round(e, f, g, h, a, b, c, d, 0x90befffa, w12 += sigma1(w10) + w5 + sigma0(w13)); + Round(d, e, f, g, h, a, b, c, 0xa4506ceb, w13 += sigma1(w11) + w6 + sigma0(w14)); + Round(c, d, e, f, g, h, a, b, 0xbef9a3f7, w14 + sigma1(w12) + w7 + sigma0(w15)); + Round(b, c, d, e, f, g, h, a, 0xc67178f2, w15 + sigma1(w13) + w8 + sigma0(w0)); + + s[0] += a; + s[1] += b; + s[2] += c; + s[3] += d; + s[4] += e; + s[5] += f; + s[6] += g; + s[7] += h; +} + +static void secp256k1_sha256_write(secp256k1_sha256 *hash, const unsigned char *data, size_t len) { + size_t bufsize = hash->bytes & 0x3F; + hash->bytes += len; + while (bufsize + len >= 64) { + /* Fill the buffer, and process it. */ + size_t chunk_len = 64 - bufsize; + memcpy(((unsigned char*)hash->buf) + bufsize, data, chunk_len); + data += chunk_len; + len -= chunk_len; + secp256k1_sha256_transform(hash->s, hash->buf); + bufsize = 0; + } + if (len) { + /* Fill the buffer with what remains. */ + memcpy(((unsigned char*)hash->buf) + bufsize, data, len); + } +} + +static void secp256k1_sha256_finalize(secp256k1_sha256 *hash, unsigned char *out32) { + static const unsigned char pad[64] = {0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + uint32_t sizedesc[2]; + uint32_t out[8]; + int i = 0; + sizedesc[0] = BE32(hash->bytes >> 29); + sizedesc[1] = BE32(hash->bytes << 3); + secp256k1_sha256_write(hash, pad, 1 + ((119 - (hash->bytes % 64)) % 64)); + secp256k1_sha256_write(hash, (const unsigned char*)sizedesc, 8); + for (i = 0; i < 8; i++) { + out[i] = BE32(hash->s[i]); + hash->s[i] = 0; + } + memcpy(out32, (const unsigned char*)out, 32); +} + +static void secp256k1_hmac_sha256_initialize(secp256k1_hmac_sha256 *hash, const unsigned char *key, size_t keylen) { + size_t n; + unsigned char rkey[64]; + if (keylen <= sizeof(rkey)) { + memcpy(rkey, key, keylen); + memset(rkey + keylen, 0, sizeof(rkey) - keylen); + } else { + secp256k1_sha256 sha256; + secp256k1_sha256_initialize(&sha256); + secp256k1_sha256_write(&sha256, key, keylen); + secp256k1_sha256_finalize(&sha256, rkey); + memset(rkey + 32, 0, 32); + } + + secp256k1_sha256_initialize(&hash->outer); + for (n = 0; n < sizeof(rkey); n++) { + rkey[n] ^= 0x5c; + } + secp256k1_sha256_write(&hash->outer, rkey, sizeof(rkey)); + + secp256k1_sha256_initialize(&hash->inner); + for (n = 0; n < sizeof(rkey); n++) { + rkey[n] ^= 0x5c ^ 0x36; + } + secp256k1_sha256_write(&hash->inner, rkey, sizeof(rkey)); + memset(rkey, 0, sizeof(rkey)); +} + +static void secp256k1_hmac_sha256_write(secp256k1_hmac_sha256 *hash, const unsigned char *data, size_t size) { + secp256k1_sha256_write(&hash->inner, data, size); +} + +static void secp256k1_hmac_sha256_finalize(secp256k1_hmac_sha256 *hash, unsigned char *out32) { + unsigned char temp[32]; + secp256k1_sha256_finalize(&hash->inner, temp); + secp256k1_sha256_write(&hash->outer, temp, 32); + memset(temp, 0, 32); + secp256k1_sha256_finalize(&hash->outer, out32); +} + + +static void secp256k1_rfc6979_hmac_sha256_initialize(secp256k1_rfc6979_hmac_sha256 *rng, const unsigned char *key, size_t keylen) { + secp256k1_hmac_sha256 hmac; + static const unsigned char zero[1] = {0x00}; + static const unsigned char one[1] = {0x01}; + + memset(rng->v, 0x01, 32); /* RFC6979 3.2.b. */ + memset(rng->k, 0x00, 32); /* RFC6979 3.2.c. */ + + /* RFC6979 3.2.d. */ + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_write(&hmac, zero, 1); + secp256k1_hmac_sha256_write(&hmac, key, keylen); + secp256k1_hmac_sha256_finalize(&hmac, rng->k); + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_finalize(&hmac, rng->v); + + /* RFC6979 3.2.f. */ + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_write(&hmac, one, 1); + secp256k1_hmac_sha256_write(&hmac, key, keylen); + secp256k1_hmac_sha256_finalize(&hmac, rng->k); + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_finalize(&hmac, rng->v); + rng->retry = 0; +} + +static void secp256k1_rfc6979_hmac_sha256_generate(secp256k1_rfc6979_hmac_sha256 *rng, unsigned char *out, size_t outlen) { + /* RFC6979 3.2.h. */ + static const unsigned char zero[1] = {0x00}; + if (rng->retry) { + secp256k1_hmac_sha256 hmac; + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_write(&hmac, zero, 1); + secp256k1_hmac_sha256_finalize(&hmac, rng->k); + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_finalize(&hmac, rng->v); + } + + while (outlen > 0) { + secp256k1_hmac_sha256 hmac; + int now = outlen; + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_finalize(&hmac, rng->v); + if (now > 32) { + now = 32; + } + memcpy(out, rng->v, now); + out += now; + outlen -= now; + } + + rng->retry = 1; +} + +static void secp256k1_rfc6979_hmac_sha256_finalize(secp256k1_rfc6979_hmac_sha256 *rng) { + memset(rng->k, 0, 32); + memset(rng->v, 0, 32); + rng->retry = 0; +} + +#undef BE32 +#undef Round +#undef sigma1 +#undef sigma0 +#undef Sigma1 +#undef Sigma0 +#undef Maj +#undef Ch + +#endif /* SECP256K1_HASH_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/modules/ecdh/main_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/modules/ecdh/main_impl.h new file mode 100644 index 000000000..85602208f --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/modules/ecdh/main_impl.h @@ -0,0 +1,54 @@ +/********************************************************************** + * Copyright (c) 2015 Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_MODULE_ECDH_MAIN_H +#define SECP256K1_MODULE_ECDH_MAIN_H + +#include "secp256k1_ecdh.h" +#include "ecmult_const_impl.h" + +int secp256k1_ecdh(const secp256k1_context* ctx, unsigned char *result, const secp256k1_pubkey *point, const unsigned char *scalar) { + int ret = 0; + int overflow = 0; + secp256k1_gej res; + secp256k1_ge pt; + secp256k1_scalar s; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(result != NULL); + ARG_CHECK(point != NULL); + ARG_CHECK(scalar != NULL); + + secp256k1_pubkey_load(ctx, &pt, point); + secp256k1_scalar_set_b32(&s, scalar, &overflow); + if (overflow || secp256k1_scalar_is_zero(&s)) { + ret = 0; + } else { + unsigned char x[32]; + unsigned char y[1]; + secp256k1_sha256 sha; + + secp256k1_ecmult_const(&res, &pt, &s, 256); + secp256k1_ge_set_gej(&pt, &res); + /* Compute a hash of the point in compressed form + * Note we cannot use secp256k1_eckey_pubkey_serialize here since it does not + * expect its output to be secret and has a timing sidechannel. */ + secp256k1_fe_normalize(&pt.x); + secp256k1_fe_normalize(&pt.y); + secp256k1_fe_get_b32(x, &pt.x); + y[0] = 0x02 | secp256k1_fe_is_odd(&pt.y); + + secp256k1_sha256_initialize(&sha); + secp256k1_sha256_write(&sha, y, sizeof(y)); + secp256k1_sha256_write(&sha, x, sizeof(x)); + secp256k1_sha256_finalize(&sha, result); + ret = 1; + } + + secp256k1_scalar_clear(&s); + return ret; +} + +#endif /* SECP256K1_MODULE_ECDH_MAIN_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/modules/recovery/main_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/modules/recovery/main_impl.h new file mode 100755 index 000000000..1abe509ff --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/modules/recovery/main_impl.h @@ -0,0 +1,193 @@ +/********************************************************************** + * Copyright (c) 2013-2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_MODULE_RECOVERY_MAIN_H +#define SECP256K1_MODULE_RECOVERY_MAIN_H + +#include "secp256k1_recovery.h" + +static void secp256k1_ecdsa_recoverable_signature_load(const secp256k1_context* ctx, secp256k1_scalar* r, secp256k1_scalar* s, int* recid, const secp256k1_ecdsa_recoverable_signature* sig) { + (void)ctx; + if (sizeof(secp256k1_scalar) == 32) { + /* When the secp256k1_scalar type is exactly 32 byte, use its + * representation inside secp256k1_ecdsa_signature, as conversion is very fast. + * Note that secp256k1_ecdsa_signature_save must use the same representation. */ + memcpy(r, &sig->data[0], 32); + memcpy(s, &sig->data[32], 32); + } else { + secp256k1_scalar_set_b32(r, &sig->data[0], NULL); + secp256k1_scalar_set_b32(s, &sig->data[32], NULL); + } + *recid = sig->data[64]; +} + +static void secp256k1_ecdsa_recoverable_signature_save(secp256k1_ecdsa_recoverable_signature* sig, const secp256k1_scalar* r, const secp256k1_scalar* s, int recid) { + if (sizeof(secp256k1_scalar) == 32) { + memcpy(&sig->data[0], r, 32); + memcpy(&sig->data[32], s, 32); + } else { + secp256k1_scalar_get_b32(&sig->data[0], r); + secp256k1_scalar_get_b32(&sig->data[32], s); + } + sig->data[64] = recid; +} + +int secp256k1_ecdsa_recoverable_signature_parse_compact(const secp256k1_context* ctx, secp256k1_ecdsa_recoverable_signature* sig, const unsigned char *input64, int recid) { + secp256k1_scalar r, s; + int ret = 1; + int overflow = 0; + + (void)ctx; + ARG_CHECK(sig != NULL); + ARG_CHECK(input64 != NULL); + ARG_CHECK(recid >= 0 && recid <= 3); + + secp256k1_scalar_set_b32(&r, &input64[0], &overflow); + ret &= !overflow; + secp256k1_scalar_set_b32(&s, &input64[32], &overflow); + ret &= !overflow; + if (ret) { + secp256k1_ecdsa_recoverable_signature_save(sig, &r, &s, recid); + } else { + memset(sig, 0, sizeof(*sig)); + } + return ret; +} + +int secp256k1_ecdsa_recoverable_signature_serialize_compact(const secp256k1_context* ctx, unsigned char *output64, int *recid, const secp256k1_ecdsa_recoverable_signature* sig) { + secp256k1_scalar r, s; + + (void)ctx; + ARG_CHECK(output64 != NULL); + ARG_CHECK(sig != NULL); + ARG_CHECK(recid != NULL); + + secp256k1_ecdsa_recoverable_signature_load(ctx, &r, &s, recid, sig); + secp256k1_scalar_get_b32(&output64[0], &r); + secp256k1_scalar_get_b32(&output64[32], &s); + return 1; +} + +int secp256k1_ecdsa_recoverable_signature_convert(const secp256k1_context* ctx, secp256k1_ecdsa_signature* sig, const secp256k1_ecdsa_recoverable_signature* sigin) { + secp256k1_scalar r, s; + int recid; + + (void)ctx; + ARG_CHECK(sig != NULL); + ARG_CHECK(sigin != NULL); + + secp256k1_ecdsa_recoverable_signature_load(ctx, &r, &s, &recid, sigin); + secp256k1_ecdsa_signature_save(sig, &r, &s); + return 1; +} + +static int secp256k1_ecdsa_sig_recover(const secp256k1_ecmult_context *ctx, const secp256k1_scalar *sigr, const secp256k1_scalar* sigs, secp256k1_ge *pubkey, const secp256k1_scalar *message, int recid) { + unsigned char brx[32]; + secp256k1_fe fx; + secp256k1_ge x; + secp256k1_gej xj; + secp256k1_scalar rn, u1, u2; + secp256k1_gej qj; + int r; + + if (secp256k1_scalar_is_zero(sigr) || secp256k1_scalar_is_zero(sigs)) { + return 0; + } + + secp256k1_scalar_get_b32(brx, sigr); + r = secp256k1_fe_set_b32(&fx, brx); + (void)r; + VERIFY_CHECK(r); /* brx comes from a scalar, so is less than the order; certainly less than p */ + if (recid & 2) { + if (secp256k1_fe_cmp_var(&fx, &secp256k1_ecdsa_const_p_minus_order) >= 0) { + return 0; + } + secp256k1_fe_add(&fx, &secp256k1_ecdsa_const_order_as_fe); + } + if (!secp256k1_ge_set_xo_var(&x, &fx, recid & 1)) { + return 0; + } + secp256k1_gej_set_ge(&xj, &x); + secp256k1_scalar_inverse_var(&rn, sigr); + secp256k1_scalar_mul(&u1, &rn, message); + secp256k1_scalar_negate(&u1, &u1); + secp256k1_scalar_mul(&u2, &rn, sigs); + secp256k1_ecmult(ctx, &qj, &xj, &u2, &u1); + secp256k1_ge_set_gej_var(pubkey, &qj); + return !secp256k1_gej_is_infinity(&qj); +} + +int secp256k1_ecdsa_sign_recoverable(const secp256k1_context* ctx, secp256k1_ecdsa_recoverable_signature *signature, const unsigned char *msg32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void* noncedata) { + secp256k1_scalar r, s; + secp256k1_scalar sec, non, msg; + int recid; + int ret = 0; + int overflow = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(signature != NULL); + ARG_CHECK(seckey != NULL); + if (noncefp == NULL) { + noncefp = secp256k1_nonce_function_default; + } + + secp256k1_scalar_set_b32(&sec, seckey, &overflow); + /* Fail if the secret key is invalid. */ + if (!overflow && !secp256k1_scalar_is_zero(&sec)) { + unsigned char nonce32[32]; + unsigned int count = 0; + secp256k1_scalar_set_b32(&msg, msg32, NULL); + while (1) { + ret = noncefp(nonce32, msg32, seckey, NULL, (void*)noncedata, count); + if (!ret) { + break; + } + secp256k1_scalar_set_b32(&non, nonce32, &overflow); + if (!secp256k1_scalar_is_zero(&non) && !overflow) { + if (secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, &r, &s, &sec, &msg, &non, &recid)) { + break; + } + } + count++; + } + memset(nonce32, 0, 32); + secp256k1_scalar_clear(&msg); + secp256k1_scalar_clear(&non); + secp256k1_scalar_clear(&sec); + } + if (ret) { + secp256k1_ecdsa_recoverable_signature_save(signature, &r, &s, recid); + } else { + memset(signature, 0, sizeof(*signature)); + } + return ret; +} + +int secp256k1_ecdsa_recover(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const secp256k1_ecdsa_recoverable_signature *signature, const unsigned char *msg32) { + secp256k1_ge q; + secp256k1_scalar r, s; + secp256k1_scalar m; + int recid; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(signature != NULL); + ARG_CHECK(pubkey != NULL); + + secp256k1_ecdsa_recoverable_signature_load(ctx, &r, &s, &recid, signature); + VERIFY_CHECK(recid >= 0 && recid < 4); /* should have been caught in parse_compact */ + secp256k1_scalar_set_b32(&m, msg32, NULL); + if (secp256k1_ecdsa_sig_recover(&ctx->ecmult_ctx, &r, &s, &q, &m, recid)) { + secp256k1_pubkey_save(pubkey, &q); + return 1; + } else { + memset(pubkey, 0, sizeof(*pubkey)); + return 0; + } +} + +#endif /* SECP256K1_MODULE_RECOVERY_MAIN_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num.h new file mode 100644 index 000000000..49f2dd791 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num.h @@ -0,0 +1,74 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_NUM_H +#define SECP256K1_NUM_H + +#ifndef USE_NUM_NONE + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#if defined(USE_NUM_GMP) +#include "num_gmp.h" +#else +#error "Please select num implementation" +#endif + +/** Copy a number. */ +static void secp256k1_num_copy(secp256k1_num *r, const secp256k1_num *a); + +/** Convert a number's absolute value to a binary big-endian string. + * There must be enough place. */ +static void secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const secp256k1_num *a); + +/** Set a number to the value of a binary big-endian string. */ +static void secp256k1_num_set_bin(secp256k1_num *r, const unsigned char *a, unsigned int alen); + +/** Compute a modular inverse. The input must be less than the modulus. */ +static void secp256k1_num_mod_inverse(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *m); + +/** Compute the jacobi symbol (a|b). b must be positive and odd. */ +static int secp256k1_num_jacobi(const secp256k1_num *a, const secp256k1_num *b); + +/** Compare the absolute value of two numbers. */ +static int secp256k1_num_cmp(const secp256k1_num *a, const secp256k1_num *b); + +/** Test whether two number are equal (including sign). */ +static int secp256k1_num_eq(const secp256k1_num *a, const secp256k1_num *b); + +/** Add two (signed) numbers. */ +static void secp256k1_num_add(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b); + +/** Subtract two (signed) numbers. */ +static void secp256k1_num_sub(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b); + +/** Multiply two (signed) numbers. */ +static void secp256k1_num_mul(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b); + +/** Replace a number by its remainder modulo m. M's sign is ignored. The result is a number between 0 and m-1, + even if r was negative. */ +static void secp256k1_num_mod(secp256k1_num *r, const secp256k1_num *m); + +/** Right-shift the passed number by bits bits. */ +static void secp256k1_num_shift(secp256k1_num *r, int bits); + +/** Check whether a number is zero. */ +static int secp256k1_num_is_zero(const secp256k1_num *a); + +/** Check whether a number is one. */ +static int secp256k1_num_is_one(const secp256k1_num *a); + +/** Check whether a number is strictly negative. */ +static int secp256k1_num_is_neg(const secp256k1_num *a); + +/** Change a number's sign. */ +static void secp256k1_num_negate(secp256k1_num *r); + +#endif + +#endif /* SECP256K1_NUM_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num_gmp.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num_gmp.h new file mode 100644 index 000000000..3619844bd --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num_gmp.h @@ -0,0 +1,20 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_NUM_REPR_H +#define SECP256K1_NUM_REPR_H + +#include + +#define NUM_LIMBS ((256+GMP_NUMB_BITS-1)/GMP_NUMB_BITS) + +typedef struct { + mp_limb_t data[2*NUM_LIMBS]; + int neg; + int limbs; +} secp256k1_num; + +#endif /* SECP256K1_NUM_REPR_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num_gmp_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num_gmp_impl.h new file mode 100644 index 000000000..0ae2a8ba0 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num_gmp_impl.h @@ -0,0 +1,288 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_NUM_REPR_IMPL_H +#define SECP256K1_NUM_REPR_IMPL_H + +#include +#include +#include + +#include "util.h" +#include "num.h" + +#ifdef VERIFY +static void secp256k1_num_sanity(const secp256k1_num *a) { + VERIFY_CHECK(a->limbs == 1 || (a->limbs > 1 && a->data[a->limbs-1] != 0)); +} +#else +#define secp256k1_num_sanity(a) do { } while(0) +#endif + +static void secp256k1_num_copy(secp256k1_num *r, const secp256k1_num *a) { + *r = *a; +} + +static void secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const secp256k1_num *a) { + unsigned char tmp[65]; + int len = 0; + int shift = 0; + if (a->limbs>1 || a->data[0] != 0) { + len = mpn_get_str(tmp, 256, (mp_limb_t*)a->data, a->limbs); + } + while (shift < len && tmp[shift] == 0) shift++; + VERIFY_CHECK(len-shift <= (int)rlen); + memset(r, 0, rlen - len + shift); + if (len > shift) { + memcpy(r + rlen - len + shift, tmp + shift, len - shift); + } + memset(tmp, 0, sizeof(tmp)); +} + +static void secp256k1_num_set_bin(secp256k1_num *r, const unsigned char *a, unsigned int alen) { + int len; + VERIFY_CHECK(alen > 0); + VERIFY_CHECK(alen <= 64); + len = mpn_set_str(r->data, a, alen, 256); + if (len == 0) { + r->data[0] = 0; + len = 1; + } + VERIFY_CHECK(len <= NUM_LIMBS*2); + r->limbs = len; + r->neg = 0; + while (r->limbs > 1 && r->data[r->limbs-1]==0) { + r->limbs--; + } +} + +static void secp256k1_num_add_abs(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) { + mp_limb_t c = mpn_add(r->data, a->data, a->limbs, b->data, b->limbs); + r->limbs = a->limbs; + if (c != 0) { + VERIFY_CHECK(r->limbs < 2*NUM_LIMBS); + r->data[r->limbs++] = c; + } +} + +static void secp256k1_num_sub_abs(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) { + mp_limb_t c = mpn_sub(r->data, a->data, a->limbs, b->data, b->limbs); + (void)c; + VERIFY_CHECK(c == 0); + r->limbs = a->limbs; + while (r->limbs > 1 && r->data[r->limbs-1]==0) { + r->limbs--; + } +} + +static void secp256k1_num_mod(secp256k1_num *r, const secp256k1_num *m) { + secp256k1_num_sanity(r); + secp256k1_num_sanity(m); + + if (r->limbs >= m->limbs) { + mp_limb_t t[2*NUM_LIMBS]; + mpn_tdiv_qr(t, r->data, 0, r->data, r->limbs, m->data, m->limbs); + memset(t, 0, sizeof(t)); + r->limbs = m->limbs; + while (r->limbs > 1 && r->data[r->limbs-1]==0) { + r->limbs--; + } + } + + if (r->neg && (r->limbs > 1 || r->data[0] != 0)) { + secp256k1_num_sub_abs(r, m, r); + r->neg = 0; + } +} + +static void secp256k1_num_mod_inverse(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *m) { + int i; + mp_limb_t g[NUM_LIMBS+1]; + mp_limb_t u[NUM_LIMBS+1]; + mp_limb_t v[NUM_LIMBS+1]; + mp_size_t sn; + mp_size_t gn; + secp256k1_num_sanity(a); + secp256k1_num_sanity(m); + + /** mpn_gcdext computes: (G,S) = gcdext(U,V), where + * * G = gcd(U,V) + * * G = U*S + V*T + * * U has equal or more limbs than V, and V has no padding + * If we set U to be (a padded version of) a, and V = m: + * G = a*S + m*T + * G = a*S mod m + * Assuming G=1: + * S = 1/a mod m + */ + VERIFY_CHECK(m->limbs <= NUM_LIMBS); + VERIFY_CHECK(m->data[m->limbs-1] != 0); + for (i = 0; i < m->limbs; i++) { + u[i] = (i < a->limbs) ? a->data[i] : 0; + v[i] = m->data[i]; + } + sn = NUM_LIMBS+1; + gn = mpn_gcdext(g, r->data, &sn, u, m->limbs, v, m->limbs); + (void)gn; + VERIFY_CHECK(gn == 1); + VERIFY_CHECK(g[0] == 1); + r->neg = a->neg ^ m->neg; + if (sn < 0) { + mpn_sub(r->data, m->data, m->limbs, r->data, -sn); + r->limbs = m->limbs; + while (r->limbs > 1 && r->data[r->limbs-1]==0) { + r->limbs--; + } + } else { + r->limbs = sn; + } + memset(g, 0, sizeof(g)); + memset(u, 0, sizeof(u)); + memset(v, 0, sizeof(v)); +} + +static int secp256k1_num_jacobi(const secp256k1_num *a, const secp256k1_num *b) { + int ret; + mpz_t ga, gb; + secp256k1_num_sanity(a); + secp256k1_num_sanity(b); + VERIFY_CHECK(!b->neg && (b->limbs > 0) && (b->data[0] & 1)); + + mpz_inits(ga, gb, NULL); + + mpz_import(gb, b->limbs, -1, sizeof(mp_limb_t), 0, 0, b->data); + mpz_import(ga, a->limbs, -1, sizeof(mp_limb_t), 0, 0, a->data); + if (a->neg) { + mpz_neg(ga, ga); + } + + ret = mpz_jacobi(ga, gb); + + mpz_clears(ga, gb, NULL); + + return ret; +} + +static int secp256k1_num_is_one(const secp256k1_num *a) { + return (a->limbs == 1 && a->data[0] == 1); +} + +static int secp256k1_num_is_zero(const secp256k1_num *a) { + return (a->limbs == 1 && a->data[0] == 0); +} + +static int secp256k1_num_is_neg(const secp256k1_num *a) { + return (a->limbs > 1 || a->data[0] != 0) && a->neg; +} + +static int secp256k1_num_cmp(const secp256k1_num *a, const secp256k1_num *b) { + if (a->limbs > b->limbs) { + return 1; + } + if (a->limbs < b->limbs) { + return -1; + } + return mpn_cmp(a->data, b->data, a->limbs); +} + +static int secp256k1_num_eq(const secp256k1_num *a, const secp256k1_num *b) { + if (a->limbs > b->limbs) { + return 0; + } + if (a->limbs < b->limbs) { + return 0; + } + if ((a->neg && !secp256k1_num_is_zero(a)) != (b->neg && !secp256k1_num_is_zero(b))) { + return 0; + } + return mpn_cmp(a->data, b->data, a->limbs) == 0; +} + +static void secp256k1_num_subadd(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b, int bneg) { + if (!(b->neg ^ bneg ^ a->neg)) { /* a and b have the same sign */ + r->neg = a->neg; + if (a->limbs >= b->limbs) { + secp256k1_num_add_abs(r, a, b); + } else { + secp256k1_num_add_abs(r, b, a); + } + } else { + if (secp256k1_num_cmp(a, b) > 0) { + r->neg = a->neg; + secp256k1_num_sub_abs(r, a, b); + } else { + r->neg = b->neg ^ bneg; + secp256k1_num_sub_abs(r, b, a); + } + } +} + +static void secp256k1_num_add(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) { + secp256k1_num_sanity(a); + secp256k1_num_sanity(b); + secp256k1_num_subadd(r, a, b, 0); +} + +static void secp256k1_num_sub(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) { + secp256k1_num_sanity(a); + secp256k1_num_sanity(b); + secp256k1_num_subadd(r, a, b, 1); +} + +static void secp256k1_num_mul(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) { + mp_limb_t tmp[2*NUM_LIMBS+1]; + secp256k1_num_sanity(a); + secp256k1_num_sanity(b); + + VERIFY_CHECK(a->limbs + b->limbs <= 2*NUM_LIMBS+1); + if ((a->limbs==1 && a->data[0]==0) || (b->limbs==1 && b->data[0]==0)) { + r->limbs = 1; + r->neg = 0; + r->data[0] = 0; + return; + } + if (a->limbs >= b->limbs) { + mpn_mul(tmp, a->data, a->limbs, b->data, b->limbs); + } else { + mpn_mul(tmp, b->data, b->limbs, a->data, a->limbs); + } + r->limbs = a->limbs + b->limbs; + if (r->limbs > 1 && tmp[r->limbs - 1]==0) { + r->limbs--; + } + VERIFY_CHECK(r->limbs <= 2*NUM_LIMBS); + mpn_copyi(r->data, tmp, r->limbs); + r->neg = a->neg ^ b->neg; + memset(tmp, 0, sizeof(tmp)); +} + +static void secp256k1_num_shift(secp256k1_num *r, int bits) { + if (bits % GMP_NUMB_BITS) { + /* Shift within limbs. */ + mpn_rshift(r->data, r->data, r->limbs, bits % GMP_NUMB_BITS); + } + if (bits >= GMP_NUMB_BITS) { + int i; + /* Shift full limbs. */ + for (i = 0; i < r->limbs; i++) { + int index = i + (bits / GMP_NUMB_BITS); + if (index < r->limbs && index < 2*NUM_LIMBS) { + r->data[i] = r->data[index]; + } else { + r->data[i] = 0; + } + } + } + while (r->limbs>1 && r->data[r->limbs-1]==0) { + r->limbs--; + } +} + +static void secp256k1_num_negate(secp256k1_num *r) { + r->neg ^= 1; +} + +#endif /* SECP256K1_NUM_REPR_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num_impl.h new file mode 100644 index 000000000..c45193b03 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/num_impl.h @@ -0,0 +1,24 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_NUM_IMPL_H +#define SECP256K1_NUM_IMPL_H + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#include "num.h" + +#if defined(USE_NUM_GMP) +#include "num_gmp_impl.h" +#elif defined(USE_NUM_NONE) +/* Nothing. */ +#else +#error "Please select num implementation" +#endif + +#endif /* SECP256K1_NUM_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar.h new file mode 100644 index 000000000..59304cb66 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar.h @@ -0,0 +1,106 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_SCALAR_H +#define SECP256K1_SCALAR_H + +#include "num.h" + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#if defined(EXHAUSTIVE_TEST_ORDER) +#include "scalar_low.h" +#elif defined(USE_SCALAR_4X64) +#include "scalar_4x64.h" +#elif defined(USE_SCALAR_8X32) +#include "scalar_8x32.h" +#else +#error "Please select scalar implementation" +#endif + +/** Clear a scalar to prevent the leak of sensitive data. */ +static void secp256k1_scalar_clear(secp256k1_scalar *r); + +/** Access bits from a scalar. All requested bits must belong to the same 32-bit limb. */ +static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar *a, unsigned int offset, unsigned int count); + +/** Access bits from a scalar. Not constant time. */ +static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar *a, unsigned int offset, unsigned int count); + +/** Set a scalar from a big endian byte array. */ +static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *bin, int *overflow); + +/** Set a scalar to an unsigned integer. */ +static void secp256k1_scalar_set_int(secp256k1_scalar *r, unsigned int v); + +/** Convert a scalar to a byte array. */ +static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar* a); + +/** Add two scalars together (modulo the group order). Returns whether it overflowed. */ +static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b); + +/** Conditionally add a power of two to a scalar. The result is not allowed to overflow. */ +static void secp256k1_scalar_cadd_bit(secp256k1_scalar *r, unsigned int bit, int flag); + +/** Multiply two scalars (modulo the group order). */ +static void secp256k1_scalar_mul(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b); + +/** Shift a scalar right by some amount strictly between 0 and 16, returning + * the low bits that were shifted off */ +static int secp256k1_scalar_shr_int(secp256k1_scalar *r, int n); + +/** Compute the square of a scalar (modulo the group order). */ +static void secp256k1_scalar_sqr(secp256k1_scalar *r, const secp256k1_scalar *a); + +/** Compute the inverse of a scalar (modulo the group order). */ +static void secp256k1_scalar_inverse(secp256k1_scalar *r, const secp256k1_scalar *a); + +/** Compute the inverse of a scalar (modulo the group order), without constant-time guarantee. */ +static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_scalar *a); + +/** Compute the complement of a scalar (modulo the group order). */ +static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a); + +/** Check whether a scalar equals zero. */ +static int secp256k1_scalar_is_zero(const secp256k1_scalar *a); + +/** Check whether a scalar equals one. */ +static int secp256k1_scalar_is_one(const secp256k1_scalar *a); + +/** Check whether a scalar, considered as an nonnegative integer, is even. */ +static int secp256k1_scalar_is_even(const secp256k1_scalar *a); + +/** Check whether a scalar is higher than the group order divided by 2. */ +static int secp256k1_scalar_is_high(const secp256k1_scalar *a); + +/** Conditionally negate a number, in constant time. + * Returns -1 if the number was negated, 1 otherwise */ +static int secp256k1_scalar_cond_negate(secp256k1_scalar *a, int flag); + +#ifndef USE_NUM_NONE +/** Convert a scalar to a number. */ +static void secp256k1_scalar_get_num(secp256k1_num *r, const secp256k1_scalar *a); + +/** Get the order of the group as a number. */ +static void secp256k1_scalar_order_get_num(secp256k1_num *r); +#endif + +/** Compare two scalars. */ +static int secp256k1_scalar_eq(const secp256k1_scalar *a, const secp256k1_scalar *b); + +#ifdef USE_ENDOMORPHISM +/** Find r1 and r2 such that r1+r2*2^128 = a. */ +static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a); +/** Find r1 and r2 such that r1+r2*lambda = a, and r1 and r2 are maximum 128 bits long (see secp256k1_gej_mul_lambda). */ +static void secp256k1_scalar_split_lambda(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a); +#endif + +/** Multiply a and b (without taking the modulus!), divide by 2**shift, and round to the nearest integer. Shift must be at least 256. */ +static void secp256k1_scalar_mul_shift_var(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b, unsigned int shift); + +#endif /* SECP256K1_SCALAR_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_4x64.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_4x64.h new file mode 100644 index 000000000..19c7495d1 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_4x64.h @@ -0,0 +1,19 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_SCALAR_REPR_H +#define SECP256K1_SCALAR_REPR_H + +#include + +/** A scalar modulo the group order of the secp256k1 curve. */ +typedef struct { + uint64_t d[4]; +} secp256k1_scalar; + +#define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{((uint64_t)(d1)) << 32 | (d0), ((uint64_t)(d3)) << 32 | (d2), ((uint64_t)(d5)) << 32 | (d4), ((uint64_t)(d7)) << 32 | (d6)}} + +#endif /* SECP256K1_SCALAR_REPR_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_4x64_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_4x64_impl.h new file mode 100644 index 000000000..db1ebf94b --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_4x64_impl.h @@ -0,0 +1,949 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_SCALAR_REPR_IMPL_H +#define SECP256K1_SCALAR_REPR_IMPL_H + +/* Limbs of the secp256k1 order. */ +#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL) +#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL) +#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL) +#define SECP256K1_N_3 ((uint64_t)0xFFFFFFFFFFFFFFFFULL) + +/* Limbs of 2^256 minus the secp256k1 order. */ +#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1) +#define SECP256K1_N_C_1 (~SECP256K1_N_1) +#define SECP256K1_N_C_2 (1) + +/* Limbs of half the secp256k1 order. */ +#define SECP256K1_N_H_0 ((uint64_t)0xDFE92F46681B20A0ULL) +#define SECP256K1_N_H_1 ((uint64_t)0x5D576E7357A4501DULL) +#define SECP256K1_N_H_2 ((uint64_t)0xFFFFFFFFFFFFFFFFULL) +#define SECP256K1_N_H_3 ((uint64_t)0x7FFFFFFFFFFFFFFFULL) + +SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar *r) { + r->d[0] = 0; + r->d[1] = 0; + r->d[2] = 0; + r->d[3] = 0; +} + +SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar *r, unsigned int v) { + r->d[0] = v; + r->d[1] = 0; + r->d[2] = 0; + r->d[3] = 0; +} + +SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar *a, unsigned int offset, unsigned int count) { + VERIFY_CHECK((offset + count - 1) >> 6 == offset >> 6); + return (a->d[offset >> 6] >> (offset & 0x3F)) & ((((uint64_t)1) << count) - 1); +} + +SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar *a, unsigned int offset, unsigned int count) { + VERIFY_CHECK(count < 32); + VERIFY_CHECK(offset + count <= 256); + if ((offset + count - 1) >> 6 == offset >> 6) { + return secp256k1_scalar_get_bits(a, offset, count); + } else { + VERIFY_CHECK((offset >> 6) + 1 < 4); + return ((a->d[offset >> 6] >> (offset & 0x3F)) | (a->d[(offset >> 6) + 1] << (64 - (offset & 0x3F)))) & ((((uint64_t)1) << count) - 1); + } +} + +SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar *a) { + int yes = 0; + int no = 0; + no |= (a->d[3] < SECP256K1_N_3); /* No need for a > check. */ + no |= (a->d[2] < SECP256K1_N_2); + yes |= (a->d[2] > SECP256K1_N_2) & ~no; + no |= (a->d[1] < SECP256K1_N_1); + yes |= (a->d[1] > SECP256K1_N_1) & ~no; + yes |= (a->d[0] >= SECP256K1_N_0) & ~no; + return yes; +} + +SECP256K1_INLINE static int secp256k1_scalar_reduce(secp256k1_scalar *r, unsigned int overflow) { + uint128_t t; + VERIFY_CHECK(overflow <= 1); + t = (uint128_t)r->d[0] + overflow * SECP256K1_N_C_0; + r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)r->d[1] + overflow * SECP256K1_N_C_1; + r->d[1] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)r->d[2] + overflow * SECP256K1_N_C_2; + r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint64_t)r->d[3]; + r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL; + return overflow; +} + +static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) { + int overflow; + uint128_t t = (uint128_t)a->d[0] + b->d[0]; + r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)a->d[1] + b->d[1]; + r->d[1] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)a->d[2] + b->d[2]; + r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)a->d[3] + b->d[3]; + r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + overflow = t + secp256k1_scalar_check_overflow(r); + VERIFY_CHECK(overflow == 0 || overflow == 1); + secp256k1_scalar_reduce(r, overflow); + return overflow; +} + +static void secp256k1_scalar_cadd_bit(secp256k1_scalar *r, unsigned int bit, int flag) { + uint128_t t; + VERIFY_CHECK(bit < 256); + bit += ((uint32_t) flag - 1) & 0x100; /* forcing (bit >> 6) > 3 makes this a noop */ + t = (uint128_t)r->d[0] + (((uint64_t)((bit >> 6) == 0)) << (bit & 0x3F)); + r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)r->d[1] + (((uint64_t)((bit >> 6) == 1)) << (bit & 0x3F)); + r->d[1] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)r->d[2] + (((uint64_t)((bit >> 6) == 2)) << (bit & 0x3F)); + r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)r->d[3] + (((uint64_t)((bit >> 6) == 3)) << (bit & 0x3F)); + r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL; +#ifdef VERIFY + VERIFY_CHECK((t >> 64) == 0); + VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0); +#endif +} + +static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *b32, int *overflow) { + int over; + r->d[0] = (uint64_t)b32[31] | (uint64_t)b32[30] << 8 | (uint64_t)b32[29] << 16 | (uint64_t)b32[28] << 24 | (uint64_t)b32[27] << 32 | (uint64_t)b32[26] << 40 | (uint64_t)b32[25] << 48 | (uint64_t)b32[24] << 56; + r->d[1] = (uint64_t)b32[23] | (uint64_t)b32[22] << 8 | (uint64_t)b32[21] << 16 | (uint64_t)b32[20] << 24 | (uint64_t)b32[19] << 32 | (uint64_t)b32[18] << 40 | (uint64_t)b32[17] << 48 | (uint64_t)b32[16] << 56; + r->d[2] = (uint64_t)b32[15] | (uint64_t)b32[14] << 8 | (uint64_t)b32[13] << 16 | (uint64_t)b32[12] << 24 | (uint64_t)b32[11] << 32 | (uint64_t)b32[10] << 40 | (uint64_t)b32[9] << 48 | (uint64_t)b32[8] << 56; + r->d[3] = (uint64_t)b32[7] | (uint64_t)b32[6] << 8 | (uint64_t)b32[5] << 16 | (uint64_t)b32[4] << 24 | (uint64_t)b32[3] << 32 | (uint64_t)b32[2] << 40 | (uint64_t)b32[1] << 48 | (uint64_t)b32[0] << 56; + over = secp256k1_scalar_reduce(r, secp256k1_scalar_check_overflow(r)); + if (overflow) { + *overflow = over; + } +} + +static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar* a) { + bin[0] = a->d[3] >> 56; bin[1] = a->d[3] >> 48; bin[2] = a->d[3] >> 40; bin[3] = a->d[3] >> 32; bin[4] = a->d[3] >> 24; bin[5] = a->d[3] >> 16; bin[6] = a->d[3] >> 8; bin[7] = a->d[3]; + bin[8] = a->d[2] >> 56; bin[9] = a->d[2] >> 48; bin[10] = a->d[2] >> 40; bin[11] = a->d[2] >> 32; bin[12] = a->d[2] >> 24; bin[13] = a->d[2] >> 16; bin[14] = a->d[2] >> 8; bin[15] = a->d[2]; + bin[16] = a->d[1] >> 56; bin[17] = a->d[1] >> 48; bin[18] = a->d[1] >> 40; bin[19] = a->d[1] >> 32; bin[20] = a->d[1] >> 24; bin[21] = a->d[1] >> 16; bin[22] = a->d[1] >> 8; bin[23] = a->d[1]; + bin[24] = a->d[0] >> 56; bin[25] = a->d[0] >> 48; bin[26] = a->d[0] >> 40; bin[27] = a->d[0] >> 32; bin[28] = a->d[0] >> 24; bin[29] = a->d[0] >> 16; bin[30] = a->d[0] >> 8; bin[31] = a->d[0]; +} + +SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar *a) { + return (a->d[0] | a->d[1] | a->d[2] | a->d[3]) == 0; +} + +static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a) { + uint64_t nonzero = 0xFFFFFFFFFFFFFFFFULL * (secp256k1_scalar_is_zero(a) == 0); + uint128_t t = (uint128_t)(~a->d[0]) + SECP256K1_N_0 + 1; + r->d[0] = t & nonzero; t >>= 64; + t += (uint128_t)(~a->d[1]) + SECP256K1_N_1; + r->d[1] = t & nonzero; t >>= 64; + t += (uint128_t)(~a->d[2]) + SECP256K1_N_2; + r->d[2] = t & nonzero; t >>= 64; + t += (uint128_t)(~a->d[3]) + SECP256K1_N_3; + r->d[3] = t & nonzero; +} + +SECP256K1_INLINE static int secp256k1_scalar_is_one(const secp256k1_scalar *a) { + return ((a->d[0] ^ 1) | a->d[1] | a->d[2] | a->d[3]) == 0; +} + +static int secp256k1_scalar_is_high(const secp256k1_scalar *a) { + int yes = 0; + int no = 0; + no |= (a->d[3] < SECP256K1_N_H_3); + yes |= (a->d[3] > SECP256K1_N_H_3) & ~no; + no |= (a->d[2] < SECP256K1_N_H_2) & ~yes; /* No need for a > check. */ + no |= (a->d[1] < SECP256K1_N_H_1) & ~yes; + yes |= (a->d[1] > SECP256K1_N_H_1) & ~no; + yes |= (a->d[0] > SECP256K1_N_H_0) & ~no; + return yes; +} + +static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) { + /* If we are flag = 0, mask = 00...00 and this is a no-op; + * if we are flag = 1, mask = 11...11 and this is identical to secp256k1_scalar_negate */ + uint64_t mask = !flag - 1; + uint64_t nonzero = (secp256k1_scalar_is_zero(r) != 0) - 1; + uint128_t t = (uint128_t)(r->d[0] ^ mask) + ((SECP256K1_N_0 + 1) & mask); + r->d[0] = t & nonzero; t >>= 64; + t += (uint128_t)(r->d[1] ^ mask) + (SECP256K1_N_1 & mask); + r->d[1] = t & nonzero; t >>= 64; + t += (uint128_t)(r->d[2] ^ mask) + (SECP256K1_N_2 & mask); + r->d[2] = t & nonzero; t >>= 64; + t += (uint128_t)(r->d[3] ^ mask) + (SECP256K1_N_3 & mask); + r->d[3] = t & nonzero; + return 2 * (mask == 0) - 1; +} + +/* Inspired by the macros in OpenSSL's crypto/bn/asm/x86_64-gcc.c. */ + +/** Add a*b to the number defined by (c0,c1,c2). c2 must never overflow. */ +#define muladd(a,b) { \ + uint64_t tl, th; \ + { \ + uint128_t t = (uint128_t)a * b; \ + th = t >> 64; /* at most 0xFFFFFFFFFFFFFFFE */ \ + tl = t; \ + } \ + c0 += tl; /* overflow is handled on the next line */ \ + th += (c0 < tl) ? 1 : 0; /* at most 0xFFFFFFFFFFFFFFFF */ \ + c1 += th; /* overflow is handled on the next line */ \ + c2 += (c1 < th) ? 1 : 0; /* never overflows by contract (verified in the next line) */ \ + VERIFY_CHECK((c1 >= th) || (c2 != 0)); \ +} + +/** Add a*b to the number defined by (c0,c1). c1 must never overflow. */ +#define muladd_fast(a,b) { \ + uint64_t tl, th; \ + { \ + uint128_t t = (uint128_t)a * b; \ + th = t >> 64; /* at most 0xFFFFFFFFFFFFFFFE */ \ + tl = t; \ + } \ + c0 += tl; /* overflow is handled on the next line */ \ + th += (c0 < tl) ? 1 : 0; /* at most 0xFFFFFFFFFFFFFFFF */ \ + c1 += th; /* never overflows by contract (verified in the next line) */ \ + VERIFY_CHECK(c1 >= th); \ +} + +/** Add 2*a*b to the number defined by (c0,c1,c2). c2 must never overflow. */ +#define muladd2(a,b) { \ + uint64_t tl, th, th2, tl2; \ + { \ + uint128_t t = (uint128_t)a * b; \ + th = t >> 64; /* at most 0xFFFFFFFFFFFFFFFE */ \ + tl = t; \ + } \ + th2 = th + th; /* at most 0xFFFFFFFFFFFFFFFE (in case th was 0x7FFFFFFFFFFFFFFF) */ \ + c2 += (th2 < th) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((th2 >= th) || (c2 != 0)); \ + tl2 = tl + tl; /* at most 0xFFFFFFFFFFFFFFFE (in case the lowest 63 bits of tl were 0x7FFFFFFFFFFFFFFF) */ \ + th2 += (tl2 < tl) ? 1 : 0; /* at most 0xFFFFFFFFFFFFFFFF */ \ + c0 += tl2; /* overflow is handled on the next line */ \ + th2 += (c0 < tl2) ? 1 : 0; /* second overflow is handled on the next line */ \ + c2 += (c0 < tl2) & (th2 == 0); /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((c0 >= tl2) || (th2 != 0) || (c2 != 0)); \ + c1 += th2; /* overflow is handled on the next line */ \ + c2 += (c1 < th2) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((c1 >= th2) || (c2 != 0)); \ +} + +/** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */ +#define sumadd(a) { \ + unsigned int over; \ + c0 += (a); /* overflow is handled on the next line */ \ + over = (c0 < (a)) ? 1 : 0; \ + c1 += over; /* overflow is handled on the next line */ \ + c2 += (c1 < over) ? 1 : 0; /* never overflows by contract */ \ +} + +/** Add a to the number defined by (c0,c1). c1 must never overflow, c2 must be zero. */ +#define sumadd_fast(a) { \ + c0 += (a); /* overflow is handled on the next line */ \ + c1 += (c0 < (a)) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((c1 != 0) | (c0 >= (a))); \ + VERIFY_CHECK(c2 == 0); \ +} + +/** Extract the lowest 64 bits of (c0,c1,c2) into n, and left shift the number 64 bits. */ +#define extract(n) { \ + (n) = c0; \ + c0 = c1; \ + c1 = c2; \ + c2 = 0; \ +} + +/** Extract the lowest 64 bits of (c0,c1,c2) into n, and left shift the number 64 bits. c2 is required to be zero. */ +#define extract_fast(n) { \ + (n) = c0; \ + c0 = c1; \ + c1 = 0; \ + VERIFY_CHECK(c2 == 0); \ +} + +static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) { +#ifdef USE_ASM_X86_64 + /* Reduce 512 bits into 385. */ + uint64_t m0, m1, m2, m3, m4, m5, m6; + uint64_t p0, p1, p2, p3, p4; + uint64_t c; + + __asm__ __volatile__( + /* Preload. */ + "movq 32(%%rsi), %%r11\n" + "movq 40(%%rsi), %%r12\n" + "movq 48(%%rsi), %%r13\n" + "movq 56(%%rsi), %%r14\n" + /* Initialize r8,r9,r10 */ + "movq 0(%%rsi), %%r8\n" + "xorq %%r9, %%r9\n" + "xorq %%r10, %%r10\n" + /* (r8,r9) += n0 * c0 */ + "movq %8, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + /* extract m0 */ + "movq %%r8, %q0\n" + "xorq %%r8, %%r8\n" + /* (r9,r10) += l1 */ + "addq 8(%%rsi), %%r9\n" + "adcq $0, %%r10\n" + /* (r9,r10,r8) += n1 * c0 */ + "movq %8, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += n0 * c1 */ + "movq %9, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* extract m1 */ + "movq %%r9, %q1\n" + "xorq %%r9, %%r9\n" + /* (r10,r8,r9) += l2 */ + "addq 16(%%rsi), %%r10\n" + "adcq $0, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += n2 * c0 */ + "movq %8, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += n1 * c1 */ + "movq %9, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += n0 */ + "addq %%r11, %%r10\n" + "adcq $0, %%r8\n" + "adcq $0, %%r9\n" + /* extract m2 */ + "movq %%r10, %q2\n" + "xorq %%r10, %%r10\n" + /* (r8,r9,r10) += l3 */ + "addq 24(%%rsi), %%r8\n" + "adcq $0, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += n3 * c0 */ + "movq %8, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += n2 * c1 */ + "movq %9, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += n1 */ + "addq %%r12, %%r8\n" + "adcq $0, %%r9\n" + "adcq $0, %%r10\n" + /* extract m3 */ + "movq %%r8, %q3\n" + "xorq %%r8, %%r8\n" + /* (r9,r10,r8) += n3 * c1 */ + "movq %9, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += n2 */ + "addq %%r13, %%r9\n" + "adcq $0, %%r10\n" + "adcq $0, %%r8\n" + /* extract m4 */ + "movq %%r9, %q4\n" + /* (r10,r8) += n3 */ + "addq %%r14, %%r10\n" + "adcq $0, %%r8\n" + /* extract m5 */ + "movq %%r10, %q5\n" + /* extract m6 */ + "movq %%r8, %q6\n" + : "=g"(m0), "=g"(m1), "=g"(m2), "=g"(m3), "=g"(m4), "=g"(m5), "=g"(m6) + : "S"(l), "n"(SECP256K1_N_C_0), "n"(SECP256K1_N_C_1) + : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "cc"); + + /* Reduce 385 bits into 258. */ + __asm__ __volatile__( + /* Preload */ + "movq %q9, %%r11\n" + "movq %q10, %%r12\n" + "movq %q11, %%r13\n" + /* Initialize (r8,r9,r10) */ + "movq %q5, %%r8\n" + "xorq %%r9, %%r9\n" + "xorq %%r10, %%r10\n" + /* (r8,r9) += m4 * c0 */ + "movq %12, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + /* extract p0 */ + "movq %%r8, %q0\n" + "xorq %%r8, %%r8\n" + /* (r9,r10) += m1 */ + "addq %q6, %%r9\n" + "adcq $0, %%r10\n" + /* (r9,r10,r8) += m5 * c0 */ + "movq %12, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += m4 * c1 */ + "movq %13, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* extract p1 */ + "movq %%r9, %q1\n" + "xorq %%r9, %%r9\n" + /* (r10,r8,r9) += m2 */ + "addq %q7, %%r10\n" + "adcq $0, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += m6 * c0 */ + "movq %12, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += m5 * c1 */ + "movq %13, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += m4 */ + "addq %%r11, %%r10\n" + "adcq $0, %%r8\n" + "adcq $0, %%r9\n" + /* extract p2 */ + "movq %%r10, %q2\n" + /* (r8,r9) += m3 */ + "addq %q8, %%r8\n" + "adcq $0, %%r9\n" + /* (r8,r9) += m6 * c1 */ + "movq %13, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + /* (r8,r9) += m5 */ + "addq %%r12, %%r8\n" + "adcq $0, %%r9\n" + /* extract p3 */ + "movq %%r8, %q3\n" + /* (r9) += m6 */ + "addq %%r13, %%r9\n" + /* extract p4 */ + "movq %%r9, %q4\n" + : "=&g"(p0), "=&g"(p1), "=&g"(p2), "=g"(p3), "=g"(p4) + : "g"(m0), "g"(m1), "g"(m2), "g"(m3), "g"(m4), "g"(m5), "g"(m6), "n"(SECP256K1_N_C_0), "n"(SECP256K1_N_C_1) + : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "cc"); + + /* Reduce 258 bits into 256. */ + __asm__ __volatile__( + /* Preload */ + "movq %q5, %%r10\n" + /* (rax,rdx) = p4 * c0 */ + "movq %7, %%rax\n" + "mulq %%r10\n" + /* (rax,rdx) += p0 */ + "addq %q1, %%rax\n" + "adcq $0, %%rdx\n" + /* extract r0 */ + "movq %%rax, 0(%q6)\n" + /* Move to (r8,r9) */ + "movq %%rdx, %%r8\n" + "xorq %%r9, %%r9\n" + /* (r8,r9) += p1 */ + "addq %q2, %%r8\n" + "adcq $0, %%r9\n" + /* (r8,r9) += p4 * c1 */ + "movq %8, %%rax\n" + "mulq %%r10\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + /* Extract r1 */ + "movq %%r8, 8(%q6)\n" + "xorq %%r8, %%r8\n" + /* (r9,r8) += p4 */ + "addq %%r10, %%r9\n" + "adcq $0, %%r8\n" + /* (r9,r8) += p2 */ + "addq %q3, %%r9\n" + "adcq $0, %%r8\n" + /* Extract r2 */ + "movq %%r9, 16(%q6)\n" + "xorq %%r9, %%r9\n" + /* (r8,r9) += p3 */ + "addq %q4, %%r8\n" + "adcq $0, %%r9\n" + /* Extract r3 */ + "movq %%r8, 24(%q6)\n" + /* Extract c */ + "movq %%r9, %q0\n" + : "=g"(c) + : "g"(p0), "g"(p1), "g"(p2), "g"(p3), "g"(p4), "D"(r), "n"(SECP256K1_N_C_0), "n"(SECP256K1_N_C_1) + : "rax", "rdx", "r8", "r9", "r10", "cc", "memory"); +#else + uint128_t c; + uint64_t c0, c1, c2; + uint64_t n0 = l[4], n1 = l[5], n2 = l[6], n3 = l[7]; + uint64_t m0, m1, m2, m3, m4, m5; + uint32_t m6; + uint64_t p0, p1, p2, p3; + uint32_t p4; + + /* Reduce 512 bits into 385. */ + /* m[0..6] = l[0..3] + n[0..3] * SECP256K1_N_C. */ + c0 = l[0]; c1 = 0; c2 = 0; + muladd_fast(n0, SECP256K1_N_C_0); + extract_fast(m0); + sumadd_fast(l[1]); + muladd(n1, SECP256K1_N_C_0); + muladd(n0, SECP256K1_N_C_1); + extract(m1); + sumadd(l[2]); + muladd(n2, SECP256K1_N_C_0); + muladd(n1, SECP256K1_N_C_1); + sumadd(n0); + extract(m2); + sumadd(l[3]); + muladd(n3, SECP256K1_N_C_0); + muladd(n2, SECP256K1_N_C_1); + sumadd(n1); + extract(m3); + muladd(n3, SECP256K1_N_C_1); + sumadd(n2); + extract(m4); + sumadd_fast(n3); + extract_fast(m5); + VERIFY_CHECK(c0 <= 1); + m6 = c0; + + /* Reduce 385 bits into 258. */ + /* p[0..4] = m[0..3] + m[4..6] * SECP256K1_N_C. */ + c0 = m0; c1 = 0; c2 = 0; + muladd_fast(m4, SECP256K1_N_C_0); + extract_fast(p0); + sumadd_fast(m1); + muladd(m5, SECP256K1_N_C_0); + muladd(m4, SECP256K1_N_C_1); + extract(p1); + sumadd(m2); + muladd(m6, SECP256K1_N_C_0); + muladd(m5, SECP256K1_N_C_1); + sumadd(m4); + extract(p2); + sumadd_fast(m3); + muladd_fast(m6, SECP256K1_N_C_1); + sumadd_fast(m5); + extract_fast(p3); + p4 = c0 + m6; + VERIFY_CHECK(p4 <= 2); + + /* Reduce 258 bits into 256. */ + /* r[0..3] = p[0..3] + p[4] * SECP256K1_N_C. */ + c = p0 + (uint128_t)SECP256K1_N_C_0 * p4; + r->d[0] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64; + c += p1 + (uint128_t)SECP256K1_N_C_1 * p4; + r->d[1] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64; + c += p2 + (uint128_t)p4; + r->d[2] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64; + c += p3; + r->d[3] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64; +#endif + + /* Final reduction of r. */ + secp256k1_scalar_reduce(r, c + secp256k1_scalar_check_overflow(r)); +} + +static void secp256k1_scalar_mul_512(uint64_t l[8], const secp256k1_scalar *a, const secp256k1_scalar *b) { +#ifdef USE_ASM_X86_64 + const uint64_t *pb = b->d; + __asm__ __volatile__( + /* Preload */ + "movq 0(%%rdi), %%r15\n" + "movq 8(%%rdi), %%rbx\n" + "movq 16(%%rdi), %%rcx\n" + "movq 0(%%rdx), %%r11\n" + "movq 8(%%rdx), %%r12\n" + "movq 16(%%rdx), %%r13\n" + "movq 24(%%rdx), %%r14\n" + /* (rax,rdx) = a0 * b0 */ + "movq %%r15, %%rax\n" + "mulq %%r11\n" + /* Extract l0 */ + "movq %%rax, 0(%%rsi)\n" + /* (r8,r9,r10) = (rdx) */ + "movq %%rdx, %%r8\n" + "xorq %%r9, %%r9\n" + "xorq %%r10, %%r10\n" + /* (r8,r9,r10) += a0 * b1 */ + "movq %%r15, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += a1 * b0 */ + "movq %%rbx, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* Extract l1 */ + "movq %%r8, 8(%%rsi)\n" + "xorq %%r8, %%r8\n" + /* (r9,r10,r8) += a0 * b2 */ + "movq %%r15, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += a1 * b1 */ + "movq %%rbx, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += a2 * b0 */ + "movq %%rcx, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* Extract l2 */ + "movq %%r9, 16(%%rsi)\n" + "xorq %%r9, %%r9\n" + /* (r10,r8,r9) += a0 * b3 */ + "movq %%r15, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* Preload a3 */ + "movq 24(%%rdi), %%r15\n" + /* (r10,r8,r9) += a1 * b2 */ + "movq %%rbx, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += a2 * b1 */ + "movq %%rcx, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += a3 * b0 */ + "movq %%r15, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* Extract l3 */ + "movq %%r10, 24(%%rsi)\n" + "xorq %%r10, %%r10\n" + /* (r8,r9,r10) += a1 * b3 */ + "movq %%rbx, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += a2 * b2 */ + "movq %%rcx, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += a3 * b1 */ + "movq %%r15, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* Extract l4 */ + "movq %%r8, 32(%%rsi)\n" + "xorq %%r8, %%r8\n" + /* (r9,r10,r8) += a2 * b3 */ + "movq %%rcx, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += a3 * b2 */ + "movq %%r15, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* Extract l5 */ + "movq %%r9, 40(%%rsi)\n" + /* (r10,r8) += a3 * b3 */ + "movq %%r15, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + /* Extract l6 */ + "movq %%r10, 48(%%rsi)\n" + /* Extract l7 */ + "movq %%r8, 56(%%rsi)\n" + : "+d"(pb) + : "S"(l), "D"(a->d) + : "rax", "rbx", "rcx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "cc", "memory"); +#else + /* 160 bit accumulator. */ + uint64_t c0 = 0, c1 = 0; + uint32_t c2 = 0; + + /* l[0..7] = a[0..3] * b[0..3]. */ + muladd_fast(a->d[0], b->d[0]); + extract_fast(l[0]); + muladd(a->d[0], b->d[1]); + muladd(a->d[1], b->d[0]); + extract(l[1]); + muladd(a->d[0], b->d[2]); + muladd(a->d[1], b->d[1]); + muladd(a->d[2], b->d[0]); + extract(l[2]); + muladd(a->d[0], b->d[3]); + muladd(a->d[1], b->d[2]); + muladd(a->d[2], b->d[1]); + muladd(a->d[3], b->d[0]); + extract(l[3]); + muladd(a->d[1], b->d[3]); + muladd(a->d[2], b->d[2]); + muladd(a->d[3], b->d[1]); + extract(l[4]); + muladd(a->d[2], b->d[3]); + muladd(a->d[3], b->d[2]); + extract(l[5]); + muladd_fast(a->d[3], b->d[3]); + extract_fast(l[6]); + VERIFY_CHECK(c1 == 0); + l[7] = c0; +#endif +} + +static void secp256k1_scalar_sqr_512(uint64_t l[8], const secp256k1_scalar *a) { +#ifdef USE_ASM_X86_64 + __asm__ __volatile__( + /* Preload */ + "movq 0(%%rdi), %%r11\n" + "movq 8(%%rdi), %%r12\n" + "movq 16(%%rdi), %%r13\n" + "movq 24(%%rdi), %%r14\n" + /* (rax,rdx) = a0 * a0 */ + "movq %%r11, %%rax\n" + "mulq %%r11\n" + /* Extract l0 */ + "movq %%rax, 0(%%rsi)\n" + /* (r8,r9,r10) = (rdx,0) */ + "movq %%rdx, %%r8\n" + "xorq %%r9, %%r9\n" + "xorq %%r10, %%r10\n" + /* (r8,r9,r10) += 2 * a0 * a1 */ + "movq %%r11, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* Extract l1 */ + "movq %%r8, 8(%%rsi)\n" + "xorq %%r8, %%r8\n" + /* (r9,r10,r8) += 2 * a0 * a2 */ + "movq %%r11, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += a1 * a1 */ + "movq %%r12, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* Extract l2 */ + "movq %%r9, 16(%%rsi)\n" + "xorq %%r9, %%r9\n" + /* (r10,r8,r9) += 2 * a0 * a3 */ + "movq %%r11, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += 2 * a1 * a2 */ + "movq %%r12, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* Extract l3 */ + "movq %%r10, 24(%%rsi)\n" + "xorq %%r10, %%r10\n" + /* (r8,r9,r10) += 2 * a1 * a3 */ + "movq %%r12, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += a2 * a2 */ + "movq %%r13, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* Extract l4 */ + "movq %%r8, 32(%%rsi)\n" + "xorq %%r8, %%r8\n" + /* (r9,r10,r8) += 2 * a2 * a3 */ + "movq %%r13, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* Extract l5 */ + "movq %%r9, 40(%%rsi)\n" + /* (r10,r8) += a3 * a3 */ + "movq %%r14, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + /* Extract l6 */ + "movq %%r10, 48(%%rsi)\n" + /* Extract l7 */ + "movq %%r8, 56(%%rsi)\n" + : + : "S"(l), "D"(a->d) + : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "cc", "memory"); +#else + /* 160 bit accumulator. */ + uint64_t c0 = 0, c1 = 0; + uint32_t c2 = 0; + + /* l[0..7] = a[0..3] * b[0..3]. */ + muladd_fast(a->d[0], a->d[0]); + extract_fast(l[0]); + muladd2(a->d[0], a->d[1]); + extract(l[1]); + muladd2(a->d[0], a->d[2]); + muladd(a->d[1], a->d[1]); + extract(l[2]); + muladd2(a->d[0], a->d[3]); + muladd2(a->d[1], a->d[2]); + extract(l[3]); + muladd2(a->d[1], a->d[3]); + muladd(a->d[2], a->d[2]); + extract(l[4]); + muladd2(a->d[2], a->d[3]); + extract(l[5]); + muladd_fast(a->d[3], a->d[3]); + extract_fast(l[6]); + VERIFY_CHECK(c1 == 0); + l[7] = c0; +#endif +} + +#undef sumadd +#undef sumadd_fast +#undef muladd +#undef muladd_fast +#undef muladd2 +#undef extract +#undef extract_fast + +static void secp256k1_scalar_mul(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) { + uint64_t l[8]; + secp256k1_scalar_mul_512(l, a, b); + secp256k1_scalar_reduce_512(r, l); +} + +static int secp256k1_scalar_shr_int(secp256k1_scalar *r, int n) { + int ret; + VERIFY_CHECK(n > 0); + VERIFY_CHECK(n < 16); + ret = r->d[0] & ((1 << n) - 1); + r->d[0] = (r->d[0] >> n) + (r->d[1] << (64 - n)); + r->d[1] = (r->d[1] >> n) + (r->d[2] << (64 - n)); + r->d[2] = (r->d[2] >> n) + (r->d[3] << (64 - n)); + r->d[3] = (r->d[3] >> n); + return ret; +} + +static void secp256k1_scalar_sqr(secp256k1_scalar *r, const secp256k1_scalar *a) { + uint64_t l[8]; + secp256k1_scalar_sqr_512(l, a); + secp256k1_scalar_reduce_512(r, l); +} + +#ifdef USE_ENDOMORPHISM +static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) { + r1->d[0] = a->d[0]; + r1->d[1] = a->d[1]; + r1->d[2] = 0; + r1->d[3] = 0; + r2->d[0] = a->d[2]; + r2->d[1] = a->d[3]; + r2->d[2] = 0; + r2->d[3] = 0; +} +#endif + +SECP256K1_INLINE static int secp256k1_scalar_eq(const secp256k1_scalar *a, const secp256k1_scalar *b) { + return ((a->d[0] ^ b->d[0]) | (a->d[1] ^ b->d[1]) | (a->d[2] ^ b->d[2]) | (a->d[3] ^ b->d[3])) == 0; +} + +SECP256K1_INLINE static void secp256k1_scalar_mul_shift_var(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b, unsigned int shift) { + uint64_t l[8]; + unsigned int shiftlimbs; + unsigned int shiftlow; + unsigned int shifthigh; + VERIFY_CHECK(shift >= 256); + secp256k1_scalar_mul_512(l, a, b); + shiftlimbs = shift >> 6; + shiftlow = shift & 0x3F; + shifthigh = 64 - shiftlow; + r->d[0] = shift < 512 ? (l[0 + shiftlimbs] >> shiftlow | (shift < 448 && shiftlow ? (l[1 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[1] = shift < 448 ? (l[1 + shiftlimbs] >> shiftlow | (shift < 384 && shiftlow ? (l[2 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[2] = shift < 384 ? (l[2 + shiftlimbs] >> shiftlow | (shift < 320 && shiftlow ? (l[3 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[3] = shift < 320 ? (l[3 + shiftlimbs] >> shiftlow) : 0; + secp256k1_scalar_cadd_bit(r, 0, (l[(shift - 1) >> 6] >> ((shift - 1) & 0x3f)) & 1); +} + +#endif /* SECP256K1_SCALAR_REPR_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_8x32.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_8x32.h new file mode 100644 index 000000000..2c9a348e2 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_8x32.h @@ -0,0 +1,19 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_SCALAR_REPR_H +#define SECP256K1_SCALAR_REPR_H + +#include + +/** A scalar modulo the group order of the secp256k1 curve. */ +typedef struct { + uint32_t d[8]; +} secp256k1_scalar; + +#define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{(d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)}} + +#endif /* SECP256K1_SCALAR_REPR_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_8x32_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_8x32_impl.h new file mode 100644 index 000000000..4f9ed61fe --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_8x32_impl.h @@ -0,0 +1,721 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_SCALAR_REPR_IMPL_H +#define SECP256K1_SCALAR_REPR_IMPL_H + +/* Limbs of the secp256k1 order. */ +#define SECP256K1_N_0 ((uint32_t)0xD0364141UL) +#define SECP256K1_N_1 ((uint32_t)0xBFD25E8CUL) +#define SECP256K1_N_2 ((uint32_t)0xAF48A03BUL) +#define SECP256K1_N_3 ((uint32_t)0xBAAEDCE6UL) +#define SECP256K1_N_4 ((uint32_t)0xFFFFFFFEUL) +#define SECP256K1_N_5 ((uint32_t)0xFFFFFFFFUL) +#define SECP256K1_N_6 ((uint32_t)0xFFFFFFFFUL) +#define SECP256K1_N_7 ((uint32_t)0xFFFFFFFFUL) + +/* Limbs of 2^256 minus the secp256k1 order. */ +#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1) +#define SECP256K1_N_C_1 (~SECP256K1_N_1) +#define SECP256K1_N_C_2 (~SECP256K1_N_2) +#define SECP256K1_N_C_3 (~SECP256K1_N_3) +#define SECP256K1_N_C_4 (1) + +/* Limbs of half the secp256k1 order. */ +#define SECP256K1_N_H_0 ((uint32_t)0x681B20A0UL) +#define SECP256K1_N_H_1 ((uint32_t)0xDFE92F46UL) +#define SECP256K1_N_H_2 ((uint32_t)0x57A4501DUL) +#define SECP256K1_N_H_3 ((uint32_t)0x5D576E73UL) +#define SECP256K1_N_H_4 ((uint32_t)0xFFFFFFFFUL) +#define SECP256K1_N_H_5 ((uint32_t)0xFFFFFFFFUL) +#define SECP256K1_N_H_6 ((uint32_t)0xFFFFFFFFUL) +#define SECP256K1_N_H_7 ((uint32_t)0x7FFFFFFFUL) + +SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar *r) { + r->d[0] = 0; + r->d[1] = 0; + r->d[2] = 0; + r->d[3] = 0; + r->d[4] = 0; + r->d[5] = 0; + r->d[6] = 0; + r->d[7] = 0; +} + +SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar *r, unsigned int v) { + r->d[0] = v; + r->d[1] = 0; + r->d[2] = 0; + r->d[3] = 0; + r->d[4] = 0; + r->d[5] = 0; + r->d[6] = 0; + r->d[7] = 0; +} + +SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar *a, unsigned int offset, unsigned int count) { + VERIFY_CHECK((offset + count - 1) >> 5 == offset >> 5); + return (a->d[offset >> 5] >> (offset & 0x1F)) & ((1 << count) - 1); +} + +SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar *a, unsigned int offset, unsigned int count) { + VERIFY_CHECK(count < 32); + VERIFY_CHECK(offset + count <= 256); + if ((offset + count - 1) >> 5 == offset >> 5) { + return secp256k1_scalar_get_bits(a, offset, count); + } else { + VERIFY_CHECK((offset >> 5) + 1 < 8); + return ((a->d[offset >> 5] >> (offset & 0x1F)) | (a->d[(offset >> 5) + 1] << (32 - (offset & 0x1F)))) & ((((uint32_t)1) << count) - 1); + } +} + +SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar *a) { + int yes = 0; + int no = 0; + no |= (a->d[7] < SECP256K1_N_7); /* No need for a > check. */ + no |= (a->d[6] < SECP256K1_N_6); /* No need for a > check. */ + no |= (a->d[5] < SECP256K1_N_5); /* No need for a > check. */ + no |= (a->d[4] < SECP256K1_N_4); + yes |= (a->d[4] > SECP256K1_N_4) & ~no; + no |= (a->d[3] < SECP256K1_N_3) & ~yes; + yes |= (a->d[3] > SECP256K1_N_3) & ~no; + no |= (a->d[2] < SECP256K1_N_2) & ~yes; + yes |= (a->d[2] > SECP256K1_N_2) & ~no; + no |= (a->d[1] < SECP256K1_N_1) & ~yes; + yes |= (a->d[1] > SECP256K1_N_1) & ~no; + yes |= (a->d[0] >= SECP256K1_N_0) & ~no; + return yes; +} + +SECP256K1_INLINE static int secp256k1_scalar_reduce(secp256k1_scalar *r, uint32_t overflow) { + uint64_t t; + VERIFY_CHECK(overflow <= 1); + t = (uint64_t)r->d[0] + overflow * SECP256K1_N_C_0; + r->d[0] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[1] + overflow * SECP256K1_N_C_1; + r->d[1] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[2] + overflow * SECP256K1_N_C_2; + r->d[2] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[3] + overflow * SECP256K1_N_C_3; + r->d[3] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[4] + overflow * SECP256K1_N_C_4; + r->d[4] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[5]; + r->d[5] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[6]; + r->d[6] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[7]; + r->d[7] = t & 0xFFFFFFFFUL; + return overflow; +} + +static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) { + int overflow; + uint64_t t = (uint64_t)a->d[0] + b->d[0]; + r->d[0] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[1] + b->d[1]; + r->d[1] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[2] + b->d[2]; + r->d[2] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[3] + b->d[3]; + r->d[3] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[4] + b->d[4]; + r->d[4] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[5] + b->d[5]; + r->d[5] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[6] + b->d[6]; + r->d[6] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[7] + b->d[7]; + r->d[7] = t & 0xFFFFFFFFULL; t >>= 32; + overflow = t + secp256k1_scalar_check_overflow(r); + VERIFY_CHECK(overflow == 0 || overflow == 1); + secp256k1_scalar_reduce(r, overflow); + return overflow; +} + +static void secp256k1_scalar_cadd_bit(secp256k1_scalar *r, unsigned int bit, int flag) { + uint64_t t; + VERIFY_CHECK(bit < 256); + bit += ((uint32_t) flag - 1) & 0x100; /* forcing (bit >> 5) > 7 makes this a noop */ + t = (uint64_t)r->d[0] + (((uint32_t)((bit >> 5) == 0)) << (bit & 0x1F)); + r->d[0] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[1] + (((uint32_t)((bit >> 5) == 1)) << (bit & 0x1F)); + r->d[1] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[2] + (((uint32_t)((bit >> 5) == 2)) << (bit & 0x1F)); + r->d[2] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[3] + (((uint32_t)((bit >> 5) == 3)) << (bit & 0x1F)); + r->d[3] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[4] + (((uint32_t)((bit >> 5) == 4)) << (bit & 0x1F)); + r->d[4] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[5] + (((uint32_t)((bit >> 5) == 5)) << (bit & 0x1F)); + r->d[5] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[6] + (((uint32_t)((bit >> 5) == 6)) << (bit & 0x1F)); + r->d[6] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[7] + (((uint32_t)((bit >> 5) == 7)) << (bit & 0x1F)); + r->d[7] = t & 0xFFFFFFFFULL; +#ifdef VERIFY + VERIFY_CHECK((t >> 32) == 0); + VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0); +#endif +} + +static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *b32, int *overflow) { + int over; + r->d[0] = (uint32_t)b32[31] | (uint32_t)b32[30] << 8 | (uint32_t)b32[29] << 16 | (uint32_t)b32[28] << 24; + r->d[1] = (uint32_t)b32[27] | (uint32_t)b32[26] << 8 | (uint32_t)b32[25] << 16 | (uint32_t)b32[24] << 24; + r->d[2] = (uint32_t)b32[23] | (uint32_t)b32[22] << 8 | (uint32_t)b32[21] << 16 | (uint32_t)b32[20] << 24; + r->d[3] = (uint32_t)b32[19] | (uint32_t)b32[18] << 8 | (uint32_t)b32[17] << 16 | (uint32_t)b32[16] << 24; + r->d[4] = (uint32_t)b32[15] | (uint32_t)b32[14] << 8 | (uint32_t)b32[13] << 16 | (uint32_t)b32[12] << 24; + r->d[5] = (uint32_t)b32[11] | (uint32_t)b32[10] << 8 | (uint32_t)b32[9] << 16 | (uint32_t)b32[8] << 24; + r->d[6] = (uint32_t)b32[7] | (uint32_t)b32[6] << 8 | (uint32_t)b32[5] << 16 | (uint32_t)b32[4] << 24; + r->d[7] = (uint32_t)b32[3] | (uint32_t)b32[2] << 8 | (uint32_t)b32[1] << 16 | (uint32_t)b32[0] << 24; + over = secp256k1_scalar_reduce(r, secp256k1_scalar_check_overflow(r)); + if (overflow) { + *overflow = over; + } +} + +static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar* a) { + bin[0] = a->d[7] >> 24; bin[1] = a->d[7] >> 16; bin[2] = a->d[7] >> 8; bin[3] = a->d[7]; + bin[4] = a->d[6] >> 24; bin[5] = a->d[6] >> 16; bin[6] = a->d[6] >> 8; bin[7] = a->d[6]; + bin[8] = a->d[5] >> 24; bin[9] = a->d[5] >> 16; bin[10] = a->d[5] >> 8; bin[11] = a->d[5]; + bin[12] = a->d[4] >> 24; bin[13] = a->d[4] >> 16; bin[14] = a->d[4] >> 8; bin[15] = a->d[4]; + bin[16] = a->d[3] >> 24; bin[17] = a->d[3] >> 16; bin[18] = a->d[3] >> 8; bin[19] = a->d[3]; + bin[20] = a->d[2] >> 24; bin[21] = a->d[2] >> 16; bin[22] = a->d[2] >> 8; bin[23] = a->d[2]; + bin[24] = a->d[1] >> 24; bin[25] = a->d[1] >> 16; bin[26] = a->d[1] >> 8; bin[27] = a->d[1]; + bin[28] = a->d[0] >> 24; bin[29] = a->d[0] >> 16; bin[30] = a->d[0] >> 8; bin[31] = a->d[0]; +} + +SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar *a) { + return (a->d[0] | a->d[1] | a->d[2] | a->d[3] | a->d[4] | a->d[5] | a->d[6] | a->d[7]) == 0; +} + +static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a) { + uint32_t nonzero = 0xFFFFFFFFUL * (secp256k1_scalar_is_zero(a) == 0); + uint64_t t = (uint64_t)(~a->d[0]) + SECP256K1_N_0 + 1; + r->d[0] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[1]) + SECP256K1_N_1; + r->d[1] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[2]) + SECP256K1_N_2; + r->d[2] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[3]) + SECP256K1_N_3; + r->d[3] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[4]) + SECP256K1_N_4; + r->d[4] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[5]) + SECP256K1_N_5; + r->d[5] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[6]) + SECP256K1_N_6; + r->d[6] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[7]) + SECP256K1_N_7; + r->d[7] = t & nonzero; +} + +SECP256K1_INLINE static int secp256k1_scalar_is_one(const secp256k1_scalar *a) { + return ((a->d[0] ^ 1) | a->d[1] | a->d[2] | a->d[3] | a->d[4] | a->d[5] | a->d[6] | a->d[7]) == 0; +} + +static int secp256k1_scalar_is_high(const secp256k1_scalar *a) { + int yes = 0; + int no = 0; + no |= (a->d[7] < SECP256K1_N_H_7); + yes |= (a->d[7] > SECP256K1_N_H_7) & ~no; + no |= (a->d[6] < SECP256K1_N_H_6) & ~yes; /* No need for a > check. */ + no |= (a->d[5] < SECP256K1_N_H_5) & ~yes; /* No need for a > check. */ + no |= (a->d[4] < SECP256K1_N_H_4) & ~yes; /* No need for a > check. */ + no |= (a->d[3] < SECP256K1_N_H_3) & ~yes; + yes |= (a->d[3] > SECP256K1_N_H_3) & ~no; + no |= (a->d[2] < SECP256K1_N_H_2) & ~yes; + yes |= (a->d[2] > SECP256K1_N_H_2) & ~no; + no |= (a->d[1] < SECP256K1_N_H_1) & ~yes; + yes |= (a->d[1] > SECP256K1_N_H_1) & ~no; + yes |= (a->d[0] > SECP256K1_N_H_0) & ~no; + return yes; +} + +static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) { + /* If we are flag = 0, mask = 00...00 and this is a no-op; + * if we are flag = 1, mask = 11...11 and this is identical to secp256k1_scalar_negate */ + uint32_t mask = !flag - 1; + uint32_t nonzero = 0xFFFFFFFFUL * (secp256k1_scalar_is_zero(r) == 0); + uint64_t t = (uint64_t)(r->d[0] ^ mask) + ((SECP256K1_N_0 + 1) & mask); + r->d[0] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[1] ^ mask) + (SECP256K1_N_1 & mask); + r->d[1] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[2] ^ mask) + (SECP256K1_N_2 & mask); + r->d[2] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[3] ^ mask) + (SECP256K1_N_3 & mask); + r->d[3] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[4] ^ mask) + (SECP256K1_N_4 & mask); + r->d[4] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[5] ^ mask) + (SECP256K1_N_5 & mask); + r->d[5] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[6] ^ mask) + (SECP256K1_N_6 & mask); + r->d[6] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[7] ^ mask) + (SECP256K1_N_7 & mask); + r->d[7] = t & nonzero; + return 2 * (mask == 0) - 1; +} + + +/* Inspired by the macros in OpenSSL's crypto/bn/asm/x86_64-gcc.c. */ + +/** Add a*b to the number defined by (c0,c1,c2). c2 must never overflow. */ +#define muladd(a,b) { \ + uint32_t tl, th; \ + { \ + uint64_t t = (uint64_t)a * b; \ + th = t >> 32; /* at most 0xFFFFFFFE */ \ + tl = t; \ + } \ + c0 += tl; /* overflow is handled on the next line */ \ + th += (c0 < tl) ? 1 : 0; /* at most 0xFFFFFFFF */ \ + c1 += th; /* overflow is handled on the next line */ \ + c2 += (c1 < th) ? 1 : 0; /* never overflows by contract (verified in the next line) */ \ + VERIFY_CHECK((c1 >= th) || (c2 != 0)); \ +} + +/** Add a*b to the number defined by (c0,c1). c1 must never overflow. */ +#define muladd_fast(a,b) { \ + uint32_t tl, th; \ + { \ + uint64_t t = (uint64_t)a * b; \ + th = t >> 32; /* at most 0xFFFFFFFE */ \ + tl = t; \ + } \ + c0 += tl; /* overflow is handled on the next line */ \ + th += (c0 < tl) ? 1 : 0; /* at most 0xFFFFFFFF */ \ + c1 += th; /* never overflows by contract (verified in the next line) */ \ + VERIFY_CHECK(c1 >= th); \ +} + +/** Add 2*a*b to the number defined by (c0,c1,c2). c2 must never overflow. */ +#define muladd2(a,b) { \ + uint32_t tl, th, th2, tl2; \ + { \ + uint64_t t = (uint64_t)a * b; \ + th = t >> 32; /* at most 0xFFFFFFFE */ \ + tl = t; \ + } \ + th2 = th + th; /* at most 0xFFFFFFFE (in case th was 0x7FFFFFFF) */ \ + c2 += (th2 < th) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((th2 >= th) || (c2 != 0)); \ + tl2 = tl + tl; /* at most 0xFFFFFFFE (in case the lowest 63 bits of tl were 0x7FFFFFFF) */ \ + th2 += (tl2 < tl) ? 1 : 0; /* at most 0xFFFFFFFF */ \ + c0 += tl2; /* overflow is handled on the next line */ \ + th2 += (c0 < tl2) ? 1 : 0; /* second overflow is handled on the next line */ \ + c2 += (c0 < tl2) & (th2 == 0); /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((c0 >= tl2) || (th2 != 0) || (c2 != 0)); \ + c1 += th2; /* overflow is handled on the next line */ \ + c2 += (c1 < th2) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((c1 >= th2) || (c2 != 0)); \ +} + +/** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */ +#define sumadd(a) { \ + unsigned int over; \ + c0 += (a); /* overflow is handled on the next line */ \ + over = (c0 < (a)) ? 1 : 0; \ + c1 += over; /* overflow is handled on the next line */ \ + c2 += (c1 < over) ? 1 : 0; /* never overflows by contract */ \ +} + +/** Add a to the number defined by (c0,c1). c1 must never overflow, c2 must be zero. */ +#define sumadd_fast(a) { \ + c0 += (a); /* overflow is handled on the next line */ \ + c1 += (c0 < (a)) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((c1 != 0) | (c0 >= (a))); \ + VERIFY_CHECK(c2 == 0); \ +} + +/** Extract the lowest 32 bits of (c0,c1,c2) into n, and left shift the number 32 bits. */ +#define extract(n) { \ + (n) = c0; \ + c0 = c1; \ + c1 = c2; \ + c2 = 0; \ +} + +/** Extract the lowest 32 bits of (c0,c1,c2) into n, and left shift the number 32 bits. c2 is required to be zero. */ +#define extract_fast(n) { \ + (n) = c0; \ + c0 = c1; \ + c1 = 0; \ + VERIFY_CHECK(c2 == 0); \ +} + +static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint32_t *l) { + uint64_t c; + uint32_t n0 = l[8], n1 = l[9], n2 = l[10], n3 = l[11], n4 = l[12], n5 = l[13], n6 = l[14], n7 = l[15]; + uint32_t m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12; + uint32_t p0, p1, p2, p3, p4, p5, p6, p7, p8; + + /* 96 bit accumulator. */ + uint32_t c0, c1, c2; + + /* Reduce 512 bits into 385. */ + /* m[0..12] = l[0..7] + n[0..7] * SECP256K1_N_C. */ + c0 = l[0]; c1 = 0; c2 = 0; + muladd_fast(n0, SECP256K1_N_C_0); + extract_fast(m0); + sumadd_fast(l[1]); + muladd(n1, SECP256K1_N_C_0); + muladd(n0, SECP256K1_N_C_1); + extract(m1); + sumadd(l[2]); + muladd(n2, SECP256K1_N_C_0); + muladd(n1, SECP256K1_N_C_1); + muladd(n0, SECP256K1_N_C_2); + extract(m2); + sumadd(l[3]); + muladd(n3, SECP256K1_N_C_0); + muladd(n2, SECP256K1_N_C_1); + muladd(n1, SECP256K1_N_C_2); + muladd(n0, SECP256K1_N_C_3); + extract(m3); + sumadd(l[4]); + muladd(n4, SECP256K1_N_C_0); + muladd(n3, SECP256K1_N_C_1); + muladd(n2, SECP256K1_N_C_2); + muladd(n1, SECP256K1_N_C_3); + sumadd(n0); + extract(m4); + sumadd(l[5]); + muladd(n5, SECP256K1_N_C_0); + muladd(n4, SECP256K1_N_C_1); + muladd(n3, SECP256K1_N_C_2); + muladd(n2, SECP256K1_N_C_3); + sumadd(n1); + extract(m5); + sumadd(l[6]); + muladd(n6, SECP256K1_N_C_0); + muladd(n5, SECP256K1_N_C_1); + muladd(n4, SECP256K1_N_C_2); + muladd(n3, SECP256K1_N_C_3); + sumadd(n2); + extract(m6); + sumadd(l[7]); + muladd(n7, SECP256K1_N_C_0); + muladd(n6, SECP256K1_N_C_1); + muladd(n5, SECP256K1_N_C_2); + muladd(n4, SECP256K1_N_C_3); + sumadd(n3); + extract(m7); + muladd(n7, SECP256K1_N_C_1); + muladd(n6, SECP256K1_N_C_2); + muladd(n5, SECP256K1_N_C_3); + sumadd(n4); + extract(m8); + muladd(n7, SECP256K1_N_C_2); + muladd(n6, SECP256K1_N_C_3); + sumadd(n5); + extract(m9); + muladd(n7, SECP256K1_N_C_3); + sumadd(n6); + extract(m10); + sumadd_fast(n7); + extract_fast(m11); + VERIFY_CHECK(c0 <= 1); + m12 = c0; + + /* Reduce 385 bits into 258. */ + /* p[0..8] = m[0..7] + m[8..12] * SECP256K1_N_C. */ + c0 = m0; c1 = 0; c2 = 0; + muladd_fast(m8, SECP256K1_N_C_0); + extract_fast(p0); + sumadd_fast(m1); + muladd(m9, SECP256K1_N_C_0); + muladd(m8, SECP256K1_N_C_1); + extract(p1); + sumadd(m2); + muladd(m10, SECP256K1_N_C_0); + muladd(m9, SECP256K1_N_C_1); + muladd(m8, SECP256K1_N_C_2); + extract(p2); + sumadd(m3); + muladd(m11, SECP256K1_N_C_0); + muladd(m10, SECP256K1_N_C_1); + muladd(m9, SECP256K1_N_C_2); + muladd(m8, SECP256K1_N_C_3); + extract(p3); + sumadd(m4); + muladd(m12, SECP256K1_N_C_0); + muladd(m11, SECP256K1_N_C_1); + muladd(m10, SECP256K1_N_C_2); + muladd(m9, SECP256K1_N_C_3); + sumadd(m8); + extract(p4); + sumadd(m5); + muladd(m12, SECP256K1_N_C_1); + muladd(m11, SECP256K1_N_C_2); + muladd(m10, SECP256K1_N_C_3); + sumadd(m9); + extract(p5); + sumadd(m6); + muladd(m12, SECP256K1_N_C_2); + muladd(m11, SECP256K1_N_C_3); + sumadd(m10); + extract(p6); + sumadd_fast(m7); + muladd_fast(m12, SECP256K1_N_C_3); + sumadd_fast(m11); + extract_fast(p7); + p8 = c0 + m12; + VERIFY_CHECK(p8 <= 2); + + /* Reduce 258 bits into 256. */ + /* r[0..7] = p[0..7] + p[8] * SECP256K1_N_C. */ + c = p0 + (uint64_t)SECP256K1_N_C_0 * p8; + r->d[0] = c & 0xFFFFFFFFUL; c >>= 32; + c += p1 + (uint64_t)SECP256K1_N_C_1 * p8; + r->d[1] = c & 0xFFFFFFFFUL; c >>= 32; + c += p2 + (uint64_t)SECP256K1_N_C_2 * p8; + r->d[2] = c & 0xFFFFFFFFUL; c >>= 32; + c += p3 + (uint64_t)SECP256K1_N_C_3 * p8; + r->d[3] = c & 0xFFFFFFFFUL; c >>= 32; + c += p4 + (uint64_t)p8; + r->d[4] = c & 0xFFFFFFFFUL; c >>= 32; + c += p5; + r->d[5] = c & 0xFFFFFFFFUL; c >>= 32; + c += p6; + r->d[6] = c & 0xFFFFFFFFUL; c >>= 32; + c += p7; + r->d[7] = c & 0xFFFFFFFFUL; c >>= 32; + + /* Final reduction of r. */ + secp256k1_scalar_reduce(r, c + secp256k1_scalar_check_overflow(r)); +} + +static void secp256k1_scalar_mul_512(uint32_t *l, const secp256k1_scalar *a, const secp256k1_scalar *b) { + /* 96 bit accumulator. */ + uint32_t c0 = 0, c1 = 0, c2 = 0; + + /* l[0..15] = a[0..7] * b[0..7]. */ + muladd_fast(a->d[0], b->d[0]); + extract_fast(l[0]); + muladd(a->d[0], b->d[1]); + muladd(a->d[1], b->d[0]); + extract(l[1]); + muladd(a->d[0], b->d[2]); + muladd(a->d[1], b->d[1]); + muladd(a->d[2], b->d[0]); + extract(l[2]); + muladd(a->d[0], b->d[3]); + muladd(a->d[1], b->d[2]); + muladd(a->d[2], b->d[1]); + muladd(a->d[3], b->d[0]); + extract(l[3]); + muladd(a->d[0], b->d[4]); + muladd(a->d[1], b->d[3]); + muladd(a->d[2], b->d[2]); + muladd(a->d[3], b->d[1]); + muladd(a->d[4], b->d[0]); + extract(l[4]); + muladd(a->d[0], b->d[5]); + muladd(a->d[1], b->d[4]); + muladd(a->d[2], b->d[3]); + muladd(a->d[3], b->d[2]); + muladd(a->d[4], b->d[1]); + muladd(a->d[5], b->d[0]); + extract(l[5]); + muladd(a->d[0], b->d[6]); + muladd(a->d[1], b->d[5]); + muladd(a->d[2], b->d[4]); + muladd(a->d[3], b->d[3]); + muladd(a->d[4], b->d[2]); + muladd(a->d[5], b->d[1]); + muladd(a->d[6], b->d[0]); + extract(l[6]); + muladd(a->d[0], b->d[7]); + muladd(a->d[1], b->d[6]); + muladd(a->d[2], b->d[5]); + muladd(a->d[3], b->d[4]); + muladd(a->d[4], b->d[3]); + muladd(a->d[5], b->d[2]); + muladd(a->d[6], b->d[1]); + muladd(a->d[7], b->d[0]); + extract(l[7]); + muladd(a->d[1], b->d[7]); + muladd(a->d[2], b->d[6]); + muladd(a->d[3], b->d[5]); + muladd(a->d[4], b->d[4]); + muladd(a->d[5], b->d[3]); + muladd(a->d[6], b->d[2]); + muladd(a->d[7], b->d[1]); + extract(l[8]); + muladd(a->d[2], b->d[7]); + muladd(a->d[3], b->d[6]); + muladd(a->d[4], b->d[5]); + muladd(a->d[5], b->d[4]); + muladd(a->d[6], b->d[3]); + muladd(a->d[7], b->d[2]); + extract(l[9]); + muladd(a->d[3], b->d[7]); + muladd(a->d[4], b->d[6]); + muladd(a->d[5], b->d[5]); + muladd(a->d[6], b->d[4]); + muladd(a->d[7], b->d[3]); + extract(l[10]); + muladd(a->d[4], b->d[7]); + muladd(a->d[5], b->d[6]); + muladd(a->d[6], b->d[5]); + muladd(a->d[7], b->d[4]); + extract(l[11]); + muladd(a->d[5], b->d[7]); + muladd(a->d[6], b->d[6]); + muladd(a->d[7], b->d[5]); + extract(l[12]); + muladd(a->d[6], b->d[7]); + muladd(a->d[7], b->d[6]); + extract(l[13]); + muladd_fast(a->d[7], b->d[7]); + extract_fast(l[14]); + VERIFY_CHECK(c1 == 0); + l[15] = c0; +} + +static void secp256k1_scalar_sqr_512(uint32_t *l, const secp256k1_scalar *a) { + /* 96 bit accumulator. */ + uint32_t c0 = 0, c1 = 0, c2 = 0; + + /* l[0..15] = a[0..7]^2. */ + muladd_fast(a->d[0], a->d[0]); + extract_fast(l[0]); + muladd2(a->d[0], a->d[1]); + extract(l[1]); + muladd2(a->d[0], a->d[2]); + muladd(a->d[1], a->d[1]); + extract(l[2]); + muladd2(a->d[0], a->d[3]); + muladd2(a->d[1], a->d[2]); + extract(l[3]); + muladd2(a->d[0], a->d[4]); + muladd2(a->d[1], a->d[3]); + muladd(a->d[2], a->d[2]); + extract(l[4]); + muladd2(a->d[0], a->d[5]); + muladd2(a->d[1], a->d[4]); + muladd2(a->d[2], a->d[3]); + extract(l[5]); + muladd2(a->d[0], a->d[6]); + muladd2(a->d[1], a->d[5]); + muladd2(a->d[2], a->d[4]); + muladd(a->d[3], a->d[3]); + extract(l[6]); + muladd2(a->d[0], a->d[7]); + muladd2(a->d[1], a->d[6]); + muladd2(a->d[2], a->d[5]); + muladd2(a->d[3], a->d[4]); + extract(l[7]); + muladd2(a->d[1], a->d[7]); + muladd2(a->d[2], a->d[6]); + muladd2(a->d[3], a->d[5]); + muladd(a->d[4], a->d[4]); + extract(l[8]); + muladd2(a->d[2], a->d[7]); + muladd2(a->d[3], a->d[6]); + muladd2(a->d[4], a->d[5]); + extract(l[9]); + muladd2(a->d[3], a->d[7]); + muladd2(a->d[4], a->d[6]); + muladd(a->d[5], a->d[5]); + extract(l[10]); + muladd2(a->d[4], a->d[7]); + muladd2(a->d[5], a->d[6]); + extract(l[11]); + muladd2(a->d[5], a->d[7]); + muladd(a->d[6], a->d[6]); + extract(l[12]); + muladd2(a->d[6], a->d[7]); + extract(l[13]); + muladd_fast(a->d[7], a->d[7]); + extract_fast(l[14]); + VERIFY_CHECK(c1 == 0); + l[15] = c0; +} + +#undef sumadd +#undef sumadd_fast +#undef muladd +#undef muladd_fast +#undef muladd2 +#undef extract +#undef extract_fast + +static void secp256k1_scalar_mul(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) { + uint32_t l[16]; + secp256k1_scalar_mul_512(l, a, b); + secp256k1_scalar_reduce_512(r, l); +} + +static int secp256k1_scalar_shr_int(secp256k1_scalar *r, int n) { + int ret; + VERIFY_CHECK(n > 0); + VERIFY_CHECK(n < 16); + ret = r->d[0] & ((1 << n) - 1); + r->d[0] = (r->d[0] >> n) + (r->d[1] << (32 - n)); + r->d[1] = (r->d[1] >> n) + (r->d[2] << (32 - n)); + r->d[2] = (r->d[2] >> n) + (r->d[3] << (32 - n)); + r->d[3] = (r->d[3] >> n) + (r->d[4] << (32 - n)); + r->d[4] = (r->d[4] >> n) + (r->d[5] << (32 - n)); + r->d[5] = (r->d[5] >> n) + (r->d[6] << (32 - n)); + r->d[6] = (r->d[6] >> n) + (r->d[7] << (32 - n)); + r->d[7] = (r->d[7] >> n); + return ret; +} + +static void secp256k1_scalar_sqr(secp256k1_scalar *r, const secp256k1_scalar *a) { + uint32_t l[16]; + secp256k1_scalar_sqr_512(l, a); + secp256k1_scalar_reduce_512(r, l); +} + +#ifdef USE_ENDOMORPHISM +static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) { + r1->d[0] = a->d[0]; + r1->d[1] = a->d[1]; + r1->d[2] = a->d[2]; + r1->d[3] = a->d[3]; + r1->d[4] = 0; + r1->d[5] = 0; + r1->d[6] = 0; + r1->d[7] = 0; + r2->d[0] = a->d[4]; + r2->d[1] = a->d[5]; + r2->d[2] = a->d[6]; + r2->d[3] = a->d[7]; + r2->d[4] = 0; + r2->d[5] = 0; + r2->d[6] = 0; + r2->d[7] = 0; +} +#endif + +SECP256K1_INLINE static int secp256k1_scalar_eq(const secp256k1_scalar *a, const secp256k1_scalar *b) { + return ((a->d[0] ^ b->d[0]) | (a->d[1] ^ b->d[1]) | (a->d[2] ^ b->d[2]) | (a->d[3] ^ b->d[3]) | (a->d[4] ^ b->d[4]) | (a->d[5] ^ b->d[5]) | (a->d[6] ^ b->d[6]) | (a->d[7] ^ b->d[7])) == 0; +} + +SECP256K1_INLINE static void secp256k1_scalar_mul_shift_var(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b, unsigned int shift) { + uint32_t l[16]; + unsigned int shiftlimbs; + unsigned int shiftlow; + unsigned int shifthigh; + VERIFY_CHECK(shift >= 256); + secp256k1_scalar_mul_512(l, a, b); + shiftlimbs = shift >> 5; + shiftlow = shift & 0x1F; + shifthigh = 32 - shiftlow; + r->d[0] = shift < 512 ? (l[0 + shiftlimbs] >> shiftlow | (shift < 480 && shiftlow ? (l[1 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[1] = shift < 480 ? (l[1 + shiftlimbs] >> shiftlow | (shift < 448 && shiftlow ? (l[2 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[2] = shift < 448 ? (l[2 + shiftlimbs] >> shiftlow | (shift < 416 && shiftlow ? (l[3 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[3] = shift < 416 ? (l[3 + shiftlimbs] >> shiftlow | (shift < 384 && shiftlow ? (l[4 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[4] = shift < 384 ? (l[4 + shiftlimbs] >> shiftlow | (shift < 352 && shiftlow ? (l[5 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[5] = shift < 352 ? (l[5 + shiftlimbs] >> shiftlow | (shift < 320 && shiftlow ? (l[6 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[6] = shift < 320 ? (l[6 + shiftlimbs] >> shiftlow | (shift < 288 && shiftlow ? (l[7 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[7] = shift < 288 ? (l[7 + shiftlimbs] >> shiftlow) : 0; + secp256k1_scalar_cadd_bit(r, 0, (l[(shift - 1) >> 5] >> ((shift - 1) & 0x1f)) & 1); +} + +#endif /* SECP256K1_SCALAR_REPR_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_impl.h new file mode 100644 index 000000000..fa790570f --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_impl.h @@ -0,0 +1,333 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_SCALAR_IMPL_H +#define SECP256K1_SCALAR_IMPL_H + +#include "group.h" +#include "scalar.h" + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#if defined(EXHAUSTIVE_TEST_ORDER) +#include "scalar_low_impl.h" +#elif defined(USE_SCALAR_4X64) +#include "scalar_4x64_impl.h" +#elif defined(USE_SCALAR_8X32) +#include "scalar_8x32_impl.h" +#else +#error "Please select scalar implementation" +#endif + +#ifndef USE_NUM_NONE +static void secp256k1_scalar_get_num(secp256k1_num *r, const secp256k1_scalar *a) { + unsigned char c[32]; + secp256k1_scalar_get_b32(c, a); + secp256k1_num_set_bin(r, c, 32); +} + +/** secp256k1 curve order, see secp256k1_ecdsa_const_order_as_fe in ecdsa_impl.h */ +static void secp256k1_scalar_order_get_num(secp256k1_num *r) { +#if defined(EXHAUSTIVE_TEST_ORDER) + static const unsigned char order[32] = { + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,EXHAUSTIVE_TEST_ORDER + }; +#else + static const unsigned char order[32] = { + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE, + 0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B, + 0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41 + }; +#endif + secp256k1_num_set_bin(r, order, 32); +} +#endif + +static void secp256k1_scalar_inverse(secp256k1_scalar *r, const secp256k1_scalar *x) { +#if defined(EXHAUSTIVE_TEST_ORDER) + int i; + *r = 0; + for (i = 0; i < EXHAUSTIVE_TEST_ORDER; i++) + if ((i * *x) % EXHAUSTIVE_TEST_ORDER == 1) + *r = i; + /* If this VERIFY_CHECK triggers we were given a noninvertible scalar (and thus + * have a composite group order; fix it in exhaustive_tests.c). */ + VERIFY_CHECK(*r != 0); +} +#else + secp256k1_scalar *t; + int i; + /* First compute xN as x ^ (2^N - 1) for some values of N, + * and uM as x ^ M for some values of M. */ + secp256k1_scalar x2, x3, x6, x8, x14, x28, x56, x112, x126; + secp256k1_scalar u2, u5, u9, u11, u13; + + secp256k1_scalar_sqr(&u2, x); + secp256k1_scalar_mul(&x2, &u2, x); + secp256k1_scalar_mul(&u5, &u2, &x2); + secp256k1_scalar_mul(&x3, &u5, &u2); + secp256k1_scalar_mul(&u9, &x3, &u2); + secp256k1_scalar_mul(&u11, &u9, &u2); + secp256k1_scalar_mul(&u13, &u11, &u2); + + secp256k1_scalar_sqr(&x6, &u13); + secp256k1_scalar_sqr(&x6, &x6); + secp256k1_scalar_mul(&x6, &x6, &u11); + + secp256k1_scalar_sqr(&x8, &x6); + secp256k1_scalar_sqr(&x8, &x8); + secp256k1_scalar_mul(&x8, &x8, &x2); + + secp256k1_scalar_sqr(&x14, &x8); + for (i = 0; i < 5; i++) { + secp256k1_scalar_sqr(&x14, &x14); + } + secp256k1_scalar_mul(&x14, &x14, &x6); + + secp256k1_scalar_sqr(&x28, &x14); + for (i = 0; i < 13; i++) { + secp256k1_scalar_sqr(&x28, &x28); + } + secp256k1_scalar_mul(&x28, &x28, &x14); + + secp256k1_scalar_sqr(&x56, &x28); + for (i = 0; i < 27; i++) { + secp256k1_scalar_sqr(&x56, &x56); + } + secp256k1_scalar_mul(&x56, &x56, &x28); + + secp256k1_scalar_sqr(&x112, &x56); + for (i = 0; i < 55; i++) { + secp256k1_scalar_sqr(&x112, &x112); + } + secp256k1_scalar_mul(&x112, &x112, &x56); + + secp256k1_scalar_sqr(&x126, &x112); + for (i = 0; i < 13; i++) { + secp256k1_scalar_sqr(&x126, &x126); + } + secp256k1_scalar_mul(&x126, &x126, &x14); + + /* Then accumulate the final result (t starts at x126). */ + t = &x126; + for (i = 0; i < 3; i++) { + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u5); /* 101 */ + for (i = 0; i < 4; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x3); /* 111 */ + for (i = 0; i < 4; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u5); /* 101 */ + for (i = 0; i < 5; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u11); /* 1011 */ + for (i = 0; i < 4; i++) { + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u11); /* 1011 */ + for (i = 0; i < 4; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x3); /* 111 */ + for (i = 0; i < 5; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x3); /* 111 */ + for (i = 0; i < 6; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u13); /* 1101 */ + for (i = 0; i < 4; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u5); /* 101 */ + for (i = 0; i < 3; i++) { + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x3); /* 111 */ + for (i = 0; i < 5; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u9); /* 1001 */ + for (i = 0; i < 6; i++) { /* 000 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u5); /* 101 */ + for (i = 0; i < 10; i++) { /* 0000000 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x3); /* 111 */ + for (i = 0; i < 4; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x3); /* 111 */ + for (i = 0; i < 9; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x8); /* 11111111 */ + for (i = 0; i < 5; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u9); /* 1001 */ + for (i = 0; i < 6; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u11); /* 1011 */ + for (i = 0; i < 4; i++) { + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u13); /* 1101 */ + for (i = 0; i < 5; i++) { + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x2); /* 11 */ + for (i = 0; i < 6; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u13); /* 1101 */ + for (i = 0; i < 10; i++) { /* 000000 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u13); /* 1101 */ + for (i = 0; i < 4; i++) { + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &u9); /* 1001 */ + for (i = 0; i < 6; i++) { /* 00000 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 8; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(r, t, &x6); /* 111111 */ +} + +SECP256K1_INLINE static int secp256k1_scalar_is_even(const secp256k1_scalar *a) { + return !(a->d[0] & 1); +} +#endif + +static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_scalar *x) { +#if defined(USE_SCALAR_INV_BUILTIN) + secp256k1_scalar_inverse(r, x); +#elif defined(USE_SCALAR_INV_NUM) + unsigned char b[32]; + secp256k1_num n, m; + secp256k1_scalar t = *x; + secp256k1_scalar_get_b32(b, &t); + secp256k1_num_set_bin(&n, b, 32); + secp256k1_scalar_order_get_num(&m); + secp256k1_num_mod_inverse(&n, &n, &m); + secp256k1_num_get_bin(b, 32, &n); + secp256k1_scalar_set_b32(r, b, NULL); + /* Verify that the inverse was computed correctly, without GMP code. */ + secp256k1_scalar_mul(&t, &t, r); + CHECK(secp256k1_scalar_is_one(&t)); +#else +#error "Please select scalar inverse implementation" +#endif +} + +#ifdef USE_ENDOMORPHISM +#if defined(EXHAUSTIVE_TEST_ORDER) +/** + * Find k1 and k2 given k, such that k1 + k2 * lambda == k mod n; unlike in the + * full case we don't bother making k1 and k2 be small, we just want them to be + * nontrivial to get full test coverage for the exhaustive tests. We therefore + * (arbitrarily) set k2 = k + 5 and k1 = k - k2 * lambda. + */ +static void secp256k1_scalar_split_lambda(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) { + *r2 = (*a + 5) % EXHAUSTIVE_TEST_ORDER; + *r1 = (*a + (EXHAUSTIVE_TEST_ORDER - *r2) * EXHAUSTIVE_TEST_LAMBDA) % EXHAUSTIVE_TEST_ORDER; +} +#else +/** + * The Secp256k1 curve has an endomorphism, where lambda * (x, y) = (beta * x, y), where + * lambda is {0x53,0x63,0xad,0x4c,0xc0,0x5c,0x30,0xe0,0xa5,0x26,0x1c,0x02,0x88,0x12,0x64,0x5a, + * 0x12,0x2e,0x22,0xea,0x20,0x81,0x66,0x78,0xdf,0x02,0x96,0x7c,0x1b,0x23,0xbd,0x72} + * + * "Guide to Elliptic Curve Cryptography" (Hankerson, Menezes, Vanstone) gives an algorithm + * (algorithm 3.74) to find k1 and k2 given k, such that k1 + k2 * lambda == k mod n, and k1 + * and k2 have a small size. + * It relies on constants a1, b1, a2, b2. These constants for the value of lambda above are: + * + * - a1 = {0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15} + * - b1 = -{0xe4,0x43,0x7e,0xd6,0x01,0x0e,0x88,0x28,0x6f,0x54,0x7f,0xa9,0x0a,0xbf,0xe4,0xc3} + * - a2 = {0x01,0x14,0xca,0x50,0xf7,0xa8,0xe2,0xf3,0xf6,0x57,0xc1,0x10,0x8d,0x9d,0x44,0xcf,0xd8} + * - b2 = {0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15} + * + * The algorithm then computes c1 = round(b1 * k / n) and c2 = round(b2 * k / n), and gives + * k1 = k - (c1*a1 + c2*a2) and k2 = -(c1*b1 + c2*b2). Instead, we use modular arithmetic, and + * compute k1 as k - k2 * lambda, avoiding the need for constants a1 and a2. + * + * g1, g2 are precomputed constants used to replace division with a rounded multiplication + * when decomposing the scalar for an endomorphism-based point multiplication. + * + * The possibility of using precomputed estimates is mentioned in "Guide to Elliptic Curve + * Cryptography" (Hankerson, Menezes, Vanstone) in section 3.5. + * + * The derivation is described in the paper "Efficient Software Implementation of Public-Key + * Cryptography on Sensor Networks Using the MSP430X Microcontroller" (Gouvea, Oliveira, Lopez), + * Section 4.3 (here we use a somewhat higher-precision estimate): + * d = a1*b2 - b1*a2 + * g1 = round((2^272)*b2/d) + * g2 = round((2^272)*b1/d) + * + * (Note that 'd' is also equal to the curve order here because [a1,b1] and [a2,b2] are found + * as outputs of the Extended Euclidean Algorithm on inputs 'order' and 'lambda'). + * + * The function below splits a in r1 and r2, such that r1 + lambda * r2 == a (mod order). + */ + +static void secp256k1_scalar_split_lambda(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) { + secp256k1_scalar c1, c2; + static const secp256k1_scalar minus_lambda = SECP256K1_SCALAR_CONST( + 0xAC9C52B3UL, 0x3FA3CF1FUL, 0x5AD9E3FDUL, 0x77ED9BA4UL, + 0xA880B9FCUL, 0x8EC739C2UL, 0xE0CFC810UL, 0xB51283CFUL + ); + static const secp256k1_scalar minus_b1 = SECP256K1_SCALAR_CONST( + 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, + 0xE4437ED6UL, 0x010E8828UL, 0x6F547FA9UL, 0x0ABFE4C3UL + ); + static const secp256k1_scalar minus_b2 = SECP256K1_SCALAR_CONST( + 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFEUL, + 0x8A280AC5UL, 0x0774346DUL, 0xD765CDA8UL, 0x3DB1562CUL + ); + static const secp256k1_scalar g1 = SECP256K1_SCALAR_CONST( + 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00003086UL, + 0xD221A7D4UL, 0x6BCDE86CUL, 0x90E49284UL, 0xEB153DABUL + ); + static const secp256k1_scalar g2 = SECP256K1_SCALAR_CONST( + 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x0000E443UL, + 0x7ED6010EUL, 0x88286F54UL, 0x7FA90ABFUL, 0xE4C42212UL + ); + VERIFY_CHECK(r1 != a); + VERIFY_CHECK(r2 != a); + /* these _var calls are constant time since the shift amount is constant */ + secp256k1_scalar_mul_shift_var(&c1, a, &g1, 272); + secp256k1_scalar_mul_shift_var(&c2, a, &g2, 272); + secp256k1_scalar_mul(&c1, &c1, &minus_b1); + secp256k1_scalar_mul(&c2, &c2, &minus_b2); + secp256k1_scalar_add(r2, &c1, &c2); + secp256k1_scalar_mul(r1, r2, &minus_lambda); + secp256k1_scalar_add(r1, r1, a); +} +#endif +#endif + +#endif /* SECP256K1_SCALAR_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_low.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_low.h new file mode 100644 index 000000000..5836febc5 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_low.h @@ -0,0 +1,15 @@ +/********************************************************************** + * Copyright (c) 2015 Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_SCALAR_REPR_H +#define SECP256K1_SCALAR_REPR_H + +#include + +/** A scalar modulo the group order of the secp256k1 curve. */ +typedef uint32_t secp256k1_scalar; + +#endif /* SECP256K1_SCALAR_REPR_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_low_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_low_impl.h new file mode 100644 index 000000000..c80e70c5a --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scalar_low_impl.h @@ -0,0 +1,114 @@ +/********************************************************************** + * Copyright (c) 2015 Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_SCALAR_REPR_IMPL_H +#define SECP256K1_SCALAR_REPR_IMPL_H + +#include "scalar.h" + +#include + +SECP256K1_INLINE static int secp256k1_scalar_is_even(const secp256k1_scalar *a) { + return !(*a & 1); +} + +SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar *r) { *r = 0; } +SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar *r, unsigned int v) { *r = v; } + +SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar *a, unsigned int offset, unsigned int count) { + if (offset < 32) + return ((*a >> offset) & ((((uint32_t)1) << count) - 1)); + else + return 0; +} + +SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar *a, unsigned int offset, unsigned int count) { + return secp256k1_scalar_get_bits(a, offset, count); +} + +SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar *a) { return *a >= EXHAUSTIVE_TEST_ORDER; } + +static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) { + *r = (*a + *b) % EXHAUSTIVE_TEST_ORDER; + return *r < *b; +} + +static void secp256k1_scalar_cadd_bit(secp256k1_scalar *r, unsigned int bit, int flag) { + if (flag && bit < 32) + *r += (1 << bit); +#ifdef VERIFY + VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0); +#endif +} + +static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *b32, int *overflow) { + const int base = 0x100 % EXHAUSTIVE_TEST_ORDER; + int i; + *r = 0; + for (i = 0; i < 32; i++) { + *r = ((*r * base) + b32[i]) % EXHAUSTIVE_TEST_ORDER; + } + /* just deny overflow, it basically always happens */ + if (overflow) *overflow = 0; +} + +static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar* a) { + memset(bin, 0, 32); + bin[28] = *a >> 24; bin[29] = *a >> 16; bin[30] = *a >> 8; bin[31] = *a; +} + +SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar *a) { + return *a == 0; +} + +static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a) { + if (*a == 0) { + *r = 0; + } else { + *r = EXHAUSTIVE_TEST_ORDER - *a; + } +} + +SECP256K1_INLINE static int secp256k1_scalar_is_one(const secp256k1_scalar *a) { + return *a == 1; +} + +static int secp256k1_scalar_is_high(const secp256k1_scalar *a) { + return *a > EXHAUSTIVE_TEST_ORDER / 2; +} + +static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) { + if (flag) secp256k1_scalar_negate(r, r); + return flag ? -1 : 1; +} + +static void secp256k1_scalar_mul(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) { + *r = (*a * *b) % EXHAUSTIVE_TEST_ORDER; +} + +static int secp256k1_scalar_shr_int(secp256k1_scalar *r, int n) { + int ret; + VERIFY_CHECK(n > 0); + VERIFY_CHECK(n < 16); + ret = *r & ((1 << n) - 1); + *r >>= n; + return ret; +} + +static void secp256k1_scalar_sqr(secp256k1_scalar *r, const secp256k1_scalar *a) { + *r = (*a * *a) % EXHAUSTIVE_TEST_ORDER; +} + +static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) { + *r1 = *a; + *r2 = 0; +} + +SECP256K1_INLINE static int secp256k1_scalar_eq(const secp256k1_scalar *a, const secp256k1_scalar *b) { + return *a == *b; +} + +#endif /* SECP256K1_SCALAR_REPR_IMPL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scratch.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scratch.h new file mode 100644 index 000000000..fef377af0 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scratch.h @@ -0,0 +1,39 @@ +/********************************************************************** + * Copyright (c) 2017 Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_SCRATCH_ +#define _SECP256K1_SCRATCH_ + +#define SECP256K1_SCRATCH_MAX_FRAMES 5 + +/* The typedef is used internally; the struct name is used in the public API + * (where it is exposed as a different typedef) */ +typedef struct secp256k1_scratch_space_struct { + void *data[SECP256K1_SCRATCH_MAX_FRAMES]; + size_t offset[SECP256K1_SCRATCH_MAX_FRAMES]; + size_t frame_size[SECP256K1_SCRATCH_MAX_FRAMES]; + size_t frame; + size_t max_size; + const secp256k1_callback* error_callback; +} secp256k1_scratch; + +static secp256k1_scratch* secp256k1_scratch_create(const secp256k1_callback* error_callback, size_t max_size); + +static void secp256k1_scratch_destroy(secp256k1_scratch* scratch); + +/** Attempts to allocate a new stack frame with `n` available bytes. Returns 1 on success, 0 on failure */ +static int secp256k1_scratch_allocate_frame(secp256k1_scratch* scratch, size_t n, size_t objects); + +/** Deallocates a stack frame */ +static void secp256k1_scratch_deallocate_frame(secp256k1_scratch* scratch); + +/** Returns the maximum allocation the scratch space will allow */ +static size_t secp256k1_scratch_max_allocation(const secp256k1_scratch* scratch, size_t n_objects); + +/** Returns a pointer into the most recently allocated frame, or NULL if there is insufficient available space */ +static void *secp256k1_scratch_alloc(secp256k1_scratch* scratch, size_t n); + +#endif diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scratch_impl.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scratch_impl.h new file mode 100644 index 000000000..abed713b2 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/scratch_impl.h @@ -0,0 +1,86 @@ +/********************************************************************** + * Copyright (c) 2017 Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_SCRATCH_IMPL_H_ +#define _SECP256K1_SCRATCH_IMPL_H_ + +#include "scratch.h" + +/* Using 16 bytes alignment because common architectures never have alignment + * requirements above 8 for any of the types we care about. In addition we + * leave some room because currently we don't care about a few bytes. + * TODO: Determine this at configure time. */ +#define ALIGNMENT 16 + +static secp256k1_scratch* secp256k1_scratch_create(const secp256k1_callback* error_callback, size_t max_size) { + secp256k1_scratch* ret = (secp256k1_scratch*)checked_malloc(error_callback, sizeof(*ret)); + if (ret != NULL) { + memset(ret, 0, sizeof(*ret)); + ret->max_size = max_size; + ret->error_callback = error_callback; + } + return ret; +} + +static void secp256k1_scratch_destroy(secp256k1_scratch* scratch) { + if (scratch != NULL) { + VERIFY_CHECK(scratch->frame == 0); + free(scratch); + } +} + +static size_t secp256k1_scratch_max_allocation(const secp256k1_scratch* scratch, size_t objects) { + size_t i = 0; + size_t allocated = 0; + for (i = 0; i < scratch->frame; i++) { + allocated += scratch->frame_size[i]; + } + if (scratch->max_size - allocated <= objects * ALIGNMENT) { + return 0; + } + return scratch->max_size - allocated - objects * ALIGNMENT; +} + +static int secp256k1_scratch_allocate_frame(secp256k1_scratch* scratch, size_t n, size_t objects) { + VERIFY_CHECK(scratch->frame < SECP256K1_SCRATCH_MAX_FRAMES); + + if (n <= secp256k1_scratch_max_allocation(scratch, objects)) { + n += objects * ALIGNMENT; + scratch->data[scratch->frame] = checked_malloc(scratch->error_callback, n); + if (scratch->data[scratch->frame] == NULL) { + return 0; + } + scratch->frame_size[scratch->frame] = n; + scratch->offset[scratch->frame] = 0; + scratch->frame++; + return 1; + } else { + return 0; + } +} + +static void secp256k1_scratch_deallocate_frame(secp256k1_scratch* scratch) { + VERIFY_CHECK(scratch->frame > 0); + scratch->frame -= 1; + free(scratch->data[scratch->frame]); +} + +static void *secp256k1_scratch_alloc(secp256k1_scratch* scratch, size_t size) { + void *ret; + size_t frame = scratch->frame - 1; + size = ((size + ALIGNMENT - 1) / ALIGNMENT) * ALIGNMENT; + + if (scratch->frame == 0 || size + scratch->offset[frame] > scratch->frame_size[frame]) { + return NULL; + } + ret = (void *) ((unsigned char *) scratch->data[frame] + scratch->offset[frame]); + memset(ret, 0, size); + scratch->offset[frame] += size; + + return ret; +} + +#endif diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/secp256k1.c b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/secp256k1.c new file mode 100644 index 000000000..5262e121d --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/secp256k1.c @@ -0,0 +1,597 @@ +/********************************************************************** + * Copyright (c) 2013-2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#include "secp256k1.h" + +#include "util.h" +#include "num_impl.h" +#include "field_impl.h" +#include "scalar_impl.h" +#include "group_impl.h" +#include "ecmult_impl.h" +#include "ecmult_const_impl.h" +#include "ecmult_gen_impl.h" +#include "ecdsa_impl.h" +#include "eckey_impl.h" +#include "hash_impl.h" +#include "scratch_impl.h" + +#define ARG_CHECK(cond) do { \ + if (EXPECT(!(cond), 0)) { \ + secp256k1_callback_call(&ctx->illegal_callback, #cond); \ + return 0; \ + } \ +} while(0) + +static void default_illegal_callback_fn(const char* str, void* data) { + (void)data; + fprintf(stderr, "[libsecp256k1] illegal argument: %s\n", str); + abort(); +} + +static const secp256k1_callback default_illegal_callback = { + default_illegal_callback_fn, + NULL +}; + +static void default_error_callback_fn(const char* str, void* data) { + (void)data; + fprintf(stderr, "[libsecp256k1] internal consistency check failed: %s\n", str); + abort(); +} + +static const secp256k1_callback default_error_callback = { + default_error_callback_fn, + NULL +}; + + +struct secp256k1_context_struct { + secp256k1_ecmult_context ecmult_ctx; + secp256k1_ecmult_gen_context ecmult_gen_ctx; + secp256k1_callback illegal_callback; + secp256k1_callback error_callback; +}; + +secp256k1_context* secp256k1_context_create(unsigned int flags) { + secp256k1_context* ret = (secp256k1_context*)checked_malloc(&default_error_callback, sizeof(secp256k1_context)); + ret->illegal_callback = default_illegal_callback; + ret->error_callback = default_error_callback; + + if (EXPECT((flags & SECP256K1_FLAGS_TYPE_MASK) != SECP256K1_FLAGS_TYPE_CONTEXT, 0)) { + secp256k1_callback_call(&ret->illegal_callback, + "Invalid flags"); + free(ret); + return NULL; + } + + secp256k1_ecmult_context_init(&ret->ecmult_ctx); + secp256k1_ecmult_gen_context_init(&ret->ecmult_gen_ctx); + + if (flags & SECP256K1_FLAGS_BIT_CONTEXT_SIGN) { + secp256k1_ecmult_gen_context_build(&ret->ecmult_gen_ctx, &ret->error_callback); + } + if (flags & SECP256K1_FLAGS_BIT_CONTEXT_VERIFY) { + secp256k1_ecmult_context_build(&ret->ecmult_ctx, &ret->error_callback); + } + + return ret; +} + +secp256k1_context* secp256k1_context_clone(const secp256k1_context* ctx) { + secp256k1_context* ret = (secp256k1_context*)checked_malloc(&ctx->error_callback, sizeof(secp256k1_context)); + ret->illegal_callback = ctx->illegal_callback; + ret->error_callback = ctx->error_callback; + secp256k1_ecmult_context_clone(&ret->ecmult_ctx, &ctx->ecmult_ctx, &ctx->error_callback); + secp256k1_ecmult_gen_context_clone(&ret->ecmult_gen_ctx, &ctx->ecmult_gen_ctx, &ctx->error_callback); + return ret; +} + +void secp256k1_context_destroy(secp256k1_context* ctx) { + if (ctx != NULL) { + secp256k1_ecmult_context_clear(&ctx->ecmult_ctx); + secp256k1_ecmult_gen_context_clear(&ctx->ecmult_gen_ctx); + + free(ctx); + } +} + +void secp256k1_context_set_illegal_callback(secp256k1_context* ctx, void (*fun)(const char* message, void* data), const void* data) { + if (fun == NULL) { + fun = default_illegal_callback_fn; + } + ctx->illegal_callback.fn = fun; + ctx->illegal_callback.data = data; +} + +void secp256k1_context_set_error_callback(secp256k1_context* ctx, void (*fun)(const char* message, void* data), const void* data) { + if (fun == NULL) { + fun = default_error_callback_fn; + } + ctx->error_callback.fn = fun; + ctx->error_callback.data = data; +} + +secp256k1_scratch_space* secp256k1_scratch_space_create(const secp256k1_context* ctx, size_t max_size) { + VERIFY_CHECK(ctx != NULL); + return secp256k1_scratch_create(&ctx->error_callback, max_size); +} + +void secp256k1_scratch_space_destroy(secp256k1_scratch_space* scratch) { + secp256k1_scratch_destroy(scratch); +} + +static int secp256k1_pubkey_load(const secp256k1_context* ctx, secp256k1_ge* ge, const secp256k1_pubkey* pubkey) { + if (sizeof(secp256k1_ge_storage) == 64) { + /* When the secp256k1_ge_storage type is exactly 64 byte, use its + * representation inside secp256k1_pubkey, as conversion is very fast. + * Note that secp256k1_pubkey_save must use the same representation. */ + secp256k1_ge_storage s; + memcpy(&s, &pubkey->data[0], sizeof(s)); + secp256k1_ge_from_storage(ge, &s); + } else { + /* Otherwise, fall back to 32-byte big endian for X and Y. */ + secp256k1_fe x, y; + secp256k1_fe_set_b32(&x, pubkey->data); + secp256k1_fe_set_b32(&y, pubkey->data + 32); + secp256k1_ge_set_xy(ge, &x, &y); + } + ARG_CHECK(!secp256k1_fe_is_zero(&ge->x)); + return 1; +} + +static void secp256k1_pubkey_save(secp256k1_pubkey* pubkey, secp256k1_ge* ge) { + if (sizeof(secp256k1_ge_storage) == 64) { + secp256k1_ge_storage s; + secp256k1_ge_to_storage(&s, ge); + memcpy(&pubkey->data[0], &s, sizeof(s)); + } else { + VERIFY_CHECK(!secp256k1_ge_is_infinity(ge)); + secp256k1_fe_normalize_var(&ge->x); + secp256k1_fe_normalize_var(&ge->y); + secp256k1_fe_get_b32(pubkey->data, &ge->x); + secp256k1_fe_get_b32(pubkey->data + 32, &ge->y); + } +} + +int secp256k1_ec_pubkey_parse(const secp256k1_context* ctx, secp256k1_pubkey* pubkey, const unsigned char *input, size_t inputlen) { + secp256k1_ge Q; + + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(pubkey != NULL); + memset(pubkey, 0, sizeof(*pubkey)); + ARG_CHECK(input != NULL); + if (!secp256k1_eckey_pubkey_parse(&Q, input, inputlen)) { + return 0; + } + secp256k1_pubkey_save(pubkey, &Q); + secp256k1_ge_clear(&Q); + return 1; +} + +int secp256k1_ec_pubkey_serialize(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_pubkey* pubkey, unsigned int flags) { + secp256k1_ge Q; + size_t len; + int ret = 0; + + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(outputlen != NULL); + ARG_CHECK(*outputlen >= ((flags & SECP256K1_FLAGS_BIT_COMPRESSION) ? 33 : 65)); + len = *outputlen; + *outputlen = 0; + ARG_CHECK(output != NULL); + memset(output, 0, len); + ARG_CHECK(pubkey != NULL); + ARG_CHECK((flags & SECP256K1_FLAGS_TYPE_MASK) == SECP256K1_FLAGS_TYPE_COMPRESSION); + if (secp256k1_pubkey_load(ctx, &Q, pubkey)) { + ret = secp256k1_eckey_pubkey_serialize(&Q, output, &len, flags & SECP256K1_FLAGS_BIT_COMPRESSION); + if (ret) { + *outputlen = len; + } + } + return ret; +} + +static void secp256k1_ecdsa_signature_load(const secp256k1_context* ctx, secp256k1_scalar* r, secp256k1_scalar* s, const secp256k1_ecdsa_signature* sig) { + (void)ctx; + if (sizeof(secp256k1_scalar) == 32) { + /* When the secp256k1_scalar type is exactly 32 byte, use its + * representation inside secp256k1_ecdsa_signature, as conversion is very fast. + * Note that secp256k1_ecdsa_signature_save must use the same representation. */ + memcpy(r, &sig->data[0], 32); + memcpy(s, &sig->data[32], 32); + } else { + secp256k1_scalar_set_b32(r, &sig->data[0], NULL); + secp256k1_scalar_set_b32(s, &sig->data[32], NULL); + } +} + +static void secp256k1_ecdsa_signature_save(secp256k1_ecdsa_signature* sig, const secp256k1_scalar* r, const secp256k1_scalar* s) { + if (sizeof(secp256k1_scalar) == 32) { + memcpy(&sig->data[0], r, 32); + memcpy(&sig->data[32], s, 32); + } else { + secp256k1_scalar_get_b32(&sig->data[0], r); + secp256k1_scalar_get_b32(&sig->data[32], s); + } +} + +int secp256k1_ecdsa_signature_parse_der(const secp256k1_context* ctx, secp256k1_ecdsa_signature* sig, const unsigned char *input, size_t inputlen) { + secp256k1_scalar r, s; + + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(sig != NULL); + ARG_CHECK(input != NULL); + + if (secp256k1_ecdsa_sig_parse(&r, &s, input, inputlen)) { + secp256k1_ecdsa_signature_save(sig, &r, &s); + return 1; + } else { + memset(sig, 0, sizeof(*sig)); + return 0; + } +} + +int secp256k1_ecdsa_signature_parse_compact(const secp256k1_context* ctx, secp256k1_ecdsa_signature* sig, const unsigned char *input64) { + secp256k1_scalar r, s; + int ret = 1; + int overflow = 0; + + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(sig != NULL); + ARG_CHECK(input64 != NULL); + + secp256k1_scalar_set_b32(&r, &input64[0], &overflow); + ret &= !overflow; + secp256k1_scalar_set_b32(&s, &input64[32], &overflow); + ret &= !overflow; + if (ret) { + secp256k1_ecdsa_signature_save(sig, &r, &s); + } else { + memset(sig, 0, sizeof(*sig)); + } + return ret; +} + +int secp256k1_ecdsa_signature_serialize_der(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_ecdsa_signature* sig) { + secp256k1_scalar r, s; + + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(output != NULL); + ARG_CHECK(outputlen != NULL); + ARG_CHECK(sig != NULL); + + secp256k1_ecdsa_signature_load(ctx, &r, &s, sig); + return secp256k1_ecdsa_sig_serialize(output, outputlen, &r, &s); +} + +int secp256k1_ecdsa_signature_serialize_compact(const secp256k1_context* ctx, unsigned char *output64, const secp256k1_ecdsa_signature* sig) { + secp256k1_scalar r, s; + + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(output64 != NULL); + ARG_CHECK(sig != NULL); + + secp256k1_ecdsa_signature_load(ctx, &r, &s, sig); + secp256k1_scalar_get_b32(&output64[0], &r); + secp256k1_scalar_get_b32(&output64[32], &s); + return 1; +} + +int secp256k1_ecdsa_signature_normalize(const secp256k1_context* ctx, secp256k1_ecdsa_signature *sigout, const secp256k1_ecdsa_signature *sigin) { + secp256k1_scalar r, s; + int ret = 0; + + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(sigin != NULL); + + secp256k1_ecdsa_signature_load(ctx, &r, &s, sigin); + ret = secp256k1_scalar_is_high(&s); + if (sigout != NULL) { + if (ret) { + secp256k1_scalar_negate(&s, &s); + } + secp256k1_ecdsa_signature_save(sigout, &r, &s); + } + + return ret; +} + +int secp256k1_ecdsa_verify(const secp256k1_context* ctx, const secp256k1_ecdsa_signature *sig, const unsigned char *msg32, const secp256k1_pubkey *pubkey) { + secp256k1_ge q; + secp256k1_scalar r, s; + secp256k1_scalar m; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(sig != NULL); + ARG_CHECK(pubkey != NULL); + + secp256k1_scalar_set_b32(&m, msg32, NULL); + secp256k1_ecdsa_signature_load(ctx, &r, &s, sig); + return (!secp256k1_scalar_is_high(&s) && + secp256k1_pubkey_load(ctx, &q, pubkey) && + secp256k1_ecdsa_sig_verify(&ctx->ecmult_ctx, &r, &s, &q, &m)); +} + +static SECP256K1_INLINE void buffer_append(unsigned char *buf, unsigned int *offset, const void *data, unsigned int len) { + memcpy(buf + *offset, data, len); + *offset += len; +} + +static int nonce_function_rfc6979(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int counter) { + unsigned char keydata[112]; + unsigned int offset = 0; + secp256k1_rfc6979_hmac_sha256 rng; + unsigned int i; + /* We feed a byte array to the PRNG as input, consisting of: + * - the private key (32 bytes) and message (32 bytes), see RFC 6979 3.2d. + * - optionally 32 extra bytes of data, see RFC 6979 3.6 Additional Data. + * - optionally 16 extra bytes with the algorithm name. + * Because the arguments have distinct fixed lengths it is not possible for + * different argument mixtures to emulate each other and result in the same + * nonces. + */ + buffer_append(keydata, &offset, key32, 32); + buffer_append(keydata, &offset, msg32, 32); + if (data != NULL) { + buffer_append(keydata, &offset, data, 32); + } + if (algo16 != NULL) { + buffer_append(keydata, &offset, algo16, 16); + } + secp256k1_rfc6979_hmac_sha256_initialize(&rng, keydata, offset); + memset(keydata, 0, sizeof(keydata)); + for (i = 0; i <= counter; i++) { + secp256k1_rfc6979_hmac_sha256_generate(&rng, nonce32, 32); + } + secp256k1_rfc6979_hmac_sha256_finalize(&rng); + return 1; +} + +const secp256k1_nonce_function secp256k1_nonce_function_rfc6979 = nonce_function_rfc6979; +const secp256k1_nonce_function secp256k1_nonce_function_default = nonce_function_rfc6979; + +int secp256k1_ecdsa_sign(const secp256k1_context* ctx, secp256k1_ecdsa_signature *signature, const unsigned char *msg32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void* noncedata) { + secp256k1_scalar r, s; + secp256k1_scalar sec, non, msg; + int ret = 0; + int overflow = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(signature != NULL); + ARG_CHECK(seckey != NULL); + if (noncefp == NULL) { + noncefp = secp256k1_nonce_function_default; + } + + secp256k1_scalar_set_b32(&sec, seckey, &overflow); + /* Fail if the secret key is invalid. */ + if (!overflow && !secp256k1_scalar_is_zero(&sec)) { + unsigned char nonce32[32]; + unsigned int count = 0; + secp256k1_scalar_set_b32(&msg, msg32, NULL); + while (1) { + ret = noncefp(nonce32, msg32, seckey, NULL, (void*)noncedata, count); + if (!ret) { + break; + } + secp256k1_scalar_set_b32(&non, nonce32, &overflow); + if (!overflow && !secp256k1_scalar_is_zero(&non)) { + if (secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, &r, &s, &sec, &msg, &non, NULL)) { + break; + } + } + count++; + } + memset(nonce32, 0, 32); + secp256k1_scalar_clear(&msg); + secp256k1_scalar_clear(&non); + secp256k1_scalar_clear(&sec); + } + if (ret) { + secp256k1_ecdsa_signature_save(signature, &r, &s); + } else { + memset(signature, 0, sizeof(*signature)); + } + return ret; +} + +int secp256k1_ec_seckey_verify(const secp256k1_context* ctx, const unsigned char *seckey) { + secp256k1_scalar sec; + int ret; + int overflow; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(seckey != NULL); + + secp256k1_scalar_set_b32(&sec, seckey, &overflow); + ret = !overflow && !secp256k1_scalar_is_zero(&sec); + secp256k1_scalar_clear(&sec); + return ret; +} + +int secp256k1_ec_pubkey_create(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *seckey) { + secp256k1_gej pj; + secp256k1_ge p; + secp256k1_scalar sec; + int overflow; + int ret = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(pubkey != NULL); + memset(pubkey, 0, sizeof(*pubkey)); + ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); + ARG_CHECK(seckey != NULL); + + secp256k1_scalar_set_b32(&sec, seckey, &overflow); + ret = (!overflow) & (!secp256k1_scalar_is_zero(&sec)); + if (ret) { + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &pj, &sec); + secp256k1_ge_set_gej(&p, &pj); + secp256k1_pubkey_save(pubkey, &p); + } + secp256k1_scalar_clear(&sec); + return ret; +} + +int secp256k1_ec_privkey_negate(const secp256k1_context* ctx, unsigned char *seckey) { + secp256k1_scalar sec; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(seckey != NULL); + + secp256k1_scalar_set_b32(&sec, seckey, NULL); + secp256k1_scalar_negate(&sec, &sec); + secp256k1_scalar_get_b32(seckey, &sec); + + return 1; +} + +int secp256k1_ec_pubkey_negate(const secp256k1_context* ctx, secp256k1_pubkey *pubkey) { + int ret = 0; + secp256k1_ge p; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(pubkey != NULL); + + ret = secp256k1_pubkey_load(ctx, &p, pubkey); + memset(pubkey, 0, sizeof(*pubkey)); + if (ret) { + secp256k1_ge_neg(&p, &p); + secp256k1_pubkey_save(pubkey, &p); + } + return ret; +} + +int secp256k1_ec_privkey_tweak_add(const secp256k1_context* ctx, unsigned char *seckey, const unsigned char *tweak) { + secp256k1_scalar term; + secp256k1_scalar sec; + int ret = 0; + int overflow = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(seckey != NULL); + ARG_CHECK(tweak != NULL); + + secp256k1_scalar_set_b32(&term, tweak, &overflow); + secp256k1_scalar_set_b32(&sec, seckey, NULL); + + ret = !overflow && secp256k1_eckey_privkey_tweak_add(&sec, &term); + memset(seckey, 0, 32); + if (ret) { + secp256k1_scalar_get_b32(seckey, &sec); + } + + secp256k1_scalar_clear(&sec); + secp256k1_scalar_clear(&term); + return ret; +} + +int secp256k1_ec_pubkey_tweak_add(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *tweak) { + secp256k1_ge p; + secp256k1_scalar term; + int ret = 0; + int overflow = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx)); + ARG_CHECK(pubkey != NULL); + ARG_CHECK(tweak != NULL); + + secp256k1_scalar_set_b32(&term, tweak, &overflow); + ret = !overflow && secp256k1_pubkey_load(ctx, &p, pubkey); + memset(pubkey, 0, sizeof(*pubkey)); + if (ret) { + if (secp256k1_eckey_pubkey_tweak_add(&ctx->ecmult_ctx, &p, &term)) { + secp256k1_pubkey_save(pubkey, &p); + } else { + ret = 0; + } + } + + return ret; +} + +int secp256k1_ec_privkey_tweak_mul(const secp256k1_context* ctx, unsigned char *seckey, const unsigned char *tweak) { + secp256k1_scalar factor; + secp256k1_scalar sec; + int ret = 0; + int overflow = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(seckey != NULL); + ARG_CHECK(tweak != NULL); + + secp256k1_scalar_set_b32(&factor, tweak, &overflow); + secp256k1_scalar_set_b32(&sec, seckey, NULL); + ret = !overflow && secp256k1_eckey_privkey_tweak_mul(&sec, &factor); + memset(seckey, 0, 32); + if (ret) { + secp256k1_scalar_get_b32(seckey, &sec); + } + + secp256k1_scalar_clear(&sec); + secp256k1_scalar_clear(&factor); + return ret; +} + +int secp256k1_ec_pubkey_tweak_mul(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *tweak) { + secp256k1_ge p; + secp256k1_scalar factor; + int ret = 0; + int overflow = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx)); + ARG_CHECK(pubkey != NULL); + ARG_CHECK(tweak != NULL); + + secp256k1_scalar_set_b32(&factor, tweak, &overflow); + ret = !overflow && secp256k1_pubkey_load(ctx, &p, pubkey); + memset(pubkey, 0, sizeof(*pubkey)); + if (ret) { + if (secp256k1_eckey_pubkey_tweak_mul(&ctx->ecmult_ctx, &p, &factor)) { + secp256k1_pubkey_save(pubkey, &p); + } else { + ret = 0; + } + } + + return ret; +} + +int secp256k1_context_randomize(secp256k1_context* ctx, const unsigned char *seed32) { + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); + secp256k1_ecmult_gen_blind(&ctx->ecmult_gen_ctx, seed32); + return 1; +} + +int secp256k1_ec_pubkey_combine(const secp256k1_context* ctx, secp256k1_pubkey *pubnonce, const secp256k1_pubkey * const *pubnonces, size_t n) { + size_t i; + secp256k1_gej Qj; + secp256k1_ge Q; + + ARG_CHECK(pubnonce != NULL); + memset(pubnonce, 0, sizeof(*pubnonce)); + ARG_CHECK(n >= 1); + ARG_CHECK(pubnonces != NULL); + + secp256k1_gej_set_infinity(&Qj); + + for (i = 0; i < n; i++) { + secp256k1_pubkey_load(ctx, &Q, pubnonces[i]); + secp256k1_gej_add_ge(&Qj, &Qj, &Q); + } + if (secp256k1_gej_is_infinity(&Qj)) { + return 0; + } + secp256k1_ge_set_gej(&Q, &Qj); + secp256k1_pubkey_save(pubnonce, &Q); + return 1; +} + +#ifdef ENABLE_MODULE_ECDH +# include "modules/ecdh/main_impl.h" +#endif + +#ifdef ENABLE_MODULE_RECOVERY +# include "modules/recovery/main_impl.h" +#endif diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/util.h b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/util.h new file mode 100644 index 000000000..e0147500f --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/Classes/secp256k1/src/util.h @@ -0,0 +1,121 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_UTIL_H +#define SECP256K1_UTIL_H + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#include +#include +#include + +typedef struct { + void (*fn)(const char *text, void* data); + const void* data; +} secp256k1_callback; + +static SECP256K1_INLINE void secp256k1_callback_call(const secp256k1_callback * const cb, const char * const text) { + cb->fn(text, (void*)cb->data); +} + +#ifdef DETERMINISTIC +#define TEST_FAILURE(msg) do { \ + fprintf(stderr, "%s\n", msg); \ + abort(); \ +} while(0); +#else +#define TEST_FAILURE(msg) do { \ + fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, msg); \ + abort(); \ +} while(0) +#endif + +#ifdef HAVE_BUILTIN_EXPECT +#define EXPECT(x,c) __builtin_expect((x),(c)) +#else +#define EXPECT(x,c) (x) +#endif + +#ifdef DETERMINISTIC +#define CHECK(cond) do { \ + if (EXPECT(!(cond), 0)) { \ + TEST_FAILURE("test condition failed"); \ + } \ +} while(0) +#else +#define CHECK(cond) do { \ + if (EXPECT(!(cond), 0)) { \ + TEST_FAILURE("test condition failed: " #cond); \ + } \ +} while(0) +#endif + +/* Like assert(), but when VERIFY is defined, and side-effect safe. */ +#if defined(COVERAGE) +#define VERIFY_CHECK(check) +#define VERIFY_SETUP(stmt) +#elif defined(VERIFY) +#define VERIFY_CHECK CHECK +#define VERIFY_SETUP(stmt) do { stmt; } while(0) +#else +#define VERIFY_CHECK(cond) do { (void)(cond); } while(0) +#define VERIFY_SETUP(stmt) +#endif + +static SECP256K1_INLINE void *checked_malloc(const secp256k1_callback* cb, size_t size) { + void *ret = malloc(size); + if (ret == NULL) { + secp256k1_callback_call(cb, "Out of memory"); + } + return ret; +} + +static SECP256K1_INLINE void *checked_realloc(const secp256k1_callback* cb, void *ptr, size_t size) { + void *ret = realloc(ptr, size); + if (ret == NULL) { + secp256k1_callback_call(cb, "Out of memory"); + } + return ret; +} + +/* Macro for restrict, when available and not in a VERIFY build. */ +#if defined(SECP256K1_BUILD) && defined(VERIFY) +# define SECP256K1_RESTRICT +#else +# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) +# if SECP256K1_GNUC_PREREQ(3,0) +# define SECP256K1_RESTRICT __restrict__ +# elif (defined(_MSC_VER) && _MSC_VER >= 1400) +# define SECP256K1_RESTRICT __restrict +# else +# define SECP256K1_RESTRICT +# endif +# else +# define SECP256K1_RESTRICT restrict +# endif +#endif + +#if defined(_WIN32) +# define I64FORMAT "I64d" +# define I64uFORMAT "I64u" +#else +# define I64FORMAT "lld" +# define I64uFORMAT "llu" +#endif + +#if defined(HAVE___INT128) +# if defined(__GNUC__) +# define SECP256K1_GNUC_EXT __extension__ +# else +# define SECP256K1_GNUC_EXT +# endif +SECP256K1_GNUC_EXT typedef unsigned __int128 uint128_t; +#endif + +#endif /* SECP256K1_UTIL_H */ diff --git a/Example/web3swiftExample/Pods/secp256k1_swift/LICENSE b/Example/web3swiftExample/Pods/secp256k1_swift/LICENSE new file mode 100755 index 000000000..9495745f7 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/LICENSE @@ -0,0 +1,13 @@ +Copyright 2018 Alex Vlasov (bankexfoundation.org) + +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/Example/web3swiftExample/Pods/secp256k1_swift/README.md b/Example/web3swiftExample/Pods/secp256k1_swift/README.md new file mode 100755 index 000000000..f677b5a81 --- /dev/null +++ b/Example/web3swiftExample/Pods/secp256k1_swift/README.md @@ -0,0 +1,8 @@ +# secp256k1_swift + +## Usage + +Add to the Podfile +``` +pod 'secp256k1_swift', '~> 1.0.0' +``` diff --git a/Example/web3swiftExample/Pods/web3swift/LICENSE b/Example/web3swiftExample/Pods/web3swift/LICENSE index 973ff5a9f..ed25277cc 100755 --- a/Example/web3swiftExample/Pods/web3swift/LICENSE +++ b/Example/web3swiftExample/Pods/web3swift/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018 Aleksandr Vlasov, Stichting Bankex Foundation +Copyright (c) 2018 Aleksandr Vlasov, Apache License Version 2.0, January 2004 @@ -188,7 +188,7 @@ Copyright (c) 2018 Aleksandr Vlasov, Stichting Bankex Foundation [Ask questions](https://stackoverflow.com/questions/tagged/web3swift) -## Important notices -The work for 2.0 release is about to start. Ideas for new more Swift idiomatic API are welcome in issues. +![matter-github-swift](https://github.com/matterinc/web3swift/blob/develop/web3swift-logo.png) # web3swift [![Version](https://img.shields.io/cocoapods/v/web3swift.svg?style=flat)](http://cocoapods.org/pods/web3swift) [![License](https://img.shields.io/cocoapods/l/web3swift.svg?style=flat)](http://cocoapods.org/pods/web3swift) [![Platform](https://img.shields.io/cocoapods/p/web3swift.svg?style=flat)](http://cocoapods.org/pods/web3swift) -[![support](https://brianmacdonald.github.io/Ethonate/svg/eth-support-blue.svg)](https://brianmacdonald.github.io/Ethonate/address#0x6394b37Cf80A7358b38068f0CA4760ad49983a1B) +[![support](https://brianmacdonald.github.io/Ethonate/svg/eth-support-blue.svg)](https://brianmacdonald.github.io/Ethonate/address#0xe22b8979739d724343bd002f9f432f5990879901) +[![Build Status](https://travis-ci.com/matterinc/web3swift.svg?branch=develop)](https://travis-ci.com/matterinc/web3swift) + +[Ask questions](https://stackoverflow.com/questions/tagged/web3swift) **web3swift** is your toolbelt for any kind interactions with Ethereum network. -- [web3swift](#web3swift) -+ [Features:](#features-) -* [Design decisions](#design-decisions) -* [Example](#example) -* [Installation](#installation) -+ [Requirements](#requirements) -+ [CocoaPods](#cocoapods) -* [Getting started](#getting-started) -+ [Create Account](#create-account) -+ [Save keystore to the memory](#save-keystore-to-the-memory) -+ [Initializing Ethereum address](#initializing-ethereum-address) -+ [Setting options](#setting-options) -+ [Encoding Transaction](#encoding-transaction) -+ [Signing Transaction](#signing-transaction) -+ [Getting ETH balance](#getting-eth-balance) -+ [Getting gas price](#getting-gas-price) -+ [Sending ETH](#sending-eth) -+ [ERC20 Iteraction:](#erc20-iteraction-) -- [Getting ERC20 token balance](#getting-erc20-token-balance) -- [Sending ERC20](#sending-erc20) -* [Apps using this library](#apps-using-this-library) -* [Future plans](#future-plans) -+ [Extra features:](#extra-features-) -* [Stay in touch](#stay-in-touch) -+ [Contribution](#contribution) -+ [Communication](#communication) -+ [Special thanks to](#special-thanks-to) -* [Authors](#authors) -* [License](#license) - - -### Features: - -- Swift implementation of [web3.js](https://github.com/ethereum/web3.js/) functionality :zap: -- Interaction with remote node via JSON RPC :thought_balloon: -- Smart-contract ABI parsing :book: -- ABI deconding (V2 is supported with return of structures from public functions. Part of 0.4.22 Solidity compiler) -- RLP encoding -- Interactions (read/write to Smart contracts) :arrows_counterclockwise: -- Local keystore management (`geth` compatible) -- Literally following the standards: -- [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) HD Wallets: Deterministic Wallet -- [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) (Seed phrases) -- [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) (Key generation prefixes) -- [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md) (Replay attacks protection) *enforced!* - -**Account Managment:** -- [x] Create Account -- [x] Import Account -- [x] Manage user's private keys through encrypted keystore abstractions - -**Transactions operations:** -- [x] Sign transactions -- [x] Send transactions, call functions of smart-contracts, estimate gas costs -- [x] Serialize and deserialize transactions and results to native Swift types -- [x] Check transaction results and get the receipt -- [x] Parse event logs for the transaction -- [x] Convenience functions for chain state: block number, gas price -- [x] Batched requests in concurrent mode, check balances of 580 tokens (from the latest MyEtherWallet repo) over 3 seconds - - -## Design decisions + * [Features](#features) + * [Design Decisions](#design-decisions) + * [Requirements](#requirements) + * [Migration Guides](#migration-guides) + * [Communication](#communication) + * [Installation](#installation) + + [CocoaPods](#cocoapods) + + [Carthage](#carthage) + * [Example Project](#example-project) + * [Credits](#credits) + + [Security Disclosure](#security-disclosure) + * [Donations](#donations) + * [License](#license) + +--- + - [Usage Doc](https://github.com/matterinc/web3swift/blob/feature/readmeImprovement/Documentation/Usage.md) + - **Account Management** + - [Create Account](https://github.com/matterinc/web3swift/blob/feature/readmeImprovement/Documentation/Usage.md#create-account) + - [Import Account](https://github.com/matterinc/web3swift/blob/feature/readmeImprovement/Documentation/Usage.md#import-account) + - [Manage Keystore](https://github.com/matterinc/web3swift/blob/feature/readmeImprovement/Documentation/Usage.md#manage-keystore) + - [Ethereum Address](https://github.com/matterinc/web3swift/blob/feature/readmeImprovement/Documentation/Usage.md#ethereum-address) + - [Get Balance](https://github.com/matterinc/web3swift/blob/feature/readmeImprovement/Documentation/Usage.md#get-balance) + - **Transactions Operations** + - [Prepare Transaction](https://github.com/matterinc/web3swift/blob/feature/readmeImprovement/Documentation/Usage.md#prepare-transaction) + - [Send Transaction](https://github.com/matterinc/web3swift/blob/feature/readmeImprovement/Documentation/Usage.md#send-transaction) + - **Chain State** + - [Get Block Number](https://github.com/matterinc/web3swift/blob/feature/readmeImprovement/Documentation/Usage.md#get-block-number) + + +## Features + +- [x] Swift implementation of [web3.js](https://github.com/ethereum/web3.js/) functionality :zap: +- [x] Interaction with remote node via JSON RPC :thought_balloon: +- [x] Smart-contract ABI parsing :book: +- [x] ABI deconding (V2 is supported with return of structures from public functions. Part of 0.4.22 Solidity compiler) +- [x] RLP encoding +- [x] Interactions (read/write to Smart contracts) :arrows_counterclockwise: +- [x] Local keystore management (`geth` compatible) +- [x] Batched requests in concurrent mode +- [x] Literally following the standards: + - [x] [BIP32](https://github.com/bitcoin/bips/blob/feature/readmeImprovement/bip-0032.mediawiki) HD Wallets: Deterministic Wallet + - [x] [BIP39](https://github.com/bitcoin/bips/blob/feature/readmeImprovement/bip-0039.mediawiki) (Seed phrases) + - [x] [BIP44](https://github.com/bitcoin/bips/blob/feature/readmeImprovement/bip-0044.mediawiki) (Key generation prefixes) + - [x] [EIP-155](https://github.com/ethereum/EIPs/blob/feature/readmeImprovement/EIPS/eip-155.md) (Replay attacks protection) *enforced!* +- [x] Comprehensive Unit and Integration Test Coverage +- [x] [Complete Documentation](https://web3swift.github.io/web3swift) + +## Design Decisions - Not every JSON RPC function is exposed yet, and priority is given to the ones required for mobile devices - Functionality was focused on serializing and signing transactions locally on the device to send raw transactions to Ethereum network - Requirements for password input on every transaction are indeed a design decision. Interface designers can save user passwords with the user's consent - Public function for private key export is exposed for user convenience but marked as UNSAFE_ :) Normal workflow takes care of EIP155 compatibility and proper clearing of private key data from memory -## Example +## Requirements -You can try it yourself by running the example project: +- iOS 9.0+ / macOS 10.11+ +- Xcode 9.0+ +- Swift 4.1+ -- Clone the repo: `git clone https://github.com/matterinc/web3swift.git` -- Move to the repo: `cd web3swift/Example/web3swiftExample` -- Install Dependencies: `pod install` -- Open: `open ./web3swiftExample.xcworkspace` +## Migration Guides +- [web3swift 2.0 Migration Guide](https://github.com/matterinc/web3swift/blob/feature/readmeImprovement/Documentation/web3swift%202.0%20Migration%20Guide.md) -## Installation +## Communication -### Requirements +When using this lib, please make references to this repo and give your start! :) +*Nothing makes developers happier than seeing someone else use our work and go wild with it.* + +If you are using web3swift in your app or know of an app that uses it, please add it to [this list](https://github.com/matterinc/web3swift/wiki/Apps-using-web3swift). + +- If you **need help**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/web3swift) and tag `web3swift`. +- If you need to **find or understand an API**, check [our documentation](http://web3swift.github.io/web3swift/). +- If you'd like to **see web3swift best practices**, check [Apps using this library](https://github.com/matterinc/web3swift/wiki/Apps-using-web3swift). +- If you **found a bug**, [open an issue](https://github.com/matterinc/web3swift/issues). +- If you **have a feature request**, [open an issue](https://github.com/matterinc/web3swift/issues). +- If you **want to contribute**, [submit a pull request](https://github.com/matterinc/web3swift/pulls). -Web3swift requires `Swift 4.1` and `iOS 9.0` or `macOS 10.11` although we recommend using the latest iOS and MacOS versions for your safety. Don't forget to set the iOS version in a Podfile. Otherwise, you get an error if the deployment target is less than the latest SDK. +## Installation ### CocoaPods @@ -122,205 +119,54 @@ Then, run the following command: $ pod install ``` -## Getting started +### Carthage -Here are a few use cases: +[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. -### Create Account - -```swift - // Create keystore and account with password. - - let keystore = try! EthereumKeystoreV3(password: "changeme"); // generates a private key internally if node "privateKey" parameter supplied - let account = keystore!.addresses![0] - print(account) - - let data = try! keystore!.serialize() // internally serializes to JSON - print(try! JSONSerialization.jsonObject(with: data!, options: JSONSerialization.ReadingOptions(rawValue:0))) - let key = try! keystore!.UNSAFE_getPrivateKeyData(password: "changeme", account: account) // you should rarely use this and expose a key manually -``` +You can install Carthage with [Homebrew](https://brew.sh/) using the following command: -### Save keystore to the memory - -```swift -//First you need a `KeystoreManager` instance: -guard let userDirectory = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first, - let keystoreManager = KeystoreManager.managerForPath(userDirectory + "/keystore") -else { - fatalError("Couldn't create a KeystoreManager.") -} - -//Next you create a new Keystore: - -let newKeystore = try? EthereumKeystoreV3(password: "YOUR_PASSWORD") - -// Then you save the created keystore to the file system: - -let newKeystoreJSON = try? JSONEncoder().encode(newKeystore.keystoreParams) -FileManager.default.createFile(atPath: "\(keystoreManager.path)/keystore.json", contents: newKeystoreJSON, attributes: nil) - -// Later you can retreive it: - -if let address = keystoreManager.addresses?.first, -let retrievedKeystore = keystoreManager.walletForAddress(address) as? EthereumKeystoreV3 { - return retrievedKeystore -} -``` - -### Initializing Ethereum address -```swift -let coldWalletAddress = EthereumAddress("0x6394b37Cf80A7358b38068f0CA4760ad49983a1B") -let constractAddress = EthereumAddress("0x45245bc59219eeaaf6cd3f382e078a461ff9de7b", ignoreChecksum: true) -``` -Ethereum addresses are checksum checked if they are not lowercased or uppercased and always length checked - -### Setting options - -```swift -var options = Web3Options.defaultOptions() - // public var to: EthereumAddress? = nil - to what address transaction is aimed - // public var from: EthereumAddress? = nil - form what address it should be sent (either signed locally or on the node) - // public var gasLimit: BigUInt? = BigUInt(90000) - default gas limit - // public var gasPrice: BigUInt? = BigUInt(5000000000) - default gas price, quite small - // public var value: BigUInt? = BigUInt(0) - amount of WEI sent along the transaction -options.gasPrice = gasPrice -options.gasLimit = gasLimit -options.from = EthereumAddress("0xE6877A4d8806e9A9F12eB2e8561EA6c1db19978d") -``` - -### Encoding Transaction - -``` -//TODO -``` - -### Signing Transaction - -``` -//TODO -``` -### Getting ETH balance -```swift -let address = EthereumAddress("0xE6877A4d8806e9A9F12eB2e8561EA6c1db19978d")! -let web3Main = Web3.InfuraMainnetWeb3() -let balanceResult = web3Main.eth.getBalance(address) -guard case .success(let balance) = balanceResult else {return} -``` -### Getting gas price -```swift -let web3Main = Web3.InfuraMainnetWeb3() -let gasPriceResult = web3Main.eth.getGasPrice() -guard case .success(let gasPrice) = gasPriceResult else {return} -``` - -### Sending ETH -```swift -let web3Rinkeby = Web3.InfuraRinkebyWeb3() -web3Rinkeby.addKeystoreManager(bip32keystoreManager) // attach a keystore if you want to sign locally. Otherwise unsigned request will be sent to remote node -options.from = bip32ks?.addresses?.first! // specify from what address you want to send it -intermediateSend = web3Rinkeby.contract(Web3.Utils.coldWalletABI, at: coldWalletAddress, abiVersion: 2)!.method(options: options)! // an address with a private key attached in not different from any other address, just has very simple ABI -let sendResultBip32 = intermediateSend.send(password: "changeme") +```bash +$ brew update +$ brew install carthage ``` -### ERC20 Iteraction: - -#### Getting ERC20 token balance -```swift -let contractAddress = EthereumAddress("0x45245bc59219eeaaf6cd3f382e078a461ff9de7b")! // BKX token on Ethereum mainnet -let contract = web3.contract(Web3.Utils.erc20ABI, at: contractAddress, abiVersion: 2)! // utilize precompiled ERC20 ABI for your concenience -guard let bkxBalanceResult = contract.method("balanceOf", parameters: [coldWalletAddress] as [AnyObject], options: options)?.call(options: nil) else {return} // encode parameters for transaction -guard case .success(let bkxBalance) = bkxBalanceResult, let bal = bkxBalance["0"] as? BigUInt else {return} // bkxBalance is [String: Any], and parameters are enumerated as "0", "1", etc in order of being returned. If returned parameter has a name in ABI, it is also duplicated -print("BKX token balance = " + String(bal)) -``` +To integrate web3swift into your Xcode project using Carthage, specify it in your `Cartfile`: -#### Sending ERC20 -```swift -var convenienceTransferOptions = Web3Options.defaultOptions() -convenienceTransferOptions.gasPrice = gasPriceRinkeby -let convenienceTokenTransfer = web3Rinkeby.eth.sendERC20tokensWithNaturalUnits(tokenAddress: EthereumAddress("0xa407dd0cbc9f9d20cdbd557686625e586c85b20a")!, from: (ks?.addresses?.first!)!, to: EthereumAddress("0x6394b37Cf80A7358b38068f0CA4760ad49983a1B")!, amount: "0.0001", options: convenienceTransferOptions) // there are also convenience functions to send ETH and ERC20 under the .eth structure -let gasEstimateResult = convenienceTokenTransfer!.estimateGas(options: nil) -guard case .success(let gasEstimate) = gasEstimateResult else {return} -convenienceTransferOptions.gasLimit = gasEstimate -let convenienceTransferResult = convenienceTokenTransfer!.send(password: "changeme", options: convenienceTransferOptions) -switch convenienceTransferResult { - case .success(let res): - print("Token transfer successful") - print(res) - case .failure(let error): - print(error) -} +```ogdl +github "matterinc/web3swift" "carthage" ``` -## Apps using this library - -If you are using `web3swift` in your app or know of an app that uses it, please add it to this list: [Apps using this library](https://github.com/matterinc/web3swift/wiki/Apps-using-web3swift) -It would be much appreciated! 👍 - -Here is some examples: - -* [MEWconnect-iOS](https://github.com/MyEtherWallet/MEWconnect-iOS) -* [Peepeth iOS client](https://github.com/matterinc/PeepethClient) -* [Ethereum & ERC20Tokens Wallet](https://itunes.apple.com/us/app/ethereum-erc20tokens-wallet/id1386738877?ls=1&mt=8) -* [BankexWallet](https://github.com/BANKEX/Pay-iOS) -* [GeoChain](https://github.com/awallish/GeoChain) -* [TRX-Wallet](https://github.com/NewHorizonLabs/TRX-Wallet) -* [YOUR APP CAN BE THERE (click me)](https://github.com/matterinc/web3swift/wiki/Apps-using-web3swift/_edit) :wink: - -If you've used this project in a live app, please let us know! - -*If you are using `web3swift` in your app or know of an app that uses it, please add it to [this](https://github.com/matterinc/web3swift/wiki/Apps-using-web3swift) list.* - - - -## Plans - -- Full reference `web3js` functionality -- Light Ethereum subprotocol (LES) integration - - -### Extra features: - -For the latest version, please check [develop](https://github.com/matterinc/web3swift/tree/develop) branch. -Changes made to this branch will be merged into the [master](https://github.com/matterinc/web3swift/tree/master) branch at some point. - ---- - - -## Stay in touch - -When using this pod, please make references to this repo and give your start! :) -*Nothing makes developers happier than seeing someone else use our work and go wild with it.* +Run `carthage update` to build the framework and drag the built `web3swift.framework` into your Xcode project. +## Example Project -If you are using web3swift in your app or know of an app that uses it, please add it to [this list](https://github.com/matterinc/web3swift/wiki/Apps-using-web3swift). - - -### Contribution +You can try lib by running the example project: +- Clone the repo: `git clone https://github.com/matterinc/web3swift.git` +- Move to the repo: `cd web3swift/Example/web3swiftExample` +- Install Dependencies: `pod install` +- Open: `open ./web3swiftExample.xcworkspace` -- If you **have a feature request**, [open an issue](https://github.com/matterinc/web3swift/issues). -- If you **want to contribute**, [submit a pull request](https://github.com/matterinc/web3swift/pulls). +## Credits +Alex Vlasov, [@shamatar](https://github.com/shamatar), alex.m.vlasov@gmail.com -### Communication +Petr Korolev, [@skywinder](https://github.com/skywinder) -- if you **need help**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/web3swift) (tag 'web3swift') -- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/web3swift). -- If you **found a bug**, [open an issue](https://github.com/matterinc/web3swift/issues). +### Security Disclosure +If you believe you have identified a security vulnerability with web3swift, you should report it as soon as possible via email to [Alex Vlasov](https://github.com/shamatar) alex.m.vlasov@gmail.com. Please do not post it to a public issue tracker. -### Special thanks to +## Donations -- Gnosis team and their library [Bivrost-swift](https://github.com/gnosis/bivrost-swift) for inspiration for the ABI decoding approach -- [Trust iOS Wallet](https://github.com/TrustWallet/trust-wallet-ios) for the collaboration and discussion of the initial idea -- Official Ethereum and Solidity docs, everything was written from ground truth standards -- -## Authors +[The Matters](https://github.com/orgs/matterinc/people) are charged with open-sorсe and do not require money for using their web3swift lib. +We want to continue to do everything we can to move the needle forward. +If you use any of our libraries for work, see if your employers would be interested in donating. Any amount you can donate today to help us reach our goal would be greatly appreciated. -Alex Vlasov, [@shamatar](https://github.com/shamatar), alex.m.vlasov@gmail.com +Our Ether wallet address: 0xe22b8979739d724343bd002f9f432f5990879901 -Petr Korolev, [@skywinder](https://github.com/skywinder) +![Donate](http://qrcoder.ru/code/?0xe22b8979739d724343bd002f9f432f5990879901&4&0) ## License -web3swift is available under the Apache License 2.0 license. See the [LICENSE](https://github.com/matterinc/web3swift/blob/master/LICENSE) file for more info. +web3swift is available under the Apache License 2.0 license. See the [LICENSE](https://github.com/matterinc/web3swift/blob/feature/readmeImprovement/LICENSE) for details. diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2.swift deleted file mode 100755 index 4f07a778f..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ABIv2/Classes/ABIv2.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// ABIv2.swift -// web3swift -// -// Created by Alexander Vlasov on 02.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation - -protocol ABIv2ElementPropertiesProtocol { - var isStatic: Bool {get} - var isArray: Bool {get} - var isTuple: Bool {get} - var arraySize: ABIv2.Element.ArraySize {get} - var subtype: ABIv2.Element.ParameterType? {get} - var memoryUsage: UInt64 {get} - var emptyValue: Any {get} -} - -protocol ABIv2Encoding { - var abiRepresentation: String {get} -} - -protocol ABIv2Validation { - var isValid: Bool {get} -} - -public struct ABIv2 { - -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/BlockExplorer/Classes/BlockExplorer+GetTransactionHistory.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/BlockExplorer/Classes/BlockExplorer+GetTransactionHistory.swift deleted file mode 100755 index ea373d36e..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/BlockExplorer/Classes/BlockExplorer+GetTransactionHistory.swift +++ /dev/null @@ -1,244 +0,0 @@ -// -// BlockExporter+GetTransactionHistory.swift -// web3swift-iOS -// -// Created by Георгий Фесенко on 19/06/2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation -import PromiseKit -import BigInt - -@available(*, deprecated) -extension BlockExplorer { - public func getTransactionHistory(address: EthereumAddress, tokenName name: String = "Ether", page: Int = 1, size: Int = 50) -> Promise<[TransactionHistoryRecord]> { - let address = address.address - return getTransactionsHistory(address: address, tokenName: name, page: page, size: size) - } - - public func getTransactionsHistory(address publicAddress: String, tokenName name: String = "Ether", page: Int = 1, size: Int = 50) -> Promise<[TransactionHistoryRecord]> { - - //Configuring http request - let listId: ListId = (name == "Ether") ? .listOfETH : .listOfTokens - let url = URL(string: urlStringList)! - var request = URLRequest(url: url) - request.httpMethod = "POST" - let internalParams = InternalParam(entityId: publicAddress, page: page, size: size) - let parameters = Body(listId: listId.rawValue, moduleId: "address", params: internalParams) - - return Promise<[TransactionHistoryRecord]> {seal in - do { - request.httpBody = try JSONEncoder().encode(parameters) - } catch { - seal.reject(error) - } - //Performing the request - let task = URLSession.shared.dataTask(with: request, completionHandler: { (data, response, error) in - if let error = error { seal.reject(error); return } - guard let data = data else { return } - - do { - //Parsing JSON - let jsonResponce = try JSONDecoder().decode(Response.self, from: data) - if listId == .listOfETH { - seal.fulfill(jsonResponce.rows) - } else { - seal.fulfill( jsonResponce.rows.filter { $0.token.name == name } ) - } - } catch { - seal.reject(error) - } - }) - task.resume() - } - } -} - -//MARK: - Decodable structures - -public struct Response: Decodable { - let rows: [TransactionHistoryRecord] - let head: Head -} - -public struct TransactionHistoryRecord: Decodable { - - public let id: String - public let hash: Data - public let block: BigUInt - public let addressFrom: EthereumAddress - public let addressTo: EthereumAddress - public let isoTime: String - public let type: TransactionType - public let status: TransactionStatus - public let error: String - public let isContract: Bool - public let isInner: Bool - public let value: BigUInt // in wei - public let token: Token - public let txFee: BigUInt // in wei - public let gasUsed: BigUInt // in wei - public let gasCost: BigUInt // in wei - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - id = try container.decode(String.self, forKey: CodingKeys.id) - let hashString = try container.decode(String.self, forKey: CodingKeys.hash) - guard let hashData = Data.fromHex(hashString) else { - throw Web3Error.transactionSerializationError - } - hash = hashData - let intBlock = try container.decode(UInt64.self, forKey: CodingKeys.block) - block = BigUInt.init(integerLiteral: intBlock) - var stringAddressFrom = try container.decode(String.self, forKey: CodingKeys.addressFrom) - if !stringAddressFrom.hasHexPrefix() { - stringAddressFrom = stringAddressFrom.addHexPrefix() - } - guard let nativeAddressFrom = EthereumAddress(stringAddressFrom) else { - throw Web3Error.transactionSerializationError - } - addressFrom = nativeAddressFrom - var stringAddressTo = try container.decode(String.self, forKey: CodingKeys.addressTo) - if !stringAddressTo.hasHexPrefix() { - stringAddressTo = stringAddressTo.addHexPrefix() - } - guard let nativeAddressTo = EthereumAddress(stringAddressTo) else { - throw Web3Error.transactionSerializationError - } - addressTo = nativeAddressTo - isoTime = try container.decode(String.self, forKey: CodingKeys.isoTime) - let stringType = try container.decode(String.self, forKey: CodingKeys.type) - var nativeType: TransactionType - switch stringType { - case "tx": - nativeType = .tx - case "call": - nativeType = .call - case "create": - nativeType = .create - case "suicide": - nativeType = .suicide - case "token": - nativeType = .token - default: - nativeType = .tx - } - type = nativeType - - let intStatus = try container.decode(Int.self, forKey: CodingKeys.status) - status = intStatus == 0 ? .failed : .succeeded - error = try container.decode(String.self, forKey: CodingKeys.error) - let intIsContract = try container.decode(Int.self, forKey: CodingKeys.isContract) - isContract = intIsContract == 0 ? false : true - let intIsInner = try container.decode(Int.self, forKey: CodingKeys.isInner) - isInner = intIsInner == 0 ? false : true - let stringValue = try container.decode(String.self, forKey: CodingKeys.value) - guard let uintValue = UInt64(stringValue, radix: 16) else { - throw Web3Error.transactionSerializationError - } - value = BigUInt(integerLiteral: uintValue) - token = try container.decode(Token.self, forKey: CodingKeys.token) - let stringTxFee = try container.decode(String.self, forKey: CodingKeys.txFee) - guard let uintTxFee = UInt64(stringTxFee, radix: 16) else { - throw Web3Error.transactionSerializationError - } - - txFee = BigUInt.init(integerLiteral: uintTxFee) - let intGasUsed = try container.decode(UInt64.self, forKey: CodingKeys.gasUsed) - gasUsed = BigUInt(integerLiteral: intGasUsed) - let intGasCost = try container.decode(UInt64.self, forKey: CodingKeys.gasCost) - gasCost = BigUInt(integerLiteral: intGasCost) - } - - - enum CodingKeys: String, CodingKey { - case id = "_id" - case hash - case block - case addressFrom = "addrfrom" - case addressTo = "addrto" - case isoTime = "isotime" - case type - case status - case error - case isContract = "iscontract" - case isInner = "isinner" - case value - case token - case txFee = "txfee" - case gasUsed = "gasused" - case gasCost = "gascost" - } - -} - -public struct Token: Decodable { - public let address: EthereumAddress? - public let name: String - public let symbol: String - public let decimal: Int - - enum CodingKeys: String, CodingKey { - case address = "addr" - case name - case symbol = "smbl" - case decimal = "dcm" - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - let stringAddress = try container.decode(String.self, forKey: CodingKeys.address) - if !stringAddress.isEmpty { - guard let nativeAddress = EthereumAddress(stringAddress, type: .normal, ignoreChecksum: true) else { - throw Web3Error.transactionSerializationError - } - address = nativeAddress - } else { - address = nil - } - name = try container.decode(String.self, forKey: .name) - symbol = try container.decode(String.self, forKey: .symbol) - decimal = try container.decode(Int.self, forKey: .decimal) - } -} - -public struct Head: Decodable { - let totalEntities: Int - let pageNumber: Int - let pageSize: Int - let listId: String - let moduleId: String - let entityId: String - let updateTime: String -} - -//MARK: - enums -public enum TransactionType { - case tx, call, create, suicide, token -} - -public enum TransactionStatus { - case failed, succeeded -} - -public enum ListId: String { - case listOfETH - case listOfTokens -} - -//MARK: - HTTP body structures -public struct Body:Codable { - let listId:String - let moduleId:String - let params:InternalParam -} - -public struct InternalParam:Codable { - let entityId:String - let page:Int - let size:Int -} - - - diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/BlockExplorer/Classes/BlockExplorer.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/BlockExplorer/Classes/BlockExplorer.swift deleted file mode 100755 index 43b5a673c..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/BlockExplorer/Classes/BlockExplorer.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// BlockExporter.swift -// web3swift-iOS -// -// Created by Георгий Фесенко on 19/06/2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation - -@available(*, deprecated) -public class BlockExplorer { - public var urlStringList: String - - public init() { - urlStringList = "https://scan.bankex.com/api/list" - } -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/ComparisonExtensions.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/ComparisonExtensions.swift index 6c2bdead7..d11da016b 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/ComparisonExtensions.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/ComparisonExtensions.swift @@ -1,13 +1,12 @@ -// -// ComparisonExtensions.swift // web3swift // -// Created by Alexander Vlasov on 09.05.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt +import EthereumAddress extension BigUInt: EventFilterComparable { public func isEqualTo(_ other: AnyObject) -> Bool { diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/ContractProtocol.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/ContractProtocol.swift index 7a33479d9..61d776ce2 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/ContractProtocol.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/ContractProtocol.swift @@ -8,21 +8,24 @@ import Foundation import BigInt +import EthereumAddress public protocol ContractProtocol { var address: EthereumAddress? {get set} var options: Web3Options? {get set} + var transactionOptions: TransactionOptions? {get set} var allMethods: [String] {get} var allEvents: [String] {get} - func deploy(bytecode:Data, parameters: [AnyObject], extraData: Data, options: Web3Options?) -> EthereumTransaction? - func method(_ method:String, parameters: [AnyObject], extraData: Data, options: Web3Options?) -> EthereumTransaction? + func deploy(bytecode:Data, parameters: [AnyObject], extraData: Data) -> EthereumTransaction? + func method(_ method:String, parameters: [AnyObject], extraData: Data) -> EthereumTransaction? +// func deploy(bytecode:Data, parameters: [AnyObject], extraData: Data, options: Web3Options?) -> EthereumTransaction? +// func method(_ method:String, parameters: [AnyObject], extraData: Data, options: Web3Options?) -> EthereumTransaction? init?(_ abiString: String, at: EthereumAddress?) func decodeReturnData(_ method:String, data: Data) -> [String:Any]? func decodeInputData(_ method:String, data: Data) -> [String:Any]? func decodeInputData(_ data: Data) -> [String:Any]? func parseEvent(_ eventLog: EventLog) -> (eventName:String?, eventData:[String:Any]?) func testBloomForEventPrecence(eventName: String, bloom: EthereumBloomFilter) -> Bool? -// func allEvents() -> [String: [String: Any]?] } public protocol EventFilterComparable { diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/ContractABIv2.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/EthereumContract.swift similarity index 50% rename from Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/ContractABIv2.swift rename to Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/EthereumContract.swift index 8526e7324..516c01ad7 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/ContractABIv2.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/EthereumContract.swift @@ -1,15 +1,19 @@ // -// ContractABIv2.swift -// web3swift -// -// Created by Alexander Vlasov on 04.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alexander Vlasov. +// Copyright © 2018 Alexander Vlasov. All rights reserved. // import Foundation import BigInt +import EthereumAddress +import EthereumABI -public struct ContractV2:ContractProtocol { +public struct EthereumContract:ContractProtocol { + public var options: Web3Options? = Web3Options.defaultOptions() + public var transactionOptions: TransactionOptions? = TransactionOptions.defaultOptions + public var address: EthereumAddress? = nil + + var _abi: [ABI.Element] public var allEvents: [String] { return events.keys.compactMap({ (s) -> String in @@ -28,10 +32,8 @@ public struct ContractV2:ContractProtocol { public var parameterValues: [AnyObject] } - public var address: EthereumAddress? = nil - var _abi: [ABIv2.Element] - public var methods: [String: ABIv2.Element] { - var toReturn = [String: ABIv2.Element]() + public var methods: [String: ABI.Element] { + var toReturn = [String: ABI.Element]() for m in self._abi { switch m { case .function(let function): @@ -44,8 +46,8 @@ public struct ContractV2:ContractProtocol { return toReturn } - public var constructor: ABIv2.Element? { - var toReturn : ABIv2.Element? = nil + public var constructor: ABI.Element? { + var toReturn : ABI.Element? = nil for m in self._abi { if toReturn != nil { break @@ -59,14 +61,14 @@ public struct ContractV2:ContractProtocol { } } if toReturn == nil { - let defaultConstructor = ABIv2.Element.constructor(ABIv2.Element.Constructor.init(inputs: [], constant: false, payable: false)) + let defaultConstructor = ABI.Element.constructor(ABI.Element.Constructor(inputs: [], constant: false, payable: false)) return defaultConstructor } return toReturn } - public var events: [String: ABIv2.Element.Event] { - var toReturn = [String: ABIv2.Element.Event]() + public var events: [String: ABI.Element.Event] { + var toReturn = [String: ABI.Element.Event]() for m in self._abi { switch m { case .event(let event): @@ -79,13 +81,11 @@ public struct ContractV2:ContractProtocol { return toReturn } - public var options: Web3Options? = Web3Options.defaultOptions() - public init?(_ abiString: String, at: EthereumAddress? = nil) { do { let jsonData = abiString.data(using: .utf8) - let abi = try JSONDecoder().decode([ABIv2.Record].self, from: jsonData!) - let abiNative = try abi.map({ (record) -> ABIv2.Element in + let abi = try JSONDecoder().decode([ABI.Record].self, from: jsonData!) + let abiNative = try abi.map({ (record) -> ABI.Element in return try record.parse() }) _abi = abiNative @@ -98,38 +98,52 @@ public struct ContractV2:ContractProtocol { } } - public init(abi: [ABIv2.Element]) { + public init(abi: [ABI.Element]) { _abi = abi } - public init(abi: [ABIv2.Element], at: EthereumAddress) { + public init(abi: [ABI.Element], at: EthereumAddress) { _abi = abi address = at } - public func deploy(bytecode:Data, parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), options: Web3Options?) -> EthereumTransaction? { +// public func deploy(bytecode:Data, parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), options: Web3Options?) -> EthereumTransaction? { +// let to:EthereumAddress = EthereumAddress.contractDeploymentAddress() +// let mergedOptions = Web3Options.merge(self.options, with: options) +// var gasLimit:BigUInt +// if let gasInOptions = mergedOptions?.gasLimit { +// gasLimit = gasInOptions +// } else { +// return nil +// } +// +// var gasPrice:BigUInt +// if let gasPriceInOptions = mergedOptions?.gasPrice { +// gasPrice = gasPriceInOptions +// } else { +// return nil +// } +// +// var value:BigUInt +// if let valueInOptions = mergedOptions?.value { +// value = valueInOptions +// } else { +// value = BigUInt(0) +// } +// guard let constructor = self.constructor else {return nil} +// guard let encodedData = constructor.encodeParameters(parameters) else {return nil} +// var fullData = bytecode +// if encodedData != Data() { +// fullData.append(encodedData) +// } else if extraData != Data() { +// fullData.append(extraData) +// } +// let transaction = EthereumTransaction(gasPrice: gasPrice, gasLimit: gasLimit, to: to, value: value, data: fullData) +// return transaction +// } + + public func deploy(bytecode:Data, parameters: [AnyObject] = [AnyObject](), extraData: Data = Data()) -> EthereumTransaction? { let to:EthereumAddress = EthereumAddress.contractDeploymentAddress() - let mergedOptions = Web3Options.merge(self.options, with: options) - var gasLimit:BigUInt - if let gasInOptions = mergedOptions?.gasLimit { - gasLimit = gasInOptions - } else { - return nil - } - - var gasPrice:BigUInt - if let gasPriceInOptions = mergedOptions?.gasPrice { - gasPrice = gasPriceInOptions - } else { - return nil - } - - var value:BigUInt - if let valueInOptions = mergedOptions?.value { - value = valueInOptions - } else { - value = BigUInt(0) - } guard let constructor = self.constructor else {return nil} guard let encodedData = constructor.encodeParameters(parameters) else {return nil} var fullData = bytecode @@ -138,45 +152,61 @@ public struct ContractV2:ContractProtocol { } else if extraData != Data() { fullData.append(extraData) } - let transaction = EthereumTransaction(gasPrice: gasPrice, gasLimit: gasLimit, to: to, value: value, data: fullData) + let transaction = EthereumTransaction(gasPrice: BigUInt(0), gasLimit: BigUInt(0), to: to, value: BigUInt(0), data: fullData) return transaction } +// public func method(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), options: Web3Options?) -> EthereumTransaction? { +// var to:EthereumAddress +// let mergedOptions = Web3Options.merge(self.options, with: options) +// if (self.address != nil) { +// to = self.address! +// } else if let toFound = mergedOptions?.to, toFound.isValid { +// to = toFound +// } else { +// return nil +// } +// +// var gasLimit:BigUInt +// if let gasInOptions = mergedOptions?.gasLimit { +// gasLimit = gasInOptions +// } else { +// return nil +// } +// +// var gasPrice:BigUInt +// if let gasPriceInOptions = mergedOptions?.gasPrice { +// gasPrice = gasPriceInOptions +// } else { +// return nil +// } +// +// var value:BigUInt +// if let valueInOptions = mergedOptions?.value { +// value = valueInOptions +// } else { +// value = BigUInt(0) +// } +// +// if (method == "fallback") { +// let transaction = EthereumTransaction(gasPrice: gasPrice, gasLimit: gasLimit, to: to, value: value, data: extraData) +// return transaction +// } +// let foundMethod = self.methods.filter { (key, value) -> Bool in +// return key == method +// } +// guard foundMethod.count == 1 else {return nil} +// let abiMethod = foundMethod[method] +// guard let encodedData = abiMethod?.encodeParameters(parameters) else {return nil} +// let transaction = EthereumTransaction(gasPrice: gasPrice, gasLimit: gasLimit, to: to, value: value, data: encodedData) +// return transaction +// } - public func method(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), options: Web3Options?) -> EthereumTransaction? { - var to:EthereumAddress - let mergedOptions = Web3Options.merge(self.options, with: options) - if (self.address != nil) { - to = self.address! - } else if let toFound = mergedOptions?.to, toFound.isValid { - to = toFound - } else { - return nil - } - - var gasLimit:BigUInt - if let gasInOptions = mergedOptions?.gasLimit { - gasLimit = gasInOptions - } else { - return nil - } - - var gasPrice:BigUInt - if let gasPriceInOptions = mergedOptions?.gasPrice { - gasPrice = gasPriceInOptions - } else { - return nil - } - - var value:BigUInt - if let valueInOptions = mergedOptions?.value { - value = valueInOptions - } else { - value = BigUInt(0) - } - + public func method(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data()) -> EthereumTransaction? { + guard let to = self.address else {return nil} + if (method == "fallback") { - let transaction = EthereumTransaction(gasPrice: gasPrice, gasLimit: gasLimit, to: to, value: value, data: extraData) + let transaction = EthereumTransaction(gasPrice: BigUInt(0), gasLimit: BigUInt(0), to: to, value: BigUInt(0), data: extraData) return transaction } let foundMethod = self.methods.filter { (key, value) -> Bool in @@ -185,7 +215,7 @@ public struct ContractV2:ContractProtocol { guard foundMethod.count == 1 else {return nil} let abiMethod = foundMethod[method] guard let encodedData = abiMethod?.encodeParameters(parameters) else {return nil} - let transaction = EthereumTransaction(gasPrice: gasPrice, gasLimit: gasLimit, to: to, value: value, data: encodedData) + let transaction = EthereumTransaction(gasPrice: BigUInt(0), gasLimit: BigUInt(0), to: to, value: BigUInt(0), data: encodedData) return transaction } @@ -196,13 +226,17 @@ public struct ContractV2:ContractProtocol { continue } else { - let parsed = ev.decodeReturnedLogs(eventLog) + let logTopics = eventLog.topics + let logData = eventLog.data + let parsed = ev.decodeReturnedLogs(eventLogTopics: logTopics, eventLogData: logData) if parsed != nil { return (eName, parsed!) } } } else { - let parsed = ev.decodeReturnedLogs(eventLog) + let logTopics = eventLog.topics + let logData = eventLog.data + let parsed = ev.decodeReturnedLogs(eventLogTopics: logTopics, eventLogData: logData) if parsed != nil { return (eName, parsed!) } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift index 61eab4d48..e818b94fd 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/EthereumFilterEncodingExtensions.swift @@ -1,13 +1,12 @@ -// -// EthereumStringEncodingExtensions.swift // web3swift // -// Created by Alexander Vlasov on 09.05.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt +import EthereumAddress extension BigUInt: EventFilterEncodable { public func eventFilterEncoded() -> String? { diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/EventFiltering.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/EventFiltering.swift index ad20c4726..d45d0e1c6 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/EventFiltering.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Contract/Classes/EventFiltering.swift @@ -1,13 +1,12 @@ -// -// EventFiltering.swift // web3swift // -// Created by Alexander Vlasov on 11.05.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation - +import EthereumABI +import EthereumAddress internal func filterLogs(decodedLogs: [EventParserResultProtocol], eventFilter: EventFilter) -> [EventParserResultProtocol] { let filteredLogs = decodedLogs.filter { (result) -> Bool in @@ -59,9 +58,9 @@ internal func filterLogs(decodedLogs: [EventParserResultProtocol], eventFilter: return filteredLogs } -internal func encodeTopicToGetLogs(contract: ContractV2, eventName: String?, filter: EventFilter) -> EventFilterParameters? { +internal func encodeTopicToGetLogs(contract: EthereumContract, eventName: String?, filter: EventFilter) -> EventFilterParameters? { var eventTopic: Data? = nil - var event: ABIv2.Element.Event? = nil + var event: ABI.Element.Event? = nil if eventName != nil { guard let ev = contract.events[eventName!] else {return nil} event = ev diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Array+Extension.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Array+Extension.swift index 1f61aa666..3fc7e80f2 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Array+Extension.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Array+Extension.swift @@ -1,9 +1,7 @@ -// -// Array+Extension.swift // web3swift // -// Created by Alexander Vlasov on 15.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Base58.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Base58.swift index 69774d14e..6e0accdc3 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Base58.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Base58.swift @@ -1,9 +1,7 @@ -// -// Base58.swift // web3swift // -// Created by Alexander Vlasov on 10.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/BigUInt+Extensions.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/BigUInt+Extensions.swift new file mode 100644 index 000000000..d23acfbbc --- /dev/null +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/BigUInt+Extensions.swift @@ -0,0 +1,16 @@ +// +// RIPEMD160_SO.swift +// web3swift +// +// Created by Alexander Vlasov on 10.01.2018. +// + +import Foundation +import struct BigInt.BigUInt + +public extension BigUInt { + public init?(_ naturalUnits: String, _ ethereumUnits: Web3.Utils.Units) { + guard let value = Web3.Utils.parseToBigUInt(naturalUnits, units: ethereumUnits) else {return nil} + self = value + } +} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/CryptoExtensions.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/CryptoExtensions.swift index f633c572e..ae389d0df 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/CryptoExtensions.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/CryptoExtensions.swift @@ -1,13 +1,10 @@ -// -// CryptoExtensions.swift // web3swift // -// Created by Alexander Vlasov on 04.12.2017. -// Copyright © 2017 Alexander Vlasov. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -//import libsodium import scrypt func toByteArray(_ value: T) -> [UInt8] { @@ -15,35 +12,7 @@ func toByteArray(_ value: T) -> [UInt8] { return withUnsafeBytes(of: &value) { Array($0) } } -//public func scryptLibSodium (password: String, salt: Data, length: Int, N: Int, R: Int, P: Int) -> Data? { -// let BytesMin = Int(crypto_generichash_bytes_min()) -// let BytesMax = Int(crypto_generichash_bytes_max()) -// if length < BytesMin || length > BytesMax { -// return nil -// } -// -// var output = Data(count: length) -// guard let passwordData = password.data(using: .utf8) else {return nil} -// let passwordLen = passwordData.count -// let saltLen = salt.count -// let result = output.withUnsafeMutableBytes { (outputPtr:UnsafeMutablePointer) -> Int32 in -// salt.withUnsafeBytes { (saltPointer:UnsafePointer) -> Int32 in -// passwordData.withUnsafeBytes{ (passwordPointer:UnsafePointer) -> Int32 in -// let res = crypto_pwhash_scryptsalsa208sha256_ll(passwordPointer, passwordLen, -// saltPointer, saltLen, -// UInt64(N), UInt32(R), UInt32(P), -// outputPtr, length) -// return res -// } -// } -// } -// if result != 0 { -// return nil -// } -// return output -//} - -public func scrypt (password: String, salt: Data, length: Int, N: Int, R: Int, P: Int) -> Data? { +func scrypt (password: String, salt: Data, length: Int, N: Int, R: Int, P: Int) -> Data? { guard let passwordData = password.data(using: .utf8) else {return nil} guard let deriver = try? Scrypt(password: passwordData.bytes, salt: salt.bytes, dkLen: length, N: N, r: R, p: P) else {return nil} guard let result = try? deriver.calculate() else {return nil} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Data+Extension.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Data+Extension.swift index e23cd4dc6..d02fcac37 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Data+Extension.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Data+Extension.swift @@ -1,13 +1,10 @@ -// -// Data+Extension.swift // web3swift // -// Created by Alexander Vlasov on 15.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -//import libsodium public extension Data { @@ -40,7 +37,8 @@ public extension Data { dataPtr.initialize(repeating: 0, count: count) } } - public static func randomBytes(length: Int) -> Data? { + + static func randomBytes(length: Int) -> Data? { for _ in 0...1024 { var data = Data(repeating: 0, count: length) let result = data.withUnsafeMutableBytes { @@ -54,7 +52,7 @@ public extension Data { return nil } - public static func fromHex(_ hex: String) -> Data? { + static func fromHex(_ hex: String) -> Data? { let string = hex.lowercased().stripHexPrefix() let array = Array(hex: string) if (array.count == 0) { diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Dictionary+Extension.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Dictionary+Extension.swift index 3253247c7..ee1a68133 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Dictionary+Extension.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/Dictionary+Extension.swift @@ -1,9 +1,7 @@ -// -// Dictionary+Extension.swift // web3swift // -// Created by Alexander Vlasov on 15.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/NSRegularExpressionExtension.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/NSRegularExpressionExtension.swift index 31cb7ed06..1b511a627 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/NSRegularExpressionExtension.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/NSRegularExpressionExtension.swift @@ -1,9 +1,7 @@ -// -// NSRegularExpressionExtension.swift // web3swift // -// Created by Alexander Vlasov on 06.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/NativeTypesEncoding+Extensions.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/NativeTypesEncoding+Extensions.swift index 7f4841d2a..725c0ba0c 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/NativeTypesEncoding+Extensions.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/NativeTypesEncoding+Extensions.swift @@ -1,9 +1,7 @@ -// -// NativeTypesEncoding+Extensions.swift // web3swift // -// Created by Alexander Vlasov on 03.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/String+Extension.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/String+Extension.swift index 7694838c9..a40cc173e 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/String+Extension.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Convenience/Classes/String+Extension.swift @@ -1,9 +1,7 @@ +// web3swift // -// String+Extension.swift -// web3swift-iOS -// -// Created by Alexander Vlasov. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift deleted file mode 100755 index 3384c2cba..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift +++ /dev/null @@ -1,171 +0,0 @@ -// -// Web3+BrowserFunctions.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 26.02.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation -import BigInt - -extension web3.BrowserFunctions { - - public func getAccounts() -> [String]? { - let result = self.web3.eth.getAccounts() - switch result { - case .failure(_): - return nil - case .success(let accounts): - return accounts.compactMap({$0.address}) - } - } - - public func getCoinbase() -> String? { - guard let addresses = self.getAccounts() else {return nil} - guard addresses.count > 0 else {return nil} - return addresses[0] - } - - public func personalSign(_ personalMessage: String, account: String, password: String = "web3swift") -> String? { - return self.sign(personalMessage, account: account, password: password) - } - - public func sign(_ personalMessage: String, account: String, password: String = "web3swift") -> String? { - guard let data = Data.fromHex(personalMessage) else {return nil} - return self.sign(data, account: account, password: password) - } - - public func sign(_ personalMessage: Data, account: String, password: String = "web3swift") -> String? { - do { - guard let keystoreManager = self.web3.provider.attachedKeystoreManager else {return nil} - - guard let signature = try Web3Signer.signPersonalMessage(personalMessage, keystore: keystoreManager, account: EthereumAddress(account)!, password: password) else {return nil} - return signature.toHexString().addHexPrefix() - } - catch{ - print(error) - return nil - } - } - - public func personalECRecover(_ personalMessage: String, signature: String) -> String? { - guard let data = Data.fromHex(personalMessage) else {return nil} - guard let sig = Data.fromHex(signature) else {return nil} - return self.personalECRecover(data, signature:sig) - } - - public func personalECRecover(_ personalMessage: Data, signature: Data) -> String? { - if signature.count != 65 { return nil} - let rData = signature[0..<32].bytes - let sData = signature[32..<64].bytes - let vData = signature[64] - guard let signatureData = SECP256K1.marshalSignature(v: vData, r: rData, s: sData) else {return nil} - var hash: Data - if personalMessage.count == 32 { - print("Most likely it's hash already, allow for now") - hash = personalMessage - } else { - guard let h = Web3.Utils.hashPersonalMessage(personalMessage) else {return nil} - hash = h - } - guard let publicKey = SECP256K1.recoverPublicKey(hash: hash, signature: signatureData) else {return nil} - return Web3.Utils.publicToAddressString(publicKey) - } - - - public func sendTransaction(_ transactionJSON: [String: Any], password: String = "web3swift") -> [String:Any]? { - guard let transaction = EthereumTransaction.fromJSON(transactionJSON) else {return nil} - guard let options = Web3Options.fromJSON(transactionJSON) else {return nil} - return self.sendTransaction(transaction, options: options, password: password) - } - - public func sendTransaction(_ transaction: EthereumTransaction, options: Web3Options, password: String = "web3swift") -> [String:Any]? { - let result = self.web3.eth.sendTransaction(transaction, options: options, password: password) - switch result { - case .failure(_): - return nil - case .success(let res): - return ["txhash": res.hash] - } - } - - public func estimateGas(_ transactionJSON: [String: Any]) -> BigUInt? { - guard let transaction = EthereumTransaction.fromJSON(transactionJSON) else {return nil} - guard let options = Web3Options.fromJSON(transactionJSON) else {return nil} - return self.estimateGas(transaction, options: options) - } - - public func estimateGas(_ transaction: EthereumTransaction, options: Web3Options) -> BigUInt? { - let result = self.web3.eth.estimateGas(transaction, options: options) - switch result { - case .failure(_): - return nil - case .success(let res): - return res - } - } - - public func prepareTxForApproval(_ transactionJSON: [String: Any]) -> (transaction: EthereumTransaction?, options: Web3Options?) { - guard let transaction = EthereumTransaction.fromJSON(transactionJSON) else {return (nil, nil)} - guard let options = Web3Options.fromJSON(transactionJSON) else {return (nil, nil)} - return self.prepareTxForApproval(transaction, options: options) - } - - public func prepareTxForApproval(_ trans: EthereumTransaction, options opts: Web3Options) -> (transaction: EthereumTransaction?, options: Web3Options?) { - var transaction = trans - var options = opts - guard let _ = options.from else {return (nil, nil)} - let gasPriceResult = self.web3.eth.getGasPrice() - if case .failure(_) = gasPriceResult { - return (nil, nil) - } - transaction.gasPrice = gasPriceResult.value! - options.gasPrice = gasPriceResult.value! - guard let gasEstimate = self.estimateGas(transaction, options: options) else {return (nil, nil)} - transaction.gasLimit = gasEstimate - options.gasLimit = gasEstimate - print(transaction) - return (transaction, options) - } - - public func signTransaction(_ transactionJSON: [String: Any], password: String = "web3swift") -> String? { - guard let transaction = EthereumTransaction.fromJSON(transactionJSON) else {return nil} - guard let options = Web3Options.fromJSON(transactionJSON) else {return nil} - return self.signTransaction(transaction, options: options, password: password) - } - - public func signTransaction(_ trans: EthereumTransaction, options: Web3Options, password: String = "web3swift") -> String? { - do { - var transaction = trans - guard let from = options.from else {return nil} - guard let keystoreManager = self.web3.provider.attachedKeystoreManager else {return nil} - let gasPriceResult = self.web3.eth.getGasPrice() - if case .failure(_) = gasPriceResult { - return nil - } - transaction.gasPrice = gasPriceResult.value! - guard let gasEstimate = self.estimateGas(transaction, options: options) else {return nil} - transaction.gasLimit = gasEstimate - - let nonceResult = self.web3.eth.getTransactionCount(address: from, onBlock: "pending") - if case .failure(_) = nonceResult { - return nil - } - transaction.nonce = nonceResult.value! - - if (self.web3.provider.network != nil) { - transaction.chainID = self.web3.provider.network?.chainID - } - - guard let keystore = keystoreManager.walletForAddress(from) else {return nil} - try Web3Signer.signTX(transaction: &transaction, keystore: keystore, account: from, password: password) - print(transaction) - let signedData = transaction.encode(forSignature: false, chainID: nil)?.toHexString().addHexPrefix() - return signedData - } - catch { - return nil - } - } -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/HookedFunctions/Classes/Web3+Wallet.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/HookedFunctions/Classes/Web3+Wallet.swift index 49ce41dbd..30adb5086 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/HookedFunctions/Classes/Web3+Wallet.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/HookedFunctions/Classes/Web3+Wallet.swift @@ -1,79 +1,72 @@ -// -// Web3+HookedWallet.swift // web3swift // -// Created by Alexander Vlasov on 07.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // + import Foundation import BigInt -import Result +import EthereumAddress extension web3.Web3Wallet { - public func getAccounts() -> Result<[EthereumAddress], Web3Error> { + public func getAccounts() throws -> [EthereumAddress] { guard let keystoreManager = self.web3.provider.attachedKeystoreManager else { - return Result.failure(Web3Error.walletError) + throw Web3Error.walletError } guard let ethAddresses = keystoreManager.addresses else { - return Result.failure(Web3Error.walletError) + throw Web3Error.walletError } - return Result(ethAddresses) + return ethAddresses } - public func getCoinbase() -> Result { - let result = self.getAccounts() - switch result { - case .failure(let error): - return Result.failure(error) - case .success(let addresses): - guard addresses.count > 0 else { - return Result.failure(Web3Error.walletError) - } - return Result(addresses[0]) + public func getCoinbase() throws -> EthereumAddress { + let addresses = try self.getAccounts() + guard addresses.count > 0 else { + throw Web3Error.walletError } + return addresses[0] } - public func signTX(transaction:inout EthereumTransaction, account: EthereumAddress, password: String = "web3swift") -> Result { + public func signTX(transaction:inout EthereumTransaction, account: EthereumAddress, password: String = "web3swift") throws -> Bool { do { guard let keystoreManager = self.web3.provider.attachedKeystoreManager else { - return Result.failure(Web3Error.walletError) + throw Web3Error.walletError } try Web3Signer.signTX(transaction: &transaction, keystore: keystoreManager, account: account, password: password) -// print(transaction) - return Result(true) + return true } catch { if error is AbstractKeystoreError { - return Result.failure(Web3Error.keystoreError(err: error as! AbstractKeystoreError)) + throw Web3Error.keystoreError(err: error as! AbstractKeystoreError) } - return Result.failure(Web3Error.generalError(err: error)) + throw Web3Error.generalError(err: error) } } - public func signPersonalMessage(_ personalMessage: String, account: EthereumAddress, password: String = "web3swift") -> Result { + public func signPersonalMessage(_ personalMessage: String, account: EthereumAddress, password: String = "web3swift") throws -> Data { guard let data = Data.fromHex(personalMessage) else { - return Result.failure(Web3Error.dataError) + throw Web3Error.dataError } - return self.signPersonalMessage(data, account: account, password: password) + return try self.signPersonalMessage(data, account: account, password: password) } - public func signPersonalMessage(_ personalMessage: Data, account: EthereumAddress, password: String = "web3swift") -> Result { + public func signPersonalMessage(_ personalMessage: Data, account: EthereumAddress, password: String = "web3swift") throws -> Data { do { guard let keystoreManager = self.web3.provider.attachedKeystoreManager else { - return Result.failure(Web3Error.walletError) + throw Web3Error.walletError } guard let data = try Web3Signer.signPersonalMessage(personalMessage, keystore: keystoreManager, account: account, password: password) else { - return Result.failure(Web3Error.walletError) + throw Web3Error.walletError } - return Result(data) + return data } catch{ if error is AbstractKeystoreError { - return Result.failure(Web3Error.keystoreError(err: error as! AbstractKeystoreError)) + throw Web3Error.keystoreError(err: error as! AbstractKeystoreError) } - return Result.failure(Web3Error.generalError(err: error)) + throw Web3Error.generalError(err: error) } } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/AbstractKeystore.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/AbstractKeystore.swift index e755b208e..72f72a15d 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/AbstractKeystore.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/AbstractKeystore.swift @@ -1,15 +1,11 @@ -// -// AbstractKeystore.swift // web3swift // -// Created by Alexander Vlasov on 10.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation - -public typealias TransactionIntermediate = web3.web3contract.TransactionIntermediate - +import EthereumAddress public protocol AbstractKeystore { var addresses: [EthereumAddress]? {get} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP32HDNode.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP32HDNode.swift index 8f8591c3c..9a9c89bd0 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP32HDNode.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP32HDNode.swift @@ -1,14 +1,13 @@ -// -// BIP32HDwallet.swift // web3swift // -// Created by Alexander Vlasov on 09.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt import CryptoSwift +import secp256k1_swift extension UInt32 { public func serialize32() -> Data { diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP32Keystore.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP32Keystore.swift index 4220cdba6..a2ca855e1 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP32Keystore.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP32Keystore.swift @@ -1,15 +1,13 @@ -// -// BIP32Keystore.swift // web3swift // -// Created by Alexander Vlasov on 11.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import CryptoSwift import Foundation - +import EthereumAddress public class BIP32Keystore: AbstractKeystore { // Protocol @@ -46,7 +44,6 @@ public class BIP32Keystore: AbstractKeystore { // -------------- public var keystoreParams: KeystoreParamsBIP32? -// public var mnemonics: String? public var paths: [String:EthereumAddress] = [String:EthereumAddress]() public var rootPrefix: String public convenience init?(_ jsonString: String) { @@ -70,16 +67,18 @@ public class BIP32Keystore: AbstractKeystore { rootPrefix = keystoreParams!.rootPath! } - public convenience init? (mnemonics: String, password: String = "web3swift", mnemonicsPassword: String = "", language: BIP39Language = BIP39Language.english, prefixPath: String = HDNode.defaultPathMetamaskPrefix) throws { + public convenience init? (mnemonics: String, password: String = "web3swift", mnemonicsPassword: String = "", language: BIP39Language = BIP39Language.english, prefixPath: String = HDNode.defaultPathMetamaskPrefix, aesMode: String = "aes-128-cbc") throws { guard var seed = BIP39.seedFromMmemonics(mnemonics, password: mnemonicsPassword, language: language) else {throw AbstractKeystoreError.noEntropyError} defer{ Data.zero(&seed) } - try self.init(seed: seed, password: password, prefixPath: prefixPath) + try self.init(seed: seed, password: password, prefixPath: prefixPath, aesMode: aesMode) } - public init? (seed: Data, password: String = "web3swift", prefixPath: String = HDNode.defaultPathMetamaskPrefix) throws { - guard let prefixNode = HDNode(seed: seed)?.derive(path: prefixPath, derivePrivateKey: true) else {return nil} + public init? (seed: Data, password: String = "web3swift", prefixPath: String = HDNode.defaultPathMetamaskPrefix, aesMode: String = "aes-128-cbc") throws { + guard let rootNode = HDNode(seed: seed)?.derive(path: prefixPath, derivePrivateKey: true) else {return nil} self.rootPrefix = prefixPath - try createNewAccount(parentNode: prefixNode, password: password) + try createNewAccount(parentNode: rootNode, password: password) + guard let serializedRootNode = rootNode.serialize(serializePublic: false) else {throw AbstractKeystoreError.keyDerivationError} + try encryptDataToStorage(password, data: serializedRootNode, aesMode: aesMode) } public func createNewChildAccount(password: String = "web3swift") throws { @@ -88,9 +87,11 @@ public class BIP32Keystore: AbstractKeystore { let prefixPath = self.rootPrefix guard rootNode.depth == prefixPath.components(separatedBy: "/").count - 1 else {throw AbstractKeystoreError.encryptionError("Derivation depth mismatch")} try createNewAccount(parentNode: rootNode, password: password) + guard let serializedRootNode = rootNode.serialize(serializePublic: false) else {throw AbstractKeystoreError.keyDerivationError} + try encryptDataToStorage(password, data: serializedRootNode, aesMode: self.keystoreParams!.crypto.cipher) } - public func createNewAccount(parentNode: HDNode, password: String = "web3swift", aesMode: String = "aes-128-cbc") throws { + func createNewAccount(parentNode: HDNode, password: String = "web3swift") throws { var newIndex = UInt32(0) for (p, _) in paths { guard let idx = UInt32(p.components(separatedBy: "/").last!) else {continue} @@ -108,8 +109,6 @@ public class BIP32Keystore: AbstractKeystore { newPath = prefixPath + "/" + String(newNode.index) } paths[newPath] = newAddress - guard let serializedRootNode = parentNode.serialize(serializePublic: false) else {throw AbstractKeystoreError.keyDerivationError} - try encryptDataToStorage(password, data: serializedRootNode, aesMode: aesMode) } public func createNewCustomChildAccount(password: String = "web3swift", path: String) throws { @@ -153,7 +152,7 @@ public class BIP32Keystore: AbstractKeystore { if (data == nil) { throw AbstractKeystoreError.encryptionError("Encryption without key data") } - if (data?.count != 82) { + if (data!.count != 82) { throw AbstractKeystoreError.encryptionError("Invalid expected data length") } let saltLen = 32; diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP32KeystoreJSONStructure.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP32KeystoreJSONStructure.swift index bb38ebc41..97a253345 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP32KeystoreJSONStructure.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP32KeystoreJSONStructure.swift @@ -1,9 +1,7 @@ -// -// BIP32KeystoreJSONStructure.swift // web3swift // -// Created by Alexander Vlasov on 11.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP39+WordLists.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP39+WordLists.swift index d7a0193f4..d8ac312bf 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP39+WordLists.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP39+WordLists.swift @@ -1,9 +1,7 @@ -// -// BIP39+WordLists.swift // web3swift // -// Created by Alexander Vlasov on 11.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP39.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP39.swift index ba622c252..58067ca81 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP39.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/BIP39.swift @@ -1,9 +1,7 @@ -// -// BIP39.swift // web3swift // -// Created by Alexander Vlasov on 11.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -46,6 +44,29 @@ public enum BIP39Language { return " " } } + + init?(language: String) { + switch language { + case "english": + self = .english + case "chinese_simplified": + self = .chinese_simplified + case "chinese_traditional": + self = .chinese_traditional + case "japanese": + self = .japanese + case "korean": + self = .korean + case "french": + self = .french + case "italian": + self = .italian + case "spanish": + self = .spanish + default: + return nil + } + } } public class BIP39 { @@ -108,7 +129,7 @@ public class BIP39 { static public func seedFromMmemonics(_ mnemonics: String, password: String = "", language: BIP39Language = BIP39Language.english) -> Data? { let valid = BIP39.mnemonicsToEntropy(mnemonics, language: language) != nil if (!valid) { - print("Potentially invalid mnemonics") + return nil } guard let mnemData = mnemonics.decomposedStringWithCompatibilityMapping.data(using: .utf8) else {return nil} let salt = "mnemonic" + password @@ -117,4 +138,11 @@ public class BIP39 { let seed = Data(bytes:seedArray) return seed } + + static public func seedFromEntropy(_ entropy: Data, password: String = "", language: BIP39Language = BIP39Language.english) -> Data? { + guard let mnemonics = BIP39.generateMnemonicsFromEntropy(entropy: entropy, language: language) else { + return nil + } + return BIP39.seedFromMmemonics(mnemonics, password: password, language: language) + } } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift index 8e3bcfed2..569420224 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift @@ -1,14 +1,14 @@ -// -// EthereumKeystoreV3.swift // web3swift // -// Created by Alexander Vlasov on 18.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import CryptoSwift import Foundation +import secp256k1_swift +import EthereumAddress public class EthereumKeystoreV3: AbstractKeystore { // Class diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/IBAN.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/IBAN.swift index 314b91fdd..5f4e22f49 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/IBAN.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/IBAN.swift @@ -1,13 +1,12 @@ -// -// IBAN.swift // web3swift // -// Created by Alexander Vlasov on 25.05.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt +import EthereumAddress public struct ICAP { public var asset: String diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/KeystoreManager.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/KeystoreManager.swift index 1da69d1b4..e9a6193c8 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/KeystoreManager.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/KeystoreManager.swift @@ -1,12 +1,11 @@ -// -// KeystoreManager.swift // web3swift // -// Created by Alexander Vlasov on 04.12.2017. -// Copyright © 2017 Alexander Vlasov. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation +import EthereumAddress public class KeystoreManager: AbstractKeystore { public var isHDKeystore: Bool = false diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/KeystoreV3JSONStructure.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/KeystoreV3JSONStructure.swift index 887f79660..8ab80e570 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/KeystoreV3JSONStructure.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/KeystoreV3JSONStructure.swift @@ -1,9 +1,7 @@ -// -// KeystoreJSONStructure.swift // web3swift // -// Created by Alexander Vlasov on 10.01.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/PlainKeystore.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/PlainKeystore.swift index 48eebd418..7a03158af 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/PlainKeystore.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/KeystoreManager/Classes/PlainKeystore.swift @@ -1,12 +1,13 @@ -// -// PlainKeystore.swift // web3swift // -// Created by Alexander Vlasov on 06.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation +import secp256k1_swift + +import EthereumAddress public class PlainKeystore: AbstractKeystore { private var privateKey: Data diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/BigUInt+ObjC.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/BigUInt+ObjC.swift deleted file mode 100755 index 252a86727..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/BigUInt+ObjC.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// BigUInt+ObjC.swift -// web3swift -// -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation -import BigInt - -//@objc(BigUInt) -public final class _ObjCBigUInt: NSObject{ - private (set) var biguint: BigUInt? - - public init(value: String) { - self.biguint = BigUInt(value) - } - - public init(value: String, radix: Int) { - self.biguint = BigUInt(value, radix: radix) - } - - init(value: BigUInt) { - self.biguint = value - } - - public func toString(radix: Int = 10) -> NSString { - guard let val = self.biguint else {return "" as NSString} - return String(val, radix: radix) as NSString - } -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift deleted file mode 100755 index 8c55538c3..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/EthereumAddress+ObjC.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// EthereumAddress+ObjC.swift -// web3swift -// -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation - -//@objc(EthereumAddress) -public final class _ObjCEthereumAddress: NSObject{ - private (set) var address: EthereumAddress? - - public init(address: String) { - self.address = EthereumAddress(address) - } - - public init(address: Data) { - self.address = EthereumAddress(address) - } - - init(address: EthereumAddress) { - self.address = address - } - - public static var contractDeploymentAddress: _ObjCEthereumAddress { - return _ObjCEthereumAddress(address: EthereumAddress.contractDeploymentAddress()) - } -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/KeystoreManager+ObjC.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/KeystoreManager+ObjC.swift deleted file mode 100755 index 487391253..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/KeystoreManager+ObjC.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// KeystoreManager+ObjC.swift -// web3swift -// -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation - -//@objc(KeystoreManager) -public final class _ObjCKeystoreManager: NSObject{ - private (set) var keystoreManager: KeystoreManager? - - init(plainKeystore: _ObjCPlainKeystore) { - guard let ks = plainKeystore.keystore else {return} - self.keystoreManager = KeystoreManager([ks]) - } - - init(plainKeystore: PlainKeystore) { - self.keystoreManager = KeystoreManager([plainKeystore]) - } -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/PlainKeystore+ObjC.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/PlainKeystore+ObjC.swift deleted file mode 100755 index 20218fcd6..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/PlainKeystore+ObjC.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// PlainKeystore+ObjC.swift -// web3swift -// -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation - -//@objc(PlainKeystore) -public final class _ObjCPlainKeystore: NSObject{ - private (set) var keystore: PlainKeystore? - - init(privateKey: String) { - self.keystore = PlainKeystore(privateKey: privateKey) - } - - init(privateKey: Data) { - self.keystore = PlainKeystore(privateKey: privateKey) - } - - init(privateKey: NSData) { - self.keystore = PlainKeystore(privateKey: privateKey as Data) - } - - init(keystore: PlainKeystore) { - self.keystore = keystore - } -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift deleted file mode 100755 index 251bb05c9..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+Eth+ObjC.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// Web3+Eth+ObjC.swift -// web3swift -// -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation - -//@objc(web3Eth) -public final class _ObjCweb3Eth: NSObject { - private (set) weak var web3: web3? - - init(web3: web3?) { - self.web3 = web3 - } - - public func getBalance(address: _ObjCEthereumAddress, onBlock: NSString = "latest", error: NSErrorPointer) -> _ObjCBigUInt? { - guard let addr = address.address else { - error?.pointee = Web3Error.inputError(desc: "Address is empty") as NSError - return nil - } - guard let result = self.web3?.eth.getBalance(address: addr, onBlock: onBlock as String) else { - error?.pointee = Web3Error.processingError(desc: "Web3 object was not properly initialized") as NSError - return nil - } - switch result { - case .success(let balance): - let biguint = _ObjCBigUInt(value: balance) - return biguint - case .failure(let web3error): - error?.pointee = web3error as NSError - return nil - } - } -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+HttpProvider+ObjC.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+HttpProvider+ObjC.swift deleted file mode 100755 index f6ed77a11..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+HttpProvider+ObjC.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// Web3+Provider+ObjC.swift -// web3swift -// -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation - -//@objc(Web3HttpProvider) -final class _ObjCWeb3HttpProvider: NSObject{ - private (set) var web3Provider: Web3HttpProvider? - - init(providerURL: NSURL, network: _ObjCNetwork, keystoreManager: _ObjCKeystoreManager){ - let network = Networks.fromInt(network.networkID) - guard let ks = keystoreManager.keystoreManager else {return} - self.web3Provider = Web3HttpProvider(providerURL as URL, network: network, keystoreManager: ks) - } - - init(web3Provider: Web3HttpProvider) { - self.web3Provider = web3Provider - } -} - -@objc(Network) -final class _ObjCNetwork: NSObject { - let networkID: Int - - init(networkID: Int) { - self.networkID = networkID - } -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+Instance+ObjC.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+Instance+ObjC.swift deleted file mode 100755 index 6fa159b6a..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+Instance+ObjC.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Web3Instnace+ObjectiveC.swift -// web3swift -// -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation - -//@objc(web3) -public final class _ObjCweb3: NSObject { - private (set) var web3: web3? - - init(web3: web3?) { - self.web3 = web3 - } - - public var web3Eth: _ObjCweb3Eth { - return _ObjCweb3Eth(web3: self.web3) - } -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+ObjC.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+ObjC.swift deleted file mode 100755 index 44463df6e..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/ObjectiveCbridge/Classes/Web3+ObjC.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// Web3+ObjectiveC.swift -// web3swift -// -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation - -//@objc(Web3) -public final class _ObjCWeb3: NSObject { - public static func InfuraMainnetWeb3() -> _ObjCweb3 { - let web3 = Web3.InfuraMainnetWeb3() - return _ObjCweb3(web3: web3) - } - - public static func InfuraRinkebyWeb3() -> _ObjCweb3 { - let web3 = Web3.InfuraRinkebyWeb3() - return _ObjCweb3(web3: web3) - } - - public static func new(providerURL: NSURL) -> _ObjCweb3 { - let web3 = Web3.new(providerURL as URL) - return _ObjCweb3(web3: web3) - } -} - diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift deleted file mode 100644 index 005f5ce1a..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/PrecompiledContracts/ERC20/Web3+ERC20.swift +++ /dev/null @@ -1,207 +0,0 @@ -// -// Web3+ERC721.swift -// web3swift -// -// Created by Alex Vlasov on 28.08.2018. -// Copyright © 2018 Alex Vlasov. All rights reserved. -// - -import Foundation -import BigInt -import Result - -// This namespace contains functions to work with ERC20 tokens. -// variables are lazyly evaluated or global token information (name, ticker, total supply) -// can be imperatively read and saved -class ERC20 { - private var _name: String? = nil - private var _symbol: String? = nil - private var _decimals: UInt8? = nil - private var _hasReadProperties: Bool = false - - public var options: Web3Options - public var web3: web3 - public var provider: Web3Provider - public var address: EthereumAddress - - lazy var contract: web3.web3contract = { - let contract = self.web3.contract(Web3.Utils.erc20ABI, at: self.address, abiVersion: 2) - precondition(contract != nil) - return contract! - }() - - public init(web3: web3, provider: Web3Provider, address: EthereumAddress) { - self.web3 = web3 - self.provider = provider - self.address = address - var mergedOptions = web3.options - mergedOptions.to = address - self.options = mergedOptions - } - - public var name: String { - self.readProperties() - if self._name != nil { - return self._name! - } - return "" - } - - public var symbol: String { - self.readProperties() - if self._symbol != nil { - return self._symbol! - } - return "" - } - - public var decimals: UInt8 { - self.readProperties() - if self._decimals != nil { - return self._decimals! - } - return 255 - } - - public func readProperties() { - if self._hasReadProperties { - return - } - defer { self._hasReadProperties = true } - let contract = self.contract - guard contract.contract.address != nil else {return} - guard let nameResult = contract.method("name", parameters: [] as [AnyObject], extraData: Data(), options: self.options)?.call(options: nil, onBlock: "latest") else {return} - switch nameResult { - case .success(let returned): - guard let res = returned["0"] as? String else {break} - self._name = res - default: - self._name = "" - } - - guard let symbol = contract.method("symbol", parameters: [] as [AnyObject], extraData: Data(), options: self.options)?.call(options: nil, onBlock: "latest") else {return} - switch symbol { - case .success(let returned): - guard let res = returned["0"] as? String else {break} - self._symbol = res - default: - self._symbol = "" - } - - guard let decimalsResult = contract.method("decimals", parameters: [] as [AnyObject], extraData: Data(), options: self.options)?.call(options: nil, onBlock: "latest") else {return} - switch decimalsResult { - case .success(let returned): - guard let res = returned["0"] as? BigUInt else {return} - self._decimals = UInt8(res) - default: - self._decimals = 255 - } - } - - func getBalance(account: EthereumAddress) -> Result { - let contract = self.contract - let result = contract.method("balanceOf", parameters: [account] as [AnyObject], extraData: Data(), options: self.options)!.call(options: nil, onBlock: "latest") - switch result { - case .success(let returned): - guard let res = returned["0"] as? BigUInt else {return Result.failure(Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node"))} - return Result(res) - case .failure(let error): - return Result.failure(error) - } - } - - func getAllowance(originalOwner: EthereumAddress, delegate: EthereumAddress) -> Result { - let contract = self.contract - let result = contract.method("allowance", parameters: [originalOwner, delegate] as [AnyObject], extraData: Data(), options: self.options)!.call(options: nil, onBlock: "latest") - switch result { - case .success(let returned): - guard let res = returned["0"] as? BigUInt else {return Result.failure(Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node"))} - return Result(res) - case .failure(let error): - return Result.failure(error) - } - } - - func transfer(from: EthereumAddress, to: EthereumAddress, amount: String) -> Result { - let contract = self.contract - var basicOptions = Web3Options() - basicOptions.from = from - basicOptions.to = self.address - - // get the decimals manually - let intermediate = contract.method("decimals", options: basicOptions)! - let callResult = intermediate.call(options: basicOptions, onBlock: "latest") - var decimals = BigUInt(0) - switch callResult { - case .success(let response): - guard let dec = response["0"], let decTyped = dec as? BigUInt else { - return Result.failure(Web3Error.inputError(desc: "Contract may be not ERC20 compatible, can not get decimals"))} - decimals = decTyped - break - case .failure(let error): - return Result.failure(error) - } - let intDecimals = Int(decimals) - guard let value = Web3.Utils.parseToBigUInt(amount, decimals: intDecimals) else { - return Result.failure(Web3Error.inputError(desc: "Can not parse inputted amount")) - } - let intermediateToSend = contract.method("transfer", parameters: [to, value] as [AnyObject], options: basicOptions)! - return Result(intermediateToSend) - } - - func transferFrom(from: EthereumAddress, to: EthereumAddress, originalOwner: EthereumAddress, amount: String) -> Result { - let contract = self.contract - var basicOptions = Web3Options() - basicOptions.from = from - basicOptions.to = self.address - - // get the decimals manually - let intermediate = contract.method("decimals", options: basicOptions)! - let callResult = intermediate.call(options: basicOptions, onBlock: "latest") - var decimals = BigUInt(0) - switch callResult { - case .success(let response): - guard let dec = response["0"], let decTyped = dec as? BigUInt else { - return Result.failure(Web3Error.inputError(desc: "Contract may be not ERC20 compatible, can not get decimals"))} - decimals = decTyped - break - case .failure(let error): - return Result.failure(error) - } - let intDecimals = Int(decimals) - guard let value = Web3.Utils.parseToBigUInt(amount, decimals: intDecimals) else { - return Result.failure(Web3Error.inputError(desc: "Can not parse inputted amount")) - } - let intermediateToSend = contract.method("transferFrom", parameters: [originalOwner, to, value] as [AnyObject], options: basicOptions)! - return Result(intermediateToSend) - } - - func setAllowance(from: EthereumAddress, to: EthereumAddress, newAmount: String) -> Result { - let contract = self.contract - var basicOptions = Web3Options() - basicOptions.from = from - basicOptions.to = self.address - - // get the decimals manually - let intermediate = contract.method("setAllowance", options: basicOptions)! - let callResult = intermediate.call(options: basicOptions, onBlock: "latest") - var decimals = BigUInt(0) - switch callResult { - case .success(let response): - guard let dec = response["0"], let decTyped = dec as? BigUInt else { - return Result.failure(Web3Error.inputError(desc: "Contract may be not ERC20 compatible, can not get decimals"))} - decimals = decTyped - break - case .failure(let error): - return Result.failure(error) - } - let intDecimals = Int(decimals) - guard let value = Web3.Utils.parseToBigUInt(newAmount, decimals: intDecimals) else { - return Result.failure(Web3Error.inputError(desc: "Can not parse inputted amount")) - } - let intermediateToSend = contract.method("setAllowance", parameters: [to, value] as [AnyObject], options: basicOptions)! - return Result(intermediateToSend) - } - - -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Batching.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Batching.swift index a8362d902..982efa0e9 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Batching.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Batching.swift @@ -1,9 +1,7 @@ -// -// Promise+Batching.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+HttpProvider.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+HttpProvider.swift index bb6cd2c35..94b1b5a50 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+HttpProvider.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+HttpProvider.swift @@ -1,9 +1,7 @@ -// -// Promise+HttpProvider.swift // web3swift // -// Created by Alexander Vlasov on 16.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Contract+GetIndexedEvents.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Contract+GetIndexedEvents.swift index a4753f70e..66391e1fe 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Contract+GetIndexedEvents.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Contract+GetIndexedEvents.swift @@ -1,9 +1,7 @@ +// web3swift // -// Promise+Web3+Contract+GetIndexedEvents.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift index b6cb71af0..ee206b341 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+Call.swift @@ -1,9 +1,7 @@ +// web3swift // -// Promise+Web3+Eth+Call.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -11,10 +9,10 @@ import PromiseKit extension web3.Eth { - func callPromise(_ transaction: EthereumTransaction, options: Web3Options, onBlock: String = "latest") -> Promise{ + public func callPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?) -> Promise{ let queue = web3.requestDispatcher.queue do { - guard let request = EthereumTransaction.createRequest(method: .call, transaction: transaction, onBlock: onBlock, options: options) else { + guard let request = EthereumTransaction.createRequest(method: .call, transaction: transaction, transactionOptions: transactionOptions) else { throw Web3Error.processingError(desc: "Transaction is invalid") } let rp = web3.dispatch(request) diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift index db001f96d..7c2a68bfa 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+EstimateGas.swift @@ -1,9 +1,7 @@ +// web3swift // -// Promise+Web3+Eth+EstimateGas.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -12,10 +10,10 @@ import PromiseKit extension web3.Eth { - func estimateGasPromise(_ transaction: EthereumTransaction, options: Web3Options? = nil, onBlock: String = "latest") -> Promise{ + public func estimateGasPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?) -> Promise{ let queue = web3.requestDispatcher.queue do { - guard let request = EthereumTransaction.createRequest(method: .estimateGas, transaction: transaction, onBlock: onBlock, options: options) else { + guard let request = EthereumTransaction.createRequest(method: .estimateGas, transaction: transaction, transactionOptions: transactionOptions) else { throw Web3Error.processingError(desc: "Transaction is invalid") } let rp = web3.dispatch(request) diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift index eadac28a6..9e01bf580 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetAccounts.swift @@ -1,14 +1,13 @@ -// -// Promise+Web3+Eth+GetAccounts.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt import PromiseKit +import EthereumAddress extension web3.Eth { public func getAccountsPromise() -> Promise<[EthereumAddress]> { @@ -16,11 +15,10 @@ extension web3.Eth { if (self.web3.provider.attachedKeystoreManager != nil) { let promise = Promise<[EthereumAddress]>.pending() queue.async { - let result = self.web3.wallet.getAccounts() - switch result { - case .success(let allAccounts): + do { + let allAccounts = try self.web3.wallet.getAccounts() promise.resolver.fulfill(allAccounts) - case .failure(let error): + } catch { promise.resolver.reject(error) } } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift index 6d8271e27..92c69512d 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBalance.swift @@ -1,14 +1,13 @@ -// -// DataConversion.swift // web3swift // -// Created by Alexander Vlasov on 16.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import PromiseKit import BigInt +import EthereumAddress extension web3.Eth { public func getBalancePromise(address: EthereumAddress, onBlock: String = "latest") -> Promise { diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByHash.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByHash.swift index 7fbd0e2c2..90710d4fb 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByHash.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByHash.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetBlockByHash.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByNumber.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByNumber.swift index dc7ae46ce..ac92584e5 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByNumber.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockByNumber.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetBlockByNumber.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockNumber.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockNumber.swift index 45807b125..e8bc2676d 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockNumber.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetBlockNumber.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetBlockNumber.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetGasPrice.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetGasPrice.swift index 4a4611697..fbda2ace7 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetGasPrice.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetGasPrice.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetGasPrice.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift index 0ed83e186..593280f03 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionCount.swift @@ -1,14 +1,13 @@ -// -// Promise+Web3+Eth+GetTransactionCount.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt import PromiseKit +import EthereumAddress extension web3.Eth { public func getTransactionCountPromise(address: EthereumAddress, onBlock: String = "latest") -> Promise { diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionDetails.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionDetails.swift index bc9444135..522f04307 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionDetails.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionDetails.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetTransactionDetails.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionReceipt.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionReceipt.swift index 6b61a1009..517a007ee 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionReceipt.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+GetTransactionReceipt.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+GetTransactionReceipt.swift // web3swift // -// Created by Alexander Vlasov on 17.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift index efbfca932..7aa3b83a6 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+SendRawTransaction.swift @@ -1,16 +1,14 @@ +// web3swift // -// Promise+Web3+Eth+SendRawTransaction.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import PromiseKit extension web3.Eth { - func sendRawTransactionPromise(_ transaction: Data) -> Promise { + public func sendRawTransactionPromise(_ transaction: Data) -> Promise { guard let deserializedTX = EthereumTransaction.fromRaw(transaction) else { let promise = Promise.pending() promise.resolver.reject(Web3Error.processingError(desc: "Serialized TX is invalid")) @@ -19,7 +17,7 @@ extension web3.Eth { return sendRawTransactionPromise(deserializedTX) } - func sendRawTransactionPromise(_ transaction: EthereumTransaction) -> Promise{ + public func sendRawTransactionPromise(_ transaction: EthereumTransaction) -> Promise{ // print(transaction) let queue = web3.requestDispatcher.queue do { @@ -35,6 +33,11 @@ extension web3.Eth { throw Web3Error.nodeError(desc: "Invalid value from Ethereum node") } let result = TransactionSendingResult(transaction: transaction, hash: value) + for hook in self.web3.postSubmissionHooks { + hook.queue.async { + hook.function(result) + } + } return result } } catch { diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift index 376312ca0..7fe53fd98 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Eth+SendTransaction.swift @@ -1,9 +1,7 @@ -// -// Promise+Web3+Eth+SendTransaction.swift // web3swift // -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -12,13 +10,36 @@ import PromiseKit extension web3.Eth { - func sendTransactionPromise(_ transaction: EthereumTransaction, options: Web3Options, password:String = "web3swift") -> Promise { + public func sendTransactionPromise(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions? = nil, password:String = "web3swift") -> Promise { // print(transaction) - var assembledTransaction : EthereumTransaction = transaction.mergedWithOptions(options) + var assembledTransaction : EthereumTransaction = transaction // .mergedWithOptions(transactionOptions) let queue = web3.requestDispatcher.queue do { + var mergedOptions = self.web3.transactionOptions.merge(transactionOptions) + + var forAssemblyPipeline : (EthereumTransaction, TransactionOptions) = (assembledTransaction, mergedOptions) + + for hook in self.web3.preSubmissionHooks { + let prom : Promise = Promise {seal in + hook.queue.async { + let hookResult = hook.function(forAssemblyPipeline) + if hookResult.2 { + forAssemblyPipeline = (hookResult.0, hookResult.1) + } + seal.fulfill(hookResult.2) + } + } + let shouldContinue = try prom.wait() + if !shouldContinue { + throw Web3Error.processingError(desc: "Transaction is canceled by middleware") + } + } + + assembledTransaction = forAssemblyPipeline.0 + mergedOptions = forAssemblyPipeline.1 + if self.web3.provider.attachedKeystoreManager == nil { - guard let request = EthereumTransaction.createRequest(method: JSONRPCmethod.sendTransaction, transaction: assembledTransaction, onBlock: nil, options: options) else + guard let request = EthereumTransaction.createRequest(method: .sendTransaction, transaction: assembledTransaction, transactionOptions: mergedOptions) else { throw Web3Error.processingError(desc: "Failed to create a request to send transaction") } @@ -30,10 +51,15 @@ extension web3.Eth { throw Web3Error.nodeError(desc: "Invalid value from Ethereum node") } let result = TransactionSendingResult(transaction: assembledTransaction, hash: value) + for hook in self.web3.postSubmissionHooks { + hook.queue.async { + hook.function(result) + } + } return result } } - guard let from = options.from else { + guard let from = mergedOptions.from else { throw Web3Error.inputError(desc: "No 'from' field provided") } do { diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Intermediate+Send.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Intermediate+Send.swift deleted file mode 100755 index 9c419e686..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Intermediate+Send.swift +++ /dev/null @@ -1,9 +0,0 @@ -// -// Promise+Web3+Intermediate+Send.swift -// web3swift -// -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -// Placeholder until bug in Swift is resolved diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Personal+CreateAccount.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Personal+CreateAccount.swift new file mode 100644 index 000000000..bfac4ac73 --- /dev/null +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Personal+CreateAccount.swift @@ -0,0 +1,37 @@ +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt +import PromiseKit +import EthereumAddress + +extension web3.Personal { + public func createAccountPromise(password:String = "web3swift") -> Promise { + let queue = web3.requestDispatcher.queue + do { + if self.web3.provider.attachedKeystoreManager == nil { + let request = JSONRPCRequestFabric.prepareRequest(.createAccount, parameters: [password]) + return self.web3.dispatch(request).map(on: queue) {response in + guard let value: EthereumAddress = response.getValue() else { + if response.error != nil { + throw Web3Error.nodeError(desc: response.error!.message) + } + throw Web3Error.nodeError(desc: "Invalid value from Ethereum node") + } + return value + } + } + throw Web3Error.inputError(desc: "Creating account in a local keystore with this method is not supported") + } catch { + let returnPromise = Promise.pending() + queue.async { + returnPromise.resolver.reject(error) + } + return returnPromise.promise + } + } +} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift index 552c3f266..582bbd345 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Personal+Sign.swift @@ -1,18 +1,17 @@ -// -// Promise+Web3+Personal+Sign.swift // web3swift // -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt import PromiseKit +import EthereumAddress extension web3.Personal { - func signPersonalMessagePromise(message: Data, from: EthereumAddress, password:String = "web3swift") -> Promise { + public func signPersonalMessagePromise(message: Data, from: EthereumAddress, password:String = "web3swift") -> Promise { let queue = web3.requestDispatcher.queue do { if self.web3.provider.attachedKeystoreManager == nil { diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift index ceed0c8e6..15f5e8409 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+Personal+UnlockAccount.swift @@ -1,23 +1,22 @@ -// -// Promise+Web3+Personal+UnlockAccount.swift // web3swift // -// Created by Alexander Vlasov on 18.06.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt import PromiseKit +import EthereumAddress extension web3.Personal { - func unlockAccountPromise(account: EthereumAddress, password:String = "web3swift", seconds: UInt64 = 300) -> Promise { + public func unlockAccountPromise(account: EthereumAddress, password:String = "web3swift", seconds: UInt64 = 300) -> Promise { let addr = account.address return unlockAccountPromise(account: addr, password: password, seconds: seconds) } - func unlockAccountPromise(account: String, password:String = "web3swift", seconds: UInt64 = 300) -> Promise { + public func unlockAccountPromise(account: String, password:String = "web3swift", seconds: UInt64 = 300) -> Promise { let queue = web3.requestDispatcher.queue do { if self.web3.provider.attachedKeystoreManager == nil { diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+TxPool.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+TxPool.swift new file mode 100644 index 000000000..996fae706 --- /dev/null +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Promises/Classes/Promise+Web3+TxPool.swift @@ -0,0 +1,56 @@ +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt +import PromiseKit + +extension web3.TxPool { + public func getInspectPromise() -> Promise<[String:[String:[String:String]]]> { + let request = JSONRPCRequestFabric.prepareRequest(.getTxPoolInspect, parameters: []) + let rp = web3.dispatch(request) + let queue = web3.requestDispatcher.queue + return rp.map(on: queue ) { response in + guard let value: [String:[String:[String:String]]] = response.getValue() else { + if response.error != nil { + throw Web3Error.nodeError(desc: response.error!.message) + } + throw Web3Error.nodeError(desc: "Invalid value from Ethereum node") + } + return value + } + } + + public func getStatusPromise() -> Promise { + let request = JSONRPCRequestFabric.prepareRequest(.getTxPoolStatus, parameters: []) + let rp = web3.dispatch(request) + let queue = web3.requestDispatcher.queue + return rp.map(on: queue ) { response in + guard let value: TxPoolStatus = response.result as? TxPoolStatus else { + if response.error != nil { + throw Web3Error.nodeError(desc: response.error!.message) + } + throw Web3Error.nodeError(desc: "Invalid value from Ethereum node") + } + return value + } + } + + public func getContentPromise() -> Promise { + let request = JSONRPCRequestFabric.prepareRequest(.getTxPoolContent, parameters: []) + let rp = web3.dispatch(request) + let queue = web3.requestDispatcher.queue + return rp.map(on: queue ) { response in + guard let value: TxPoolContent = response.getValue() else { + if response.error != nil { + throw Web3Error.nodeError(desc: response.error!.message) + } + throw Web3Error.nodeError(desc: "Invalid value from Ethereum node") + } + return value + } + } +} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Transaction/Classes/BloomFilter.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Transaction/Classes/BloomFilter.swift index d84b782db..9a83b0595 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Transaction/Classes/BloomFilter.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Transaction/Classes/BloomFilter.swift @@ -1,14 +1,13 @@ -// -// BloomFilter.swift // web3swift // -// Created by Alexander Vlasov on 02.03.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt import CryptoSwift +import EthereumAddress public struct EthereumBloomFilter{ public var bytes = Data(repeatElement(UInt8(0), count: 256)) @@ -26,29 +25,6 @@ public struct EthereumBloomFilter{ } } - -// -//func (b Bloom) Test(test *big.Int) bool { -// return BloomLookup(b, test) -//} -// -//func (b Bloom) TestBytes(test []byte) bool { -// return b.Test(new(big.Int).SetBytes(test)) -// -//} -// -//// MarshalText encodes b as a hex string with 0x prefix. -//func (b Bloom) MarshalText() ([]byte, error) { -// return hexutil.Bytes(b[:]).MarshalText() -//} -// -//// UnmarshalText b as a hex string with 0x prefix. -//func (b *Bloom) UnmarshalText(input []byte) error { -// return hexutil.UnmarshalFixedText("Bloom", input, b[:]) -//} - - - extension EthereumBloomFilter { static func bloom9(_ biguint: BigUInt) -> BigUInt { diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Transaction/Classes/EthereumTransaction.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Transaction/Classes/EthereumTransaction.swift index cb7b45e3e..09af7a233 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Transaction/Classes/EthereumTransaction.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Transaction/Classes/EthereumTransaction.swift @@ -1,13 +1,14 @@ -// -// EthereumTransaction.swift // web3swift // -// Created by Alexander Vlasov on 05.12.2017. -// Copyright © 2017 Alexander Vlasov. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt +import SwiftRLP +import secp256k1_swift +import EthereumAddress public struct EthereumTransaction: CustomStringConvertible { public var nonce: BigUInt @@ -298,7 +299,7 @@ public struct EthereumTransaction: CustomStringConvertible { } else { return nil } - case .list(_, _): + case .list(_, _, _): return nil } guard let valueData = rlpItem[4]!.data else {return nil} @@ -318,12 +319,14 @@ public struct EthereumTransaction: CustomStringConvertible { } } - static func createRequest(method: JSONRPCmethod, transaction: EthereumTransaction, onBlock: String? = nil, options: Web3Options?) -> JSONRPCrequest? { + static func createRequest(method: JSONRPCmethod, transaction: EthereumTransaction, transactionOptions: TransactionOptions?) -> JSONRPCrequest? { + let onBlock = transactionOptions?.callOnBlock?.stringValue var request = JSONRPCrequest() request.method = method + let from = transactionOptions?.from // guard let from = options?.from else {return nil} - guard var txParams = transaction.encodeAsDictionary(from: options?.from) else {return nil} - if method == .estimateGas || options?.gasLimit == nil { + guard var txParams = transaction.encodeAsDictionary(from: from) else {return nil} + if method == .estimateGas || transactionOptions?.gasLimit == nil { txParams.gas = nil } var params = [txParams] as Array diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Transaction/Classes/TransactionSigner.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Transaction/Classes/TransactionSigner.swift index 71c63fc4f..b00b5d8c4 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Transaction/Classes/TransactionSigner.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Transaction/Classes/TransactionSigner.swift @@ -1,14 +1,13 @@ +// web3swift // -// TransactionSigner.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 26.02.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -import Result import BigInt +import secp256k1_swift +import EthereumAddress public enum TransactionSignerError: Error { case signatureError(String) @@ -24,11 +23,11 @@ public struct Web3Signer { try FallbackSigner.sign(transaction: &transaction, privateKey: privateKey, useExtraEntropy: useExtraEntropy) } } - public static func signIntermediate(intermediate:inout TransactionIntermediate, keystore: AbstractKeystore, account: EthereumAddress, password: String, useExtraEntropy: Bool = false) throws { - var tx = intermediate.transaction - try Web3Signer.signTX(transaction: &tx, keystore: keystore, account: account, password: password, useExtraEntropy: useExtraEntropy) - intermediate.transaction = tx - } +// public static func signIntermediate(intermediate:inout TransactionIntermediate, keystore: AbstractKeystore, account: EthereumAddress, password: String, useExtraEntropy: Bool = false) throws { +// var tx = intermediate.transaction +// try Web3Signer.signTX(transaction: &tx, keystore: keystore, account: account, password: password, useExtraEntropy: useExtraEntropy) +// intermediate.transaction = tx +// } public static func signPersonalMessage(_ personalMessage: Data, keystore: AbstractKeystore, account: EthereumAddress, password: String, useExtraEntropy: Bool = false) throws -> Data? { var privateKey = try keystore.UNSAFE_getPrivateKeyData(password: password, account: account) defer {Data.zero(&privateKey)} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/EIP67Code.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/EIP67Code.swift index e7ab8c394..e2951a93b 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/EIP67Code.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/EIP67Code.swift @@ -1,14 +1,14 @@ -// -// EIP67CodeGenerator.swift // web3swift // -// Created by Alexander Vlasov on 09.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import CoreImage import BigInt +import EthereumAddress +import EthereumABI extension Web3 { @@ -24,7 +24,7 @@ extension Web3 { } public struct Function { public var method: String - public var parameters: [(ABIv2.Element.ParameterType, AnyObject)] + public var parameters: [(ABI.Element.ParameterType, AnyObject)] public func toString() -> String? { let encoding = method + "(" + parameters.map({ (el) -> String in diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/EIP681.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/EIP681.swift deleted file mode 100644 index f0b20a6e5..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/EIP681.swift +++ /dev/null @@ -1,258 +0,0 @@ -// -// EIP681.swift -// web3swift -// -// Created by Alex Vlasov on 08.09.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation -import BigInt - -extension Web3 { - -// request = "ethereum" ":" [ "pay-" ]target_address [ "@" chain_id ] [ "/" function_name ] [ "?" parameters ] -// target_address = ethereum_address -// chain_id = 1*DIGIT -// function_name = STRING -// ethereum_address = ( "0x" 40*40HEXDIG ) / ENS_NAME -// parameters = parameter *( "&" parameter ) -// parameter = key "=" value -// key = "value" / "gas" / "gasLimit" / "gasPrice" / TYPE -// value = number / ethereum_address / STRING -// number = [ "-" / "+" ] *DIGIT [ "." 1*DIGIT ] [ ( "e" / "E" ) [ 1*DIGIT ] [ "+" UNIT ] - - public struct EIP681Code { - public struct EIP681Parameter { - public var type: ABIv2.Element.ParameterType - public var value: AnyObject - } - public var isPayRequest: Bool - public var targetAddress: TargetAddress - public var chainID: BigUInt? - public var functionName: String? - public var parameters: [EIP681Parameter] = [EIP681Parameter]() - public var gasLimit: BigUInt? - public var gasPrice: BigUInt? - public var amount: BigUInt? - public var function: ABIv2.Element.Function? - - public enum TargetAddress { - case ethereumAddress(EthereumAddress) - case ensAddress(String) - public init(_ string: String) { - if let ethereumAddress = EthereumAddress(string) { - self = TargetAddress.ethereumAddress(ethereumAddress) - } else { - self = TargetAddress.ensAddress(string) - } - } - } - - public init(_ targetAddress: TargetAddress, isPayRequest: Bool = false) { - self.isPayRequest = isPayRequest - self.targetAddress = targetAddress - } - -// public struct Function { -// public var method: String -// public var parameters: [(ABIv2.Element.ParameterType, AnyObject)] -// -// public func toString() -> String? { -// let encoding = method + "(" + parameters.map({ (el) -> String in -// if let string = el.1 as? String { -// return el.0.abiRepresentation + " " + string -// } else if let number = el.1 as? BigUInt { -// return el.0.abiRepresentation + " " + String(number, radix: 10) -// } else if let number = el.1 as? BigInt { -// return el.0.abiRepresentation + " " + String(number, radix: 10) -// } else if let data = el.1 as? Data { -// return el.0.abiRepresentation + " " + data.toHexString().addHexPrefix() -// } -// return "" -// }).joined(separator: ", ") + ")" -// return encoding -// } -// } - } - - public struct EIP681CodeParser { -// static var addressRegex = "^(pay-)?([0-9a-zA-Z]+)(@[0-9]+)?" - static var addressRegex = "^(pay-)?([0-9a-zA-Z.]+)(@[0-9]+)?\\/?(.*)?$" - - public static func parse(_ data: Data) -> EIP681Code? { - guard let string = String(data: data, encoding: .utf8) else {return nil} - return parse(string) - } - - public static func parse(_ string: String) -> EIP681Code? { - guard string.hasPrefix("ethereum:") else {return nil} - let striped = string.components(separatedBy: "ethereum:") - guard striped.count == 2 else {return nil} - guard let encoding = striped[1].removingPercentEncoding else {return nil} -// guard let url = URL.init(string: encoding) else {return nil} - let matcher = try! NSRegularExpression(pattern: addressRegex, options: NSRegularExpression.Options.dotMatchesLineSeparators) - let match = matcher.matches(in: encoding, options: NSRegularExpression.MatchingOptions.anchored, range: encoding.fullNSRange) - guard match.count == 1 else {return nil} - guard match[0].numberOfRanges == 5 else {return nil} - var addressString: String? = nil - var chainIDString: String? = nil - var tail: String? = nil -// if let payModifierRange = Range(match[0].range(at: 1), in: encoding) { -// let payModifierString = String(encoding[payModifierRange]) -// print(payModifierString) -// } - if let addressRange = Range(match[0].range(at: 2), in: encoding) { - addressString = String(encoding[addressRange]) - } - if let chainIDRange = Range(match[0].range(at: 3), in: encoding) { - chainIDString = String(encoding[chainIDRange]) - } - if let tailRange = Range(match[0].range(at: 4), in: encoding) { - tail = String(encoding[tailRange]) - } - guard let address = addressString else {return nil} - let targetAddress = EIP681Code.TargetAddress(address) - - var code = EIP681Code(targetAddress) - if chainIDString != nil { - chainIDString!.remove(at: chainIDString!.startIndex) - code.chainID = BigUInt(chainIDString!) - } - if tail == nil { - return code - } - guard let components = URLComponents(string: tail!) else {return code} - if components.path == "" { - code.isPayRequest = true - } else { - code.functionName = components.path - } - guard let queryItems = components.queryItems else {return code} - var inputNumber: Int = 0 - var inputs = [ABIv2.Element.InOut]() - for comp in queryItems { - if let inputType = try? ABIv2TypeParser.parseTypeString(comp.name) { - guard let value = comp.value else {continue} - var nativeValue: AnyObject? = nil - switch inputType { - case .address: - let val = EIP681Code.TargetAddress(value) - switch val { - case .ethereumAddress(let ethereumAddress): - nativeValue = ethereumAddress as AnyObject - case .ensAddress(let ens): - let web = web3(provider: InfuraProvider(Networks.fromInt(Int(code.chainID ?? 1)) ?? Networks.Mainnet)!) - var ensModel = ENS(web3: web) - let resolver = ensModel.resolver(forDomain: ens) - switch resolver { - case .failure(_): - nativeValue = ens as AnyObject - case .success(var res): - let address = res.addr(forDomain: ens) - switch address { - case .failure(_): - nativeValue = ens as AnyObject - case .success(let res): - nativeValue = res as AnyObject - } - } - - } - case .uint(bits: _): - if let val = BigUInt(value, radix: 10) { - nativeValue = val as AnyObject - } else if let val = BigUInt(value.stripHexPrefix(), radix: 16) { - nativeValue = val as AnyObject - } - case .int(bits: _): - if let val = BigInt(value, radix: 10) { - nativeValue = val as AnyObject - } else if let val = BigInt(value.stripHexPrefix(), radix: 16) { - nativeValue = val as AnyObject - } - case .string: - nativeValue = value as AnyObject - case .dynamicBytes: - if let val = Data.fromHex(value) { - nativeValue = val as AnyObject - } else if let val = value.data(using: .utf8) { - nativeValue = val as AnyObject - } - case .bytes(length: _): - if let val = Data.fromHex(value) { - nativeValue = val as AnyObject - } else if let val = value.data(using: .utf8) { - nativeValue = val as AnyObject - } - case .bool: - switch value { - case "true","True", "TRUE", "1": - nativeValue = true as AnyObject - case "false", "False", "FALSE", "0": - nativeValue = false as AnyObject - default: - nativeValue = true as AnyObject - } - default: - continue - } - if nativeValue != nil { - inputs.append(ABIv2.Element.InOut(name: String(inputNumber), type: inputType)) - code.parameters.append(EIP681Code.EIP681Parameter(type: inputType, value: nativeValue!)) - inputNumber = inputNumber + 1 - } else { - return nil - } - } else { - switch comp.name { - case "value": - guard let value = comp.value else {return nil} - let splittedValue = value.split(separator: "e") - if splittedValue.count <= 1 { - guard let val = BigUInt(value, radix: 10) else {return nil } - code.amount = val - } else if splittedValue.count == 2 { - guard let power = Double(splittedValue[1]) else { return nil } - let splittedNumber = String(splittedValue[0]).replacingOccurrences(of: ",", with: ".").split(separator: ".") - var a = BigUInt(pow(10, power)) - if splittedNumber.count == 1 { - guard let number = BigUInt(splittedNumber[0], radix: 10) else { return nil } - code.amount = number * a - } else if splittedNumber.count == 2 { - let stringNumber = String(splittedNumber[0]) + String(splittedNumber[1]) - let am = BigUInt(pow(10, Double(splittedNumber[1].count))) - a = a / am - guard let number = BigUInt(stringNumber, radix: 10) else { return nil } - code.amount = number * a - } else { return nil } - } else { return nil } - - case "gas": - guard let value = comp.value else {return nil} - guard let val = BigUInt(value, radix: 10) else {return nil} - code.gasLimit = val - case "gasLimit": - guard let value = comp.value else {return nil} - guard let val = BigUInt(value, radix: 10) else {return nil} - code.gasLimit = val - case "gasPrice": - guard let value = comp.value else {return nil} - guard let val = BigUInt(value, radix: 10) else {return nil} - code.gasPrice = val - default: - continue - } - } - } - - if code.functionName != nil { - let functionEncoding = ABIv2.Element.Function(name: code.functionName!, inputs: inputs, outputs: [ABIv2.Element.InOut](), constant: false, payable: code.amount != nil) - code.function = functionEncoding - } - - print(code) - return code - } - } -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/ENS.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/ENS.swift deleted file mode 100644 index 1f02f62c5..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/ENS.swift +++ /dev/null @@ -1,155 +0,0 @@ -// -// ENS.swift -// web3swift-iOS -// - -import Foundation -import BigInt -import Result - -public struct ENS { - - let web3: web3 - let ensContractAddress: EthereumAddress? - - init(web3: web3) { - self.web3 = web3 - switch web3.provider.network { - case .Mainnet?: - ensContractAddress = EthereumAddress("0x314159265dd8dbb310642f98f50c066173c1259b") - case .Rinkeby?: - ensContractAddress = EthereumAddress("0xe7410170f87102df0055eb195163a03b7f2bff4a") - case .Ropsten?: - ensContractAddress = EthereumAddress("0x112234455c3a32fd11230c42e7bccd4a84e02010") - default: - ensContractAddress = nil - } - } - - private lazy var registryContract: web3.web3contract = { - let contract = self.web3.contract(Web3.Utils.ensRegistryABI, at: self.ensContractAddress, abiVersion: 2) - precondition(contract != nil) - return contract! - }() - - - //MARK: - Returns resolver for the given domain - mutating func resolver(forDomain domain: String) -> Result { - guard let nameHash = NameHash.nameHash(domain) else { return Result.failure(Web3Error.dataError) } - let options = Web3Options.defaultOptions() - guard let transaction = self.registryContract.method("resolver", parameters: [nameHash as AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = transaction.call(options: options) - switch result { - case .success(let res): - guard let resolverAddress = res["0"] as? EthereumAddress else { return Result.failure(Web3Error.dataError) } - return Result(ResolverENS(web3: self.web3, resolverAddress: resolverAddress)) - case .failure(let error): - return Result.failure(error) - } - } - - //TODO: - - /* - 1. Write a function that allows map domain to the name - */ -} - -public struct ResolverENS { - let web3: web3 - let resolverAddress: EthereumAddress - - public enum InterfaceName { - case addr - case name - case ABI - case pubkey - - func hash() -> String { - switch self { - case .ABI: - return "0x2203ab56" - case .addr: - return "0x3b3b57de" - case .name: - return "0x691f3431" - case .pubkey: - return "0xc8690233" - } - } - } - - private lazy var resolverContract: web3.web3contract = { - let contract = self.web3.contract(Web3.Utils.resolverABI, at: self.resolverAddress, abiVersion: 2) - precondition(contract != nil) - return contract! - }() - - init(web3: web3, resolverAddress: EthereumAddress) { - self.web3 = web3 - self.resolverAddress = resolverAddress - } - - mutating func supportsInterface(interfaceID: Data) -> Result { - return supportsInterface(interfaceID: interfaceID.toHexString()) - } - - //MARK: - returns true if the contract supports given interface - mutating func supportsInterface(interfaceID: String) -> Result { - let options = Web3Options.defaultOptions() - guard let transaction = self.resolverContract.method("supportsInterface", parameters: [interfaceID as AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = transaction.call(options: options) - switch result { - case .success(let res): - guard let supports = res["0"] as? Bool else { return Result.failure(Web3Error.dataError) } - return Result(supports) - case .failure(let error): - return Result.failure(error) - } - } - - //MARK: - returns address for the given domain at given resolver - mutating func addr(forDomain domain: String) -> Result { - guard let nameHash = NameHash.nameHash(domain) else { return Result.failure(Web3Error.dataError) } - let options = Web3Options.defaultOptions() - guard let transaction = self.resolverContract.method("addr", parameters: [nameHash as AnyObject], options: options) else { return Result.failure(Web3Error.dataError) } - let result = transaction.call(options: options) - switch result { - case .success(let res): - return Result(res["0"] as! EthereumAddress) - case .failure(let error): - return Result.failure(error) - } - } - - //MARK: - returns corresponding ENS to the requested node - mutating func name(node: String) -> Result { - let options = Web3Options.defaultOptions() - guard let transaction = self.resolverContract.method("name", parameters: [node.lowercased() as AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError)} - let result = transaction.call(options: options) - switch result { - case .success(let res): - return Result(res["0"] as! String) - case .failure(let error): - return Result.failure(error) - } - - } - - //MARK: - returns ABI in the requested encodings - mutating func ABI(node: String, contentType: BigUInt) -> Result<(BigUInt, Data), Web3Error> { - let options = Web3Options.defaultOptions() - guard let transaction = self.resolverContract.method("ABI", parameters: [node, contentType] as [AnyObject], options: options) else { return Result.failure(Web3Error.transactionSerializationError) } - let result = transaction.call(options: options) - switch result { - case .success(let res): - guard let encoding = res["0"] as? BigUInt else { return Result.failure(Web3Error.dataError) } - guard let data = res["1"] as? Data else { return Result.failure(Web3Error.dataError) } - return Result((encoding, data)) - case .failure(let error): - return Result.failure(error) - } - } - - //TODO: - func pubkey() -} - diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/NameHash.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/NameHash.swift deleted file mode 100644 index cf4a889ce..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Utils/Classes/NameHash.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// NameHash.swift -// web3swift -// -// Created by Alex Vlasov on 08.09.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation -import CryptoSwift - -public struct NameHash { - public static func normalizeDomainName(_ domain: String) -> String? { - // TODO use ICU4C library later for domain name normalization, althoug f**k it for now, it's few megabytes large piece - let normalized = domain.lowercased() - return normalized - } - - public static func nameHash(_ domain: String) -> Data? { - guard let normalized = NameHash.normalizeDomainName(domain) else {return nil} - return namehash(normalized) - } - - static func namehash(_ name: String) -> Data? { - if name == "" { - return Data(repeating: 0, count: 32) - } - let parts = name.split(separator: ".") - guard parts.count > 0 else { - return nil - } - guard let lowerLevel = parts.first else { - return nil - } - var remainder = "" - if parts.count > 1 { - remainder = parts[1 ..< parts.count].joined(separator: ".") - } - // TODO here some better normalization can happen - var hashData = Data() - guard let remainderHash = namehash(remainder) else { - return nil - } - guard let labelData = lowerLevel.data(using: .utf8) else { - return nil - } - hashData.append(remainderHash) - hashData.append(labelData.sha3(.keccak256)) - let hash = hashData.sha3(.keccak256) - print(name) - print(hash.toHexString()) - return hash - } -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Contract.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Contract.swift index 4ff94023d..13b22971f 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Contract.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Contract.swift @@ -1,65 +1,86 @@ - -// Web3+Contract.swift // web3swift // -// Created by Alexander Vlasov on 19.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt +import EthereumAddress extension web3 { /// The contract instance. Initialized in runtime from ABI string (that is a JSON array). In addition an existing contract address can be supplied to provide the default "to" address in all the following requests. ABI version is 2 by default and should not be changed. public func contract(_ abiString: String, at: EthereumAddress? = nil, abiVersion: Int = 2) -> web3contract? { - return web3contract(web3: self, abiString: abiString, at: at, options: self.options, abiVersion: abiVersion) + return web3contract(web3: self, abiString: abiString, at: at, transactionOptions: self.transactionOptions, abiVersion: abiVersion) } /// Web3 instance bound contract instance. public class web3contract { - var contract: ContractProtocol + var contract: EthereumContract var web3 : web3 - public var options: Web3Options? = nil + public var transactionOptions: TransactionOptions? = nil /// Initialize the bound contract instance by supplying the Web3 provider bound object, ABI, Ethereum address and some default /// options for further function calls. By default the contract inherits options from the web3 object. Additionally supplied "options" /// do override inherited ones. - public init?(web3 web3Instance:web3, abiString: String, at: EthereumAddress? = nil, options: Web3Options? = nil, abiVersion: Int = 2) { + public init?(web3 web3Instance:web3, abiString: String, at: EthereumAddress? = nil, transactionOptions: TransactionOptions? = nil, abiVersion: Int = 2) { self.web3 = web3Instance - self.options = web3.options + self.transactionOptions = web3.transactionOptions switch abiVersion { - case 1: - print("ABIv1 bound contract is now deprecated") - return nil - case 2: - guard let c = ContractV2(abiString, at: at) else {return nil} - contract = c default: - return nil + guard let c = EthereumContract(abiString, at: at) else {return nil} + contract = c } - var mergedOptions = Web3Options.merge(self.options, with: options) + var mergedOptions = self.transactionOptions?.merge(transactionOptions) if at != nil { contract.address = at mergedOptions?.to = at } else if let addr = mergedOptions?.to { contract.address = addr } - self.options = mergedOptions + self.transactionOptions = mergedOptions } /// Deploys a constact instance using the previously provided (at initialization) ABI, some bytecode, constructor parameters and options. /// If extraData is supplied it is appended to encoded bytecode and constructor parameters. /// /// Returns a "Transaction intermediate" object. - public func deploy(bytecode: Data, parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), options: Web3Options?) -> TransactionIntermediate? { - - let mergedOptions = Web3Options.merge(self.options, with: options) - guard var tx = self.contract.deploy(bytecode: bytecode, parameters: parameters, extraData: extraData, options: mergedOptions) else {return nil} + public func deploy(bytecode: Data, parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { + let mergedOptions = self.transactionOptions?.merge(transactionOptions) + guard var tx = self.contract.deploy(bytecode: bytecode, parameters: parameters, extraData: extraData) else {return nil} + tx.chainID = self.web3.provider.network?.chainID + let writeTX = WriteTransaction.init(transaction: tx, web3: self.web3, contract: self.contract, method: "fallback", transactionOptions: mergedOptions) + return writeTX + } + + /// Creates and object responsible for calling a particular function of the contract. If method name is not found in ABI - returns nil. + /// If extraData is supplied it is appended to encoded function parameters. Can be usefull if one wants to call + /// the function not listed in ABI. "Parameters" should be an array corresponding to the list of parameters of the function. + /// Elements of "parameters" can be other arrays or instances of String, Data, BigInt, BigUInt, Int or EthereumAddress. + /// + /// Returns a "Transaction intermediate" object. + public func method(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { + let mergedOptions = self.transactionOptions?.merge(transactionOptions) + guard var tx = self.contract.method(method, parameters: parameters, extraData: extraData) else {return nil} + tx.chainID = self.web3.provider.network?.chainID + let writeTX = WriteTransaction.init(transaction: tx, web3: self.web3, contract: self.contract, method: method, transactionOptions: mergedOptions) + return writeTX + } + + /// Creates and object responsible for calling a particular function of the contract. If method name is not found in ABI - returns nil. + /// If extraData is supplied it is appended to encoded function parameters. Can be usefull if one wants to call + /// the function not listed in ABI. "Parameters" should be an array corresponding to the list of parameters of the function. + /// Elements of "parameters" can be other arrays or instances of String, Data, BigInt, BigUInt, Int or EthereumAddress. + /// + /// Returns a "Transaction intermediate" object. + public func read(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> ReadTransaction? { + let mergedOptions = self.transactionOptions?.merge(transactionOptions) + guard var tx = self.contract.method(method, parameters: parameters, extraData: extraData) else {return nil} tx.chainID = self.web3.provider.network?.chainID - let intermediate = TransactionIntermediate(transaction: tx, web3: self.web3, contract: self.contract, method: "fallback", options: mergedOptions) - return intermediate + let writeTX = ReadTransaction.init(transaction: tx, web3: self.web3, contract: self.contract, method: method, transactionOptions: mergedOptions) + return writeTX } /// Creates and object responsible for calling a particular function of the contract. If method name is not found in ABI - returns nil. @@ -68,12 +89,12 @@ extension web3 { /// Elements of "parameters" can be other arrays or instances of String, Data, BigInt, BigUInt, Int or EthereumAddress. /// /// Returns a "Transaction intermediate" object. - public func method(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), options: Web3Options?) -> TransactionIntermediate? { - let mergedOptions = Web3Options.merge(self.options, with: options) - guard var tx = self.contract.method(method, parameters: parameters, extraData: extraData, options: mergedOptions) else {return nil} + public func write(_ method:String = "fallback", parameters: [AnyObject] = [AnyObject](), extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { + let mergedOptions = self.transactionOptions?.merge(transactionOptions) + guard var tx = self.contract.method(method, parameters: parameters, extraData: extraData) else {return nil} tx.chainID = self.web3.provider.network?.chainID - let intermediate = TransactionIntermediate(transaction: tx, web3: self.web3, contract: self.contract, method: method, options: mergedOptions) - return intermediate + let writeTX = WriteTransaction.init(transaction: tx, web3: self.web3, contract: self.contract, method: method, transactionOptions: mergedOptions) + return writeTX } /// Parses an EventLog object by using a description from the contract's ABI. diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Eth.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Eth.swift index dcc02e2e9..25a9deeff 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Eth.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Eth.swift @@ -1,14 +1,12 @@ -// -// Web3+Eth.swift // web3swift // -// Created by Alexander Vlasov on 22.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt -import Result +import EthereumAddress extension web3.Eth { @@ -21,16 +19,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func sendTransaction(_ transaction: EthereumTransaction, options: Web3Options, password:String = "web3swift") -> Result { - do { - let result = try self.sendTransactionPromise(transaction, options: options, password: password).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func sendTransaction(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions, password:String = "web3swift") throws -> TransactionSendingResult { + let result = try self.sendTransactionPromise(transaction, transactionOptions: transactionOptions, password: password).wait() + return result } /// Performs a non-mutating "call" to some smart-contract. EthereumTransaction bears all function parameters required for the call. @@ -44,16 +35,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - func call(_ transaction: EthereumTransaction, options: Web3Options, onBlock:String = "latest") -> Result { - do { - let result = try self.callPromise(transaction, options: options, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + func call(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions) throws -> Data { + let result = try self.callPromise(transaction, transactionOptions: transactionOptions).wait() + return result } /// Send raw Ethereum transaction data to the network. @@ -61,16 +45,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func sendRawTransaction(_ transaction: Data) -> Result { - do { - let result = try self.sendRawTransactionPromise(transaction).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func sendRawTransaction(_ transaction: Data) throws -> TransactionSendingResult { + let result = try self.sendRawTransactionPromise(transaction).wait() + return result } /// Send raw Ethereum transaction data to the network by first serializing the EthereumTransaction object. @@ -78,16 +55,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func sendRawTransaction(_ transaction: EthereumTransaction) -> Result { - do { - let result = try self.sendRawTransactionPromise(transaction).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func sendRawTransaction(_ transaction: EthereumTransaction) throws -> TransactionSendingResult { + let result = try self.sendRawTransactionPromise(transaction).wait() + return result } /// Returns a total number of transactions sent by the particular Ethereum address. @@ -98,16 +68,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getTransactionCount(address: EthereumAddress, onBlock: String = "latest") -> Result { - do { - let result = try self.getTransactionCountPromise(address: address, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getTransactionCount(address: EthereumAddress, onBlock: String = "latest") throws -> BigUInt { + let result = try self.getTransactionCountPromise(address: address, onBlock: onBlock).wait() + return result } /// Returns a balance of particular Ethereum address in Wei units (1 ETH = 10^18 Wei). @@ -118,16 +81,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getBalance(address: EthereumAddress, onBlock: String = "latest") -> Result { - do { - let result = try self.getBalancePromise(address: address, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBalance(address: EthereumAddress, onBlock: String = "latest") throws -> BigUInt { + let result = try self.getBalancePromise(address: address, onBlock: onBlock).wait() + return result } /// Returns a block number of the last mined block that Ethereum node knows about. @@ -135,16 +91,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getBlockNumber() -> Result { - do { - let result = try self.getBlockNumberPromise().wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBlockNumber() throws -> BigUInt { + let result = try self.getBlockNumberPromise().wait() + return result } /// Returns a current gas price in the units of Wei. The node has internal algorithms for averaging over the last few blocks. @@ -152,16 +101,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getGasPrice() -> Result { - do { - let result = try self.getGasPricePromise().wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getGasPrice() throws -> BigUInt { + let result = try self.getGasPricePromise().wait() + return result } /// Returns transaction details for particular transaction hash. Details indicate position of the transaction in a particular block, @@ -170,16 +112,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getTransactionDetails(_ txhash: Data) -> Result { - do { - let result = try self.getTransactionDetailsPromise(txhash).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getTransactionDetails(_ txhash: Data) throws -> TransactionDetails { + let result = try self.getTransactionDetailsPromise(txhash).wait() + return result } /// Returns transaction details for particular transaction hash. Details indicate position of the transaction in a particular block, @@ -188,16 +123,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getTransactionDetails(_ txhash: String) -> Result { - do { - let result = try self.getTransactionDetailsPromise(txhash).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getTransactionDetails(_ txhash: String) throws -> TransactionDetails { + let result = try self.getTransactionDetailsPromise(txhash).wait() + return result } /// Returns transaction receipt for particular transaction hash. Receipt indicate what has happened when the transaction @@ -206,16 +134,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getTransactionReceipt(_ txhash: Data) -> Result { - do { - let result = try self.getTransactionReceiptPromise(txhash).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getTransactionReceipt(_ txhash: Data) throws -> TransactionReceipt { + let result = try self.getTransactionReceiptPromise(txhash).wait() + return result } /// Returns transaction receipt for particular transaction hash. Receipt indicate what has happened when the transaction @@ -224,16 +145,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getTransactionReceipt(_ txhash: String) -> Result { - do { - let result = try self.getTransactionReceiptPromise(txhash).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getTransactionReceipt(_ txhash: String) throws -> TransactionReceipt { + let result = try self.getTransactionReceiptPromise(txhash).wait() + return result } /// Estimates a minimal amount of gas required to run a transaction. To do it the Ethereum node tries to run it and counts @@ -248,16 +162,9 @@ extension web3.Eth { /// Returns the Result object that indicates either success of failure. /// Error can also indicate that transaction is invalid in the current state, so formally it's gas limit is infinite. /// An example of such transaction can be sending an amount of ETH that is larger than the current account balance. - public func estimateGas(_ transaction: EthereumTransaction, options: Web3Options?, onBlock: String = "latest") -> Result { - do { - let result = try self.estimateGasPromise(transaction, options: options, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func estimateGas(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions?) throws -> BigUInt { + let result = try self.estimateGasPromise(transaction, transactionOptions: transactionOptions).wait() + return result } /// Get a list of Ethereum accounts that a node knows about. @@ -266,16 +173,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getAccounts() -> Result<[EthereumAddress],Web3Error> { - do { - let result = try self.getAccountsPromise().wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getAccounts() throws -> [EthereumAddress] { + let result = try self.getAccountsPromise().wait() + return result } @@ -286,16 +186,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getBlockByHash(_ hash: String, fullTransactions: Bool = false) -> Result { - do { - let result = try self.getBlockByHashPromise(hash, fullTransactions: fullTransactions).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBlockByHash(_ hash: String, fullTransactions: Bool = false) throws -> Block { + let result = try self.getBlockByHashPromise(hash, fullTransactions: fullTransactions).wait() + return result } /// Get information about the particular block in Ethereum network. If "fullTransactions" parameter is set to "true" @@ -305,16 +198,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getBlockByHash(_ hash: Data, fullTransactions: Bool = false) -> Result { - do { - let result = try self.getBlockByHashPromise(hash, fullTransactions: fullTransactions).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBlockByHash(_ hash: Data, fullTransactions: Bool = false) throws -> Block { + let result = try self.getBlockByHashPromise(hash, fullTransactions: fullTransactions).wait() + return result } /// Get information about the particular block in Ethereum network. If "fullTransactions" parameter is set to "true" @@ -324,16 +210,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getBlockByNumber(_ number: UInt64, fullTransactions: Bool = false) -> Result { - do { - let result = try self.getBlockByNumberPromise(number, fullTransactions: fullTransactions).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBlockByNumber(_ number: UInt64, fullTransactions: Bool = false) throws -> Block { + let result = try self.getBlockByNumberPromise(number, fullTransactions: fullTransactions).wait() + return result } /// Get information about the particular block in Ethereum network. If "fullTransactions" parameter is set to "true" @@ -343,16 +222,9 @@ extension web3.Eth { /// This function is synchronous! /// /// Returns the Result object that indicates either success of failure. - public func getBlockByNumber(_ number: BigUInt, fullTransactions: Bool = false) -> Result { - do { - let result = try self.getBlockByNumberPromise(number, fullTransactions: fullTransactions).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBlockByNumber(_ number: BigUInt, fullTransactions: Bool = false) throws -> Block { + let result = try self.getBlockByNumberPromise(number, fullTransactions: fullTransactions).wait() + return result } /// Get information about the particular block in Ethereum network. If "fullTransactions" parameter is set to "true" @@ -362,16 +234,9 @@ extension web3.Eth { /// This function is synchronous! /// /// - public func getBlockByNumber(_ block:String, fullTransactions: Bool = false) -> Result { - do { - let result = try self.getBlockByNumberPromise(block, fullTransactions: fullTransactions).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getBlockByNumber(_ block:String, fullTransactions: Bool = false) throws -> Block { + let result = try self.getBlockByNumberPromise(block, fullTransactions: fullTransactions).wait() + return result } @@ -382,42 +247,42 @@ extension web3.Eth { - amount: BigUInt indicating the amount in wei - extraData: Additional data to attach to the transaction - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead - + - returns: - TransactionIntermediate object - + */ - public func sendETH(to: EthereumAddress, amount: BigUInt, extraData: Data = Data(), options: Web3Options? = nil) -> TransactionIntermediate? { + public func sendETH(to: EthereumAddress, amount: BigUInt, extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { let contract = self.web3.contract(Web3.Utils.coldWalletABI, at: to, abiVersion: 2) - guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} + var mergedOptions = self.web3.transactionOptions.merge(transactionOptions) mergedOptions.value = amount - let intermediate = contract?.method("fallback", extraData: extraData, options: mergedOptions) - return intermediate + let writeTX = contract?.write("fallback", extraData: extraData, transactionOptions: mergedOptions) + return writeTX } - + /** *Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data.* - + - parameters: - to: EthereumAddress to send funds to - amount: String in "units" demonimation. It can contain either "," or "." decimal separator. - units: Ethereum units indicating the denomination of amout about - extraData: Additional data to attach to the transaction - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead - + - returns: - TransactionIntermediate object * String "1.01" and units: .eth will result in sending 1.01 ETH to another address* */ - public func sendETH(to: EthereumAddress, amount: String, units: Web3.Utils.Units = .eth, extraData: Data = Data(), options: Web3Options? = nil) -> TransactionIntermediate? { + public func sendETH(to: EthereumAddress, amount: String, units: Web3.Utils.Units = .eth, extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { guard let value = Web3.Utils.parseToBigUInt(amount, units: .eth) else {return nil} - return sendETH(to: to, amount: value, extraData: extraData, options: options) + return sendETH(to: to, amount: value, extraData: extraData, transactionOptions: transactionOptions) } - + /** *Convenience wrapper to send Ethereum to another address. Internally it creates a virtual contract and encodes all the options and data.* - + - parameters: - from: EthereumAddress to send funds from - to: EthereumAddress to send funds to @@ -425,76 +290,69 @@ extension web3.Eth { - units: Ethereum units indicating the denomination of amout about - extraData: Additional data to attach to the transaction - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. - + - returns: - TransactionIntermediate object - + * String "1.01" and units: .eth will result in sending 1.01 ETH to another address* */ - public func sendETH(from: EthereumAddress, to: EthereumAddress, amount: String, units: Web3.Utils.Units = .eth, extraData: Data = Data(), options: Web3Options? = nil) -> TransactionIntermediate? { + public func sendETH(from: EthereumAddress, to: EthereumAddress, amount: String, units: Web3.Utils.Units = .eth, extraData: Data = Data(), transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { guard let value = Web3.Utils.parseToBigUInt(amount, units: .eth) else {return nil} - guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} + var mergedOptions = self.web3.transactionOptions.merge(transactionOptions) mergedOptions.from = from - return sendETH(to: to, amount: value, extraData: extraData, options: mergedOptions) + return sendETH(to: to, amount: value, extraData: extraData, transactionOptions: mergedOptions) } - + /** *Convenience wrapper to send ERC20 tokens to another address. Internally it creates a virtual contract and encodes all the options and data. Assumes that the sender knows the decimal units of the underlying token.* - + - parameters: - tokenAddress: EthereumAddress of the token contract - from: EthereumAddress to send tokens from - to: EthereumAddress to send tokens to - amount: BigUInt indicating the number of tokens in the the smallest indivisible units (mind that sender knows the number of decimals) - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. - + - returns: - TransactionIntermediate object - + */ - public func sendERC20tokensWithKnownDecimals(tokenAddress: EthereumAddress, from: EthereumAddress, to: EthereumAddress, amount: BigUInt, options: Web3Options? = nil) -> TransactionIntermediate? { + public func sendERC20tokensWithKnownDecimals(tokenAddress: EthereumAddress, from: EthereumAddress, to: EthereumAddress, amount: BigUInt, transactionOptions: TransactionOptions? = nil) -> WriteTransaction? { let contract = self.web3.contract(Web3.Utils.erc20ABI, at: tokenAddress, abiVersion: 2) - guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} + var mergedOptions = self.web3.transactionOptions.merge(transactionOptions) mergedOptions.from = from - guard let intermediate = contract?.method("transfer", parameters: [to, amount] as [AnyObject], options: mergedOptions) else {return nil} - return intermediate + guard let writeTX = contract?.write("transfer", parameters: [to, amount] as [AnyObject], transactionOptions: mergedOptions) else {return nil} + return writeTX } - + /** *Convenience wrapper to send ERC20 tokens to another address. Internally it creates a virtual contract and encodes all the options and data. Pulls the number of decimals of the token under the hood.* - + - parameters: - tokenAddress: EthereumAddress of the token contract - from: EthereumAddress to send tokens from - to: EthereumAddress to send tokens to - amount: String in "natura" demonimation. It can contain either "," or "." decimal separator. - options: Web3Options to override the default gas price, gas limit. "Value" field of the options is ignored and the "amount" parameter is used instead. "From" parameter is also ignored. - + - returns: - TransactionIntermediate object - + - important: This call is synchronous - + * If the amount is "1.01" and token has 9 decimals it will result in sending 1010000000 of the smallest invidisible token units.* */ - public func sendERC20tokensWithNaturalUnits(tokenAddress: EthereumAddress, from: EthereumAddress, to: EthereumAddress, amount: String, options: Web3Options? = nil) -> TransactionIntermediate? { + public func sendERC20tokensWithNaturalUnits(tokenAddress: EthereumAddress, from: EthereumAddress, to: EthereumAddress, amount: String, transactionOptions: TransactionOptions? = nil) throws -> WriteTransaction? { let contract = self.web3.contract(Web3.Utils.erc20ABI, at: tokenAddress, abiVersion: 2) - guard var mergedOptions = Web3Options.merge(self.options, with: options) else {return nil} + var mergedOptions = self.web3.transactionOptions.merge(transactionOptions) mergedOptions.from = from - guard let intermediate = contract?.method("decimals", options: mergedOptions) else {return nil} - let callResult = intermediate.call(options: mergedOptions, onBlock: "latest") + let resp = try contract?.read("decimals", transactionOptions: mergedOptions)?.callPromise().wait() var decimals = BigUInt(0) - switch callResult { - case .success(let response): - guard let dec = response["0"], let decTyped = dec as? BigUInt else {return nil} - decimals = decTyped - break - case .failure(_): - break - } + guard let response = resp, let dec = response["0"], let decTyped = dec as? BigUInt else {return nil} + decimals = decTyped let intDecimals = Int(decimals) guard let value = Web3.Utils.parseToBigUInt(amount, decimals: intDecimals) else {return nil} - return sendERC20tokensWithKnownDecimals(tokenAddress: tokenAddress, from: from, to: to, amount: value, options: options) + return sendERC20tokensWithKnownDecimals(tokenAddress: tokenAddress, from: from, to: to, amount: value, transactionOptions: mergedOptions) } - + } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+EventParser.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+EventParser.swift index 08b5fe827..26fdd1f88 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+EventParser.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+EventParser.swift @@ -1,13 +1,10 @@ +// web3swift // -// Web3+TransactionIntermediate.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 26.02.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -import enum Result.Result import BigInt import PromiseKit fileprivate typealias PromiseResult = PromiseKit.Result @@ -40,16 +37,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func parseBlockByNumber(_ blockNumber: UInt64) -> Result<[EventParserResultProtocol], Web3Error> { - do { - let result = try self.parseBlockByNumberPromise(blockNumber).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func parseBlockByNumber(_ blockNumber: UInt64) throws -> [EventParserResultProtocol] { + let result = try self.parseBlockByNumberPromise(blockNumber).wait() + return result } /** @@ -64,16 +54,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func parseBlock(_ block: Block) -> Result<[EventParserResultProtocol], Web3Error> { - do { - let result = try self.parseBlockPromise(block).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func parseBlock(_ block: Block) throws -> [EventParserResultProtocol] { + let result = try self.parseBlockPromise(block).wait() + return result } /** @@ -88,16 +71,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func parseTransactionByHash(_ hash: Data) -> Result<[EventParserResultProtocol], Web3Error> { - do { - let result = try self.parseTransactionByHashPromise(hash).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func parseTransactionByHash(_ hash: Data) throws -> [EventParserResultProtocol] { + let result = try self.parseTransactionByHashPromise(hash).wait() + return result } /** @@ -112,16 +88,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func parseTransaction(_ transaction: EthereumTransaction) -> Result<[EventParserResultProtocol], Web3Error> { - do { - let result = try self.parseTransactionPromise(transaction).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func parseTransaction(_ transaction: EthereumTransaction) throws -> [EventParserResultProtocol] { + let result = try self.parseTransactionPromise(transaction).wait() + return result } } } @@ -261,16 +230,9 @@ extension web3.web3contract { - important: This call is synchronous */ - public func getIndexedEvents(eventName: String?, filter: EventFilter, joinWithReceipts: Bool = false) -> Result<[EventParserResultProtocol], Web3Error> { - do { - let result = try self.getIndexedEventsPromise(eventName: eventName, filter: filter, joinWithReceipts: joinWithReceipts).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } + public func getIndexedEvents(eventName: String?, filter: EventFilter, joinWithReceipts: Bool = false) throws -> [EventParserResultProtocol] { + let result = try self.getIndexedEventsPromise(eventName: eventName, filter: filter, joinWithReceipts: joinWithReceipts).wait() + return result } } @@ -278,18 +240,15 @@ extension web3.web3contract { public func getIndexedEventsPromise(eventName: String?, filter: EventFilter, joinWithReceipts: Bool = false) -> Promise<[EventParserResultProtocol]> { let queue = self.web3.requestDispatcher.queue do { - guard let rawContract = self.contract as? ContractV2 else { - throw Web3Error.nodeError(desc: "ABIv1 is not supported for this method") - } + let rawContract = self.contract guard let preEncoding = encodeTopicToGetLogs(contract: rawContract, eventName: eventName, filter: filter) else { throw Web3Error.processingError(desc: "Failed to encode topic for request") } - // var event: ABIv2.Element.Event? = nil + if eventName != nil { guard let _ = rawContract.events[eventName!] else { throw Web3Error.processingError(desc: "No such event in a contract") } - // event = ev } let request = JSONRPCRequestFabric.prepareRequest(.getLogs, parameters: [preEncoding]) let fetchLogsPromise = self.web3.dispatch(request).map(on: queue) {response throws -> [EventParserResult] in diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Eventloop.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Eventloop.swift new file mode 100644 index 000000000..d59a0e9e4 --- /dev/null +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Eventloop.swift @@ -0,0 +1,103 @@ +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation + +extension web3.Eventloop { + +// @available(iOS 10.0, *) + public func start(_ timeInterval: TimeInterval) { + if self.timer != nil { + self.timer!.suspend() + self.timer = nil + } + let queue = self.web3.requestDispatcher.queue + queue.async { + self.timer = RepeatingTimer(timeInterval: timeInterval) + self.timer?.eventHandler = self.runnable + self.timer?.resume() + } + } + + public func stop() { + if self.timer != nil { + self.timer!.suspend() + self.timer = nil + } + } + + func runnable() { + for prop in self.monitoredProperties { + let queue = prop.queue + let function = prop.calledFunction + queue.async { + function(self.web3) + } + } + + for prop in self.monitoredUserFunctions { + let queue = prop.queue + queue.async { + prop.functionToRun() + } + } + } +} + +// Thank you https://medium.com/@danielgalasko/a-background-repeating-timer-in-swift-412cecfd2ef9 +class RepeatingTimer { + + let timeInterval: TimeInterval + + init(timeInterval: TimeInterval) { + self.timeInterval = timeInterval + } + + private lazy var timer: DispatchSourceTimer = { + let t = DispatchSource.makeTimerSource() + t.schedule(deadline: .now() + self.timeInterval, repeating: self.timeInterval) + t.setEventHandler(handler: { [weak self] in + self?.eventHandler?() + }) + return t + }() + + var eventHandler: (() -> Void)? + + private enum State { + case suspended + case resumed + } + + private var state: State = .suspended + + deinit { + timer.setEventHandler {} + timer.cancel() + /* + If the timer is suspended, calling cancel without resuming + triggers a crash. This is documented here https://forums.developer.apple.com/thread/15902 + */ + resume() + eventHandler = nil + } + + func resume() { + if state == .resumed { + return + } + state = .resumed + timer.resume() + } + + func suspend() { + if state == .suspended { + return + } + state = .suspended + timer.suspend() + } +} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+HttpProvider.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+HttpProvider.swift index e32abcfb9..683f7d36e 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+HttpProvider.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+HttpProvider.swift @@ -1,9 +1,7 @@ -// -// Web3+Provider.swift // web3swift // -// Created by Alexander Vlasov on 19.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Infura.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Infura.swift index e6a92b049..57b325b85 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Infura.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Infura.swift @@ -1,9 +1,7 @@ -// -// Web3+Provider.swift // web3swift // -// Created by Alexander Vlasov on 19.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Instance.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Instance.swift index ccd54ba9c..c674bd0a5 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Instance.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Instance.swift @@ -1,9 +1,7 @@ -// -// Web3+Instance.swift // web3swift // -// Created by Alexander Vlasov on 19.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -14,6 +12,7 @@ import PromiseKit public class web3: Web3OptionsInheritable { public var provider : Web3Provider public var options : Web3Options = Web3Options.defaultOptions() + public var transactionOptions: TransactionOptions = TransactionOptions.defaultOptions public var defaultBlock = "latest" public var requestDispatcher: JSONRPCrequestDispatcher @@ -86,6 +85,30 @@ public class web3: Web3OptionsInheritable { } } + var txPoolInstance: web3.TxPool? + + /// Public web3.personal.* namespace. + public var txPool: web3.TxPool { + if (self.txPoolInstance != nil) { + return self.txPoolInstance! + } + self.txPoolInstance = web3.TxPool(provider : self.provider, web3: self) + return self.txPoolInstance! + } + + public class TxPool: Web3OptionsInheritable { + var provider:Web3Provider + // weak var web3: web3? + var web3: web3 + public var options: Web3Options { + return self.web3.options + } + public init(provider prov: Web3Provider, web3 web3instance: web3) { + provider = prov + web3 = web3instance + } + } + var walletInstance: web3.Web3Wallet? /// Public web3.wallet.* namespace. @@ -131,21 +154,43 @@ public class web3: Web3OptionsInheritable { } } - var erc721Instance: web3.ERC721? + var eventLoopInstance: web3.Eventloop? /// Public web3.browserFunctions.* namespace. - public var erc721: web3.ERC721 { - if (self.erc721Instance != nil) { - return self.erc721Instance! + public var eventLoop: web3.Eventloop { + if (self.eventLoopInstance != nil) { + return self.eventLoopInstance! } - self.erc721Instance = web3.ERC721(provider : self.provider, web3: self) - return self.erc721Instance! + self.eventLoopInstance = web3.Eventloop(provider : self.provider, web3: self) + return self.eventLoopInstance! } - public class ERC721: Web3OptionsInheritable { + public class Eventloop: Web3OptionsInheritable { + + public typealias EventLoopCall = (web3) -> Void + public typealias EventLoopContractCall = (web3contract) -> Void + + public struct MonitoredProperty { + public var name: String + public var queue: DispatchQueue + public var calledFunction: EventLoopCall + } + +// public struct MonitoredContract { +// public var name: String +// public var queue: DispatchQueue +// public var calledFunction: EventLoopContractCall +// } + var provider:Web3Provider // weak var web3: web3? var web3: web3 + var timer: RepeatingTimer? = nil + + public var monitoredProperties: [MonitoredProperty] = [MonitoredProperty]() +// public var monitoredContracts: [MonitoredContract] = [MonitoredContract]() + public var monitoredUserFunctions: [EventLoopRunnableProtocol] = [EventLoopRunnableProtocol]() + public var options: Web3Options { return self.web3.options } @@ -154,4 +199,32 @@ public class web3: Web3OptionsInheritable { web3 = web3instance } } + + public typealias AssemblyHookFunction = ((EthereumTransaction, EthereumContract, TransactionOptions)) -> (EthereumTransaction, EthereumContract, TransactionOptions, Bool) + + public typealias SubmissionHookFunction = ((EthereumTransaction, TransactionOptions)) -> (EthereumTransaction, TransactionOptions, Bool) + + public typealias SubmissionResultHookFunction = (TransactionSendingResult) -> () + + public struct AssemblyHook { + public var queue: DispatchQueue + public var function: AssemblyHookFunction + } + + public struct SubmissionHook { + public var queue: DispatchQueue + public var function: SubmissionHookFunction + } + + public struct SubmissionResultHook { + public var queue: DispatchQueue + public var function: SubmissionResultHookFunction + } + + public var preAssemblyHooks: [AssemblyHook] = [AssemblyHook]() + public var postAssemblyHooks: [AssemblyHook] = [AssemblyHook]() + + public var preSubmissionHooks: [SubmissionHook] = [SubmissionHook]() + public var postSubmissionHooks: [SubmissionResultHook] = [SubmissionResultHook]() + } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+JSONRPC.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+JSONRPC.swift index 9fdf50f4d..37d6d9a86 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+JSONRPC.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+JSONRPC.swift @@ -1,13 +1,12 @@ -// -// Web3+JSONRPC.swift // web3swift // -// Created by Alexander Vlasov on 21.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt +import EthereumAddress /// Global counter object to enumerate JSON RPC requests. public struct Counter { @@ -108,7 +107,8 @@ public struct JSONRPCresponse: Decodable{ Int.self, Bool.self, [String:String].self, - [String:Int].self] + [String:Int].self, + [String:[String:[String:[String]]]].self] public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: JSONRPCresponseKeys.self) @@ -142,6 +142,10 @@ public struct JSONRPCresponse: Decodable{ result = rawValue } else if let rawValue = try? container.decodeIfPresent([TransactionDetails].self, forKey: .result) { result = rawValue + } else if let rawValue = try? container.decodeIfPresent(TxPoolStatus.self, forKey: .result) { + result = rawValue + } else if let rawValue = try? container.decodeIfPresent(TxPoolContent.self, forKey: .result) { + result = rawValue } else if let rawValue = try? container.decodeIfPresent([Bool].self, forKey: .result) { result = rawValue } else if let rawValue = try? container.decodeIfPresent([Int].self, forKey: .result) { @@ -152,7 +156,11 @@ public struct JSONRPCresponse: Decodable{ result = rawValue } else if let rawValue = try? container.decodeIfPresent([String: Int].self, forKey: .result) { result = rawValue - } + } else if let rawValue = try? container.decodeIfPresent([String:[String:[String:String]]].self, forKey: .result) { + result = rawValue + } else if let rawValue = try? container.decodeIfPresent([String:[String:[String:[String:String?]]]].self, forKey: .result) { + result = rawValue + } self.init(id: id, jsonrpc: jsonrpc, result: result, error: nil) } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Methods.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Methods.swift index 2ccc0d59d..ff67bb278 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Methods.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Methods.swift @@ -1,9 +1,7 @@ -// -// Web3+Methods.swift // web3swift // -// Created by Alexander Vlasov on 21.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation @@ -28,7 +26,12 @@ public enum JSONRPCmethod: String, Encodable { case getBlockByNumber = "eth_getBlockByNumber" case personalSign = "eth_sign" case unlockAccount = "personal_unlockAccount" + case createAccount = "personal_createAccount" case getLogs = "eth_getLogs" + case getTxPoolInspect = "txpool_inspect" + case getTxPoolStatus = "txpool_status" + case getTxPoolContent = "txpool_content" + public var requiredNumOfParameters: Int { get { @@ -55,6 +58,12 @@ public enum JSONRPCmethod: String, Encodable { return 0 case .getAccounts: return 0 + case .getTxPoolStatus: + return 0 + case .getTxPoolContent: + return 0 + case .getTxPoolInspect: + return 0 default: return 1 } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+MutatingTransaction.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+MutatingTransaction.swift new file mode 100644 index 000000000..d5a399582 --- /dev/null +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+MutatingTransaction.swift @@ -0,0 +1,168 @@ +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt +import PromiseKit +fileprivate typealias PromiseResult = PromiseKit.Result +import EthereumAddress + +public class WriteTransaction: ReadTransaction { + + public func assemblePromise(transactionOptions: TransactionOptions? = nil) -> Promise { + var assembledTransaction : EthereumTransaction = self.transaction + let queue = self.web3.requestDispatcher.queue + let returnPromise = Promise { seal in + if self.method != "fallback" { + let m = self.contract.methods[self.method] + if m == nil { + seal.reject(Web3Error.inputError(desc: "Contract's ABI does not have such method")) + return + } + switch m! { + case .function(let function): + if function.constant { + seal.reject(Web3Error.inputError(desc: "Trying to transact to the constant function")) + return + } + case .constructor(_): + break + default: + seal.reject(Web3Error.inputError(desc: "Contract's ABI does not have such method")) + return + } + } + + var mergedOptions = self.transactionOptions.merge(transactionOptions) + + var forAssemblyPipeline : (EthereumTransaction, EthereumContract, TransactionOptions) = (assembledTransaction, self.contract, mergedOptions) + + for hook in self.web3.preAssemblyHooks { + let prom : Promise = Promise {seal in + hook.queue.async { + let hookResult = hook.function(forAssemblyPipeline) + if hookResult.3 { + forAssemblyPipeline = (hookResult.0, hookResult.1, hookResult.2) + } + seal.fulfill(hookResult.3) + } + } + let shouldContinue = try prom.wait() + if !shouldContinue { + seal.reject(Web3Error.processingError(desc: "Transaction is canceled by middleware")) + return + } + } + + assembledTransaction = forAssemblyPipeline.0 + mergedOptions = forAssemblyPipeline.2 + + guard let from = mergedOptions.from else { + seal.reject(Web3Error.inputError(desc: "No 'from' field provided")) + return + } + + // assemble promise for gas estimation + var optionsForGasEstimation = TransactionOptions() + optionsForGasEstimation.from = mergedOptions.from + optionsForGasEstimation.to = mergedOptions.to + optionsForGasEstimation.value = mergedOptions.value + optionsForGasEstimation.callOnBlock = mergedOptions.callOnBlock + let gasEstimatePromise : Promise = self.web3.eth.estimateGasPromise(assembledTransaction, transactionOptions: optionsForGasEstimation) + + // assemble promise for nonce + var getNoncePromise: Promise? + guard let noncePolicy = mergedOptions.nonce else { + seal.reject(Web3Error.inputError(desc: "No nonce policy provided")) + return + } + switch noncePolicy { + case .latest: + getNoncePromise = self.web3.eth.getTransactionCountPromise(address: from, onBlock: "latest") + case .pending: + getNoncePromise = self.web3.eth.getTransactionCountPromise(address: from, onBlock: "pending") + case .manual(let nonce): + getNoncePromise = Promise.value(nonce) + } + + let gasPricePromise : Promise = self.web3.eth.getGasPricePromise() + var promisesToFulfill: [Promise] = [getNoncePromise!, gasPricePromise, gasPricePromise] + when(resolved: getNoncePromise!, gasEstimatePromise, gasPricePromise).map(on: queue, { (results:[PromiseResult]) throws -> EthereumTransaction in + + promisesToFulfill.removeAll() + guard case .fulfilled(let nonce) = results[0] else { + throw Web3Error.processingError(desc: "Failed to fetch nonce") + } + guard case .fulfilled(let gasEstimate) = results[1] else { + throw Web3Error.processingError(desc: "Failed to fetch gas estimate") + } + guard case .fulfilled(let gasPrice) = results[2] else { + throw Web3Error.processingError(desc: "Failed to fetch gas price") + } + + guard let estimate = mergedOptions.resolveGasLimit(gasEstimate) else { + throw Web3Error.processingError(desc: "Failed to calculate gas estimate that satisfied options") + } + + guard let finalGasPrice = mergedOptions.resolveGasPrice(gasPrice) else { + throw Web3Error.processingError(desc: "Missing parameter of gas price for transaction") + } + + + assembledTransaction.nonce = nonce + assembledTransaction.gasLimit = estimate + assembledTransaction.gasPrice = finalGasPrice + + forAssemblyPipeline = (assembledTransaction, self.contract, mergedOptions) + + for hook in self.web3.postAssemblyHooks { + let prom : Promise = Promise {seal in + hook.queue.async { + let hookResult = hook.function(forAssemblyPipeline) + if hookResult.3 { + forAssemblyPipeline = (hookResult.0, hookResult.1, hookResult.2) + } + seal.fulfill(hookResult.3) + } + } + let shouldContinue = try prom.wait() + if !shouldContinue { + throw Web3Error.processingError(desc: "Transaction is canceled by middleware") + } + } + + assembledTransaction = forAssemblyPipeline.0 + mergedOptions = forAssemblyPipeline.2 + + return assembledTransaction + }).done(on: queue) {tx in + seal.fulfill(tx) + }.catch(on: queue) {err in + seal.reject(err) + } + } + return returnPromise + } + + public func sendPromise(password:String = "web3swift", transactionOptions: TransactionOptions? = nil) -> Promise{ + let queue = self.web3.requestDispatcher.queue + return self.assemblePromise(transactionOptions: transactionOptions).then(on: queue) { transaction throws -> Promise in + let mergedOptions = self.transactionOptions.merge(transactionOptions) + var cleanedOptions = TransactionOptions() + cleanedOptions.from = mergedOptions.from + cleanedOptions.to = mergedOptions.to + return self.web3.eth.sendTransactionPromise(transaction, transactionOptions: cleanedOptions, password: password) + } + } + + public func send(password:String = "web3swift", transactionOptions: TransactionOptions? = nil) throws -> TransactionSendingResult { + return try self.sendPromise(password: password, transactionOptions: transactionOptions).wait() + } + + public func assemble(transactionOptions: TransactionOptions? = nil) throws -> EthereumTransaction { + return try self.assemblePromise(transactionOptions: transactionOptions).wait() + } +} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Options.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Options.swift index dfd353b5d..78291448e 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Options.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Options.swift @@ -1,13 +1,12 @@ +// web3swift // -// Web3+Options.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 26.02.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt +import EthereumAddress public protocol Web3OptionsInheritable { var options: Web3Options {get} @@ -144,3 +143,215 @@ public struct Web3Options { } } } + +/// Options for sending or calling a particular Ethereum transaction +public struct TransactionOptions { + /// Sets the transaction destination. It can either be a contract address or a private key controlled wallet address. + /// + /// Usually should never be nil. + public var to: EthereumAddress? = nil + /// Sets from what account a transaction should be sent. Used only internally as the sender of Ethereum transaction + /// is determined purely from the transaction signature. Indicates to the Ethereum node or to the local keystore what private key + /// should be used to sign a transaction. + /// + /// Can be nil if one reads the information from the blockchain. + public var from: EthereumAddress? = nil + + public enum GasLimitPolicy { + case automatic + case manual(BigUInt) + case limited(BigUInt) + case withMargin(Double) + } + public var gasLimit: GasLimitPolicy? + + public enum GasPricePolicy { + case automatic + case manual(BigUInt) + case withMargin(Double) + } + public var gasPrice: GasPricePolicy? + + public var value: BigUInt? = nil + + public enum NoncePolicy { + case pending + case latest + case manual(BigUInt) + } + public var nonce: NoncePolicy? + + public enum CallingBlockPolicy { + case pending + case latest + case exactBlockNumber(BigUInt) + + var stringValue: String { + switch self { + case .pending: + return "pending" + case .latest: + return "latest" + case .exactBlockNumber(let number): + return String(number, radix: 16).addHexPrefix() + } + } + } + public var callOnBlock: CallingBlockPolicy? + + public init() { + } + + public static var defaultOptions: TransactionOptions { + var opts = TransactionOptions() + opts.callOnBlock = .pending + opts.nonce = .pending + opts.gasLimit = .automatic + opts.gasPrice = .automatic + return opts + } + + public func resolveGasPrice(_ suggestedByNode: BigUInt) -> BigUInt? { + guard let gasPricePolicy = self.gasPrice else {return nil} + switch gasPricePolicy { + case .automatic: + return suggestedByNode + case .manual(let value): + return value + case .withMargin(_): + return suggestedByNode + } + } + + public func resolveGasLimit(_ suggestedByNode: BigUInt) -> BigUInt? { + guard let gasLimitPolicy = self.gasLimit else {return nil} + switch gasLimitPolicy { + case .automatic: + return suggestedByNode + case .manual(let value): + return value + case .withMargin(_): + return suggestedByNode + case .limited(let limit): + if limit <= suggestedByNode { + return suggestedByNode + } + return nil + } + } + + public func merge(_ otherOptions: TransactionOptions?) -> TransactionOptions { + guard let other = otherOptions else {return self} + var opts = TransactionOptions() + opts.from = mergeIfNotNil(first: self.from, second: other.from) + opts.to = mergeIfNotNil(first: self.to, second: other.to) + opts.gasLimit = mergeIfNotNil(first: self.gasLimit, second: other.gasLimit) + opts.gasPrice = mergeIfNotNil(first: self.gasPrice, second: other.gasPrice) + opts.value = mergeIfNotNil(first: self.value, second: other.value) + opts.nonce = mergeIfNotNil(first: self.nonce, second: other.nonce) + opts.callOnBlock = mergeIfNotNil(first: self.callOnBlock, second: other.callOnBlock) + return opts + } + +// public static func fromJSON(_ json: [String: Any]) -> Web3Options? { +// var options = Web3Options() +// if let gas = json["gas"] as? String, let gasBiguint = BigUInt(gas.stripHexPrefix().lowercased(), radix: 16) { +// options.gasLimit = gasBiguint +// } +// if let gasPrice = json["gasPrice"] as? String, let gasPriceBiguint = BigUInt(gasPrice.stripHexPrefix().lowercased(), radix: 16) { +// options.gasPrice = gasPriceBiguint +// } +// if let value = json["value"] as? String, let valueBiguint = BigUInt(value.stripHexPrefix().lowercased(), radix: 16) { +// options.value = valueBiguint +// } +// if let fromString = json["from"] as? String { +// guard let addressFrom = EthereumAddress(fromString) else {return nil} +// options.from = addressFrom +// } +// return options +// } +// +// /// Merges two sets of topions by overriding the parameters from the first set by parameters from the second +// /// set if those are not nil. +// /// +// /// Returns default options if both parameters are nil. +// public static func merge(_ options:Web3Options?, with other:Web3Options?) -> Web3Options? { +// if (other == nil && options == nil) { +// return Web3Options.defaultOptions() +// } +// var newOptions = Web3Options.defaultOptions() +// if (other?.to != nil) { +// newOptions.to = other?.to +// } else { +// newOptions.to = options?.to +// } +// if (other?.from != nil) { +// newOptions.from = other?.from +// } else { +// newOptions.from = options?.from +// } +// if (other?.gasLimit != nil) { +// newOptions.gasLimit = other?.gasLimit +// } else { +// newOptions.gasLimit = options?.gasLimit +// } +// if (other?.gasPrice != nil) { +// newOptions.gasPrice = other?.gasPrice +// } else { +// newOptions.gasPrice = options?.gasPrice +// } +// if (other?.value != nil) { +// newOptions.value = other?.value +// } else { +// newOptions.value = options?.value +// } +// return newOptions +// } +// +// /// merges two sets of options along with a gas estimate to try to guess the final gas limit value required by user. +// /// +// /// Please refer to the source code for a logic. +// public static func smartMergeGasLimit(originalOptions: Web3Options?, extraOptions: Web3Options?, gasEstimate: BigUInt) -> BigUInt? { +// guard let mergedOptions = Web3Options.merge(originalOptions, with: extraOptions) else {return nil} //just require any non-nils +// if mergedOptions.gasLimit == nil { +// return gasEstimate // for user's convenience we just use an estimate +// // return nil // there is no opinion from user, so we can not proceed +// } else { +// if originalOptions != nil, originalOptions!.gasLimit != nil, originalOptions!.gasLimit! < gasEstimate { // original gas estimate was less than what's required, so we check extra options +// if extraOptions != nil, extraOptions!.gasLimit != nil, extraOptions!.gasLimit! >= gasEstimate { +// return extraOptions!.gasLimit! +// } else { +// return gasEstimate // for user's convenience we just use an estimate +// // return nil // estimate is lower than allowed +// } +// } else { +// if extraOptions != nil, extraOptions!.gasLimit != nil, extraOptions!.gasLimit! >= gasEstimate { +// return extraOptions!.gasLimit! +// } else { +// return gasEstimate // for user's convenience we just use an estimate +// // return nil // estimate is lower than allowed +// } +// } +// } +// } +// +// public static func smartMergeGasPrice(originalOptions: Web3Options?, extraOptions: Web3Options?, priceEstimate: BigUInt) -> BigUInt? { +// guard let mergedOptions = Web3Options.merge(originalOptions, with: extraOptions) else {return nil} //just require any non-nils +// if mergedOptions.gasPrice == nil { +// return priceEstimate +// } else if mergedOptions.gasPrice == 0 { +// return priceEstimate +// } else { +// return mergedOptions.gasPrice! +// } +// } +} + +fileprivate func mergeIfNotNil(first: T?, second: T?) -> T? { + if second != nil { + return second + } else if first != nil { + return first + } + return nil +} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Personal.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Personal.swift index 47b0aea7e..0363be491 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Personal.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Personal.swift @@ -1,14 +1,12 @@ -// -// Web3+Personal.swift // web3swift // -// Created by Alexander Vlasov on 14.04.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt -import Result +import EthereumAddress extension web3.Personal { @@ -26,13 +24,9 @@ extension web3.Personal { - important: This call is synchronous */ - public func signPersonalMessage(message: Data, from: EthereumAddress, password:String = "web3swift") -> Result { - do { - let result = try self.signPersonalMessagePromise(message: message, from: from, password: password).wait() - return Result(result) - } catch { - return Result.failure(error as! Web3Error) - } + public func signPersonalMessage(message: Data, from: EthereumAddress, password:String = "web3swift") throws -> Data { + let result = try self.signPersonalMessagePromise(message: message, from: from, password: password).wait() + return result } /** @@ -49,13 +43,9 @@ extension web3.Personal { - important: This call is synchronous. Does nothing if private keys are stored locally. */ - public func unlockAccount(account: EthereumAddress, password:String = "web3swift", seconds: UInt64 = 300) -> Result { - do { - let result = try self.unlockAccountPromise(account: account).wait() - return Result(result) - } catch { - return Result.failure(error as! Web3Error) - } + public func unlockAccount(account: EthereumAddress, password:String = "web3swift", seconds: UInt64 = 300) throws -> Bool { + let result = try self.unlockAccountPromise(account: account).wait() + return result } /** @@ -69,11 +59,11 @@ extension web3.Personal { - Result object */ - public func ecrecover(personalMessage: Data, signature: Data) -> Result { + public func ecrecover(personalMessage: Data, signature: Data) throws -> EthereumAddress { guard let recovered = Web3.Utils.personalECRecover(personalMessage, signature: signature) else { - return Result.failure(Web3Error.dataError) + throw Web3Error.dataError } - return Result(recovered) + return recovered } /** @@ -87,10 +77,10 @@ extension web3.Personal { - Result object */ - public func ecrecover(hash: Data, signature: Data) -> Result { + public func ecrecover(hash: Data, signature: Data) throws -> EthereumAddress { guard let recovered = Web3.Utils.hashECRecover(hash: hash, signature: signature) else { - return Result.failure(Web3Error.dataError) + throw Web3Error.dataError } - return Result(recovered) + return recovered } } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Protocols.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Protocols.swift index 47f9c4f21..df1b20adc 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Protocols.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Protocols.swift @@ -1,15 +1,13 @@ +// web3swift // -// Web3+Protocols.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 26.02.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt -import Result import class PromiseKit.Promise +import EthereumAddress /// Protocol for generic Ethereum event parsing results public protocol EventParserResultProtocol { @@ -22,10 +20,10 @@ public protocol EventParserResultProtocol { /// Protocol for generic Ethereum event parser public protocol EventParserProtocol { - func parseTransaction(_ transaction: EthereumTransaction) -> Result<[EventParserResultProtocol], Web3Error> - func parseTransactionByHash(_ hash: Data) -> Result<[EventParserResultProtocol], Web3Error> - func parseBlock(_ block: Block) -> Result<[EventParserResultProtocol], Web3Error> - func parseBlockByNumber(_ blockNumber: UInt64) -> Result<[EventParserResultProtocol], Web3Error> + func parseTransaction(_ transaction: EthereumTransaction) throws -> [EventParserResultProtocol] + func parseTransactionByHash(_ hash: Data) throws -> [EventParserResultProtocol] + func parseBlock(_ block: Block) throws -> [EventParserResultProtocol] + func parseBlockByNumber(_ blockNumber: UInt64) throws -> [EventParserResultProtocol] func parseTransactionPromise(_ transaction: EthereumTransaction) -> Promise<[EventParserResultProtocol]> func parseTransactionByHashPromise(_ hash: Data) -> Promise<[EventParserResultProtocol]> func parseBlockByNumberPromise(_ blockNumber: UInt64) -> Promise<[EventParserResultProtocol]> @@ -77,3 +75,9 @@ public enum Networks { } } } + +public protocol EventLoopRunnableProtocol { + var name: String {get} + var queue: DispatchQueue {get} + func functionToRun() +} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+ReadingTransaction.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+ReadingTransaction.swift new file mode 100644 index 000000000..3d1740a56 --- /dev/null +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+ReadingTransaction.swift @@ -0,0 +1,92 @@ +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt +import PromiseKit +fileprivate typealias PromiseResult = PromiseKit.Result +import EthereumAddress + +public class ReadTransaction { + public var transaction:EthereumTransaction + public var contract: EthereumContract + public var method: String + public var transactionOptions: TransactionOptions = TransactionOptions.defaultOptions + + var web3: web3 + + public init (transaction: EthereumTransaction, web3 web3Instance: web3, contract: EthereumContract, method: String, transactionOptions: TransactionOptions?) { + self.transaction = transaction + self.web3 = web3Instance + self.contract = contract + self.method = method + self.transactionOptions = self.transactionOptions.merge(transactionOptions) + if self.web3.provider.network != nil { + self.transaction.chainID = self.web3.provider.network?.chainID + } + } + + public func callPromise(transactionOptions: TransactionOptions? = nil) -> Promise<[String: Any]> { + let assembledTransaction : EthereumTransaction = self.transaction + let queue = self.web3.requestDispatcher.queue + let returnPromise = Promise<[String:Any]> { seal in + let mergedOptions = self.transactionOptions.merge(transactionOptions) + var optionsForCall = TransactionOptions() + optionsForCall.from = mergedOptions.from + optionsForCall.to = mergedOptions.to + optionsForCall.value = mergedOptions.value + optionsForCall.callOnBlock = mergedOptions.callOnBlock + let callPromise : Promise = self.web3.eth.callPromise(assembledTransaction, transactionOptions: optionsForCall) + callPromise.done(on: queue) {(data:Data) throws in + do { + if (self.method == "fallback") { + let resultHex = data.toHexString().addHexPrefix() + seal.fulfill(["result": resultHex as Any]) + return + } + guard let decodedData = self.contract.decodeReturnData(self.method, data: data) else + { + throw Web3Error.processingError(desc: "Can not decode returned parameters") + } + seal.fulfill(decodedData) + } catch{ + seal.reject(error) + } + }.catch(on: queue) {err in + seal.reject(err) + } + } + return returnPromise + } + + public func estimateGasPromise(transactionOptions: TransactionOptions? = nil) -> Promise{ + let assembledTransaction : EthereumTransaction = self.transaction + let queue = self.web3.requestDispatcher.queue + let returnPromise = Promise { seal in + let mergedOptions = self.transactionOptions.merge(transactionOptions) + var optionsForGasEstimation = TransactionOptions() + optionsForGasEstimation.from = mergedOptions.from + optionsForGasEstimation.to = mergedOptions.to + optionsForGasEstimation.value = mergedOptions.value + optionsForGasEstimation.callOnBlock = mergedOptions.callOnBlock + let promise = self.web3.eth.estimateGasPromise(assembledTransaction, transactionOptions: optionsForGasEstimation) + promise.done(on: queue) {(estimate: BigUInt) in + seal.fulfill(estimate) + }.catch(on: queue) {err in + seal.reject(err) + } + } + return returnPromise + } + + public func estimateGas(transactionOptions: TransactionOptions? = nil) throws -> BigUInt { + return try self.estimateGasPromise(transactionOptions: transactionOptions).wait() + } + + public func call(transactionOptions: TransactionOptions? = nil) throws -> [String: Any] { + return try self.callPromise(transactionOptions: transactionOptions).wait() + } +} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Structures.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Structures.swift index f5f478982..4aca8d629 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Structures.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Structures.swift @@ -1,14 +1,14 @@ +// web3swift // -// Web3+Structures.swift -// -// Created by Alexander Vlasov on 26.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt +import EthereumAddress -fileprivate func decodeHexToData(_ container: KeyedDecodingContainer, key: KeyedDecodingContainer.Key, allowOptional:Bool = false) throws -> Data? { +fileprivate func decodeHexToData(_ container: KeyedDecodingContainer, key: KeyedDecodingContainer.Key, allowOptional:Bool = false) throws -> Data? { if (allowOptional) { let string = try? container.decode(String.self, forKey: key) if string != nil { @@ -23,7 +23,7 @@ fileprivate func decodeHexToData(_ container: KeyedDecodingContainer, key } } -fileprivate func decodeHexToBigUInt(_ container: KeyedDecodingContainer, key: KeyedDecodingContainer.Key, allowOptional:Bool = false) throws -> BigUInt? { +fileprivate func decodeHexToBigUInt(_ container: KeyedDecodingContainer, key: KeyedDecodingContainer.Key, allowOptional:Bool = false) throws -> BigUInt? { if (allowOptional) { let string = try? container.decode(String.self, forKey: key) if string != nil { @@ -547,4 +547,109 @@ public struct TransactionSendingResult { public var hash: String } +public struct TxPoolStatus : Decodable { + public var pending: BigUInt + public var queued: BigUInt + + enum CodingKeys: String, CodingKey + { + case pending + case queued + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + guard let pending = try decodeHexToBigUInt(container, key: .pending) else {throw Web3Error.dataError} + self.pending = pending + guard let queued = try decodeHexToBigUInt(container, key: .queued) else {throw Web3Error.dataError} + self.queued = queued + } +} + +public struct TxPoolContent : Decodable { + public var pending: [EthereumAddress: [TxPoolContentForNonce]] + public var queued: [EthereumAddress: [TxPoolContentForNonce]] + + enum CodingKeys: String, CodingKey + { + case pending + case queued + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + let pending = try TxPoolContent.decodePoolContentForKey(container: container, key: .pending) + self.pending = pending + let queued = try TxPoolContent.decodePoolContentForKey(container: container, key: .queued) + self.queued = queued + } + + fileprivate static func decodePoolContentForKey(container: KeyedDecodingContainer, key: KeyedDecodingContainer.Key) throws -> [EthereumAddress: [TxPoolContentForNonce]] { + let raw = try container.nestedContainer(keyedBy: AdditionalDataCodingKeys.self, forKey: key) + var result = [EthereumAddress: [TxPoolContentForNonce]]() + for addressKey in raw.allKeys { + let addressString = addressKey.stringValue + guard let address = EthereumAddress(addressString, type: .normal, ignoreChecksum: true) else { + throw Web3Error.dataError + } + let nestedContainer = try raw.nestedContainer(keyedBy: AdditionalDataCodingKeys.self, forKey: addressKey) + var perNonceInformation = [TxPoolContentForNonce]() + perNonceInformation.reserveCapacity(nestedContainer.allKeys.count) + for nonceKey in nestedContainer.allKeys { + guard let nonce = BigUInt(nonceKey.stringValue) else { + throw Web3Error.dataError + } + let n = try? nestedContainer.nestedUnkeyedContainer(forKey: nonceKey) + if n != nil { + let details = try nestedContainer.decode([TransactionDetails].self, forKey: nonceKey) + let content = TxPoolContentForNonce(nonce: nonce, details: details) + perNonceInformation.append(content) + } else { + let detail = try nestedContainer.decode(TransactionDetails.self, forKey: nonceKey) + let content = TxPoolContentForNonce(nonce: nonce, details: [detail]) + perNonceInformation.append(content) + } + } + result[address] = perNonceInformation + } + return result + } + + + fileprivate struct AdditionalDataCodingKeys: CodingKey + { + var stringValue: String + init?(stringValue: String) + { + self.stringValue = stringValue + } + + var intValue: Int? + init?(intValue: Int) + { + return nil + } + } +} + +//public struct TxPoolContentForAddress : Decodable { +// public var address: EthereumAddress +// public var content: [TxPoolContentForNonce] +// +// public init(from decoder: Decoder) throws { +// let container = try decoder.singleValueContainer() +// let addressString = container.codingPath[0].stringValue +// guard let address = EthereumAddress(addressString, type: .normal, ignoreChecksum: true) else { +// throw Web3Error.dataError +// } +// self.address = address +// +// let content = try container.decode([TxPoolContentForNonce].self) +// self.content = content +// } +//} +public struct TxPoolContentForNonce { + public var nonce: BigUInt + public var details: [TransactionDetails] +} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+TransactionIntermediate.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+TransactionIntermediate.swift deleted file mode 100755 index f8f9c88ba..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+TransactionIntermediate.swift +++ /dev/null @@ -1,271 +0,0 @@ -// -// Web3+TransactionIntermediate.swift -// web3swift-iOS -// -// Created by Alexander Vlasov on 26.02.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -import Foundation -import enum Result.Result -import BigInt -import PromiseKit -fileprivate typealias PromiseResult = PromiseKit.Result - -extension web3.web3contract { - - /// TransactionIntermediate is an almost-ready transaction or a smart-contract function call. It bears all the required information - /// to call the smart-contract and decode the returned information, or estimate gas required for transaction, or send a transaciton - /// to the blockchain. - public class TransactionIntermediate{ - public var transaction:EthereumTransaction - public var contract: ContractProtocol - public var method: String - public var options: Web3Options? = Web3Options.defaultOptions() - var web3: web3 - public init (transaction: EthereumTransaction, web3 web3Instance: web3, contract: ContractProtocol, method: String, options: Web3Options?) { - self.transaction = transaction - self.web3 = web3Instance - self.contract = contract - self.contract.options = options - self.method = method - self.options = Web3Options.merge(web3.options, with: options) - if self.web3.provider.network != nil { - self.transaction.chainID = self.web3.provider.network?.chainID - } - } - - /** - *Send a prepared transaction to the blockchain. Internally checks the nonce for a sending account, assigns it, get a gas estimate and signs a transaction either locally or on the remote node.* - - - parameters: - - password: Password for a private key if transaction is signed locally - - options: Web3Options to override the previously assigned gas price, gas limit and value. - - onBlock: String field determines if nonce value and the gas estimate are based on the state of a blockchain on the latest mined block ("latest") or the expected state after all the transactions in memory pool are applied ("pending"). Using "pending" allows to send transactions one after another without waiting for inclusion of the previous one in some block. - - - returns: - - Result object - - - important: This call is synchronous - - */ - public func send(password: String = "web3swift", options: Web3Options? = nil, onBlock: String = "pending") -> Result { - do { - let result = try self.sendPromise(password: password, options: options, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } - } - - /** - *Calls a function of the smart-contract and parses the returned data to native objects.* - - - parameters: - - options: Web3Options to override the previously assigned gas price, gas limit and value. - - onBlock: String field determines if nonce value and the gas estimate are based on the state of a blockchain on the latest mined block ("latest") or the expected state after all the transactions in memory pool are applied ("pending"). Using "pending" allows to send transactions one after another without waiting for inclusion of the previous one in some block. - - - returns: - - Result object - - - important: This call is synchronous - - */ - public func call(options: Web3Options?, onBlock: String = "latest") -> Result<[String:Any], Web3Error> { - do { - let result = try self.callPromise(options: options, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } - } - - /** - *Estimates gas required to execute the transaction. Setting a gas limit lower than the estimate will most likely result in a failed transaction. If this call returns an error it can also indicate that transaction is invalid as itself.* - - - parameters: - - options: Web3Options to override the previously assigned gas price, gas limit and value. - - onBlock: String field determines if nonce value and the gas estimate are based on the state of a blockchain on the latest mined block ("latest") or the expected state after all the transactions in memory pool are applied ("pending"). Using "pending" allows to send transactions one after another without waiting for inclusion of the previous one in some block. - - - returns: - - Result object - - - important: This call is synchronous - - */ - public func estimateGas(options: Web3Options?, onBlock: String = "latest") -> Result { - do { - let result = try self.estimateGasPromise(options: options, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } - } - - /** - *Assembles (but does not sign!) a transaction by fetching the nonce value and applying provided options.* - - - parameters: - - options: Web3Options to override the previously assigned gas price, gas limit and value. - - onBlock: String field determines if nonce value and the gas estimate are based on the state of a blockchain on the latest mined block ("latest") or the expected state after all the transactions in memory pool are applied ("pending"). Using "pending" allows to send transactions one after another without waiting for inclusion of the previous one in some block. - - - returns: - - Result object - - - important: This call is synchronous - - */ - public func assemble(options: Web3Options? = nil, onBlock: String = "pending") -> Result { - do { - let result = try self.assemblePromise(options: options, onBlock: onBlock).wait() - return Result(result) - } catch { - if let err = error as? Web3Error { - return Result.failure(err) - } - return Result.failure(Web3Error.generalError(err: error)) - } - } - - } -} - -extension web3.web3contract.TransactionIntermediate { - - public func assemblePromise(options: Web3Options? = nil, onBlock: String = "pending") -> Promise { - var assembledTransaction : EthereumTransaction = self.transaction - let queue = self.web3.requestDispatcher.queue - let returnPromise = Promise { seal in - guard let mergedOptions = Web3Options.merge(self.options, with: options) else { - seal.reject(Web3Error.inputError(desc: "Provided options are invalid")) - return - } - guard let from = mergedOptions.from else { - seal.reject(Web3Error.inputError(desc: "No 'from' field provided")) - return - } - var optionsForGasEstimation = Web3Options() - optionsForGasEstimation.from = mergedOptions.from - optionsForGasEstimation.to = mergedOptions.to - optionsForGasEstimation.value = mergedOptions.value - let getNoncePromise : Promise = self.web3.eth.getTransactionCountPromise(address: from, onBlock: onBlock) - let gasEstimatePromise : Promise = self.web3.eth.estimateGasPromise(assembledTransaction, options: optionsForGasEstimation, onBlock: onBlock) - let gasPricePromise : Promise = self.web3.eth.getGasPricePromise() - var promisesToFulfill: [Promise] = [getNoncePromise, gasPricePromise, gasPricePromise] - when(resolved: getNoncePromise, gasEstimatePromise, gasPricePromise).map(on: queue, { (results:[PromiseResult]) throws -> EthereumTransaction in - - promisesToFulfill.removeAll() - guard case .fulfilled(let nonce) = results[0] else { - throw Web3Error.processingError(desc: "Failed to fetch nonce") - } - guard case .fulfilled(let gasEstimate) = results[1] else { - throw Web3Error.processingError(desc: "Failed to fetch gas estimate") - } - guard case .fulfilled(let gasPrice) = results[2] else { - throw Web3Error.processingError(desc: "Failed to fetch gas price") - } - guard let estimate = Web3Options.smartMergeGasLimit(originalOptions: options, extraOptions: mergedOptions, gasEstimate: gasEstimate) else { - throw Web3Error.processingError(desc: "Failed to calculate gas estimate that satisfied options") - } - assembledTransaction.nonce = nonce - assembledTransaction.gasLimit = estimate - guard let finalGasPrice = Web3Options.smartMergeGasPrice(originalOptions: options, extraOptions: mergedOptions, priceEstimate: gasPrice) else { - throw Web3Error.processingError(desc: "Missing parameter of gas price for transaction") - } - assembledTransaction.gasPrice = finalGasPrice -// if assembledTransaction.gasPrice == 0 { -// if mergedOptions.gasPrice != nil { -// assembledTransaction.gasPrice = mergedOptions.gasPrice! -// } else { -// assembledTransaction.gasPrice = gasPrice -// } -// } - return assembledTransaction - }).done(on: queue) {tx in - seal.fulfill(tx) - }.catch(on: queue) {err in - seal.reject(err) - } - } - return returnPromise - } - - public func sendPromise(password:String = "web3swift", options: Web3Options? = nil, onBlock: String = "pending") -> Promise{ - let queue = self.web3.requestDispatcher.queue - return self.assemblePromise(options: options, onBlock: onBlock).then(on: queue) { transaction throws -> Promise in - guard let mergedOptions = Web3Options.merge(self.options, with: options) else { - throw Web3Error.inputError(desc: "Provided options are invalid") - } - var cleanedOptions = Web3Options() - cleanedOptions.from = mergedOptions.from - cleanedOptions.to = mergedOptions.to - return self.web3.eth.sendTransactionPromise(transaction, options: cleanedOptions, password: password) - } - } - - public func callPromise(options: Web3Options? = nil, onBlock: String = "latest") -> Promise<[String: Any]>{ - let assembledTransaction : EthereumTransaction = self.transaction - let queue = self.web3.requestDispatcher.queue - let returnPromise = Promise<[String:Any]> { seal in - guard let mergedOptions = Web3Options.merge(self.options, with: options) else { - seal.reject(Web3Error.inputError(desc: "Provided options are invalid")) - return - } - var optionsForCall = Web3Options() - optionsForCall.from = mergedOptions.from - optionsForCall.to = mergedOptions.to - optionsForCall.value = mergedOptions.value - let callPromise : Promise = self.web3.eth.callPromise(assembledTransaction, options: optionsForCall, onBlock: onBlock) - callPromise.done(on: queue) {(data:Data) throws in - do { - if (self.method == "fallback") { - let resultHex = data.toHexString().addHexPrefix() - seal.fulfill(["result": resultHex as Any]) - return - } - guard let decodedData = self.contract.decodeReturnData(self.method, data: data) else - { - throw Web3Error.processingError(desc: "Can not decode returned parameters") - } - seal.fulfill(decodedData) - } catch{ - seal.reject(error) - } - }.catch(on: queue) {err in - seal.reject(err) - } - } - return returnPromise - } - - public func estimateGasPromise(options: Web3Options? = nil, onBlock: String = "latest") -> Promise{ - let assembledTransaction : EthereumTransaction = self.transaction - let queue = self.web3.requestDispatcher.queue - let returnPromise = Promise { seal in - guard let mergedOptions = Web3Options.merge(self.options, with: options) else { - seal.reject(Web3Error.inputError(desc: "Provided options are invalid")) - return - } - var optionsForGasEstimation = Web3Options() - optionsForGasEstimation.from = mergedOptions.from - optionsForGasEstimation.to = mergedOptions.to - optionsForGasEstimation.value = mergedOptions.value - let promise = self.web3.eth.estimateGasPromise(assembledTransaction, options: optionsForGasEstimation, onBlock: onBlock) - promise.done(on: queue) {(estimate: BigUInt) in - seal.fulfill(estimate) - }.catch(on: queue) {err in - seal.reject(err) - } - } - return returnPromise - } -} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+TxPool.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+TxPool.swift new file mode 100644 index 000000000..ccf9efc51 --- /dev/null +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+TxPool.swift @@ -0,0 +1,25 @@ +// web3swift +// +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. +// + +import Foundation +import BigInt + +extension web3.TxPool { + public func getInspect() throws -> [String:[String:[String:String]]] { + let result = try self.getInspectPromise().wait() + return result + } + + public func getStatus() throws -> TxPoolStatus { + let result = try self.getStatusPromise().wait() + return result + } + + public func getContent() throws -> TxPoolContent { + let result = try self.getContentPromise().wait() + return result + } +} diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Utils.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Utils.swift index 79e448e74..934b759a0 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Utils.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3+Utils.swift @@ -1,14 +1,15 @@ -// -// web3utils.swift // web3swift // -// Created by Alexander Vlasov on 18.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation import BigInt import CryptoSwift +import SwiftRLP +import secp256k1_swift +import EthereumAddress public typealias Web3Utils = Web3.Utils @@ -27,7 +28,7 @@ extension Web3.Utils { /// and the nonce of this address public static func calcualteContractAddress(from: EthereumAddress, nonce: BigUInt) -> EthereumAddress? { guard let normalizedAddress = from.addressData.setLengthLeft(32) else {return nil} - guard let data = RLP.encode([normalizedAddress, nonce] as [Any]) else {return nil} + guard let data = RLP.encode([normalizedAddress, nonce] as [AnyObject]) else {return nil} guard let contractAddressData = Web3.Utils.sha3(data)?[12..<32] else {return nil} guard let contractAddress = EthereumAddress(Data(contractAddressData)) else {return nil} return contractAddress @@ -76,8 +77,456 @@ extension Web3.Utils { [{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"resolver","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"label","type":"bytes32"},{"name":"owner","type":"address"}],"name":"setSubnodeOwner","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"ttl","type":"uint64"}],"name":"setTTL","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"ttl","outputs":[{"name":"","type":"uint64"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":true,"name":"label","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"NewOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"resolver","type":"address"}],"name":"NewResolver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"ttl","type":"uint64"}],"name":"NewTTL","type":"event"}] """ + //function setAddr(bytes32 node, address addr) public static var resolverABI = """ -[{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"addr","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"},{"name":"contentType","type": "uint256"}],"name":"ABI","outputs":[{"name":"","type":"uint256"},{"name":"","type":"bytes"}],"payable":false,"type":"function"}] +[ + { + "constant": true, + "inputs": [ + { + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "key", + "type": "string" + }, + { + "name": "value", + "type": "string" + } + ], + "name": "setText", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "contentTypes", + "type": "uint256" + } + ], + "name": "ABI", + "outputs": [ + { + "name": "contentType", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "x", + "type": "bytes32" + }, + { + "name": "y", + "type": "bytes32" + } + ], + "name": "setPubkey", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "content", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "addr", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "key", + "type": "string" + } + ], + "name": "text", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "contentType", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "setABI", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "name", + "type": "string" + } + ], + "name": "setName", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "hash", + "type": "bytes" + } + ], + "name": "setMultihash", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "hash", + "type": "bytes32" + } + ], + "name": "setContent", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "pubkey", + "outputs": [ + { + "name": "x", + "type": "bytes32" + }, + { + "name": "y", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "node", + "type": "bytes32" + }, + { + "name": "addr", + "type": "address" + } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "node", + "type": "bytes32" + } + ], + "name": "multihash", + "outputs": [ + { + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "ensAddr", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "a", + "type": "address" + } + ], + "name": "AddrChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "hash", + "type": "bytes32" + } + ], + "name": "ContentChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "name", + "type": "string" + } + ], + "name": "NameChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "name": "contentType", + "type": "uint256" + } + ], + "name": "ABIChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "x", + "type": "bytes32" + }, + { + "indexed": false, + "name": "y", + "type": "bytes32" + } + ], + "name": "PubkeyChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "indexedKey", + "type": "string" + }, + { + "indexed": false, + "name": "key", + "type": "string" + } + ], + "name": "TextChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "name": "hash", + "type": "bytes" + } + ], + "name": "MultihashChanged", + "type": "event" + } +] """ } @@ -225,8 +674,8 @@ extension Web3.Utils { return formatToPrecision(bigNumber, numberDecimals: toUnits.decimals, formattingDecimals: decimals, decimalSeparator: decimalSeparator, fallbackToScientific: fallbackToScientific); } - /// Formats a BigUInt object to String. The supplied number is first divided into integer and decimal part based on "toUnits", - /// then limit the decimal part to "decimals" symbols and uses a "decimalSeparator" as a separator. + /// Formats a BigUInt object to String. The supplied number is first divided into integer and decimal part based on "numberDecimals", + /// then limits the decimal part to "formattingDecimals" symbols and uses a "decimalSeparator" as a separator. /// Fallbacks to scientific format if higher precision is required. /// /// Returns nil of formatting is not possible to satisfy. @@ -241,7 +690,7 @@ extension Web3.Utils { } let divisor = BigUInt(10).power(unitDecimals) let (quotient, remainder) = bigNumber.quotientAndRemainder(dividingBy: divisor) - let fullRemainder = String(remainder); + var fullRemainder = String(remainder); let fullPaddedRemainder = fullRemainder.leftPadding(toLength: unitDecimals, withPad: "0") let remainderPadded = fullPaddedRemainder[0.. formattingDecimals { + let end = firstDigit+1+formattingDecimals > fullPaddedRemainder.count ? fullPaddedRemainder.count : firstDigit+1+formattingDecimals + remainingDigits = String(fullPaddedRemainder[firstDigit+1 ..< end]) + } else { + remainingDigits = String(fullPaddedRemainder[firstDigit+1 ..< fullPaddedRemainder.count]) + } + if remainingDigits != "" { + fullRemainder = firstDecimalUnit + decimalSeparator + remainingDigits + } else { + fullRemainder = firstDecimalUnit + } firstDigit = firstDigit + 1; break } @@ -330,7 +795,7 @@ extension Web3.Utils { let bytes = signatureData.bytes let r = Array(bytes[0..<32]) let s = Array(bytes[32..<64]) - return SECP256K1.UnmarshaledSignature(v: bytes[64], r: r, s: s) + return SECP256K1.UnmarshaledSignature(v: bytes[64], r: Data(r), s: Data(s)) } /// Marshals the V, R and S signature parameters into a 65 byte recoverable EC signature. @@ -344,9 +809,21 @@ extension Web3.Utils { /// Marshals internal signature structure into a 65 byte recoverable EC signature. static func marshalSignature(unmarshalledSignature: SECP256K1.UnmarshaledSignature) -> Data { - var completeSignature = Data(bytes: unmarshalledSignature.r) - completeSignature.append(Data(bytes: unmarshalledSignature.s)) + var completeSignature = Data(unmarshalledSignature.r) + completeSignature.append(Data(unmarshalledSignature.s)) completeSignature.append(Data(bytes: [unmarshalledSignature.v])) return completeSignature } + + public static func hexToData(_ string: String) -> Data? { + return Data.fromHex(string) + } + + public static func hexToBigUInt(_ string: String) -> BigUInt? { + return BigUInt(string.stripHexPrefix(), radix: 16) + } + + public static func randomBytes(length: Int) -> Data? { + return Data.randomBytes(length:length) + } } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3.swift b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3.swift index 59d548401..0d8c25c35 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3.swift +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/Web3/Classes/Web3.swift @@ -1,13 +1,10 @@ -// -// Web3.swift // web3swift // -// Created by Alexander Vlasov on 11.12.2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // import Foundation -import Result public enum Web3Error: Error { case transactionSerializationError @@ -80,24 +77,24 @@ public struct Web3 { } struct ResultUnwrapper { - static func getResponse(_ response: [String: Any]?) -> Result { + static func getResponse(_ response: [String: Any]?) throws -> Any { guard response != nil, let res = response else { - return Result.failure(Web3Error.connectionError) + throw Web3Error.connectionError } if let error = res["error"] { if let errString = error as? String { - return Result.failure(Web3Error.nodeError(desc: errString)) + throw Web3Error.nodeError(desc: errString) } else if let errDict = error as? [String:Any] { if errDict["message"] != nil, let descr = errDict["message"]! as? String { - return Result.failure(Web3Error.nodeError(desc: descr)) + throw Web3Error.nodeError(desc: descr) } } - return Result.failure(Web3Error.unknownError) + throw Web3Error.unknownError } guard let result = res["result"] else { - return Result.failure(Web3Error.dataError) + throw Web3Error.dataError } - return Result(result) + return result } } diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/web3swift-Bridging-Header.h b/Example/web3swiftExample/Pods/web3swift/web3swift/web3swift-Bridging-Header.h deleted file mode 100755 index 4eb75bede..000000000 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/web3swift-Bridging-Header.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// web3swift-Bridging-Header.h -// web3swift -// -// Created by Alexander Vlasov on 08.08.2018. -// Copyright © 2018 Bankex Foundation. All rights reserved. -// - -#ifndef web3swift_Bridging_Header_h -#define web3swift_Bridging_Header_h - - -#endif /* web3swift_Bridging_Header_h */ diff --git a/Example/web3swiftExample/Pods/web3swift/web3swift/web3swift.h b/Example/web3swiftExample/Pods/web3swift/web3swift/web3swift.h index fe4270f58..790492491 100755 --- a/Example/web3swiftExample/Pods/web3swift/web3swift/web3swift.h +++ b/Example/web3swiftExample/Pods/web3swift/web3swift/web3swift.h @@ -1,9 +1,7 @@ -// -// web3swift.h // web3swift // -// Created by Petr Korolev on 06/12/2017. -// Copyright © 2017 Bankex Foundation. All rights reserved. +// Created by Alex Vlasov. +// Copyright © 2018 Alex Vlasov. All rights reserved. // #if TARGET_OS_IPHONE diff --git a/Example/web3swiftExample/web3swiftExample.xcodeproj/project.pbxproj b/Example/web3swiftExample/web3swiftExample.xcodeproj/project.pbxproj index 79381f6b6..6493f2890 100644 --- a/Example/web3swiftExample/web3swiftExample.xcodeproj/project.pbxproj +++ b/Example/web3swiftExample/web3swiftExample.xcodeproj/project.pbxproj @@ -187,12 +187,14 @@ "${PODS_ROOT}/Target Support Files/Pods-web3swiftExample/Pods-web3swiftExample-frameworks.sh", "${BUILT_PRODUCTS_DIR}/BigInt/BigInt.framework", "${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework", + "${BUILT_PRODUCTS_DIR}/EthereumABI/EthereumABI.framework", + "${BUILT_PRODUCTS_DIR}/EthereumAddress/EthereumAddress.framework", "${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework", - "${BUILT_PRODUCTS_DIR}/Result/Result.framework", "${BUILT_PRODUCTS_DIR}/SipHash/SipHash.framework", + "${BUILT_PRODUCTS_DIR}/SwiftRLP/SwiftRLP.framework", "${BUILT_PRODUCTS_DIR}/scrypt/scrypt.framework", - "${BUILT_PRODUCTS_DIR}/secp256k1_ios/secp256k1_ios.framework", - "${BUILT_PRODUCTS_DIR}/web3swift/web3swift.framework", + "${BUILT_PRODUCTS_DIR}/secp256k1_swift/secp256k1_swift.framework", + "${BUILT_PRODUCTS_DIR}/web3swift/Web3swift.framework", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( @@ -200,12 +202,14 @@ outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BigInt.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CryptoSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EthereumABI.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EthereumAddress.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PromiseKit.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Result.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SipHash.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftRLP.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/scrypt.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/secp256k1_ios.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/web3swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/secp256k1_swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Web3swift.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; diff --git a/web3swift.podspec b/web3swift.podspec index 77ba9080e..1a7df8ca5 100755 --- a/web3swift.podspec +++ b/web3swift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "web3swift" -s.version = "2.0.0" +s.version = "2.0.1" s.summary = "Web3 implementation in vanilla Swift for iOS ans macOS" s.description = <<-DESC @@ -17,7 +17,7 @@ s.swift_version = '4.1' s.module_name = 'Web3swift' s.ios.deployment_target = "9.0" s.osx.deployment_target = "10.11" -s.source_files = "web3swift/{PrecompiledContracts,Promises,Web3,Contract,KeystoreManager,Transaction,Convenience}/Classes/*.{h,swift}", "web3swift/Utils/Classes/{EIP67Code, EIP681}.swift", "web3swift/HookedFunctions/Classes/Web3+Wallet.swift", "web3swift/web3swift.h" +s.source_files = "web3swift/{PrecompiledContracts,Promises,Web3,Contract,KeystoreManager,Transaction,Convenience}/Classes/*.{h,swift}", "web3swift/Utils/Classes/{EIP67Code, EIP681}.swift", "web3swift/HookedFunctions/Classes/*.swift", "web3swift/web3swift.h" s.public_header_files = "web3swift/web3swift.h" s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } diff --git a/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift b/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift index 376f2f7f1..f776821aa 100755 --- a/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift +++ b/web3swift/HookedFunctions/Classes/Web3+BrowserFunctions.swift @@ -38,8 +38,8 @@ extension web3.BrowserFunctions { public func sign(_ personalMessage: Data, account: String, password: String = "web3swift") -> String? { do { guard let keystoreManager = self.web3.provider.attachedKeystoreManager else {return nil} - - guard let signature = try Web3Signer.signPersonalMessage(personalMessage, keystore: keystoreManager, account: EthereumAddress(account)!, password: password) else {return nil} + guard let from = EthereumAddress(account, ignoreChecksum: true) else {return nil} + guard let signature = try Web3Signer.signPersonalMessage(personalMessage, keystore: keystoreManager, account: from, password: password) else {return nil} return signature.toHexString().addHexPrefix() } catch{ @@ -60,14 +60,7 @@ extension web3.BrowserFunctions { let sData = signature[32..<64].bytes let vData = signature[64] guard let signatureData = SECP256K1.marshalSignature(v: vData, r: rData, s: sData) else {return nil} - var hash: Data - if personalMessage.count == 32 { - print("Most likely it's hash already, allow for now") - hash = personalMessage - } else { - guard let h = Web3.Utils.hashPersonalMessage(personalMessage) else {return nil} - hash = h - } + guard let hash = Web3.Utils.hashPersonalMessage(personalMessage) else {return nil} guard let publicKey = SECP256K1.recoverPublicKey(hash: hash, signature: signatureData) else {return nil} return Web3.Utils.publicToAddressString(publicKey) } @@ -76,83 +69,117 @@ extension web3.BrowserFunctions { public func sendTransaction(_ transactionJSON: [String: Any], password: String = "web3swift") -> [String:Any]? { guard let transaction = EthereumTransaction.fromJSON(transactionJSON) else {return nil} guard let options = Web3Options.fromJSON(transactionJSON) else {return nil} - return self.sendTransaction(transaction, options: options, password: password) + var transactionOptions = TransactionOptions() + transactionOptions.from = options.from + transactionOptions.to = options.to + transactionOptions.value = options.value + transactionOptions.gasLimit = options.gasLimit != nil ? .limited(options.gasLimit!) : .automatic + transactionOptions.gasPrice = options.gasPrice != nil ? .manual(options.gasPrice!) : .automatic + return self.sendTransaction(transaction, transactionOptions: transactionOptions, password: password) } - public func sendTransaction(_ transaction: EthereumTransaction, options: Web3Options, password: String = "web3swift") -> [String:Any]? { - let result = self.web3.eth.sendTransaction(transaction, options: options, password: password) - switch result { - case .failure(_): + public func sendTransaction(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions, password: String = "web3swift") -> [String:Any]? { + do { + let result = try self.web3.eth.sendTransaction(transaction, transactionOptions: transactionOptions, password: password) + return ["txhash": result.hash] + } catch { return nil - case .success(let res): - return ["txhash": res.hash] } } public func estimateGas(_ transactionJSON: [String: Any]) -> BigUInt? { guard let transaction = EthereumTransaction.fromJSON(transactionJSON) else {return nil} guard let options = Web3Options.fromJSON(transactionJSON) else {return nil} - return self.estimateGas(transaction, options: options) - } - - public func estimateGas(_ transaction: EthereumTransaction, options: Web3Options) -> BigUInt? { - let result = self.web3.eth.estimateGas(transaction, options: options) - switch result { - case .failure(_): - return nil - case .success(let res): - return res - } - } - - public func prepareTxForApproval(_ transactionJSON: [String: Any]) -> (transaction: EthereumTransaction?, options: Web3Options?) { - guard let transaction = EthereumTransaction.fromJSON(transactionJSON) else {return (nil, nil)} - guard let options = Web3Options.fromJSON(transactionJSON) else {return (nil, nil)} - return self.prepareTxForApproval(transaction, options: options) + var transactionOptions = TransactionOptions() + transactionOptions.from = options.from + transactionOptions.to = options.to + transactionOptions.value = options.value + transactionOptions.gasLimit = .automatic + transactionOptions.gasPrice = options.gasPrice != nil ? .manual(options.gasPrice!) : .automatic + return self.estimateGas(transaction, transactionOptions: transactionOptions) } - public func prepareTxForApproval(_ trans: EthereumTransaction, options opts: Web3Options) throws -> (transaction: EthereumTransaction?, options: Web3Options?) { + public func estimateGas(_ transaction: EthereumTransaction, transactionOptions: TransactionOptions) -> BigUInt? { do { - var transaction = trans - var options = opts - guard let _ = options.from else {return (nil, nil)} - let gasPrice = try self.web3.eth.getGasPrice() - transaction.gasPrice = gasPrice - options.gasPrice = gasPrice - guard let gasEstimate = self.estimateGas(transaction, options: options) else {return (nil, nil)} - transaction.gasLimit = gasEstimate - options.gasLimit = gasEstimate - print(transaction) - return (transaction, options) + let result = try self.web3.eth.estimateGas(transaction, transactionOptions: transactionOptions) + return result } catch { - return (nil, nil) + return nil } } +// public func prepareTxForApproval(_ transactionJSON: [String: Any]) -> (transaction: EthereumTransaction?, options: Web3Options?) { +// guard let transaction = EthereumTransaction.fromJSON(transactionJSON) else {return (nil, nil)} +// guard let options = Web3Options.fromJSON(transactionJSON) else {return (nil, nil)} +// return self.prepareTxForApproval(transaction, options: options) +// } +// +// public func prepareTxForApproval(_ trans: EthereumTransaction, options opts: Web3Options) throws -> (transaction: EthereumTransaction?, options: Web3Options?) { +// do { +// var transaction = trans +// var options = opts +// guard let _ = options.from else {return (nil, nil)} +// let gasPrice = try self.web3.eth.getGasPrice() +// transaction.gasPrice = gasPrice +// options.gasPrice = gasPrice +// guard let gasEstimate = self.estimateGas(transaction, options: options) else {return (nil, nil)} +// transaction.gasLimit = gasEstimate +// options.gasLimit = gasEstimate +// print(transaction) +// return (transaction, options) +// } catch { +// return (nil, nil) +// } +// } + public func signTransaction(_ transactionJSON: [String: Any], password: String = "web3swift") -> String? { guard let transaction = EthereumTransaction.fromJSON(transactionJSON) else {return nil} guard let options = Web3Options.fromJSON(transactionJSON) else {return nil} - return self.signTransaction(transaction, options: options, password: password) + var transactionOptions = TransactionOptions() + transactionOptions.from = options.from + transactionOptions.to = options.to + transactionOptions.value = options.value + transactionOptions.gasLimit = options.gasLimit != nil ? .limited(options.gasLimit!) : .automatic + transactionOptions.gasPrice = options.gasPrice != nil ? .manual(options.gasPrice!) : .automatic + if let nonceString = transactionJSON["nonce"] as? String, let nonce = BigUInt(nonceString.stripHexPrefix(), radix: 16) { + transactionOptions.nonce = .manual(nonce) + } else { + transactionOptions.nonce = .pending + } + return self.signTransaction(transaction, transactionOptions: transactionOptions, password: password) } - public func signTransaction(_ trans: EthereumTransaction, options: Web3Options, password: String = "web3swift") -> String? { + public func signTransaction(_ trans: EthereumTransaction, transactionOptions: TransactionOptions, password: String = "web3swift") -> String? { do { var transaction = trans - guard let from = options.from else {return nil} + guard let from = transactionOptions.from else {return nil} guard let keystoreManager = self.web3.provider.attachedKeystoreManager else {return nil} - let gasPriceResult = self.web3.eth.getGasPrice() - if case .failure(_) = gasPriceResult { - return nil + guard let gasPricePolicy = transactionOptions.gasPrice else {return nil} + guard let gasLimitPolicy = transactionOptions.gasLimit else {return nil} + guard let noncePolicy = transactionOptions.nonce else {return nil} + switch gasPricePolicy { + case .manual(let gasPrice): + transaction.gasPrice = gasPrice + default: + let gasPrice = try self.web3.eth.getGasPrice() + transaction.gasPrice = gasPrice } - transaction.gasPrice = gasPriceResult.value! - guard let gasEstimate = self.estimateGas(transaction, options: options) else {return nil} - transaction.gasLimit = gasEstimate - let nonceResult = self.web3.eth.getTransactionCount(address: from, onBlock: "pending") - if case .failure(_) = nonceResult { - return nil + switch gasLimitPolicy { + case .manual(let gasLimit): + transaction.gasLimit = gasLimit + default: + let gasLimit = try self.web3.eth.estimateGas(transaction, transactionOptions: transactionOptions) + transaction.gasLimit = gasLimit + } + + switch noncePolicy { + case .manual(let nonce): + transaction.nonce = nonce + default: + let nonce = try self.web3.eth.getTransactionCount(address: from, onBlock: "pending") + transaction.nonce = nonce } - transaction.nonce = nonceResult.value! if (self.web3.provider.network != nil) { transaction.chainID = self.web3.provider.network?.chainID From 99c75afbdcaa0a4781bc1f39ae0147db6c0bf74a Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Tue, 20 Nov 2018 14:12:50 +0300 Subject: [PATCH 23/23] fix zero value on gas estimation --- web3swift/Transaction/Classes/EthereumTransaction.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web3swift/Transaction/Classes/EthereumTransaction.swift b/web3swift/Transaction/Classes/EthereumTransaction.swift index 09af7a233..11f42a01b 100755 --- a/web3swift/Transaction/Classes/EthereumTransaction.swift +++ b/web3swift/Transaction/Classes/EthereumTransaction.swift @@ -322,10 +322,13 @@ public struct EthereumTransaction: CustomStringConvertible { static func createRequest(method: JSONRPCmethod, transaction: EthereumTransaction, transactionOptions: TransactionOptions?) -> JSONRPCrequest? { let onBlock = transactionOptions?.callOnBlock?.stringValue var request = JSONRPCrequest() + var tx = transaction request.method = method let from = transactionOptions?.from -// guard let from = options?.from else {return nil} - guard var txParams = transaction.encodeAsDictionary(from: from) else {return nil} + if transactionOptions != nil, transactionOptions!.value != nil { + tx.value = transactionOptions!.value! + } + guard var txParams = tx.encodeAsDictionary(from: from) else {return nil} if method == .estimateGas || transactionOptions?.gasLimit == nil { txParams.gas = nil }